pax_global_header00006660000000000000000000000064151432363610014516gustar00rootroot0000000000000052 comment=4bd7c96db2e5e99319470fa5d55f9cbe1a1898d8 jtreg8-8.2.1+1+ds1/000077500000000000000000000000001514323636100135505ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/.gitignore000066400000000000000000000000531514323636100155360ustar00rootroot00000000000000/build/ /.idea/ /webrev .DS_Store .src-rev jtreg8-8.2.1+1+ds1/.hgignore000066400000000000000000000001131514323636100153460ustar00rootroot00000000000000^(build|dist)/ nbproject/private/ plugins/idea/.idea/ plugins/idea/build/ jtreg8-8.2.1+1+ds1/.hgtags000066400000000000000000000034571514323636100150370ustar00rootroot000000000000009f51ef22f00a3d5b681472cacf3ce15868073103 jtreg4.1-b01 2cf779985e18ba2f79aaec88f543be9efecf352f jtreg4.1-b02 bd7a3ed1210fa61f92f066c65d5e589e2aa26813 jtreg4.1-b03 cbc1f04a52ea2488e8dc7715fc59a5a122be9851 jtreg4.1-b04 46b8c02be3b356c7f953dbfa18246b357b5e7101 jtreg4.1-b05 d47a6e238c3e0f6d8ca1a6640c182be14c45eab2 jtreg-4.1-b06 d47a6e238c3e0f6d8ca1a6640c182be14c45eab2 jtreg4.1-b06 8ab579624a503e1df21841070ae5f869c301de8f jtreg4.1-b07 d47a6e238c3e0f6d8ca1a6640c182be14c45eab2 jtreg-4.1-b06 0000000000000000000000000000000000000000 jtreg-4.1-b06 e08a5e0b79ba57743222bbea19c0bdb142968769 jtreg4.1-b08 c54815dea64cf7b011f8473c18d54a86b9a9d5af jtreg4.1-b09 8c3179c3ebdab7df35b8e9907bd8ad8bc5a9f9f8 jtreg4.1-b10 04f40c388713f11c1cfb2094556d4b024b9ab939 jtreg4.1-b11 79705dae19e74b0693cda9ece8eaf0984159ab97 jtreg4.1-b12 5e994d1f9840ba39b82977a56e02c4f702a1dcbd jtreg4.1-b13 1159c9f96a4470dec79e6fa71b4f1a4895c4b20f jtreg4.2-b01 dbccea90c34dacf7e0824d5e3d3e9e1e930a103a jtreg4.2-b02 45590e2d6af12da44cc160764a9b552516be8440 jtreg4.2-b03 585f794e105997ab44109d70dbaa1c072b03afcc jtreg4.2-b04 4b0cd55e7741825de6ea79e9d4338d2972460678 jtreg4.2-b05 2d96b4cf02660b1580542379d77492f68d3ca73b jtreg4.2-b06 26d8a4a47674c4ca304b9e290dccca1dd1c7224f jtreg4.2-b07 cce0ac75e87864ed365a420fb836a4430421ab0f jtreg4.2-b08 684f12eef4a8c2f42afe2abe3d79eead72efcc5f jtreg4.2-b09 746c6d1328721541d3b16154c25a0179fbf53f7c jtreg4.2-b10 a13ec77e7adcc4c9ed434e664abc350abaacc045 jtreg4.2-b11 652902f7fb0ed0b4f307d61a799caf50a6e609be jtreg4.2-b12 7a38f21e077821a5015792e85b3793c90c81b866 jtreg4.2-b13 ec37d2900cd42987270f98423a60eb6297bdc37b jtreg4.2-b14 d5a9216fad5ca01002e18526be2c31cafb43e178 jtreg4.2-b15 deee95d5d8ff6406b77c0d5b9297736eb7c98c6d jtreg4.2-b16 03c4dff80b0f55865c6e5fe0aa8ea94d0ca1a2ac jtreg5.0-b01 95aa601b8100c6c56a14d35cfe493372214b1d94 jtreg5.1-b01 jtreg8-8.2.1+1+ds1/.jcheck/000077500000000000000000000000001514323636100150555ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/.jcheck/conf000066400000000000000000000010671514323636100157310ustar00rootroot00000000000000[general] project=code-tools comments=lax jbs=CODETOOLS [checks] error=author,committer,reviewers,merge,issues,executable,symlink,message,whitespace [repository] tags=jtreg(?:4\.1-b[0-9]{2}|5\.[01]-b[0-9]{2}|6|-[6789](?:\.[0-9]+)*\+[0-9]+) branches= [census] version=0 domain=openjdk.org [checks "whitespace"] files=.*\.java|.*\.m|.*\.mm|.*\.gmk|.*\.m4|.*\.ac|Makefile ignore-tabs=.*\.gmk|Makefile [checks "merge"] message=Merge [checks "reviewers"] reviewers=1 ignore=duke [checks "committer"] role=committer [checks "issues"] pattern=^(79[0-9]{5}): (\S.*)$ jtreg8-8.2.1+1+ds1/CHANGELOG.md000066400000000000000000000364531514323636100153740ustar00rootroot00000000000000## [Unreleased](https://git.openjdk.org/jtreg/compare/jtreg-8.2.1+1...master) _nothing noteworthy, yet_ ## [8.2.1](https://git.openjdk.org/jtreg/compare/jtreg-8.2+1...jtreg-8.2.1+1) * Fixup release without any changes compared to [8.2](#82) ## [8.2](https://git.openjdk.org/jtreg/compare/jtreg-8.1+1...jtreg-8.2+1) * Improving handling of JASM files: * Use 45.3 (representing Java 1.1) as the default class file version, if the JASM file(s) don't have any specific class file version in them. [CODETOOLS-7904133](https://bugs.openjdk.org/browse/CODETOOLS-7904133) * Prevent JASM-related log messages on stdout [CODETOOLS-7904121](https://bugs.openjdk.org/browse/CODETOOLS-7904121) * Update bundled dependencies: * AsmTools 9.1 [CODETOOLS-7904130](https://bugs.openjdk.org/browse/CODETOOLS-7904130) * JUnit 5.14.2 [CODETOOLS-7904129](https://bugs.openjdk.org/browse/CODETOOLS-7904129) ## [8.1](https://git.openjdk.org/jtreg/compare/jtreg-8+2...jtreg-8.1+1) * Improve time(out)-related logging: * [CODETOOLS-7903816](https://bugs.openjdk.org/browse/CODETOOLS-7903816) * [CODETOOLS-7903894](https://bugs.openjdk.org/browse/CODETOOLS-7903894) * [CODETOOLS-7904067](https://bugs.openjdk.org/browse/CODETOOLS-7904067) * [CODETOOLS-7904088](https://bugs.openjdk.org/browse/CODETOOLS-7904088) * `XAUTHORITY` environment variable is now preserved when launching tests on Unix-like platforms. [CODETOOLS-7904016](https://bugs.openjdk.org/browse/CODETOOLS-7904016) * Update bundled dependencies: * JUnit 5.13.4 [CODETOOLS-7904070](https://bugs.openjdk.org/browse/CODETOOLS-7904070) ## [8](https://git.openjdk.org/jtreg/compare/jtreg-7.5.2+1...jtreg-8+2) * Require JDK 17 to build `jtreg` tool. [CODETOOLS-7904000](https://bugs.openjdk.org/browse/CODETOOLS-7904000) * Update bundled dependencies: * AsmTools 8.1 [CODETOOLS-7903081](https://bugs.openjdk.org/browse/CODETOOLS-7903081) * JUnit 5.13.3 [CODETOOLS-7904055](https://bugs.openjdk.org/browse/CODETOOLS-7904055) * Fix `--verify-exclude` to abort test runs when discovering failures [CODETOOLS-7904015](https://bugs.openjdk.org/browse/CODETOOLS-7904015) * Fix to use default charset when reading group files [CODETOOLS-7904021](https://bugs.openjdk.org/browse/CODETOOLS-7904021) ## [7.5.2](https://git.openjdk.org/jtreg/compare/jtreg-7.5.1+1...jtreg-7.5.2+1) * Support `${test.main.class}` for Java source files in smart arguments [CODETOOLS-7903981](https://bugs.openjdk.org/browse/CODETOOLS-7903981) * Make default timeout seconds configurable [CODETOOLS-7903961](https://bugs.openjdk.org/browse/CODETOOLS-7903961) * Restore propagation of preview flag into library code [CODETOOLS-7903971](https://bugs.openjdk.org/browse/CODETOOLS-7903971) * Add support for `.jasm` and `.jcod` file in patched modules [CODETOOLS-7903955](https://bugs.openjdk.org/browse/CODETOOLS-7903955) * Use scratch directory for JUnit's `@TempDir` annotation by default [CODETOOLS-7903953](https://bugs.openjdk.org/browse/CODETOOLS-7903953) ## [7.5.1](https://git.openjdk.org/jtreg/compare/jtreg-7.5+1...jtreg-7.5.1+1) * Support running individual parameterized tests and @Nested test classes [CODETOOLS-7903930](https://bugs.openjdk.org/browse/CODETOOLS-7903930) * Remove problematic implementation for `LIBRARY.properties` support [CODETOOLS-7903940](https://bugs.openjdk.org/browse/CODETOOLS-7903940) * Add `test.thread.factory` property to filter tests based on test thread factory value [CODETOOLS-7903931](https://bugs.openjdk.org/browse/CODETOOLS-7903931) * Fix and improve `--verify-exclude` feature [CODETOOLS-7903883](https://bugs.openjdk.org/browse/CODETOOLS-7903883) [CODETOOLS-7903935](https://bugs.openjdk.org/browse/CODETOOLS-7903935) ## [7.5](https://git.openjdk.org/jtreg/compare/jtreg-7.4+1...jtreg-7.5+1) * Restore `jtdiff` tool [CODETOOLS-7903760](https://bugs.openjdk.org/browse/CODETOOLS-7903760) * Add support for `LIBRARY.properties` file in the directory specified in the `@library` tag [CODETOOLS-7903775](https://bugs.openjdk.org/browse/CODETOOLS-7903775) * The verbose option given at the command-line is now propagated to test agents, including the JUnit test runner. [CODETOOLS-7903443](https://bugs.openjdk.org/browse/CODETOOLS-7903443) [CODETOOLS-7903745](https://bugs.openjdk.org/browse/CODETOOLS-7903745) * Report test duration information in JUnit and TestNG-based tests [CODETOOLS-7903752](https://bugs.openjdk.org/browse/CODETOOLS-7903752) [CODETOOLS-7903753](https://bugs.openjdk.org/browse/CODETOOLS-7903753) * Improve message when test times out in Agent VM mode [CODETOOLS-7902346](https://bugs.openjdk.org/browse/CODETOOLS-7902346) * Log time spent waiting to acquire exclusive access lock [CODETOOLS-7903188](https://bugs.openjdk.org/browse/CODETOOLS-7903188) * Speed-up error reporting on hosts with slow hostname lookups [CODETOOLS-7903746](https://bugs.openjdk.org/browse/CODETOOLS-7903746) * Updated jtreg to bundle JUnit 5.11.0 [CODETOOLS-7903821](https://bugs.openjdk.org/browse/CODETOOLS-7903821) ## [7.4](https://git.openjdk.org/jtreg/compare/jtreg-7.3.1+1...jtreg-7.4+1) * Remove support for `jtdiff` [CODETOOLS-7903622](https://bugs.openjdk.org/browse/CODETOOLS-7903622) * jtreg now verifies ProblemList files [CODETOOLS-7903659](https://bugs.openjdk.org/browse/CODETOOLS-7903659) * jtreg no longer ignores VM exit code when test process reports status with "STATUS: " line [CODETOOLS-7903621](https://bugs.openjdk.org/browse/CODETOOLS-7903621) * Use SOURCE_BUILD_EPOCH to support reproducible builds [CODETOOLS-7903539](https://bugs.openjdk.org/browse/CODETOOLS-7903539) * Updated jtreg to bundle JUnit 5.10.2 [CODETOOLS-7903578](https://bugs.openjdk.org/browse/CODETOOLS-7903578) * jtreg, when communicating with the AgentServer in agentvm mode, will now bind to loopback address. [CODETOOLS-7903686](https://bugs.openjdk.org/browse/CODETOOLS-7903686) * jtreg, in certain cases, would incorrectly report a test as PASSED when the test process would exit with a non-zero exit code. [CODETOOLS-7903621](https://bugs.openjdk.org/browse/CODETOOLS-7903621) ## [7.3.1](https://git.openjdk.org/jtreg/compare/jtreg-7.3+1...jtreg-7.3.1+1) * Fixed setting default environment variables on Windows * [CODETOOLS-7903515](https://bugs.openjdk.org/browse/CODETOOLS-7903515) ## [7.3](https://git.openjdk.org/jtreg/compare/jtreg-7.2+1...jtreg-7.3+1) * Updated set of default environment variables set for tests on Unix-like platforms. * Includes `DBUS_SESSION_BUS_ADDRESS`, `WAYLAND_DISPLAY`, and `XDG-*` [CODETOOLS-7903400](https://bugs.openjdk.org/browse/CODETOOLS-7903400) * Updated external dependencies. * Guice to 5.1.0 [CODETOOLS-7903468](https://bugs.openjdk.org/browse/CODETOOLS-7903468) * JCommander to 1.82 [CODETOOLS-7903469](https://bugs.openjdk.org/browse/CODETOOLS-7903469) * Fixed output-related issues. * AgentServer log() does not flush [CODETOOLS-7903470](https://bugs.openjdk.org/browse/CODETOOLS-7903470) * System.out and System.err messages are missing in jtr file when a test times out in agentvm mode [CODETOOLS-7903441](https://bugs.openjdk.org/browse/CODETOOLS-7903441) * Timeout refired %s times message confusing [CODETOOLS-7902485](https://bugs.openjdk.org/browse/CODETOOLS-7902485) * Fixed race-condition when running tests with a multi-module setup * [CODETOOLS-7903507](https://bugs.openjdk.org/browse/CODETOOLS-7903507) ## [7.2](https://git.openjdk.org/jtreg/compare/jtreg-7.1.1+1...jtreg-7.2+1) * Improved support for JUnit Jupiter. * Update jtreg to bundle JUnit 5.9.2 [CODETOOLS-7903406](https://bugs.openjdk.org/browse/CODETOOLS-7903406) * Improve reporting for errors in JUnit's lifecycle methods [CODETOOLS-7903430](https://bugs.openjdk.org/browse/CODETOOLS-7903430) * Improved support for TestNG. * Support `test.query` for TestNG tests [CODETOOLS-7903414](https://bugs.openjdk.org/browse/CODETOOLS-7903414) * Generate all debugging info when compiling `jtreg` [CODETOOLS-7903393](https://bugs.openjdk.org/browse/CODETOOLS-7903393) * RISC-V Port has been integrated into JDK mainline * Set `simpleArch` to `riscv64` when `os.arch` is `riscv64` [CODETOOLS-7903138](https://bugs.openjdk.org/browse/CODETOOLS-7903138) * Fix incorrect format for version in error message [CODETOOLS-7903398](https://bugs.openjdk.org/browse/CODETOOLS-7903398) * Add options -testThreadFactory and -testThreadFactoryPath to allow the use of a custom thread factory, to be used to create the thread to run a test. * [CODETOOLS-7903373](https://bugs.openjdk.org/browse/CODETOOLS-79033734) ## [7.1.1](https://git.openjdk.org/jtreg/compare/jtreg-7.1+1...jtreg-7.1.1+1) * Summary reporter getter is now thread-safe. * [CODETOOLS-7903390](https://bugs.openjdk.org/browse/CODETOOLS-7903390) ## [7.1](https://git.openjdk.org/jtreg/compare/jtreg-7+1...jtreg-7.1+1) * Improved support for JUnit Jupiter. * Avoid using TestNG mixed mode. [CODETOOLS-7903264](https://bugs.openjdk.org/browse/CODETOOLS-7903264) * Support JUnit tests in a system module. [CODETOOLS-7903260](https://bugs.openjdk.org/browse/CODETOOLS-7903260) * Support executing a single method. [CODETOOLS-7903267](https://bugs.openjdk.org/browse/CODETOOLS-7903267) * Improve per-class reporting of JUnit tests, in `.jtr` file. [CODETOOLS-7903324](https://bugs.openjdk.org/browse/CODETOOLS-7903324) * Support a group of "all tests", represented by `.`. * [CODETOOLS-7903331](https://bugs.openjdk.org/browse/CODETOOLS-7903331) * Improve performance when writing reports; new reporting option `-report:files`. * [CODETOOLS-7903323](https://bugs.openjdk.org/browse/CODETOOLS-7903323) * Updates for building jtreg with recent JDKs. * [CODETOOLS-7903346](https://bugs.openjdk.org/browse/CODETOOLS-7903346) * Improve OS detection on Mac. * Use `sw_vers`. [CODETOOLS-7903294](https://bugs.openjdk.org/browse/CODETOOLS-7903294) * Check process exit code. [CODETOOLS-7903325](https://bugs.openjdk.org/browse/CODETOOLS-7903325) * Trace reasons to recompile extra property definition files. * [CODETOOLS-7903329](https://bugs.openjdk.org/browse/CODETOOLS-7903329) * FAQ updates. * Time taken to run tests. [CODETOOLS-7903261](https://bugs.openjdk.org/browse/CODETOOLS-7903261) * Accessing TestNG and JUnit libraries. [CODETOOLS-7903244](https://bugs.openjdk.org/browse/CODETOOLS-7903244) ## [7](https://git.openjdk.org/jtreg/compare/jtreg-6.2+1...jtreg-7+1) * Improved support for JUnit Jupiter. * Use JUnit Platform Launcher. [CODETOOLS-7903047](https://bugs.openjdk.org/browse/CODETOOLS-7903047) * Use JUnit uber-jar. [CODETOOLS-7903055](https://bugs.openjdk.org/browse/CODETOOLS-7903055) * Support MSYS2 for building jtreg on Windows. * [CODETOOLS-7903206](https://bugs.openjdk.org/browse/CODETOOLS-7903206) * `os.simpleArch` is `x64` for `linux-loongarch64`/`mips64`/`mips64el` in `@require` context. * [CODETOOLS-7903120](https://bugs.openjdk.org/browse/CODETOOLS-7903120) * Log start time for every action. * [CODETOOLS-7903183](https://bugs.openjdk.org/browse/CODETOOLS-7903183) * Update OS version check. * [CODETOOLS-7903184](https://bugs.openjdk.org/browse/CODETOOLS-7903184) * Support invocation via ToolProvider. * [CODETOOLS-7903097](https://bugs.openjdk.org/browse/CODETOOLS-7903097) * Report `os.*` system properties in `.jtr` file. * [CODETOOLS-7903044](https://bugs.openjdk.org/browse/CODETOOLS-7903044) ## [6.2](https://git.openjdk.org/jtreg/compare/jtreg-6.1+1...jtreg-6.2+1) * Provide system property or option to override timeout. * [CODETOOLS-7903083](https://bugs.openjdk.org/browse/CODETOOLS-7903083) * Updates for building jtreg with recent JDKs. * [CODETOOLS-7903073](https://bugs.openjdk.org/browse/CODETOOLS-7903073) * Add an FAQ entry for `javatest.maxOutputSize`. * [CODETOOLS-7903050](https://bugs.openjdk.org/browse/CODETOOLS-7903050) * Allow subtest ids with dashes and underscores. * [CODETOOLS-7903037](https://bugs.openjdk.org/browse/CODETOOLS-7903037) * jtreg should print stdout if JVM gathering properties fails. * [CODETOOLS-7903030](https://bugs.openjdk.org/browse/CODETOOLS-7903030) ## [6.1](https://git.openjdk.org/jtreg/compare/jtreg-6+1...jtreg-6.1+1) * Elapsed time of `MainAction` is including serialization wait time * [CODETOOLS-7902942](https://bugs.openjdk.org/browse/CODETOOLS-7902942) * Support building jtreg with recent JDKs. * [CODETOOLS-7902966](https://bugs.openjdk.org/browse/CODETOOLS-7902966) * [CODETOOLS-7902991](https://bugs.openjdk.org/browse/CODETOOLS-7902991) * Update/improve jcheck settings for jtreg repo. * [CODETOOLS-7902995](https://bugs.openjdk.org/browse/CODETOOLS-7902995) * Introduce support for `HEADLESS` to disable tests that require a display. * jtreg should not set a security manager for JDK 18. * [CODETOOLS-7902990](https://bugs.openjdk.org/browse/CODETOOLS-7902990) ## [6](https://git.openjdk.org/jtreg/compare/jtreg5.1-b01...jtreg-6+1) * Add support for `Automatic-Module-Name` in jar files. * Update versions of jtreg dependencies. * [CODETOOLS-7902791](https://bugs.openjdk.org/browse/CODETOOLS-7902791) * User modules can be used only in othervm. * [CODETOOLS-7902707](https://bugs.openjdk.org/browse/CODETOOLS-7902707) * Improve diagnostic output when failing to get version for JDK under test. * [CODETOOLS-7902748](https://bugs.openjdk.org/browse/CODETOOLS-7902748) * Initial support for new-style version numbers for jtreg. * Improve support for `@enablePreview`. * [CODETOOLS-7902754](https://bugs.openjdk.org/browse/CODETOOLS-7902754) * Move details of environment variables to new appendix. * Add FAQ reference to `doc/testing.md`. * Add support for explicit `-retain:lastRun`. ## [5.1](https://git.openjdk.org/jtreg/compare/jtreg5.0-b01...jtreg5.1-b01) * Update AsmTools to 7.0 b08; update JT Harness to 6.0-b11. * Add `test.name` to properties given to test. * [CODETOOLS-7902671](https://bugs.openjdk.org/browse/CODETOOLS-7902671) * Pass `test.*` to `requires.extraPropDefns` classes. * [CODETOOLS-7902336](https://bugs.openjdk.org/browse/CODETOOLS-7902336) * Add mean, standard deviation to agent stats. * Report jtreg version info to work directory. * Report agent pool statistics. * Improve version details for JT Harness and AsmTools. * Log Agent Pool activity to `agent.trace` file. * Catch output written to agent stdout (fd1) and stderr (fd2). * [CODETOOLS-7902657](https://bugs.openjdk.org/browse/CODETOOLS-7902657) * Log agent activity to files in the work directory. * [CODETOOLS-7902656](https://bugs.openjdk.org/browse/CODETOOLS-7902656) * Propagate client-side "id" to agent server. * [CODETOOLS-7902655](https://bugs.openjdk.org/browse/CODETOOLS-7902655) * Support `@enablePreview`. * [CODETOOLS-7902654](https://bugs.openjdk.org/browse/CODETOOLS-7902654) * Use https://git.openjdk.org for CODE_TOOLS_URL. * [CODETOOLS-7902637](https://bugs.openjdk.org/browse/CODETOOLS-7902637) * Ignore specified lines in `@compile/fail/ref=`. * [CODETOOLS-7902633](https://bugs.openjdk.org/browse/CODETOOLS-7902633) * Validate test group names. * [CODETOOLS-7902606](https://bugs.openjdk.org/browse/CODETOOLS-7902606) ## [5](https://git.openjdk.org/jtreg/compare/jtreg4.2-b16...jtreg5.0-b01) * Improve Cygwin detection by relaxing constraints on expected installation directory. * Incorrect handling of paths in smart action args for Windows. * [CODETOOLS-7902571](https://bugs.openjdk.org/browse/CODETOOLS-7902571) * Introduce `test.file`. * [CODETOOLS-7902545](https://bugs.openjdk.org/browse/CODETOOLS-7902545) jtreg8-8.2.1+1+ds1/CONTRIBUTING.md000066400000000000000000000003071514323636100160010ustar00rootroot00000000000000# Contributing to JTReg JTReg is part of the OpenJDK [CodeTools] Project. Please see for how to contribute. [CodeTools]: https://openjdk.org/projects/code-tools jtreg8-8.2.1+1+ds1/CONTRIBUTORS000066400000000000000000000010721514323636100154300ustar00rootroot00000000000000The following people have contributed to the development of jtreg. Original Author: Iris Clark Tag Specification: Mark Reinhold Currently Maintained As Part Of: OpenJDK CodeTools Project Other Early Contributors: Brian Kurotsuchi Dawn Phillips Jessica Mauvais John Rose Maurizio Cimadamore Kumar Srinivasan Since open-sourcing the code in 2006, and the use of first Mercurial and subsequently Git, the Contributors are tracked in the SCM metadata. For all recent contributors and contributions, see `git shortlog` or `git log`. jtreg8-8.2.1+1+ds1/COPYRIGHT000066400000000000000000000017421514323636100150470ustar00rootroot00000000000000Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 only, as published by the Free Software Foundation. This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details (a copy is included in the LICENSE file that accompanied this code). You should have received a copy of the GNU General Public License version 2 along with this work; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or visit www.oracle.com if you need additional information or have any questions. jtreg8-8.2.1+1+ds1/LICENSE000066400000000000000000000455121514323636100145640ustar00rootroot00000000000000The GNU General Public License (GPL) Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. One line to give the program's name and a brief idea of what it does. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details. The hypothetical commands 'show w' and 'show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than 'show w' and 'show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program 'Gnomovision' (which makes passes at compilers) written by James Hacker. signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. "CLASSPATH" EXCEPTION TO THE GPL Certain source files distributed by Oracle America and/or its affiliates are subject to the following clarification and special exception to the GPL, but only where Oracle has expressly included in the particular source file's header the words "Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the LICENSE file that accompanied this code." Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. jtreg8-8.2.1+1+ds1/README.md000066400000000000000000000014011514323636100150230ustar00rootroot00000000000000# The Regression Test Harness for the OpenJDK platform: `jtreg` * For details on writing tests for `jtreg`, see [The JDK Test Framework: Tag Language Specification][tagspec]. * For details on building `jtreg`, see [doc/building.md](doc/building.md). * For additional details about `jtreg`, see [The `jtreg` FAQ][faq]. * For details on running JDK tests using the JDK _make test_ framework, see [Using "make test" (the run-test framework)][make-test]. * For details on running jtreg tests using the IntelliJ IDE, see [plugins/idea/README.md](plugins/idea/README.md) [faq]: https://openjdk.org/jtreg/faq.html [tagspec]: https://openjdk.org/jtreg/tag-spec.html [make-test]: https://github.com/openjdk/jdk/blob/master/doc/testing.md ## Using IntelliJ IDEA jtreg8-8.2.1+1+ds1/apiguardian/000077500000000000000000000000001514323636100160345ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/apiguardian/.github/000077500000000000000000000000001514323636100173745ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/apiguardian/.github/workflows/000077500000000000000000000000001514323636100214315ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/apiguardian/.github/workflows/main.yml000066400000000000000000000031131514323636100230760ustar00rootroot00000000000000name: CI on: push: branches: - main - 'releases/*' pull_request: branches: - '*' jobs: gradle: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v1 - uses: actions/setup-java@v1 with: java-version: 11 - uses: eskatos/gradle-command-action@v1 with: arguments: --stacktrace build publish_artifacts: name: Publish Snapshot Artifacts needs: gradle runs-on: ubuntu-latest if: github.event_name == 'push' && github.repository == 'apiguardian-team/apiguardian' && (startsWith(github.ref, 'refs/heads/releases/') || github.ref == 'refs/heads/main') steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: java-version: 11 - name: 'Publish' env: ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} run: ./gradlew publish -x check update_documentation: name: Update Snapshot Documentation needs: gradle runs-on: ubuntu-latest if: github.event_name == 'push' && github.repository == 'apiguardian-team/apiguardian' && github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: java-version: 11 - name: 'Upload Documentation' env: GRGIT_USER: ${{ secrets.GH_TOKEN }} run: ./gradlew gitPublishPush -x check jtreg8-8.2.1+1+ds1/apiguardian/.gitignore000066400000000000000000000002571514323636100200300ustar00rootroot00000000000000# Gradle .gradle build/ # Ignore Gradle GUI config gradle-app.setting # Eclipse .classpath .settings/ .project bin/ # IntelliJ *.iml *.ipr *.iws *.uml .idea/ # Misc *.log jtreg8-8.2.1+1+ds1/apiguardian/LICENSE000066400000000000000000000261351514323636100170500ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. jtreg8-8.2.1+1+ds1/apiguardian/README.md000066400000000000000000000015461514323636100173210ustar00rootroot00000000000000# @API Guardian [![CI Status](https://github.com/apiguardian-team/apiguardian/workflows/CI/badge.svg)](https://github.com/apiguardian-team/apiguardian/actions) Library that provides the `@API` annotation that is used to annotate public types, methods, constructors, and fields within a framework or application in order to publish their status and level of stability and to indicate how they are intended to be used by consumers of the API. ## How to use it The @API Guardian library is deployed to Maven Central. You can simply add it as a dependency: ### Apache Maven ```xml org.apiguardian apiguardian-api 1.1.2 ``` ### Gradle ```gradle repositories { mavenCentral() } dependencies { compileOnlyApi("org.apiguardian:apiguardian-api:1.1.2") } ``` jtreg8-8.2.1+1+ds1/apiguardian/build.gradle.kts000066400000000000000000000133451514323636100211210ustar00rootroot00000000000000import java.time.OffsetDateTime import java.time.format.DateTimeFormatter plugins { id("java") id("eclipse") id("idea") id("maven-publish") id("signing") id("biz.aQute.bnd.builder") version "5.3.0" id("net.nemerosa.versioning") version "2.14.0" id("org.ajoberstar.git-publish") version "3.0.0" id("io.github.gradle-nexus.publish-plugin") version "1.1.0" } val buildTimeAndDate = OffsetDateTime.now() val buildDate = DateTimeFormatter.ISO_LOCAL_DATE.format(buildTimeAndDate) val buildTime = DateTimeFormatter.ofPattern("HH:mm:ss.SSSZ").format(buildTimeAndDate) val builtByValue = project.findProperty("builtBy") ?: project.property("defaultBuiltBy") val isSnapshot = project.version.toString().contains("SNAPSHOT") val docsVersion = if (isSnapshot) "snapshot" else project.version val docsDir = File(buildDir, "ghpages-docs") val replaceCurrentDocs = project.hasProperty("replaceCurrentDocs") description = "@API Guardian" val moduleName = "org.apiguardian.api" repositories { mavenCentral() } java { withJavadocJar() withSourcesJar() } val moduleSourceDir = file("src/module/java") tasks { compileJava { options.release.set(6) } val compileModule by registering(JavaCompile::class) { source(moduleSourceDir) destinationDir = file("$buildDir/classes/java/modules") classpath = files(compileJava.map { it.classpath }) inputs.property("moduleName", moduleName) inputs.property("moduleVersion", project.version) options.release.set(9) options.compilerArgs = listOf( "--module-version", project.version as String, "--module-source-path", moduleSourceDir.toString(), "--patch-module", "$moduleName=${sourceSets.main.get().allJava.srcDirs.joinToString(":")}", "--module", moduleName ) } jar { fun normalizeVersion(versionLiteral: String): String { val regex = Regex("(\\d+\\.\\d+\\.\\d+).*") val match = regex.matchEntire(versionLiteral) require(match != null) { "Version '$versionLiteral' does not match version pattern, e.g. 1.0.0-QUALIFIER" } return match.groupValues[1] } manifest { attributes( "Created-By" to "${System.getProperty("java.version")} (${System.getProperty("java.vendor")} ${System.getProperty("java.vm.version")})", "Built-By" to builtByValue, "Build-Date" to buildDate, "Build-Time" to buildTime, "Build-Revision" to versioning.info.commit, "Specification-Title" to project.name, "Specification-Version" to normalizeVersion(project.version.toString()), "Specification-Vendor" to "apiguardian.org", "Implementation-Title" to project.name, "Implementation-Version" to project.version, "Implementation-Vendor" to "apiguardian.org", "Bundle-Name" to project.name, "Bundle-Description" to project.description, "Bundle-DocURL" to "https://github.com/apiguardian-team/apiguardian", "Bundle-Vendor" to "apiguardian.org", "-exportcontents" to "org.apiguardian.api", "Bundle-SymbolicName" to moduleName ) } from(files(compileModule.map { "${it.destinationDir}/${moduleName}" })) { include("module-info.class") } } javadoc { (options as StandardJavadocDocletOptions).apply { memberLevel = JavadocMemberLevel.PROTECTED isAuthor = true header = "@API Guardian" addStringOption("Xdoclint:html,syntax,reference", "-quiet") links("https://docs.oracle.com/en/java/javase/11/docs/api/") } } named("sourcesJar") { from("${moduleSourceDir}/${moduleName}") { include("module-info.java") } } named("javadocJar") { from(javadoc.map { File(it.destinationDir, "element-list") }) { // For compatibility with older tools, e.g. NetBeans 11 rename { "package-list" } } } withType().configureEach { from(rootDir) { include("LICENSE") into("META-INF") } } val prepareDocsForUploadToGhPages by registering(Copy::class) { dependsOn(javadoc) outputs.dir(docsDir) from("$buildDir/docs") { include("javadoc/**") } from("$buildDir/docs/javadoc") { // For compatibility with pre JDK 10 versions of the Javadoc tool include("element-list") rename { "api/package-list" } } into("${docsDir}/${docsVersion}") filesMatching("javadoc/**") { path = path.replace("javadoc/", "api/") } includeEmptyDirs = false } val createCurrentDocsFolder by registering(Copy::class) { dependsOn(prepareDocsForUploadToGhPages) enabled = replaceCurrentDocs outputs.dir("${docsDir}/current") from("${docsDir}/${docsVersion}") into("${docsDir}/current") } gitPublishCommit { dependsOn(prepareDocsForUploadToGhPages, createCurrentDocsFolder) } } if (!isSnapshot) { signing { sign(publishing.publications) } } nexusPublishing { packageGroup.set(group.toString()) repositories { sonatype() } } publishing { publications { create("maven") { from(components["java"]) pom { name.set("${project.group}:${project.name}") description.set("@API Guardian") url.set("https://github.com/apiguardian-team/apiguardian") scm { connection.set("scm:git:git://github.com/apiguardian-team/apiguardian.git") developerConnection.set("scm:git:git://github.com/apiguardian-team/apiguardian.git") url.set("https://github.com/apiguardian-team/apiguardian") } licenses { license { name.set("The Apache License, Version 2.0") url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") } } developers { developer { id.set("apiguardian") name.set("@API Guardian Team") email.set("team@apiguardian.org") } } } } } } gitPublish { repoUri.set("https://github.com/apiguardian-team/apiguardian.git") branch.set("gh-pages") contents { from(docsDir) into("docs") } preserve { include("**/*") exclude("docs/$docsVersion/**") if (replaceCurrentDocs) { exclude("docs/current/**") } } } jtreg8-8.2.1+1+ds1/apiguardian/gradle.properties000066400000000000000000000001651514323636100214120ustar00rootroot00000000000000group = org.apiguardian version = 1.1.2 defaultBuiltBy = @API Guardian Team releaseBranch = master jtreg8-8.2.1+1+ds1/apiguardian/gradlew000077500000000000000000000132161514323636100174120ustar00rootroot00000000000000#!/usr/bin/env sh # # Copyright 2015 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ############################################################################## ## ## Gradle start up script for UN*X ## ############################################################################## # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" # Need this for relative symlinks. while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG=`dirname "$PRG"`"/$link" fi done SAVED="`pwd`" cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" warn () { echo "$*" } die () { echo echo "$*" echo exit 1 } # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false case "`uname`" in CYGWIN* ) cygwin=true ;; Darwin* ) darwin=true ;; MSYS* | MINGW* ) msys=true ;; NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi # Increase the maximum file descriptors if we can. if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then MAX_FD="$MAX_FD_LIMIT" fi ulimit -n $MAX_FD if [ $? -ne 0 ] ; then warn "Could not set maximum file descriptor limit: $MAX_FD" fi else warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" fi fi # For Darwin, add options to specify how the application appears in the dock if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi # For Cygwin or MSYS, switch paths to Windows format before running java if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` SEP="" for dir in $ROOTDIRSRAW ; do ROOTDIRS="$ROOTDIRS$SEP$dir" SEP="|" done OURCYGPATTERN="(^($ROOTDIRS))" # Add a user-defined pattern to the cygpath arguments if [ "$GRADLE_CYGPATTERN" != "" ] ; then OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" fi # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` else eval `echo args$i`="\"$arg\"" fi i=`expr $i + 1` done case $i in 0) set -- ;; 1) set -- "$args0" ;; 2) set -- "$args0" "$args1" ;; 3) set -- "$args0" "$args1" "$args2" ;; 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi # Escape application args save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" exec "$JAVACMD" "$@" jtreg8-8.2.1+1+ds1/apiguardian/gradlew.bat000066400000000000000000000053131514323636100201530ustar00rootroot00000000000000@rem @rem Copyright 2015 the original author or authors. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem https://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @rem @rem ########################################################################## @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Resolve any "." and ".." in APP_HOME to make it shorter. for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal :omega jtreg8-8.2.1+1+ds1/apiguardian/settings.gradle.kts000066400000000000000000000002721514323636100216550ustar00rootroot00000000000000rootProject.name = "apiguardian-api" require(JavaVersion.current().isJava11) { "The @API Guardian build requires Java 11. Currently executing with Java ${JavaVersion.current()}." } jtreg8-8.2.1+1+ds1/apiguardian/src/000077500000000000000000000000001514323636100166235ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/apiguardian/src/main/000077500000000000000000000000001514323636100175475ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/apiguardian/src/main/java/000077500000000000000000000000001514323636100204705ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/apiguardian/src/main/java/org/000077500000000000000000000000001514323636100212575ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/apiguardian/src/main/java/org/apiguardian/000077500000000000000000000000001514323636100235435ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/apiguardian/src/main/java/org/apiguardian/api/000077500000000000000000000000001514323636100243145ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/apiguardian/src/main/java/org/apiguardian/api/API.java000066400000000000000000000101161514323636100255670ustar00rootroot00000000000000/* * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apiguardian.api; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * {@code @API} is used to annotate public types, methods, constructors, and * fields within a framework or application in order to publish their * {@link #status} and level of stability and to indicate how they are intended * to be used by {@link #consumers} of the API. * *

If {@code @API} is present on a type, it is considered to hold for all * public members of the type as well. However, a member of such an annotated * type is allowed to declare a {@link Status} of lower stability. For example, * a class annotated with {@code @API(status = STABLE)} may declare a constructor * for internal usage that is annotated with {@code @API(status = INTERNAL)}. * *

If {@code @API} is present on a package, it is considered to hold for all * public types in its package. The same rules for lowered stability apply as * if they were specified on a type. * * @since 1.0 */ @Target({ TYPE, METHOD, CONSTRUCTOR, FIELD, PACKAGE }) @Retention(RUNTIME) @Documented public @interface API { /** * The current {@linkplain Status status} of the API. */ Status status(); /** * The version of the API when the {@link #status} was last changed. * *

Defaults to an empty string, signifying that the since * version is unknown. */ String since() default ""; /** * List of packages belonging to intended consumers. * *

The supplied packages can be fully qualified package names or * patterns containing asterisks that will be used as wildcards. * *

Defaults to {@code "*"}, signifying that the API is intended to be * consumed by any package. */ String[] consumers() default "*"; /** * Indicates the status of an API element and therefore its level of * stability as well. */ enum Status { /** * Must not be used by any external code. Might be removed without prior * notice. */ INTERNAL, /** * Should no longer be used. Might disappear in the next minor release. * *

This status is usually used in combination with the standard annotation * {@link Deprecated @Deprecated} because that annotation is recognized by * IDEs and the compiler. However, there are also cases where this status * can be used on its own, for example when transitioning a {@link #MAINTAINED} * feature to an {@link #INTERNAL} one. */ DEPRECATED, /** * Intended for new, experimental features where the publisher of the * API is looking for feedback. * *

Use with caution. Might be promoted to {@link #MAINTAINED} or * {@link #STABLE} in the future, but might also be removed without * prior notice. */ EXPERIMENTAL, /** * Intended for features that will not be changed in a backwards-incompatible * way for at least the next minor release of the current major version. * If scheduled for removal, such a feature will be demoted to * {@link #DEPRECATED} first. */ MAINTAINED, /** * Intended for features that will not be changed in a backwards-incompatible * way in the current major version. */ STABLE; } } jtreg8-8.2.1+1+ds1/apiguardian/src/module/000077500000000000000000000000001514323636100201105ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/apiguardian/src/module/java/000077500000000000000000000000001514323636100210315ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/apiguardian/src/module/java/org.apiguardian.api/000077500000000000000000000000001514323636100246535ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/apiguardian/src/module/java/org.apiguardian.api/module-info.java000066400000000000000000000000761514323636100277370ustar00rootroot00000000000000module org.apiguardian.api { exports org.apiguardian.api; } jtreg8-8.2.1+1+ds1/asmtools/000077500000000000000000000000001514323636100154115ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/.github/000077500000000000000000000000001514323636100167515ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/.github/workflows/000077500000000000000000000000001514323636100210065ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/.github/workflows/maven.yaml000066400000000000000000000017761514323636100230130ustar00rootroot00000000000000name: Java CI on: push: branches: - master pull_request: branches: - master workflow_dispatch: jobs: build: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest] java-version: [ 17, 25 ] fail-fast: false name: ${{ matrix.os }} - Java ${{ matrix.java-version }} - Maven steps: - name: Checkout asmtools repo uses: actions/checkout@v2 - name: Set up JDK ${{ matrix.java-version }} uses: actions/setup-java@v2 with: java-version: ${{ matrix.java-version }} distribution: 'adopt' - name: Set up Maven uses: stCarolas/setup-maven@v4.4 with: maven-version: 3.8.4 - name: Build asmtools with Maven run: | set -x pwd ls cd maven ; bash mvngen.sh ; mvn "--batch-mode" "--update-snapshots" "clean" "install" mvn "--batch-mode" "--update-snapshots" "test" jtreg8-8.2.1+1+ds1/asmtools/.gitignore000066400000000000000000000003601514323636100174000ustar00rootroot00000000000000# Compiled class file *.class # Log file *.log # Package Files *.jar *.zip *.tar.gz *.tar # virtual machine crash logs hs_err_pid* # Misc: Intellij Idea,Mac OS /.idea/ /maven/.idea/ *.iml .DS_Store maven/target maven/src maven/pom.xml jtreg8-8.2.1+1+ds1/asmtools/.hgtags000066400000000000000000000005271514323636100166730ustar00rootroot0000000000000085d58e2683bfe2f70defd6ec10d377d84766ddd8 initial-openjdk f201bb903e32f09e054f5fafc180508b9db67d00 6.0 c52c3f68bfba5ca97378e9e9df5fc1268ac9e481 7.0 f788f629bb40b3f3dd6d2cd25f3c9072568792de 7.0-b02 2931522b78a4a4842396ad61300853911caf4169 7.0-b04 b63cf0206a26c9cef5831aec217ed88a5ba09f5a 7.0-b05 5d0dc302199d510f0fb44763fbca8118d12f8ad8 7.0-b06 jtreg8-8.2.1+1+ds1/asmtools/.jcheck/000077500000000000000000000000001514323636100167165ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/.jcheck/conf000066400000000000000000000023671514323636100175760ustar00rootroot00000000000000; ; Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. ; DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ; ; This code is free software; you can redistribute it and/or modify it ; under the terms of the GNU General Public License version 2 only, as ; published by the Free Software Foundation. ; ; This code is distributed in the hope that it will be useful, but WITHOUT ; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ; version 2 for more details (a copy is included in the LICENSE file that ; accompanied this code). ; ; You should have received a copy of the GNU General Public License version ; 2 along with this work; if not, write to the Free Software Foundation, ; Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ; ; Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ; or visit www.oracle.com if you need additional information or have any ; questions. ; [general] project=code-tools repository=asmtools jbs=codetools [checks] error=author,committer,whitespace,executable,symlink [census] version=0 domain=openjdk.org [checks "whitespace"] files=.*\.java$|.*\.c$|.*\.h$|.*\.cpp$|.*\.hpp$ jtreg8-8.2.1+1+ds1/asmtools/LICENSE000066400000000000000000000455121514323636100164250ustar00rootroot00000000000000The GNU General Public License (GPL) Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. One line to give the program's name and a brief idea of what it does. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details. The hypothetical commands 'show w' and 'show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than 'show w' and 'show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program 'Gnomovision' (which makes passes at compilers) written by James Hacker. signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. "CLASSPATH" EXCEPTION TO THE GPL Certain source files distributed by Oracle America and/or its affiliates are subject to the following clarification and special exception to the GPL, but only where Oracle has expressly included in the particular source file's header the words "Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the LICENSE file that accompanied this code." Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. jtreg8-8.2.1+1+ds1/asmtools/README.html000066400000000000000000000354761514323636100172530ustar00rootroot00000000000000 README - AsmTools - Version 9.1
 

Release Notes

AsmTools 9.1

January 2026

 


[Skip TOC]

Table of Contents

Introduction
New in This Release
System Requirements
Release Contents
Installation
Using AsmTools
Known Bugs and Issues
Obtaining Sources
Building from Sources
Contribute

Introduction

AsmTools is a software package containing a collection of tools that you can use to encode and decode a Java class file, without using a Javac compiler. You can use AsmTools to create class files which can not normally be produced by a compiler. These class files can be used during the development process to test the compliance of a Virtual Machine (VM) to its specification.

These release notes contain information about the ASM Tools version 9.1.
See the ( CodeTools project) AsmTools OpenJDK project page for more information about AsmTools.

New in This Release

New Features

Bug ID Description
CODETOOLS-7904123 Switch the Asmtools build system to use JDK 17 (LTS) in alignment with jtreg
CODETOOLS-7903806 Enhance jasm/jdis to support value classes and objects

Fixed Bugs

Bug ID Description
CODETOOLS-7902055 Preserve module name in jdec output
CODETOOLS-7904095 jdis,jasm: tools that read or write reference types may corrupt Constant Pool entries
CODETOOLS-7904065 Classfile version < 45 synthetic methods should not set ACC_SYNTHETIC
CODETOOLS-7904032 jasm: Incorrectly processes empty SourceDebugExtension attribute
CODETOOLS-7904019 jdis: Incorrectly processes lookupswitch, wide, and tableswitch instructions with an incorrect structure
CODETOOLS-7904014 jasm: the jasm incorrectly parses the PermittedSubclasses/NestMembers attribute
CODETOOLS-7902696 jdis: the tool does't catch circular references in bsm args

System Requirements

Using ASM Tools requires a properly configured, certified ava Platform, Standard Edition version 17 or later

Installation

To install the AsmTools, simply unzip the  asmtools-9.1.zip distribution file in the directory of your choice. Optionally, you may wish to define an environment variable (ASMTOOLS_HOME) to point to this location for your convenience.

Release Contents

This section lists the components under the base subdirectory structure (asmtools-9.1/) that is created when you unzip the AsmTools distribution archive during installation.

Important Component Descriptions and Locations

Component Description
README.html The AsmTools release notes (this document).
lib/asmtools.jar The AsmTools library.

Using AsmTools

AsmTools have the following synopsis:

java -jar ${ASMTOOLS_HOME}/asmtools.jar TOOL FILE
[TOOL="jasm" | "jdis" | "jcoder" | "jdec"]
[FILE=FILENAME.jasm (for jasm command) | FILENAME.jcod (for jcod command) | FILENAME.class for jdis, jdec command]

Examples:

  % java -jar ${ASMTOOLS_HOME}/asmtools.jar jasm -d . FILENAME.jasm
  (Produces FILENAME.class in the current directory.)
  
% java -jar ${ASMTOOLS_HOME}/asmtools.jar jdis FILENAME.class (Prints FILENAME.jasm to stdout.)
% java -jar ${ASMTOOLS_HOME}/asmtools.jar jcoder -d . FILENAME.jcod (Produces FILENAME.class in the current directory.)
% java -jar ${ASMTOOLS_HOME}/asmtools.jar jdec -d . FILENAME.class (Produces FILENAME.jcod in the current directory.)
Tool usage is covered in the "Using AsmTools".

Operating Modes

There are no operating modes.

[Top]

Known Bugs and Issues

Many attributes (in the class file, as specified by the Java VM Specification, Chapter 4) are covered in the JASM syntax, but not all.

[Top]

Contribute

The AsmTools open source project was created in order to develop a community that will improve it, further the development of Java assembly tools, and use Java assemblers to develop test suites. We encourage you to browse, download, contribute, and get involved.

[Top]

Obtaining the Sources

The sources for ASM Tools 9.1 and later is available via the community OpenJDK project. The sources are stored and accessed through a Mercurial repository, which the public may access in a read-only fashion. Committing to changes to the sources is accomplished by first contributing through a proxy developer to establish ones self, which can then lead to rights to contribute directly. More information can be found on the OpenJDK Projects landing page.

The general form for obtaining a copy of the current source tree is:

% git clone https://github.com/openjdk/asmtools
This places a copy of the entire source tree in the asmtools directory. From that directory, you can then view and build the sources, as described in the next section. Note that this copy is of the development version of the sources, you may need to extract a different revision if you want a copy from a specific period of time.

[Top]

Building the Sources

Building the sources requires Ant version 1.8 or later (1.10.13 is current at the time of writing), and the built-in build is compatible with using an IDE. The sources are designed for Java 17 and if you invoke ant with this runtime, your chance of encountering an abnormal conditions due to your runtime or compiler (or javadoc) version.

General requirements:

  • ant, version 1.8 or later
  • Java 17 runtime and compiler (minimum and recommended)
  • 10MB free disk space (3MB for source tree, 7MB for build output)

The general steps to take a build from source from the command line:

  1. Obtain Sources
  2. Make your current directory <topdir>/build/
  3. Invoke ant:
    % ant
  4. Output appears in a directory above (one above <topdir>), such as: ../../asmtools-9.1-build/

A common variation of the build command to force ant to use a particular installation of Java on your machine:

# JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home ANTHOME=/usr/share/ant ant
This example for common *nix shells (zsh, bash, sh), alter it as needed for your command environment. You can test your invocation of ant by running it with the -diagnostics flag, where it will indicate which Java it is using.

The build file itself is build/build.xml, this is the file you can specify in your IDE for building.



Copyright © 2008, 2026, Oracle and/or its affiliates. All rights reserved.

Use is subject to license terms.The majority of the Assember Tools project is released under the GNU General Public License Version 2 (GPLv2)

jtreg8-8.2.1+1+ds1/asmtools/README.md000066400000000000000000000051111514323636100166660ustar00rootroot00000000000000# OpenJDK AsmTools The AsmTools open source project is used to develop tools for the production of proper and improper Java `.class` files. AsmTools are being opened in order to facilitate a community of Java .class file production for various testing and other OpenJDK development applications. Tool usage is covered in the Using AsmTools documentation. AsmTools consist of a set of (Java class file) assembler/disassemblers: + **Jasm/Jdis** - an assembler language that provides a Java-like declaration of member signatures, while providing Java VM specification compliant mnemonics for byte-code instructions. Jasm also provides high-level syntax for constructs often found within classfile attributes. Jasm encoded tests are useful for sequencing byte codes in a way that Javac compiled code might not normally sequence byte-codes. + **JCod/JDec** - an assembler language that provides byte-code containers of class-file constructs. JCod encoded tests are useful for testing the well-formedness of class-files, as well as creating collections within a class-file construct that might be size-bounded by a normal Java compiler. JCod can also be used to 'fuzz' class files in a methodical way that respects class-file constructs. AsmTools are completely reflexive - Java binary (.class) files may be disassembled into textual representations, which in turn can be assembled back to the same binary file. AsmTools are developed to support the latest class file formats, in lock-step with JDK development. Other open source Java assembler tools and binary classfile frameworks exist. They can be used for the purpose of synthesizing classfiles, however: - they typically are designed to enforce the limits imposed by the VM specification of the class file format. They are not designed to produce classes that violate those limits. - other assembler tools may not necessarily follow strict Java mnemonics as defined in the Java VM spec. - other assembler tools may not stay in lock-step with the current generation of the JDK and VM specifications. - class file libraries are harder to use for simple manipulations of any given class file. Typically, one has to create a program in that framework to parse and modify a class for a specific change to a given class. The AsmTools open source project is part of the [Code Tools Project](http://openjdk.java.net/projects/code-tools/ "Code Tools Project"). It exists to promote a community that will improve it, further its development, and use it to develop test suites. We encourage you to browse, download, contribute, and get involved. jtreg8-8.2.1+1+ds1/asmtools/build/000077500000000000000000000000001514323636100165105ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/build/build.properties000066400000000000000000000026301514323636100217260ustar00rootroot00000000000000# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # Compile in verbose mode javac.verbose=false # Compile in debug mode javac.debug=true # Compile with deprecation flag javac.deprecation=false javac.release.version=17 # path to output directory BUILD_DIR = ../../asmtools-${PRODUCT_VERSION}-build jtreg8-8.2.1+1+ds1/asmtools/build/build.xml000066400000000000000000000431361514323636100203400ustar00rootroot00000000000000 Usage: ant <TARGET> -D<OPTIONS> where TARGET is: all cleans, tests, and builds if no issues are found. build (default): builds all binaries, doc and distributions. clean: removes all generated files and directories. cleanAndBuild: cleans, then builds the project. help: prints a usage message (this message). Other values for TARGET are: devbuild: produces binaries and javadocs. javadoc: produces javadocs. test: runs tests. cleanAndTest: cleans test artifacts, then tests the project. clean-test: cleans tests artifacts. ...${line.separator}${line.separator} Current Java version is ${ant.java.version} The build should be started by Java 17 or above SOURCE="git:${git.revision}" VERSION="${PRODUCT_VERSION}_${PRODUCT_BUILDNUMBER}" VERSION_DATE="${build.date}" MILESTONE="${PRODUCT_MILESTONE}" jtreg8-8.2.1+1+ds1/asmtools/build/productinfo.properties000066400000000000000000000026211514323636100231630ustar00rootroot00000000000000# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # Path to JDK will be used to compile sources # Product info PRODUCT_NAME =asmtools PRODUCT_JAR_NAME =asmtools.jar PRODUCT_VERSION =9.1 PRODUCT_MILESTONE =ea PRODUCT_BUILDNUMBER =01 PRODUCT_NAME_LONG =Java Assembler Tools jtreg8-8.2.1+1+ds1/asmtools/docs/000077500000000000000000000000001514323636100163415ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/docs/Class00.jasm000066400000000000000000000007321514323636100204240ustar00rootroot00000000000000package org/openjdk/asmtools/source00; public super class Class00 version 67:0 { public Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } public static Method main:"([Ljava/lang/String;)V" stack 0 locals 1 { return; } SourceFile "Class00.java"; } // end Class org/openjdk/asmtools/source00/Class00 compiled from "Class00.java" jtreg8-8.2.1+1+ds1/asmtools/docs/Class00.java000066400000000000000000000001631514323636100204110ustar00rootroot00000000000000package org.openjdk.asmtools.source00; public class Class00 { public static void main(String argv[]) { } } jtreg8-8.2.1+1+ds1/asmtools/docs/Class00_1.jasm000066400000000000000000000007451514323636100206500ustar00rootroot00000000000000file Cls01 package org/openjdk/asmtools/source00; public super class Class00 version 67:0 { public Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } public static Method main:"([Ljava/lang/String;)V" stack 0 locals 1 { return; } SourceFile "Class00.java"; } // end Class org/openjdk/asmtools/source00/Class00 compiled from "Class00.java" jtreg8-8.2.1+1+ds1/asmtools/docs/UsingTools.md000066400000000000000000000333011514323636100207710ustar00rootroot00000000000000## Chapter 1 ### Java Assembler Tools (AsmTools) User’s Guide --- ### Using the AsmTools This chapter describes general principles and techniques for using the AsmTools. If no command-line options are provided, or they are invalid, the tools display error messages and usage information. To get the help message, launch AsmTools without parameters: ```bash java -jar asmtools.jar ``` The help system describes how to use all the AsmTools components and contains the following topics described in this chapter. - [Assemblers and Disassemblers](#BADGCIGA) - [JASM vs JCOD](chapter2.html#BADGCIGB) - [Tool Usage](#BADCEIIF) - [ASMTools (Launcher)](BADCEABC) - [JASM](#BADEFIIJ) - [JDIS](#BADCBFCE) - [JCODER](#BADIFAIE) - [JDEC](#BADHJAHI) --- ### Assemblers and Dissassemblers Assembly and disassembly are reflexive operations. One tool’s output can be fed into another to reproduce the same file. ```bash java -jar asmtools.jar jdec Foo.class # produces Foo.jcod java -jar asmtools.jar jcoder Foo.jcod # produces Foo.class java -jar asmtools.jar jdis Foo.class # produces Foo.jasm java -jar asmtools.jar jasm Foo.jasm # produces Foo.class ``` For a given `foo.class`, the result of disassembly followed by reassembly is the same `foo.class`. --- ### JASM vs JCOD Which format to use depends on the task you are trying to do. We can describe some generalizations of when you might wish to use the `JASM` format versus the `JCOD` format. #### JASM The biggest difference between the two formats is that `JASM` specifically focuses on representing byte-code instructions in the VM format (while providing minimal description of the structure of the rest of the class file). Generally, `JASM` is more convenient for semantic changes, like change to instruction flow. Typical JASM use cases: - Producing invalid classes in which two methods have the same signature - Producing invalid class references that use illegal types - Generating invalid classes with missing or removed instructions - Inserting instrumentation or profiling instructions into methods - Creating classes in which language keywords are used as identifiers - Verifying that two classes produced by different compilers are equivalent #### JCOD `JCOD` provides good support for describing the structure of a class file (as well as writing incorrect bytes outside of this structure), and provides no support for specifying byte-code instructions (simply raw bytes for instructions). `JCOD` is typically used for VMs to test Well-formedness of class files (e.g. extra or missing bytes), boundary issues, constant-pool coherence, constant-pool index coherence, attribute well-formedness, etc. Typical JCOD use cases: - Examining specific parts of a class file, such as: - the constant pool (for dependency analysis) - constant values - inheritance chains (superclasses) - interface implementation and resolution - Producing malformed or structurally invalid class files for JVM testing - Validating class-file well-formedness rules - Testing boundary conditions and structural constraints - Verifying attribute structure and consistency --- ### Tool Usage AsmTools consists of the following utilities: - [jasm](#BADEFIIJ) – Generates class files from `JASM` - [jdis](#BADCBFCE) – Disassembles class files into `JASM` - [jcoder](#BADIFAIE) – Generates class files from `JCOD` - [jdec](#BADHJAHI) – Disassembles class files into `JCOD` Each utility can be invoked as: ```bash java -jar asmtools.jar UTILITY [options] File1 ... ``` or ```bash java -cp asmtools.jar com.sun.asmtools.UTILITY.Main [options] File1 ... ``` Each utility supports own set of options. --- **Note**: See the following sections for the options associated with each tool. --- ### ASMTools (Launcher) The `asmtools.jar` launcher provides a single entry point to run one of the AsmTools utilities (`jasm`, `jdis`, `jcoder`, or `jdec`) and to display global help/version information. **Usage**: ```text java -jar asmtools.jar run jasm, jdis, jcoder, or jdec tool or: java -jar asmtools.jar -?|-h|-help print Help (this message) and exit or: java -jar asmtools.jar -version print version information and exit use -dls switch to return the ancient dual stream logging ``` --- ### JASM `JASM` assembles a `.jasm` source file, written according to the [JASM Specification](JASM_SPEC), into a `.class` file for use with a Java Virtual Machine. **Usage**: ```text java -jar asmtools.jar jasm [options] |- ``` or ```text java -cp asmtools.jar org.openjdk.asmtools.jasm.Main [options] |- ``` **Note**: if `-` is provided, `` is used as the input stream. #### Options: ```text -d Specify where to place generated class files, otherwise -w Specify where to place generated class files, without considering the classpath, otherwise -nowrite Do not write generated class files -nowarn Do not print warnings -strict Consider warnings as errors -cv Set operating class file version if not specified in the source file (by default 45.3) -fixcv Override class file version in source file(s) -fixcv Update class file version to major.minor if file's version is below the threshold() -t Print debug, trace information -v Print additional information -version Print the jasm version ``` #### Notes: 1. **Class-file generation behavior**
The `-nowrite` option always suppresses generation of the `.class` file.
Without `-nowrite`, warnings prevent class-file generation only when `-strict` is specified; otherwise, the class file is written.

2. **Class‑file version selection (`-cv` vs `-fixcv`)**
In typical usage, a `.jasm` file explicitly specifies the class‑file version in its header, for example: ```text public super class Foo version 55:0 {} ``` If the version is not specified in the source file, `JASM` defaults to **45.3**. The `-cv` option provides a *fallback* version and is used *only if the source file does not declare a version*. If a version is present in the `.jasm` file, it takes precedence over `-cv`. To force the class‑file version regardless of whether the source declares one, use `-fixcv`. This option overrides the version unconditionally. The `-cv` and `-fixcv` options were added primarily to support batch updates of large sets of `.jasm` files. In general, it is preferable to specify the correct class‑file version directly in the `.jasm` source. --- ### JDIS `JDIS` is a disassembler that accepts a `.class` file specified by filename, translates it into plain-text jasm source, and writes the result to standard output or, when `-d ` is specified, to a generated `.jasm` file in the given directory. **Usage**: ```text java -jar asmtools.jar jdis [options] |- ``` or ```text java -cp asmtools.jar org.openjdk.asmtools.jdis.Main [options] |- ``` **Note**: if `-` is provided, `` is used as the input stream. #### Options: ```text -d Specify where to place generated class files, otherwise -w Specify where to place generated class files, without considering the classpath, otherwise -g Generate a detailed output format. -gg Generate a detailed output format. This includes displaying the pair of this_class and super_class. -nc Don't print comments -table Print specific attributes in a table format resembling the style of the 'javap' command. -hx Generate floating-point constants in hexadecimal format. -pc Print instruction offsets when the output is not detailed with the options -g or -gg. -sysinfo Show system info (path, size, date, SHA-256 hash) of class being processed -lnt: Print the LineNumberTable attribute in a Code attribute: table - print the LineNumberTable attribute as a table numbers - print numbers of source lines in inlined comments lines - print Java source lines if a class file with LineNumberTable attribute and Java source file are in the same folder all - print both line numbers and Java source lines in inlined comments, and LineNumberTable attribute as a table The '-lnt' without parameters functions the same way as '-lnt:all' -lvt: Print LocalVariableTable,LocalVariableTypeTable attributes in a Code attribute: vars - print LocalVariableTable attribute types - print LocalVariableTypeTable attribute all - print both LocalVariableTable and LocalVariableTypeTable attributes The '-lvt' without parameters functions the same way as '-lvt:all' -drop: Discard some attributes or their groups where: source - SourceFile attribute classes - this_class, super_class pair all - SourceFile attribute, this_class and super_class pair The '-drop' without parameters functions the same way as '-drop:all' -best-effort Print as much information as possible despite errors; suppresses the -v option. -version Print the program version -t Print debug, trace information -v Print additional information ``` #### Notes: 1. **Line Number and Source Line Generation (-lnt option)**
The `-lnt[:numbers|lines|table|all]` option controls how `LineNumberTable` information is printed. Depending on the mode, it can print line numbers as inline comments, include Java source lines above the corresponding instructions, display the LineNumberTable attribute as a table, or combine all of these. Specifying `-lnt` without parameters is equivalent to `-lnt:all`. Printing source lines in comments requires both the `LineNumberTable` and `SourceFile` attributes to be present, and the corresponding *Java source file must be located in the current working directory*. Refer to the [JASM Assembler](JASM_SPEC) documentation for information on the structure of the resultant `.jasm` file. --- ### JCODER `JCODER` is a low-level assembler that accepts text conforming to the [Jcoder Specification.](JCODER_SPEC) and produces a `.class` file for use by a Java Virtual Machine. Its primary purpose is to generate specialized tests for validating JVM implementations. **Usage**: ```text java -jar asmtools.jar jcoder [options] |- ``` or ```text java -cp asmtools.jar org.openjdk.asmtools.jcoder.Main [options] |- ``` **Note**: if `-` is provided, `` is used as the input stream. #### Options: ```text -d Specify where to place generated class files, otherwise -w Specify where to place generated class files, without considering the classpath, otherwise -nowrite Do not write generated class files -ignore Ignore non-fatal error(s) that suppress writing class files -fixcv Override class file version in source file(s) -fixcv Update class file version to major:minor if file's version is below the threshold() -t Print debug, trace information -v Print additional information -version Print the program version ``` --- ### JDEC `JDEC` is a low-level disassembler that accepts a `.class` file specified by filename, translates it into plain-text `jcov` source, and writes the result to standard output or, when `-d ` is specified, to a generated `.jcov` file in the given directory. **Usage**: ```text java -jar asmtools.jar jdec [options] |- ``` or ```text java -cp asmtools.jar org.openjdk.asmtools.jdec.Main [options] |- ``` **Note**: if `-` is provided, `` is used as the input stream. #### Options: ```text -d Specify where to place generated class files, otherwise -w Specify where to place generated class files, without considering the classpath, otherwise -g Generate a detailed output format -v Print additional information -version Print the program version ``` Refer to the [Jcoder Low-Level Assembler](JCODER_SPEC) documentation for information on the structure of the resultant `.jcod` file. --- *Java Assembler Tools (AsmTools) User’s Guide* --- Copyright © 2012, 2025, Oracle and/or its affiliates. All rights reserved. jtreg8-8.2.1+1+ds1/asmtools/docs/jasm.html000066400000000000000000003715631514323636100202000ustar00rootroot00000000000000 JASM Syntax
APPENDIX  A

JASM Syntax

This chapter describes JASM syntax, and how to encode class files using this syntax. Jasm is a java assembler that accepts text in the JASM format and produces a .class file for use with a Java Virtual Machine. Jasm's primary use is as a tool for producing specialized tests for testing a JVM implementation

This chapter describes JASM syntax in the following sections:


General Syntax

JASM syntax can come in one of two variations: short-form or verbose-form.  Short form uses Java-style names to refer to items in a constant-pool.  Verbose form uses explicit constant-pool indexes to refer to items in the constant pool.  The normal output from JDIS produces jasm files in the short-form.  Using the -g option for JDIS (ie.  jdis -g file.class) produces JASM source in the verbose-form.

The source text file can be free form (newlines are considered blanks) and may contain Java-style commenting. The first line of a JASM file represents the name of the resulting file in the destination directory. This name does not affect the content of the resulting file. This line has two forms:

file FILENAME 
or
class CLASSNAME 
In the latter case, extension .class will be added to form FILENAME. Jasm's -d option allows you to define the destination directory. A list of structured dataWriter items follows the class name. The length (in bytes) of each item is determined by its representation.


Description formats

TERM1|TERM2 TERM1 or TERM2 (not both)
[TERM] TERM is optional
TERM... TERM repeated 1 or more times
[TERM...] TERM repeated 0 or more times
"sequence of" all the following terms are mandatory, in the order given.
"set of" any of following terms, or none of them, may appear in any order. However, repetitions are not allowed.
"list of" any of following terms, or none of them, may appear in any sequence. If more than one term appear, they are separated by commas (',')


Lexical Structure

The source text file can be free form (newlines, tabs, and blank spaces are equivalent). Additionally, the source may contain standard Java and C++ comments.

STRING, NUMBER, and IDENT are treated the same as in the Java Language Specification. One difference is that LETTERs include also `/', `<', `>', `(', and `)' .

STRING:
" [ STRING_CHARACTER... ] "
NUMBER:
DIGIT...
IDENT:
LETTER [ LETTER_OR_DIGIT ...]
ACCESS (depends on the context): set of
abstract final interface native private protected public static super synchronized transient volatile deprecated synthetic bridge varargs

Not all access bits make sense for all declarations: for example, the "super" and "interface" access flags are applied to classes only.

If an access bit is used improperly, the assembler prints a warning, but places the bit in the access set.

Note that deprecated and synthetic keywords are not translated to access flags in the Java sense. For these jasm generates a corresponding Deprecated or Synthetic attributes instead of access bits. The synthetic access flag is used to mark compiler generated members not seen in the source (for example, a field reference to an anonymous outer class).

TAG: one of
int float long double Asciz String class Field Method NameAndType InterfaceMethod MethodType MethodHandle InvokeDynamic Dynamic
Local names represent labels, rangePC-labels and local variables. Their scope is constrained by method parenthesis.
LOCAL_NAME:
IDENT

 

CONSTANT_INDEX:
#NUMBER

Each CONSTANT_INDEX represents a reference into the constant pool at the specified location.


General Class Structure

INTERFACES:list of
CONSTANT_CELL(class|@interface|interface)
TOP_LEVEL_COMPONENT: one of
CONSTANT_DECLARATION FIELD_DECLARATION METHOD_DECLARATION INNER_CLASS_DECLARATIONS
CLASS: sequence of
ANNOTATIONS CLASS_ACCESS CONSTANT_CELL(class|@interface|interface) [extends CONSTANT_CELL(class)] [implements INTERFACES] [version INTEGER:INTEGER] { [TOP_LEVEL_COMPONENT...] }
CLASS_ACCESS: list of
[public][final][super][interface][abstract][synthetic][annotation][enum]

The extends CONSTANT_CELL(class) clause places the "super" element of the class file. The implements INTERFACES clause places the table of interfaces. Since the assembler does not distinguish interfaces and ordinary classes (the only difference is one access bit), the table of interfaces of an interface class must be declared with implements keyword, and not extends, as in Java language.

Note:The last two rules allow TOP_LEVEL_COMPONENT to appear in any order and number. For example, you can split constant pool table into several parts, mixing constants and method declarations.


General Module Structure

MODULE: sequence of
ANNOTATIONS [MODULE_FLAGS] moduleContent CONSTANT_CELL(moduleContent) [version INTEGER:INTEGER] {[TOP_LEVEL_MODULE_PROPERTIES...]}
TOP_LEVEL_MODULE_PROPERTIES: one of
MODULE_REQUIRES MODULE_EXPORTS MODULE_OPENS MODULE_USES MODULE_PROVIDES
MODULE_FLAGS:set of
[open]

General Source File Structure

PACKAGE_DECLARATION:
package IDENT;
Package declaration can appear only once in source file.
CLASS_FILE: sequence of
PACKAGE_DECLARATION CLASS...
MODULE_FILE:
MODULE...
SOURCE_FILE:
MODULE_FILE|CLASS_FILE

The Constant Pool and Constant Elements

A CONSTANT_CELL refers to an element in the constant pool. It may refer to the element either by its index or its value:

CONSTANT_CELL:
CONSTANT_INDEX
TAGGED_CONSTANT_VALUE
Generic rule for TAGGED_CONSTANT_VALUE is:
TAGGED_CONSTANT_VALUE:
[TAG] CONSTANT_VALUE

A TAG may be omitted when the context only allows one kind of a tag. For example, the argument of an anewarray instruction should be a CONSTANT_CELL which represents a class, so instead of

    anewarray class java/lang/Object

one may write:
    anewarray java/lang/Object
It is possible to write another tag, e.g.:
    anewarray String java/lang/Object
However, the resulting program will be incorrect.

Another example of an implicit tag (eg. a context which implies tag) is the header of a class declaration. You may write:

    aClass {
}
which is equivalent to:
    class aClass {
}
Below, the tag implied by context will be included in the rules, e.g.:
    CONSTANT_VALUE(int).

The exact notation of CONSTANT_VALUE depends on the (explicit or implicit) TAG.

TAGGED_CONSTANT_VALUE:
int INTEGER  
long [INTEGER|LONG]  
float [FLOAT|INTEGER]  
float bits INTEGER  
double [FLOAT|DOUBLE|INTEGER|LONG]  
double [bits INTEGER | bits LONG]  
Asciz EXTERNAL_NAME  
class CONSTANT_NAME  
String CONSTANT_NAME  
NameAndType NAME_AND_TYPE  
Field CONSTANT_FIELD  
Method CONSTANT_FIELD  
ReferenceIndex [Method|InterfaceMethod]  
MethodHandle [INVOKESUBTAG|INVOKESUBTAG_INDEX] : CONSTANT_FIELD | [FIELDREF|METHODREF|INTERFACEMETHODREF]
MethodType CONSTANT_NAME
InvokeDynamic INVOKESUBTAG : CONSTANT_FIELD : NAME_AND_TYPE [INVOKEDYNAMIC_STATIC_ARGS]
moduleContent CONSTANT_NAME  
package CONSTANT_NAME  

Note
When the JASM parser encounters an InvokeDynamic constant, it creates an entry in the BootstrapMethods attribute (the BootstrapMethods attribute is produced if it has not already been created). The entry contains a reference to the MethodHandle item in the constant pool, and, optionally, a sequence of references to additional static arguments (ldc-type constants) to the bootstrap method

INVOKESUBTAGs for MethodHandle and (const) InvokeDynamic are defined as follows and can be presented as either an index or a tag:

INVOKESUBTAG:             [INVOKESUBTAG_INDEX]
REF_GETFIELD [1]
REF_GETSTATIC [2]
REF_PUTFIELD [3]
REF_PUTSTATIC [4]
REF_INVOKEVIRTUAL [5]
REF_INVOKESTATIC [6]
REF_INVOKESPECIAL [7]
REF_NEWINVOKESPECIAL [8]
REF_INVOKEINTERFACE [9]

Static arguments for an InvokeDynamic constant are defined as follows:

INVOKEDYNAMIC_STATIC_ARGUMENTS:
INVOKEDYNAMIC_STATIC_ARG ',' ...
INVOKEDYNAMIC_STATIC_ARG: (one of)
INVOKEDYNAMIC_STATIC_ARG_CONSTANT_VALUE
INVOKEDYNAMIC_STATIC_ARG_CONSTANT_VALUE:
int INTEGER
long [INTEGER|LONG]
float [FLOAT|INTEGER]
double [FLOAT|DOUBLE|INTEGER|LONG]
class CONSTANT_NAME
String CONSTANT_NAME
MethodHandle INVOKESUBTAG:CONSTANT_FIELD
MethodType CONSTANT_NAME

INTEGER, LONG, FLOAT, and DOUBLE correspond to IntegerLiteral and FloatingPointLiteral as described in The Java Language Specification. If a double-word constant (LONG or DOUBLE) is represented with a single-word value (INTEGER or FLOAT, respectively), single-word value is simply promoted to double-word, as described in The Java Language Specification. If floating-point constant (FLOAT or DOUBLE) is represented with an integral value (INTEGER or LONG, respectively), the result depends on whether the integral number is preceded with the keyword "bits". If "bits" is not used, the result is a floating-point number closest in value to the decimal number. If the keyword "bits" is used, the floating-point constant takes bits of the integral value without conversion.

Thus,

   float 2;

means the same as

float 2.0f;

and the same as

float bits 0x40000000;

while

float bits 2;

actually means the same as

float bits 0x00000002;

and the same as

float 2.8026e-45f

 

CONSTANT_NAME:
CONSTANT_INDEX
EXTERNAL_NAME
EXTERNAL_NAME:
IDENT STRING

External names are names of class, method, field, or type, which stay in resulting .class file, and may be represented both by IDENT or by STRING (which is useful when name contains non-letter characters).

NAME_AND_TYPE:
CONSTANT_INDEX
CONSTANT_NAME:CONSTANT_NAME

In this second example, the first CONSTANT_NAME denotes the name of a field and second denotes its type.

CONSTANT_FIELD:
CONSTANT_INDEX
[CONSTANT_NAME.]NAME_AND_TYPE

In this third example, CONSTANT_NAME denotes to the class of a field. If CONSTANT_NAME is omitted, the current class is assumed.


Constant Declarations

Constant declarations are demonstrated in the examples below:


const #1=int 1234
, #2=String "a string"
, #3=Method get:I
;
CONSTANT_DECLARATION:
const CONSTANT_DECLARATORS ;
CONSTANT_DECLARATORS: list of
CONSTANT_DECLARATOR
CONSTANT_DECLARATOR:
CONSTANT_INDEX = TAGGED_CONSTANT_VALUE

Field Variables

FIELD_DECLARATION:
ANNOTATIONS FIELD_ACCESS Field FIELD_DECLARATORS ;
FIELD_DECLARATORS: list of
FIELD_DECLARATOR
FIELD_DECLARATOR:
EXTERNAL_NAME:CONSTANT_NAME [:SIGNATURE] [ = TAGGED_CONSTANT_VALUE ]
FIELD_ACCESS: list of
[public|private|protected][final][static][volatile][transient][synthetic][enum]
Example:
	public static Field 
field1:I = int 1234,
field2:"Ljava/lang/String;",
field3:"Ljava/util/List;":"Ljava/util/List<+Ljava/lang/String;>"
;

Access bits (public and static) are applied both to field1 and field2. The EXTERNAL_NAME denotes the name of the field, CONSTANT_NAME denotes its type, TAGGED_CONSTANT_VALUE denotes initial value.


Method Declarations

METHOD_DECLARATION: sequence of
ANNOTATIONS METHOD_ACCESS Method
EXTERNAL_NAME:CONSTANT_NAME
[THROWS]
STACK_SIZE
[LOCAL_VAR_SIZE]
{ INSTRUCTION_STATEMENT...
  ANNOTATIONS }

The EXTERNAL_NAME denotes the name of the method, CONSTANT_NAME denotes its type.

METHOD_ACCESS: list of
[public|private|protected][static][final][synthetic][bridge][varargs][native][abstract][strict][synthetic]
THROWS:
throws EXCEPTIONS
EXCEPTIONS: list of
CONSTANT_CELL(class)

The meaning of the THROWS clause is the same as in Java Language Specification - it forms Exceptions attribute of a method. Jasm itself does not use this attribute in any way.

STACK_SIZE:
stack NUMBER

The NUMBER denotes maximum operand stack size of the method.

LOCAL_VAR_SIZE:
locals NUMBER

The NUMBER denotes number of local variables of the method. If omitted, it is calculated by assembler according to the signature of the method and local variable declarations.


Instructions

VM Instructions

INSTRUCTION_STATEMENT:
[NUMBER] [LABEL:] INSTRUCTION|PSEUDO_INSTRUCTION ;

Jasm allows for a NUMBER (which is ignored) at the beginning of each line. This is allowed in order to remain consistent with the jdis disassembler. Jdis puts line numbers in disassembled code that may be reassembled using Jasm without any additional modifications.

INSTRUCTION:
OPCODE [ARGUMENTS]
ARGUMENTS: list of
ARGUMENT
ARGUMENT:
NUMBER LABEL LOCAL_VARIABLE TRAP_IDENT CONSTANT_CELL SWITCHTABLE TYPE
LABEL:
NUMBER IDENT
LOCAL_VARIABLE:
NUMBER IDENT
TRAP_IDENT:
IDENT
TYPE:
NUMBER boolean byte char int float long double class
SWITCHTABLE:
{ [NUMBER:LABEL...] [default:LABEL] }

SWITCHTABLE example: Java_text

     switch (x) {
case 11:
x=1;
break;
case 12:
x=2;
break;
default:
x=3;
}

will be coded in assembler as follows:

     tableswitch  {
11: L24;
12: L29;
default: L34
}
L24: iconst_1;
istore_1;
goto L36;
L29: iconst_2 ;
istore_1;
goto L36;
L34: iconst_3;
istore_1;
L36: ....

OPCODE is any mnemocode from the instruction set. If mnemocode needs an ARGUMENT, it cannot be omitted. Moreover, the kind (and number) of the argument(s) must match the kind (and number) required by the mnemocode:

aload, astore, fload, fstore, iload, istore, lload, lstore, dload, dstore, ver, endvar: LOCAL_VARIABLE
iinc: LOCAL_VARIABLE, NUMBER
sipush, bipush, bytecode: NUMBER
tableswitch, lookupswitch: SWITCHTABLE
newarray: TYPE
jsr, goto, ifeq, ifge, ifgt, ifle, iflt, ifne, if_icmpeq, if_icmpne, if_icmpge, if_icmpgt, if_icmple, if_icmplt, if_acmpeq, if_acmpne, ifnull, ifnonnull, try, endtry: LABEL
jsr_w, goto_w: LABEL
ldc_w, ldc2_w, ldc: CONSTANT_CELL
new, anewarray, instanceof, checkcast, CONSTANT_CELL(class)
multianewarray NUMBER, CONSTANT_CELL(class)
putstatic, getstatic, putfield, getfield: CONSTANT_CELL(Field)
invokevirtual, invokenonvirtual, invokestatic: CONSTANT_CELL(Method)
invokeinterface: NUMBER, CONSTANT_CELL(Method)
invokedynamic: CONSTANT_CELL(InvokeDynamic)
 aaload,  aastore,  aconst_null,  aload_0,  aload_1,  aload_2,  aload_3,  aload_w ,  areturn,  arraylength,  astore_0,  astore_1,  astore_2,  astore_3,  astore_w,  athrow,  baload,  bastore,  caload,  castore,  d2f,  d2i,  d2l,  dadd,  daload,  dastore,  dcmpg,  dcmpl,  dconst_0,  dconst_1,  ddiv,  dead,  dload_0,  dload_1,  dload_2,  dload_3,  dload_w ,  dmul,  dneg,  drem,  dreturn,  dstore_0,  dstore_1,  dstore_2,  dstore_3,  dstore_w,  dsub,  dup,  dup2,  dup2_x1,  dup2_x2,  dup_x1,  dup_x2,  f2d,  f2i,  f2l,  fadd,  faload,  fastore,  fcmpg,  fcmpl,  fconst_0,  fconst_1,  fconst_2,  fdiv,  fload_0,  fload_1,  fload_2,  fload_3,  fload_w,  fmul,  fneg,  frem,  freturn ,  fstore_0,  fstore_1,  fstore_2,  fstore_3,  fstore_w,  fsub ,  i2b,  i2c,  i2d,  i2f,  i2l,  i2s,  iadd,  iaload,  iand,  iastore,  iconst_0,  iconst_1,  iconst_2,  iconst_3,  iconst_4,  iconst_5,  iconst_m1,  idiv,  iinc_w,  iload_0,  iload_1,  iload_2,  iload_3,  iload_w,  imul,  ineg,  int2byte,  int2char,  int2short,  ior,  irem,  ireturn,  ishl,  ishr,  istore_0,  istore_1,  istore_2,  istore_3,  istore_w,  isub,  iushr,  ixor,  l2d,  l2f,  l2i,  label,  ladd,  laload,  land,  lastore,  lcmp,  lconst_0,  lconst_1,  ldiv,  lload_0,  lload_1,  lload_2,  lload_3,  lload_w,  lmul,  lneg,  lor,  lrem,  lreturn,  lshl,  lshr,  lstore_0,  lstore_1,  lstore_2,  lstore_3,  lstore_w,  lsub,  lushr,  lxor,  monitorenter,  monitorexit,  nonpriv,  nop,  pop,  pop2,  priv,  ret,  return,  ret_w,  saload,  sastore,  swap,   wide
<No Arguments>

InvokeDynamic Instructions

InvokeDynamic instructions are instructions that allow dynamic binding of methods to a call site. These instructions in JASM form are rather complex, and the JASM assembler does some of the necessary work to create a BootstrapMethods attribute for entries of binding methods.

class Test
      version 51:0
{
    Method m:"()V"
      stack 0 locals 1
    {
       invokedynamic InvokeDynamic REF_invokeSpecial:bsmName:"()V"   // information about bootstrap method
                                                    :methName:"(I)I" // dynamic call-site name ("methName") plus the argument and return types of the call ("(I)I")
                                                     int 1, long 2l; // optional sequence of additional static arguments to the bootstrap method (ldc-type constants)
    }
} // end Class Test

This JASM code has an invokedynamic instruction of the form: invokedynamic InvokeDynamic (CONSTANT_CELL(INVOKEDYNAMIC)) where the INVOKEDYNAMIC constant is represented as specified

(i.e. invokedynamic InvokeDynamic INVOKESUBTAG : CONSTANT_FIELD (bootstrapmethod signature) : NAME_AND_TYPE (CallSite) [Arguments (Optional)] ).

The JASM assembler creates the appropriate constant entries and entries into the BootstrapMethods attribute in a resulting class file.

You can also create InvokeDynamic constants and BootstrapMethods explicitly:

	#22; //class Test3
version 51:0
{

const #1 = InvokeDynamic 0:#11; // REF_invokeSpecial:Test3.bsmName:"()V":name:"(I)I" int 1, long 2l
const #2 = Asciz "Test3";
const #3 = long 2l;
const #5 = class #6; // java/lang/Object
const #6 = Asciz "java/lang/Object";
const #7 = Asciz "name";
const #8 = int 1;
const #9 = Asciz "SourceFile";
const #10 = Asciz "Test3.jasm";
const #11 = NameAndType #7:#21; // name:"(I)I"
const #12 = Asciz "()V";
const #13 = Method #22.#17; // Test3.bsmName:"()V"
const #14 = Asciz "Code";
const #15 = Asciz "m";
const #16 = Asciz "BootstrapMethods";
const #17 = NameAndType #20:#12; // bsmName:"()V"
const #18 = Asciz "LineNumberTable";
const #19 = MethodHandle 7:#13; // REF_invokeSpecial:Test3.bsmName:"()V"
const #20 = Asciz "bsmName";
const #21 = Asciz "(I)I";
const #22 = class #2; // Test3
const #23 = class #6; // java/lang/Object



Method #15:#12
stack 0 locals 1
{
0: invokedynamic InvokeDynamic #1; // InvokeDynamic REF_invokeSpecial:Test3.bsmName:"()V":name:"(I)I" int 1, long 2l;
}

BootstrapMethod #19 #8 #3;

} // end Class Test3

In this example, const #1 = InvokeDynamic 0:#11; is the InvokeDynamic constant that refers to BootstrapMethod at index '0' in the BootstrapMethods Attribute (BootstrapMethod #19 #8 #3; which refers to the MethodHandle at const #19, plus 2 other static args (at const #8 and const #3).

Pseudo Instructions

Pseudo instructions are 'assembler directives', and not really instructions (in the VM sense) They typically come in two forms: Code-generating Pseudo-Instructions, and Attribute-Generating Pseudo-Instructions.

Code-Generating Pseudo-Instructions

The bytecode directive instructs the assembler to put a collection of raw bytes into the code attribute of a methodK

bytecode NUMBERS
NUMBERS is list of NUMBERs (divided by COMMA).
Insert bytes in place of the instruction. May have any number of numeric arguments, each of them to be converted into a byte and inserted in method's code.

Attribute-Generating Pseudo-Instructions

The rest of pseudo_instructions do not produce any bytecodes, and are used to form tables: local variable table, exception table,
Stack Maps, and Stack Map Frames. Line Number Tables can not be specified, but they are constructed by the assembler itself.

Local Variable Table Attribute Generation

var LOCAL_VARIABLE
Starts local variable range
endvar LOCAL_VARIABLE
Ends local variable range. LOCAL_VARIABLE means name or index of local variable table entry.

Example:

    static void main (String[] args) {
Tester inst = new Tester();
inst.callSub();
}

will be coded in assembler as follows:

static Method #8:#9	 // main:"([Ljava/lang/String;)V"
stack 2 locals 2
{
4 var 0; // args:"[Ljava/lang/String;"
0: new #1; // class Tester;
3: dup;
4: invokespecial #2; // Method "<init>":"()V";
7: astore_1;
6 var 1; // inst:"LTester;"
8: aload_1;
9: invokevirtual #3; // Method callSub:"()V";
7 12: return;
endvar 0, 1;

}

Exception Table Attribute Generation

To generate exception table, three pseudo-instructions are used.

try TRAP_IDENT
Starts rangePC range
endtry TRAP_IDENT
Ends rangePC range
catch TRAP_IDENT CONSTANT_CELL(class)
Starts exception handler.

TRAP_IDENT represents the name or number of an exception table entry. CONSTANT_CELL in "catch" pseudo_instruction means catch type. Each exception table entry contains 4 values:start-pc, end-pc, catch-pc, catch-type. In jasm, each entry is denoted with some (local) identifier, as an example: TRAP_IDENT.

To set start-pc, place "try TRAP_IDENT" before the instruction with the desirable program counter. Similarly, use "endtry TRAP_IDENT" for end-pc and "catch TRAP_IDENT, catch-type" for catch-pc and catch-type (which is usually a constant pool reference). Try, endtry, and catch pseudoinstructions may be placed in any order. The order of entries in exception table is significant (see JVM specification). However, the only way to control this order is to place catch-clauses in appropriate textual order: assembler adds an entry in the exception table each time it encounters a catch-clause.

Example:

     try {
try {
throw new Exception("EXC");
} catch (NullPointerException e){
throw e;
} catch (Exception e){
throw e;
}
} catch (Throwable e){
throw e;
}

will be coded in assembler as follows:


try R1, R2; // single "try" or "endtry" can start several regions
new class java/lang/Exception;
dup;
ldc String "EXC";
invokespecial java/lang/Exception.<init>:"(Ljava/lang/String;)V";
athrow;
endtry R1;
catch R1 java/lang/NullPointerException; // only one "catch" per entry allowed
astore_1;
aload_1;
athrow;
catch R1 java/lang/Exception; // same region (R1) can appear in different catches
astore_1;
aload_1;
athrow;
endtry R2;
catch R2 java/lang/Throwable;
astore_1;
aload_1;
athrow;

StackMap Table Attribute Generation

Stack Maps are denoted by the pseudo-op opcode stack_map, and they can be identified by three basic items:

StackMapStatement = stack_map (stackMap_Item_MapType |stackMap_Item_Object | stackMap_Item_NewObject)
stackMap_Item_MapType = (bogus | int | float | double | long | null | this | CP)

stackMap_Item_Object = CONSTANT_CELL_CLASS
stackMap_Item_NewObject = at LABEL

All stack_map directives are collected by the assembler, and are used to create a StackMap Table attribute.

Example 1 (MapType):
public Method "<init>":"()V"
    stack 1 locals 1
{
       aload_0;
       invokespecial    Method java/lang/Object."<init>":"()V";
        return;
        stack_frame_type full;
        stack_map bogus;
        ...
}

Example 2 (Object):

public Method "<init>":"()V"
    stack 2 locals 1
{
        ...
        stack_map class java/lang/Object;
        nop;
        return;
}

Example 3 (NewObject):

public Method "<init>":"()V"
    stack 2 locals 1
{
        ...
        stack_map at L5;
        nop;
        return;
}


StackFrameType Table Attribute Generation

StackFrameTypes are similar assembler directives as StackMap. These directives can appear anywhere in the code, and the assembler will collect them to produce a StackFrameType attribute.

StackFrameStatement = stack_frame_type frame_type
frame_type = ( same | stack1 | stack1_ex | chop1 | chop2 | chop3 | same_ex | append | full )

Example 1 (full stack frame type):
public Method "<init>":"()V"
    stack 1 locals 1
{
       aload_0;
       invokespecial    Method java/lang/Object."<init>":"()V";
        return;
        stack_frame_type full;
        stack_map bogus;
        ...
}
Example 2 (append, chop2, and same stack frame types):
public Method foo:"(Z)V"
stack 2 locals 5
{
        ...
iload_2;
iconst_2;
if_icmpge L30;
L27: stack_frame_type append;
locals_map int, int;
iconst_2;
istore 4;
L30: stack_frame_type chop2;
goto L9;
L33: stack_frame_type same;
getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
ldc String "Chop2 attribute test";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
return;
        ...
}

LocalsMap Table

Locals Maps are typically associated with a stack_frame_type, and are accumulated per stack frame. They typically follow a stack_frame_type directive.

LocalsMapStatement = locals_map locals_type (, locals_type )*
locals_type = stackMap_Item_MapType | CONSTANT_CELL_CLASS

Example (a locals map specifying 2 ints):
public Method foo:"(Z)V"
stack 2 locals 5
{
        ...
iload_2;
iconst_2;
if_icmpge L30;
L27: stack_frame_type append;
locals_map int, int;
iconst_2;
istore 4;
L30: stack_frame_type chop2;
goto L9;
L33: stack_frame_type same;
getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
ldc String "Chop2 attribute test";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
return;
        ...
}

Inner Class Declarations

INNER_CLASS_DECLARATIONS: list of
INNER_CLASS_DECLARATION
INNER_CLASS_DECLARATION:
INNER_CLASS_ACCESS InnerClass [INNER_CLASS_NAME=]? INNER_CLASS_INFO [of OUTER_CLASS_INFO]? ;
INNER_CLASS_NAME:
IDENT | CPX_name
INNER_CLASS_INFO:
CONSTANT_CELL(class) 
OUTER_CLASS_INFO:
CONSTANT_CELL(class)
INNER_CLASS_ACCESS: list of
[public|protected|private][static][final][interface][abstract][synthetic][annotation][enum]
Example:
    InnerClass InCl=class test$InCl of class test;

 


Annotation Declarations

Member Annotations

Member annotations are a subset of the basic annotations support provided in JDK 5.0 (1.5). These are annotations that ornament Packages, Classes, and Members either visibly (accessible at runtime) or invisibly (not accessible at runtime). In JASM, visible annotations are denoted by the token @, while invisible annotations are denoted by the token @-.

Synopsis

ANNOTATIONS:
[ANNOTATION_DECLARATION]+;
ANNOTATION_DECLARATION:
@+|@- ANNOTATION_NAME [ANNOTATION_VALUE_DECLARATIONS]

The '@+' token identifies a Runtime Visible Annotation, where the '@-' token identifies a Runtime Invisible Annotation.

ANNOTATION_NAME:
IDENT
ANNOTATION_VALUE_DECLARATIONS: list of (comma separated)
ANNOTATION_VALUE_DECLARATION
ANNOTATION_VALUE_DECLARATION:
[ANNOTATION_VALUE_IDENT=] [ANNOTATION_VALUE]
ANNOTATION_VALUE_IDENT:
IDENT
ANNOTATION_VALUE:
ANNOTATION_VALUE_PRIMITIVE | Array of ANNOTATION_VALUE_PRIMITIVE
ANNOTATION_VALUE_PRIMITIVE:
PRIMITIVE_TYPE | STRING | CLASS | ENUM | ANNOTATION_DECLARATION
CLASS:
class CONSTANT_CELL(class)
ENUM:
enum CONSTANT_CELL(class) CONSTANT_CELL(string) (where string is Enum type name)
PRIMITIVE_TYPE:
BOOLEAN | BYTE | CHAR | SHORT | INTEGER | LONG | FLOAT | DOUBLE
Note
    Types (Boolean, Byte, Char, and Short) are normalized into Integer's within the constant pool.
    Annotation values with these types may be identified with a keyword in front of an integer value.

     eg.       boolean true (or: boolean 1)
                 byte 20
                 char 97
                 short 2130

    Other primitive types are parsed according to normal prefix and suffix conventions
    (eg. Double = xxx.xd, Float = xxx.xf, Long = xxxL). 
    Strings are identified and delimited by '"' (quotation marks).

   Keywords 'class' and 'enum' identify those annotation types explicitly. Values within classes and enums may
   either be identifiers (strings) or Constant Pool IDs.

   Annotations specified as the value of an Annotation field are identified by the JASM annotation keywords '@+' and '@-'.

   Arrays are delimited by '{' and '}' marks, with individual elements delimited by ',' (comma).

Examples

Example 1 (Class Annotation, Visible)
@+ClassPreamble { 
author = "John Doe",
date = "3/17/2002",
currentRevision = 6,
lastModified = "4/12/2004",
lastModifiedBy = "Jane Doe",
reviewers = {
"Alice",
"Bob",
"Cindy"}
}
super public class MyClass
version 50:0
{
 ...

Example 2 (Field Annotation, Invisible)

@-FieldPreamble {
 author = "Mustafa",
date = "3/17/2009",
currentRevision = 4
}
Field foo:I;
...


Example 3 (Field Annotation, All subtypes)


@+FieldPreamble {
boolAnnot = boolean 1, // Boolean
charBear = char 97, // Char
sharkByte = byte 17, // Byte
shortCircuit = short 4386, // Short
integerHead = 42, // Int
longJohnSilver = 55l, // Long
floatBoat = 1.0f, // Float
doubleDip = 10.0d, // Double
stringBeans = "foo", // String
severity = enum FieldPreamble$Severity IMPORTANT, // Enum
classAnnot = class FieldPreamble$FooBall, // Class
tm = @+Trademark { description = "embedded", owner = "ktl"} // Annotation
}
Field foo:I;
...
Example 4 (Module Annotation, Visible)
@+java/lang/Deprecated { 
since = "9",
forRemoval = boolean true
}
moduleContent my.moduleContent
version 53:0
{
 ...

Note:
 JASM does not enforce the annotation value declarations like a compiler would.  It only checks to see that an annotation structure is well-formed.

Type Annotations

Member annotations are a subset of the basic annotations support provided in JDK 7.0 (1.7). These are annotations that ornament Packages, Classes, and Members either visibly (accessible at runtime) or invisibly (not accessible at runtime). In JASM, visible annotations are denoted by the token @T+, while invisible annotations are denoted by the token @T-.

Synopsis

TYPE_ANNOTATION_DECLARATION:
@T+|@T- ANNOTATION_NAME [TYPE_ANNOTATION_VALUE_DECLARATIONS]


TYPE_ANNOTATION_VALUE_DECLARATIONS: list of (comma separated)
TYPE_ANNOTATION_VALUE_DECLARATION


TYPE_ANNOTATION_VALUE_DECLARATION:
{ { ANNOTATION_VALUE_DECLARATION+ } TARGET PATH }


TARGET:
{ TARGET_TYPE TARGET_INFO }


TARGET_TYPE:

         
TARGET_TYPE: TARGET_INFO_TYPE:
CLASS_TYPE_PARAMETER  TYPEPARAM
METHOD_TYPE_PARAMETER   TYPEPARAM
CLASS_EXTENDS  SUPERTYPE
CLASS_TYPE_PARAMETER_BOUND  TYPEPARAM_BOUND
METHOD_TYPE_PARAMETER_BOUND TYPEPARAM_BOUND
FIELD  EMPTY
METHOD_RETURN  EMPTY|
METHOD_RECEIVER EMPTY
METHOD_FORMAL_PARAMETER METHODPARAM
THROWS EXCEPTION
LOCAL_VARIABLE LOCALVAR
RESOURCE_VARIABLE LOCALVAR
EXCEPTION_PARAM CATCH
INSTANCEOF OFFSET
NEW OFFSET
CONSTRUCTOR_REFERE CE_RECEIVER
OFFSET
METHOD_REFERENCE_RECEIVER OFFSET 
CAST
TYPEARG
CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
TYPEARG
METHOD_INVOCATION_TYPE_ARGUMENT TYPEARG
CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT TYPEARG
METHOD_REFERENCE_TYPE_ARGUMENT TYPEARG


TARGET_INFO_TYPE:
TYPEPARAM | SUPERTYPE | TYPEPARAM_BOUND | EMPTY | METHODPARAM | EXCEPTION | LOCALVAR | CATCH | OFFSET |  TYPEARG


TYPEPARAM:
paramIndex(INTEGER)



SUPERTYPE:
typeIndex(INTEGER)typeIndex(INTEGER)


TYPEPARAM_BOUND:
paramIndex(INTEGER) boundIndex(INTEGER)



EMPTY:
 


METHODPARAM:
index(
paramIndex(INTEGER)

EXCEPTION:
typeIndex(INTEGER) 



LOCALVAR:
{ LVENTRY }+numEntries


LVENTRY:
startpc(INTEGER) length(INTEGER) index(INTEGER)


CATCH:

catch(INTEGER)




OFFSET:
offset(INTEGER)

TYPEARG:
offset(INTEGER) typeIndex(INTEGER)




PATH: list of (space separated)
{ PATH_ENTRY+ }


PATH_ENTRY:
{ PATH_KIND PATH_INDEX }


PATH_KIND:
ARRAY | INNER_TYPE | WILDCARD | TYPE_ARGUMENT


PATH_INDEX:
INTEGER








Parameter Names and Parameter Annotations

Parameter annotations are another subset of the basic annotations support provided in JDK 5.0 (1.5). These are annotations that ornament Parameters to methods either visibly (accessible at runtime) or invisibly (not accessible at runtime). In JASM, visible parameter annotations are denoted by the token @+, while invisible parameter annotations are denoted by the token @-.

Parameter names come from an attribute introduced in JDK 8.0 (1.8).  These are fixed parameter names that are used to ornament parameters on methods.  In Jasm, parameter names are identified by the token # followed by { } braclets

Synopsis

METHOD DECLARATION:
MODIFIERS Method METHOD_NAME:"METHOD_SIGNATURE" [STACK_DECL] [LOCALS_DECL] [PARAMETERS_DECL] {[CODE]}

PARAMETERS_DECL:
[PARAMETER_DECL]N (where N < number of params in method, each N is a unique param number)

PARAMETER_DECL:
PARAM_NUM : [PARAM_NAME_DECL] [ANNOTATION_DECLARATIONS]
PARAM_NAME_DECL:
#{ name PARAM_ACCESS}

PARAM_ACCESS: list of
[final][synthetic][mandated]

Examples

Example 1 (Parameter Annotation)
Java Code
public class MyClass2 {

...

public int doSomething(
@VisParamPreamble ( author = "gummy" ) @InVisParamPreamble ( author = "bears" ) int barber,
boolean of,
@VisParamPreamble ( author = "sour" ) @InVisParamPreamble ( author = "worms" ) int seville,
@InVisParamPreamble1 ( reviewers = {"Dilbert", "Garfield"} ) boolean pastrami) {
...
}
...
}

JASM Code

Note:  The first two parameters are named ('P0'- 'P3').  Since this is a compiler controlled option, there is no way to specify parameter naming in Java source.
super public class MyClass2
version 50:0
{
...

public Method doSomething:"(IZIZ)I"
stack 2 locals 5

0: #{P0 mandated} @+VisParamPreamble { author = "gummy" } @-InVisParamPreamble { author = "bears" }
1: #{P1 final synthetic mandated}
  2: #{P2 mandated} @+VisParamPreamble { author = "sour" } @-InVisParamPreamble { author = "worms" }
3: #{P3 mandated} @-InVisParamPreamble1 { reviewers = { "Dilbert", "Garfield"} }
{
...
}

} // end Class MyClass2

Default Annotations

  Default annotations are another subset of the basic annotations support provided in JDK 5.0 (1.5). These are annotations that ornament Annotations either visibly (accessible at runtime) or invisibly (not accessible at runtime). Default annotations specify a default value for a given annotation field.

Synopsis

ANNOTATION INTERFACE DECLARATION:
@interface ANNOTATION_NAME { ANNOTATION_FIELD_DECL+ }

ANNOTATION_FIELD_DECL:
ANNOT_FIELD_TYPE ANNOTATION_NAME [ANNOTATION_DEFAULT_VALUE_DECL];

ANNOTATION_DEFAULT_VALUE_DECL:
default ANNOTATION_VALUE (where value must be of the type ANNOT_FIELD_TYPE)

Examples

Example 1 (Default Annotation)
Java Code
import java.lang.annotation.*; 
@Retention(RetentionPolicy.RUNTIME)
@interface Meth2Preamble {
   String author() default "John Steinbeck";
}

JASM Code
interface  Meth2Preamble
    implements java/lang/annotation/Annotation
    version 50:0
{
 public abstract Method author:"()Ljava/lang/String;" default { "John Steinbeck" } ;
} // end Class Meth2Preamble

Module properties

Requires

MODULE_REQUIRES: sequence of
requires REQUIRES_FLAGS CONSTANT_CELL(moduleContent);
REQUIRES_FLAGS: set of
[transitive] [static]
Example:
        requires transitive static foo.bar;

Exports

MODULE_EXPORTS: sequence of
exports CONSTANT_CELL(package) [to EXPORT_TO_MODULES];
EXPORT_TO_MODULES: list of
CONSTANT_CELL(moduleContent)
Example:
        exports com/foo/bar to 
foo2.bar2,
foo3.bar3;
        exports org/foo/bar;

Opens

MODULE_OPENS: sequence of
opens CONSTANT_CELL(package) [to OPENS_TO_MODULES];
OPENS_TO_MODULES: list of
CONSTANT_CELL(moduleContent)
Example:
        opens com/foo/bar to 
foo2.bar2,
foo3.bar3;
        opens org/foo/bar;

Uses

MODULE_USES: sequence of
uses CONSTANT_CELL(class);
Example:
        uses com/foo/bar;

Provides

MODULE_PROVIDES: sequence of
provides CONSTANT_CELL(class) [with MODULE_PROVIDES_WITH_CLASSES];
MODULE_PROVIDES_WITH_CLASSES: list of
CONSTANT_CELL(class)
Example:
        provides com/foo/bar with 
foo2.bar2,
foo3.bar3;
        provides com/foo/bar;

PicoJava Instructions

These instructions takes 2 bytes: prefix (254 for non-privileged variant and 255 for privileged) and the opcode itself. These instructions can be coded in assembler in 2 ways: as single mnemocode identical to the description or using "priv" and "nonpriv" instructions followed with an integer representing the opcode.




Java Assembler Tools (AsmTools) User's Guide

000-0000-00

Table Of Contents Previous ChapterNext ChapterBook Index


Copyright © 2012, 2017, Oracle and/or its affiliates. All rights reserved.
jtreg8-8.2.1+1+ds1/asmtools/docs/jasm.md000066400000000000000000001634541514323636100176320ustar00rootroot00000000000000 # JASM Syntax This chapter describes _JASM syntax_, and how to encode class files using this syntax. _Jasm_ is a java assembler that accepts text in the JASM format and produces a `.class` file for use with a Java Virtual Machine. _Jasm_'s primary use is as a tool for producing specialized tests for testing a JVM implementation. This chapter describes JASM syntax in the following sections: - [General Class Structure](#general-class-structure) - [General Module Structure](#general-module-structure) - [General Source File Structure](#general-source-file-structure) - [The Constant Pool and Constant Elements](#the-constant-pool-and-constant-elements) - [Constant Declarations](#constant-declarations) - [Field Variables](#field-variables) - [Method Declarations](#method-declarations) - [Instructions](#instructions) - [Pseudo Instructions](#pseudo-instructions) - [Inner Class Declarations](#inner-class-declarations) - [Annotation Declarations](#annotation-declarations) - [Member Annotations](#member-annotations) - [Synopsis](#synopsis) - [Examples](#examples) - [Type Annotations](#type-annotations) - [Synopsis](#synopsis-1) - [Parameter Names and Parameter Annotations](#parameter-names-and-parameter-annotations) - [Synopsis](#synopsis-2) - [Examples](#examples-1) - [Default Annotations](#default-annotations) - [Synopsis](#synopsis-3) - [Examples](#examples-2) - [Module properties](#module-properties) - [Requires](#requires) - [Exports](#exports) - [Opens](#opens) - [Uses](#uses) - [Provides](#provides) - [PicoJava Instructions](#picojava-instructions) --- ## JASM Syntax Overview JASM syntax comes in two forms: short-form and verbose-form: 1. **Short-form:** Uses Java-style names to refer to items in the constant-pool. 2. **Verbose-form:** Uses constant-pool indexes to explicitly refer to items. By default, the **JDIS** tool outputs short-form JASM files. To generate verbose-form output, use the `-g` option, like this: ``` shell java -jar asmtools.jar jdis -g ``` ## File Naming in JASM A JASM file can start with a line specifying the name of the output file. This does not affect the file’s content but determines the file name. The first line can be one of these: - `file FILENAME;` - `classfile CLASSNAME;` (adds `.class` to the name). You can define the destination directory using these options: - `-d`: Specifies the root directory for the output, following the class package structure. - `-w`: Specifies the exact directory for the output file. If neither option is used, JASM outputs to ``. ## Class Structure in JASM A JASM file defines class or interface items as follows: 1. **Optional Package Declaration:** ```java package package_name; ``` 2. **Class or Interface Declaration**: ```java [CLASS_MODIFIERS] class|interface CLASSNAME [extends SUPERCLASSNAME] { [CLASS_BODY] } ``` - The `CLASSNAME` determines the resulting file name. - If `this_class` is defined in CLASS_BODY, the name does not affect the file's content but only its name. If both `file FILENAME;` ( or `classfile CLASSNAME;`) and `class CLASSNAME { [CLASS_BODY] }` are present, the file(classfile) declaration takes priority. ### Example Command and Output Here is an example of compiling a JASM file: **Input Command:** ```shell java -jar asmtools.jar jasm -d . FILE.jasm ``` **JASM File Content:** ```java class FILENAME.data { this_class CLASSNAME; super_class SUPERCLASSNAME; } ``` **Output:** A binary file FILENAME.data is created. Decompiling this file (`java -jar asmtools.jar jdis FILENAME.data`) produces: ```java super class CLASSNAME extends SUPERCLASSNAME version 45:0 { } ``` --- ## Description formats | | | | ------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | TERM1\|TERM2 | TERM1 or TERM2 (not both) | | [ TERM ] | TERM is optional | | TERM... | TERM repeated 1 or more times | | [TERM...] | TERM repeated 0 or more times | | "sequence of" | all the following terms are mandatory, in the order given. | | "set of" | any of following terms, or none of them, may appear in any order. However, repetitions are not llowed. | | "list of" | any of following terms, or none of them, may appear in any sequence. If more than one term appear, they are separated by commas (',') | --- ## Lexical Structure # TODO > ------------------------------------------------------------------------ > > > The source text file can be free form (newlines, tabs, and blank > spaces are equivalent). Additionally, the source may contain standard > Java and C++ comments. > > `STRING`, `NUMBER`, and `IDENT` are treated the same as in the Java > Language Specification. One difference is that LETTERs include also > \`/', \`<', \`>', \`(', and \`)' . > > _**`STRING`**_: > `" [ STRING_CHARACTER... ] "` > > _**`NUMBER`**_: > `DIGIT...` > > _**`IDENT`**_: > `LETTER [ LETTER_OR_DIGIT ...]` > > _**`ACCESS`**_ (depends on the context): set of > `abstract final interface native private protected public static super synchronized transient volatile deprecated synthetic bridge varargs` > > Not all access bits make sense for all declarations: for example, the > "super" and "interface" access flags are applied to classes only. > > If an access bit is used improperly, the assembler prints a warning, > but places the bit in the access set. > > Note that `deprecated` and `synthetic` keywords are not translated to > access flags in the Java sense. For these jasm generates a > corresponding `Deprecated` or `Synthetic` attributes instead of access > bits. The `synthetic` access flag is used to mark compiler generated > members not seen in the source (for example, a field reference to an > anonymous outer class). > > _**`TAG`**_: one of > `int float long double Asciz String class Field Method NameAndType InterfaceMethod MethodType MethodHandle InvokeDynamic Dynamic` > > Local names represent labels, rangePC-labels and local variables. > Their scope is constrained by method parenthesis. > > _**`LOCAL_NAME`**_: > `IDENT` > > > > _**`CONSTANT_INDEX`**_: > `#NUMBER` > > Each CONSTANT\_INDEX represents a reference into the constant pool at > the specified location. ------------------------------------------------------------------------ # General Class Structure _**`INTERFACES`**_:list of `CONSTANT_CELL(class|@interface|interface)` _**`TOP_LEVEL_COMPONENT`**_: one of `CONSTANT_DECLARATION FIELD_DECLARATION METHOD_DECLARATION INNER_CLASS_DECLARATIONS` _**`CLASS`**_: sequence of `ANNOTATIONS CLASS_ACCESS CONSTANT_CELL(class|@interface|interface) [extends CONSTANT_CELL(class)] [implements INTERFACES] [version INTEGER:INTEGER] { [TOP_LEVEL_COMPONENT...] }` `CLASS_ACCESS``: list of` `[public]``[final]``[super]``[interface]``[abstract]``[synthetic]``[annotation]``[enum]` The `extends CONSTANT_CELL(class)` clause places the "super" element of the class file. The `implements INTERFACES` clause places the table of interfaces. Since the assembler does not distinguish interfaces and ordinary classes (the only difference is one access bit), the table of interfaces of an interface class must be declared with `implements` keyword, and not `extends`, as in Java language. **Note:**The last two rules allow `TOP_LEVEL_COMPONENT` to appear in any order and number. For example, you can split constant pool table into several parts, mixing constants and method declarations. ------------------------------------------------------------------------ # General Module Structure _**`MODULE`**_: sequence of `ANNOTATIONS [MODULE_FLAGS] moduleContent CONSTANT_CELL(moduleContent) [version INTEGER:INTEGER] {[TOP_LEVEL_MODULE_PROPERTIES...]}` _**`TOP_LEVEL_MODULE_PROPERTIES`**_: one of `MODULE_REQUIRES` `MODULE_EXPORTS` `MODULE_OPENS` `MODULE_USES` `MODULE_PROVIDES` `MODULE_FLAGS``:set of` `[open]` ------------------------------------------------------------------------ # General Source File Structure _**`PACKAGE_DECLARATION`**_: `package IDENT;` Package declaration can appear only once in source file. _**`CLASS_FILE`**_: sequence of `PACKAGE_DECLARATION CLASS...` _**`MODULE_FILE`**_: `MODULE...` _**`SOURCE_FILE`**_: `MODULE_FILE|CLASS_FILE` ------------------------------------------------------------------------ # The Constant Pool and Constant Elements A `CONSTANT_CELL` refers to an element in the constant pool. It may refer to the element either by its index or its value: _**`CONSTANT_CELL`**_: `CONSTANT_INDEX` `TAGGED_CONSTANT_VALUE` Generic rule for TAGGED\_CONSTANT\_VALUE is: _**`TAGGED_CONSTANT_VALUE`**_: `[TAG] CONSTANT_VALUE` A TAG may be omitted when the context only allows one kind of a tag. For example, the argument of an `anewarray` instruction should be a `CONSTANT_CELL` which represents a class, so instead of anewarray class java/lang/Object one may write: anewarray java/lang/Object It is possible to write another tag, e.g.: anewarray String java/lang/Object However, the resulting program will be incorrect. Another example of an implicit tag (eg. a context which implies tag) is the header of a class declaration. You may write: aClass { } which is equivalent to: class aClass { } Below, the tag implied by context will be included in the rules, e.g.: CONSTANT_VALUE(int). The exact notation of `CONSTANT_VALUE` depends on the (explicit or implicit) `TAG.` _**`TAGGED_CONSTANT_VALUE`**_: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
int INTEGER
long [INTEGER|LONG]
float [FLOAT|INTEGER]
float bits INTEGER
double [FLOAT|DOUBLE|INTEGER|LONG]
double [bits INTEGER | bits LONG]
Asciz EXTERNAL_NAME
class CONSTANT_NAME
String CONSTANT_NAME
NameAndType NAME_AND_TYPE
Field CONSTANT_FIELD
Method CONSTANT_FIELD
ReferenceIndex [Method|InterfaceMethod]
MethodHandle [INVOKESUBTAG|INVOKESUBTAG_INDEX] : CONSTANT_FIELD | [FIELDREF|METHODREF|INTERFACEMETHODREF]
MethodType CONSTANT_NAME
id="invokedynamicconstant"> InvokeDynamic INVOKESUBTAG : CONSTANT_FIELD : NAME_AND_TYPE [INVOKEDYNAMIC_STATIC_ARGS]
moduleContent CONSTANT_NAME
package CONSTANT_NAME
> _Note_ > When the JASM parser encounters an InvokeDynamic constant, it creates > an entry in the _BootstrapMethods_ attribute (the _BootstrapMethods_ > attribute is produced if it has not already been created). The entry > contains a reference to the _MethodHandle_ item in the constant pool, > and, optionally, a sequence of references to additional static > arguments (_ldc_-type constants) to the _bootstrap method_ INVOKESUBTAGs for MethodHandle and (const) InvokeDynamic are defined as follows and can be presented as either an index or a tag: _**`INVOKESUBTAG: [INVOKESUBTAG_INDEX]`**_ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
REF_GETFIELD [1]
REF_GETSTATIC [2]
REF_PUTFIELD [3]
REF_PUTSTATIC [4]
REF_INVOKEVIRTUAL [5]
REF_INVOKESTATIC [6]
REF_INVOKESPECIAL [7]
REF_NEWINVOKESPECIAL [8]
REF_INVOKEINTERFACE [9]
Static arguments for an InvokeDynamic constant are defined as follows: _**`INVOKEDYNAMIC_STATIC_ARGUMENTS`**_: `INVOKEDYNAMIC_STATIC_ARG ',' ...` _**`INVOKEDYNAMIC_STATIC_ARG`**_: (one of) `INVOKEDYNAMIC_STATIC_ARG_CONSTANT_VALUE` _**`INVOKEDYNAMIC_STATIC_ARG_CONSTANT_VALUE`**_: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
int INTEGER
long [INTEGER|LONG]
float [FLOAT|INTEGER]
double [FLOAT|DOUBLE|INTEGER|LONG]
class CONSTANT_NAME
String CONSTANT_NAME
MethodHandle INVOKESUBTAG:CONSTANT_FIELD
MethodType CONSTANT_NAME
`INTEGER`, `LONG`, `FLOAT`, and `DOUBLE` correspond to `IntegerLiteral` and `FloatingPointLiteral` as described in [The Java Language Specification](https://docs.oracle.com/javase/specs/jls/se8/html/index.html). If a double-word constant (`LONG` or `DOUBLE`) is represented with a single-word value (`INTEGER` or `FLOAT`, respectively), single-word value is simply promoted to double-word, as described in [The Java Language Specification](https://docs.oracle.com/javase/specs/jls/se8/html/index.html). If floating-point constant (`FLOAT` or `DOUBLE`) is represented with an integral value (`INTEGER` or `LONG`, respectively), the result depends on whether the integral number is preceded with the keyword "bits". If "bits" is not used, the result is a floating-point number closest in value to the decimal number. If the keyword "bits" is used, the floating-point constant takes bits of the integral value without conversion. Thus, float 2; means the same as float 2.0f; and the same as float bits 0x40000000; while float bits 2; actually means the same as float bits 0x00000002; and the same as float 2.8026e-45f _**`CONSTANT_NAME`**_: `CONSTANT_INDEX` `EXTERNAL_NAME` _**`EXTERNAL_NAME`**_: `IDENT STRING` External names are names of class, method, field, or type, which stay in resulting .class file, and may be represented both by `IDENT` or by `STRING` (which is useful when name contains non-letter characters). _**`NAME_AND_TYPE`**_: `CONSTANT_INDEX` `CONSTANT_NAME:CONSTANT_NAME` In this second example, the first `CONSTANT_NAME` denotes the name of a field and second denotes its type. _**`CONSTANT_FIELD`**_: `CONSTANT_INDEX` `[CONSTANT_NAME.]NAME_AND_TYPE` In this third example, `CONSTANT_NAME` denotes to the class of a field. If `CONSTANT_NAME` is omitted, the current class is assumed. ------------------------------------------------------------------------ # Constant Declarations Constant declarations are demonstrated in the examples below: const #1=int 1234 , #2=String "a string" , #3=Method get:I ; _**`CONSTANT_DECLARATION`**_: `const CONSTANT_DECLARATORS ;` _**`CONSTANT_DECLARATORS`**_: list of `CONSTANT_DECLARATOR` _**`CONSTANT_DECLARATOR`**_: `CONSTANT_INDEX = TAGGED_CONSTANT_VALUE` ------------------------------------------------------------------------ # Field Variables _**`FIELD_DECLARATION`**_: `ANNOTATIONS ``FIELD_ACCESS Field FIELD_DECLARATORS ;` _**`FIELD_DECLARATORS`**_: list of `FIELD_DECLARATOR` _**`FIELD_DECLARATOR`**_: `EXTERNAL_NAME:CONSTANT_NAME [:SIGNATURE] [ = TAGGED_CONSTANT_VALUE ]` `FIELD_ACCESS``: list of` `[public|private|protected]``[final]``[static]``[volatile]``[transient]``[synthetic]``[enum]` Example: public static Field field1:I = int 1234, field2:"Ljava/lang/String;", field3:"Ljava/util/List;":"Ljava/util/List<+Ljava/lang/String;>" ; Access bits (public and static) are applied both to field1 and field2. The `EXTERNAL_NAME` denotes the name of the field, `CONSTANT_NAME` denotes its type, `TAGGED_CONSTANT_VALUE` denotes initial value. ------------------------------------------------------------------------ # Method Declarations _**`METHOD_DECLARATION`**_: sequence of `ANNOTATIONS ``METHOD_ACCESS Method` `EXTERNAL_NAME:CONSTANT_NAME` `[THROWS]` `STACK_SIZE` `[LOCAL_VAR_SIZE]` `{ INSTRUCTION_STATEMENT...` `ANNOTATIONS }` The `EXTERNAL_NAME` denotes the name of the method, `CONSTANT_NAME` denotes its type. `METHOD_ACCESS``: list of` `[public|private|protected]``[static][final]``[synthetic]``[bridge]``[varargs]``[native][abstract]``[strict]``[synthetic]` _**`THROWS`**_: `throws EXCEPTIONS` _**`EXCEPTIONS`**_: list of `CONSTANT_CELL(class)` The meaning of the `THROWS` clause is the same as in Java Language Specification - it forms Exceptions attribute of a method. Jasm itself does not use this attribute in any way. _**`STACK_SIZE`**_: `stack NUMBER` The `NUMBER` denotes maximum operand stack size of the method. _**`LOCAL_VAR_SIZE`**_: `locals NUMBER` The `NUMBER` denotes number of local variables of the method. If omitted, it is calculated by assembler according to the signature of the method and local variable declarations. ------------------------------------------------------------------------ # Instructions > > > ## VM Instructions > > _**`INSTRUCTION_STATEMENT`**_: > `[NUMBER] [LABEL:] INSTRUCTION|PSEUDO_INSTRUCTION ;` > > Jasm allows for a `NUMBER` (which is ignored) at the beginning of each > line. This is allowed in order to remain consistent with the jdis > disassembler. Jdis puts line numbers in disassembled code that may be > reassembled using Jasm without any additional modifications. > > _**`INSTRUCTION`**_: > `OPCODE [ARGUMENTS]` > > _**`ARGUMENTS`**_: list of > `ARGUMENT` > > _**`ARGUMENT`**_: > `NUMBER LABEL LOCAL_VARIABLE TRAP_IDENT CONSTANT_CELL SWITCHTABLE TYPE` > > _**`LABEL`**_: > `NUMBER IDENT` > > _**`LOCAL_VARIABLE`**_: > `NUMBER IDENT` > > _**`TRAP_IDENT`**_: > `IDENT` > > _**`TYPE`**_: > `NUMBER boolean byte char int float long double class` > > _**`SWITCHTABLE`**_: > `{ [NUMBER:LABEL...] [default:LABEL] }` > > SWITCHTABLE example: Java\_text > > switch (x) { > case 11: > x=1; > break; > case 12: > x=2; > break; > default: > x=3; > } > > > > will be coded in assembler as follows: > > tableswitch { > 11: L24; > 12: L29; > default: L34 > } > L24: iconst_1; > istore_1; > goto L36; > L29: iconst_2 ; > istore_1; > goto L36; > L34: iconst_3; > istore_1; > L36: .... > > > > OPCODE is any mnemocode from the instruction set. If mnemocode needs > an ARGUMENT, it cannot be omitted. Moreover, the kind (and number) of > the argument(s) must match the kind (and number) required by the > mnemocode: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
aload, astore, fload, fstore, iload, istore, lload, lstore, dload, > dstore, ver, endvar:LOCAL_VARIABLE
iinc:LOCAL_VARIABLE, NUMBER
sipush, bipush, bytecode:NUMBER
tableswitch, lookupswitch:SWITCHTABLE
newarray:TYPE
jsr, goto, ifeq, ifge, ifgt, ifle, iflt, ifne, if_icmpeq, if_icmpne, > if_icmpge, if_icmpgt, if_icmple, if_icmplt, if_acmpeq, if_acmpne, > ifnull, ifnonnull, try, endtry:LABEL
jsr_w, goto_w:LABEL
ldc_w, ldc2_w, ldc:CONSTANT_CELL
new, anewarray, instanceof, checkcast,CONSTANT_CELL(class)
multianewarray style="vertical-align: top">NUMBER, CONSTANT_CELL(class)
putstatic, getstatic, putfield, getfield:CONSTANT_CELL(Field)
invokevirtual, invokenonvirtual, invokestatic:CONSTANT_CELL(Method)
invokeinterface:NUMBER, CONSTANT_CELL(Method)
invokedynamic:CONSTANT_CELL(InvokeDynamic)
aaload, aastore, aconst_null, > aload_0, aload_1, aload_2, aload_3, aload_w , areturn, > arraylength, astore_0, astore_1, astore_2, astore_3, astore_w, > athrow, baload, bastore, caload, castore, d2f, d2i, d2l, dadd, > daload, dastore, dcmpg, dcmpl, dconst_0, dconst_1, ddiv, dead, > dload_0, dload_1, dload_2, dload_3, dload_w , dmul, dneg, drem, > dreturn, dstore_0, dstore_1, dstore_2, dstore_3, dstore_w, dsub, > dup, dup2, dup2_x1, dup2_x2, dup_x1, dup_x2, f2d, f2i, f2l, > fadd, faload, fastore, fcmpg, fcmpl, fconst_0, fconst_1, > fconst_2, fdiv, fload_0, fload_1, fload_2, fload_3, fload_w, > fmul, fneg, frem, freturn , fstore_0, fstore_1, fstore_2, > fstore_3, fstore_w, fsub , i2b, i2c, i2d, i2f, i2l, i2s, iadd, > iaload, iand, iastore, iconst_0, iconst_1, iconst_2, iconst_3, > iconst_4, iconst_5, iconst_m1, idiv, iinc_w, iload_0, iload_1, > iload_2, iload_3, iload_w, imul, ineg, int2byte, int2char, > int2short, ior, irem, ireturn, ishl, ishr, istore_0, istore_1, > istore_2, istore_3, istore_w, isub, iushr, ixor, l2d, l2f, l2i, > label, ladd, laload, land, lastore, lcmp, lconst_0, lconst_1, > ldiv, lload_0, lload_1, lload_2, lload_3, lload_w, lmul, lneg, > lor, lrem, lreturn, lshl, lshr, lstore_0, lstore_1, lstore_2, > lstore_3, lstore_w, lsub, lushr, lxor, monitorenter, monitorexit, > nonpriv, nop, pop, pop2, priv, ret, return, ret_w, saload, > sastore, swap, wide
>
<No Arguments>
> > > > ## InvokeDynamic Instructions > > _InvokeDynamic instructions_ are instructions that allow dynamic > binding of methods to a call site. These instructions in JASM form are > rather complex, and the JASM assembler does some of the necessary work > to create a _BootstrapMethods_ attribute for entries of binding > methods. > > > class Test > > version 51:0 > > { > > Method m:"()V" > > stack 0 locals 1 > > { > > invokedynamic InvokeDynamic REF_invokeSpecial:bsmName:"()V" // information about bootstrap method > > :methName:"(I)I" // dynamic call-site name ("methName") plus the argument and return types of the call ("(I)I") > > int 1, long 2l; // optional sequence of additional static arguments to the bootstrap method (ldc-type constants) > > } > > } // end Class Test > > This JASM code has an _invokedynamic_ instruction of the form: > _**invokedynamic InvokeDynamic (CONSTANT\_CELL(INVOKEDYNAMIC))**_ > where the INVOKEDYNAMIC constant is represented as > [specified](#invokedynamicconstant) > > (i.e. _invokedynamic InvokeDynamic INVOKESUBTAG : CONSTANT\_FIELD > (bootstrapmethod signature) : NAME\_AND\_TYPE (CallSite) \[Arguments > (Optional)\]_ ). > > The JASM assembler creates the appropriate constant entries and > entries into the BootstrapMethods attribute in a resulting class file. > > You can also create InvokeDynamic constants and BootstrapMethods > explicitly: > > > #22; //class Test3 > > version 51:0 > > { > > > > const #1 = InvokeDynamic 0:#11; // REF_invokeSpecial:Test3.bsmName:"()V":name:"(I)I" int 1, long 2l > > const #2 = Asciz "Test3"; > > const #3 = long 2l; > > const #5 = class #6; // java/lang/Object > > const #6 = Asciz "java/lang/Object"; > > const #7 = Asciz "name"; > > const #8 = int 1; > > const #9 = Asciz "SourceFile"; > > const #10 = Asciz "Test3.jasm"; > > const #11 = NameAndType #7:#21; // name:"(I)I" > > const #12 = Asciz "()V"; > > const #13 = Method #22.#17; // Test3.bsmName:"()V" > > const #14 = Asciz "Code"; > > const #15 = Asciz "m"; > > const #16 = Asciz "BootstrapMethods"; > > const #17 = NameAndType #20:#12; // bsmName:"()V" > > const #18 = Asciz "LineNumberTable"; > > const #19 = MethodHandle 7:#13; // REF_invokeSpecial:Test3.bsmName:"()V" > > const #20 = Asciz "bsmName"; > > const #21 = Asciz "(I)I"; > > const #22 = class #2; // Test3 > > const #23 = class #6; // java/lang/Object > > > > > > > > Method #15:#12 > > stack 0 locals 1 > > { > > 0: invokedynamic InvokeDynamic #1; // InvokeDynamic REF_invokeSpecial:Test3.bsmName:"()V":name:"(I)I" int 1, long 2l; > > } > > > > BootstrapMethod #19 #8 #3; > > > > } // end Class Test3 > > In this example, `const #1 = InvokeDynamic 0:#11;` is the > InvokeDynamic constant that refers to BootstrapMethod at index '0' in > the BootstrapMethods Attribute (`BootstrapMethod #19 #8 #3;` which > refers to the _MethodHandle_ at const \#19, plus 2 other static args > (at const \#8 and const \#3). ## Pseudo Instructions > Pseudo instructions are 'assembler directives', and not really > instructions (in the VM sense) They typically come in two forms: > Code-generating Pseudo-Instructions, and Attribute-Generating > Pseudo-Instructions. > > > > ### Code-Generating Pseudo-Instructions > > The _bytecode_ directive instructs the assembler to put a collection > of raw bytes into the code attribute of a methodK > > > _**`bytecode NUMBERS`**_ > NUMBERS is list of NUMBERs (divided by COMMA). > Insert bytes in place of the instruction. May have any number of > numeric arguments, each of them to be converted into a byte and > inserted in method's code. > > > > ### Attribute-Generating Pseudo-Instructions > > The rest of pseudo\_instructions do not produce any bytecodes, and are > used to form tables: local variable table, exception table, > Stack Maps, and Stack Map Frames. Line Number Tables can not be > specified, but they are constructed by the assembler itself. > > > #### Local Variable Table Attribute Generation > > > > _**`var LOCAL_VARIABLE`**_ > > Starts local variable range > > > > _**`endvar LOCAL_VARIABLE`**_ > > Ends local variable range. LOCAL\_VARIABLE means name or index of > > local variable table entry. > > > > Example: > > > > static void main (String[] args) { > > Tester inst = new Tester(); > > inst.callSub(); > > } > > > > will be coded in assembler as follows: > > > > > > > static Method #8:#9 // main:"([Ljava/lang/String;)V" > > > > > stack 2 locals 2 > > > > > { > > > > > 4 var 0; // args:"[Ljava/lang/String;" > > > > > 0: new #1; // class Tester; > > > > > 3: dup; > > > > > 4: invokespecial #2; // Method "":"()V"; > > > > > 7: astore_1; > > > > > 6 var 1; // inst:"LTester;" > > > > > 8: aload_1; > > > > > 9: invokevirtual #3; // Method callSub:"()V"; > > > > > 7 12: return; > > > > > endvar 0, 1; > > > > > > > > > > } > > > > #### Exception Table Attribute Generation > > > > To generate exception table, three pseudo-instructions are used. > > > > > _**`try TRAP_IDENT`**_ > > > Starts rangePC range > > > > > > _**`endtry TRAP_IDENT`**_ > > > Ends rangePC range > > > > > > _**`catch TRAP_IDENT CONSTANT_CELL(class)`**_ > > > Starts exception handler. > > > > `TRAP_IDENT` represents the name or number of an exception table > > entry. `CONSTANT_CELL` in "catch" pseudo\_instruction means catch > > type. Each exception table entry contains 4 values:start-pc, end-pc, > > catch-pc, catch-type. In jasm, each entry is denoted with some > > (local) identifier, as an example: `TRAP_IDENT`. > > > > To set start-pc, place "try TRAP\_IDENT" before the instruction with > > the desirable program counter. Similarly, use "endtry TRAP\_IDENT" > > for end-pc and "catch TRAP\_IDENT, catch-type" for catch-pc and > > catch-type (which is usually a constant pool reference). Try, > > endtry, and catch pseudoinstructions may be placed in any order. The > > order of entries in exception table is significant (see JVM > > specification). However, the only way to control this order is to > > place catch-clauses in appropriate textual order: assembler adds an > > entry in the exception table each time it encounters a catch-clause. > > > > Example: > > > > try { > > try { > > throw new Exception("EXC"); > > } catch (NullPointerException e){ > > throw e; > > } catch (Exception e){ > > throw e; > > } > > } catch (Throwable e){ > > throw e; > > } > > > > will be coded in assembler as follows: > > > > > try R1, R2; // single "try" or "endtry" can start several regions > > > new class java/lang/Exception; > > > dup; > > > ldc String "EXC"; > > > invokespecial java/lang/Exception.:"(Ljava/lang/String;)V"; > > > athrow; > > > endtry R1; > > > catch R1 java/lang/NullPointerException; // only one "catch" per entry allowed > > > astore_1; > > > aload_1; > > > athrow; > > > catch R1 java/lang/Exception; // same region (R1) can appear in different catches > > > astore_1; > > > aload_1; > > > athrow; > > > endtry R2; > > > catch R2 java/lang/Throwable; > > > astore_1; > > > aload_1; > > > athrow; > > > > > > > > > > #### StackMap Table Attribute Generation > > > > Stack Maps are denoted by the pseudo-op opcode _stack\_map, and they > > can be identified by three basic items:_ > > > > _**`StackMapStatement =`**_``stack\_map > > _**`(stackMap_Item_MapType |stackMap_Item_Object | stackMap_Item_NewObject)`**_`` > > > > _**`stackMap_Item_MapType = (`_**bogus | int | float | double | long > > | null | this | CP**_`)`**_`` > > > > _**`stackMap_Item_Object = CONSTANT_CELL_CLASS`**_ > > _**`stackMap_Item_NewObject =`**_``at``_**`LABEL`**_`` > > > > All stack\_map directives are collected by the assembler, and are > > used to create a StackMap Table attribute. > > > > Example 1 > > (MapType): > > > > public Method "":"()V" > > stack 1 locals 1 > > { > > aload_0; > > invokespecial Method java/lang/Object."":"()V"; > > return; > > stack_frame_type full; > > stack_map bogus; > > ... > > } > > > > > > Example 2 (Object): > > > > public Method > > "<init>":"()V" > > stack 2 locals 1 > > { > > ... > > ***stack\_map class java/lang/Object;*** > > nop; > > return; > > } > > > > Example 3 (NewObject): > > > > public Method > > "<init>":"()V" > > stack 2 locals 1 > > { > > ... > > ***stack\_map at L5;*** > > nop; > > return; > > } > > > > > > > > #### StackFrameType Table Attribute Generation > > > > StackFrameTypes are similar assembler directives as StackMap. These > > directives can appear anywhere in the code, and the assembler will > > collect them to produce a StackFrameType attribute. > > > > _**`StackFrameStatement =`**_``stack\_frame\_type``_**`frame_type`**_ > > > > _**`frame_type = (`**_ same | stack1 | stack1\_ex | chop1 | chop2 | > > chop3 | same\_ex | append | full _**`)`**_ > > > > Example 1 (full _stack frame type_): > > > > public Method "":"()V" > > stack 1 locals 1 > > { > > aload_0; > > invokespecial Method java/lang/Object."":"()V"; > > return; > > stack_frame_type full; > > stack_map bogus; > > ... > > } > > > > Example 2 (append, chop2, and same _stack frame types_): > > > > public Method foo:"(Z)V" > > stack 2 locals 5 > > { > > ... > > iload_2; > > iconst_2; > > if_icmpge L30; > > L27: stack_frame_type append; > > locals_map int, int; > > iconst_2; > > istore 4; > > L30: stack_frame_type chop2; > > goto L9; > > L33: stack_frame_type same; > > getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; > > ldc String "Chop2 attribute test"; > > invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; > > return; > > ... > > } > > > > #### LocalsMap Table > > > > Locals Maps are typically associated with a _stack\_frame\_type_, > > and are accumulated per stack frame. They typically follow a > > _stack\_frame\_type_ directive. > > > > _**`LocalsMapStatement =`**_``locals\_map``_**`locals_type (, locals_type )*`**_ > > > > _**`locals_type = stackMap_Item_MapType | CONSTANT_CELL_CLASS`**_`` > > > > Example (a _locals map_ specifying 2 ints): > > > > public Method foo:"(Z)V" > > stack 2 locals 5 > > { > > ... > > iload_2; > > iconst_2; > > if_icmpge L30; > > L27: stack_frame_type append; > > locals_map int, int; > > iconst_2; > > istore 4; > > L30: stack_frame_type chop2; > > goto L9; > > L33: stack_frame_type same; > > getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; > > ldc String "Chop2 attribute test"; > > invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; > > return; > > ... > > } ------------------------------------------------------------------------ # Inner Class Declarations _**`INNER_CLASS_DECLARATIONS`**_: list of `INNER_CLASS_DECLARATION` _**`INNER_CLASS_DECLARATION`**_: `INNER_CLASS_ACCESS`**`InnerClass`**`[INNER_CLASS_NAME`**`=`**`]? INNER_CLASS_INFO [`**`of`**`OUTER_CLASS_INFO]? ;` _**`INNER_CLASS_NAME`**_: `IDENT | CPX_name` _**`INNER_CLASS_INFO`**_: `CONSTANT_CELL(class)` _**`OUTER_CLASS_INFO`**_: `CONSTANT_CELL(class)` _**`INNER_CLASS_ACCESS`**_`: list of` `[public|protected|private][static][final][interface][abstract][synthetic][annotation][enum]` Example: InnerClass InCl=class test$InCl of class test; ------------------------------------------------------------------------ # Annotation Declarations ## Member Annotations Member annotations are a subset of the basic annotations support provided in JDK 5.0 (1.5). These are annotations that ornament Packages, Classes, and Members either visibly (accessible at runtime) or invisibly (not accessible at runtime). In JASM, visible annotations are denoted by the token **@**, while invisible annotations are denoted by the token **@-**. #### Synopsis _**`ANNOTATIONS`**_: `[ANNOTATION_DECLARATION]+`; _**`ANNOTATION_DECLARATION`**_: **`@+`**`|`**`@-`**`ANNOTATION_NAME [ANNOTATION_VALUE_DECLARATIONS]` The '**@+**' token identifies a Runtime Visible Annotation, where the '**@-' token identifies a Runtime Invisible Annotation.** _**`ANNOTATION_NAME`**_: `IDENT` _**`ANNOTATION_VALUE_DECLARATIONS`**_: list of (comma separated) `ANNOTATION_VALUE_DECLARATION` _**`ANNOTATION_VALUE_DECLARATION`**_: `[ANNOTATION_VALUE_IDENT=] [ANNOTATION_VALUE]` _**`ANNOTATION_VALUE_IDENT`**_: `IDENT` _**`ANNOTATION_VALUE`**_: `ANNOTATION_VALUE_PRIMITIVE | Array of ANNOTATION_VALUE_PRIMITIVE` _**`ANNOTATION_VALUE_PRIMITIVE`**_: `PRIMITIVE_TYPE | STRING | CLASS | ENUM | ANNOTATION_DECLARATION` _**`CLASS`**_: **`class`**`CONSTANT_CELL(class)` _**`ENUM`**_: **`enum CONSTANT_CELL(class) CONSTANT_CELL(string) (where string is Enum type name)`** _**`PRIMITIVE_TYPE`**_: `BOOLEAN | BYTE | CHAR | SHORT | INTEGER | LONG | FLOAT | DOUBLE` _**Note**_ Types (Boolean, Byte, Char, and Short) are normalized into Integer's within the constant pool. Annotation values with these types may be identified with a keyword in front of an integer value. eg. **boolean** true (or: boolean 1) **byte** 20 **char** 97 **short** 2130 Other primitive types are parsed according to normal prefix and suffix conventions (eg. Double = xxx.x**d**, Float = xxx.x**f**, Long = xxx**L**). Strings are identified and delimited by '"' (quotation marks). Keywords '**class**' and '**enum**' identify those annotation types explicitly. Values within classes and enums may either be identifiers (strings) or Constant Pool IDs. Annotations specified as the value of an Annotation field are identified by the JASM annotation keywords '**@+**' and '**@-**'. Arrays are delimited by '{' and '}' marks, with individual elements delimited by ',' (comma). #### Examples Example 1 (Class Annotation, Visible) @+ClassPreamble { author = "John Doe", date = "3/17/2002", currentRevision = 6, lastModified = "4/12/2004", lastModifiedBy = "Jane Doe", reviewers = { "Alice", "Bob", "Cindy"} } super public class MyClass version 50:0 { ... Example 2 (Field Annotation, Invisible) @-FieldPreamble { author = "Mustafa", date = "3/17/2009", currentRevision = 4 } Field foo:I; ... Example 3 (Field Annotation, All subtypes) @+FieldPreamble { boolAnnot = boolean 1, // Boolean charBear = char 97, // Char sharkByte = byte 17, // Byte shortCircuit = short 4386, // Short integerHead = 42, // Int longJohnSilver = 55l, // Long floatBoat = 1.0f, // Float doubleDip = 10.0d, // Double stringBeans = "foo", // String severity = enum FieldPreamble$Severity IMPORTANT, // Enum classAnnot = class FieldPreamble$FooBall, // Class tm = @+Trademark { description = "embedded", owner = "ktl"} // Annotation } Field foo:I; ... Example 4 (Module Annotation, Visible) @+java/lang/Deprecated { since = "9", forRemoval = boolean true } moduleContent my.moduleContent version 53:0 { ... Note: JASM does not enforce the annotation value declarations like a compiler would. It only checks to see that an annotation structure is well-formed. ## Type Annotations Member annotations are a subset of the basic annotations support provided in JDK 7.0 (1.7). These are annotations that ornament Packages, Classes, and Members either visibly (accessible at runtime) or invisibly (not accessible at runtime). In JASM, visible annotations are denoted by the token **@T+**, while invisible annotations are denoted by the token **@T-**. #### Synopsis _**`TYPE_ANNOTATION_DECLARATION`**_: **`@T+`**`|`**`@T-`**`ANNOTATION_NAME [TYPE_ANNOTATION_VALUE_DECLARATIONS]` _**`TYPE_ANNOTATION_VALUE_DECLARATIONS`**_: list of (comma separated) `TYPE_ANNOTATION_VALUE_DECLARATION` _**`TYPE_ANNOTATION_VALUE_DECLARATION`**_: **`{`**``**`{`**`ANNOTATION_VALUE_DECLARATION`**`+`**``**`}`**` TARGET PATH`` `**`}`** _**`TARGET`**_: **`{`**` TARGET_TYPE TARGET_INFO `**`}`** **** _**`TARGET_TYPE`**_`:` ``
TARGET_TYPE: TARGET_INFO_TYPE:
CLASS_TYPE_PARAMETER TYPEPARAM
METHOD_TYPE_PARAMETER TYPEPARAM
CLASS_EXTENDS SUPERTYPE
CLASS_TYPE_PARAMETER_BOUND TYPEPARAM_BOUND
METHOD_TYPE_PARAMETER_BOUND TYPEPARAM_BOUND
FIELD EMPTY
METHOD_RETURN EMPTY|
METHOD_RECEIVER EMPTY
METHOD_FORMAL_PARAMETER METHODPARAM
THROWS EXCEPTION
LOCAL_VARIABLE LOCALVAR
RESOURCE_VARIABLE LOCALVAR
EXCEPTION_PARAM CATCH
INSTANCEOF OFFSET
NEW OFFSET
CONSTRUCTOR_REFERE CE_RECEIVER
OFFSET
METHOD_REFERENCE_RECEIVER OFFSET
CAST
TYPEARG
CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
TYPEARG
METHOD_INVOCATION_TYPE_ARGUMENT TYPEARG
CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT TYPEARG
METHOD_REFERENCE_TYPE_ARGUMENT TYPEARG
_**`TARGET_INFO`**_`_TYPE``:` `` `TYPEPARAM | SUPERTYPE | TYPEPARAM_BOUND | EMPTY | METHODPARAM | EXCEPTION | LOCALVAR | CATCH |`` OFFSET | TYPEARG` **** **`TYPEPARAM`**`:` `paramIndex(`_`INTEGER`_`)`` ` **`SUPERTYPE`**`:` `typeIndex(`_`INTEGER`_`)``typeIndex(``INTEGER``)`` ` **`TYPEPARAM_BOUND`**`:` `paramIndex(`_`INTEGER`_`) ``boundIndex(`_`INTEGER`_`)`` ` **`EMPTY`**`:` `` **`METHODPARAM`**`:` `index(` `paramIndex(`_`INTEGER`_`)` **`EXCEPTION`**`:` `typeIndex(`_`INTEGER`_`)`_``_`` **** _**`LOCALVAR`**_`:` `{```**`LVENTRY }``+numEntries`**`` `` _**`LVENTRY`**_`:` `startpc(`_`INTEGER)`_`length``(`_`INTEGER)`_`index(`_`INTEGER)`_`` **`CATCH`**`:` `catch(`_`INTEGER)`_ `` _**`OFFSET`**_`:` `` `offset(`_`INTEGER)`_ `` **`TYPEARG`**`:` `offset(`_`INTEGER`_`) ``typeIndex(`_`INTEGER`_`)`` ` _**`PATH`**_`: list of (space separated)` `` **`{`**_```PATH_ENTRY`_**`+`**``**`}`** _**`PATH_ENTRY`**_`:` `` `{``PATH_KIND PATH_INDEX }` _**`PATH_KIND`**_`:` `` `ARRAY | INNER_TYPE | WILDCARD | TYPE_ARGUMENT` **`PATH_INDEX`**`:` _`INTEGER`_`` **** **** ## Parameter Names and Parameter Annotations Parameter annotations are another subset of the basic annotations support provided in JDK 5.0 (1.5). These are annotations that ornament Parameters to methods either visibly (accessible at runtime) or invisibly (not accessible at runtime). In JASM, visible parameter annotations are denoted by the token **@+**, while invisible parameter annotations are denoted by the token **@-**. Parameter names come from an attribute introduced in JDK 8.0 (1.8). These are fixed parameter names that are used to ornament parameters on methods. In Jasm, parameter names are identified by the token \# followed by { } braclets #### Synopsis _**`METHOD DECLARATION`**_: `MODIFIERS Method METHOD_NAME:"METHOD_SIGNATURE" [STACK_DECL] [LOCALS_DECL] [PARAMETERS_DECL] {[CODE]}` _**`PARAMETERS_DECL`**_: `[PARAMETER_DECL]``N``(where N < number of params in method, each N is a unique param number)` _**`PARAMETER_DECL`**_: `PARAM_NUM : [PARAM_NAME_DECL] [ANNOTATION_DECLARATIONS]` _**`PARAM_NAME_DECL`**_: `#{ name PARAM_ACCESS}` _**`PARAM_ACCESS`**_`: list of` `[final][synthetic][mandated]` #### Examples Example 1 (Parameter Annotation) _**Java Code**_ public class MyClass2 { ... public int doSomething( @VisParamPreamble ( author = "gummy" ) @InVisParamPreamble ( author = "bears" ) int barber, boolean of, @VisParamPreamble ( author = "sour" ) @InVisParamPreamble ( author = "worms" ) int seville, @InVisParamPreamble1 ( reviewers = {"Dilbert", "Garfield"} ) boolean pastrami) { ... } ... } _**JASM Code**_ Note: The first two parameters are named ('P0'- 'P3'). Since this is a compiler controlled option, there is no way to specify parameter naming in Java source. super public class MyClass2 version 50:0 { ... public Method doSomething:"(IZIZ)I" stack 2 locals 5 0: #{P0 mandated} @+VisParamPreamble { author = "gummy" } @-InVisParamPreamble { author = "bears" } 1: #{P1 final synthetic mandated} 2: #{P2 mandated} @+VisParamPreamble { author = "sour" } @-InVisParamPreamble { author = "worms" } 3: #{P3 mandated} @-InVisParamPreamble1 { reviewers = { "Dilbert", "Garfield"} } { ... } } // end Class MyClass2 ## Default Annotations Default annotations are another subset of the basic annotations support provided in JDK 5.0 (1.5). These are annotations that ornament Annotations either visibly (accessible at runtime) or invisibly (not accessible at runtime). Default annotations specify a default value for a given annotation field. #### Synopsis _**`ANNOTATION INTERFACE DECLARATION`**_: `@interface ANNOTATION_NAME { ANNOTATION_FIELD_DECL``+``}` _**`ANNOTATION_FIELD_DECL`**_: `ANNOT_FIELD_TYPE ANNOTATION_NAME [ANNOTATION_DEFAULT_VALUE_DECL];` _**`ANNOTATION_DEFAULT_VALUE_DECL`**_: `default ANNOTATION_VALUE (where value must be of the type ANNOT_FIELD_TYPE)` #### Examples Example 1 (Default Annotation) _**Java Code**_ import java.lang.annotation.*; @Retention(RetentionPolicy.RUNTIME) @interface Meth2Preamble { String author() default "John Steinbeck"; } _**JASM Code**_ interface Meth2Preamble implements java/lang/annotation/Annotation version 50:0 { public abstract Method author:"()Ljava/lang/String;" default { "John Steinbeck" } ; } // end Class Meth2Preamble ------------------------------------------------------------------------ # Module properties ## Requires _**`MODULE_REQUIRES`**_: sequence of requires `REQUIRES_FLAGS` `CONSTANT_CELL(moduleContent)`; _**`REQUIRES_FLAGS`**_: set of \[`transitive`\] \[`static`\] Example: requires transitive static foo.bar; ## Exports _**`MODULE_EXPORTS`**_: sequence of exports `CONSTANT_CELL(package)` \[to `EXPORT_TO_MODULES`\]; _**`EXPORT_TO_MODULES`**_: list of `CONSTANT_CELL(moduleContent)` Example: exports com/foo/bar to foo2.bar2, foo3.bar3; exports org/foo/bar; ## Opens _**`MODULE_OPENS`**_: sequence of opens `CONSTANT_CELL(package)` \[to `OPENS_TO_MODULES`\]; _**`OPENS_TO_MODULES`**_: list of `CONSTANT_CELL(moduleContent)` Example: opens com/foo/bar to foo2.bar2, foo3.bar3; opens org/foo/bar; ## Uses _**`MODULE_USES`**_: sequence of uses `CONSTANT_CELL(class)`; Example: uses com/foo/bar; ## Provides _**`MODULE_PROVIDES`**_: sequence of provides `CONSTANT_CELL(class)` \[with `MODULE_PROVIDES_WITH_CLASSES`\]; _**`MODULE_PROVIDES_WITH_CLASSES`**_: list of `CONSTANT_CELL(class)` Example: provides com/foo/bar with foo2.bar2, foo3.bar3; provides com/foo/bar; ------------------------------------------------------------------------ # PicoJava Instructions These instructions takes 2 bytes: prefix (254 for non-privileged variant and 255 for privileged) and the opcode itself. These instructions can be coded in assembler in 2 ways: as single mnemocode identical to the description or using "priv" and "nonpriv" instructions followed with an integer representing the opcode.

Java Assembler Tools (AsmTools) User's Guide

000-0000-00

Table Of Contents Previous ChapterNext ChapterBook Index

------------------------------------------------------------------------ Copyright © 2012, 2017, Oracle and/or its affiliates. All rights reserved. jtreg8-8.2.1+1+ds1/asmtools/maven/000077500000000000000000000000001514323636100165175ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/maven/mvngen.sh000066400000000000000000000066751514323636100203630ustar00rootroot00000000000000#!/bin/bash ##################################################################################################### # Symlinks are forbidden in openjdk project, thus we generate them on the fly together with pom.xml # ##################################################################################################### set -eo pipefail ## resolve folder of this script, following all symlinks, ## http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in SCRIPT_SOURCE="${BASH_SOURCE[0]}" while [ -h "$SCRIPT_SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink SCRIPT_DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" && pwd )" SCRIPT_SOURCE="$(readlink "$SCRIPT_SOURCE")" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located [[ $SCRIPT_SOURCE != /* ]] && SCRIPT_SOURCE="$SCRIPT_DIR/$SCRIPT_SOURCE" done readonly SCRIPT_DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" && pwd )" readonly PROJECT_DIR="$( readlink -f "$SCRIPT_DIR/.." )" PRODUCT_INFO="$PROJECT_DIR/build/productinfo.properties" BUILD_INFO="$PROJECT_DIR/build/build.properties" function readProperty() { if [ "x${2}" = "x" ] ; then local file="$PRODUCT_INFO" else local file="${2}" fi cat "$file" | grep "$1\s*=" | sed "s/.*=\s*//" } PRODUCT_NAME=$(readProperty "PRODUCT_NAME") PRODUCT_VERSION=$(readProperty "PRODUCT_VERSION") PRODUCT_MILESTONE=$(readProperty "PRODUCT_MILESTONE") PRODUCT_BUILDNUMBER=$(readProperty "PRODUCT_BUILDNUMBER") PRODUCT_NAME_LONG=$(readProperty "PRODUCT_NAME_LONG") RELEASE=$(readProperty "javac.release.version" "$BUILD_INFO") echo "Generating $SCRIPT_DIR/pom.xml for $PRODUCT_NAME $PRODUCT_VERSION $PRODUCT_MILESTONE $PRODUCT_BUILDNUMBER ($PRODUCT_NAME_LONG)" cat "$SCRIPT_DIR/pom.xml.in" | \ sed "s/\[RELEASE\]/$RELEASE/g" | \ sed "s/\[PRODUCT_NAME\]/$PRODUCT_NAME/g" | \ sed "s/\[PRODUCT_VERSION\]/$PRODUCT_VERSION/g" | \ sed "s/\[PRODUCT_MILESTONE\]/$PRODUCT_MILESTONE/g" | \ sed "s/\[PRODUCT_BUILDNUMBER\]/$PRODUCT_BUILDNUMBER/g" | \ sed "s/\[PRODUCT_NAME_LONG\]/$PRODUCT_NAME_LONG/g" > "$SCRIPT_DIR/pom.xml" echo "Done" echo "Creating symlinks to symulate maven structure" FILES_LINKS="src/main/java/org=../../../../src/org/ src/test=../../test src/main/resources/org/openjdk/asmtools/i18n.properties=../../../../../../../src/org/openjdk/asmtools/i18n.properties src/main/resources/org/openjdk/asmtools/jasm/i18n.properties=../../../../../../../../src/org/openjdk/asmtools/jasm/i18n.properties src/main/resources/org/openjdk/asmtools/jcoder/i18n.properties=../../../../../../../../src/org/openjdk/asmtools/jcoder/i18n.properties src/main/resources/org/openjdk/asmtools/jdec/i18n.properties=../../../../../../../../src/org/openjdk/asmtools/jdec/i18n.properties src/main/resources/org/openjdk/asmtools/jdis/i18n.properties=../../../../../../../../src/org/openjdk/asmtools/jdis/i18n.properties src/main/resources/org/openjdk/asmtools/util/productinfo.properties=../../../../../../../../build/productinfo.properties" pushd $SCRIPT_DIR > /dev/null for FILE_LINK in $FILES_LINKS ; do FILE=$(echo "$FILE_LINK" | sed "s/=.*//") LINK=$(echo "$FILE_LINK" | sed "s/.*=//") DIR=$(dirname "$FILE") NAME=$(basename "$FILE") if [ ! -e "$SCRIPT_DIR/$FILE" ] ; then mkdir -vp "$SCRIPT_DIR/$DIR" pushd "$SCRIPT_DIR/$DIR" > /dev/null echo "$SCRIPT_DIR/$DIR" ln -sv "$LINK" "$NAME" popd > /dev/null fi done popd > /dev/null echo "Done" jtreg8-8.2.1+1+ds1/asmtools/maven/pom.xml.in000066400000000000000000000105571514323636100204510ustar00rootroot00000000000000 4.0.0 org.openjdk [PRODUCT_NAME] [PRODUCT_VERSION].b[PRODUCT_BUILDNUMBER]-[PRODUCT_MILESTONE] jar [PRODUCT_NAME] Maven wrapper around [PRODUCT_NAME] - [PRODUCT_NAME_LONG] project https://github.com/openjdk/asmtools scm:git:https://git@github.com/openjdk/asmtools.git scm:git:https://git@github.com/openjdk/asmtools.git HEAD UTF-8 src/main/resources true **/* src/test/resources true **/* maven-resources-plugin 3.3.1 class bin UTF-8 org.apache.maven.plugins maven-compiler-plugin 3.8.1 [RELEASE] org.apache.maven.plugins maven-surefire-plugin 3.0.0-M9 org.apache.maven.plugins maven-jar-plugin 3.3.0 true org.openjdk.asmtools.Main org.junit.jupiter junit-jupiter 5.9.2 test org.junit.platform junit-platform-launcher 1.9.2 test org.opentest4j opentest4j 1.2.0 org.hamcrest hamcrest-library 2.2 test jtreg8-8.2.1+1+ds1/asmtools/src/000077500000000000000000000000001514323636100162005ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/000077500000000000000000000000001514323636100167675ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/000077500000000000000000000000001514323636100204215ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/000077500000000000000000000000001514323636100222625ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/Main.java000066400000000000000000000102151514323636100240100ustar00rootroot00000000000000/* * Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.util.I18NResourceBundle; import org.openjdk.asmtools.util.ProductInfo; /** * Wrapper class that reads the first command line argument and invokes a corresponding * tool. */ public class Main { public static final I18NResourceBundle sharedI18n = I18NResourceBundle.getBundleForClass(org.openjdk.asmtools.Main.class); public static final String VERSION_SWITCH="-version"; public static final String STDIN_SWITCH="-"; public static final String DIR_SWITCH="-d"; public static final String WRITE_SWITCH="-w"; public static final String DUAL_LOG_SWITCH ="-dls"; /** * Parses the first argument and delegates execution to an appropriate tool * * @param args - command line arguments */ public static void main(String... args) { if (args.length == 0) { usage(sharedI18n.getString("main.error.no_arguments"), 1); } String cmd = args[0]; if (cmd.equals("-?") || cmd.equals("-h") || cmd.equals("-help")) { usage(null, Environment.OK); } else if (cmd.equals(VERSION_SWITCH)) { printVersion(); System.exit(Environment.OK); } else { String[] newArgs = new String[args.length - 1]; System.arraycopy(args, 1, newArgs, 0, args.length - 1); if (cmd.equals("jasm")) { jasm(newArgs); } else if (cmd.equals("jdis")) { jdis(newArgs); } else if (cmd.equals("jcoder")) { jcoder(newArgs); } else if (cmd.equals("jdec")) { jdec(newArgs); } else { usage(sharedI18n.getString("main.error.unknown_tool", cmd), 1); } } } /** * Prints usage info and error message, afterwards invokes System.exit() * * @param msg - error message to print, or null if no errors occurred * @param exitCode - exit code to be returned by System.exit() */ public static void usage(String msg, int exitCode) { System.err.println(sharedI18n.getString("main.usage", "asmtools.jar")); if (msg != null) { System.err.println(msg); } System.exit(exitCode); } /** * Prints the tools version */ public static void printVersion() { System.out.println(ProductInfo.FULL_VERSION); } /** * Invokes jasm main class with passed arguments */ public static void jasm(String... args) { org.openjdk.asmtools.jasm.Main.main(args); } /** * Invokes jcoder main class with passed arguments */ public static void jcoder(String... args) { org.openjdk.asmtools.jcoder.Main.main(args); } /** * Invokes jdec main class with passed arguments */ public static void jdec(String... args) { org.openjdk.asmtools.jdec.Main.main(args); } /** * Invokes jdis main class with passed arguments */ public static void jdis(String... args) { org.openjdk.asmtools.jdis.Main.main(args); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/asmutils/000077500000000000000000000000001514323636100241235ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/asmutils/FormatConsumer.java000066400000000000000000000002071514323636100277310ustar00rootroot00000000000000package org.openjdk.asmtools.asmutils; @FunctionalInterface public interface FormatConsumer { void format(F t, A... arg); } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/asmutils/HexUtils.java000066400000000000000000000052161514323636100265370ustar00rootroot00000000000000/* * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.asmutils; import java.util.List; /** * Utility class for Hex strings, bytes manipulations */ public class HexUtils { private static final String hexString = "0123456789ABCDEF"; private static final char hexTable[] = hexString.toCharArray(); public static String toHex(long val, int width) { StringBuffer sb = new StringBuffer(); for (int i = width - 1; i >= 0; i--) { sb.append(hexTable[((int) (val >> (4 * i))) & 0xF]); } String s = sb.toString(); return "0x" + (s.isEmpty() ? "0" : s); } public static String toHex(byte val) { int width; for (width = 2; width > 0; width--) { if ((val >> (width - 1) * 4) != 0) { break; } } return toHex(val, width); } public static String toHex(long val) { int width; for (width = 16; width > 0; width--) { if ((val >> (width - 1) * 4) != 0) { break; } } return toHex(val, width); } public static String toHex(int val) { int width; for (width = 8; width > 0; width--) { if ((val >> (width - 1) * 4) != 0) { break; } } return toHex(val, width); } /** * Converts bytes' list ot array */ public static byte[] toByteArray(List byteList) { int length = byteList.size(); byte[] array = new byte[length]; for (int i = 0; i < length; i++) { array[i] = byteList.get(i); } return array; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/asmutils/Pair.java000066400000000000000000000035541514323636100256700ustar00rootroot00000000000000/* * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.asmutils; // Helper class public class Pair { public F first; public S second; public Pair(F first, S second) { this.first = first; this.second = second; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; Pair pair = (Pair) obj; if (!first.equals(pair.first)) return false; return second.equals(pair.second); } @Override public int hashCode() { int result = first != null ? first.hashCode() : 0; result = 31 * result + (second != null ? second.hashCode() : 0); return result; } @Override public String toString() { return "Pair{ " + first + ", " + second + " }"; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/asmutils/Range.java000066400000000000000000000030301514323636100260160ustar00rootroot00000000000000/* * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.asmutils; // Helper class public record Range>(T from, T to) { /** * Verifies that a value is inside the range from the lower bound (from) to the upper bound (to) inclusively. * * @param value the value to verify its belonging to the range * @return true if the value is in the range inclusively. */ public boolean in(T value) { return (this.from.compareTo(value) <= 0) && (this.to.compareTo(value) >= 0); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/asmutils/StringUtils.java000066400000000000000000000336201514323636100272610ustar00rootroot00000000000000/* * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.asmutils; import java.awt.event.KeyEvent; import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; import java.io.UTFDataFormatException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.BiFunction; import java.util.stream.Collectors; import static java.lang.String.format; import static org.openjdk.asmtools.Main.sharedI18n; /** * Utility class for string operations related to ASM tools. *

* This class provides methods for removing comments from strings, * converting UTF-8 strings to printable formats, and handling character * encoding in a way that is suitable for assembly tools. */ public class StringUtils { public static final char[] hexTable = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; /** * Removes Java comments from String * Spaces ahead of comments will be removed; alternatively, if no spaces precede the comment, * the space after it will be deleted. * * @param str string that contains comments * @return string without comments */ public static String removeCommentFrom(String str) { // firstly delete // comment if exists int idx = str.indexOf("//"); if (idx != -1) { str = str.substring(0, idx--); if (str.charAt(idx) == ' ') { str = str.substring(0, idx); } } // remove /* some comment */ comments String[] list = str.split("\\/\\*.*?\\*\\/"); if (list.length > 1) { // comments found str = ""; for (int i = 0; i < list.length; i++) { idx = list[i].length() - 1; if (list[i].charAt(idx) == ' ') { str += list[i].substring(0, idx); } else { str += list[i]; idx = i + 1; if (idx < list.length && list[idx].charAt(0) == ' ') { list[idx] = list[idx].substring(1); } } } } return str; } /** * Converts CONSTANT_Utf8_info string to a printable string for jdis/jdec. * * @param utf8 UTF8 string taken from within ConstantPool of a class file * @param enclosingString strings to enclose output string * @return output string for jcod/jasm */ public static String Utf8ToString(String utf8, String... enclosingString) { final String leftBracket = enclosingString.length > 0 ? enclosingString[0] : ""; final String rightBracket = enclosingString.length > 1 ? enclosingString[1] : leftBracket; StringBuilder sb = new StringBuilder(leftBracket); for (int k = 0; k < utf8.length(); k++) { sb.append(charToUtf8String(utf8.charAt(k))); } return sb.append(rightBracket).toString(); } /** * Converts CONSTANT_Utf8_info string to a printable list of strings * @param utf8 UTF8 string taken from within ConstantPool of a class file * @param strLength the maximum length of each string in the resulting list * @return list of strings for jcod/jasm */ public static List Utf8ToStringList(String utf8, int strLength) { List list = new ArrayList<>(); String s = ""; for (int k = 0; k < utf8.length(); k++) { if (s.length() >= strLength) { list.add(s); s = ""; } s += charToUtf8String(utf8.charAt(k)); } if (!s.isEmpty()) { list.add(s); } return list; } /** * Converts a character to its UTF-8 string representation. *

* Control characters and special characters are escaped using the appropriate escape sequences. * Other characters are returned as is. * * @param c the character to convert * @return the UTF-8 string representation of the character */ public static String charToUtf8String(char c) { return switch (c) { case '\t' -> "\\".concat("t"); case '\n' -> "\\".concat("n"); case '\r' -> "\\".concat("r"); case '\b' -> "\\".concat("b"); case '\f' -> "\\".concat("f"); case '\"' -> "\\".concat("\""); case '\'' -> "\\".concat("\'"); case '\\' -> "\\".concat("\\"); default -> Character.isISOControl(c) ? String.format("\\u%04x", (int) c) : Character.toString(c); }; } /** * Checks that ch is in the list * * @param i char for testing * @param list of chars * @return true if char ch found in the list */ public static boolean isOneOf(int i, char... list) { char ch = (char) i; for (char c : list) { if (c == ch) return true; } return false; } /** * Reads the set of bytes if all bytes are printable then they will be printed * as the string "String"; otherwise the byte array 0x0F 0xB6 0x00 0x11; * The result is the list of lines for printing. * * @param in input stream to get bytes for printing * @param length number of bytes * @param CHARS_IN_LINE max chars in line prepared for printing * @return list of lines for printing * @throws IOException exception might happen while reading DataInputStream */ public static List readUtf8String(DataInputStream in, int length, int CHARS_IN_LINE) throws IOException { final int BYTES_IN_LINE = CHARS_IN_LINE / 6 + 1; final List list = new ArrayList<>(); List byteLines = new ArrayList() {{ add(new StringBuilder()); }}; StringBuilder sb = byteLines.get(0); byte[] buffer; String utfString = null; int count = 0; try { buffer = new byte[length + 2]; buffer[0] = (byte) (length >> 8); buffer[1] = (byte) length; for (int i = 0; i < length; i++) { byte b = in.readByte(); buffer[i + 2] = b; count++; sb.append("0x").append(hexTable[(b >> 4) & 0xF]).append(hexTable[b & 0xF]); if (i % BYTES_IN_LINE == BYTES_IN_LINE - 1) { byteLines.add(sb = new StringBuilder()); } else if (i + 1 != length) { sb.append(" "); } } if (count > 0) { try (DataInputStream dis = new DataInputStream(new ByteArrayInputStream(buffer))) { utfString = DataInputStream.readUTF(dis); } catch (UTFDataFormatException utfDataFormatException) { byteLines.add(0, new StringBuilder(format("// == %s ==", sharedI18n.getString("main.error.wrong.utf8")))); } catch (IOException ignored) { /*ignored*/ } } } catch (NegativeArraySizeException negativeArraySizeException) { throw new IOException("Requested array size exceeds VM limit", negativeArraySizeException); } finally { if (count > 0) { List utf8Lines = getPrintable(utfString, CHARS_IN_LINE); if (utf8Lines != null) { utf8Lines.stream(). forEach(s -> list.add(s.startsWith("// ==") ? s : format("\"%s\";", s))); } else { byteLines.stream().map(s -> s.toString()). forEach(s -> list.add(s.startsWith("// ==") ? s : format("%s;", s))); } } } return list; } /** * @param buffer array of bytes * @return null if buffer contains at least one of non-printable bytes * otherwise the list of strings encoded in the buffer */ public static List getPrintable(byte[] buffer, final int CHARS_IN_LINE) { List list = null; try (DataInputStream dis = new DataInputStream(new ByteArrayInputStream(buffer))) { String str = dis.readUTF(); list = getPrintable(str, CHARS_IN_LINE); } catch (IOException e) {/*ignore*/} return list; } /** * @param rawString String * @return null if buffer contains at least one of non-printable bytes * otherwise the list of strings split by CHARS_IN_LINE */ public static List getPrintable(String rawString, final int CHARS_IN_LINE) { List list = null; if (rawString != null) { String cleanedString = removeNonPrintableAscii(rawString); if (cleanedString != null && !cleanedString.isEmpty() && !cleanedString.chars().anyMatch(c -> !isPrintableChar((char) c))) { list = Utf8ToStringList(rawString, CHARS_IN_LINE); } } return list; } /** * Removes non-printable ASCII characters from the given input string. *

* Non-printable ASCII characters are those with ASCII values outside the range of 32 (space) to 126 (tilde). * * @param input the input string to be processed * @return a new string with non-printable ASCII characters removed, or null if the input is null */ public static String removeNonPrintableAscii(String input) { if (input == null) return null; StringBuilder result = new StringBuilder(); for (char c : input.toCharArray()) { if (c >= 32 && c <= 126) { result.append(c); } } return result.toString(); } /** * Converts a list of strings to a formatted string representation. * The output is enclosed in parentheses and elements are separated by commas. * * @param list the list of strings to convert * @return a formatted string representation of the list */ public static String ListToString(List list) { return ListToString(list, "(,)"); } /** * Converts a list of strings to a formatted string representation. * The output is enclosed in square brackets and elements are separated by a specified delimiter. * * @param list the list of strings to convert * @param separators a string containing the prefix, delimiter, and postfix characters * (e.g., "[,]"), where: * - first character is the prefix, * - second character is the delimiter, * - third character is the postfix. * @return a formatted string representation of the list */ public static String ListToString(List list, String separators) { int l = separators.length(); String prefix = separators != null && l > 0 ? separators.substring(0, 1) : "["; String delim = separators != null && l > 1 ? separators.substring(1, 2) : ","; String postfix = separators != null && l > 2 ? separators.substring(2, 3) : "]"; return prefix.concat(" ") + String.join(delim.concat(" "), list) + " ".concat(postfix); } /** * Converts an array of integers to a hex string representation. * Each integer is converted to its hexadecimal format and joined with commas. * * @param array the array of integers to convert * @return a string representation of the array in hexadecimal format */ public static String mapToHexString(int[] array) { return format("{%s}", Arrays.stream(array).mapToObj(HexUtils::toHex).collect(Collectors.joining(", "))); } public static String repeat(String str, int count) { return count <= 0 ? "" : new String(new char[count]).replace("\0", str); } /** * Checks if the character is printable. * A character is considered printable if it is not a control character, * is not undefined, and belongs to a valid Unicode block that is not SPECIALS. * * @param c the character to check * @return true if the character is printable, false otherwise */ public static boolean isPrintableChar(char c) { Character.UnicodeBlock block = Character.UnicodeBlock.of(c); return (!Character.isISOControl(c)) && c != KeyEvent.CHAR_UNDEFINED && block != null && block != Character.UnicodeBlock.SPECIALS; } public static BiFunction, Boolean> endWith = (str, list) -> { for (String suffix : list) { if (str.endsWith(suffix)) { return true; } } return false; }; public static BiFunction, Boolean> contains = (str, list) -> { for (String substr : list) { if (str.contains(substr)) { return true; } } return false; }; } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/asmutils/Triplet.java000066400000000000000000000026221514323636100264130ustar00rootroot00000000000000/* * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.asmutils; // Helper class public class Triplet extends Pair { public final T third; public Triplet(F first, S second, T third) { super(first, second); this.third = third; } @Override public String toString() { return "Triplet{ " + first + ", " + second + ", " + third + " }"; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/000077500000000000000000000000001514323636100235525ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/Compiler.java000066400000000000000000000032451514323636100261730ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import static org.openjdk.asmtools.common.Environment.OK; public abstract class Compiler> extends Tool { protected Compiler(ToolOutput toolOutput, DualStreamToolOutput outerLog) { super(toolOutput, outerLog); } public synchronized boolean compile(String... argv) { parseArgs(argv); return this.compile() == OK; } // Run a compiler when args already parsed public abstract int compile(); } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/CompilerConstants.java000066400000000000000000000032271514323636100300700ustar00rootroot00000000000000/* * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; /** * This interface defines constant that are used throughout the compiler. It inherits from * RuntimeConstants, which is an autogenerated class that contains constants defined in * the interpreter. */ public interface CompilerConstants { // End of input int EOF = -1; // Jasm: Number of bits used in file offsets int OFFSET_BITS = 32; //Jcoder: The increment for each character. int OFFSET_INC = 1; // BACKSLASH is a special code indicating a pushback of a backslash that // definitely isn't the start of a unicode sequence. int BACKSLASH = -2; } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/CompilerLogger.java000066400000000000000000000243711514323636100273360ustar00rootroot00000000000000/* * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import java.io.IOException; import java.util.*; import java.util.function.Function; import java.util.regex.Matcher; import static java.lang.Math.min; import static java.lang.String.format; import static org.openjdk.asmtools.asmutils.StringUtils.repeat; import static org.openjdk.asmtools.common.CompilerConstants.OFFSET_BITS; import static org.openjdk.asmtools.common.EMessageKind.ERROR; import static org.openjdk.asmtools.common.EMessageKind.WARNING; import static org.openjdk.asmtools.common.Environment.OK; import static org.openjdk.asmtools.common.structure.CFVersion.DEFAULT_MAJOR_VERSION; import static org.openjdk.asmtools.common.structure.CFVersion.DEFAULT_MINOR_VERSION; // error,warning and info message is general and attached to a position of a scanned file. public class CompilerLogger extends ToolLogger implements ILogger { // Message Container private final Map> container = new HashMap<>(); private final List fileContent = new ArrayList<>(); /** * @param programName the tool name * @param cls the environment class of the tool for which to obtain the resource bundle * @param outerLog the logger stream */ public CompilerLogger(String programName, Class cls, DualStreamToolOutput outerLog) { super(programName, cls, outerLog); } @Override public void warning(long where, String id, Object... args) { Message message = getResourceString(WARNING, id, args); if (message.notFound()) { if (EMessageKind.isFromResourceBundle(id)) { insert(NOWHERE, new Message(ERROR, "(I18NResourceBundle) The warning message '%s' not found", id)); } else { insert(where, new Message((strictWarnings) ? ERROR : WARNING, args.length == 0 ? id : format(id, args))); } } else { insert(where, strictWarnings ? new Message(ERROR, message.text()) : message); } } @Override public void error(long where, String id, Object... args) { Message message = getResourceString(ERROR, id, args); if (message.notFound()) { if (EMessageKind.isFromResourceBundle(id)) { insert(NOWHERE, new Message(ERROR, "(I18NResourceBundle) The error message '%s' not found", id)); } else { insert(where, new Message(ERROR, args.length == 0 ? id : format(id, args))); } } else { insert(where, message); } } @Override public String getInfo(String id, Object... args) { String message = getResourceString(id, args); if (message == null) { if (EMessageKind.isFromResourceBundle(id)) { printErrorLn("(I18NResourceBundle) The info message '%s' not found", id); } else { println(id, args); } } return message; } @Override public void usage(List usageIDs) { usage(usageIDs, id -> id.equals("info.opt.cv") ? getInfo(id, DEFAULT_MAJOR_VERSION, DEFAULT_MINOR_VERSION) : getInfo(id)); } @Override public void usage(List usageIDs, Function func) { for (String id : usageIDs) { String s = func.apply(id); if (s != null) { Matcher m = usagePattern.matcher(s); if (m.find()) { println(format(" %-35s %s", m.group(1).trim(), m.group(2).trim())); } else { println(s); } } } } @Override public void setInputFileName(ToolInput inputFileName) throws IOException { super.setInputFileName(inputFileName); fileContent.clear(); fileContent.addAll(inputFileName.readAllLines()); } /** * Gets a pair of line number and line position for the pointer where A position consists of: ((linenr >> OFFSETBITS) | offset) * this means that both the line number and the exact offset into the file are encoded in each position value. * * @param where absolute position in file = (linepos << OFFSETBITS) | bytepos; * @return the pair: [line number, line offset] */ Pair filePosition(long where) { if (where == NOWHERE || fileContent.isEmpty()) { return null; } else { long lineNumber = lineNumber(where); return new Pair<>(lineNumber, lineOffset(lineNumber, where)); } } public long lineNumber(long where) { return where >> OFFSET_BITS; } public long lineOffset(long lineNumber, long where) { long absPos = where & ((1L << OFFSET_BITS) - 1); return absPos - (fileContent.subList(0, (int) lineNumber - 1). stream().mapToInt(String::length).sum() + lineNumber - 1); } public long getCount(EMessageKind kind) { return noMessages() ? 0 : container.values().stream(). flatMap(Collection::stream).filter(m -> m.kind() == kind).count(); } public boolean noMessages() { return container.isEmpty(); } /** * @param printTotals whether to print the total line: N warning(s), K error(s) * @return 0 if there are no errors otherwise a number of errors */ public synchronized int flush(boolean printTotals) { if (noMessages()) return OK; int nErrors = 0, nWarnings = 0; List>> list = new ArrayList<>(container.entrySet()); list.sort(Map.Entry.comparingByKey()); ToolOutput output = getOutputs().getSToolObject(); for (Map.Entry> entry : list) { long where = entry.getKey(); Pair filePosition = filePosition(where); for (Message msg : entry.getValue()) { if (msg.kind() == WARNING && ignoreWarnings) { continue; } if (msg.kind() == ERROR) { output = getOutputs().getEToolObject(); nErrors++; } nWarnings += msg.kind() == WARNING ? 1 : 0; if (where == NOWHERE) { // direct message isn't connected to a position in a scanned file output.printlns(msg.text()); } else { output.printlns(format("%s (%d:%d) %s", getSimpleInputFileName(), filePosition.first, filePosition.second, msg.text())); printAffectedSourceLine(output, filePosition); } } } DualStreamToolOutput totalOutput = (printTotals) ? getOutputs() : null; if (printTotals) { if (nWarnings != 0) totalOutput.printe(format("%d warning(s)%s", nWarnings, nErrors != 0 ? ", " : "\n")); if (nErrors != 0) totalOutput.printlne(format("%d error(s)", nErrors)); } synchronized (output) { output.flush(); if (totalOutput != null) { totalOutput.flush(); } container.clear(); } return nErrors; } // Removes tabs from a source line to get the correct line position while printing. private void printAffectedSourceLine(ToolOutput output, Pair filePosition) { int ln = (int) (filePosition.first - 1); boolean eof = filePosition.first > fileContent.size(); String line = fileContent.get(min(fileContent.size() - 1, ln)); long countOfExtraSpaces = line.chars().filter(ch -> ch == '\t').count(); line = line.replace("\t", TAB_REPLACEMENT); long linePosition = (eof) ? line.length() : (filePosition.second + countOfExtraSpaces * TAB_REPLACEMENT.length()) - countOfExtraSpaces; output.printlns(line); output.printlns(repeat(" ", (int) linePosition) + "^"); } /** * Insert a message in the list of outstanding messages. The list is sorted on input position. */ private void insert(long where, Message message) { if (where != NOWHERE && fileContent.isEmpty()) { addToContainer(NOWHERE, new Message(ERROR, EMessageFormatter.LONG.apply(ERROR, this.getProgramName(), "Content of the file %s not found", getSimpleInputFileName()))); where = NOWHERE; } // message format addToContainer(where, new Message(message.kind(), where == NOWHERE ? EMessageFormatter.VERBOSE.apply(this.getProgramName(), message) : EMessageFormatter.LONG.apply(this.getProgramName(), message))); } private void addToContainer(long where, Message msg) { Set messages = container.get(where); if (messages != null) { messages.add(msg); } else { Set msgSet = new HashSet<>(1); msgSet.add(msg); container.put(where, msgSet); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/Decoder.java000066400000000000000000000033011514323636100257570ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import static org.openjdk.asmtools.common.Environment.OK; public abstract class Decoder> extends Tool { protected Decoder(ToolOutput toolOutput, DualStreamToolOutput outerLog) { super(toolOutput, outerLog); } // Runs the decoder with args public synchronized boolean decode(String... argv) { parseArgs(argv); return this.decode() == OK; } // Run a decoder when args already parsed public abstract int decode(); } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/DecompilerLogger.java000066400000000000000000000175521514323636100276520ustar00rootroot00000000000000/* * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import java.util.LinkedHashSet; import java.util.List; import java.util.function.Consumer; import java.util.function.Function; import java.util.regex.Matcher; import static java.lang.Math.max; import static java.lang.String.format; import static org.openjdk.asmtools.common.EMessageKind.ERROR; import static org.openjdk.asmtools.common.EMessageKind.WARNING; import static org.openjdk.asmtools.common.Environment.OK; public class DecompilerLogger extends ToolLogger implements ILogger { // Message Container private final LinkedHashSet messages = new LinkedHashSet(); private Consumer addToContainer = (String msg) -> { if (msg != null) { messages.add(msg); } }; /** * @param programName the tool name * @param cls the environment class of the tool for which to obtain the resource bundle * @param outerLog the logger stream */ public DecompilerLogger(String programName, Class cls, DualStreamToolOutput outerLog) { super(programName, cls, outerLog); } @Override public void warning(String id, Object... args) { String msg = getResourceString(id, args); if (msg == null) { if (EMessageKind.isFromResourceBundle(id)) { msg = EMessageFormatter.VERBOSE.apply(EMessageKind.ERROR, "(I18NResourceBundle) The warning message '%s' not found", id); } else { msg = EMessageFormatter.VERBOSE.apply(EMessageKind.WARNING, super.getProgramName(), format(id, args)); } } else { msg = EMessageFormatter.VERBOSE.apply(EMessageKind.WARNING, super.getProgramName(), msg); } addToContainer.accept(msg); } @Override public void error(String id, Object... args) { String msg = getResourceString(id, args); if (msg == null) { if (EMessageKind.isFromResourceBundle(id)) { msg = EMessageFormatter.VERBOSE.apply(EMessageKind.ERROR, super.getProgramName(), "(I18NResourceBundle) The error message '%s' not found", id); } else { msg = EMessageFormatter.VERBOSE.apply(EMessageKind.ERROR, super.getProgramName(), format(id, args)); } } else { msg = EMessageFormatter.VERBOSE.apply(EMessageKind.ERROR, super.getProgramName(), msg); } addToContainer.accept(msg); } @Override public void info(String id, Object... args) { String msg = getResourceString(id, args); if (msg == null) { if (EMessageKind.isFromResourceBundle(id)) { msg = EMessageFormatter.VERBOSE.apply(EMessageKind.ERROR, super.getProgramName(), "(I18NResourceBundle) The error message '%s' not found", id); } else { msg = EMessageFormatter.VERBOSE.apply(EMessageKind.ERROR, super.getProgramName(), format(id, args)); } } else { msg = EMessageFormatter.SHORT.apply(EMessageKind.ERROR, super.getProgramName(), msg); } addToContainer.accept(msg); } @Override public void printErrorLn(String format, Object... args) { String msg = (args == null || args.length == 0) ? format : format(format, args); addToContainer.accept(msg); } @Override public void error(Throwable exception) { String msg = ToolLogger.EMessageFormatter.VERBOSE.apply(ERROR, super.getProgramName(), exception.getMessage()); addToContainer.accept(msg); } @Override public String getInfo(String id, Object... args) { String message = getResourceString(id, args); if (message == null) { String msg; if (EMessageKind.isFromResourceBundle(id)) { msg = EMessageFormatter.VERBOSE.apply(EMessageKind.ERROR, super.getProgramName(), "(I18NResourceBundle) The error message '%s' not found", id); } else { msg = (args == null || args.length == 0) ? id : format(id, args); } addToContainer.accept(msg); } return message; } @Override public long getCount(EMessageKind kind) { return messages.stream().filter(msg -> msg.contains(kind.shortForm())).count(); } public int registerTotalIssues(int rc, ToolInput toolInput) { int ret = OK; int nErrors = (int) getCount(ERROR); int nWarnings = (int) getCount(WARNING); if (nWarnings > 0 || nErrors > 0) { // don't take into account warnings ret = max(rc, nErrors); String sWarnings = (nWarnings > 0) ? "%d warning(s)".formatted(nWarnings).concat((nErrors > 0) ? ", " : "") : ""; String sErrors = (nErrors > 0) ? "%d error(s) ".formatted(nErrors) : " "; info("err.count.issues", sWarnings, sErrors, toolInput); } return ret; } public synchronized void flush() { if (!messages.isEmpty()) { DualStreamToolOutput output = getOutputs(); // output.printe('\n'); for (String msg : messages) { output.printlne(msg); } synchronized (output) { output.flush(); messages.clear(); } } } @Override public void usage(List usageIDs) { usage(usageIDs, id -> getInfo(id)); } @Override public void usage(List usageIDs, Function func) { for (String id : usageIDs) { String s = func.apply(id); if (s != null) { Matcher m = usagePattern.matcher(s); if (m.find()) { println(format(" %-21s %s", m.group(1).trim(), m.group(2).trim())); if (s.contains("\n")) { // multiline String[] lines = s.split("\\n"); for (int i = 1; i < lines.length; i++) { println(format("%s%s", " ".repeat(24), lines[i].trim())); } } } else { String[] lines = s.split("\\n"); if (lines.length > 1 && lines[0].trim().startsWith("-")) { println(format(" %s", lines[0].trim())); for (int i = 1; i < lines.length; i++) { println(format("%s%s", " ".repeat(24), lines[i].trim())); } } else { println(s); } } } } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/EMessageKind.java000066400000000000000000000012521514323636100267140ustar00rootroot00000000000000package org.openjdk.asmtools.common; public enum EMessageKind { ERROR("err."), WARNING("warn."), INFO("info."); final String prefix; EMessageKind(String prefix) { this.prefix = prefix; } public static boolean isFromResourceBundle(String msg) { for (EMessageKind kind : values()) { if (msg.startsWith(kind.prefix)) { return true; } } return false; } public String longForm() { return name().substring(0, 1) + name().substring(1).toLowerCase(); } public String shortForm() { return name().length() > 5 ? name().substring(0, 4) : name(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/Environment.java000066400000000000000000000145561514323636100267340ustar00rootroot00000000000000/* * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import java.io.DataInputStream; import java.io.IOException; import java.net.URISyntaxException; import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.function.Function; import java.util.function.Supplier; public abstract class Environment implements ILogger { // Results public final static int OK = 0; public final static int FAILED = 1; T toolLogger; //-w Specify where to place generated class files, without considering the classpath. // If not specified, output will be directed to . private boolean ignorePackage = false; // processed input file or stdin private ToolInput toolInput; private ToolOutput toolOutput; // checks output verbosity private boolean verboseFlag; public boolean isTraceFlag() { return traceFlag; } private boolean traceFlag; /** * @param builder the environment builder */ protected Environment(Builder builder) { this.toolOutput = builder.toolOutput; this.toolLogger = (T) builder.toolLogger; } public void setToolInput(ToolInput toolInput) throws IOException, URISyntaxException { this.toolInput = toolInput; toolLogger.setInputFileName(toolInput); } public void setTraceFlag(boolean flag) { this.traceFlag = flag; } public void setIgnoreWarningsOn() { toolLogger.ignoreWarnings = true; } public void setStrictWarningsOn() { toolLogger.strictWarnings = true; } public boolean isIgnorePackage() { return ignorePackage; } public Environment setIgnorePackage(boolean ignorePackage) { this.ignorePackage = ignorePackage; return this; } public String getSimpleInputFileName() { return toolLogger.getSimpleInputFileName(); } /** * Returns the name of the source file that is used by the tool to assemble the SourceFile attribute * * @return the name of the source file */ public String getSourceName() { String sourceFileName = getSimpleInputFileName(); String sourceName = sourceFileName.contains(".") ? sourceFileName.substring(0, sourceFileName.indexOf('.')) : sourceFileName; return sourceName; } public ToolInput getToolInput() { return toolInput; } /** * @return DataInputStream or null if the method can't read a file */ protected DataInputStream getDataInputStream() throws URISyntaxException, IOException { Objects.requireNonNull(this.toolInput, "Input must be defined."); return toolInput.getDataInputStream(Optional.of(this)); } @Override public void traceln(String id, Object... args) { if (traceFlag) ILogger.super.traceln(id, args); } public void traceln(Supplier supplier) { if (traceFlag) { ILogger.super.traceln(supplier.get()); } } @Override public void trace(String id, Object... args) { if (traceFlag) ILogger.super.trace(id, args); } @Override public void error(String id, Object... args) { toolLogger.error(id, args); } @Override public void error(Throwable exception) { toolLogger.error(exception); } public void trace(Supplier supplier) { if (traceFlag) { ILogger.super.trace(supplier.get()); } } @Override public void info(String id, Object... args) { toolLogger.info(id, args); } public String getInfo(String id, Object... args) { return toolLogger.getInfo(id, args); } public void usage(List ids) { toolLogger.usage(ids); } public void usage(List ids, Function func) { toolLogger.usage(ids, func); } @Override public void printException(Throwable throwable) { if (verboseFlag) toolLogger.printException(throwable); } @Override public DualStreamToolOutput getOutputs() { return getLogger().getOutputs(); } @Override public void setOutputs(DualStreamToolOutput nw) { getLogger().setOutputs(nw); } @Override public ToolOutput getToolOutput() { return toolOutput; } @Override public void setToolOutput(ToolOutput toolOutput) { this.toolOutput = toolOutput; } public boolean getVerboseFlag() { return verboseFlag; } public Environment setVerboseFlag(boolean value) { this.verboseFlag = value; return this; } public T getLogger() { return (T) toolLogger; } /** * The Environment builder. */ public abstract static class Builder { T toolLogger; public ToolOutput toolOutput; public Builder(ToolOutput toolOutput, T toolLogger) { this.toolOutput = toolOutput; this.toolLogger = toolLogger; } /** * @return new environment */ abstract public E build(); } } // end Environment jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/ErrorMessage.java000066400000000000000000000005401514323636100270120ustar00rootroot00000000000000package org.openjdk.asmtools.common; /** * A sorted list of error messages */ public final class ErrorMessage { public int where; public String message; public ErrorMessage next; /** * Constructor */ public ErrorMessage(int where, String message) { this.where = where; this.message = message; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/FormatError.java000066400000000000000000000040451514323636100266620ustar00rootroot00000000000000/* * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; /** * FormatError is the generic error thrown by jdis, jdec while parsing a class file. */ public class FormatError extends ClassFormatError { /** * Checks and returns formatted string if id isn't a reference in i18n.properties * * @param id either format string or a resource id * @param args arguments of the format string * @return null id isn't format string otherwise formatted string */ private static String getResourceMsg(String id, Object... args) { return id.startsWith("err.") || id.startsWith("warn.") ? null : String.format(id, args); } public FormatError(T logger, String id, Object... args) { super( logger.getResourceString(id, args) == null ? (FormatError.getResourceMsg(id, args) == null ? "(i18n.properties) The message '" + id + "' not found" : FormatError.getResourceMsg(id, args)) : logger.getResourceString(id, args)); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/ILogger.java000066400000000000000000000076651514323636100257630ustar00rootroot00000000000000/* * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import java.util.regex.Pattern; import static java.lang.String.format; public interface ILogger { // A logged message isn't attached to a position of a parsed file int NOWHERE = Integer.MAX_VALUE; // Replacement for the tab found in an input CharSequence TAB_REPLACEMENT = " ".repeat(4); Pattern usagePattern = Pattern.compile("(-\\S+\\p{Blank}*\\S*)\\p{Blank}+([PGSDCSOIU]+.*)"); default String getResourceString(String id, Object... args) { throw new NotImplementedException(); } default void warning(long where, String id, Object... args) { throw new NotImplementedException(); } default void error(long where, String id, Object... args) { throw new NotImplementedException(); } default void info(String id, Object... args) { String message = getInfo(id, args); if (message != null) { println(message); } } default long getCount(EMessageKind kind) { throw new NotImplementedException(); } default String getInfo(String id, Object... args) { throw new NotImplementedException(); } default void warning(String id, Object... args) { throw new NotImplementedException(); } default void error(String id, Object... args) { throw new NotImplementedException(); } default void error(Throwable exception) { error(NOWHERE, exception.getMessage()); } default void traceln(String format, Object... args) { getOutputs().printlne((args == null || args.length == 0) ? format : format(format, args)); ; } default void trace(String format, Object... args) { getOutputs().printe((args == null || args.length == 0) ? format : format(format, args)); } default void printErrorLn(String format, Object... args) { getOutputs().printlne((args == null || args.length == 0) ? format : format(format, args)); } default void println(String format, Object... args) { getOutputs().printlns((args == null || args.length == 0) ? format : format(format, args)); } default void println() { getOutputs().printlns(""); } default void print(String format, Object... args) { getOutputs().prints((args == null || args.length == 0) ? format : format(format, args)); } default void print(char ch) { getOutputs().prints(ch); } DualStreamToolOutput getOutputs(); void setOutputs(DualStreamToolOutput nwoutput); default ToolOutput getToolOutput() { throw new NotImplementedException("implement wisely!"); } default void setToolOutput(ToolOutput toolOutput) { throw new NotImplementedException("implement wisely!"); } void printException(Throwable throwable); } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/NotImplementedException.java000066400000000000000000000005161514323636100312220ustar00rootroot00000000000000package org.openjdk.asmtools.common; /** class used to indicate missing functionality */ public class NotImplementedException extends RuntimeException { public NotImplementedException() { super("The method is not yet implemented"); } public NotImplementedException(String reason) { super(reason); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/SyntaxError.java000066400000000000000000000026541514323636100267240ustar00rootroot00000000000000/* * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; /** * SyntaxError is the generic error thrown by jasm, jcoder while parsing either a jasm file or jcod file. */ public class SyntaxError extends Error { private boolean fatalError = false; public SyntaxError setFatal() { this.fatalError = true; return this; } public boolean isFatal() { return this.fatalError; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/Tool.java000066400000000000000000000073311514323636100253360ustar00rootroot00000000000000/* * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; import org.openjdk.asmtools.common.inputs.StdinInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.FSOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import java.io.File; import java.util.ArrayList; import static org.openjdk.asmtools.common.outputs.FSOutput.FSDestination.DIR; public abstract class Tool> { protected final ArrayList fileList = new ArrayList<>(); protected T environment; private ToolOutput toolOutput; protected Tool(ToolOutput toolOutput, DualStreamToolOutput outerLog) { this.environment = getEnvironment(toolOutput, outerLog); } public Environment setVerboseFlag(boolean value) { environment.setVerboseFlag(value); return environment; } public Environment setTraceFlag(boolean value) { environment.setTraceFlag(value); return environment; } public T getEnvironment() { return environment; } // Build environment public T getEnvironment(ToolOutput toolOutput, DualStreamToolOutput outerLog) { throw new NotImplementedException(); } // Usage protected abstract void usage(); // Parse arguments. The Tool will be left using System.Exit if an error is found. protected abstract void parseArgs(String... argv); protected void setFSDestination(FSOutput.FSDestination destination, int index, String... argv) { File file; if ((index) >= argv.length) { environment.error(destination == FSOutput.FSDestination.FILE ? "err.f_requires_argument" : "err.d_requires_argument"); usage(); throw new IllegalArgumentException(); } String fname = argv[index]; file = new File(fname); if (destination == DIR && !file.exists()) { environment.error("err.does_not_exist", fname); throw new IllegalArgumentException(); } if (toolOutput == null) { toolOutput = new FSOutput(); } switch (destination) { case FILE: environment.setToolOutput(((FSOutput) toolOutput).setFile(new File("."), fname)); break; case DIR: environment.setToolOutput(((FSOutput) toolOutput).setDir(file)); } } protected void addStdIn() { for (ToolInput toolInput : fileList) { if (toolInput instanceof StdinInput) { //or throw? return; } } fileList.add(new StdinInput()); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/ToolLogger.java000066400000000000000000000152041514323636100264740ustar00rootroot00000000000000/* * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.util.I18NResourceBundle; import java.io.IOException; import java.nio.file.Paths; import java.util.HashMap; import java.util.List; import java.util.Set; import java.util.function.Function; import static java.lang.String.format; import static org.openjdk.asmtools.Main.sharedI18n; import static org.openjdk.asmtools.common.EMessageKind.ERROR; import static org.openjdk.asmtools.common.EMessageKind.INFO; public abstract class ToolLogger implements ILogger { protected boolean ignoreWarnings = false; // do not print / ignore warnings protected boolean strictWarnings = false; // consider warnings as errors class ToolResources { private final static HashMap resources = new HashMap<>(); public ToolResources(String programName, Class cls) { if (!ToolResources.resources.containsKey(programName)) { ToolResources.resources.put(programName, I18NResourceBundle.getBundleForClass(cls)); } } public void setWarn(boolean value) { ToolResources.resources.get(ToolLogger.this.programName).setWarn(value); } public String getString(String id, Object... args) { return ToolResources.resources.get(ToolLogger.this.programName).getString(id, args); } public boolean containsKey(String key) { return ToolResources.resources.get(ToolLogger.this.programName).containsKey(key); } } private final String programName; private ToolResources toolResources; DualStreamToolOutput outerLog; // Input file name is needed for logging purposes private String inputFileName; private String simpleInputFileName; static { sharedI18n.setWarn(false); } /** * @param programName the tool name * @param cls the environment class of the tool for which to obtain the resource bundle * @param outerLog the logger stream */ public ToolLogger(String programName, Class cls, DualStreamToolOutput outerLog) { // Set Resource bundle for the tool this.toolResources = new ToolResources(programName, cls); this.programName = programName; this.outerLog = outerLog; } @Override public String getResourceString(String id, Object... args) { String resString; toolResources.setWarn(false); try { resString = toolResources.getString(id, args); } finally { toolResources.setWarn(true); } if (resString == null || resString.equals(id)) { resString = sharedI18n.getString(id, args); } if (resString == null || resString.equals(id)) { //to get a proper error message resString = toolResources.getString(id, args); } return resString; } public void setInputFileName(ToolInput inputFileName) throws IOException { this.inputFileName = inputFileName.getName(); this.simpleInputFileName = Paths.get(inputFileName.getName()).getFileName().toString(); // the content of the input file will be loaded only if the file is parsed by jasm/jcoder } public Message getResourceString(EMessageKind kind, String id, Object... args) { String str; for (String prefix : Set.of("", kind.prefix)) { if (toolResources.containsKey(prefix + id) || sharedI18n.containsKey(prefix + id)) { str = getResourceString(id, args); if (str != null) { return new Message(kind, str); } } } return new Message(ERROR, null); } @Override public DualStreamToolOutput getOutputs() { return outerLog; } @Override public void setOutputs(DualStreamToolOutput nwoutput) { this.outerLog = nwoutput; } public String getSimpleInputFileName() { return simpleInputFileName; } @Override public void printException(Throwable throwable) { getOutputs().stacktrace(throwable); } public String getProgramName() { return programName; } public abstract void usage(List ids); public abstract void usage(List ids, Function func); public enum EMessageFormatter { SHORT((severity, name, message) -> format("%s", message)), LONG((severity, name, message) -> format("%s: %s", severity.longForm(), message)), VERBOSE((severity, name, message) -> severity == INFO ? message : format("%-7s-%6s: %s", name, severity.shortForm(), message)); final private TriFunction triFunc; EMessageFormatter(TriFunction func) { this.triFunc = func; } public String apply(EMessageKind kind, String name, String format, Object... args) { return (format == null || name == null) ? "" : triFunc.apply(kind, name, format(format, args)); } public String apply(String name, Message message) { return message.notFound() ? "" : triFunc.apply(message.kind(), name, message.text()); } } public record Message(EMessageKind kind, String text) { Message(EMessageKind kind, String format, Object... args) { this(kind, format(format, args)); } public boolean notFound() { return kind == ERROR && text == null; } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/TriFunction.java000066400000000000000000000027571514323636100266740ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; @FunctionalInterface public interface TriFunction { R apply(T t, U u, V v); // Default method to compose functions (like BiFunction.andThen) default TriFunction andThen(java.util.function.Function after) { if (after == null) throw new NullPointerException("After function must not be null"); return (t, u, v) -> after.apply(apply(t, u, v)); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/inputs/000077500000000000000000000000001514323636100250745ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/inputs/ByteInput.java000066400000000000000000000066161514323636100276730ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.inputs; import org.openjdk.asmtools.common.Environment; import java.io.*; import java.net.URISyntaxException; import java.security.DigestInputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collection; import java.util.Optional; public class ByteInput implements ToolInput { private boolean detailedInput = false; private MessageDigest md = null; //compilers passes input more than one times, so saving it for reuse; protected byte[] bytes; public ByteInput(final byte[] bytes) { this.bytes = bytes; } protected ByteInput() { } public byte[] getBytes() { return bytes; } public ByteInput setDetailedInput(boolean detailedInput) { this.detailedInput = detailedInput; return this; } @Override public MessageDigest getMessageDigest() { return md; } @Override public int getSize() { return bytes.length; } @Override public String getName() { //get parent is used return "bytes/bytes"; } @Override public String toString() { return getName(); } protected void init() { } @Override public DataInputStream getDataInputStream(Optional logger) { init(); try { ByteArrayInputStream bais = new ByteArrayInputStream(bytes); if (detailedInput) { md = MessageDigest.getInstance("SHA-256"); DigestInputStream dis = new DigestInputStream(bais, md); return new DataInputStream(dis); } else { return new DataInputStream(bais); } } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } } @Override public Collection readAllLines() throws IOException { init(); ArrayList resultingLines = new ArrayList(); try (BufferedReader br = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(bytes), "utf-8"))) { while (true) { String l = br.readLine(); if (l == null) { break; } resultingLines.add(l); } } return resultingLines; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/inputs/FileInput.java000066400000000000000000000105531514323636100276420ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.inputs; import org.openjdk.asmtools.common.Environment; import java.io.*; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.net.URLConnection; import java.nio.file.Files; import java.nio.file.Paths; import java.security.DigestInputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Collection; import java.util.Optional; public class FileInput implements ToolInput { private boolean detailedInput = false; private final String fileName; private MessageDigest md = null; private CapacityInputStream cis = null; public FileInput(String fileName) { this.fileName = fileName; } @Override public String getName() { return fileName; } public Collection readAllLines() throws IOException { return Files.readAllLines(Paths.get(getName())); } public FileInput setDetailedInput(boolean detailedInput) { this.detailedInput = detailedInput; return this; } @Override public MessageDigest getMessageDigest() { return md; } @Override public int getSize() { return cis != null ? cis.size() : 0; } @Override public DataInputStream getDataInputStream(Optional logger) throws URISyntaxException, IOException { try { FileInputStream fis = new FileInputStream(this.getName()); if (detailedInput) { cis = new CapacityInputStream(fis); md = MessageDigest.getInstance("SHA-256"); DigestInputStream dis = new DigestInputStream(cis, md); return new DataInputStream(dis); } else { return new DataInputStream(fis); } } catch (IOException ex) { if (this.getName().matches("^[A-Za-z]+:.*")) { try { final URI uri = new URI(this.getName()); final URL url = uri.toURL(); final URLConnection conn = url.openConnection(); conn.setUseCaches(false); return new DataInputStream(conn.getInputStream()); } catch (URISyntaxException | IOException exception) { if (logger.isPresent()) { logger.get().error("err.cannot.read", this.getName()); } throw exception; } } else { throw ex; } } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } } @Override public String toString() { return getName(); } private static class CapacityInputStream extends FilterInputStream { CapacityInputStream(InputStream in) { super(in); } int size() { return size; } @Override public int read(byte[] buf, int offset, int length) throws IOException { int n = super.read(buf, offset, length); if (n > 0) size += n; return n; } @Override public int read() throws IOException { int b = super.read(); size += 1; return b; } private int size; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/inputs/StdinInput.java000066400000000000000000000024561514323636100300470ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.inputs; public class StdinInput extends StreamInput { public StdinInput() { super(System.in); } @Override public String getName() { //get parent is used return "stdin/stdin"; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/inputs/StreamInput.java000066400000000000000000000040101514323636100302050ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.inputs; import java.io.ByteArrayOutputStream; import java.io.InputStream; public class StreamInput extends ByteInput { private final InputStream originalStream; public StreamInput(InputStream is) { originalStream = is; } @Override protected void init() { if (bytes == null) { bytes = drainIs(originalStream); } } public static byte[] drainIs(InputStream is) { try { byte[] buffer = new byte[32 * 1024]; ByteArrayOutputStream baos = new ByteArrayOutputStream(); int bytesRead; while ((bytesRead = is.read(buffer)) > 0) { baos.write(buffer, 0, bytesRead); } return baos.toByteArray(); } catch (Exception ex) { throw new RuntimeException(ex); } } @Override public String getName() { //get parent is used return "stream/stream"; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/inputs/StringInput.java000066400000000000000000000026131514323636100302270ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.inputs; import java.nio.charset.StandardCharsets; public class StringInput extends ByteInput { public StringInput(final String bytes) { super(bytes.getBytes(StandardCharsets.UTF_8)); } @Override public String getName() { //get parent is used return "string/string"; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/inputs/TextInput.java000066400000000000000000000034631514323636100277110ustar00rootroot00000000000000/* * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.inputs; import java.io.DataInputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; /** * Base class for JasmEnvironment.InputFile and * JcoderEnvironment.InputFile that read the jasm, jcod text files */ public abstract class TextInput { public long position; protected int charPos = 0; protected int linepos = 1; // Buffer to keep the text file content protected final String strData; public TextInput(DataInputStream dataInputStream) throws IOException { byte[] data = new byte[dataInputStream.available()]; dataInputStream.read(data); strData = new String(data, StandardCharsets.UTF_8); dataInputStream.close(); } public abstract int readUTF(); } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/inputs/ToolInput.java000066400000000000000000000044711514323636100277020ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.inputs; import org.openjdk.asmtools.common.Environment; import java.io.DataInputStream; import java.io.IOException; import java.net.URISyntaxException; import java.security.MessageDigest; import java.util.Collection; import java.util.Optional; /** * This class is a generic interface, symbolising any input for jdis/jasm/jdec/jcoder. * Asmtools as application internally uses FileInput and StdinInput. * UnitTests for asmtools uses mainly StringInput for assemblers and ByteInput for disassemblers. *

* String/Byte/Stream inputs can be used as any 3rd part code which do not need files, aka IDE, instrumentation or similar. *

* The interface methods goes in favor of asmtools, and for details and help see individual implementations */ public interface ToolInput { String getName(); DataInputStream getDataInputStream(Optional logger) throws URISyntaxException, IOException; Collection readAllLines() throws IOException; default boolean isDetailedInput() { return false; } default ToolInput setDetailedInput(boolean value) { return this; } default MessageDigest getMessageDigest() { return null; } default int getSize() { return 0; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/000077500000000000000000000000001514323636100252755ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/ByteOutput.java000066400000000000000000000076751514323636100303030ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs; import org.openjdk.asmtools.common.Environment; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Optional; import java.util.stream.Collectors; public class ByteOutput extends NamedToolOutput { private final ArrayList outputs = new ArrayList<>(); private ByteArrayOutputStream currentClass; public ArrayList getOutputs() { return outputs; } @Override public String toString() { return outputs.stream().map(a -> a.toString()).collect(Collectors.joining(System.lineSeparator())); } @Override public DataOutputStream getDataOutputStream() throws FileNotFoundException { return new DataOutputStream(currentClass); } @Override public void startClass(String fullyQualifiedName, Optional suffix, Environment logger) throws IOException { super.startClass(fullyQualifiedName, suffix, logger); currentClass = new ByteArrayOutputStream(1024); } @Override public void finishClass(String fullyQualifiedName) throws IOException { String fqn = getCurrentClassName(); if ( fqn != null && !fqn.equals(fullyQualifiedName)) { throw new RuntimeException("Ended different class: %s then was started %s". formatted(fullyQualifiedName, fqn)); } if (currentClass != null) { outputs.add(new NamedBinary(fullyQualifiedName, currentClass.toByteArray())); } super.finishClass(fullyQualifiedName); currentClass = null; } @Override public void printlns(String line) { try { currentClass.write((line + System.lineSeparator()).getBytes(StandardCharsets.UTF_8)); } catch (IOException ex) { throw new RuntimeException(ex); } } @Override public void prints(String line) { try { currentClass.write(line.getBytes(StandardCharsets.UTF_8)); } catch (IOException ex) { throw new RuntimeException(ex); } } @Override public void prints(char line) { currentClass.write(line); } @Override public void flush() { } @Override public String getName() { return "byte stream"; } public class NamedBinary { private final String fqn; private final byte[] body; public NamedBinary(String fqn, byte[] body) { this.fqn = fqn; this.body = body; } public String getFqn() { return fqn; } public byte[] getBody() { return body; } @Override public String toString() { return fqn + ": " + body.length + "b"; } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/EscapedPrintStreamOutput.java000066400000000000000000000036101514323636100331160ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs; import org.openjdk.asmtools.common.uEscWriter; import java.io.BufferedOutputStream; import java.io.DataOutputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.OutputStream; public class EscapedPrintStreamOutput extends PrintWriterOutput { private final OutputStream originalStream; public EscapedPrintStreamOutput(OutputStream os) { super(new uEscWriter(os)); this.originalStream = os; } @Override public DataOutputStream getDataOutputStream() throws FileNotFoundException { return new DataOutputStream(new BufferedOutputStream(originalStream)); } @Override public void finishClass(String fullyQualifiedName) throws IOException { super.finishClass(fullyQualifiedName); originalStream.flush(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/FSOutput.java000066400000000000000000000146621514323636100277020ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs; import org.openjdk.asmtools.common.Environment; import java.io.*; import java.nio.file.FileSystems; import java.nio.file.Paths; import java.util.Optional; /** * A concrete implementation of {@link NamedToolOutput} that writes output to a file system. * * @author Leonid Kuskov */ public class FSOutput extends NamedToolOutput { private FSDestination destination; private File dir; private File file; private FileOutputStream fos; private PrintWriter pw; private static final String fileSeparator = FileSystems.getDefault().getSeparator(); public FSOutput() { } @Override public boolean isReady() { return pw != null; } public FSOutput setFile(File dir, String file) { if (this.dir == null) this.dir = dir; destination = FSDestination.FILE; setDestinationFileName(file); return this; } public FSOutput setDir(File dir) { this.dir = dir; if (destination == null) { destination = FSDestination.DIR; } return this; } public File getDir() { return dir; } @Override public String toString() { String str = super.toString(); if (dir != null && file != null) { str.concat(dir != null ? dir.toString() : ""). concat(fileSeparator). concat(file != null ? file.toString() : ""); } return str; } @Override public void printlns(String line) { pw.println(line); } @Override public void prints(String line) { pw.print(line); } @Override public void prints(char line) { pw.print(line); } /** * Starts writing a new class file with the specified fully qualified name and optional file extension. * * @param fullyQualifiedName the fully qualified name of the class * @param fileExtension the optional file extension * @param environment the current environment * @throws IOException if an I/O error occurs */ @Override public void startClass(String fullyQualifiedName, Optional fileExtension, Environment environment) throws IOException { super.startClass(fullyQualifiedName, fileExtension, environment); String packageName, fileName; int index = fullyQualifiedName.lastIndexOf(fileSeparator); if (index != -1) { packageName = environment.isIgnorePackage() ? "" : fullyQualifiedName.substring(0, index); fileName = fullyQualifiedName.substring(index + 1); } else { packageName = ""; fileName = fullyQualifiedName; } /** * The destinationFileName is used to form the filename of the output. * 1. File FILENAME or class file CLASSNAME takes the highest priority. This filename cannot be overridden. * 2. Public class CLASSNAME { }– class name is CLASSNAME, and this CLASSNAME will be used to generate the filename (i.e., CLASSNAME.class). * 3. this_class – The filename will be CLASSNAME.class, but the class name will be this_class. * * Also, if the -f option is used and the number of processed class files is more than 1, * then destinationFileName will only apply to the first input file only. * For example, if you run jdis -w . -f FILE input.class input2.class, then in the output directory, * the files FILE.jasm and input2.jasm will be generated. */ String destinationFileName = this.getDestinationFileName(); if (destinationFileName != null) { fileName = destinationFileName + fileExtension.orElse(""); } else { fileName = fileName + fileExtension.orElse(""); } if (dir == null) { environment.traceln("writing to %s %s".formatted(packageName, fileName)); file = new File(packageName, fileName); } else { file = Paths.get(dir.getPath(), packageName, fileName).toFile(); environment.traceln(() -> "writing -d %s = \"%s\"".formatted(dir.getPath(), file.getAbsolutePath())); File outDir = new File(file.getParent()); if (!outDir.exists() && !outDir.mkdirs()) { environment.error("err.cannot.create", outDir.getPath()); return; } } fos = new FileOutputStream(file); pw = new PrintWriter(new OutputStreamWriter(fos)); } @Override public void finishClass(String fullyQualifiedName) throws IOException { super.finishClass(fullyQualifiedName); flush(); try { if (pw != null) { pw.close(); } } finally { if (fos != null) { fos.close(); } } } @Override public void flush() { if (fos != null) { try { fos.flush(); } catch (IOException ex) { throw new RuntimeException(ex); } } } @Override public DataOutputStream getDataOutputStream() throws FileNotFoundException { return new DataOutputStream(new BufferedOutputStream(fos)); } @Override public String getName() { return ( file !=null ) ? file.toString() : "file stream"; } public enum FSDestination { FILE, DIR; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/NamedToolOutput.java000066400000000000000000000064161514323636100312520ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs; import org.openjdk.asmtools.common.Environment; import java.io.IOException; import java.util.Optional; /** * Historically, the output loggers for compilers had two stderrs, one to stdout and second to stderr. * That should be removed, in favour of just dual stream tool output, printing output to stdout and log into stderr */ public abstract class NamedToolOutput implements ToolOutput { protected String fullyQualifiedName = ""; /** * If the output is a file, then the destinationFileName is used to form the filename of the output. * 1. File FILENAME or class file CLASSNAME takes the highest priority. This filename cannot be overridden. * 2. Public class CLASSNAME { }– class name is CLASSNAME, and this CLASSNAME will be used to generate the filename (i.e., CLASSNAME.class). * 3. this_class – The filename will be CLASSNAME.class, but the class name will be this_class. *

* Also, if the -f option is used and the number of processed class files is more than 1, * then destinationFileName will only apply to the first input file only. * For example, if you run jdis -w . -f FILE input.class input2.class, then in the output directory, * the files FILE.jasm and input2.jasm will be generated. */ protected String destinationFileName = null; private Optional suffix; private Environment environment; @Override public String getCurrentClassName() { return fullyQualifiedName; } @Override public void startClass(String fullyQualifiedName, Optional suffix, Environment logger) throws IOException { this.fullyQualifiedName = fullyQualifiedName; this.suffix = suffix; this.environment = logger; } @Override public void finishClass(String fullyQualifiedName) throws IOException { this.destinationFileName = null; this.fullyQualifiedName = null; } public String getDestinationFileName() { return destinationFileName; } public NamedToolOutput setDestinationFileName(String destinationFileName) { this.destinationFileName = destinationFileName; return this; } public abstract String getName(); } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/PrintWriterOutput.java000066400000000000000000000047721514323636100316640ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs; import org.openjdk.asmtools.common.NotImplementedException; import java.io.DataOutputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Writer; public class PrintWriterOutput extends NamedToolOutput { protected PrintWriter os; public PrintWriterOutput(OutputStream os) { //although it is usually System.out, it is set from Environment, or custom this.os = new PrintWriter(os, true); } public PrintWriterOutput(Writer os) { //although it is usually System.out, it is set from Environment, or custom this.os = new PrintWriter(os, true); } @Override public void printlns(String line) { os.println(line); } @Override public void prints(String line) { os.print(line); } @Override public void prints(char line) { os.print(line); } @Override public void finishClass(String fullyQualifiedName) throws IOException { super.finishClass(fullyQualifiedName); os.flush(); } @Override public void flush() { os.flush(); } @Override public DataOutputStream getDataOutputStream() throws FileNotFoundException { throw new NotImplementedException("Use EscapedPrintStreamOutput"); } @Override public String getName() { return "text-output stream"; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/StdoutOutput.java000066400000000000000000000002541514323636100306440ustar00rootroot00000000000000package org.openjdk.asmtools.common.outputs; public class StdoutOutput extends EscapedPrintStreamOutput { public StdoutOutput() { super(System.out); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/TextOutput.java000066400000000000000000000120621514323636100303060ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs; import org.openjdk.asmtools.common.Environment; import java.io.DataOutputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; import java.util.Optional; import java.util.function.BiFunction; import java.util.stream.Collectors; import static java.lang.String.format; public class TextOutput extends NamedToolOutput { // decoration for text output private BiFunction namedSourceOrnament; private final ArrayList outputs = new ArrayList<>(); private StringBuilder curClsStringBuilder; public ArrayList getOutputs() { return outputs; } @Override public String toString() { return outputs.stream().map(a -> a.toString()). collect(Collectors.joining(System.lineSeparator())); } @Override public DataOutputStream getDataOutputStream() throws FileNotFoundException { return null; //If you are here, you probably wanted ToolOutput.ByteOutput for assembled binary output } @Override public void startClass(String fullyQualifiedName, Optional suffix, Environment logger) throws IOException { super.startClass(fullyQualifiedName, suffix, logger); curClsStringBuilder = new StringBuilder(); } @Override public void finishClass(String fullyQualifiedName) throws IOException { String fqn = getCurrentClassName(); if (fqn != null && !fqn.equals(fullyQualifiedName)) { throw new RuntimeException("Ended with a different class: %s; then %s was started.". formatted(fullyQualifiedName, fqn)); } if (curClsStringBuilder != null) { outputs.add(new NamedSource(fullyQualifiedName, curClsStringBuilder.toString(), namedSourceOrnament)); } super.finishClass(fullyQualifiedName); curClsStringBuilder = null; } public TextOutput setNamedSourceOrnament(BiFunction namedSourceOrnament) { this.namedSourceOrnament = namedSourceOrnament; return this; } @Override public void printlns(String line) { curClsStringBuilder.append(line).append("\n"); } @Override public void prints(String line) { curClsStringBuilder.append(line); } @Override public void prints(char line) { curClsStringBuilder.append(line); } @Override public void flush() { } @Override public String getName() { return "string"; } public class NamedSource { // decoration for text output private BiFunction ornament = (fname, body) -> format( """ /** %s **/ %s /** %s **/ """, fname, body, fname); private final String fullyQualifiedName; private final String body; public NamedSource(String fullyQualifiedName, String body) { this.fullyQualifiedName = fullyQualifiedName; this.body = body; } public NamedSource(String fullyQualifiedName, String body, BiFunction ornament) { this.fullyQualifiedName = fullyQualifiedName; this.body = body; this.ornament = ornament; } public NamedSource setOrnament(BiFunction ornament) { this.ornament = ornament; return this; } public String getFullyQualifiedName() { return fullyQualifiedName; } public String getBody() { return body; } @Override public String toString() { return ornament == null ? body : ornament.apply(fullyQualifiedName, body); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/ToolOutput.java000066400000000000000000000050141514323636100302760ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs; import org.openjdk.asmtools.common.Environment; import java.io.*; import java.nio.charset.StandardCharsets; import java.util.Optional; /** * This class is a generic interface, symbolizing any output from jdis/jasm/jdec/jcoder. * Asmtools as application internally uses DirOutput and StdoutOutput (via EscapedPrintStreamOutput). * UnitTests for asmtools uses mainly ByteOutput for assemblers and TextOutput for disassemblers. *

* Text/Byte/EscapedPrintStream outputs can be used as any 3rd part code that does not need files, aka IDE, * instrumentation or similar. *

* The interface methods go in favor of asmtools, and for details and help see individual implementations */ public interface ToolOutput { DataOutputStream getDataOutputStream() throws FileNotFoundException; String getCurrentClassName(); void startClass(String fullyQualifiedName, Optional suffix, Environment logger) throws IOException; void finishClass(String fullyQualifiedName) throws IOException; void printlns(String line); void prints(String line); void prints(char line); void flush(); public static String exToString(Throwable e) { ByteArrayOutputStream out = new ByteArrayOutputStream(); e.printStackTrace(new PrintStream(out, true, StandardCharsets.UTF_8)); return new String(out.toByteArray(), StandardCharsets.UTF_8); } default boolean isReady() { return true; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/log/000077500000000000000000000000001514323636100260565ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/log/DualOutputStreamOutput.java000066400000000000000000000060751514323636100334340ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs.log; import org.openjdk.asmtools.common.outputs.PrintWriterOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; import java.io.IOException; import java.io.PrintStream; import java.io.PrintWriter; public class DualOutputStreamOutput extends NamedDualStreamToolOutput { protected PrintWriter os; protected PrintWriter es; public DualOutputStreamOutput() { this(System.out, System.err); } //todo, remove once tests asdapts public DualOutputStreamOutput(PrintWriter os, PrintWriter er) { this.os = os; this.es = er; } public DualOutputStreamOutput(PrintStream os, PrintStream er) { //although it is usually System.out, it is set from Environment, or custom this.os = new PrintWriter(os, true); //although it is usually System.err, it is set from Environment, or custom this.es = new PrintWriter(er, true); } @Override public void printlns(String line) { os.println(line); } @Override public void prints(String line) { os.print(line); } @Override public void prints(char line) { os.print(line); } @Override public void printlne(String line) { es.println(line); } @Override public void printe(String line) { es.print(line); } @Override public void printe(char line) { es.print(line); } @Override public void finishClass(String fqn) throws IOException { super.finishClass(fqn); try { os.flush(); } finally { es.flush(); } } @Override public void stacktrace(Throwable ex) { ex.printStackTrace(es); } @Override public ToolOutput getSToolObject() { return new PrintWriterOutput(os); } @Override public ToolOutput getEToolObject() { return new PrintWriterOutput(es); } @Override public void flush() { this.os.flush(); this.es.flush(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/log/DualStreamToolOutput.java000066400000000000000000000045271514323636100330510ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs.log; import org.openjdk.asmtools.common.NotImplementedException; import org.openjdk.asmtools.common.outputs.ToolOutput; import java.io.DataOutputStream; import java.io.FileNotFoundException; /** * This is special case of output - for log and trace outputs form compilation, not for bytecode/sources themselves. * Historically, asmtools had duals stream logger, where tracing was polluting stdout. * This logic is by default off, but can be turned on by secret switch if needed. * For application, although logging is still done in two streams, the log is united into stderr via StderrLog. * * UnitTest and 3rd party applications such as IDE or instrumentation providers s should be using unified StringLog. * * Once (if ever) the historical dependants on duality of log are removed, the logger should be simple and direct to a single buffer. */ public interface DualStreamToolOutput extends ToolOutput { void printlne(String line); void printe(String line); void printe(char line); void stacktrace(Throwable ex); ToolOutput getSToolObject(); ToolOutput getEToolObject(); @Override default DataOutputStream getDataOutputStream() throws FileNotFoundException { throw new NotImplementedException("Not going to happen"); } } NamedDualStreamToolOutput.java000066400000000000000000000034541514323636100337350ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/log/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs.log; import org.openjdk.asmtools.common.Environment; import java.io.IOException; import java.util.Optional; public abstract class NamedDualStreamToolOutput implements DualStreamToolOutput { private String fqn; private Optional suffix; private Environment environment; @Override public String getCurrentClassName() { return fqn; } @Override public void startClass(String fullyQualifiedName, Optional suffix, Environment logger) throws IOException { this.fqn = fullyQualifiedName; this.suffix = suffix; this.environment = logger; } @Override public void finishClass(String fqn) throws IOException { this.fqn = null; } } SingleDualOutputStreamOutput.java000066400000000000000000000026201514323636100345070ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/log/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs.log; import java.io.PrintStream; import java.io.PrintWriter; public class SingleDualOutputStreamOutput extends DualOutputStreamOutput { public SingleDualOutputStreamOutput(PrintWriter er) { super(er, er); } public SingleDualOutputStreamOutput(PrintStream er) { super(er, er); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/log/StderrLog.java000066400000000000000000000023261514323636100306310ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs.log; public class StderrLog extends SingleDualOutputStreamOutput { public StderrLog() { super(System.err); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/outputs/log/StringLog.java000066400000000000000000000043371514323636100306400ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.outputs.log; import org.openjdk.asmtools.common.outputs.ToolOutput; public class StringLog extends NamedDualStreamToolOutput { private final StringBuilder log = new StringBuilder(); @Override public String toString() { return log.toString(); } @Override public void printlns(String line) { log.append(line).append(System.lineSeparator()); } @Override public void prints(String line) { log.append(line); } @Override public void prints(char line) { log.append(line); } @Override public void flush() { } @Override public void printlne(String line) { log.append(line).append(System.lineSeparator()); } @Override public void printe(String line) { log.append(line); } @Override public void printe(char line) { log.append(line); } @Override public void stacktrace(Throwable ex) { log.append(ToolOutput.exToString(ex)); } @Override public ToolOutput getSToolObject() { return this; } @Override public ToolOutput getEToolObject() { return this; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/structure/000077500000000000000000000000001514323636100256125ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/structure/CFVersion.java000066400000000000000000000203671514323636100303230ustar00rootroot00000000000000/* * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.structure; import static org.openjdk.asmtools.common.structure.ClassFileContext.ORDINARY; import static org.openjdk.asmtools.common.structure.ClassFileContext.VALUE_OBJECTS; /* * Class File Version */ public class CFVersion { /** * Default versions of class file */ public static final int DEFAULT_MAJOR_VERSION = 45; public static final int DEFAULT_MINOR_VERSION = 3; public static final int DEFAULT_MODULE_MAJOR_VERSION = 53; public static final int DEFAULT_MODULE_MINOR_VERSION = 0; public static final int UNDEFINED_VERSION = -1; /* The version of a class file since which the compact format of stack map is necessary */ public static final int SPLIT_VERIFIER_CFV = 50; // Vlahalla: Value Classes and Objects public static final int VALUE_OBJECTS_MAJOR_VERSION = 69; public static final int VALUE_OBJECTS_MINOR_VERSION = 65535; private int major_version; private int minor_version; private int threshold_major_version; private int threshold_minor_version; private boolean frozen; // Whether is the CVF set as a tool parameter -cv? private boolean isSetByParameter; public CFVersion() { setVersion(UNDEFINED_VERSION, UNDEFINED_VERSION); threshold_major_version = UNDEFINED_VERSION; threshold_minor_version = UNDEFINED_VERSION; EModifier.setGlobalContext(ORDINARY); isSetByParameter = false; frozen = false; } public CFVersion(CFVersion other) { this.setVersion(other.major_version, other.minor_version); threshold_major_version = other.threshold_major_version; threshold_minor_version = other.threshold_minor_version; this.isSetByParameter = other.isSetByParameter; if (isValueObjectContext()) { EModifier.setGlobalContext(VALUE_OBJECTS); } else { EModifier.setGlobalContext(ORDINARY); } this.frozen = other.frozen; } public CFVersion(int major_version, int minor_version) { this.major_version = major_version; this.minor_version = minor_version; if (isValueObjectContext()) { EModifier.setGlobalContext(VALUE_OBJECTS); } else { EModifier.setGlobalContext(ORDINARY); } } public CFVersion setFrozen(boolean frozen) { this.frozen = frozen; return this; } public CFVersion setThreshold(int major_version, int minor_version) { this.threshold_major_version = major_version; this.threshold_minor_version = minor_version; return this; } public CFVersion setVersion(int major_version, int minor_version) { this.major_version = major_version; this.minor_version = minor_version; if (isValueObjectContext()) { EModifier.setGlobalContext(VALUE_OBJECTS); } return this; } public CFVersion setFileVersion(int major_version, int minor_version) { if (isSet() && isFrozen()) { if (isThresholdSet()) { if ((major_version < threshold_major_version) || (major_version == threshold_major_version && minor_version < threshold_minor_version)) { return this; } } else { return this; } } return setVersion(major_version, minor_version); } public CFVersion setMajorVersion(int major_version) { if (!frozen) { setVersion(major_version, this.minor_version); } return this; } public CFVersion setMinorVersion(int minor_version) { if (!frozen) { setVersion(this.major_version, minor_version); } return this; } public CFVersion setByParameter(boolean parameter) { isSetByParameter = parameter; return this; } public boolean isSet() { return major_version != UNDEFINED_VERSION && minor_version != UNDEFINED_VERSION; } public boolean isThresholdSet() { return threshold_major_version != UNDEFINED_VERSION && threshold_minor_version != UNDEFINED_VERSION; } public boolean isSetByParameter() { return this.isSetByParameter; } public boolean isFrozen() { return frozen; } public String asString() { return String.format("%s:%s", major_version == UNDEFINED_VERSION ? "(undef)" : major_version, minor_version == UNDEFINED_VERSION ? "(undef)" : minor_version); } public String asThresholdString() { return String.format("%s:%s-%s:%s", threshold_major_version == UNDEFINED_VERSION ? "(undef)" : threshold_major_version, threshold_minor_version == UNDEFINED_VERSION ? "(undef)" : threshold_minor_version, major_version == UNDEFINED_VERSION ? "(undef)" : major_version, minor_version == UNDEFINED_VERSION ? "(undef)" : minor_version ); } // A class file whose version number is 50.0 or above (§4.1) must be verified using the type checking rules given // in the section 4.10.1. Verification by Type Checking public boolean isTypeCheckingVerifier() { return isSet() ? major_version >= SPLIT_VERIFIER_CFV : false; } public CFVersion initModuleDefaultVersion() { if (!isSet()) { setVersion(DEFAULT_MODULE_MAJOR_VERSION, DEFAULT_MODULE_MINOR_VERSION); } return this; } public CFVersion initClassDefaultVersion() { if (!isSet()) { if (EModifier.GlobalContext() == VALUE_OBJECTS) { setVersion(VALUE_OBJECTS_MAJOR_VERSION, VALUE_OBJECTS_MINOR_VERSION); } else { setVersion(DEFAULT_MAJOR_VERSION, DEFAULT_MINOR_VERSION); } } return this; } public static CFVersion copyOf(CFVersion cfv) { CFVersion cfVersion = new CFVersion(cfv); return cfVersion; } public int minor_version() { return this.minor_version; } public int major_version() { return this.major_version; } public boolean isValueObjectContext() { return major_version > VALUE_OBJECTS_MAJOR_VERSION || (major_version == VALUE_OBJECTS_MAJOR_VERSION && minor_version == VALUE_OBJECTS_MINOR_VERSION); } public static boolean isValueObjectContext(int major_version, int minor_version) { return major_version > VALUE_OBJECTS_MAJOR_VERSION || (major_version == VALUE_OBJECTS_MAJOR_VERSION && minor_version == VALUE_OBJECTS_MINOR_VERSION); } public static CFVersion ValueObjectsVersion() { return new CFVersion(VALUE_OBJECTS_MAJOR_VERSION, VALUE_OBJECTS_MINOR_VERSION); } /** * Returns true if the class file version only supports Synthetic attribute and doesn't support the ACC_SYNTHETIC flag *

* When jasm processes files with classfile version <= 45, it shouldn't set the ACC_SYNTHETIC bit * but add the Synthetic attribute instead. The ACC_SYNTHETIC bit wasn't introduced until classfile version 46. * * @return true if only Synthetic attribute is supported, false otherwise */ public boolean isSyntheticAttributeContext() { return major_version <= 45; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/structure/ClassFileContext.java000066400000000000000000000050271514323636100316730ustar00rootroot00000000000000/* * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.structure; /** * Class File context CF_Context enums */ public enum ClassFileContext { NONE(0x0000, "n/a", false), CLASS(0x0001, "class", false), FIELD(0x0002, "field", false), METHOD(0x0004, "method", false), INNER_CLASS(0x0008, "inner-class", false), MODULE(0x0010, "module", false), REQUIRES(0x0020, "requires", false), EXPORTS(0x0040, "exports", false), OPENS(0x0080, "opens", false), METHOD_PARAMETERS(0x0100, "method parameters", false), MODULE_DIRECTIVES(0x0020 | 0x0040 | 0x0080, "module directives", false), ORDINARY(0x0200, "ordinary", true), VALUE_OBJECTS(0x0200, "value classes and objects", true); private final int id; private final String printVal; private final boolean globalContext; ClassFileContext(int id, String print, boolean globalContext) { this.id = id; this.printVal = print; this.globalContext = globalContext; } public int getID() { return id; } public String getName() { return printVal; } public boolean isGlobal() { return globalContext; } public boolean isOneOf(ClassFileContext... contexts) { for (ClassFileContext cfc : contexts) { if ((cfc.id & this.id) != 0) { return true; } } return false; } public boolean belongToContextOf(EModifier modifier) { return (this.id & modifier.getAllovedContextMask()) != 0; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/structure/EAttribute.java000066400000000000000000000160731514323636100305340ustar00rootroot00000000000000/* * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.structure; import org.openjdk.asmtools.jasm.ClassFileConst; import java.util.HashMap; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.*; /** * 4.7. Attributes */ public enum EAttribute { // Constant for JVMS ATT_Unrecognized(-1, "ATT_Unrecognized", "", CONSTANT_UNKNOWN), ATT_StackMap(1, "ATT_StackMap", "StackMap", CONSTANT_UNKNOWN), // Numbers correspond to VM spec (chapter 4.7.X) ATT_ConstantValue(2, "ATT_ConstantValue", "ConstantValue", CONSTANT_UTF8), ATT_Code(3, "ATT_Code", "Code", CONSTANT_UNKNOWN), ATT_StackMapTable(4, "ATT_StackMapTable", "StackMapTable", CONSTANT_UNKNOWN), ATT_Exceptions(5, "ATT_Exceptions", "Exceptions", CONSTANT_UNKNOWN), ATT_InnerClasses(6, "ATT_InnerClasses", "InnerClasses", CONSTANT_CLASS), ATT_EnclosingMethod(7, "ATT_EnclosingMethod", "EnclosingMethod", CONSTANT_CLASS), ATT_Synthetic(8, "ATT_Synthetic", "Synthetic", CONSTANT_UNKNOWN), ATT_Signature(9, "ATT_Signature", "Signature", CONSTANT_UTF8), ATT_SourceFile(10, "ATT_SourceFile", "SourceFile", CONSTANT_UTF8), ATT_SourceDebugExtension(11, "ATT_SourceDebugExtension", "SourceDebugExtension", CONSTANT_UTF8), ATT_LineNumberTable(12, "ATT_LineNumberTable", "LineNumberTable", CONSTANT_UNKNOWN), ATT_LocalVariableTable(13, "ATT_LocalVariableTable", "LocalVariableTable", CONSTANT_UNKNOWN), ATT_LocalVariableTypeTable(14, "ATT_LocalVariableTypeTable", "LocalVariableTypeTable", CONSTANT_UNKNOWN), ATT_Deprecated(15, "ATT_Deprecated", "Deprecated", CONSTANT_UNKNOWN), ATT_RuntimeVisibleAnnotations(16, "ATT_RuntimeVisibleAnnotations", "RuntimeVisibleAnnotations", CONSTANT_UNKNOWN), ATT_RuntimeInvisibleAnnotations(17, "ATT_RuntimeInvisibleAnnotations", "RuntimeInvisibleAnnotations", CONSTANT_UNKNOWN), ATT_RuntimeVisibleParameterAnnotations(18, "ATT_RuntimeVisibleParameterAnnotations", "RuntimeVisibleParameterAnnotations", CONSTANT_UNKNOWN), ATT_RuntimeInvisibleParameterAnnotations(19, "ATT_RuntimeInvisibleParameterAnnotations", "RuntimeInvisibleParameterAnnotations", CONSTANT_UNKNOWN), ATT_AnnotationDefault(20, "ATT_AnnotationDefault", "AnnotationDefault", CONSTANT_UNKNOWN), ATT_BootstrapMethods(21, "ATT_BootstrapMethods", "BootstrapMethods", CONSTANT_METHODHANDLE), ATT_RuntimeVisibleTypeAnnotations(22, "ATT_RuntimeVisibleTypeAnnotations", "RuntimeVisibleTypeAnnotations", CONSTANT_UNKNOWN), ATT_RuntimeInvisibleTypeAnnotations(23, "ATT_RuntimeInvisibleTypeAnnotations", "RuntimeInvisibleTypeAnnotations", CONSTANT_UNKNOWN), ATT_MethodParameters(24, "ATT_MethodParameters", "MethodParameters", CONSTANT_UTF8), ATT_Module(25, "ATT_Module", "Module", CONSTANT_MODULE), ATT_Version(26, "ATT_Version", "Version", CONSTANT_UTF8), ATT_TargetPlatform(27, "ATT_TargetPlatform", "TargetPlatform", CONSTANT_UTF8), ATT_MainClass(28, "ATT_MainClass", "MainClass", CONSTANT_CLASS), ATT_ModulePackages(29, "ATT_ModulePackages", "ModulePackages", CONSTANT_PACKAGE), ATT_ModuleMainClass(30, "ATT_ModuleMainClass", "ModuleMainClass", CONSTANT_CLASS), // ATT_ModuleTarget(31, "ATT_ModuleTarget", "ModuleTarget", CONSTANT_UNKNOWN), // JEP 181: class file 55.0 ATT_NestHost(32, "ATT_NestHost", "NestHost", CONSTANT_CLASS), ATT_NestMembers(33, "ATT_NestMembers", "NestMembers", CONSTANT_CLASS), // JEP 359 Record(Preview): class file 58.65535 // Record_attribute { // u2 attribute_name_index; // u4 attribute_length; // u2 components_count; // component_info components[components_count]; // } ATT_Record(34, "ATT_Record", "Record", CONSTANT_UTF8), // JEP 360 (Sealed types): class file 59.65535 // PermittedSubclasses_attribute { // u2 attribute_name_index; // u4 attribute_length; // u2 number_of_classes; // u2 classes[number_of_classes]; // } ATT_PermittedSubclasses(35, "ATT_PermittedSubclasses", "PermittedSubclasses", CONSTANT_CLASS), // Valhalla ATT_LoadableDescriptors(36, "ATT_LoadableDescriptors", "LoadableDescriptors", CONSTANT_CLASS); private final Integer value; private final String printVal; private final String parseKey; private final ClassFileConst.ConstType constType; private static HashMap parseKeyToTags; private static HashMap valueToTags; EAttribute(Integer value, String printValue, String parseKey, ClassFileConst.ConstType constType) { this.value = value; this.printVal = printValue; this.parseKey = parseKey; this.constType = constType; } public boolean isOneOf(EAttribute... attributes) { for (EAttribute attribute : attributes) { if (attribute == this) { return true; } } return false; } public String printValue() { return printVal; } public String parseKey() { return parseKey; } public ClassFileConst.ConstType getCPTypeOfIndex() { return constType; } public int value() { return value; } public static EAttribute get(int value) { if (valueToTags == null) { valueToTags = (HashMap) Stream. of(EAttribute.values()). collect(Collectors.toMap(EAttribute::value, Function.identity())); } EAttribute tg = valueToTags.get(value); if (tg == null) { tg = EAttribute.ATT_Unrecognized; } return tg; } public static EAttribute get(String parseKey) { if (parseKeyToTags == null) { parseKeyToTags = (HashMap) Stream. of(EAttribute.values()). collect(Collectors.toMap(EAttribute::parseKey, Function.identity())); } EAttribute tg = parseKeyToTags.get(parseKey); if (tg == null) { tg = EAttribute.ATT_Unrecognized; } return tg; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/structure/ELocation.java000066400000000000000000000031141514323636100303310ustar00rootroot00000000000000/* * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.structure; /** * Attribute location * Table 4.7-C. Predefined class file attributes (by location) */ public enum ELocation { unknown("Unknown"), class_file("ClassFile"), field_info("field_info"), method_info("method_info"), record_component_info("record_component_info"), code_atribute("Code"); public String getDescription() { return description; } private final String description; ELocation(String description) { this.description = description; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/structure/EModifier.java000066400000000000000000000477421514323636100303360ustar00rootroot00000000000000/* * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.structure; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.Set; import static org.openjdk.asmtools.common.structure.ClassFileContext.*; /** * 4. The class File Format *

* The enum contains all JVMS (class, field, method, nested class, module and module statements) accesses and modifiers * taken from tables 4.1-A, 4.1-B, 4.5-A, 4.6-A, 4.7.6-A, 4.7.25 etc according to their context @see EClassFileContext */ public enum EModifier { ACC_NONE(0x0000, "", NONE), // <> ACC_PUBLIC(0x0001, "public", CLASS, INNER_CLASS, FIELD, METHOD), ACC_PRIVATE(0x0002, "private", INNER_CLASS, FIELD, METHOD), ACC_PROTECTED(0x0004, "protected", INNER_CLASS, FIELD, METHOD), ACC_STATIC(0x0008, "static", INNER_CLASS, FIELD, METHOD), ACC_FINAL(0x0010, "final", CLASS, INNER_CLASS, FIELD, METHOD, METHOD_PARAMETERS), ACC_SUPER(0x0020, "super", CLASS), ACC_IDENTITY(0x0020, "identity", CLASS, INNER_CLASS, VALUE_OBJECTS), // Value Classes and Objects ACC_VALUE(0x0000, "value", CLASS, INNER_CLASS, VALUE_OBJECTS), // Value Classes and Objects ACC_TRANSITIVE(0x0020, "transitive", REQUIRES), ACC_SYNCHRONIZED(0x0020, "synchronized", METHOD), ACC_OPEN(0x0020, "open", MODULE), ACC_VOLATILE(0x0040, "volatile", FIELD), ACC_BRIDGE(0x0040, "bridge", METHOD), ACC_STATIC_PHASE(0x0040, "static", REQUIRES), ACC_TRANSIENT(0x0080, "transient", FIELD), ACC_VARARGS(0x0080, "varargs", METHOD), ACC_NATIVE(0x0100, "native", METHOD), ACC_INTERFACE(0x0200, "interface", CLASS, INNER_CLASS), ACC_ABSTRACT(0x0400, "abstract", CLASS, INNER_CLASS, METHOD), ACC_STRICT(0x0800, "strict", METHOD, FIELD, VALUE_OBJECTS), // FIELD added for VALUE_OBJECTS CONTEXT ACC_SYNTHETIC(0x1000, "synthetic", CLASS, INNER_CLASS, FIELD, METHOD, MODULE, REQUIRES, EXPORTS, OPENS, METHOD_PARAMETERS), ACC_ANNOTATION(0x2000, "annotation", CLASS, INNER_CLASS), ACC_ENUM(0x4000, "enum", CLASS, INNER_CLASS, FIELD), ACC_MODULE(0x8000, "module", CLASS), ACC_MANDATED(0x8000, "mandated", MODULE, REQUIRES, EXPORTS, OPENS, METHOD_PARAMETERS), SYNTHETIC_ATTRIBUTE(0x00010000, "Synthetic(Pseudo)", CLASS, INNER_CLASS, FIELD, METHOD), DEPRECATED_ATTRIBUTE(0x00020000, "Deprecated(Pseudo)", CLASS, INNER_CLASS, FIELD, METHOD), VALUE_OBJECTS_ATTRIBUTE(0x010000000, "ValueObjects(Pseudo)", CLASS, INNER_CLASS, FIELD); // Method access and property flags (Table 4.6-A) public static final EModifier[] MM_METHOD = {ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SYNCHRONIZED, ACC_BRIDGE, ACC_VARARGS, ACC_NATIVE, ACC_ABSTRACT, ACC_SYNTHETIC, ACC_STRICT }; // Valhalla SPECIFIC // Class access and property modifiers (Table 4.1-A) public static final EModifier[] MM_CLASS = {ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_FINAL, ACC_SUPER, ACC_IDENTITY, ACC_INTERFACE, ACC_ABSTRACT, ACC_SYNTHETIC, ACC_ANNOTATION, ACC_ENUM, ACC_MODULE}; // Valid interface flags. public static final EModifier[] MM_INTERFACE = {ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_INTERFACE, ACC_ABSTRACT, ACC_SYNTHETIC, ACC_ANNOTATION}; // Field access and property flags (Table 4.5-A) public static final EModifier[] MM_FIELD = {ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_VOLATILE, ACC_TRANSIENT, ACC_SYNTHETIC, ACC_ENUM, ACC_STRICT}; // Valhalla SPECIFIC // Abstract method public static final EModifier[] MM_ABSTRACT_METHOD = {ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_BRIDGE, ACC_VARARGS, ACC_ABSTRACT, ACC_SYNTHETIC}; // , method public static final EModifier[] MM_INIT_METHOD = {ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_VARARGS, ACC_SYNTHETIC, ACC_STRICT, ACC_STATIC}; // Nested class access and property flags (Table 4.7.6-A) public static final EModifier[] MM_NESTED_CLASS = {ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_INTERFACE, ACC_ABSTRACT, ACC_SYNTHETIC, ACC_ANNOTATION, ACC_ENUM}; // Interface method private static final EModifier[] MM_INTERFACE_METHOD = {ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_BRIDGE, ACC_VARARGS, ACC_ABSTRACT, ACC_STRICT, ACC_SYNTHETIC}; private static final EModifier[] MM_MODULE = {ACC_OPEN, ACC_SYNTHETIC, ACC_MANDATED}; private static final EModifier[] MM_MODULE_REQUIRES = {ACC_TRANSITIVE, ACC_STATIC_PHASE, ACC_SYNTHETIC, ACC_MANDATED}; private static final EModifier[] MM_MODULE_EXPORTS = {ACC_SYNTHETIC, ACC_MANDATED}; private static final EModifier[] MM_MODULE_OPENS = {ACC_SYNTHETIC, ACC_MANDATED}; // ToString converters public static String NAMES_DELIMITER = ", "; public static String NAMES_SUFFIX = ""; public static String KEYWORDS_DELIMITER = " "; public static String KEYWORDS_SUFFIX = " "; private final int flag; private final String keyword; private final Set contexts; private int contextMask = 0; // Externally changed switchers private static ClassFileContext globalContext = ORDINARY; EModifier(int flag, String keyword, ClassFileContext... contexts) { this.flag = flag; this.keyword = keyword; this.contexts = new HashSet<>(10); if (contexts != null) { for (ClassFileContext c : contexts) { this.contexts.add(c); contextMask |= c.getID(); } } } public static void setGlobalContext(ClassFileContext globalContext) { EModifier.globalContext = globalContext; } public static ClassFileContext GlobalContext() { return EModifier.globalContext; } // Wrappers public static boolean isPublic(int flags) { return (flags & ACC_PUBLIC.flag) != 0; } public static boolean isPrivate(int flags) { return (flags & ACC_PRIVATE.flag) != 0; } public static boolean isProtected(int flags) { return (flags & ACC_PROTECTED.flag) != 0; } public static boolean isStatic(int flags) { return (flags & ACC_STATIC.flag) != 0; } public static boolean isFinal(int flags) { return (flags & ACC_FINAL.flag) != 0; } public static boolean isTransitive(int flags) { return isFinal(flags); } public static boolean isSuper(int flags) { return (flags & ACC_SUPER.flag) != 0; } public static boolean isSynchronized(int flags) { return isSuper(flags); } public static boolean isVolatile(int flags) { return (flags & ACC_VOLATILE.flag) != 0; } public static boolean isBridge(int flags) { return isVolatile(flags); } public static boolean isStaticPhase(int flags) { return isVolatile(flags); } public static boolean isTransient(int flags) { return (flags & ACC_TRANSIENT.flag) != 0; } public static boolean isVarArgs(int flags) { return isTransient(flags); } public static boolean isNative(int flags) { return (flags & ACC_NATIVE.flag) != 0; } public static boolean isInterface(int flags) { return (flags & ACC_INTERFACE.flag) != 0; } public static boolean isAbstract(int flags) { return (flags & ACC_ABSTRACT.flag) != 0; } public static boolean isStrict(int flags) { return (flags & ACC_STRICT.flag) != 0; } public static int getNotPermitted(int flags, EModifier[] set) { int notPermitted = 0; for (EModifier mod : set) { if ((flags & mod.flag) != 0) { flags &= ~mod.flag; ClassFileContext context = mod.getGlobalContext(); if( globalContext != context && context != ORDINARY) { notPermitted |= mod.flag; } } } notPermitted |= flags; return notPermitted; } public ClassFileContext getGlobalContext() { for (ClassFileContext c : contexts) { if (c.isGlobal()) { return c; } } return ORDINARY; } public static boolean isSynthetic(int flags) { return (flags & ACC_SYNTHETIC.flag) != 0; } public static boolean isAnnotation(int flags) { return (flags & ACC_ANNOTATION.flag) != 0; } public static boolean isEnum(int flags) { return (flags & ACC_ENUM.flag) != 0; } public static boolean isModule(int flags) { return (flags & ACC_MODULE.flag) != 0; } public static boolean isMandated(int flags) { return isModule(flags); } public static boolean isSyntheticPseudoMod(int flags) { return (flags & SYNTHETIC_ATTRIBUTE.flag) != 0; } public static boolean isDeprecatedPseudoMod(int flags) { return (flags & DEPRECATED_ATTRIBUTE.flag) != 0; } // Value Classes and Objects public static boolean isValueObjects(int flags) { return (flags & VALUE_OBJECTS_ATTRIBUTE.flag) != 0; } public static boolean isIdentity(int flags) { return (flags & ACC_IDENTITY.flag) != 0; } public static boolean hasPseudoMod(int flags) { return isSyntheticPseudoMod(flags) || isDeprecatedPseudoMod(flags); } /* * Check that only one flag is set */ public static boolean onlyOneOfFlags(int flag, EModifier... modifiers) { if (modifiers.length >= 2) { final int mask = flag & getFlags(modifiers); return Arrays.stream(modifiers).mapToInt(EModifier::getFlag).anyMatch(f -> (f | mask) == f); } return modifiers.length != 0 && flag == modifiers[0].getFlag(); } /* * Check that at least one flag is set */ public static boolean anyOf(int flag, EModifier... modifiers) { if (modifiers.length > 0) { return (flag & getFlags(modifiers)) != 0; } return false; } public static int cleanFlags(int flag, EModifier... modifiers) { if (modifiers.length > 0) { for (EModifier m : modifiers) { flag &= ~m.flag; } } return flag; } /* * Are both flags set? */ public static boolean both(int flags, EModifier modifierA, EModifier modifierB) { final int bothFlags = modifierA.getFlag() | modifierB.getFlag(); return (flags & bothFlags) == bothFlags; } /* * Is more than one flag set in the list? */ public static boolean moreThanOne(int flags, EModifier... modifiers) { int count = 0; for (EModifier m : modifiers) { if( (flags & m.flag) != 0) { count++; } } return count > 1; } /* * Check that there are no other modifiers in flags except given. */ public static boolean noFlagsExcept(int flags, EModifier... modifiers) { return (flags & getFlags(modifiers)) == flags; } public static int getFlags(EModifier... modifiers) { int flag = 0; if (modifiers.length > 0) { for (EModifier m : modifiers) { flag |= m.flag; } } return flag; } public static int getFlags(ClassFileContext context, EModifier... modifiers) { int flag = 0; if (modifiers.length == 0) { modifiers = EModifier.values(); } for (EModifier m : modifiers) { if (m.contexts.contains(context)) { flag |= m.flag; } } return flag; } private static int addTo(ArrayList list, int flags, boolean isName, EModifier modifier) { list.add(isName ? modifier.getFlagName() : modifier.getJavaFlagModifier()); return clearIfSet(flags, modifier); } public static String asKeywords(int modifiers, ClassFileContext context) { return flagsToString(modifiers, false, context, KEYWORDS_DELIMITER, KEYWORDS_SUFFIX); } public static String asNames(int modifiers, ClassFileContext context) { return flagsToString(modifiers, true, context, NAMES_DELIMITER, NAMES_SUFFIX); } private static String flagsToString(int modifiers, boolean isName, ClassFileContext context, String delimiter, String suffix) { String s = String.join(delimiter, flagsToList(modifiers, isName, context)); return s.isBlank() ? "" : s + suffix; } /** * Get either a keyword or a name of a flags according to the context. * * @param flags the flags to choose the corresponding names or keywords. * @param isName either the JVMS modifier names or JLS keywords are selected * @param context the entity for which the names/keywords are selected * @return the List of the names or the keywords according to the parameter isName */ private static ArrayList flagsToList(int flags, boolean isName, ClassFileContext context) { ArrayList list = new ArrayList<>(); // run through all access flags if (isPublic(flags) && context.belongToContextOf(ACC_PUBLIC)) { flags = addTo(list, flags, isName, ACC_PUBLIC); } if (isPrivate(flags) && context.belongToContextOf(ACC_PRIVATE)) { flags = addTo(list, flags, isName, ACC_PRIVATE); } if (isProtected(flags) && context.belongToContextOf(ACC_PROTECTED)) { flags = addTo(list, flags, isName, ACC_PROTECTED); } // ACC_STATIC if (isStatic(flags) && context.belongToContextOf(ACC_STATIC)) { // Static CLASS doesn't exist. Only INNER_CLASS, FIELD, METHOD can have this modifier. flags = addTo(list, flags, isName, ACC_STATIC); } // ACC_FINAL if (isFinal(flags) && context.isOneOf(CLASS, INNER_CLASS, FIELD, METHOD, METHOD_PARAMETERS)) { flags = addTo(list, flags, isName, ACC_FINAL); } // ACC_TRANSITIVE ACC_SUPER ACC_SYNCHRONIZED ACC_OPEN if (isSuper(flags)) { // == isTransitive(flags) == isSynchronized(flags) == isOpen(flags) switch (context) { case CLASS -> { // In Java SE 8, the ACC_SUPER semantics became mandatory, // regardless of the setting of ACC_SUPER or the class file version number, // and the flags no longer had any effect. // still we have to keep it in here (if it was here), as if the new class is used for hotswap, it s absence would casue // java.lang.UnsupportedOperationException: class redefinition failed: attempted to change the class modifiers flags = addTo(list, flags, isName, (globalContext == VALUE_OBJECTS) ? ACC_IDENTITY : ACC_SUPER); } case INNER_CLASS -> { if(globalContext == VALUE_OBJECTS) { flags = addTo(list, flags, isName, ACC_IDENTITY); } } case REQUIRES -> flags = addTo(list, flags, isName, ACC_TRANSITIVE); case METHOD -> flags = addTo(list, flags, isName, ACC_SYNCHRONIZED); case MODULE -> flags = addTo(list, flags, isName, ACC_OPEN); } } // ACC_VOLATILE ACC_BRIDGE ACC_STATIC_PHASE ACC_PERMITS_VALUE if (isVolatile(flags)) { // == isBridge(flags) ==isStaticPhase(flags) == isPermitsValue(flags) switch (context) { case FIELD -> flags = addTo(list, flags, isName, ACC_VOLATILE); case METHOD -> flags = addTo(list, flags, isName, ACC_BRIDGE); case REQUIRES -> flags = addTo(list, flags, isName, ACC_STATIC_PHASE); } } // ACC_TRANSIENT ACC_VARARGS if (isTransient(flags)) { // == isVarArgs(flags) switch (context) { case FIELD -> flags = addTo(list, flags, isName, ACC_TRANSIENT); case METHOD -> flags = addTo(list, flags, isName, ACC_VARARGS); } } // ACC_NATIVE ACC_VALUE if (isNative(flags)) { // == isValue(flags) switch (context) { case METHOD -> flags = addTo(list, flags, isName, ACC_NATIVE); } } // ACC_INTERFACE if (isInterface(flags) && context.isOneOf(CLASS, INNER_CLASS)) { if (isName) { flags = addTo(list, flags, true, ACC_INTERFACE); } else { flags = clearIfSet(flags, ACC_INTERFACE); } } // ACC_ABSTRACT if (isAbstract(flags) && context.isOneOf(CLASS, INNER_CLASS, METHOD)) { flags = addTo(list, flags, isName, ACC_ABSTRACT); } // ACC_STRICT if (isStrict(flags)) { switch (context) { case METHOD -> flags = addTo(list, flags, isName, ACC_STRICT); case FIELD -> { if (globalContext == VALUE_OBJECTS) { flags = addTo(list, flags, isName, ACC_STRICT); } } } } // ACC_SYNTHETIC if (isSynthetic(flags) && context.belongToContextOf(ACC_SYNTHETIC)) { flags = addTo(list, flags, isName, ACC_SYNTHETIC); } // ACC_ANNOTATION if (isAnnotation(flags) && context.isOneOf(CLASS, INNER_CLASS)) { flags = addTo(list, flags, isName, ACC_ANNOTATION); } // ACC_ENUM if (isEnum(flags) && context.isOneOf(CLASS, INNER_CLASS, FIELD)) { flags = addTo(list, flags, isName, ACC_ENUM); } // ACC_MODULE ACC_MANDATED if (isModule(flags)) { // == isMandated(flags) if (context == CLASS) { if (isName) { flags = addTo(list, flags, true, ACC_MODULE); } else { flags = clearIfSet(flags, ACC_MODULE); } } else if (context.isOneOf(MODULE, REQUIRES, EXPORTS, OPENS, METHOD_PARAMETERS)) { flags = addTo(list, flags, isName, ACC_MANDATED); } } if (flags != 0) { list.add(String.format("0x%04X", flags)); } return list; } private static int clearIfSet(int flag, EModifier... modifiers) { for (EModifier m : modifiers) { if ((flag & m.flag) != 0) { flag &= ~m.flag; } } return flag; } public Set getClassFileContext() { return contexts; } public int getAllovedContextMask() { return contextMask; } public int getFlag() { return flag; } public String getJavaFlagModifier() { return keyword; } public String getFlagName() { return this.toString(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/structure/StackMap.java000066400000000000000000000234451514323636100301700ustar00rootroot00000000000000/* * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common.structure; import org.openjdk.asmtools.asmutils.FormatConsumer; import org.openjdk.asmtools.asmutils.Range; import java.util.Arrays; import java.util.HashMap; import java.util.Optional; import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; /** * 4.7.4. The StackMapTable Attribute */ public class StackMap { /** * @param verificationTypeID u1 tag * @param errorConsumer consumer to announce a problem * @return associated StackMap Verification Type */ public static VerificationType getVerificationType(int verificationTypeID, Optional> errorConsumer) { if (VerificationType.isValidVerificationType(verificationTypeID)) { return VerificationType.get(verificationTypeID); } else { errorConsumer.ifPresent(c -> c.format("error.stackmap.unknown.type", verificationTypeID)); return VerificationType.ITEM_UNKNOWN; } } public static VerificationType getVerificationType(String printName) { return VerificationType.getByPrintName(printName); } /** * Get Entry Type by tag belonging the range * * @param tag u1 tag in range * @return */ public static EntryType stackMapEntryType(int tag) { EntryType entryType; entryType = EntryType.getByTag(tag); return entryType; } /** * Get frame type id by a name * * @param frameTypeName frame type name * @return Stack FrameType tag [0..255] */ public static int getFrameTypeTagByName(String frameTypeName) { return EntryType.getByTagName(frameTypeName).fromTag(); } /** * Get entry type id by a name * * @param entryTypeName entry type name * @return Stack FrameType tag [0..255] */ public static EntryType getEntryTypeByName(String entryTypeName) { return EntryType.getByTagName(entryTypeName); } /** * Checks if the tag belongs to range of valid Frame Types * * @param tag * @return true if the tag does not belong to a range either of UNKNOWN_TYPE or RESERVED */ public static boolean isValidEntryType(int tag) { return EntryType.isValid(tag); } /** * MapTypes table. These constants are used in stackmap pseudo-instructions only. */ public enum VerificationType { /* Type codes for StackMap attribute */ ITEM_UNKNOWN(-1, "??? Unknown verification type", "UNKNOWN"), // placeholder for wrong types ITEM_Bogus(0, "bogus", "B"), // an unknown or uninitialized value ITEM_Integer(1, "int", "I"), // a 32-bit integer ITEM_Float(2, "float", "F"), // not used ITEM_Double(3, "double", "D"), // not used ITEM_Long(4, "long", "L"), // a 64-bit integer ITEM_Null(5, "null", "N"), // the type of null ITEM_InitObject(6, "this", "IO"), // "this" in constructor ITEM_Object(7, "CP", "O"), // followed by 2-byte index of class name ITEM_NewObject(8, "at", "NO"); // followed by 2-byte ref to "new" private static HashMap printNameToType; private static HashMap parseKeyToType; private static HashMap tagToType; private final String printName; private final String parseKey; private Integer tag; VerificationType(Integer tag, String printName, String parseKey) { this.tag = tag; this.printName = printName; this.parseKey = parseKey; } static boolean isValidVerificationType(int tag) { return tag >= ITEM_Bogus.tag && tag <= ITEM_NewObject.tag; } public static VerificationType getByPrintName(String printName) { if (printNameToType == null) { printNameToType = (HashMap) Arrays.stream(VerificationType.values()). collect(Collectors.toMap(VerificationType::printName, Function.identity())); } return printNameToType.get(printName); } public static VerificationType getByParseKey(String parseKey) { if (parseKeyToType == null) { parseKeyToType = (HashMap) Arrays.stream(VerificationType.values()). collect(Collectors.toMap(VerificationType::parseKey, Function.identity())); } VerificationType verificationType = parseKeyToType.get(parseKey); return verificationType == null ? VerificationType.ITEM_UNKNOWN : verificationType; } public static VerificationType get(int tag) { if (tagToType == null) { tagToType = (HashMap) Arrays.stream(VerificationType.values()). collect(Collectors.toMap(VerificationType::tag, Function.identity())); } return tagToType.get(tag); } public String parseKey() { return this.parseKey; } public String printName() { return this.printName; } public Integer tag() { return this.tag; } } /** * StackMap-FrameType table. These constants are used in stackmap pseudo-instructions * only. */ public enum EntryType { UNKNOWN_TYPE(-1, -1, "unknown", false, false, false), // placeholder for wrong frame types /* Type codes for StackMapFrame attribute */ SAME_FRAME(0, 63, "same", false, false, false), SAME_LOCALS_1_STACK_ITEM_FRAME(64, 127, "stack1", false, true, false), RESERVED(128, 245, "reserved", false, false, false), EARLY_LARVAL(246, 246, "early_larval", false, false, true), SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED(247, 247, "stack1_ex", false, true, false), CHOP_1_FRAME(250, 250, "chop1", false, false, false), CHOP_2_FRAME(249, 249, "chop2", false, false, false), CHOP_3_FRAME(248, 248, "chop3", false, false, false), SAME_FRAME_EXTENDED(251, 251, "same_ex", false, false, false), APPEND_FRAME(252, 254, "append", true, false, false), FULL_FRAME(255, 255, "full", true, true, false); private static HashMap tagNameToFrameType; private final Range tagRange; private final String tagName; private final boolean localMap; private final boolean stackMap; private final boolean fields; EntryType(int from, int to, String tagName, boolean localMap, boolean stackMap, boolean fields) { this.tagRange = new Range<>(from, to); this.tagName = tagName; this.localMap = localMap; this.stackMap = stackMap; this.fields = fields; } public boolean hasLocalMap() { return localMap; } public boolean hasStackMap() { return stackMap; } public boolean hasFields() { return fields; } public static EntryType getByTagName(String tagName) { if (tagNameToFrameType == null) { tagNameToFrameType = (HashMap) Arrays.stream(EntryType.values()). collect(Collectors.toMap(EntryType::tagName, Function.identity())); } EntryType type = tagNameToFrameType.get(tagName); return type == null ? EntryType.UNKNOWN_TYPE : type; } public static EntryType getByTag(int tag) { for (EntryType type : EntryType.values()) { if (type.inRange(tag)) { return type; } } return EntryType.UNKNOWN_TYPE; } public int fromTag() { return tagRange.from(); } public String tagName() { return tagName; } public String printName() { String buf = this.name().toLowerCase().replace("_frame", ""); return buf.startsWith("chop") ? tagName : buf; } public boolean inRange(int tag) { return tagRange.in(tag); } /** * Checks if the tag belongs to range of valid Frame Types * * @param tag * @return true if the tag does not belong to a range either of UNKNOWN_TYPE or RESERVED */ public static boolean isValid(int tag) { for (EntryType entryType : Set.of(UNKNOWN_TYPE, RESERVED)) { if (entryType.inRange(tag)) return false; } return true; } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/common/uEscWriter.java000066400000000000000000000035001514323636100265070ustar00rootroot00000000000000/* * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import java.nio.charset.StandardCharsets; public class uEscWriter extends Writer { static final char[] hexTable = "0123456789ABCDEF".toCharArray(); OutputStream out; byte[] tmpl; public uEscWriter(OutputStream out) { this.out = out; tmpl = new byte[6]; tmpl[0] = (byte) '\\'; tmpl[1] = (byte) 'u'; } @Override public synchronized void write(char[] cc, int ofs, int len) throws IOException { byte[] b = String.copyValueOf(cc, ofs, len).getBytes(StandardCharsets.UTF_8); out.write(b, ofs, b.length); } @Override public void flush() { } @Override public void close() { } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/i18n.properties000066400000000000000000000046521514323636100251660ustar00rootroot00000000000000# Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. main.usage=\ Usage: java -jar {0} run jasm, jdis, jcoder, or jdec tool\n\ \ or: java -jar {0} -?|-h|-help print Help (this message) and exit\n\ \ or: java -jar {0} -version print version information and exit\n\ use -dls switch to return the ancient dual stream logging\n main.error.no_arguments=No arguments provided! See options above. main.error.unknown_tool=Tool name \"{0}\" unrecognized. See the usage above for possible tool choices. # shared strings err.does_not_exist=The output directory \"{0}\" does not exist err.d_requires_argument=-d requires argument err.f_requires_argument=-f requires argument info.opt.d=\ \ -d Specify where to place generated class files, otherwise info.opt.w=\ \ -w Specify where to place generated class files, without considering the classpath, otherwise info.opt.v=\ \ -v Print additional information info.opt.t=\ \ -t Print debug, trace information info.opt.version=\ \ -version Print the program version main.error.wrong.utf8=The bytes do not represent a valid modified UTF-8 encoding of a Unicode string. main.error.wrong.bytes=Corrupted class file. The bytes do not represent a valid class attribute. error.stackmap.unknown.type=Unknown StackMapTable verification type {0} jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/000077500000000000000000000000001514323636100232145ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/AnnotationData.java000066400000000000000000000064101514323636100267640ustar00rootroot00000000000000/* * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; import java.util.ArrayList; import java.util.stream.IntStream; /** * JVMS 4.7.16. * * annotation { * u2 type_index; * u2 num_element_value_pairs; * { u2 element_name_index; * element_value value; * } element_value_pairs[num_element_value_pairs]; * } */ class AnnotationData implements ConstantPoolDataVisitor { boolean invisible; Indexer typeCPX; ArrayList elemValuePairs; @Override public T visit(ConstantPool pool) { for( ElemValuePair pair : elemValuePairs ) { pair.visit(pool); } return (T) this; } /** * AnnotationElemValue * * Used to store Annotation Data */ static public class ElemValuePair implements ConstantPoolDataVisitor { ConstCell name; DataWriter value; public ElemValuePair(ConstCell name, DataWriter value) { this.name = name; this.value = value; } @Override public void write(CheckedDataOutputStream out) throws IOException { name.write(out); value.write(out); } @Override public int getLength() { return 2 + value.getLength(); } @Override public T visit(ConstantPool pool) { this.name = visitConstCell(this.name, pool); this.value = visitData(this.value, pool); return (T) this; } } public AnnotationData(Indexer typeCPX, boolean invisible) { this.typeCPX = typeCPX; this.elemValuePairs = new ArrayList<>(); this.invisible = invisible; } public void add(ElemValuePair elemValuePair) { elemValuePairs.add(elemValuePair); } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(typeCPX.cpIndex); out.writeShort(elemValuePairs.size()); for (DataWriter pair : elemValuePairs) { pair.write(out); } } @Override public int getLength() { return 4 + elemValuePairs.stream().flatMapToInt(elem-> IntStream.of(elem.getLength())).sum(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ArrayAttr.java000066400000000000000000000052001514323636100257650ustar00rootroot00000000000000/* * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * Base class of the "classes/descriptors[]" data of attributes *

* JEP 181 (Nest-based Access Control): class file 55.0 * NestMembers_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_classes; * u2 classes[number_of_classes]; * } *

* JEP 360 (Sealed types): class file 59.65535 * PermittedSubclasses_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_classes; * u2 classes[number_of_classes]; * } *

* Valhalla: * LoadableDescriptors_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_descriptors; * u2 descriptors[number_of_descriptors]; * } */ public class ArrayAttr extends AttrData { List cells = new ArrayList<>(); public ArrayAttr(ConstantPool pool, EAttribute attribute, List constCellList) { super(pool, attribute); for (ConstCell cell : constCellList) { this.cells.add(classifyConstCell(pool, cell)); } } public int size() { return cells.size(); } @Override public int attrLength() { return 2 + cells.size() * 2; } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); out.writeShort(cells.size()); for (ConstCell c : cells) { out.writeShort(c.cpIndex); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/AttrData.java000066400000000000000000000103431514323636100255640ustar00rootroot00000000000000/* * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import java.io.IOException; import java.util.Optional; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.*; /** * AttrData *

* AttrData is the base class for many attributes (or parts of attributes), and it is * instantiated directly for simple attributes (like Synthetic or Deprecated). */ class AttrData implements ConstantPoolDataVisitor { private final EAttribute attribute; private final ConstCell attributeNameConstantCell; AttrData(ConstantPool pool, EAttribute attribute) { this.attribute = attribute; this.attributeNameConstantCell = pool.findUTF8Cell(attribute.parseKey()); } @Override public T visit(ConstantPool pool) { if (this instanceof CPXAttr cpxAttr) { final ConstCell cell = cpxAttr.cell; if (! cell.isSet()) { if (cell.getType() == CONSTANT_STRING) { if (attribute.getCPTypeOfIndex() == CONSTANT_UTF8) { Optional> strCell = pool.ConstantPoolHashByValue.values().stream(). filter(v -> v.isSet() && v.getType() == CONSTANT_STRING && v.equalsByValue(cell)). findFirst(); cpxAttr.cell = strCell.isPresent() ? strCell.get() : pool.findCell(new ConstantPool.ConstValue_String((ConstCell) cell.ref.value)); } } } } return (T) this; } protected ConstCell classifyConstCell(ConstantPool pool, ConstCell cell) { switch (cell.getType()) { case CONSTANT_CLASS -> { return cell; } case CONSTANT_UTF8 -> { if( attribute.getCPTypeOfIndex() == CONSTANT_CLASS ) { Optional> clsCell = pool.ConstantPoolHashByValue.values().stream(). filter(v -> v.getType() == CONSTANT_CLASS && v.ref.value.equals(cell)). findAny(); if (clsCell.isPresent()) { return clsCell.get(); } else { // create class cell referencing to UTF8 return pool.findCell(new ConstantPool.ConstValue_Class((ConstCell) cell)); } } } default -> { // no action } } return cell; } // full length of the attribute // declared in Data @Override public int getLength() { return 6 + attrLength(); } // subclasses must redefine this public int attrLength() { return 0; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(attributeNameConstantCell.cpIndex); out.writeInt(attrLength()); // attribute length } public EAttribute getAttribute() { return attribute; } } // end class AttrData jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/BootstrapMethodData.java000066400000000000000000000105411514323636100277700ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; class BootstrapMethodData extends Indexer implements DataWriter { ConstCell bootstrapMethodHandle; List> arguments; public BootstrapMethodData(ConstCell bsmHandle, List> arguments) { super(); this.bootstrapMethodHandle = bsmHandle; this.arguments = arguments; } // methodAttrIndex - bootstrap_method_attr_index // The value of the bootstrap_method_attr_index item must be a valid index into the bootstrap_methods array // of the bootstrap method table of this class file (§4.7.23). public BootstrapMethodData(int methodAttrIndex) { super(); this.bootstrapMethodHandle = null; this.arguments = new ArrayList<>(); super.cpIndex = methodAttrIndex; } public int getLength() { return 4 + arguments.size() * 2; } public boolean hasMethodAttrIndex() { return super.isSet(); } public void setMethodAttrIndex(int methodAttrIndex) { super.cpIndex = methodAttrIndex; } public int getMethodAttrIndex() { return super.cpIndex; } public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(bootstrapMethodHandle.cpIndex); out.writeShort(arguments.size()); for (ConstCell argument : arguments) { out.writeShort(argument.cpIndex); } } @Override public String toString() { return String.format("{MethodHandle:%s Arguments:%s}", bootstrapMethodHandle == null || bootstrapMethodHandle.cpIndex == NotSet ? " n/a" : " #" + bootstrapMethodHandle.cpIndex, arguments == null || arguments.isEmpty() ? "{}" : "{ " + arguments.stream().map(a -> String.format("#%d", a.cpIndex)).collect(Collectors.joining(", ")) + " }"); } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof BootstrapMethodData)) return false; BootstrapMethodData that = (BootstrapMethodData) o; if (!Objects.equals(bootstrapMethodHandle, that.bootstrapMethodHandle)) return false; return this.cpIndex == that.cpIndex & Objects.equals(arguments, that.arguments); } @Override public int hashCode() { int result = 31 * (bootstrapMethodHandle != null ? bootstrapMethodHandle.hashCode() : 0); result = 31 * result + (arguments != null ? arguments.hashCode() : 0); return result; } public boolean equalsByValue(Object o) { if (this == o) return true; if (!(o instanceof BootstrapMethodData)) return false; BootstrapMethodData that = (BootstrapMethodData) o; if (!Objects.equals(bootstrapMethodHandle, that.bootstrapMethodHandle)) return false; if (arguments == that.arguments) return true; if (arguments != null && (arguments.size() == that.arguments.size())) { for (int i = 0; i < arguments.size(); i++) { if (!arguments.get(i).equalsByValue(that.arguments.get(i))) { return false; } } return true; } return false; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/CPTagVisitor.java000066400000000000000000000105701514323636100264000ustar00rootroot00000000000000/* * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.CompilerConstants; import static java.lang.String.format; /** * Constant Pool Tag Visitor base class defining a visitor for decoding constants. */ public abstract class CPTagVisitor implements CompilerConstants { public CPTagVisitor() { } public final R visit(ClassFileConst.ConstType tag) { switch (tag) { case CONSTANT_UTF8, CONSTANT_ASCIZ -> { return visitUTF8(); } case CONSTANT_INTEGER, CONSTANT_INT, CONSTANT_BYTE, CONSTANT_C_BYTE, CONSTANT_CHAR, CONSTANT_C_CHAR, CONSTANT_SHORT, CONSTANT_C_SHORT, CONSTANT_C_BOOLEAN, CONSTANT_BOOLEAN -> { return visitInteger(tag); } case CONSTANT_FLOAT, CONSTANT_C_FLOAT -> { return visitFloat(); } case CONSTANT_DOUBLE, CONSTANT_C_DOUBLE -> { return visitDouble(); } case CONSTANT_LONG, CONSTANT_C_LONG -> { return visitLong(); } case CONSTANT_METHODTYPE -> { return visitMethodType(); } case CONSTANT_STRING, CONSTANT_L_STRING -> { return visitString(); } case CONSTANT_CLASS, CONSTANT_C_CLASS -> { return visitClass(); } case CONSTANT_METHODREF, CONSTANT_METHOD -> { return visitMethod(); } case CONSTANT_FIELDREF, CONSTANT_FIELD -> { return visitField(); } case CONSTANT_INTERFACEMETHODREF, CONSTANT_INTERFACEMETHOD -> { return visitInterfaceMethod(); } case CONSTANT_NAMEANDTYPE -> { return visitNameAndType(); } case CONSTANT_METHODHANDLE -> { return visitMethodHandle(); } case CONSTANT_DYNAMIC -> { return visitDynamic(); } case CONSTANT_INVOKEDYNAMIC -> { return visitInvokeDynamic(); } case CONSTANT_PACKAGE -> { return visitPackage(); } case CONSTANT_MODULE -> { return visitModule(); } } throw new RuntimeException( format("The Constant Type \"%s\" does not have a corresponding visitor function.", tag.printVal())); } public abstract R visitUTF8(); // The following types are allowed: CONSTANT_INTEGER, CONSTANT_INTEGER_BYTE, // CONSTANT_INTEGER_CHAR, CONSTANT_INTEGER_SHORT, CONSTANT_INTEGER_BOOLEAN public abstract R visitInteger(ClassFileConst.ConstType tag); public abstract R visitFloat(); public abstract R visitDouble(); public abstract R visitLong(); public abstract R visitMethodType(); public abstract R visitString(); public abstract R visitClass(); public abstract R visitMethod(); public abstract R visitField(); public abstract R visitInterfaceMethod(); public abstract R visitNameAndType(); public abstract R visitMethodHandle(); public abstract R visitDynamic(); public abstract R visitInvokeDynamic(); public abstract R visitModule(); public abstract R visitPackage(); } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/CPVisitor.java000066400000000000000000000055151514323636100257470ustar00rootroot00000000000000/* * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; /** * CPVisitor base class defining a visitor for decoding constants. */ public interface CPVisitor< C extends ConstantPool.ConstValue_Cell, P extends ConstantPool.ConstValue_Pair> { default void visit(ConstValue constValue) { switch (constValue.tag) { case CONSTANT_ZERO: break; // ignore case CONSTANT_METHODTYPE, CONSTANT_STRING, CONSTANT_L_STRING, CONSTANT_CLASS, CONSTANT_C_CLASS, CONSTANT_MODULE, CONSTANT_PACKAGE: visitConstValueCell((C) constValue); break; case CONSTANT_METHODREF, CONSTANT_METHOD, CONSTANT_FIELDREF, CONSTANT_FIELD, CONSTANT_INTERFACEMETHODREF, CONSTANT_INTERFACEMETHOD, CONSTANT_NAMEANDTYPE: visitConstValueRefCell((P) constValue); break; case CONSTANT_METHODHANDLE: visitMethodHandle((ConstantPool.ConstValue_MethodHandle) constValue); break; case CONSTANT_UTF8, CONSTANT_ASCIZ, CONSTANT_INTEGER, CONSTANT_INT, CONSTANT_BYTE, CONSTANT_C_BYTE, CONSTANT_CHAR, CONSTANT_C_CHAR, CONSTANT_SHORT, CONSTANT_C_SHORT, CONSTANT_C_BOOLEAN, CONSTANT_BOOLEAN, CONSTANT_FLOAT, CONSTANT_C_FLOAT, CONSTANT_DOUBLE, CONSTANT_C_DOUBLE, CONSTANT_LONG, CONSTANT_C_LONG, CONSTANT_DYNAMIC, CONSTANT_INVOKEDYNAMIC: // default default: } } void visitConstValueCell(C constValue); void visitConstValueRefCell(P constValue); void visitMethodHandle(ConstantPool.ConstValue_MethodHandle constValue); } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/CPXAttr.java000066400000000000000000000032361514323636100253500ustar00rootroot00000000000000/* * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import java.io.IOException; /** * Constant Pool Index Attribute */ class CPXAttr extends AttrData { ConstCell cell; public CPXAttr(ConstantPool pool, EAttribute attribute, ConstCell cell) { super(pool, attribute); this.cell = classifyConstCell(pool, cell); } public int attrLength() { return 2; } public void write(CheckedDataOutputStream out) throws IOException { super.write(out); // attr name, attr len out.writeShort(cell.cpIndex); } } // end class CPXAttr jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/CheckedDataOutputStream.java000066400000000000000000000035641514323636100306040ustar00rootroot00000000000000/* * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; public interface CheckedDataOutputStream { void write(int b) throws IOException; void write(byte b[], int off, int len) throws IOException; default void write(byte b[]) throws IOException { write(b,0, b.length); } void writeBoolean(boolean v) throws IOException; void writeByte(int v) throws IOException; void writeShort(int v) throws IOException; void writeChar(int v) throws IOException; void writeInt(int v) throws IOException; void writeLong(long v) throws IOException; void writeFloat(float v) throws IOException; void writeDouble(double v) throws IOException; void writeBytes(String s) throws IOException; void writeChars(String s) throws IOException; void writeUTF(String s) throws IOException; } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/Checker.java000066400000000000000000000353671514323636100254410ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.ClassFileContext; import org.openjdk.asmtools.common.structure.EModifier; import static org.openjdk.asmtools.common.structure.EModifier.*; import static org.openjdk.asmtools.jasm.JasmTokens.Token; /** * Utility methods to verify modifiers masks for classes, interfaces, methods and fields */ public class Checker { private Checker() { } /* * Check that only one of the Access flags is set. */ private static boolean validAccess(int mod) { return EModifier.onlyOneOfFlags(mod, ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED); } public static boolean validNestedClass(int flags) { return (flags & ~getFlags(MM_NESTED_CLASS)) == 0; } public static boolean validField(int flags) { return (flags & ~getFlags(MM_FIELD)) == 0; } public static int notValidField(int flags) { return getNotPermitted(flags, MM_FIELD); } /* * Methods of classes may have any of the flags in Table 4.6-A set. (MM_METHOD) * However, each method of a class may have at most one of its ACC_PUBLIC, ACC_PRIVATE, and ACC_PROTECTED flags set (JLS §8.4.3). */ private static boolean validMethod(int mod) { return noFlagsExcept(mod, MM_METHOD); } public static boolean validAbstractMethod(int flags) { return (flags & ~getFlags(MM_ABSTRACT_METHOD)) == 0; } public static boolean validInitMethod(int flags) { return (flags & ~getFlags(MM_INIT_METHOD)) == 0; } /* * Fields of interfaces must have their ACC_PUBLIC, ACC_STATIC, and ACC_FINAL flags set; * they may have their ACC_SYNTHETIC flag set and must not have any of the other flags in Table 4.5-A set (JLS §9.3). */ public static boolean validInterfaceField(int mod) { int flags = isSynthetic(mod) ? mod & ~ACC_SYNTHETIC.getFlag() : mod; flags = isStrict(flags) ? flags & ~ACC_STRICT.getFlag() : flags; return noFlagsExcept(flags, ACC_PUBLIC, ACC_STATIC, ACC_FINAL); } /** * The only flags are allowed in interface: ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_SYNTHETIC, ACC_ANNOTATION */ public static boolean validInterface(int mod) { return noFlagsExcept(mod, MM_INTERFACE); } /* * The only flags allowed to the Class are set. */ public static boolean validClass(int mod) { return noFlagsExcept(mod, MM_CLASS); } public static boolean isValueObjectsContext() { return EModifier.GlobalContext() == ClassFileContext.VALUE_OBJECTS; } /** * Check the modifier flags for the class * * @param mod The modifier flags being checked * @param scanner The file parser */ public static void checkClassModifiers(int mod, Scanner scanner) { // Check "Value Classes and Objects" Context if (EModifier.isValueObjects(mod)) { EModifier.setGlobalContext(ClassFileContext.VALUE_OBJECTS); } mod = EModifier.cleanFlags(mod, DEPRECATED_ATTRIBUTE, SYNTHETIC_ATTRIBUTE, VALUE_OBJECTS_ATTRIBUTE); // check Ambiguous use of similar modifiers if (EModifier.moreThanOne(mod, ACC_PUBLIC, ACC_PROTECTED, ACC_PRIVATE)) { scanner.environment.warning(scanner.pos, "warn.repeated.modifier"); } if (scanner.token != Token.CLASS && !EModifier.isInterface(mod)) { scanner.environment.warning(scanner.pos, "warn.one.of.two.token.expected", Token.CLASS.parseKey(), Token.INTERFACE.parseKey(), Token.CLASS.parseKey()); } // Interface if (isInterface(mod)) { // If the ACC_INTERFACE flag is set, the ACC_ABSTRACT flag must also be set. if (!isAbstract(mod)) { scanner.environment.warning(scanner.pos, "warn.invalid.modifier.int.abs", EModifier.asNames(mod, ClassFileContext.CLASS)); } // If the ACC_INTERFACE flag is set, the ACC_FINAL, ACC_IDENTITY, ACC_ENUM, and ACC_MODULE flags must not be set. if (anyOf(mod, ACC_FINAL, ACC_ENUM, ACC_IDENTITY, ACC_MODULE)) { if (isValueObjectsContext()) { scanner.environment.warning(scanner.pos, "warn.invalid.modifier.interface.set.vo", EModifier.asNames(mod, ClassFileContext.CLASS)); } else { scanner.environment.warning(scanner.pos, "warn.invalid.modifier.interface.set", EModifier.asNames(mod, ClassFileContext.CLASS)); } } // Class } else { // If the ACC_INTERFACE flag is not set, any of the other flags in Table 4.1-B may be set except ACC_ANNOTATION and ACC_MODULE. if (anyOf(mod, ACC_ANNOTATION, ACC_MODULE)) { scanner.environment.warning(scanner.pos, "warn.invalid.modifier.not.interface.set", EModifier.asNames(mod, ClassFileContext.CLASS)); } if (isValueObjectsContext()) { // However, such a class file must have at least one of its ACC_FINAL, ACC_IDENTITY, or ACC_ABSTRACT flags set, if (!anyOf(mod, ACC_FINAL, ACC_IDENTITY, ACC_ABSTRACT)) { String buf = EModifier.asNames(mod, ClassFileContext.CLASS); buf = (buf.isEmpty() ? "ACC_VALUE" : "ACC_VALUE, ".concat(buf)); scanner.environment.warning(scanner.pos, "warn.invalid.modifier.not.interface.set.vo", buf); } } if (!validClass(mod)) { scanner.environment.warning(scanner.pos, "warn.invalid.modifier.class", EModifier.asNames(mod & ~getFlags(MM_CLASS), ClassFileContext.CLASS)); } } // Must not have both its ACC_FINAL and ACC_ABSTRACT flags set (JLS §8.1.1.2). if (both(mod, ACC_ABSTRACT, ACC_FINAL)) { scanner.environment.warning(scanner.pos, "warn.invalid.modifier.class.finabs", EModifier.asNames(mod, ClassFileContext.CLASS)); } } /** * Check the modifier flags for the field * * @param classData The ClassData for the current class * @param mod The modifier flags being checked * @param pos the position of the parser in the file */ public static void checkFieldModifiers(ClassData classData, int mod, long pos) { JasmEnvironment environment = classData.getEnvironment(); mod = EModifier.cleanFlags(mod, DEPRECATED_ATTRIBUTE, SYNTHETIC_ATTRIBUTE); if (classData.isInterface()) { // For interfaces fields. // Fields of interfaces must have their ACC_PUBLIC, ACC_STATIC, and ACC_FINAL flags set; //they may have their ACC_STRICT_INIT or ACC_SYNTHETIC flag set, and must not have any of the other flags in Table 4.5-A set (JLS §9.3). if (!validInterfaceField(mod)) { environment.warning(pos, "warn.invalid.modifier.intfield", EModifier.asNames(mod, ClassFileContext.FIELD)); } // if( !isPublic(mod)) { environment.warning(pos, "warn.invalid.modifier.intfield", EModifier.asNames(mod, ClassFileContext.FIELD)); } } else { // For non-interface fields. if (isValueObjectsContext()) { // Each field of a value class must have at least one of its ACC_STATIC or ACC_STRICT_INIT flags set. if (classData.isValue()) { if (!EModifier.anyOf(mod, ACC_STATIC, ACC_STRICT)) { environment.warning(pos, "warn.invalid.modifier.for.value", EModifier.asNames(mod, ClassFileContext.FIELD)); } } } //Fields of classes may set any of the flags in Table 4.5-A. // However, each field of a class may have at most one of its ACC_PUBLIC, ACC_PRIVATE, and ACC_PROTECTED flags set (JLS §8.3.1), // and must not have both its ACC_FINAL and ACC_VOLATILE flags set (JLS §8.3.1.4). int invalidFlags = notValidField(mod); if (invalidFlags != 0) { environment.warning(pos, "warn.invalid.modifier.field", EModifier.asNames(invalidFlags, ClassFileContext.FIELD)); } if (!validAccess(mod)) { environment.warning(pos, "warn.invalid.modifier.acc", EModifier.asNames(mod, ClassFileContext.FIELD)); } if (both(mod, ACC_FINAL, ACC_VOLATILE)) { environment.warning(pos, "warn.invalid.modifier.fiva", EModifier.asNames(mod, ClassFileContext.FIELD)); } } } /** * Check the modifier flags for the method * * @param classData The ClassData for the current class * @param mod The modifier flags being checked * @param pos the position of the parser in the file * @param isInit is the method constructor * @param isClinit is the method static initializer */ public static void checkMethodModifiers(ClassData classData, int mod, long pos, boolean isInit, boolean isClinit) { final JasmEnvironment environment = classData.getEnvironment(); final int cfvMajorVersion = classData.cfv.major_version(); mod = EModifier.cleanFlags(mod, DEPRECATED_ATTRIBUTE, SYNTHETIC_ATTRIBUTE); int wrongFlags; if (!validMethod(mod)) { wrongFlags = mod & ~EModifier.getFlags(MM_METHOD); environment.warning(pos, "warn.invalid.modifier.mth", EModifier.asNames(wrongFlags, ClassFileContext.METHOD)); } if (!validAccess(mod)) { environment.warning(pos, "warn.invalid.modifier.mth.acc", EModifier.asNames(mod, ClassFileContext.METHOD)); } if (isClinit) { // // In a class file whose version number is 51.0 or above, a method whose name is must have its ACC_STATIC flag set. if (classData.cfv.major_version() > 51 && !isStatic(mod)) { environment.warning(pos, "warn.clinit.static", EModifier.asNames(mod, ClassFileContext.METHOD)); } } else { // any method // interface methods. if (classData.isInterface()) { if (isInit) { environment.warning(pos, "warn.init.in_int"); } else { validateInterfaceMethod(mod, classData, pos); } // class methods } else { if (isInit && !validInitMethod(mod)) { wrongFlags = mod & ~EModifier.getFlags(MM_INIT_METHOD); environment.warning(pos, "warn.invalid.modifier.init", EModifier.asNames(wrongFlags, ClassFileContext.METHOD)); } else if (isAbstract(mod)) { if (!validAbstractMethod(mod)) { wrongFlags = mod & ~EModifier.getFlags(MM_ABSTRACT_METHOD); environment.warning(pos, "warn.invalid.modifier.abst", EModifier.asNames(wrongFlags, ClassFileContext.METHOD)); } else if (isStrict(mod) && (cfvMajorVersion >= 46 && cfvMajorVersion <= 60)) { environment.warning(pos, "warn.invalid.modifier.strict"); } } } } } /** * Check the modifier flags for the inner-class * * @param classData The ClassData for the current class * @param mod The modifier flags being checked * @param pos the position of the parser in the file */ public static void checkInnerClassModifiers(ClassData classData, int mod, long pos) { JasmEnvironment environment = classData.getEnvironment(); mod = EModifier.cleanFlags(mod, DEPRECATED_ATTRIBUTE, SYNTHETIC_ATTRIBUTE); if (!validNestedClass(mod)) { int wrongFlags = mod & ~EModifier.getFlags(MM_NESTED_CLASS); environment.warning(pos, "warn.invalid.modifier.innerclass", EModifier.asNames(wrongFlags, ClassFileContext.INNER_CLASS)); } } // Methods of interfaces may have any of the flags in Table 4.6-A set except ACC_PROTECTED, ACC_FINAL, ACC_SYNCHRONIZED, // and ACC_NATIVE (JLS §9.4). In a class file whose version number is less than 52.0, each method of an interface // must have its ACC_PUBLIC and ACC_ABSTRACT flags set; in a class file whose version number is 52.0 or above, // each method of an interface must have exactly one of its ACC_PUBLIC and ACC_PRIVATE flags set. public static void validateInterfaceMethod(int mod, ClassData cd, long pos) { final int cfvMajorVersion = cd.cfv.major_version(); final JasmEnvironment environment = cd.getEnvironment(); if (EModifier.anyOf(mod, ACC_PROTECTED, ACC_FINAL, ACC_SYNCHRONIZED, ACC_NATIVE)) { environment.warning(pos, "warn.invalid.modifier.method", EModifier.asNames(mod, ClassFileContext.METHOD)); } if (cfvMajorVersion < 52) { if (!both(mod, ACC_PUBLIC, ACC_ABSTRACT)) { environment.warning(pos, "warn.invalid.modifier.intmth.less.52", EModifier.asNames(mod, ClassFileContext.METHOD)); } else { // cfvMajorVersion >= 52 if (!EModifier.onlyOneOfFlags(mod, EModifier.ACC_PUBLIC, ACC_PRIVATE)) { environment.warning(pos, "warn.invalid.modifier.intmth.is.52", EModifier.asNames(mod, ClassFileContext.METHOD)); } } } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ClassData.java000066400000000000000000001000121514323636100257100ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.common.outputs.NamedToolOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.structure.CFVersion; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.common.structure.ELocation; import org.openjdk.asmtools.common.structure.EModifier; import java.io.DataOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Collection; import java.util.List; import static org.openjdk.asmtools.common.structure.ClassFileContext.INNER_CLASS; import static org.openjdk.asmtools.common.structure.EAttribute.ATT_Record; import static org.openjdk.asmtools.jasm.ClassData.CoreClasses.PLACE.HEADER; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.CONSTANT_DYNAMIC; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.CONSTANT_INVOKEDYNAMIC; import static org.openjdk.asmtools.jasm.ClassFileConst.JAVA_MAGIC; import static org.openjdk.asmtools.jasm.Indexer.NotSet; /** * ClassData *

* This is the main data structure for representing parsed class data. This structure * renders directly to a class file. */ class ClassData extends MemberData { private static final String DEFAULT_EXTENSION = ".class"; /* ClassData Fields */ private final JasmEnvironment environment; public CDOutputStream cdos; String fileExtension = DEFAULT_EXTENSION; MethodData curMethod; CFVersion cfv; String myClassName; // Core classes of the class file: this_class, super_class CoreClasses coreClasses = new CoreClasses(); AttrData sourceFileAttr; SourceDebugExtensionAttr sourceDebugExtensionAttr; ArrayList interfaces; ArrayList fields = new ArrayList<>(); ArrayList methods = new ArrayList<>(); DataVectorAttr innerClasses = null; DataVectorAttr bootstrapMethodsAttr = null; // JEP 181 - NestHost, NestMembers attributes since class version 55.0 CPXAttr nestHostAttr; NestMembersAttr nestMembersAttr; // JEP 261: Module System since class file 53.0 ModuleAttr moduleAttribute = null; // JEP 359 - Record attribute since class file 58.65535 private RecordData recordData; // // JEP 360 - PermittedSubclasses attribute since class file 59.65535 private PermittedSubclassesAttr permittedSubclassesAttr; // Valhalla private LoadableDescriptorsAttr loadableDescriptorsAttr; // EnclosingMethod private EnclosingMethodAttr enclosingMethodAttr; /** * @param environment The error reporting environment. * @param cfv Class file version */ public ClassData(JasmEnvironment environment, CFVersion cfv) { super(new ConstantPool(environment), environment); // for a class, these get initialized in the super - later. this.attributeLocation = ELocation.class_file; this.environment = environment; this.cdos = new CDOutputStream(); this.cfv = cfv; } /** * Initializes the ClassData. * * @param this_class The constant pool reference to this class * @param super_class The constant pool reference to the super class * @param interfaces A list of interfaces that this class implements */ public final void init(int access, ConstCell this_class, ConstCell super_class, ArrayList interfaces) { this.access = access; // normalize the modifiers to access flags if (EModifier.hasPseudoMod(access)) { createPseudoMod(); } this.coreClasses.this_class(HEADER, this_class); this.coreClasses.super_class(HEADER, super_class); this.interfaces = interfaces; // Set default class file version if it is not set. this.cfv.initClassDefaultVersion(); } public final void initAsPackageInfo(int access, String className) { this.access = access; // this_class: class "package_name/package-info" this.myClassName = className; this.cfv.initClassDefaultVersion(); } public final void initAsModule() { this.access = EModifier.ACC_MODULE.getFlag(); // If the ACC_MODULE flag is set in the access_flags item // super_class: zero this.coreClasses.super_class(HEADER, new ConstCell(0)); this.cfv.initModuleDefaultVersion(); } /** * Predicate that describes if this class has an access flag indicating that it is an * interface. * * @return True, if the class access flag indicates it is an interface. */ public final boolean isInterface() { return EModifier.isInterface(access); } // Entity of the Value Classes and Objects public final boolean isValue() { return !EModifier.isIdentity(access); } /** * Predicate that describes if this class has an abstract flag indicating that it is the abstract class. * * @return True, if the class access flag indicates it is the abstract class. */ public final boolean isAbstract() { return EModifier.isAbstract(access); } /* * After a constant pool has been explicitly declared, * this method links the Constant_InvokeDynamic|Constant_Dynamic * constants with any bootstrap methods that they index in the * Bootstrap Methods Attribute */ protected void relinkBootstrapMethods() { if (bootstrapMethodsAttr != null) { ArrayList> cells = pool.getPoolValuesByRefType(CONSTANT_INVOKEDYNAMIC, CONSTANT_DYNAMIC); environment.traceln("relinkBSMs: %d items", cells.size()); for (ConstCell cell : cells) { ConstantPool.ConstValue_BootstrapMethod refVal = (ConstantPool.ConstValue_BootstrapMethod) cell.ref; BootstrapMethodData bsmData = refVal.bsmData(); if (refVal.isSet() & refVal.value.ref == null) { ConstCell c = pool.getCell(((ConstCell) refVal.value).cpIndex); refVal.setValue(c); } if (bsmData != null && bsmData.hasMethodAttrIndex()) { // find the real BSM Data at the index int methodAttrIndex = bsmData.getMethodAttrIndex(); if (methodAttrIndex < 0 || methodAttrIndex > bootstrapMethodsAttr.size()) { // bad BSM index - give a warning, but place the index in the arg anyway environment.warning("warn.bootstrapmethod.attr.bad", methodAttrIndex); bsmData.setMethodAttrIndex(methodAttrIndex); } else { // make the IndyPairs BSM Data point to the one from the attribute refVal.setBsmData(bootstrapMethodsAttr.get(methodAttrIndex), methodAttrIndex); } } } } } /** * Finds first BSM data element by value in a collection */ private > int getFirstIndex(T collection, BootstrapMethodData bsmData) { if (!collection.isEmpty()) { BootstrapMethodData[] array = collection.toArray(BootstrapMethodData[]::new); for (int i = 0; i < array.length; i++) { if (bsmData.equalsByValue(array[i])) { return i; } } } return NotSet; } /** * Relinks BSM data (BootstrapMethod Attribute) and Constant Pool Constant_InvokeDynamic|Constant_Dynamic entries if * at least one CP cell has undefined method attribute index also the method removes duplicates in BootstrapMethod * Attribute if found */ private void uniquifyBootstrapMethods() { if (bootstrapMethodsAttr != null) { int index = 0; final List cpBsmList = this.getPool(). getPoolCellsByType(CONSTANT_DYNAMIC, CONSTANT_INVOKEDYNAMIC). stream().map(item -> ((ConstantPool.ConstValue_BootstrapMethod) item.ref). bsmData()).toList(); if (cpBsmList.stream().anyMatch(item -> !item.hasMethodAttrIndex())) { environment.traceln("numberBSM: %d items", cpBsmList.size()); // remove duplicates in BootstrapMethod_Attribute if found // Fix 7902888: Excess entries in BootstrapMethods with the same bsm, bsmKind, bsmArgs final ArrayList newBsmList = new ArrayList<>(cpBsmList.size()); for (int i = 0; i < cpBsmList.size(); i++) { BootstrapMethodData bsmData = cpBsmList.get(i); int cachedIndex = getFirstIndex(newBsmList, bsmData); if (cachedIndex != NotSet) { bsmData.setMethodAttrIndex(cachedIndex); } else { if (getFirstIndex(this.bootstrapMethodsAttr, bsmData) == NotSet) { environment.warning("warn.bootstrapmethod.attr.expected", bsmData.toString()); } else { bsmData.setMethodAttrIndex(index++); } newBsmList.add(bsmData); } } bootstrapMethodsAttr.replaceAll(newBsmList); } } } public AttrData setSourceFileAttr(ConstCell value_cpx) { this.sourceFileAttr = new CPXAttr(pool, EAttribute.ATT_SourceFile, value_cpx); return this.sourceFileAttr; } public SourceDebugExtensionAttr setSourceDebugExtensionAttr() { this.sourceDebugExtensionAttr = new SourceDebugExtensionAttr(pool); return this.sourceDebugExtensionAttr; } public RecordData setRecord(long where) { checkExistence(ATT_Record, () -> environment.warning(where, "warn.record.repeated")); this.recordData = new RecordData(this); return this.recordData; } /** * Rejects a record: removes the record attribute if there are no components */ public void rejectRecord() { this.recordData = null; } // Field public ConstantPool.ConstValue_FieldRef makeFieldRef(ConstCell name, ConstCell descriptor) { return new ConstantPool.ConstValue_FieldRef(name, descriptor); } public FieldData addFieldIfAbsent(int access, ConstCell name, ConstCell descriptor) { ConstantPool.ConstValue_FieldRef fieldRef = makeFieldRef(name, descriptor); environment.traceln(() -> " [ClassData.addFieldIfAbsent]: #" + fieldRef.value.first.cpIndex + ":#" + fieldRef.value.second.cpIndex); FieldData fd = getField(fieldRef); if (fd == null) { environment.traceln(" [ClassData.addFieldIfAbsent]: new field."); fd = addField(access, fieldRef); } return fd; } private FieldData getField(ConstantPool.ConstValue_FieldRef nameAndType) { for (FieldData fd : fields) { if (fd.getNameDesc().equals(nameAndType)) { return fd; } } return null; } public FieldData addField(int access, ConstantPool.ConstValue_FieldRef fieldRef) { environment.traceln(() -> " [ClassData.addField]: #" + fieldRef.value.first.cpIndex + ":#" + fieldRef.value.second.cpIndex); FieldData res = new FieldData(this, access, fieldRef); fields.add(res); return res; } public FieldData addField(int access, ConstCell name, ConstCell sig) { return addField(access, makeFieldRef(name, sig)); } public MethodData StartMethod(int access, ConstCell name, ConstCell sig, ArrayList exc_table) { EndMethod(); environment.traceln(() -> " [ClassData.StartMethod]: #" + name.cpIndex + ":#" + sig.cpIndex); curMethod = new MethodData(this, access, name, sig, exc_table); methods.add(curMethod); return curMethod; } public void EndMethod() { curMethod = null; } public ConstCell LocalMethodRef(ConstValue nape) { return pool.findCell(ConstType.CONSTANT_METHODREF, coreClasses.this_class(), pool.findCell(nape)); } public ConstCell LocalMethodRef(ConstCell name, ConstCell sig) { return LocalMethodRef(makeFieldRef(name, sig)); } void addLocVarData(int opc, Indexer arg) { } public void addInnerClass(int access, ConstCell name, ConstCell innerClass, ConstCell outerClass) { environment.traceln(() -> "addInnerClass (with indexes: Name (" + name.toString() + "), Inner (" + innerClass.toString() + "), Outer (" + outerClass.toString() + ")."); if (innerClasses == null) { innerClasses = new DataVectorAttr<>(pool, EAttribute.ATT_InnerClasses); } innerClasses.add(new InnerClassData(access, name, innerClass, outerClass)); } public void addBootstrapMethod(BootstrapMethodData bsmData) { if (bootstrapMethodsAttr == null) { bootstrapMethodsAttr = new DataVectorAttr<>(pool, EAttribute.ATT_BootstrapMethods); } bootstrapMethodsAttr.add(bsmData); environment.traceln(() -> "addBootstrapMethod: " + bsmData.toString()); } public void addNestHost(ConstCell hostClass) { environment.traceln("addNestHost"); nestHostAttr = new CPXAttr(pool, EAttribute.ATT_NestHost, hostClass); } public void addNestMembers(List classes) { environment.traceln("addNestMembers"); nestMembersAttr = new NestMembersAttr(pool, classes); } public void addPermittedSubclasses(List classes) { environment.traceln("addPermittedSubclasses"); permittedSubclassesAttr = new PermittedSubclassesAttr(pool, classes); } public void addLoadableDescriptors(List utf8List) { environment.traceln("addLoadableDescriptors"); loadableDescriptorsAttr = new LoadableDescriptorsAttr(pool, utf8List); } public void addEnclosingMethod(ConstCell classCell, ConstCell methodRefCell) { environment.traceln("addEnclosingMethod"); enclosingMethodAttr = new EnclosingMethodAttr(pool, classCell, methodRefCell); } public void endClass() { if (coreClasses.super_class() == null) { coreClasses.super_class(pool.findClassCell("java/lang/Object")); } pool.itemizePool(); coreClasses.specifyClasses(pool); coreClasses.cleanConstantPool(pool); pool.checkGlobals(); pool.fixIndexesInPool(); itemizeAttributes(new DataVectorAttr<>(pool, EAttribute.ATT_ConstantValue). addAll(fields.stream().map(f -> f.getInitialValue())), annotAttrInv, annotAttrVis); uniquifyBootstrapMethods(); try { myClassName = coreClasses.getFileName(); if (environment.isTraceFlag()) { environment.traceln("ClassFileName = " + myClassName); environment.traceln("this_class = " + coreClasses.this_class()); environment.traceln("super_class = " + coreClasses.super_class()); environment.traceln("-- Constant Pool ---"); environment.traceln("--------------------"); pool.printPool(); environment.traceln("--------------------"); environment.traceln("-- Inner Classes ---"); environment.traceln("--------------------"); printInnerClasses(); environment.traceln("--------------------"); } } catch (Throwable e) { environment.traceln(() -> "check name:" + e); environment.error("err.no.classname"); e.printStackTrace(); } } public void endPackageInfo() { coreClasses.this_class(pool.findClassCell(this.myClassName)); // super_class: class "java/lang/Object" coreClasses.super_class(pool.findClassCell("java/lang/Object")); pool.itemizePool(); coreClasses.super_class(pool.specifyCell(coreClasses.super_class())); coreClasses.this_class(pool.specifyCell(coreClasses.this_class())); pool.checkGlobals(); } public void endModule(ModuleAttr moduleAttr) { moduleAttribute = moduleAttr.build(); this.myClassName = "module-info"; coreClasses.this_class(pool.findClassCell(this.myClassName)); pool.itemizePool(); coreClasses.this_class(pool.specifyCell(coreClasses.this_class())); pool.checkGlobals(); // a module is annotated itemizeAttributes(annotAttrInv, annotAttrVis); } /** * Scans all attributes that * 1. only have cpIndex != 0 and undefined values, types if they are found the method sets their values and types. * It applies to DataVectorAttr * 2. only have values and undefined cpIndex if they are found the method finds the identical values in CP and * assigns their cpIndexes instead of undefined indexes. * It works for DataVectorAttr * * @param attributeList list of attribute's list */ private void itemizeAttributes(A... attributeList) { for (A attributes : attributeList) { if (attributes != null) { if (attributes instanceof DataVectorAttr) { ((DataVectorAttr) attributes).getElements().stream(). map(e -> (ConstantPoolDataVisitor) e).forEach(v -> v.visit(pool)); } else if (attributes instanceof AttrData) { attributes.visit(pool); } } } } private void printInnerClasses() { if (innerClasses != null) { int i = 1; for (InnerClassData entry : innerClasses) { environment.trace(" InnerClass[" + i++ + "]: (" + EModifier.asNames(entry.access, INNER_CLASS) + "), "); environment.trace("Name: " + entry.name.toString() + " "); environment.trace("InnerClass_info: " + entry.innerClass.toString() + " "); environment.traceln("OuterClass_info: " + entry.outerClass.toString() + " "); } } else { environment.traceln("<< NO INNER CLASSES >>"); } } public void write(CheckedDataOutputStream out) throws IOException { // Write the header out.writeInt(JAVA_MAGIC); out.writeShort(cfv.minor_version()); out.writeShort(cfv.major_version()); pool.write(out); out.writeShort(access); // & MM_CLASS; // Q out.writeShort(coreClasses.this_class().cpIndex); out.writeShort(coreClasses.super_class().cpIndex); // Write the interface names if (interfaces != null) { out.writeShort(interfaces.size()); for (Indexer intf : interfaces) { out.writeShort(intf.cpIndex); } } else { out.writeShort(0); } // Write the fields if (fields != null) { out.writeShort(fields.size()); for (FieldData field : fields) { field.write(out); } } else { out.writeShort(0); } // Write the methods if (methods != null) { out.writeShort(methods.size()); for (MethodData method : methods) { method.write(out); } } else { out.writeShort(0); } // Write the attributes DataVector attrs = getAttrVector(); attrs.write(out); } // end ClassData.write() @Override protected DataVector getAttrVector() { if (moduleAttribute != null) { return populateAttributesList(annotAttrVis, annotAttrInv, moduleAttribute); } else { return populateAttributesList( sourceFileAttr, sourceDebugExtensionAttr, recordData, // JEP 359 since class file 58.65535 innerClasses, syntheticAttr, deprecatedAttr, signatureAttr, annotAttrVis, annotAttrInv, type_annotAttrVis, type_annotAttrInv, bootstrapMethodsAttr, nestHostAttr, nestMembersAttr, // since class version 55.0 permittedSubclassesAttr, // since class version 59.65535 (JEP 360) enclosingMethodAttr, loadableDescriptorsAttr // Valhalla ); } } private DataVector populateAttributesList(T... attributes) { DataVector attrVector = new DataVector(); for (T attribute : attributes) { if (attribute != null) { attrVector.add(attribute); } } return attrVector; } /** * Writes to the directory passed with -d/-w options */ public void write(ToolOutput toolOutput) throws IOException { try (DataOutputStream dos = toolOutput.getDataOutputStream()) { cdos.setDataOutputStream(dos); write(cdos); } catch (Exception ex) { if (toolOutput instanceof NamedToolOutput output) { environment.error("err.cannot.write", output.getName()); } else { environment.error("err.cannot.write", "output stream"); } throw new IOException(ex); } } public void setByteLimit(int bytelimit) { cdos.enable(); cdos.setLimit(bytelimit); } protected boolean checkExistence(EAttribute attribute) { return switch (attribute) { case ATT_Signature -> signatureAttr != null; case ATT_SourceFile -> sourceFileAttr != null; case ATT_SourceDebugExtension -> sourceDebugExtensionAttr != null; case ATT_NestHost -> nestHostAttr != null; case ATT_NestMembers -> nestMembersAttr != null && nestMembersAttr.size() != 0; case ATT_PermittedSubclasses -> permittedSubclassesAttr != null && permittedSubclassesAttr.size() != 0; case ATT_LoadableDescriptors -> loadableDescriptorsAttr != null && loadableDescriptorsAttr.size() != 0; case ATT_Record -> recordData != null; case ATT_EnclosingMethod -> enclosingMethodAttr != null; default -> throw new IllegalStateException("Unexpected attribute: %s in %s". formatted(attribute.parseKey(), attributeLocation.name())); }; } protected ClassData checkExistence(EAttribute attribute, long position) { checkExistence(attribute, () -> environment.throwErrorException(position, "err.extra.attribute", attribute.parseKey(), attributeLocation.name())); return this; } /** * This is a wrapper for DataOutputStream, used for debugging purposes. it allows * writing the byte-stream of a class up to a given byte number. */ static private class CDOutputStream implements CheckedDataOutputStream { public boolean enabled = false; private int byteLimit; private DataOutputStream dos; public CDOutputStream() { dos = null; } public CDOutputStream(OutputStream out) { setOutputStream(out); } public final void setOutputStream(OutputStream out) { dos = new DataOutputStream(out); } public void setDataOutputStream(DataOutputStream dos) { this.dos = dos; } public void setLimit(int limit) { byteLimit = limit; } public void enable() { enabled = true; } private synchronized void check(String loc) throws IOException { if (enabled && dos.size() >= byteLimit) { throw new IOException(loc); } } @Override public synchronized void write(int b) throws IOException { dos.write(b); check("Writing byte: " + b); } @Override public synchronized void write(byte b[], int off, int len) throws IOException { dos.write(b, off, len); check("Writing byte-array: " + b); } @Override public final void writeBoolean(boolean v) throws IOException { dos.writeBoolean(v); check("Writing writeBoolean: " + (v ? "true" : "false")); } @Override public final void writeByte(int v) throws IOException { dos.writeByte(v); check("Writing writeByte: " + v); } @Override public void writeShort(int v) throws IOException { dos.writeShort(v); check("Writing writeShort: " + v); } @Override public void writeChar(int v) throws IOException { dos.writeChar(v); check("Writing writeChar: " + v); } @Override public void writeInt(int v) throws IOException { dos.writeInt(v); check("Writing writeInt: " + v); } @Override public void writeLong(long v) throws IOException { dos.writeLong(v); check("Writing writeLong: " + v); } @Override public void writeFloat(float v) throws IOException { dos.writeFloat(v); check("Writing writeFloat: " + v); } @Override public void writeDouble(double v) throws IOException { dos.writeDouble(v); check("Writing writeDouble: " + v); } @Override public void writeBytes(String s) throws IOException { dos.writeBytes(s); check("Writing writeBytes: " + s); } @Override public void writeChars(String s) throws IOException { dos.writeChars(s); check("Writing writeChars: " + s); } @Override public void writeUTF(String s) throws IOException { dos.writeUTF(s); check("Writing writeUTF: " + s); } } /** * Container holds 2 pairs of core classes: this_class, super_class, and functionality to get output file name. * jasm supports the values: * [CLASS_MODIFIERS] class|interface CLASSNAME [ extends SUPERCLASSNAME ] { // HEADER * this_class[:] (#ID | IDENT); // CLASSNAME CLASSFILE * super_class[:] (#ID | IDENT); // SUPERCLASSNAME CLASSFILE */ public static class CoreClasses { public enum PLACE { // A place where this_class, super_class pair is defined. HEADER, CLASSFILE } private String fileName; // This and Super classes are defined on the top in the header: // [CLASS_MODIFIERS] class|interface CLASSNAME [ extends SUPERCLASSNAME ] { // HEADER // // public super class #11 extends #14 version 66:0 // public super class package/ClassName extends package/SuperClassName version 66:0 Pair, ConstCell> header = new Pair<>(null, null); // This and Super classes are defined in a class file: // this_class[:] (#ID | IDENT); // CLASSNAME CLASSFILE // super_class[:] (#ID | IDENT); // SUPERCLASSNAME CLASSFILE // // this_class #7; // package/ClassName // super_class java/lang/Object; // java/lang/Object Pair, ConstCell> classfile = new Pair<>(null, null); public void this_class(PLACE where, ConstCell this_class) { if (where == PLACE.CLASSFILE) { classfile.first = this_class; } else { header.first = this_class; } } public void super_class(PLACE where, ConstCell super_class) { if (where == PLACE.CLASSFILE) { classfile.second = super_class; } else { header.second = super_class; } } public void this_class(ConstCell this_class) { if (classfile.first != null) { classfile.first = this_class; } else { header.first = this_class; } } public void super_class(ConstCell super_class) { if (classfile.second != null) { classfile.second = super_class; } else { header.second = super_class; } } public ConstCell this_class() { return (classfile.first != null) ? classfile.first : header.first; } public ConstCell super_class() { return (classfile.second != null) ? classfile.second : header.second; } public String getFileName() { if (fileName == null) { fileName = calculateFileName(); } return fileName; } private String calculateFileName() { if (header.first != null) { ConstantPool.ConstValue_Class this_class_value = (ConstantPool.ConstValue_Class) header.first.ref; ConstantPool.ConstValue_UTF8 this_class_name = this_class_value.value.ref; this.fileName = this_class_name.value; return this_class_name.value; } return null; } /** * If jasm file contains this_class/super_class value then this value overwrites the class/super class defined on the top: * "public super class ClassName extends #9 version 66:0 {" * ie just added to ConstantPool classes: ClassName && #9 should be removed * * @param constantPool constant pool */ public void cleanConstantPool(ConstantPool constantPool) { if (classfile.first != null && classfile.first.cpIndex != header.first.cpIndex) { calculateFileName(); constantPool.removeClassCell((ConstCell) header.first); } if (classfile.second != null && header.second != null && classfile.second.cpIndex != header.second.cpIndex) { constantPool.removeClassCell((ConstCell) header.second); } } public void specifyClasses(ConstantPool constantPool) { if (header.first != null) header.first = constantPool.specifyCell(header.first); if (header.second != null) header.second = constantPool.specifyCell(header.second); if (classfile.first != null) classfile.first = constantPool.specifyCell(classfile.first); if (classfile.second != null) classfile.second = constantPool.specifyCell(classfile.second); } } }// end class ClassData jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ClassFileConst.java000066400000000000000000000350331514323636100267370ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.PrintWriter; import java.util.HashMap; /** * ClassFileConst *

* The classes in Tables are following a Singleton Pattern. These classes are Enums, and * they are contained in private hash maps (lookup tables and reverse lookup tables). * These hash maps all have public accessors, which clients use to look-up enums. *

* Tokens in this table carry no external state, and are typically treated as constants. * They do not need to be reset. */ public final class ClassFileConst { public static final int JAVA_MAGIC = 0xCAFEBABE; /** * Lookup-tables for various types. */ private static final HashMap NameToSubTag = new HashMap<>(9); private static final HashMap SubTags = new HashMap<>(9); private static final HashMap NameToBasicType = new HashMap<>(10); private static final HashMap BasicTypes = new HashMap<>(10); private static final HashMap AnnotationElementTypes = new HashMap<>(10); private static final HashMap NameToConstantType = new HashMap<>(ConstType.maxTag); private static final HashMap BSMArgumentNameToConstantType = new HashMap<>(ConstType.maxTag); private static final HashMap ConstantTypes = new HashMap<>(ConstType.maxTag); static { // register all the tokens for (ConstType ct : ConstType.values()) { registerConstantType(ct); } /* Type codes for SubTags */ for (SubTag st : SubTag.values()) { registerSubtag(st); } /* Type codes for BasicTypes */ for (BasicType bt : BasicType.values()) { registerBasicType(bt); } /* Type codes for BasicTypes */ for (AnnotationElementType aet : AnnotationElementType.values()) { registerAnnotationElementType(aet); } } static public ConstType getByTag(int i) { ConstType constType = ConstantTypes.get(i); return constType == null ? ConstType.CONSTANT_UNKNOWN : constType; } static public ConstType getByParseKey(String parseKey) { return NameToConstantType.get(parseKey); } static public ConstType getBSMArgumentTypeByParseKey(String parseKey) { return BSMArgumentNameToConstantType.get(parseKey); } private static void registerConstantType(ConstType constType) { NameToConstantType.put(constType.parseKey, constType); if (constType.isBsmType) { BSMArgumentNameToConstantType.put(constType.parseKey, constType); } if (!ConstantTypes.containsKey(constType.tag)) { // only first CONSTANT_INTEGER(3, "CONSTANT_INTEGER", "int", AnnotationElementType.AE_INT) ConstantTypes.put(constType.tag, constType); } } private static void registerSubtag(SubTag tg) { NameToSubTag.put(tg.printValue, tg); SubTags.put(tg.value, tg); } public static SubTag subTag(String subtag) { return NameToSubTag.get(subtag); } public static SubTag subTag(int subtag) { return SubTags.get(subtag); } private static void registerBasicType(BasicType basicType) { NameToBasicType.put(basicType.printValue, basicType); BasicTypes.put(basicType.value, basicType); } public static BasicType getBasicType(String idValue) { return NameToBasicType.get(idValue); } public static BasicType getBasicType(int subtag) { return BasicTypes.get(subtag); } public static int basicTypeValue(String idValue) { int retval = -1; BasicType tg = NameToBasicType.get(idValue); if (tg != null) { retval = tg.value; } return retval; } private static void registerAnnotationElementType(AnnotationElementType annotationElementType) { // NameToAnnotationElementType.put(annotationElementType.printValue, annotationElementType); AnnotationElementTypes.put(annotationElementType.value.charAt(0), annotationElementType); } public static AnnotationElementType getAnnotationElementType(char subTag) { AnnotationElementType elementType = AnnotationElementTypes.get(subTag); if (elementType == null) { elementType = AnnotationElementType.AE_UNKNOWN; } return elementType; } /** * A (typed) tag (constant) representing the type of Constant in the Constant Pool. */ public enum ConstType { CONSTANT_UNKNOWN(-1, "CONSTANT_UNKNOWN", "", AnnotationElementType.AE_NOT_APPLICABLE, false), // CONSTANT_ZERO(0, "CONSTANT_ZERO", "", AnnotationElementType.AE_NOT_APPLICABLE, false), CONSTANT_UTF8(1, "CONSTANT_UTF8", "Utf8", AnnotationElementType.AE_STRING, true), CONSTANT_ASCIZ(1, "CONSTANT_UTF8", "Asciz", AnnotationElementType.AE_STRING, true), // supports previous version // Constant 2 reserved CONSTANT_INTEGER(3, "CONSTANT_INTEGER", "Integer", AnnotationElementType.AE_INT, true), CONSTANT_INT(3, "CONSTANT_INTEGER", AnnotationElementType.AE_INT.printValue, AnnotationElementType.AE_INT, true), CONSTANT_BYTE(3, "CONSTANT_INTEGER", AnnotationElementType.AE_BYTE.printValue, AnnotationElementType.AE_BYTE, true), CONSTANT_C_BYTE(3, "CONSTANT_INTEGER", "Byte", AnnotationElementType.AE_BYTE, true), CONSTANT_CHAR(3, "CONSTANT_INTEGER", AnnotationElementType.AE_CHAR.printValue, AnnotationElementType.AE_CHAR, true), CONSTANT_C_CHAR(3, "CONSTANT_INTEGER", "Char", AnnotationElementType.AE_CHAR, true), CONSTANT_SHORT(3, "CONSTANT_INTEGER", AnnotationElementType.AE_SHORT.printValue, AnnotationElementType.AE_SHORT, true), CONSTANT_C_SHORT(3, "CONSTANT_INTEGER", "Short", AnnotationElementType.AE_SHORT, true), CONSTANT_BOOLEAN(3, "CONSTANT_INTEGER", AnnotationElementType.AE_BOOLEAN.printValue, AnnotationElementType.AE_BOOLEAN, true), CONSTANT_C_BOOLEAN(3, "CONSTANT_INTEGER", "Boolean", AnnotationElementType.AE_BOOLEAN, true), CONSTANT_C_FLOAT(4, "CONSTANT_FLOAT", "Float", AnnotationElementType.AE_FLOAT, true), CONSTANT_FLOAT(4, "CONSTANT_FLOAT", "float", AnnotationElementType.AE_FLOAT, true), CONSTANT_C_LONG(5, "CONSTANT_LONG", "Long", AnnotationElementType.AE_LONG, true), CONSTANT_LONG(5, "CONSTANT_LONG", "long", AnnotationElementType.AE_LONG, true), CONSTANT_C_DOUBLE(6, "CONSTANT_DOUBLE", "Double", AnnotationElementType.AE_DOUBLE, true), CONSTANT_DOUBLE(6, "CONSTANT_DOUBLE", "double", AnnotationElementType.AE_DOUBLE, true), CONSTANT_C_CLASS(7, "CONSTANT_CLASS", "Class", AnnotationElementType.AE_CLASS, true), CONSTANT_CLASS(7, "CONSTANT_CLASS", "class", AnnotationElementType.AE_CLASS, true), CONSTANT_STRING(8, "CONSTANT_STRING", "String", AnnotationElementType.AE_NOT_APPLICABLE, true), CONSTANT_L_STRING(8, "CONSTANT_STRING", "string", AnnotationElementType.AE_NOT_APPLICABLE, false), CONSTANT_FIELD(9, "CONSTANT_FIELD", "Field", AnnotationElementType.AE_NOT_APPLICABLE, true), CONSTANT_FIELDREF(9, "CONSTANT_FIELDREF", "Fieldref", AnnotationElementType.AE_NOT_APPLICABLE, true), CONSTANT_METHOD(10, "CONSTANT_METHOD", "Method", AnnotationElementType.AE_NOT_APPLICABLE, true), CONSTANT_METHODREF(10, "CONSTANT_METHODREF", "Methodref", AnnotationElementType.AE_NOT_APPLICABLE, true), CONSTANT_INTERFACEMETHOD(11, "CONSTANT_INTERFACEMETHOD", "InterfaceMethod", AnnotationElementType.AE_NOT_APPLICABLE, true), CONSTANT_INTERFACEMETHODREF(11, "CONSTANT_INTERFACEMETHODREF", "InterfaceMethodref", AnnotationElementType.AE_NOT_APPLICABLE, true), CONSTANT_NAMEANDTYPE(12, "CONSTANT_NAMEANDTYPE", "NameAndType", AnnotationElementType.AE_NOT_APPLICABLE, true), // Constant 13 reserved // Constant 14 reserved CONSTANT_METHODHANDLE(15, "CONSTANT_METHODHANDLE", "MethodHandle", AnnotationElementType.AE_NOT_APPLICABLE, true), CONSTANT_METHODTYPE(16, "CONSTANT_METHODTYPE", "MethodType", AnnotationElementType.AE_NOT_APPLICABLE, true), CONSTANT_DYNAMIC(17, "CONSTANT_DYNAMIC", "Dynamic", AnnotationElementType.AE_NOT_APPLICABLE, true), CONSTANT_INVOKEDYNAMIC(18, "CONSTANT_INVOKEDYNAMIC", "InvokeDynamic", AnnotationElementType.AE_NOT_APPLICABLE, true), CONSTANT_MODULE(19, "CONSTANT_MODULE", "Module", AnnotationElementType.AE_NOT_APPLICABLE, true), CONSTANT_PACKAGE(20, "CONSTANT_PACKAGE", "Package", AnnotationElementType.AE_NOT_APPLICABLE, true); static final public int maxTag = 20; private final int tag; private final String printVal; private final String parseKey; private final AnnotationElementType annotationElementType; private final boolean isBsmType; public boolean equals(ConstType other) { if (other != null) { return this.tag == other.tag; } return false; } ConstType(int tag, String printVal, String parseKey, AnnotationElementType annotationElementType, boolean isBsmType) { this.tag = tag; this.printVal = printVal; this.parseKey = parseKey; this.annotationElementType = annotationElementType; this.isBsmType = isBsmType; } public boolean oneOf(ConstType... constTypes) { for (ConstType constType : constTypes) { if (this.tag == constType.tag) { return true; } } return false; } /** * The tag item uses a single ASCII character to indicate the type of the value of the element-value pair. * This determines which item of the value union is in use. Table 4.7.16.1-A shows the valid characters * for the tag item. * * @return a single ASCII character */ public char getAnnotationElementTypeValue() { return annotationElementType.tag(); } public byte getTag() { return (byte) tag; } public String parseKey() { return parseKey; } public String printVal() { return printVal; } public void print(PrintWriter out) { out.print(parseKey); } @Override public String toString() { return printVal + "." + tag; } } /** * Annotation Element Type enums * Table 4.7.16.1-A. Interpretation of tag values as types */ public enum AnnotationElementType { AE_BYTE("B", "byte"), AE_CHAR("C", "char"), AE_SHORT("S", "short"), AE_INT("I", "int"), AE_LONG("J", "long"), AE_FLOAT("F", "float"), AE_DOUBLE("D", "double"), AE_BOOLEAN("Z", "boolean"), AE_STRING("s", "string"), AE_ENUM("e", "enum"), AE_CLASS("c", "class"), AE_ANNOTATION("@", "annotation"), AE_ARRAY("[", "array"), AE_UNKNOWN("U", "unknown"), AE_NOT_APPLICABLE("N", "not applicable"); private final String value; private final String printValue; AnnotationElementType(String value, String printValue) { this.value = value; this.printValue = printValue; } public String value() { return value; } public String printValue() { return printValue; } /** * The tag item uses a single ASCII character to indicate the type of the value of the element-value pair. * This determines which item of the value union is in use. Table 4.7.16.1-A shows the valid characters * for the tag item. * * @return a single ASCII character */ public char tag() { return value.charAt(0); } public static boolean isSet(char tagChar) { return AE_NOT_APPLICABLE.tag() != tagChar && AE_UNKNOWN.tag() != tagChar; } } /** * SubTag enums */ public enum SubTag { REF_GETFIELD(1, "REF_getField"), REF_GETSTATIC(2, "REF_getStatic"), REF_PUTFIELD(3, "REF_putField"), REF_PUTSTATIC(4, "REF_putStatic"), REF_INVOKEVIRTUAL(5, "REF_invokeVirtual"), REF_INVOKESTATIC(6, "REF_invokeStatic"), REF_INVOKESPECIAL(7, "REF_invokeSpecial"), REF_NEWINVOKESPECIAL(8, "REF_newInvokeSpecial"), REF_INVOKEINTERFACE(9, "REF_invokeInterface"); private final Integer value; private final String printValue; SubTag(Integer val, String print) { value = val; printValue = print; } public String printValue() { return printValue; } public Integer value() { return value; } } /** * BasicType enums */ public enum BasicType { T_INT(0x0000000a, "int"), T_LONG(0x0000000b, "long"), T_FLOAT(0x00000006, "float"), T_DOUBLE(0x00000007, "double"), T_CLASS(0x00000002, "class"), T_BOOLEAN(0x00000004, "boolean"), T_CHAR(0x00000005, "char"), T_BYTE(0x00000008, "byte"), T_SHORT(0x00000009, "short"); private final Integer value; private final String printValue; BasicType(Integer value, String printValue) { this.value = value; this.printValue = printValue; } public String printValue() { return printValue; } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/CodeAttr.java000066400000000000000000000525071514323636100255750ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.SyntaxError; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.jasm.OpcodeTables.Opcode; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import static java.lang.Math.max; import static org.openjdk.asmtools.common.structure.EAttribute.ATT_StackMap; import static org.openjdk.asmtools.common.structure.EAttribute.ATT_StackMapTable; import static org.openjdk.asmtools.jasm.OpcodeTables.MAX_LOOKUPSWITCH_LENGTH; import static org.openjdk.asmtools.jasm.OpcodeTables.MAX_TABLESWITCH_LENGTH; import static org.openjdk.asmtools.jasm.OpcodeTables.Opcode.opc_lookupswitch; import static org.openjdk.asmtools.jasm.OpcodeTables.Opcode.opc_tableswitch; /** * 4.7.3. The Code Attribute *

* Code_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 max_stack; * u2 max_locals; * u4 code_length; * u1 code[code_length]; * u2 exception_table_length; * { u2 start_pc; * u2 end_pc; * u2 handler_pc; * u2 catch_type; * } exception_table[exception_table_length]; * u2 attributes_count; * attribute_info attributes[attributes_count]; * } */ class CodeAttr extends AttrData { protected final List locVarSlots; protected final List locVarTypeSlots; private final LocalVariableData VACANT = null; // reference to the surrounding data containers protected ClassData classData; protected MethodData methodData; protected JasmEnvironment environment; protected Indexer max_stack, max_locals; protected Instr zeroInstr, lastInstr; protected int curPC = 0; protected DataVector exceptionTable; protected DataVectorAttr lineNumberTable; protected long lastLineNumber = 0; protected DataVectorAttr localVariableTable; protected DataVectorAttr localVariableTypeTable; protected DataVector> attributes; protected HashMap labelsHash; protected HashMap trapsHash; protected List stackMapEntries = new ArrayList<>(); protected DataVectorAttr stackMapTable; // type annotations protected DataVectorAttr visTypeAnnotations = null; protected DataVectorAttr inVisTypeAnnotations = null; public CodeAttr(MethodData methodData, int paramCount, Indexer max_stack, Indexer max_locals) { super(methodData.pool, EAttribute.ATT_Code); this.methodData = methodData; this.classData = methodData.classData; this.environment = methodData.getEnvironment(); this.max_stack = max_stack; this.max_locals = max_locals; this.locVarSlots = new ArrayList<>(Collections.nCopies(max_locals != null ? max_locals.value() : paramCount, VACANT)); this.locVarTypeSlots = new ArrayList<>(Collections.nCopies(max_locals != null ? max_locals.value() : paramCount, VACANT)); lastInstr = zeroInstr = new Instr(methodData, environment); exceptionTable = new DataVector<>(0); // TrapData attributes = new DataVector<>(); if (environment.getVerboseFlag()) { lineNumberTable = new DataVectorAttr<>(methodData.pool, EAttribute.ATT_LineNumberTable); attributes.add(lineNumberTable); } } void endCode() { checkTraps(); checkLocVars(Opcode.opc_var); checkLocVars(Opcode.opc_type); checkLabels(); // if (visTypeAnnotations != null) { attributes.add(visTypeAnnotations); } if (inVisTypeAnnotations != null) { attributes.add(inVisTypeAnnotations); } } public void addAnnotations(ArrayList list) { for (AnnotationData item : list) { boolean invisible = item.invisible; if (item instanceof TypeAnnotationData typeAnnotationData) { // Type Annotations if (invisible) { if (inVisTypeAnnotations == null) { inVisTypeAnnotations = new DataVectorAttr<>(methodData.pool, EAttribute.ATT_RuntimeInvisibleTypeAnnotations); } inVisTypeAnnotations.add(typeAnnotationData); } else { if (this.visTypeAnnotations == null) { this.visTypeAnnotations = new DataVectorAttr<>(methodData.pool, EAttribute.ATT_RuntimeVisibleTypeAnnotations); } this.visTypeAnnotations.add(typeAnnotationData); } } } } public void fillLineTable(List list) { if (lineNumberTable != null) { // Remove the automatically generated LineTable by jasm and instead, // include a table inline within the jasm source. lineNumberTable.clear(); } else { lineNumberTable = new DataVectorAttr<>(methodData.pool, EAttribute.ATT_LineNumberTable); attributes.add(lineNumberTable); } lineNumberTable.addAll(list); } /** * Fills either localVariableTable or localVariableTypeTable according to the boolean parameter isTypeTable * * @param isTypeTable defines which localVariableTypeTable or localVariableTable is filled * @param list list of local_variable_table[i] or local_variable_type_table[i] entries */ public void fillLocalVariableTable(boolean isTypeTable, List list) { DataVectorAttr vector = (isTypeTable) ? localVariableTypeTable : localVariableTable; if (vector == null) { vector = new DataVectorAttr<>(methodData.pool, (isTypeTable) ? EAttribute.ATT_LocalVariableTypeTable : EAttribute.ATT_LocalVariableTable); attributes.add(vector); } vector.addAll(list); } public void fillStackMapTable(List list) { if (stackMapTable == null) { DataVectorAttr table = (DataVectorAttr) attributes. findFirst(item -> item.getAttribute(). isOneOf(ATT_StackMapTable, ATT_StackMap)).orElse(null); if (table == null) { stackMapTable = new DataVectorAttr<>(classData.pool, classData.cfv.isTypeCheckingVerifier() ? ATT_StackMapTable : ATT_StackMap); attributes.add(stackMapTable); } else { stackMapTable = table; } } stackMapTable.addAll(list); } /* -------------------------------------- Traps */ RangePC trapDecl(long pos, String name) { RangePC local; if (trapsHash == null) { trapsHash = new HashMap<>(10); local = null; } else { local = trapsHash.get(name); } if (local == null) { local = new RangePC(pos, name); trapsHash.put(name, local); } return local; } void beginTrap(long pos, String name) { RangePC rangePC = trapDecl(pos, name); if (rangePC.start_pc != Indexer.NotSet) { environment.error("err.trap.tryredecl", name); return; } rangePC.start_pc = curPC; } void endTrap(long pos, String name) { RangePC rangePC = trapDecl(pos, name); if (rangePC.end_pc != Indexer.NotSet) { environment.error("err.trap.endtryredecl", name); return; } rangePC.end_pc = curPC; } void trapHandler(long pos, String name, Indexer type) { RangePC rangePC = trapDecl(pos, name); rangePC.isReferred = true; ExceptionData exceptionData = new ExceptionData(pos, rangePC, curPC, type); exceptionTable.addElement(exceptionData); } void checkTraps() { if (trapsHash == null) { return; } for (RangePC rangePC : trapsHash.values()) { if (!rangePC.isReferred) { environment.warning(rangePC.pos, "warn.trap.notref", rangePC.name); } } for (ExceptionData exceptionData : exceptionTable) { RangePC rangePCLabel = exceptionData.rangePC; if (rangePCLabel.start_pc == Indexer.NotSet) { environment.error(exceptionData.pos, "err.trap.notry", rangePCLabel.name); } if (rangePCLabel.end_pc == Indexer.NotSet) { environment.error(exceptionData.pos, "err.trap.noendtry", rangePCLabel.name); } } } // Labels Label labelDecl(String name) { Label local; if (labelsHash == null) { labelsHash = new HashMap<>(10); local = null; } else { local = labelsHash.get(name); } if (local == null) { local = new Label(name); labelsHash.put(name, local); } return local; } public Label LabelDef(long pos, String name) { Label label = labelDecl(name); if (label.isDefined) { environment.error(pos, "err.label.redecl", name); return null; } label.isDefined = true; label.cpIndex = curPC; return label; } public Label LabelRef(String name) { Label label = labelDecl(name); label.isReferred = true; return label; } void checkLabels() { if (labelsHash == null) { return; } for (Label local : labelsHash.values()) { // check that every label is defined if (!local.isDefined) { environment.error("err.label.undecl", local.name); } } } // LocalVariables /** * Constructs the local variable nameCell:descriptorCell assigned to the slot index. * * @param opcode var or type opcode that defines type of filled table -LocalVariableTypeTable or LocalVariableTable * @param position scanners' position to navigate where a syntax error happened if any * @param index a valid index into the local variable array of the current frame * @param nameCell valid unqualified name denoting a local variable * @param descriptorCell a field descriptor which encodes a type of local variable in the source program */ public void LocVarDataDef(OpcodeTables.Opcode opcode, long position, int index, ConstCell nameCell, ConstCell descriptorCell) { FieldType fieldType = null; List slots; LocalVariableData localVariableData = new LocalVariableData((short) index, (short) curPC, nameCell, descriptorCell); if (opcode == Opcode.opc_var) { slots = locVarSlots; fieldType = localVariableData.getFieldType(); if (localVariableTable == null) { localVariableTable = new DataVectorAttr<>(methodData.pool, EAttribute.ATT_LocalVariableTable); attributes.add(localVariableTable); } localVariableTable.add(localVariableData); } else { slots = locVarTypeSlots; if (localVariableTable != null) { LocalVariableData lvd = localVariableTable.findFirst(lv -> lv.getIndex() == index).orElse(null); if (lvd != null) { fieldType = lvd.getFieldType(); } } if (localVariableTypeTable == null) { localVariableTypeTable = new DataVectorAttr<>(methodData.pool, EAttribute.ATT_LocalVariableTypeTable); attributes.add(localVariableTypeTable); } localVariableTypeTable.add(localVariableData); } if (fieldType == null) { environment.throwErrorException(position, "err.fieldType.undecl", index); } else { localVariableData.setFieldType(fieldType); // check slot availability //If the given local variable is of type double or long, it occupies both index and index + 1 for (int i = 0; i < fieldType.getSlotsCount(); i++) { if (!max_locals.inRange(index + i)) { environment.throwErrorException(position, "err.locvar.wrong.index", index + i, max_locals.value() - 1); } if (slots.get(index + i) != VACANT) { environment.throwErrorException(position, "err.locvar.slot.occupied", index + i); } slots.set(index + i, localVariableData); // OCCUPIED } } } /** * Marks the end of Local Variable (Type) presented in the form endVar index: locVarSlots[slot] = VACANT * and sets the Length of the Local Var * * @param position the position of the scanner * @param slot The value of the index item is a valid index into the local variable array of the current frame. */ public void LocVarDataEnd(OpcodeTables.Opcode opcode, short slot, long position) { if (!max_locals.inRange(slot)) { environment.throwErrorException(position, "err.locvar.wrong.index", slot, max_locals.value() - 1); } final LocalVariableData localVariableData = (opcode == Opcode.opc_var) ? locVarSlots.get(slot) : locVarTypeSlots.get(slot); if (localVariableData == VACANT) { environment.throwErrorException(position, "err.locvar.undecl", slot); } else { localVariableData.setLength(curPC); // Check slot availability and clean up appropriate locVarSlots[slot{,slot+1}] or locVarTypeSlots[slot{,slot+1}] // If the given local variable is of type double or long, it occupies both index and index + 1 List slots = (opcode == Opcode.opc_var) ? locVarSlots : locVarTypeSlots; for (int i = 0; i < localVariableData.getSlotsCount(); i++) { if (i > 0 && !max_locals.inRange(slot + i)) { environment.error(position, "err.locvar.wrong.index", slot + i, max_locals.value() - 1); throw new SyntaxError(); } if (i > 0 && slots.get(slot + i) == VACANT) { environment.error(position, "err.locvar.undecl", slot + i); throw new SyntaxError(); } slots.set(slot + i, VACANT); } } } void checkLocVars(OpcodeTables.Opcode opcode) { List slots = (opcode == Opcode.opc_var) ? locVarSlots : locVarTypeSlots; for (int i = 0; i < slots.size(); i++) { if (slots.get(i) != VACANT) { slots.get(i).setLength(curPC); environment.warning(environment.getPosition(), (opcode == Opcode.opc_var) ? "warn.locvar.ambiqous" : "warn.loctype.ambiqous", i); } } } // The StackMap public StackMapData getStackMapTable() { StackMapData entry; int len = stackMapEntries.size(); if (len == 0) { entry = new StackMapData(environment, isTypeCheckingVerifier()); stackMapEntries.add(entry); } else { entry = stackMapEntries.get(len - 1); } return entry; } public StackMapData getNextStackMapTable() { StackMapData entry = new StackMapData(environment, isTypeCheckingVerifier()); stackMapEntries.add(entry); return entry; } // A class file whose version number is 50.0 or above (§4.1) must be verified using the type checking rules given // in the section 4.10.1. Verification by Type Checking public boolean isTypeCheckingVerifier() { return classData.cfv.isTypeCheckingVerifier(); } // Instructions void addInstr(long mnenoc_pos, Opcode opcode, Indexer arg, Object arg2) { Instr newInstr = new Instr(methodData, environment).set(curPC, environment.getPosition(), opcode, arg, arg2); lastInstr.next = newInstr; lastInstr = newInstr; int len = opcode.length(); switch (opcode) { case opc_tableswitch: len = ((SwitchTable) arg2).recalcTableSwitch(curPC); if (len >= MAX_TABLESWITCH_LENGTH) { environment.error(mnenoc_pos, "err.instr.oversize", opc_tableswitch.parseKey(), len, MAX_TABLESWITCH_LENGTH); } break; case opc_lookupswitch: len = ((SwitchTable) arg2).calcLookupSwitch(curPC); if (len >= MAX_LOOKUPSWITCH_LENGTH) { environment.error(mnenoc_pos, "err.instr.oversize", opc_lookupswitch.parseKey(), len, MAX_LOOKUPSWITCH_LENGTH); } break; case opc_ldc: ((ConstCell) arg).setRank(ConstantPool.ReferenceRank.LDC); break; default: if (arg instanceof ConstCell) { ConstantPool.ReferenceRank rank = ((ConstCell) arg).rank; if (rank != ConstantPool.ReferenceRank.LDC) { ((ConstCell) arg).setRank(ConstantPool.ReferenceRank.ANY); } } } if (environment.getVerboseFlag()) { long ln = environment.lineNumber(mnenoc_pos); if (ln != lastLineNumber) { // only one entry in lineNumberTable per line lineNumberTable.add(new LineNumberData(curPC, ln)); lastLineNumber = ln; } } if (!stackMapEntries.isEmpty()) { StackMapData prevStackFrame = getPreviousStackMapEntry(); for (StackMapData entry : stackMapEntries) { if (!entry.isWrapper()) { entry.setPC(curPC); entry.setOffset(prevStackFrame); } } stackMapTable.addAll(stackMapEntries); stackMapEntries.clear(); } curPC += len; } private StackMapData getPreviousStackMapEntry() { if (stackMapTable == null) { stackMapTable = new DataVectorAttr<>(classData.pool, classData.cfv.isTypeCheckingVerifier() ? ATT_StackMapTable : ATT_StackMap); attributes.add(stackMapTable); } else if (!stackMapTable.isEmpty()) { for (int i = stackMapTable.size() - 1; i >= 0; i--) { StackMapData entry = stackMapTable.get(i); if (!entry.isWrapper()) { return entry; } } } return null; } @Override public int attrLength() { return 2 + 2 + 4 // for max_stack, max_locals, and cur_pc + curPC // + 2+trap_table.size()*8 + exceptionTable.getLength() + attributes.getLength(); } @Override public void write(CheckedDataOutputStream out) throws IOException, Parser.CompilerError { int maxStack = (max_stack != null) ? max_stack.cpIndex : 0; int maxLocals = (max_locals != null) ? max_locals.cpIndex : max(locVarSlots.size(), locVarTypeSlots.size()); super.write(out); // attr name, attr len out.writeShort(maxStack); out.writeShort(maxLocals); out.writeInt(curPC); for (Instr instr = zeroInstr.next; instr != null; instr = instr.next) { instr.write(out); } exceptionTable.write(out); attributes.write(out); } /** * Checks if the code attribute is empty, i.e., it contains no instructions. * * @return true if the code attribute is empty, false otherwise */ public boolean isEmpty() { return curPC == 0; } /* CodeAttr inner classes */ static public class Local extends Indexer { String name; boolean isDefined = false, isReferred = false; public Local(String name) { this.name = name; } } static public class Label extends Local { public Label(String name) { super(name); } } static class RangePC extends Local { int start_pc = Indexer.NotSet; int end_pc = Indexer.NotSet; long pos; RangePC(long pos, String name) { super(name); this.pos = pos; } } } // end CodeAttr jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ConstCell.java000066400000000000000000000102701514323636100257450ustar00rootroot00000000000000/* * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; import java.util.Objects; /** * ConstantCell is a type of data that can be in a constant pool. */ public class ConstCell extends Indexer implements ConstantPoolDataVisitor { V ref; // 0 - highest - ref from ldc, 1 - any ref, 2 - no ref ConstantPool.ReferenceRank rank = ConstantPool.ReferenceRank.NO; // status flag private int flag; ConstCell(int id, V ref) { this.cpIndex = id; this.ref = ref; } ConstCell(V ref) { this(NotSet, ref); } ConstCell(int id) { this(id, null); } public int getFlag() { return flag; } public ConstCell setFlag(int flag) { this.flag = flag; return this; } @Override public final boolean isSet() { return super.isSet() && ((this.ref != null && this.ref.value != null) || (ref instanceof ConstantPool.ConstValue_Zero)); } public ClassFileConst.ConstType getType() { return ref == null ? ClassFileConst.ConstType.CONSTANT_UNKNOWN : ref.tag; } public char getAnnotationElementTypeValue() { return ref == null ? ClassFileConst.AnnotationElementType.AE_NOT_APPLICABLE.tag() : ref.tag.getAnnotationElementTypeValue(); } @Override public int getLength() { return 2; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(cpIndex); } public void setRank(ConstantPool.ReferenceRank rank) { // don't change a short ref to long due to limitation of ldc - max 256 indexes allowed // ConstantPool.ReferenceRank.LDC has high priority if (this.rank.priority > rank.priority) { this.rank = rank; } } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof ConstCell)) return false; ConstCell constCell = (ConstCell) obj; return (Objects.equals(ref, constCell.ref) && rank == constCell.rank && cpIndex == constCell.cpIndex); } public boolean equalsByValue(Object obj) { if (this == obj) return true; if (!(obj instanceof ConstCell)) return false; ConstCell constCell = (ConstCell) obj; // (a == b) || (a != null && a.equals(b)) if (this.ref == constCell.ref) return true; if (this.ref != null && ref instanceof ConstValue) { if (constCell.ref instanceof ConstValue) { return this.ref.equalsByValue(constCell.ref); } return false; } else { return Objects.equals(ref, constCell.ref); } } @Override public int hashCode() { int result = super.hashCode(); result = 31 * (result + (ref != null ? ref.hashCode() : 0)); return result; } @Override public String toString() { return "#" + ((cpIndex == NotSet) ? "?" : cpIndex) + "=" + ref; } @Override public T visit(ConstantPool pool) { return visitConstCell(this, pool); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ConstValue.java000066400000000000000000000057561514323636100261570ustar00rootroot00000000000000/* * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; /** * A (typed) tagged value in the constant pool like ConstCell */ public abstract class ConstValue { protected T value; protected final ClassFileConst.ConstType tag; public ConstValue(ClassFileConst.ConstType tag, T value) { this.tag = tag; this.value = value; } public int size() { return 1; } public boolean isSet() { return value != null; } public ConstValue setValue(T value) { this.value = value; return this; } @Override public int hashCode() { int result = value != null ? value.hashCode() : 0; result = 31 * result + tag.hashCode(); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof ConstValue)) return false; ConstValue that = (ConstValue) obj; return (this.value.equals(that.value) && this.tag == that.tag); } public boolean equalsByValue(Object obj) { if (this == obj) return true; if (!(obj instanceof ConstValue)) return false; ConstValue that = (ConstValue) obj; if( this.value instanceof ConstCell ) { if( that.value instanceof ConstCell ) { return (((ConstCell)this.value).equalsByValue(that.value) && this.tag == that.tag); } return false; } return (this.value.equals(that.value) && this.tag == that.tag); } @Override public String toString() { return String.format("[%s : '%s']", tag.toString(), asString() ) ; } /** * @return String presentation of the value. */ public String asString() { return (value == null) ? "?" : value.toString(); } public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(tag.getTag()); } } // end ConstValue jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ConstantPool.java000066400000000000000000001134761514323636100265160ustar00rootroot00000000000000/* * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.asmutils.Range; import org.openjdk.asmtools.jasm.ClassFileConst.ConstType; import java.io.IOException; import java.util.*; import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.Collectors; import static java.lang.Math.max; import static java.lang.String.format; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.*; /** * ConstantPool is the class responsible for maintaining constants for a given class file. */ public class ConstantPool implements Iterable> { static final int PROCESSED = 2; static final int NON_PROCESSED = 0; private final ConstValue_UTF8 emptyConstValue = new ConstValue_UTF8(""); private final ConstCell nullConst = new ConstCell(null); private final ConstCell zeroConst = new ConstCell(new ConstValue_Zero()); // For hashing by value private final ArrayList> pool = new ArrayList<>(40); public JasmEnvironment environment; public LinkedHashMap, ConstCell> ConstantPoolHashByValue = new LinkedHashMap<>(40); private final CPVisitor indexFixerConstantPool = new CPVisitor() { @Override public void visitConstValueCell(ConstValue_Cell constValue) { handleClassIndex(constValue); } @Override public void visitConstValueRefCell(ConstValue_Pair constValue) { handleMemberIndex(constValue); } @Override public void visitMethodHandle(ConstValue_MethodHandle constValue) { handleIndexCell((ConstCell) constValue.value); } }, referenceFixerConstantPool = new CPVisitor() { @Override public void visitConstValueCell(ConstValue_Cell constValue) { handleClassRef(constValue); } @Override public void visitConstValueRefCell(ConstValue_Pair constValue) { handleMemberRef(constValue); } @Override public void visitMethodHandle(ConstValue_MethodHandle constValue) { handleRefCell((ConstCell) constValue.value); } }; /** * Main constructor * * @param environment The error reporting environment */ public ConstantPool(JasmEnvironment environment) { this.environment = environment; pool.add(zeroConst); } @Override public Iterator> iterator() { return pool.iterator(); } protected void handleClassRef(ConstValue_Cell cell) { ConstCell refCell = (ConstCell) cell.value; if (handleRefCell(refCell)) { environment.traceln(() -> "FIXED ConstPool[" + refCell.cpIndex + "](" + cell.tag.toString() + ") = " + cell.value); } } protected void handleMemberRef(ConstValue_Pair cv) { Pair pair = (Pair) cv.value; if (handleRefCell(pair.first)) { environment.traceln(() -> "FIXED Left:ConstPool[" + pair.first.cpIndex + "](" + cv.tag.toString() + ") = " + pair.first.ref); } if (handleRefCell(pair.second)) { environment.traceln(() -> "FIXED Right:ConstPool[" + pair.second.cpIndex + "](" + cv.tag.toString() + ") = " + pair.second.ref); } } /** * Updates reference cell if there is cpIndex but a cell is not attached. * * @param refCell a constant cell * @return true if the cell is fixed */ private boolean handleRefCell(ConstCell refCell) { if (refCell.ref == null) { ConstCell refVal = getConstPollCellByIndex(refCell.cpIndex); if (refVal != null) { checkAndFixCPRef(refVal); refCell.ref = refVal.ref; return true; } } return false; } protected void handleClassIndex(ConstValue_Cell cell) { ConstCell refCell = (ConstCell) cell.value; if (handleIndexCell(refCell)) { environment.traceln(() -> "FIXED Index of ConstPool[" + refCell.cpIndex + "](" + cell.tag.toString() + ") = " + cell.value); } } protected void handleMemberIndex(ConstValue_Pair cv) { Pair pair = (Pair) cv.value; if (handleIndexCell(pair.first)) { environment.traceln(() -> "FIXED Index of Left:ConstPool[" + pair.first.cpIndex + "](" + cv.tag.toString() + ") = " + pair.first.ref); } if (handleIndexCell(pair.second)) { environment.traceln(() -> "FIXED Index of Right:ConstPool[" + pair.second.cpIndex + "](" + cv.tag.toString() + ") = " + pair.second.ref); } } /** * Updates reference cell if there is an attached cell but cpIndex is missing. * * @param refCell a constant cell * @return true if the cell is fixed */ private boolean handleIndexCell(ConstCell refCell) { if (refCell.ref != null && !refCell.isSet()) { Optional> cell = getItemizedCell(refCell); if (cell.isPresent()) { refCell.cpIndex = cell.get().cpIndex; return true; } } return false; } /* * Fix Refs in constant pool. * * This is used when scanning JASM files produced from JDis with the verbose * option (eg. where the constant pool is declared in the jasm itself). In * this scenario, we need two passes - the first pass to scan the entries * (which creates constant references with indexes, but no reference values); * and the second pass, which links references to existing constants. */ public void fixRefsInPool() { // Simply iterating through the pool the method is used to fix CP refs // when a constant pool is constructed by refs alone. environment.traceln("fixRefsInPool: Fixing CP for %d explicit Constant Entries", pool.size()); for (ConstCell item : pool) { checkAndFixCPRef(item); } } /* * Fix Indexes in constant pool. */ public void fixIndexesInPool() { // Simply iterate through the pool the method is used to fix CP Indexes // when a constant pool is constructed by values alone. environment.traceln("fixIndexesInPool: Fixing CP for %d explicit Constant Entries.", pool.size()); for (ConstCell item : pool) { checkAndFixCPIndexes(item); } } protected void checkGlobals() { environment.traceln("Checking Globals"); // This fn will put empty UTF8 string entries on any unset // CP entries - before the last CP entry. for (int cpx = 1; cpx < pool.size(); cpx++) { ConstCell cell = pool.get(cpx); if (cell == nullConst) { // gap cell = new ConstCell(cpx, emptyConstValue); pool.set(cpx, cell); } if (!cell.isSet()) { String name = Integer.toString(cpx); environment.error("err.const.undecl", name); } } } /* * Helper function for "fixRefsInPool" * Does recursive checking of references, using a locally-defined visitor. */ private void checkAndFixCPRef(ConstCell item) { ConstValue cv = item.ref; if (cv != null) { referenceFixerConstantPool.visit(cv); } } /* * Helper function for "fixIndexesInPool" * Does recursive checking of indexes, using a locally-defined visitor. */ private void checkAndFixCPIndexes(ConstCell item) { ConstValue cv = item.ref; if (cv != null) { indexFixerConstantPool.visit(cv); } } /* * Help debug Constant Pools */ public void printPool() { int i = 0; for (ConstCell item : pool) { environment.traceln(" const #%4d: %s".formatted(i++, item)); } } public Range getBounds() { return new Range<>(1, pool.size() - 1); } public ConstCell getConstPollCellByIndex(int cpIndex) { if (cpIndex >= pool.size()) { return null; } return pool.get(cpIndex); } private void cpool_set(int cpx, ConstCell cell, int sz) { environment.traceln(() -> "cpool_set1: " + cpx + " " + cell); environment.traceln(() -> "param_size: " + sz); environment.traceln(() -> "pool_size : " + pool.size()); cell.cpIndex = cpx; if (cpx + sz >= pool.size()) { environment.traceln(() -> "calling ensureCapacity( " + (cpx + sz + 1) + " )"); int low = pool.size(); int high = cpx + sz; if (high - low > sz) { String msg = (low == high - sz - 1) ? "#%d".formatted(low) : "#%d-#%d".formatted(low, high - sz - 1); environment.warning("warn.const.fill", msg); } for (int i = 0; i < high - low; i++) { pool.add(nullConst); } } pool.set(cpx, cell); if (sz == 2) { pool.set(cpx + 1, new ConstCell(cpx + 1, emptyConstValue)); } environment.traceln(() -> "cpool_set2: " + cpx + " " + cell); } private void delete(int cpx) { environment.traceln(() -> "delete cell(" + cpx + ")"); Consumer> op = cell -> { if (cell.getFlag() == NON_PROCESSED) { if (cell.cpIndex > cpx) { cell.cpIndex--; environment.traceln(() -> "\tcell from " + (cell.cpIndex + 1) + " to " + cell); } cell.setFlag(PROCESSED); } }; for (int i = 1; i < pool.size(); i++) { if (i != cpx) { ConstCell constCell = uncheckedGetCell(i); this.traverseConstantCell(constCell, op); } } pool.remove(cpx); pool.forEach(cell -> cell.setFlag(NON_PROCESSED)); } private void traverseConstantCell(ConstCell constCell, Consumer> op) { if (constCell != null && constCell instanceof ConstCell) { if (constCell instanceof ConstCell) { if (op != null) op.accept(constCell); ConstValue constValue = constCell.ref; if (constValue != null) { switch (constValue.tag) { case CONSTANT_CLASS, CONSTANT_STRING, CONSTANT_MODULE, CONSTANT_PACKAGE, CONSTANT_METHODTYPE, CONSTANT_DYNAMIC, CONSTANT_INVOKEDYNAMIC -> { traverseConstantCell((ConstCell) constValue.value, op); } case CONSTANT_METHODHANDLE, CONSTANT_NAMEANDTYPE, CONSTANT_FIELDREF, CONSTANT_METHODREF, CONSTANT_INTERFACEMETHODREF -> { Pair, ConstCell> pair = (Pair, ConstCell>) constValue.value; traverseConstantCell(pair.first, op); traverseConstantCell(pair.second, op); } } } } } } protected ConstCell uncheckedGetCell(int cpx) { // by index return pool.get(cpx); } public ConstCell getCell(int cpx) { // by index ConstCell cell = getConstPollCellByIndex(cpx); if (cell != null) { return cell; } cell = new ConstCell(cpx, null); return cell; } public void setCell(int cpx, ConstCell cell) { ConstValue value = cell.ref; if (value == null) { environment.throwErrorException("err.constcell.null.val", cpx); } int sz = value.size(); if (cpx == 0) { // It is correct to warn about redeclaring constant zero, // since this value is never written out to a class file. environment.warning("warn.const0.redecl"); } else { if ((getConstPollCellByIndex(cpx) != null) || ((sz == 2) && (getConstPollCellByIndex(cpx + 1) != null))) { environment.error("err.const.redecl", "#" + cpx, "#" + max(cpx - 1, 0)); return; } if (cell.isSet() && (cell.cpIndex != cpx)) { cell = new ConstCell(value); environment.traceln("setCell: new ConstCell " + cell); } } cpool_set(cpx, cell, sz); } public Optional> getItemizedCell(ConstCell cell) { final ConstValue value = cell.ref; if (value == null) { if (getBounds().in(cell.cpIndex)) { return Optional.ofNullable(getConstPollCellByIndex(cell.cpIndex)); } else if (cell.isSet()) { environment.throwErrorException("err.constcell.null.val", cell.cpIndex); } else { environment.throwErrorException("err.constcell.is.undef"); } } return ConstantPoolHashByValue.values().stream(). filter(v -> v.isSet() && v.getType() == value.tag && v.ref.equalsByValue(value)). findFirst(); } private ConstCell itemizeCell(ConstCell cell) { Optional> optionalCell = getItemizedCell(cell); if (optionalCell.isPresent()) { ConstCell cpCell = optionalCell.get(); if (cpCell.rank != cell.rank) { cpCell.setRank(cell.rank); } return cpCell; } else { final int cellSize = cell.ref.size(); final int cpIndex = findVacantSlot(cellSize); cpool_set(cpIndex, cell, cellSize); return uncheckedGetCell(cpIndex); } } protected void itemizePool() { environment.traceln("itemizePool"); for (ReferenceRank rank : ReferenceRank.values()) { for (ConstCell cell : ConstantPoolHashByValue.values().stream().filter(v -> !v.isSet() && rank.equals(v.rank)).toList()) { // find already set ConstCell having cpIndex.isSet && value == value of ConstCell where cpIndex is not set. // they should be equal by value i.e. cpIndex should not be taken into account itemizeCell(cell); } } ConstCell firstCell = getConstPollCellByIndex(0); firstCell.cpIndex = 0; } protected ConstCell specifyCell(ConstCell cell) { environment.traceln("itemizeCell"); return cell.isSet() ? cell : itemizeCell(cell); } private int findVacantSlot(int cellSize) { int index = 1; for (; index < pool.size(); index++) { if (pool.get(index) == nullConst && ((cellSize == 1) || pool.get(index + 1) == nullConst)) { break; } } return index; } public boolean cellFound(final T ref) { if (ref == null) { environment.throwErrorException("err.constcell.is.null"); } ConstCell cell = ConstantPoolHashByValue.get(ref); if (cell != null) { // If we found a cached ConstValue ConstValue value = cell.ref; if (value.equals(ref)) { return true; } } return false; } public ConstCell findCell(final T ref) { if (ref == null) { environment.throwErrorException("err.constcell.is.null"); } ConstCell cell = ConstantPoolHashByValue.get(ref); if (cell != null) { // If we found a cached ConstValue ConstValue value = cell.ref; if (!value.equals(ref)) { environment.throwErrorException("err.values.not.eq", ref.toString(), value.toString()); } environment.traceln(format("ConstantPoolHashByValue.got ('%s') for '%s'", cell, ref)); } else { // If we didn't find a cached ConstValue add it to the cache cell = new ConstCell(ref); ConstantPoolHashByValue.put(ref, cell); environment.traceln("ConstantPoolHashByValue.put ('%s','%s')", ref, cell); } return cell; } public ConstCell findNameAndTypeCell(ConstantPool.ConstValue_NameAndType ref) { return findCell(ref); } public ConstCell findIntegerCell(Integer value) { return findCell(new ConstValue_Integer(CONSTANT_INTEGER, value)); } public ConstCell findFloatCell(Integer value) { return findCell(new ConstValue_Float(value)); } public ConstCell findLongCell(Long value) { return findCell(new ConstValue_Long(value)); } public ConstCell findDoubleCell(Long value) { return findCell(new ConstValue_Double(value)); } public ConstCell findUTF8Cell(String value) { return findCell(new ConstValue_UTF8(value)); } public ConstCell lookupUTF8Cell(Function rule) { return ConstantPoolHashByValue.entrySet().stream(). filter(entry -> entry.getKey().tag == CONSTANT_UTF8 && rule.apply((String) (entry.getKey().value))). findFirst().map(entry -> entry.getValue()). orElse(null); } public ConstCell findClassCell(NameInfo nameInfo) { return findCell(CONSTANT_CLASS, nameInfo); } public ConstCell findClassCell(String name) { return findCell(CONSTANT_CLASS, findUTF8Cell(name)); } public ConstCell findModuleCell(NameInfo nameInfo) { return findCell(CONSTANT_MODULE, nameInfo); } public ConstCell findModuleCell(String name) { return findCell(CONSTANT_MODULE, findUTF8Cell(name)); } public ConstCell findPackageCell(String name) { return findCell(CONSTANT_PACKAGE, findUTF8Cell(name)); } public ConstCell findPackageCell(NameInfo nameInfo) { return findCell(CONSTANT_PACKAGE, nameInfo); } public ConstCell findCell(ConstType tag, ConstCell value) { return findCell(new ConstValue_Cell(tag, value)); } public ConstCell findCell(ConstType tag, ConstCell left, ConstCell right) { return findCell(new ConstValue_Pair(tag, left, right)); } public ConstCell findCell(ConstType tag, NameInfo nameInfo) { if (nameInfo.isEmpty()) { // throw exception if empty nameInfo environment.throwErrorException("err.constcell.empty.nameInfo", "ConstantPool::FindCell"); } else if (nameInfo.cpIndex() > 0) { // find and check that cpIndex refers to the cell with tag ConstCell cell = getConstPollCellByIndex(nameInfo.cpIndex()); if (cell != null && cell.ref.tag == tag) { return cell; } environment.throwErrorException("err.cpindex.notfound", nameInfo.cpIndex()); } return findCell(tag, findUTF8Cell(nameInfo.name())); } public void write(CheckedDataOutputStream out) throws IOException { // Write the constant pool int length = pool.size(); out.writeShort(length); int i; environment.traceln(() -> "wr.pool:size=" + length); for (i = 1; i < length; ) { ConstCell cell = pool.get(i); ConstValue value = cell.ref; if (cell.cpIndex != i) { environment.throwErrorException("err.constcell.invarg", Integer.toString(i), cell.cpIndex); } value.write(out); i += value.size(); } } public ArrayList> getPoolCellsByType(ClassFileConst.ConstType... types) { return pool.stream().filter(c -> c.getType().oneOf(types)).collect(Collectors.toCollection(ArrayList::new)); } public ArrayList> getPoolValuesByRefType(ClassFileConst.ConstType... types) { return pool.stream().filter(c -> c.ref != null && c.getType().oneOf(types)). collect(Collectors.toCollection(ArrayList::new)); } /** * Removes ClassCell entry from the Constant Pool * * @param cell the Constant Pool cell ConstCell */ public void removeClassCell(ConstCell cell) { int indCls, indUtf8 = 0; if (cell != null) { if (cell.getType() == CONSTANT_CLASS) { if (cell.ref != null) { ConstCell utf8Cell = cell.ref.value; if (!isAllowedToBeDelete(utf8Cell)) return; indUtf8 = utf8Cell.cpIndex; } indCls = cell.cpIndex; this.delete(indCls); this.delete(indCls > indUtf8 ? indUtf8 : indUtf8 - 1); } else { environment.warning("warn.cannot.delete.class.cell", cell); } } } /** * @return true if the class name belongs to JDK public API */ private boolean isAllowedToBeDelete(ConstCell utf8Cell) { if (utf8Cell.ref.value != null) { String className = utf8Cell.ref.value; if (className.startsWith("java/") || className.startsWith("javax/")) // className.startsWith("jdk/") || className.startsWith("com/sun/tools/") || className.startsWith("org/w3c")) return false; } return true; } public enum ReferenceRank { LDC(0), // 0 - highest - ref from ldc ANY(1), // 1 - any ref NO(2); // 2 - no ref final int priority; ReferenceRank(int priority) { this.priority = priority; } } /** * CONSTANT_ZERO: Zero Constant Value presents Constant 0. */ static public class ConstValue_Zero extends ConstValue { public ConstValue_Zero() { super(CONSTANT_ZERO, (Void) null); } @Override public boolean isSet() { return true; } @Override public void write(CheckedDataOutputStream out) throws IOException { throw new RuntimeException("Trying to write Constant 0."); } } /** * CONSTANT_UTF8(1) is used to represent constant objects of the type: String */ static public class ConstValue_UTF8 extends ConstValue { public ConstValue_UTF8(String value) { super(CONSTANT_UTF8, value); } @Override public String asString() { return value; } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); out.writeUTF(value); } } /** * CONSTANT_Integer(3) structure represents 4-byte numeric (int) constants */ static public class ConstValue_Integer extends ConstValue { public ConstValue_Integer(ClassFileConst.ConstType tag, Integer value) { super(tag, value); } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); out.writeInt(value); } } /** * CONSTANT_Float(4) structure represents 4-byte numeric (float) constants */ static public class ConstValue_Float extends ConstValue { public ConstValue_Float(Integer value) { super(CONSTANT_FLOAT, value); } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); out.writeInt(value); } } /** * The CONSTANT_Long_info(5) represents 8-byte numeric (long) constants */ static public class ConstValue_Long extends ConstValue { public ConstValue_Long(Long value) { super(CONSTANT_LONG, value); } @Override public int size() { return 2; } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); out.writeLong(value); } } /** * The CONSTANT_Double(6) represents 8-byte numeric (double) constants */ static public class ConstValue_Double extends ConstValue { public ConstValue_Double(Long value) { super(CONSTANT_DOUBLE, value); } @Override public int size() { return 2; } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); out.writeLong(value); } } /** * CONSTANT_Cell represents CONSTANT_Class(7), CONSTANT_String(8), CONSTANT_MethodType(16), * CONSTANT_Module(19), CONSTANT_Package(20) constants */ static public class ConstValue_Cell> extends ConstValue> { public ConstValue_Cell(ConstType tag, ConstCell constCell) { super(tag, constCell); } @Override public String toString() { return format("[%s %s]", super.tag.toString(), value.toString()); } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); value.write(out); } @Override public boolean isSet() { return super.isSet() && value.isSet() && value.ref.isSet(); } @Override public int hashCode() { int result = value != null ? value.hashCode() : 0; result = 31 * result + tag.hashCode(); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof ConstValue_Cell)) return false; ConstValue_Cell that = (ConstValue_Cell) obj; return (Objects.equals(this.value, that.value) && this.tag == that.tag); } } /** * The CONSTANT_Class(7) structure represents constant objects of the type String */ static public class ConstValue_Class extends ConstValue_Cell { public ConstValue_Class(ConstCell value) { super(CONSTANT_CLASS, value); } } /** * The CONSTANT_Module(19) structure represents a module */ static public class ConstValue_Module extends ConstValue_Cell { public ConstValue_Module(ConstCell value) { super(CONSTANT_MODULE, value); } } /** * The CONSTANT_Package(20) structure represents a method type */ static public class ConstValue_Package extends ConstValue_Cell { public ConstValue_Package(ConstCell value) { super(CONSTANT_PACKAGE, value); } } /** * The CONSTANT_String(8) structure represents a class or an interface */ static public class ConstValue_String extends ConstValue_Cell { public ConstValue_String(ConstCell value) { super(CONSTANT_STRING, value); } } /** * The CONSTANT_MethodType(16) structure represents a method type */ static public class ConstValue_MethodType extends ConstValue_Cell { public ConstValue_MethodType(ConstCell value) { super(CONSTANT_METHODTYPE, value); } } /** * ConstValue_Pair represents CONSTANT_NameAndType(12), CONSTANT_Fieldref(9), CONSTANT_Methodref(10), and * CONSTANT_InterfaceMethodref(11) structures */ static public class ConstValue_Pair extends ConstValue, ConstCell>> { public ConstValue_Pair(ConstType tag, Pair, ConstCell> pair) { super(tag, pair); } public ConstValue_Pair(ConstType tag, ConstCell left, ConstCell right) { this(tag, new Pair(left, right)); } @Override public boolean isSet() { return super.isSet() && value.first.isSet() & value.second.isSet(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof ConstValue_Pair)) return false; ConstValue_Pair that = (ConstValue_Pair) obj; if (this.tag == that.tag) { if ((this.value.first).equals(that.value.first) && (this.value.second).equals(that.value.second)) { return true; } } return false; } @Override public boolean equalsByValue(Object obj) { if (this == obj) return true; if (!(obj instanceof ConstValue_Pair)) return false; ConstValue_Pair that = (ConstValue_Pair) obj; if (this.tag == that.tag) { if ((this.value.first).equalsByValue(that.value.first) && (this.value.second).equalsByValue(that.value.second)) { return true; } } return false; } @Override public String toString() { return format("%s[%s,%s]", super.tag.toString(), value.first.toString(), value.second.toString()); } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); if (tag == CONSTANT_METHODHANDLE) { out.writeByte(value.first.cpIndex); // write subtag value } else { out.writeShort(value.first.cpIndex); } out.writeShort(value.second.cpIndex); } } /** * The CONSTANT_NameAndType(12) structure is used to represent a field or method, without indicating which class or * interface type it belongs to */ static public class ConstValue_NameAndType extends ConstValue_Pair { public ConstValue_NameAndType(ConstCell name, ConstCell descriptor) { super(CONSTANT_NAMEANDTYPE, name, descriptor); } } /** * The CONSTANT_Methodref(10) structure is used to represent a method */ static public class ConstValue_MethodRef extends ConstValue_Pair { public ConstValue_MethodRef(ConstCell classCell, ConstCell nameAndType) { super(CONSTANT_METHODREF, classCell, nameAndType); } } /** * The CONSTANT_InterfaceMethodref(11) structure is used to represent an interface method */ static public class ConstValue_InterfaceMethodRef extends ConstValue_Pair { public ConstValue_InterfaceMethodRef(ConstCell interfaceCell, ConstCell nameAndType) { super(CONSTANT_INTERFACEMETHODREF, interfaceCell, nameAndType); } } /** * The CONSTANT_Fieldref(9) structure is used to represent a field */ static public class ConstValue_FieldRef extends ConstValue_Pair { public ConstValue_FieldRef(ConstCell classCell, ConstCell nameAndType) { super(CONSTANT_FIELDREF, classCell, nameAndType); } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); } @Override public boolean equals(Object obj) { return super.equals(obj); } @Override public boolean equalsByValue(Object obj) { return super.equalsByValue(obj); } } /** * The CONSTANT_MethodHandle(15) structure is used to represent a method handle * T : ConstValue_MethodRef, ConstValue_InterfaceMethodRef or ConstValue_FieldRef */ static public class ConstValue_MethodHandle

> extends ConstValue> { final ClassFileConst.SubTag kind; public ConstValue_MethodHandle(ClassFileConst.SubTag kind, ConstCell

value) { super(CONSTANT_METHODHANDLE, value); this.kind = kind; } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); out.writeByte(kind.value()); value.write(out); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof ConstValue_MethodHandle)) return false; if (!super.equals(obj)) return false; ConstValue_MethodHandle that = (ConstValue_MethodHandle) obj; return kind == that.kind; } @Override public boolean equalsByValue(Object obj) { if (this == obj) return true; if (!(obj instanceof ConstValue_MethodHandle)) return false; if (!super.equalsByValue(obj)) return false; ConstValue_MethodHandle that = (ConstValue_MethodHandle) obj; return kind == that.kind; } @Override public int hashCode() { int result = super.hashCode(); result = 31 * result + kind.hashCode(); return result; } } static public class ConstValue_BootstrapMethod extends ConstValue { private BootstrapMethodData bsmData; public ConstValue_BootstrapMethod(ConstType tag, BootstrapMethodData bsmdata, ConstCell value) { super(tag, value); this.bsmData = bsmdata; } public BootstrapMethodData bsmData() { return bsmData; } public void setBsmData(BootstrapMethodData bsmData, int methodAttrIndex) { this.bsmData = bsmData; this.bsmData.cpIndex = methodAttrIndex; } public void setBsmData(BootstrapMethodData bsmData) { this.bsmData = bsmData; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof ConstValue_BootstrapMethod)) return false; if (!super.equals(obj)) return false; ConstValue_BootstrapMethod that = (ConstValue_BootstrapMethod) obj; return bsmData.equals(that.bsmData); } @Override public boolean equalsByValue(Object obj) { if (this == obj) return true; if (!(obj instanceof ConstValue_BootstrapMethod)) return false; if (!super.equalsByValue(obj)) return false; ConstValue_BootstrapMethod that = (ConstValue_BootstrapMethod) obj; return bsmData.equalsByValue(that.bsmData); } @Override public int hashCode() { int result = super.hashCode(); result = 31 * result + bsmData.hashCode(); return result; } @Override public boolean isSet() { return super.isSet() && bsmData != null; } @Override public String toString() { return super.toString() + "{" + bsmData + "," + value + "}"; } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); out.writeShort(bsmData.cpIndex); out.writeShort(value.cpIndex); } } /** * The CONSTANT_Dynamic (17) structure is used to represent a dynamically-computed constant, an arbitrary value * that is produced by invocation of a bootstrap method in the course of a ldc instruction, among others. * The auxiliary type specified by the structure constrains the type of the dynamically-computed constant. */ static public class ConstValue_Dynamic extends ConstValue_BootstrapMethod { public ConstValue_Dynamic(BootstrapMethodData bsmData, ConstCell napeCell) { super(CONSTANT_DYNAMIC, bsmData, napeCell); assert (tag == CONSTANT_DYNAMIC && ConstValue_Dynamic.class.isAssignableFrom(getClass())) || tag == CONSTANT_INVOKEDYNAMIC && ConstValue_InvokeDynamic.class.isAssignableFrom(getClass()); } } /** * The CONSTANT_InvokeDynamic_info(18) structure is used to represent a dynamically-computed call site, an instance of * java.lang.invoke.CallSite that is produced by invocation of a bootstrap method in the course of an invokedynamic instruction. * The auxiliary type specified by the structure constrains the method type of the dynamically-computed call site. */ static public class ConstValue_InvokeDynamic extends ConstValue_BootstrapMethod { public ConstValue_InvokeDynamic(BootstrapMethodData bsmData, ConstCell napeCell) { super(CONSTANT_INVOKEDYNAMIC, bsmData, napeCell); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ConstantPoolDataVisitor.java000066400000000000000000000054301514323636100306560ustar00rootroot00000000000000/* * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.*; /** * Writable data could be undefined until Constant Pool is filled in */ public interface ConstantPoolDataVisitor extends DataWriter { T visit(ConstantPool pool); default T visitData(T cpData, ConstantPool pool) { T data = ((ConstantPoolDataVisitor) cpData).visit(pool); if (data.getClass().isAssignableFrom(ConstCell.class)) { ConstCell cell = (ConstCell) data; ClassFileConst.ConstType type = cell.getType(); if (type.oneOf(CONSTANT_INTEGER, CONSTANT_FLOAT, CONSTANT_LONG, CONSTANT_DOUBLE, CONSTANT_UTF8)) { data = (T) new ParseAnnotation.ConstElemValue(type.getAnnotationElementTypeValue(), cell); } else { data = (T) new ParseAnnotation.ClassElemValue(cell); } // } else if (type.oneOf(CONSTANT_CLASS)) { // data = (T) new ParserAnnotation.ClassElemValue(cell); // } else { // data = (T) new ParserAnnotation.ClassElemValue(refCell); // } /// annotation value refers to unknown data type // pool.env.error("unknown.annotation.data", cpData.getClass().getSimpleName()); // throw new Scanner.SyntaxError().Fatal(); } return data; } default T visitConstCell(ConstCell cell, ConstantPool pool) { ConstCell refCell; if (!cell.isSet()) { refCell = pool.uncheckedGetCell(cell.cpIndex); } else { refCell = new ConstCell(cell.cpIndex, cell.ref); } cell.ref = refCell.ref; return (T) cell; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ConstantPoolIndexData.java000066400000000000000000000046041514323636100302700ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; import static org.openjdk.asmtools.jdis.Indenter.UNDEFINED; /** * Writable element of the DataVector u2 vector[elements]; *

* u2 unset_fields[number_of_unset_fields]; * Each entry in the unset_fields array must be a valid index into the constant_pool table. * The constant_pool entry at that index must be a CONSTANT_NameAndType_info structure with a field descriptor. */ public class ConstantPoolIndexData implements DataWriter { ConstCell nameAndType = null; ConstantPool pool = null; int cpIndex = UNDEFINED; public ConstantPoolIndexData(ConstCell nameAndType, ConstantPool pool) { this.nameAndType = nameAndType; this.pool = pool; } public ConstantPoolIndexData(int cpIndex) { this.cpIndex = cpIndex; } @Override public void write(CheckedDataOutputStream out) throws IOException { if (cpIndex == UNDEFINED) { cpIndex = nameAndType.cpIndex; } if (cpIndex == UNDEFINED) { throw new IOException("a file due to implementation issue:\n\t\t \"Can't retrieve CP Index for %s\"". formatted(nameAndType == null ? "null" : nameAndType.toString())); } out.writeShort(cpIndex); } @Override public int getLength() { // u2 return 2; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/DataVector.java000066400000000000000000000055541514323636100261240ustar00rootroot00000000000000/* * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Optional; import java.util.function.Predicate; public class DataVector implements Iterable { ArrayList elements; public DataVector(int initSize) { elements = new ArrayList<>(initSize); } public DataVector() { this(12); } public Iterator iterator() { return elements.iterator(); } public void add(T element) { elements.add(element); } public void addAll(List collection) { elements.addAll(collection); } public Optional findFirst(Predicate filter) { return elements.stream().filter(filter).findFirst(); } // full length of the attribute conveyor // declared in Data public int getLength() { int length = 0; // calculate overall size here rather than in add() // because it may not be available at the time of invoking of add() for (T element : elements) { length += element.getLength(); } return 2 + length; // add the length of number of elements } public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(elements.size()); writeElements(out); } public void writeElements(CheckedDataOutputStream out) throws IOException { for (DataWriter element : elements) { element.write(out); } } /* for compatibility with Vector */ public void addElement(T element) { elements.add(element); } public int size() { return elements.size(); } public DataWriter elementAt(int k) { return elements.get(k); } }// end class DataVector jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/DataVectorAttr.java000066400000000000000000000123721514323636100267530ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.Optional; import java.util.function.Predicate; import java.util.stream.Stream; /** * Container for attributes having inline tables: * InnerClasses, BootstrapMethods, LineNumberTable, Runtime(In)Visible(Type|Parameter)Annotations, * LocalVariableTable, StackMapTable */ class DataVectorAttr extends AttrData implements Collection { private final ArrayList elements; private boolean byteIndex; /** * @param pool Constant pool * @param eAttribute the attribute name @see org.openjdk.asmtools.common.content.EAttribute * @param byteIndex indicates 1 or two bytes is used to keep number of table elements: * u2 StackMapTable_attribute.number_of_entries * u1 RuntimeVisibleParameterAnnotations_attribute.num_parameters * @param initialData initial elements of table */ private DataVectorAttr(ConstantPool pool, EAttribute eAttribute, boolean byteIndex, ArrayList initialData) { super(pool, eAttribute); this.elements = initialData; this.byteIndex = byteIndex; } DataVectorAttr(ConstantPool pool, EAttribute attribute, ArrayList initialData) { this(pool, attribute, false, initialData); } DataVectorAttr(ConstantPool pool, EAttribute attribute) { this(pool, attribute, false, new ArrayList<>()); } DataVectorAttr(ConstantPool pool, EAttribute attribute, boolean byteIndex) { this(pool, attribute, byteIndex, new ArrayList<>()); } public T get(int index) { return elements.get(index); } public Optional findFirst(Predicate filter) { return elements.stream().filter(filter).findFirst(); } @Override public boolean add(T element) { return elements.add(element); } @Override public boolean remove(Object o) { return elements.remove(o); } @Override public boolean containsAll(Collection c) { return elements.containsAll(c); } @Override public boolean addAll(Collection c) { return elements.addAll(c); } @Override public boolean removeAll(Collection c) { return elements.removeAll(c); } @Override public boolean retainAll(Collection c) { return elements.retainAll(c); } @Override public void clear() { elements.clear(); } public DataVectorAttr addAll(Stream s) { s.filter(e -> e != null).forEach(elements::add); return this; } public T set(int i, T element) { return elements.set(i, element); } public int size() { return elements.size(); } @Override public boolean isEmpty() { return false; } @Override public boolean contains(Object o) { return false; } public void replaceAll(Collection collection) { elements.clear(); elements.addAll(collection); } public ArrayList getElements() { return elements; } @Override public Iterator iterator() { return elements.iterator(); } @Override public Object[] toArray() { return elements.toArray(); } @Override public V[] toArray(V[] a) { return elements.toArray(a); } public Stream stream() { return elements.stream(); } @Override public int attrLength() { // calculate overall size int length = elements.stream().mapToInt(DataWriter::getLength).sum(); // add the length of number of elements length += (byteIndex) ? 1 : 2; return length; } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); int size = (int)elements.stream().filter(DataWriter::isCountable).count(); if (byteIndex) { out.writeByte(size); } else { out.writeShort(size); } // number of elements for (T elem : elements) { elem.write(out); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/DataWriter.java000066400000000000000000000025031514323636100261250ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; /** * Base contract for writeable structures */ interface DataWriter { default boolean isCountable() { return true; } void write(CheckedDataOutputStream out) throws IOException; int getLength(); } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/DefaultAnnotationAttr.java000066400000000000000000000036151514323636100303360ustar00rootroot00000000000000/* * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import java.io.IOException; /** * DefaultAnnotationAttr * * Used to represent Default Annotation Attributes * */ public class DefaultAnnotationAttr extends AttrData { DataWriter element; // Data public DefaultAnnotationAttr(ConstantPool pool, EAttribute attribute, DataWriter element) { super(pool, attribute); this.element = element; } public void add(DataWriter element) { this.element = element; } @Override public int attrLength() { return element.getLength(); // add the length of number of elements } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); // attr name, attr len element.write(out); } }// end class DataVectorAttr jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/EnclosingMethodAttr.java000066400000000000000000000046131514323636100300000ustar00rootroot00000000000000package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import java.io.IOException; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.CONSTANT_METHODREF; /** * EnclosingMethod_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 class_index; * u2 method_index; * } * If the current class is not immediately enclosed by a method or constructor, * then the value of the method_index item must be zero. */ public class EnclosingMethodAttr extends AttrData { private ConstantPool pool; private ConstCell classCell; // methodCell is null if the current class is not immediately enclosed by a method or constructor. private ConstCell methodCell; /** * @param pool ConstantPool * @param classCell class_index to be written to class file * @param methodCell method_index If the current class is not immediately enclosed by a method or constructor, * then the value of the method_index item must be zero. */ EnclosingMethodAttr(ConstantPool pool, ConstCell classCell, ConstCell methodCell) { super(pool, EAttribute.ATT_EnclosingMethod); this.pool = pool; this.classCell = classCell; this.methodCell = methodCell; } @Override public int attrLength() { // attribute_length: The value of the attribute_length item must be four. return 4; } @Override protected ConstCell classifyConstCell(ConstantPool pool, ConstCell cell) { return pool.findCell(CONSTANT_METHODREF, cell); } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); if (!classCell.isSet()) { classCell = pool.specifyCell(classCell); if (!pool.getBounds().in(classCell.cpIndex)) { pool.environment.throwErrorException("err.entity.not.in.cp", classCell); } } out.writeShort(classCell.cpIndex); if (methodCell != null && !methodCell.isSet()) { methodCell = pool.specifyCell(methodCell); if (!pool.getBounds().in(methodCell.cpIndex)) { pool.environment.throwErrorException("err.entity.not.in.cp", methodCell); } } // if methodCell is null then method_index is 0 out.writeShort(methodCell != null ? methodCell.cpIndex : 0); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ExceptionData.java000066400000000000000000000041131514323636100266060ustar00rootroot00000000000000/* * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; /** * 4.7.3. The Code Attribute *

*Code_attribute { * * { u2 start_pc; * u2 end_pc; * u2 handler_pc; * u2 catch_type; * } * * } */ class ExceptionData implements DataWriter { long pos; CodeAttr.RangePC rangePC; int handler_pc; Indexer catchType; public ExceptionData(long pos, CodeAttr.RangePC rangePC, int handler_pc, Indexer catchType) { this.pos = pos; this.rangePC = rangePC; this.handler_pc = handler_pc; this.catchType = catchType; } @Override public int getLength() { return 8; // add the length of number of elements } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(rangePC.start_pc); out.writeShort(rangePC.end_pc); out.writeShort(handler_pc); if (catchType.isSet()) { out.writeShort(catchType.cpIndex); } else { out.writeShort(0); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/FieldData.java000066400000000000000000000056321514323636100257020ustar00rootroot00000000000000/* * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.common.structure.ELocation; import org.openjdk.asmtools.common.structure.EModifier; import java.io.IOException; /** * field_info */ class FieldData extends MemberData { /* FieldData Fields */ private ConstantPool.ConstValue_FieldRef fieldRef; private AttrData initialValue; public FieldData(ClassData classData, int access, ConstantPool.ConstValue_FieldRef fieldRef) { super(classData.pool, classData.getEnvironment(), access); this.attributeLocation = ELocation.field_info; this.fieldRef = fieldRef; if (EModifier.hasPseudoMod(access)) { createPseudoMod(); } } protected boolean checkExistence(EAttribute attribute) { return switch (attribute) { case ATT_Signature -> signatureAttr != null; default -> throw new IllegalStateException("Unexpected attribute: %s in %s". formatted(attribute.parseKey(), attributeLocation.name())); }; } public ConstantPool.ConstValue_FieldRef getNameDesc() { return fieldRef; } public void SetInitialValue(ConstCell cell) { initialValue = new CPXAttr(pool, EAttribute.ATT_ConstantValue, cell); } public AttrData getInitialValue() { return initialValue; } @Override protected DataVector getAttrVector() { return getDataVector(initialValue, syntheticAttr, deprecatedAttr, signatureAttr); } public void write(CheckedDataOutputStream out) throws IOException, Parser.CompilerError { out.writeShort(access); out.writeShort(fieldRef.value.first.cpIndex); out.writeShort(fieldRef.value.second.cpIndex); DataVector attrs = getAttrVector(); attrs.write(out); } } // end FieldData jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/FieldType.java000066400000000000000000000036661514323636100257570ustar00rootroot00000000000000/* * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; public enum FieldType { Array('[', "reference", 1), Boolean('Z', "boolean", 1), Byte('B', "byte", 1), Char('C', "char", 1), Double('D', "double", 2), Float('F', "float", 1), Int('I', "int", 1), LReference('L', "reference", 1), Long('J', "long", 2), QReference('Q', "reference", 1), Short('S', "short", 1); private final char term; private final String type; private final int slotsCount; FieldType(char term, String type, int slotsCount) { this.term = term; this.type = type; this.slotsCount = slotsCount; } public static FieldType getFieldType(char term) { for (FieldType ft : FieldType.values()) { if ( ft.term == term ) { return ft; } } return null; } public int getSlotsCount() { return slotsCount; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/Indexer.java000066400000000000000000000034731514323636100254640ustar00rootroot00000000000000/* * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; /** * Indexer a position starting from 0 of a constant cell in the Constant Pool. * Also, the class is used to hold uninitialized (isSet == false) and initialized (isSet == true) indexes,counters: * max_stack, max_locals, Trap.start_pc, Trap.end_pc */ public class Indexer { public static final int NotSet = -1; protected int cpIndex; Indexer() { cpIndex = NotSet; } Indexer(int cpIndex) { this.cpIndex = cpIndex; } public int hashCode() { return isSet() ? cpIndex : 0; } boolean isSet() { return cpIndex != NotSet; } boolean inRange(int index){ return index >=0 && index < cpIndex; } // Alias for max_stack, max_locals public int value() { return cpIndex; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/InnerClassData.java000066400000000000000000000037351514323636100267220ustar00rootroot00000000000000/* * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; /** * */ class InnerClassData implements DataWriter { int access; ConstCell name, innerClass, outerClass; public InnerClassData(int access, ConstCell name, ConstCell innerClass, ConstCell outerClass) { this.access = access; this.name = name; this.innerClass = innerClass; this.outerClass = outerClass; } @Override public int getLength() { return 8; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(innerClass.cpIndex); if (outerClass.isSet()) { out.writeShort(outerClass.cpIndex); } else { out.writeShort(0); } if (name.isSet()) { out.writeShort(name.cpIndex); } else { out.writeShort(0); } out.writeShort(access); } }// end class InnerClassData jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/Instr.java000066400000000000000000000230431514323636100251600ustar00rootroot00000000000000/* * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; import java.util.Optional; import static org.openjdk.asmtools.asmutils.HexUtils.toHex; import static org.openjdk.asmtools.jasm.OpcodeTables.Opcode; import static org.openjdk.asmtools.jasm.OpcodeTables.OpcodeType; // class Instr { // environment is needed to fix CP references and show error(s)/message(s) private final JasmEnvironment environment; private final ConstantPool pool; // References to Method's name,signature CP cells // that will be used to build a warning message while writing a binary if necessary private final ConstCell nameCell, sigCell; private long pos; // Instr next = null; int pc; Opcode opc; Indexer arg; Object arg2; // second or unusual argument public Instr(MethodData methodData, JasmEnvironment environment) { this.environment = environment; this.pool = methodData.getPool(); // for message purposes only this.nameCell = methodData.nameCell; this.sigCell = methodData.sigCell; } public Instr set(int pc, long pos, Opcode opc, Indexer arg, Object arg2) { this.pc = pc; this.pos = pos; this.opc = opc; this.arg = arg; this.arg2 = arg2; return this; } private Indexer fixReference(Indexer arg) { if( arg != null && arg instanceof ConstCell) { ConstCell cell = (ConstCell) arg; if( cell.ref == null || arg.cpIndex == 0) { // Corner case cell[0] has value but its reference is wrong // For negative testing: when instruction refers to a wrong Constant Pool cell // asm just shows a warning. environment.warning(pos - String.valueOf(arg.cpIndex).length()-1, "warn.instr.wrong.arg", opc.parseKey(), arg.cpIndex); return arg; } if( !arg.isSet()) { Optional> optionalCell = pool.getItemizedCell((ConstCell) arg); if (optionalCell.isPresent()) { arg = optionalCell.get(); } else { environment.throwErrorException(pos - String.valueOf(arg.cpIndex).length()-1, "err.instr.wrong.arg", opc.parseKey(), arg.cpIndex); } } } return arg; } public void write(CheckedDataOutputStream out) throws IOException { OpcodeType type = opc.type(); arg = fixReference(arg); switch (type) { case NORMAL: { if (opc == Opcode.opc_bytecode) { out.writeByte(arg.cpIndex); return; } out.writeByte(opc.value()); int opcLen = opc.length(); if (opcLen == 1) { return; } switch (opc) { case opc_tableswitch: ((SwitchTable) arg2).writeTableSwitch(out); return; case opc_lookupswitch: ((SwitchTable) arg2).writeLookupSwitch(out); return; } int iarg = 0; try { iarg = arg.cpIndex; } catch (NullPointerException e) { environment.throwErrorException("err.instr.null.arg", opc.parseKey()); } //env.traceln("instr:"+opcNamesTab[opc]+" len="+opcLen+" arg:"+iarg); switch (opc) { case opc_jsr: case opc_goto: case opc_ifeq: case opc_ifge: case opc_ifgt: case opc_ifle: case opc_iflt: case opc_ifne: case opc_if_icmpeq: case opc_if_icmpne: case opc_if_icmpge: case opc_if_icmpgt: case opc_if_icmple: case opc_if_icmplt: case opc_if_acmpeq: case opc_if_acmpne: case opc_ifnull: case opc_ifnonnull: case opc_jsr_w: case opc_goto_w: iarg = iarg - pc; break; case opc_iinc: iarg = (iarg << 8) | (((Indexer) arg2).cpIndex & 0xFF); break; case opc_invokeinterface: iarg = ((iarg << 8) | (((Indexer) arg2).cpIndex & 0xFF)) << 8; break; case opc_invokedynamic: // JSR-292 iarg = (iarg << 16); break; case opc_ldc: if ((iarg & 0xFFFFFF00) != 0) { environment.throwErrorException("err.instr.arg.long", opc.parseKey(), iarg); } break; } switch (opcLen) { case 1: return; case 2: if(iarg > 0xff) { // unsigned byte environment.warning("warn.instruction.operand.value.overflow", getMethodSignature(), opc.parseKey(), toHex(iarg), "unsigned 8-bit value 0xFF"); } out.writeByte(iarg); return; case 3: if( iarg > Short.MAX_VALUE ) { // signed short environment.warning("warn.instruction.operand.value.overflow", getMethodSignature(), opc.parseKey(), toHex(iarg), "signed 16-bit value " + toHex(Short.MAX_VALUE)); } out.writeShort(iarg); return; case 4: // opc_multianewarray only if( iarg > Short.MAX_VALUE ) { // signed short environment.warning("warn.instruction.operand.value.overflow", getMethodSignature(), opc.parseKey(), toHex(iarg), "signed 16-bit value " + toHex(Short.MAX_VALUE)); } out.writeShort(iarg); iarg = ((Indexer) arg2).cpIndex; out.writeByte(iarg); return; case 5: if( iarg > Integer.MAX_VALUE ) { // signed int environment.warning("warn.instruction.operand.value.overflow", getMethodSignature(), opc.parseKey(), toHex(iarg), "signed 32-bit value " + toHex(Integer.MAX_VALUE)); } out.writeInt(iarg); return; default: environment.throwErrorException("err.instr.opc.len", opc.parseKey(), opcLen); } } case WIDE: out.writeByte(Opcode.opc_wide.value()); out.writeByte(opc.value() & 0xFF); out.writeShort(arg.cpIndex); if (opc == Opcode.opc_iinc_w) { out.writeShort(((Indexer) arg2).cpIndex); } return; case PRIVELEGED: case NONPRIVELEGED: out.writeByte(opc.value() >> 8); out.writeByte(opc.value() & 0xFF); return; default: environment.throwErrorException("err.instr.opc.unknown", opc.parseKey()); } // end writeSpecCode } /** * @return the current method signature in the form "MethodName""MethodSignature" like testMethod(II)V * for using in warning messages */ private String getMethodSignature() { String res = this.nameCell.ref.value != null ? this.nameCell.ref.value.toString() : "#" + this.nameCell.cpIndex; return res + (this.sigCell.ref.value != null ? this.sigCell.ref.value.toString() : ":#" + this.sigCell.cpIndex); } } // end Instr jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/JasmEnvironment.java000066400000000000000000000164731514323636100272110ustar00rootroot00000000000000/* * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.CompilerLogger; import org.openjdk.asmtools.common.EMessageKind; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.common.inputs.TextInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import java.io.DataInputStream; import java.io.IOException; import java.net.URISyntaxException; import static org.openjdk.asmtools.common.CompilerConstants.EOF; import static org.openjdk.asmtools.common.CompilerConstants.OFFSET_BITS; public class JasmEnvironment extends Environment { InputFile inputFile; /** * @param builder the jasm environment builder */ private JasmEnvironment(Builder builder) { super(builder); } @Override public void setToolInput(ToolInput toolInput) throws IOException, URISyntaxException { try { // content of the jasm input file super.setToolInput(toolInput); this.inputFile = new InputFile(getDataInputStream()); } catch (IOException ioe) { error("err.cannot.read", toolInput); throw ioe; } } // proxy methods @Override public void warning(long where, String id, Object... args) { getLogger().warning(where, id, args); } @Override public void error(long where, String id, Object... args) { getLogger().error(where, id, args); } @Override public void warning(String id, Object... args) { getLogger().warning(NOWHERE, id, args); } @Override public void error(String id, Object... args) { getLogger().error(NOWHERE, id, args); } // Jasm specific methods @Override public long getCount(EMessageKind kind) { return getLogger().getCount(kind); } public boolean hasMessages() { return !super.getLogger().noMessages(); } // get line number by scanner position public long lineNumber(long where) { return getLogger().lineNumber(where); } // get line number by scanner position public long lineOffset(long lineNumber, long where) { return getLogger().lineOffset(lineNumber, where); } /** * Throws an error not associated with scanner position in an input file * * @param id id of a string resource in I18NResourceBundle * @param args arguments referenced by the format specifiers in the resource string * @throws Error exception */ public void throwErrorException(String id, Object... args) throws Error { error(id, args); throw new Error(); } /** * Throws an error associated with scanner position in an input file * * @param where position in an input file * @param id id of a string resource in I18NResourceBundle * @param args arguments referenced by the format specifiers in the resource string * @throws Error exception */ public void throwErrorException(long where, String id, Object... args) throws Error { error(where, id, args); throw new Error(); } /** * @param printTotals whether to print the total line: N warning(s), K error(s) * @return 0 if there are no errors otherwise a count of errors */ public int flush(boolean printTotals) { return super.getLogger().flush(printTotals); } public long getPosition() { return inputFile == null ? 0 : inputFile.position; } public int read() { return inputFile.readUTF(); } public int lookForward() { return inputFile.lookForwardUTF(); } public int convertUnicode() { return inputFile.convertUnicodeUTF(); } static class JasmBuilder extends Environment.Builder { public JasmBuilder(ToolOutput toolOutput, DualStreamToolOutput logger) { super(toolOutput, new CompilerLogger("jasm", JasmEnvironment.class, logger)); } @Override public JasmEnvironment build() { return new JasmEnvironment(this); } } private class InputFile extends TextInput { InputFile(DataInputStream dataInputStream) throws IOException { super(dataInputStream); } int lookForwardUTF() { try { return strData.charAt(charPos); } catch (StringIndexOutOfBoundsException e) { return EOF; } } @Override public int readUTF() { char ch; position = ((long) linepos << OFFSET_BITS) | charPos; try { ch = strData.charAt(charPos); charPos++; // parse special characters switch (ch) { case '\n' -> linepos++; case '\r' -> { if (strData.charAt(charPos) == '\n') { charPos++; } linepos++; } } } catch (StringIndexOutOfBoundsException e) { return EOF; } return ch; } int convertUnicodeUTF() { char ch; try { while ((ch = strData.charAt(charPos)) == 'u') { charPos++; } int d = 0; for (int i = 0; i < 4; i++) { switch (ch) { case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' -> d = (d << 4) + ch - '0'; case 'a', 'b', 'c', 'd', 'e', 'f' -> d = (d << 4) + 10 + ch - 'a'; case 'A', 'B', 'C', 'D', 'E', 'F' -> d = (d << 4) + 10 + ch - 'A'; default -> { error(position, "err.invalid.escape.char"); return d; } } ch = strData.charAt(++charPos); } return d; } catch (StringIndexOutOfBoundsException e) { error(position, "err.invalid.escape.char"); return EOF; } } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/JasmTokens.java000066400000000000000000001041271514323636100261420ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.util.*; import java.util.stream.Collectors; /** * JasmTokens *

* This class contains tokens specific to parsing JASM syntax. *

* The classes in JasmTokens are following a Singleton Pattern. These classes are Enums, * and they are contained in private hash maps (lookup tables and reverse lookup tables). * These hash maps all have public accessors, which clients use to look-up enums. *

* Tokens in this table carry no external state, and are typically treated as constants. * They do not need to be reset. */ public class JasmTokens { /*-------------------------------------------------------- */ /* Marker: describes the type of Keyword */ public enum KeywordType { TOKEN("TOKEN"), VALUE("VALUE"), JASMIDENTIFIER("JASM"), KEYWORD("KEYWORD"); private final String printValue; KeywordType(String printValue) { this.printValue = printValue; } public String printValue() { return printValue; } } /*-------------------------------------------------------- */ /* Marker - describes the type of token */ /* this is rather cosmetic, no function currently. */ public enum TokenType { MODIFIER("Modifier"), OPERATOR("Operator"), VALUE("Value"), TYPE("Type"), EXPRESSION("Expression"), STATEMENT("Statement"), DECLARATION("Declaration"), PUNCTUATION("Punctuation"), SPECIAL("Special"), JASM("Jasm"), MISC("Misc"), JASM_IDENT("Jasm identifier"), MODULE_NAME("Module Name"), // The token can be used as Module Name TYPE_PATH_KIND("Type path kind"), // Table 4.7.20.2-A Interpretation of type_path_kind values CLASS_NAME("Class Name"); // The token can be used as Class Name private final String printValue; TokenType(String printValue) { this.printValue = printValue; } public String printValue() { return printValue; } } public enum AnnotationType { Visible("@+"), Invisible("@-"), VisibleType("@T+"), InvisibleType("@T-"); private final String jasmPrefix; AnnotationType(String jasmPrefix) { this.jasmPrefix = jasmPrefix; } /** * isAnnotationToken *

* examines the beginning of a string to see if it starts with an annotation * characters ('@+' = visible annotation, '@-' = invisible). * * @param str String to be analyzed * @return True if the string starts with an annotation char. */ static public boolean isAnnotationToken(String str) { return (str.startsWith(AnnotationType.Invisible.jasmPrefix) || str.startsWith(AnnotationType.Visible.jasmPrefix)); } /** * isTypeAnnotationToken *

* examines the beginning of a string to see if it starts with type annotation * characters ('@T+' = visible type annotation, '@T-' = invisible). * * @param str String to be analyzed * @return True if the string starts with an annotation char. */ static public boolean isTypeAnnotationToken(String str) { return (str.startsWith(AnnotationType.InvisibleType.jasmPrefix) || str.startsWith(AnnotationType.VisibleType.jasmPrefix)); } /** * isAnnotation *

* examines the beginning of a string to see if it starts with an annotation character * * @param str String to be analyzed * @return True if the string starts with an annotation char. */ static public boolean isAnnotation(String str) { return (str.startsWith("@")); } /** * isInvisibleAnnotationToken *

* examines the end of an annotation token to determine visibility ('+' = visible * annotation, '-' = invisible). * * @param str String to be analyzed * @return True if the token implies invisible annotation. */ static public boolean isInvisibleAnnotationToken(String str) { return (str.endsWith("-")); } } /** * Scanner Tokens (Definitive List) */ public enum Token { EOF(-1, "EOF", "EOF", EnumSet.of(TokenType.MISC, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), COMMA(0, "COMMA", ",", EnumSet.of(TokenType.OPERATOR)), ASSIGN(1, "ASSIGN", "=", EnumSet.of(TokenType.OPERATOR)), ASGMUL(2, "ASGMUL", "*=", EnumSet.of(TokenType.OPERATOR)), ASGDIV(3, "ASGDIV", "/=", EnumSet.of(TokenType.OPERATOR)), ASGREM(4, "ASGREM", "%=", EnumSet.of(TokenType.OPERATOR)), ASGADD(5, "ASGADD", "+=", EnumSet.of(TokenType.OPERATOR)), ASGSUB(6, "ASGSUB", "-=", EnumSet.of(TokenType.OPERATOR)), ASGLSHIFT(7, "ASGLSHIFT", "<<=", EnumSet.of(TokenType.OPERATOR)), ASGRSHIFT(8, "ASGRSHIFT", ">>=", EnumSet.of(TokenType.OPERATOR)), ASGURSHIFT(9, "ASGURSHIFT", "<<<=", EnumSet.of(TokenType.OPERATOR)), ASGBITAND(10, "ASGBITAND", "&=", EnumSet.of(TokenType.OPERATOR)), ASGBITOR(11, "ASGBITOR", "|=", EnumSet.of(TokenType.OPERATOR)), ASGBITXOR(12, "ASGBITXOR", "^=", EnumSet.of(TokenType.OPERATOR)), COND(13, "COND", "?:", EnumSet.of(TokenType.OPERATOR)), OR(14, "OR", "||", EnumSet.of(TokenType.OPERATOR)), AND(15, "AND", "&&", EnumSet.of(TokenType.OPERATOR)), BITOR(16, "BITOR", "|", EnumSet.of(TokenType.OPERATOR)), BITXOR(17, "BITXOR", "^", EnumSet.of(TokenType.OPERATOR)), BITAND(18, "BITAND", "&", EnumSet.of(TokenType.OPERATOR)), NE(19, "NE", "!=", EnumSet.of(TokenType.OPERATOR)), EQ(20, "EQ", "==", EnumSet.of(TokenType.OPERATOR)), GE(21, "GE", ">=", EnumSet.of(TokenType.OPERATOR)), GT(22, "GT", ">", EnumSet.of(TokenType.OPERATOR)), LE(23, "LE", "<=", EnumSet.of(TokenType.OPERATOR)), LT(24, "LT", "<", EnumSet.of(TokenType.OPERATOR)), INSTANCEOF(25, "INSTANCEOF", "instanceof", EnumSet.of(TokenType.OPERATOR)), LSHIFT(26, "LSHIFT", "<<", EnumSet.of(TokenType.OPERATOR)), RSHIFT(27, "RSHIFT", ">>", EnumSet.of(TokenType.OPERATOR)), URSHIFT(28, "URSHIFT", "<<<", EnumSet.of(TokenType.OPERATOR)), ADD(29, "ADD", "+", EnumSet.of(TokenType.OPERATOR)), SUB(30, "SUB", "-", EnumSet.of(TokenType.OPERATOR)), DIV(31, "DIV", "/", EnumSet.of(TokenType.OPERATOR)), REM(32, "REM", "%", EnumSet.of(TokenType.OPERATOR)), MUL(33, "MUL", "*", EnumSet.of(TokenType.OPERATOR)), CAST(34, "CAST", "cast", EnumSet.of(TokenType.OPERATOR, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), POS(35, "POS", "+", EnumSet.of(TokenType.OPERATOR)), NEG(36, "NEG", "-", EnumSet.of(TokenType.OPERATOR)), NOT(37, "NOT", "!", EnumSet.of(TokenType.OPERATOR)), BITNOT(38, "BITNOT", "~", EnumSet.of(TokenType.OPERATOR)), PREINC(39, "PREINC", "++", EnumSet.of(TokenType.OPERATOR)), PREDEC(40, "PREDEC", "--", EnumSet.of(TokenType.OPERATOR)), NEWARRAY(41, "NEWARRAY", "new", EnumSet.of(TokenType.OPERATOR)), NEWINSTANCE(42, "NEWINSTANCE", "new", EnumSet.of(TokenType.OPERATOR)), NEWFROMNAME(43, "NEWFROMNAME", "new", EnumSet.of(TokenType.OPERATOR)), POSTINC(44, "POSTINC", "++", EnumSet.of(TokenType.OPERATOR)), POSTDEC(45, "POSTDEC", "--", EnumSet.of(TokenType.OPERATOR)), FIELD(46, "FIELD", "field", EnumSet.of(TokenType.OPERATOR, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), METHOD(47, "METHOD", "method", EnumSet.of(TokenType.OPERATOR, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), ARRAYACCESS(48, "ARRAYACCESS", "[]", EnumSet.of(TokenType.OPERATOR)), NEW(49, "NEW", "new", EnumSet.of(TokenType.OPERATOR)), INC(50, "INC", "++", EnumSet.of(TokenType.OPERATOR)), DEC(51, "DEC", "--", EnumSet.of(TokenType.OPERATOR)), // 52, 53 are reserved for FILE, CLASSFILE CONVERT(55, "CONVERT", "convert", EnumSet.of(TokenType.OPERATOR, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), EXPR(56, "EXPR", "expr", EnumSet.of(TokenType.OPERATOR, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), ARRAY(57, "ARRAY", "array", EnumSet.of(TokenType.OPERATOR, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), GOTO(58, "GOTO", "goto", EnumSet.of(TokenType.OPERATOR)), /* * Value tokens */ IDENT(60, "IDENT", "Identifier", EnumSet.of(TokenType.VALUE, TokenType.CLASS_NAME, TokenType.MODULE_NAME, TokenType.JASM_IDENT), KeywordType.VALUE), BOOLEANVAL(61, "BOOLEANVAL", "Boolean", EnumSet.of(TokenType.VALUE, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.VALUE), BYTEVAL(62, "BYTEVAL", "Byte", EnumSet.of(TokenType.VALUE, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), CHARVAL(63, "CHARVAL", "Char", EnumSet.of(TokenType.VALUE, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), SHORTVAL(64, "SHORTVAL", "Short", EnumSet.of(TokenType.VALUE, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), INTVAL(65, "INTVAL", "Integer", EnumSet.of(TokenType.VALUE, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.VALUE), LONGVAL(66, "LONGVAL", "Long", EnumSet.of(TokenType.VALUE, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.VALUE), FLOATVAL(67, "FLOATVAL", "Float", EnumSet.of(TokenType.VALUE, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.VALUE), DOUBLEVAL(68, "DOUBLEVAL", "Double", EnumSet.of(TokenType.VALUE, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.VALUE), STRINGVAL(69, "STRINGVAL", "String", EnumSet.of(TokenType.VALUE, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.VALUE), /* * Type keywords */ BYTE(70, "BYTE", "byte", EnumSet.of(TokenType.TYPE)), CHAR(71, "CHAR", "char", EnumSet.of(TokenType.TYPE)), SHORT(72, "SHORT", "short", EnumSet.of(TokenType.TYPE)), INT(73, "INT", "int", EnumSet.of(TokenType.TYPE)), LONG(74, "LONG", "long", EnumSet.of(TokenType.TYPE)), FLOAT(75, "FLOAT", "float", EnumSet.of(TokenType.TYPE)), DOUBLE(76, "DOUBLE", "double", EnumSet.of(TokenType.TYPE)), VOID(77, "VOID", "void", EnumSet.of(TokenType.TYPE)), BOOLEAN(78, "BOOLEAN", "boolean", EnumSet.of(TokenType.TYPE)), /* * Expression keywords */ TRUE(80, "TRUE", "true", EnumSet.of(TokenType.EXPRESSION, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), FALSE(81, "FALSE", "false", EnumSet.of(TokenType.EXPRESSION, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), THIS(82, "THIS", "this", EnumSet.of(TokenType.EXPRESSION)), SUPER(83, "SUPER", "super", EnumSet.of(TokenType.MODIFIER), KeywordType.KEYWORD), NULL(84, "NULL", "null", EnumSet.of(TokenType.EXPRESSION, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), THIS_CLASS(85, "this_class", "this_class", EnumSet.of(TokenType.DECLARATION, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), SUPER_CLASS(86, "super_class", "super_class", EnumSet.of(TokenType.DECLARATION, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), /* * Statement keywords */ IF(90, "IF", "if", EnumSet.of(TokenType.STATEMENT)), ELSE(91, "ELSE", "else", EnumSet.of(TokenType.STATEMENT)), FOR(92, "FOR", "for", EnumSet.of(TokenType.STATEMENT)), WHILE(93, "WHILE", "while", EnumSet.of(TokenType.STATEMENT)), DO(94, "DO", "do", EnumSet.of(TokenType.STATEMENT)), SWITCH(95, "SWITCH", "switch", EnumSet.of(TokenType.STATEMENT)), CASE(96, "CASE", "case", EnumSet.of(TokenType.STATEMENT)), DEFAULT(97, "DEFAULT", "default", EnumSet.of(TokenType.STATEMENT), KeywordType.KEYWORD), BREAK(98, "BREAK", "break", EnumSet.of(TokenType.STATEMENT)), CONTINUE(99, "CONTINUE", "continue", EnumSet.of(TokenType.STATEMENT)), RETURN(100, "RETURN", "return", EnumSet.of(TokenType.STATEMENT)), TRY(101, "TRY", "try", EnumSet.of(TokenType.STATEMENT)), CATCH(102, "CATCH", "catch", EnumSet.of(TokenType.STATEMENT)), FINALLY(103, "FINALLY", "finally", EnumSet.of(TokenType.STATEMENT)), THROW(104, "THROW", "throw", EnumSet.of(TokenType.STATEMENT)), STAT(105, "STAT", "stat", EnumSet.of(TokenType.STATEMENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), EXPRESSION(106, "EXPRESSION", "expression", EnumSet.of(TokenType.STATEMENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), DECLARATION(107, "DECLARATION", "declaration", EnumSet.of(TokenType.STATEMENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), VARDECLARATION(108, "VARDECLARATION", "vdeclaration", EnumSet.of(TokenType.STATEMENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), /* * Declaration keywords */ IMPORT(110, "IMPORT", "import", EnumSet.of(TokenType.DECLARATION, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), CLASS(111, "CLASS", "class", EnumSet.of(TokenType.DECLARATION, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), FILE(52, "FILE", "file", EnumSet.of(TokenType.DECLARATION, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), CLASS_FILE(53, "CLASSFILE", "classfile", EnumSet.of(TokenType.DECLARATION, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), EXTENDS(112, "EXTENDS", "extends", EnumSet.of(TokenType.DECLARATION, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), IMPLEMENTS(113, "IMPLEMENTS", "implements", EnumSet.of(TokenType.DECLARATION, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), INTERFACE(114, "INTERFACE", "interface", EnumSet.of(TokenType.DECLARATION, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), PACKAGE(115, "PACKAGE", "package", EnumSet.of(TokenType.DECLARATION), KeywordType.KEYWORD), ENUM(116, "ENUM", "enum", EnumSet.of(TokenType.DECLARATION), KeywordType.KEYWORD), MANDATED(117, "MANDATED", "mandated", EnumSet.of(TokenType.DECLARATION, TokenType.CLASS_NAME), KeywordType.KEYWORD), THROWS(118, "THROWS", "throws", EnumSet.of(TokenType.DECLARATION), KeywordType.KEYWORD), /* * Modifier keywords */ ANNOTATION_ACCESS(119, "ANNOTATION_ACCESS", "annotation", EnumSet.of(TokenType.MODIFIER, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), PRIVATE(120, "PRIVATE", "private", EnumSet.of(TokenType.MODIFIER), KeywordType.KEYWORD), PUBLIC(121, "PUBLIC", "public", EnumSet.of(TokenType.MODIFIER), KeywordType.KEYWORD), PROTECTED(122, "PROTECTED", "protected", EnumSet.of(TokenType.MODIFIER), KeywordType.KEYWORD), CONST(123, "CONST", "const", EnumSet.of(TokenType.DECLARATION), KeywordType.KEYWORD), STATIC(124, "STATIC", "static", EnumSet.of(TokenType.MODIFIER), KeywordType.KEYWORD), TRANSIENT(125, "TRANSIENT", "transient", EnumSet.of(TokenType.MODIFIER, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), SYNCHRONIZED(126, "SYNCHRONIZED", "synchronized", EnumSet.of(TokenType.MODIFIER), KeywordType.KEYWORD), NATIVE(127, "NATIVE", "native", EnumSet.of(TokenType.MODIFIER), KeywordType.KEYWORD), FINAL(128, "FINAL", "final", EnumSet.of(TokenType.MODIFIER), KeywordType.KEYWORD), VOLATILE(129, "VOLATILE", "volatile", EnumSet.of(TokenType.MODIFIER), KeywordType.KEYWORD), ABSTRACT(130, "ABSTRACT", "abstract", EnumSet.of(TokenType.MODIFIER), KeywordType.KEYWORD), TRANSITIVE(131, "TRANSITIVE", "transitive", EnumSet.of(TokenType.MODIFIER, TokenType.CLASS_NAME), KeywordType.KEYWORD), OPEN(132, "OPEN", "open", EnumSet.of(TokenType.MODIFIER, TokenType.CLASS_NAME), KeywordType.KEYWORD), /* * Punctuation */ AT_SIGN(133, "AT", "@", EnumSet.of(TokenType.PUNCTUATION), KeywordType.VALUE), SEMICOLON(134, "SEMICOLON", ";", EnumSet.of(TokenType.PUNCTUATION), KeywordType.VALUE), COLON(135, "COLON", ":", EnumSet.of(TokenType.PUNCTUATION), KeywordType.VALUE), QUESTIONMARK(136, "QUESTIONMARK", "?", EnumSet.of(TokenType.PUNCTUATION)), LBRACE(137, "LBRACE", "{", EnumSet.of(TokenType.PUNCTUATION), KeywordType.VALUE), RBRACE(138, "RBRACE", "}", EnumSet.of(TokenType.PUNCTUATION), KeywordType.VALUE), LPAREN(139, "LPAREN", "(", EnumSet.of(TokenType.PUNCTUATION)), RPAREN(140, "RPAREN", ")", EnumSet.of(TokenType.PUNCTUATION)), LSQBRACKET(141, "LSQBRACKET", "[", EnumSet.of(TokenType.PUNCTUATION)), RSQBRACKET(142, "RSQBRACKET", "]", EnumSet.of(TokenType.PUNCTUATION)), ESCAPED_COLON(201, "ESCCOLON", "\\:", EnumSet.of(TokenType.PUNCTUATION)), ESCAPED_ATSIGH(202, "ESCATSIGH", "\\@", EnumSet.of(TokenType.PUNCTUATION)), ESCAPED_BACKSLASH(203, "ESCBACKSLASH", "\\\\", EnumSet.of(TokenType.PUNCTUATION)), /* * Special tokens */ ERROR(145, "ERROR", "error", EnumSet.of(TokenType.MODIFIER, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), COMMENT(146, "COMMENT", "comment", EnumSet.of(TokenType.MODIFIER, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), TYPE(147, "TYPE", "type", EnumSet.of(TokenType.MODIFIER, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), LENGTH(148, "LENGTH", "Length", "length", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), INLINERETURN(149, "INLINERETURN", "inline-return", EnumSet.of(TokenType.MODIFIER)), INLINEMETHOD(150, "INLINEMETHOD", "inline-method", EnumSet.of(TokenType.MODIFIER)), INLINENEWINSTANCE(151, "INLINENEWINSTANCE", "inline-new", EnumSet.of(TokenType.MODIFIER)), /* * Added for jasm */ METHODREF(152, "METHODREF", "Method", "Methodref", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), FIELDREF(153, "FIELD", "Field", "Fieldref", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), STACK(154, "STACK", "stack", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), LOCAL(155, "LOCAL", "locals", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), CPINDEX(156, "CPINDEX", "CPINDEX", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), CPNAME(157, "CPNAME", "CPName", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), SIGN(158, "SIGN", "SIGN", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME)), BITS(159, "BITS", "bits", EnumSet.of(TokenType.MISC, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), INF(160, "INF", "Inf", "Infinity", EnumSet.of(TokenType.MISC, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), NAN(161, "NAN", "NaN", EnumSet.of(TokenType.MISC, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), INNERCLASS(162, "INNERCLASS", "InnerClass", "InnerClasses", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), OF(163, "OF", "of", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), SYNTHETIC(164, "SYNTHETIC", "synthetic", EnumSet.of(TokenType.MODIFIER, TokenType.JASM_IDENT, TokenType.CLASS_NAME), KeywordType.KEYWORD), STRICT(165, "STRICT", "strict", EnumSet.of(TokenType.MODIFIER, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), DEPRECATED(166, "DEPRECATED", "deprecated", EnumSet.of(TokenType.MODIFIER, TokenType.JASM_IDENT, TokenType.CLASS_NAME), KeywordType.KEYWORD), VERSION(167, "VERSION", "version", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME), KeywordType.KEYWORD), MODULE(168, "MODULE", "module", EnumSet.of(TokenType.DECLARATION, TokenType.CLASS_NAME), KeywordType.KEYWORD), ANNOTATION(169, "ANNOTATION", "@", EnumSet.of(TokenType.MISC)), PARAM_NAME(170, "PARAM_NAME", "#", EnumSet.of(TokenType.MISC)), VARARGS(171, "VARARGS", "varargs", EnumSet.of(TokenType.MODIFIER, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), BRIDGE(172, "BRIDGE", "bridge", EnumSet.of(TokenType.MODIFIER, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), // Declaration keywords BOOTSTRAPMETHOD(173, "BOOTSTRAPMETHOD", "BootstrapMethod", "BootstrapMethods", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), NESTHOST(174, "NESTHOST", "NestHost", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), SIGNATURE(175, "SIGNATURE", "Signature", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), NESTMEMBERS(176, "NESTMEMBERS", "NestMembers", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), // RECORD(177, "RECORD", "Record", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), COMPONENT(178, "COMPONENT", "Component", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), // PERMITTEDSUBCLASSES(179, "PERMITTEDSUBCLASSES", "PermittedSubclasses", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), SOURCEFILE(180, "SOURCEFILE", "SourceFile", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), ENCLOSINGMETHOD(181, "ENCLOSINGMETHOD", "EnclosingMethod", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), SOURCEDEBUGEXTENSION(182, "SOURCEDEBUGEXTENSION", "SourceDebugExtension", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), //Module statements REQUIRES(183, "REQUIRES", "requires", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME), KeywordType.KEYWORD), EXPORTS(184, "EXPORTS", "exports", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME), KeywordType.KEYWORD), TO(185, "TO", "to", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME), KeywordType.KEYWORD), USES(186, "USES", "uses", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME), KeywordType.KEYWORD), PROVIDES(187, "PROVIDES", "provides", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME), KeywordType.KEYWORD), WITH(188, "WITH", "with", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME), KeywordType.KEYWORD), OPENS(189, "OPENS", "opens", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME), KeywordType.KEYWORD), // // Table 4.7.20.2-1 type_path_kind ARRAY_TYPEPATH(190, TypeAnnotationTypes.EPathKind.ARRAY.parseKey(), TypeAnnotationTypes.EPathKind.ARRAY.parseKey(), EnumSet.of(TokenType.TYPE_PATH_KIND, TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), INNER_TYPE_TYPEPATH(191, TypeAnnotationTypes.EPathKind.INNER_TYPE.parseKey(), TypeAnnotationTypes.EPathKind.INNER_TYPE.parseKey(), EnumSet.of(TokenType.TYPE_PATH_KIND, TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), WILDCARD_TYPEPATH(192, TypeAnnotationTypes.EPathKind.WILDCARD.parseKey(), TypeAnnotationTypes.EPathKind.WILDCARD.parseKey(), EnumSet.of(TokenType.TYPE_PATH_KIND, TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), TYPE_ARGUMENT_TYPEPATH(193, TypeAnnotationTypes.EPathKind.TYPE_ARGUMENT.parseKey(), TypeAnnotationTypes.EPathKind.TYPE_ARGUMENT.parseKey(), EnumSet.of(TokenType.TYPE_PATH_KIND, TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), // Valhalla Declaration keyword(s) attribute LOADABLEDESCRIPTORS(203, "LOADABLEDESCRIPTORS", "LoadableDescriptors", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), // STACKMAPTABLE_HEADER(208, "STACKMAPTABLE", "StackMapTable", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), STACKMAP_HEADER(209, "STACKMAP", "StackMap", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), LINETABLE_HEADER(210, "LINETABLE", "LineTable", "LineNumberTable", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), LOCALVARIABLES_HEADER(211, "LOCALVARIABLES", "LocalVariables", "LocalVariableTable", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), LOCALVARIABLETYPES_HEADER(212, "LOCALVARIABLETYPES", "LocalVariableTypes", "LocalVariableTypeTable", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), /* * Special tokens */ LINE(214, "LINE", "line", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), START(215, "START", "Start", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), SLOT(216, "SLOT", "Slot", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), NAME(217, "NAME", "Name", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), DESCRIPTOR(218, "DESCRIPTOR", "Descriptor", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), NUMBEROFENTRIES(219, "NUMBEROFENTRIES", "number_of_entries", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), FRAMETYPE(220, "FRAMETYPE", "frame_type", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), ENTRYTYPE(221, "ENTRYTYPE", "entry_type", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), OFFSETDELTA(222, "OFFSETDELTA", "offset_delta", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), BYTECODEOFFSET(223, "BYTECODEOFFSET", "offset", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), STACKMAP(224, "STACKMAP", "stack_map", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), LOCALSMAP(225, "LOCALSMAP", "locals_map", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), UNSETFIELDS(226, "UNSETFIELDS", "unset_fields", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), ARGUMENTS(227, "ARGUMENTS", "Arguments", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), // new keyword(s) IDENTITY(228, "IDENTITY", "identity", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD), VALUE(229, "VALUE", "value", EnumSet.of(TokenType.DECLARATION, TokenType.JASM_IDENT, TokenType.CLASS_NAME, TokenType.MODULE_NAME), KeywordType.KEYWORD); final static EnumSet ALL_TOKENS = EnumSet.allOf(Token.class); // Misc Keywords final private Integer value; // 160 final private String printValue; // INF final private String parseKey; // inf final private String alias; // Infinity final private EnumSet tokenTypes; // TokenType.MISC, TokenType.MODULE_NAME final private KeywordType keywordType; // KeywordType.KEYWORD public static Optional get(String parseKey, KeywordType keywordType) { return ALL_TOKENS.stream(). filter(t -> t.keywordType == keywordType). filter(t -> t.parseKey.equals(parseKey) || (t.alias != null && t.alias.equals(parseKey))). findFirst(); } public static Set getTokenByType(TokenType type) { return ALL_TOKENS.stream().filter(t -> t.tokenTypes.contains(type)). collect(Collectors.toSet()); } public static Set getTokenByKeywordType(KeywordType keywordType) { return ALL_TOKENS.stream().filter(t -> t.keywordType.equals(keywordType)). collect(Collectors.toSet()); } /** * Checks that this enum element is in an enum list * * @param tokens the list of enum elements for checking * @return true if a tokens list contains this enum element */ public boolean in(Token... tokens) { return tokens != null && Arrays.asList(tokens).contains(this); } // By default, if a KeywordType is not specified, it has the value 'TOKEN' Token(Integer val, String print, String parseKey, EnumSet tokenTypes) { this(val, print, parseKey, null, tokenTypes, KeywordType.TOKEN); } Token(Integer val, String print, String parseKey, EnumSet tokenTypes, KeywordType ktype) { this(val, print, parseKey, null, tokenTypes, ktype); } Token(Integer val, String print, String parseKey, String alias, EnumSet tokenTypes, KeywordType ktype) { this.value = val; this.printValue = print; this.parseKey = parseKey; this.tokenTypes = tokenTypes; this.keywordType = ktype; this.alias = alias; } public String printValue() { return printValue; } public String parseKey() { return parseKey; } public String alias() { return this.alias; } public boolean hasType(TokenType type) { return tokenTypes.contains(type); } public int value() { return value; } public boolean isPossibleJasmIdentifier() { return tokenTypes.contains(TokenType.JASM_IDENT); } public boolean isPossibleModuleName() { return tokenTypes.contains(TokenType.MODULE_NAME); } public boolean isPossibleClassName() { return tokenTypes.contains(TokenType.CLASS_NAME); } /** * Checks a token belonging to the table: Table 4.7.20.2-A. Interpretation of type_path_kind values * * @return true if token is ARRAY, INNER_TYPE, WILDCARD or TYPE_ARGUMENT */ public boolean possibleTypePathKind() { return tokenTypes.contains(TokenType.TYPE_PATH_KIND); } @Override public String toString() { return "<" + printValue + "> [" + value + "]"; } } public static Token keyword_token_ident(String idValue) { return Token.get(idValue, KeywordType.KEYWORD).orElse(Token.IDENT); } public static String asString(List tokens) { StringBuilder sb = new StringBuilder(""); for (Token token : tokens) { if(sb .length() > 0) { sb.append(", "); } sb.append('\'').append(token.parseKey()).append('\''); } return sb.toString(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/JasmTool.java000066400000000000000000000036071514323636100256150ustar00rootroot00000000000000/* * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.Compiler; import org.openjdk.asmtools.common.Tool; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.StderrLog; import org.openjdk.asmtools.jasm.JasmEnvironment.JasmBuilder; public abstract class JasmTool extends Compiler { protected JasmTool(ToolOutput toolOutput) { super(toolOutput, new StderrLog()); } protected JasmTool(ToolOutput toolOutput, DualStreamToolOutput logger) { super(toolOutput, logger); } @Override public JasmEnvironment getEnvironment(ToolOutput toolOutput, DualStreamToolOutput logger) { JasmBuilder builder = new JasmBuilder(toolOutput, logger); return builder.build(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/LineNumberData.java000066400000000000000000000033141514323636100267120ustar00rootroot00000000000000/* * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; /** * 4.7.12. The LineNumberTable Attribute *

* LineNumberTable_attribute { * * { u2 start_pc; * u2 line_number; * } * * } */ class LineNumberData implements DataWriter { int start_pc; long line_number; public LineNumberData(int start_pc, long line_number) { this.start_pc = start_pc; this.line_number = line_number; } @Override public int getLength() { return 4; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(start_pc); out.writeShort((int)line_number); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/LoadableDescriptorsAttr.java000066400000000000000000000033051514323636100306400ustar00rootroot00000000000000/* * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import java.util.List; /** * Valhalla: *

* LoadableDescriptors_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_descriptors; * u2 descriptors[number_of_descriptors]; * } */ public class LoadableDescriptorsAttr extends ArrayAttr { public LoadableDescriptorsAttr(ConstantPool pool, List descriptors) { super(pool, EAttribute.ATT_LoadableDescriptors, descriptors); } @Override protected ConstCell classifyConstCell(ConstantPool pool, ConstCell cell) { return cell; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/LocalVariableData.java000066400000000000000000000113631514323636100273550ustar00rootroot00000000000000/* * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.ToolLogger; import org.openjdk.asmtools.jdis.notations.Signature; import java.io.IOException; /** Class for entries: local_variable_table[i], local_variable_type_table[i] * * 4.7.13. The LocalVariableTable Entry: local_variable_table[i] *

* LocalVariableTable_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 local_variable_table_length; * { u2 start_pc; * u2 length; * u2 name_index; * u2 descriptor_index; * u2 index; * } local_variable_table[local_variable_table_length]; * } *

* 4.7.13. The LocalVariableTypeTable Entry: local_variable_type_table[i] * LocalVariableTypeTable_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 local_variable_type_table_length; * { u2 start_pc; * u2 length; * u2 name_index; * u2 signature_index; * u2 index; * } local_variable_type_table[local_variable_type_table_length]; * } */ class LocalVariableData implements DataWriter { private final short index; // assisting fields FieldType fieldType; Signature fieldSignature; private short start_pc; private short length; private ConstCell nameCell; private ConstCell descriptorCell; /** * Creates an entry of Local Variable Table * * @param index The value of the index item must be a valid index into the local variable array of the current frame. * The given local variable is at index in the local variable array of the current frame * var is presented in the form: var index (#)name(_index):(#)descriptor(_index); */ public LocalVariableData(short index, short curPC, ConstCell nameCell, ConstCell descriptorCell) { this.index = index; this.start_pc = curPC; this.nameCell = nameCell; this.descriptorCell = descriptorCell; } public LocalVariableData(short start_pc, short length, short slot, ConstCell nameCell, ConstCell descriptorCell) { this.start_pc = start_pc; this.length = length; this.index = slot; this.nameCell = nameCell; this.descriptorCell = descriptorCell; } public FieldType getFieldType() { if( this.fieldType == null ) { this.fieldType = FieldType.getFieldType(((String) descriptorCell.ref.value).charAt(0)); } return this.fieldType; } public LocalVariableData setFieldType(FieldType fieldType) { this.fieldType = fieldType; return this; } public Signature getSignature(ToolLogger logger) { if ( this.fieldSignature == null) { this.fieldSignature = new Signature<>(logger, (String) descriptorCell.ref.value); } return this.fieldSignature; } public LocalVariableData setFieldSignature(Signature fieldSignature) { this.fieldSignature = fieldSignature; return this; } public int getSlotsCount() { return (getFieldType() == null) ? 0 : this.fieldType.getSlotsCount(); } public short getIndex() { return index; } @Override public int getLength() { return 10; } public void setLength(int CurrentPC) { this.length = (short) (CurrentPC - start_pc); } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(start_pc); out.writeShort(length); out.writeShort(nameCell.cpIndex); out.writeShort(descriptorCell.cpIndex); out.writeShort(index); } public void setStartPc(short start_pc) { this.start_pc = start_pc; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/Main.java000066400000000000000000000344561514323636100247570ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.common.inputs.FileInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.PrintWriterOutput; import org.openjdk.asmtools.common.outputs.StdoutOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualOutputStreamOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.common.outputs.log.StderrLog; import org.openjdk.asmtools.common.structure.CFVersion; import java.io.IOException; import java.io.PrintStream; import java.io.PrintWriter; import java.net.URISyntaxException; import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.regex.PatternSyntaxException; import static org.openjdk.asmtools.Main.*; import static org.openjdk.asmtools.common.EMessageKind.ERROR; import static org.openjdk.asmtools.common.Environment.FAILED; import static org.openjdk.asmtools.common.Environment.OK; import static org.openjdk.asmtools.common.outputs.FSOutput.FSDestination.DIR; import static org.openjdk.asmtools.util.ProductInfo.FULL_VERSION; /** * Jasm is an assembler that accepts a text file based on the JASM Specification, * and produces a .class file for use with a Java Virtual Machine. *

* Main entry point of the JASM assembler :: jasm to class */ public class Main extends JasmTool { private final CFVersion cfv = new CFVersion(); // tool options private boolean noWriteFlag = false; // Do not write generated class files // hidden options private int byteLimit = 0; // hidden options: Parser debug flags private boolean debugScanner = false; private boolean debugMembers = false; private boolean debugCP = false; private boolean debugAnnot = false; private boolean debugInstr = false; private boolean debugAttribute = false; public Main(ToolOutput toolOutput, String... argv) { super(toolOutput); parseArgs(argv); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, String... argv) { super(toolOutput, log); parseArgs(argv); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, ToolInput toolInput, String... argv) { super(toolOutput, log); if (toolInput != null) { fileList.add(toolInput); } parseArgs(argv); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, ToolInput... toolInputs) { super(toolOutput, log); Collections.addAll(fileList, toolInputs); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, ToolInput toolInput) { super(toolOutput, log); fileList.add(toolInput); } /** * Deprecated method to support external tools having it * * @param ref A stream to which to write reference output * @param toolName the tool's name (ignored) */ @Deprecated public Main(PrintWriter ref, String toolName) { super(new PrintWriterOutput(ref)); } /** * Deprecated method to support external tools having it * * @param out A stream to which to write reference output * @param toolName the tool's name (ignored) */ @Deprecated public Main(PrintStream out, String toolName) { this(new PrintWriter(out), toolName); } // jasm entry point public static void main(String... argv) { Main compiler = new Main(new StdoutOutput(), new StderrLog(), argv); System.exit(compiler.compile()); } // Run jasm compiler when args already parsed @Override public synchronized int compile() { // compile all input files int rc = OK; try { for (ToolInput inputFileName : fileList) { environment.setToolInput(inputFileName); Parser parser = new Parser(environment, cfv); // Set hidden options: Parser debug flags parser.setDebugFlags(debugScanner, debugMembers, debugCP, debugAnnot, debugInstr, debugAttribute); parser.parseFile(); if (environment.getCount(ERROR) > 0) { break; } if (noWriteFlag) { continue; } ClassData[] clsData = parser.getClassesData(); for (ClassData cd : clsData) { String fullyQualifiedName = cd.myClassName; ToolOutput toolOutput = environment.getToolOutput(); toolOutput.startClass(fullyQualifiedName, Optional.of(cd.fileExtension), environment); if (byteLimit > 0) { cd.setByteLimit(byteLimit); } cd.write(toolOutput); toolOutput.finishClass(fullyQualifiedName); } if (environment.hasMessages()) { rc += environment.flush(true); } } } catch (IOException | URISyntaxException | Error exception) { environment.printException(exception); rc++; } catch (Throwable exception) { // all untrapped exception/errors that escaped CompilerLogger environment.printException(exception); environment.error(exception); } if (environment.hasMessages()) rc += environment.flush(true); return rc; } @Override public void usage() { environment.flush(false); environment.usage(List.of( "info.usage", "info.opt.d", "info.opt.w", "info.opt.nowrite", "info.opt.nowarn", "info.opt.strict", "info.opt.cv", "info.opt.fixcv", "info.opt.fixcv.full", "info.opt.t", "info.opt.v", "info.opt.version" )); } @Override protected void parseArgs(String... argv) { try { // Parse arguments for (int i = 0; i < argv.length; i++) { String arg = argv[i]; switch (arg) { // public options case "-v" -> setVerboseFlag(true); case "-t" -> { setVerboseFlag(true); setTraceFlag(true); } case "-strict" -> environment.setStrictWarningsOn(); case "-nowarn" -> environment.setIgnoreWarningsOn(); case "-nowrite" -> noWriteFlag = true; case VERSION_SWITCH -> { environment.println(FULL_VERSION); System.exit(OK); } case WRITE_SWITCH -> { // -w environment.setIgnorePackage(true); setFSDestination(DIR, ++i, argv); } case DIR_SWITCH -> setFSDestination(DIR, ++i, argv); case DUAL_LOG_SWITCH -> this.environment.setOutputs(new DualOutputStreamOutput()); case "-h", "-help", "-?" -> { usage(); System.exit(OK); } // overrides cf version even if it's defined in the source file. case "-fixcv", "-cv" -> { boolean frozenCFV = (arg.startsWith("-fix")); if ((i + 1) >= argv.length) { if (frozenCFV) { environment.error("err.fix_cv_requires_arg"); } else { environment.error("err.cv_requires_arg"); } usage(); throw new IllegalArgumentException(); } try { String cfvArg = argv[++i]; if (cfvArg.contains("-")) { if (!frozenCFV) { throw new NumberFormatException(); } String[] versions = cfvArg.split("-", 2); String[] versionsThreshold = versions[0].split("[.:]+", 2); String[] versionsUpdate = versions[1].split("[.:]+", 2); if (versionsThreshold.length != 2 || versionsUpdate.length != 2) { throw new NumberFormatException(); } Pair versionsPair = new Pair<>(Integer.parseInt(versionsThreshold[0]), Integer.parseInt(versionsThreshold[1])); if (versionsPair.second > 0xFFFF || versionsPair.first > 0xFFFF) { throw new NumberFormatException(); } cfv.setThreshold(versionsPair.first, versionsPair.second); versionsPair = new Pair<>(Integer.parseInt(versionsUpdate[0]), Integer.parseInt(versionsUpdate[1])); if (versionsPair.second > 0xFFFF || versionsPair.first > 0xFFFF) { throw new NumberFormatException(); } cfv.setVersion(versionsPair.first, versionsPair.second).setByParameter(true).setFrozen(true); } else { String[] versions = cfvArg.split("[.:]+", 2); if (versions.length == 2) { Pair versionsPair = new Pair<>(Integer.parseInt(versions[0]), Integer.parseInt(versions[1])); if (versionsPair.second > 0xFFFF || versionsPair.first > 0xFFFF) { throw new NumberFormatException(); } cfv.setVersion(Integer.parseInt(versions[0]), Integer.parseInt(versions[1])). setByParameter(true).setFrozen(frozenCFV); } else { throw new NumberFormatException(); } } } catch (PatternSyntaxException | NumberFormatException exception) { if (frozenCFV) { environment.error("err.invalid_threshold_major_minor_param"); } else { environment.error("err.invalid_major_minor_param"); } usage(); throw new IllegalArgumentException(); } } // non-public options case "-XdScanner" -> debugScanner = true; case "-XdMember" -> debugMembers = true; case "-XdCP" -> debugCP = true; case "-XdInstr" -> debugInstr = true; case "-XdAnnot" -> debugAnnot = true; case "-XdAttr" -> debugAttribute = true; case "-XdAll" -> { debugScanner = true; debugMembers = true; debugCP = true; debugInstr = true; debugAnnot = true; debugAttribute = true; } case "-Xdlimit" -> { // parses file until the specified byte number if (i + 1 > argv.length) { environment.error("err.byte.limit"); throw new IllegalArgumentException(); } else { try { byteLimit = Integer.parseInt(argv[++i]); } catch (NumberFormatException e) { environment.error("err.byte.limit"); throw new IllegalArgumentException(); } } } case org.openjdk.asmtools.Main.STDIN_SWITCH -> addStdIn(); default -> { if (arg.startsWith("-")) { environment.error("err.invalid_option", arg); usage(); throw new IllegalArgumentException(); } else { fileList.add(new FileInput(argv[i])); } } } } if (fileList.isEmpty()) { usage(); System.exit(FAILED); } } catch (IllegalArgumentException iae) { if (environment.hasMessages()) { environment.flush(false); } System.exit(FAILED); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/MemberData.java000066400000000000000000000176511514323636100260720ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.common.ToolLogger; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.common.structure.ELocation; import org.openjdk.asmtools.common.structure.EModifier; import java.util.ArrayList; import static org.openjdk.asmtools.common.structure.EModifier.*; import static org.openjdk.asmtools.jasm.JasmTokens.Token.SIGNATURE; /** * The common base structure for field_info, method_info, and component_info */ abstract public class MemberData> { protected final ConstantPool pool; private final T environment; protected int access; protected AttrData syntheticAttr, deprecatedAttr; protected DataVectorAttr annotAttrVis = null; protected DataVectorAttr annotAttrInv = null; protected DataVectorAttr type_annotAttrVis = null; protected DataVectorAttr type_annotAttrInv = null; protected AttrData signatureAttr; protected ELocation attributeLocation = ELocation.unknown; public MemberData(ConstantPool pool, T environment) { this(pool, environment, 0); } public MemberData(ConstantPool pool, T environment, int access) { this.pool = pool; this.environment = environment; this.access = access; } /** * Checks for the existence of an attribute belonging to the MemberData. * * @param attribute the attribute to check for existence * @return true if the attribute exists */ protected > boolean checkExistence(EAttribute attribute) { throw new RuntimeException("Not implemented yet"); } /** * Checks for the existence of an attribute belonging to the MemberData. * * @param attribute the attribute to check for existence * @param action the action to take if the attribute exists * @param the type of the attribute owner * @return the instance of the attribute owner */ protected > M checkExistence(EAttribute attribute, Runnable action) { if (checkExistence(attribute)) { action.run(); } return (M) this; } protected > M andThenCheck(EAttribute attribute, Runnable action) { return checkExistence(attribute, action); } public void createPseudoMod() { // If a member has a Pseudo-modifier // create the appropriate marker attributes, // and clear the PseudoModifiers from the access flags. if (EModifier.isSyntheticPseudoMod(access)) { syntheticAttr = new AttrData(pool, EAttribute.ATT_Synthetic); access &= ~SYNTHETIC_ATTRIBUTE.getFlag(); } if (EModifier.isDeprecatedPseudoMod(access)) { deprecatedAttr = new AttrData(pool, EAttribute.ATT_Deprecated); access &= ~DEPRECATED_ATTRIBUTE.getFlag(); } } public T getEnvironment() { return environment; } public ConstantPool getPool() { return pool; } public void setSignatureAttr(ConstCell value_cpx) { if (this.signatureAttr != null) { CPXAttr cpx = (CPXAttr) signatureAttr; if (value_cpx.cpIndex != cpx.cell.cpIndex) { environment.warning("warn.redeclared.attribute", SIGNATURE.parseKey(), this.attributeLocation.getDescription()); } } signatureAttr = new CPXAttr(pool, EAttribute.ATT_Signature, value_cpx); } public void setSignatureAttr(ConstCell value_cpx, long position) { if (signatureAttr != null) { CPXAttr cpx = (CPXAttr) signatureAttr; if (value_cpx.cpIndex != cpx.cell.cpIndex) { environment.warning(position, "warn.redeclared.attribute", SIGNATURE.parseKey(), this.attributeLocation.getDescription()); } } signatureAttr = new CPXAttr(pool, EAttribute.ATT_Signature, value_cpx); } /** * Retrieves the signature attribute associated with this member. * * @return the signature attribute, or null if it has not been set */ public AttrData getSignatureAttr() { return signatureAttr; } protected abstract DataVector getAttrVector(); @SafeVarargs protected final DataVector getDataVector(D... extraAttrs) { DataVector attrs = new DataVector(); for (D extra : extraAttrs) { if (extra != null) { attrs.add(extra); } } // common set for [ FieldData, MethodData, RecordData ] if (annotAttrVis != null) { attrs.add((D) annotAttrVis); } if (annotAttrInv != null) { attrs.add((D) annotAttrInv); } if (type_annotAttrVis != null) { attrs.add((D) type_annotAttrVis); } if (type_annotAttrInv != null) { attrs.add((D) type_annotAttrInv); } return attrs; } public MemberData addAnnotations(ArrayList list) { if( list != null ) { for (AnnotationData item : list) { boolean invisible = item.invisible; if (item instanceof TypeAnnotationData typeAnnotationData) { // Type Annotations if (invisible) { if (type_annotAttrInv == null) { type_annotAttrInv = new DataVectorAttr<>(pool, EAttribute.ATT_RuntimeInvisibleTypeAnnotations); } type_annotAttrInv.add(typeAnnotationData); } else { if (type_annotAttrVis == null) { type_annotAttrVis = new DataVectorAttr<>(pool, EAttribute.ATT_RuntimeVisibleTypeAnnotations); } type_annotAttrVis.add(typeAnnotationData); } } else { // Regular Annotations if (invisible) { if (annotAttrInv == null) { annotAttrInv = new DataVectorAttr<>(pool, EAttribute.ATT_RuntimeInvisibleAnnotations); } annotAttrInv.add(item); } else { if (annotAttrVis == null) { annotAttrVis = new DataVectorAttr<>(pool, EAttribute.ATT_RuntimeVisibleAnnotations); } annotAttrVis.add(item); } } } } return this; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/MethodData.java000066400000000000000000000212741514323636100260770ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.CompilerConstants; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.common.structure.ELocation; import org.openjdk.asmtools.common.structure.EModifier; import java.io.IOException; import java.util.ArrayList; import java.util.TreeMap; class MethodData extends MemberData { // MethodParameterData Attribute static class MethodParameterData implements DataWriter { int access; ConstCell name; public MethodParameterData(int access, ConstCell name) { this.access = access; this.name = name; } @Override public int getLength() { return 4; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort((name == null) ? 0 : name.cpIndex); out.writeShort(access); } }// end class MethodParameterData /** * Used to store Parameter Arrays (as attributes) */ static public class DataPArrayAttr extends AttrData implements CompilerConstants { TreeMap> elements; // Data int paramsTotal; public DataPArrayAttr(ConstantPool pool, EAttribute attribute, int paramsTotal, TreeMap> elements) { super(pool, attribute); this.paramsTotal = paramsTotal; this.elements = elements; } public DataPArrayAttr(ConstantPool pool, EAttribute attribute, int paramsTotal) { this(pool, attribute, paramsTotal, new TreeMap<>()); } public void put(int paramNum, T element) { ArrayList v = get(paramNum); if (v == null) { v = new ArrayList<>(); elements.put(paramNum, v); } v.add(element); } public ArrayList get(int paramNum) { return elements.get(paramNum); } @Override public int attrLength() { int length = 1; // One byte for the parameter count // calculate overall size here rather than in add() // because it may not be available at the time of invoking of add() for (int i = 0; i < paramsTotal; i++) { ArrayList attrarray = get(i); if (attrarray != null) { for (DataWriter item : attrarray) { length += item.getLength(); } } length += 2; // 2 bytes for the annotation count for each parameter } return length; } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); // attr name, attr len out.writeByte(paramsTotal); // number of parameters(in byte) for (int i = 0; i < paramsTotal; i++) { ArrayList list = get(i); if (list != null) { // write out the number of annotations for the current param out.writeShort(list.size()); for (T item : list) { item.write(out); // write the current annotation } } else { out.writeShort(0); // No annotations to write out } } } }// end class DataPArrayAttr /* Method Data Fields */ protected ClassData classData; protected ConstCell nameCell, sigCell; protected CodeAttr code; protected DataVectorAttr> exceptions = null; protected DataVectorAttr methodParameters = null; protected DataPArrayAttr pannotAttrVis = null; protected DataPArrayAttr pannotAttrInv = null; protected DefaultAnnotationAttr defaultAnnot = null; public MethodData(ClassData classData, int access, ConstCell name, ConstCell signature, ArrayList> exc_table) { super(classData.pool, classData.getEnvironment(), access); this.classData = classData; this.attributeLocation = ELocation.method_info; this.addExceptions(exc_table); nameCell = name; sigCell = signature; // Normalize the modifiers to access flags if (EModifier.hasPseudoMod(access)) { createPseudoMod(); } } public void addExceptions(ArrayList> exc_table) { if ((exc_table != null) && (!exc_table.isEmpty())) { if (exceptions == null) { exceptions = new DataVectorAttr<>(classData.pool, EAttribute.ATT_Exceptions, exc_table); } else { exceptions.addAll(exc_table); } } } public DataVectorAttr> getExceptions() { return exceptions; } public boolean hasExceptions() { return (exceptions != null) && (!exceptions.isEmpty()); } /** * Retrieves the default annotation attribute associated with this method. * The default annotation is used to store the default value of an annotation * method. * * @return the default annotation attribute, or null if it has not been set */ public DefaultAnnotationAttr getDefaultAnnotation() { return defaultAnnot; } public void addMethodParameter(int totalParams, int paramNum, ConstCell name, int access) { getEnvironment().traceln("addMethodParameter Param[" + paramNum + "] (name: " + name.toString() + ", Flags (" + access + ")."); if (methodParameters == null) { methodParameters = new DataVectorAttr<>(classData.pool, EAttribute.ATT_MethodParameters, true); for (int i = 0; i < totalParams; i++) { // initialize the paramName array (in case the name is not given in Jasm syntax) methodParameters.add(new MethodParameterData(0, null)); } } methodParameters.set(paramNum, new MethodParameterData(access, name)); } public CodeAttr startCode(int paramCount, Indexer max_stack, Indexer max_locals) { code = new CodeAttr(this, paramCount, max_stack, max_locals); return code; } public void setDefaultAnnotation(DefaultAnnotationAttr data) { defaultAnnot = data; } public void addParamAnnotation(int totalParams, int paramNum, AnnotationData data) { if (!data.invisible) { if (pannotAttrVis == null) { pannotAttrVis = new DataPArrayAttr<>(classData.pool, EAttribute.ATT_RuntimeVisibleParameterAnnotations,totalParams); } pannotAttrVis.put(paramNum, data); } else { if (pannotAttrInv == null) { pannotAttrInv = new DataPArrayAttr<>(classData.pool, EAttribute.ATT_RuntimeInvisibleParameterAnnotations, totalParams); } pannotAttrInv.put(paramNum, data); } } @Override protected DataVector getAttrVector() { DataVector dv = getDataVector( exceptions, syntheticAttr, deprecatedAttr, signatureAttr, methodParameters, code, defaultAnnot); if (pannotAttrVis != null) { dv.add(pannotAttrVis); } if (pannotAttrInv != null) { dv.add(pannotAttrInv); } return dv; } public void write(CheckedDataOutputStream out) throws IOException, Parser.CompilerError { out.writeShort(access); out.writeShort(nameCell.cpIndex); out.writeShort(sigCell.cpIndex); getAttrVector().write(out); } } // end MethodData jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ModuleAttr.java000066400000000000000000000325331514323636100261450ustar00rootroot00000000000000/* * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.asmutils.Triplet; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.jdis.ModuleContent; import java.io.IOException; import java.util.*; import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.function.Function; import static org.openjdk.asmtools.common.structure.EModifier.ACC_OPEN; /** * The module attribute */ class ModuleAttr extends AttrData { // shared data private ModuleContent.Builder builder; private final Function findUTF8Cell; private final Function findClassCell; private final Function findModuleCell; private final Function findPackageCell; // entries to populate tables of the module attribute Consumer requires = (d) -> this.builder.require(d); BiConsumer> exports = (e, ms) -> this.builder.exports(new ModuleContent.Exported((ModuleContent.FlaggedTargetType) e), ms); BiConsumer> opens = (o, ms) -> this.builder.opens(new ModuleContent.Opened((ModuleContent.FlaggedTargetType) o), ms); BiConsumer> provides = (p, cs) -> this.builder.provides(new ModuleContent.Provided(p), cs); Consumer uses = (u) -> this.builder.uses(new ModuleContent.Uses(u)); ModuleAttr(ClassData classData) { super(classData.pool, EAttribute.ATT_Module); builder = new ModuleContent.Builder(); findUTF8Cell = targetType -> classData.pool.findUTF8Cell(targetType); findClassCell = targetType -> classData.pool.findClassCell(targetType); findModuleCell = targetType -> classData.pool.findModuleCell(targetType); findPackageCell = targetType -> classData.pool.findPackageCell(targetType); } void openModule() { builder.setModuleFlags(ACC_OPEN.getFlag()); } void setModuleName(String value) { builder.setModuleName(value); } void setModuleNameCpIndex(int cpIndex) { builder.setCpIndex(cpIndex); } ModuleAttr build() { ModuleContent moduleContent = builder.build(); Content.instance.header = new HeaderStruct(moduleContent.header, findModuleCell, findUTF8Cell); Content.instance.requiresStruct = new SetStruct<>(moduleContent.requires, findModuleCell, findUTF8Cell); Content.instance.exportsMapStruct = new MapStruct<>(moduleContent.exports, findPackageCell, findModuleCell); Content.instance.opensMapStruct = new MapStruct<>(moduleContent.opens, findPackageCell, findModuleCell); Content.instance.usesStruct = new SetStruct<>(moduleContent.uses, findClassCell, null); Content.instance.providesMapStruct = new MapStruct<>(moduleContent.provides, findClassCell, findClassCell); return this; } @Override public int attrLength() { return Content.instance.getLength(); } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); Content.instance.write(out); } private enum Content implements DataWriter { instance { @Override public int getLength() { return header.getLength() + requiresStruct.getLength() + exportsMapStruct.getLength() + opensMapStruct.getLength() + usesStruct.getLength() + providesMapStruct.getLength(); } @Override public void write(CheckedDataOutputStream out) throws IOException { // keep order! header.write(out); requiresStruct.write(out); exportsMapStruct.write(out); opensMapStruct.write(out); usesStruct.write(out); providesMapStruct.write(out); } }; HeaderStruct header; SetStruct requiresStruct; MapStruct exportsMapStruct; MapStruct opensMapStruct; SetStruct usesStruct; MapStruct providesMapStruct; } /** * u2 {exports|opens}_count; * { u2 {exports|opens}_index; * u2 {exports|opens}_flags; * u2 {exports|opens}_to_count; * u2 {exports|opens}_to_index[{exports|opens}_to_count]; * } {exports|opens}[{exports|opens}_count]; * or * u2 provides_count; * { u2 provides_index; * u2 provides_with_count; * u2 provides_with_index[provides_with_count]; * } provides[provides_count]; */ private static class MapStruct implements DataWriter { final List>> exportsOpensList = new ArrayList<>(); final List>> providesList = new ArrayList<>(); MapStruct(Map> source, Function nameFinder, Function targetFinder) { Objects.requireNonNull(source); source.entrySet().stream().forEach( e -> { ArrayList to = new ArrayList<>(); e.getValue().forEach(mn -> to.add(targetFinder.apply(mn))); if (e.getKey().isFlagged()) { exportsOpensList.add(new Triplet<> (nameFinder.apply(e.getKey()), ((ModuleContent.FlaggedTargetType) e.getKey()).getFlags(), to)); } else { providesList.add(new Pair<>(nameFinder.apply(e.getKey()), to)); } } ); } @Override public void write(CheckedDataOutputStream out) throws IOException { if (providesList.isEmpty()) { out.writeShort(exportsOpensList.size()); // u2 {exports|opens}_count; for (Triplet> triplet : exportsOpensList) { out.writeShort(triplet.first.cpIndex); // { u2 {exports|opens}_index; out.writeShort(triplet.second); // u2 {exports|opens}_flags; out.writeShort(triplet.third.size()); // u2 {exports|opens}_to_count; for (ConstCell to : triplet.third) out.writeShort(to.cpIndex); // u2 {exports|opens}_to_index[{exports|opens}_to_count]; } } } else { out.writeShort(providesList.size()); // u2 provides_count; for (Pair> pair : providesList) { out.writeShort(pair.first.cpIndex); // { u2 provides_index; out.writeShort(pair.second.size()); // u2 provides_with_count; for (ConstCell to : pair.second) out.writeShort(to.cpIndex); // u2 provides_with_index[provides_with_count]; } } } } @Override public int getLength() { if (providesList.isEmpty()) { // (u2:{exports|opens}_count) + (u2:{exports|opens}_index + u2:{exports|opens}_flags u2:{exports|opens}_to_count) * {exports|opens}_count + return 2 + 6 * exportsOpensList.size() + // (u2:{exports|opens}_to_index) * {exports|opens}_to_count exportsOpensList.stream().mapToInt(p -> p.third.size()).filter(s -> s > 0).sum() * 2; } else { // (u2 : provides_count) + (u2:provides_index + u2:provides_with_count) * provides_count + return 2 + 4 * providesList.size() + // (u2:provides_with_index) * provides_with_count providesList.stream().mapToInt(p -> p.second.size()).filter(s -> s > 0).sum() * 2; } } } private static class HeaderStruct implements DataWriter { final ConstCell index; final int flags; final ConstCell versionIndex; HeaderStruct(ModuleContent.Header source, Function nameFinder, Function versionFinder) { index = nameFinder.apply(source); versionIndex = (source.getModuleVersion() == null) ? null : versionFinder.apply(source.getModuleVersion()); flags = source.getModuleFlags(); } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(index.cpIndex); // u2 module_name_index; out.writeShort(flags); // u2 module_flags; out.writeShort(versionIndex == null ? 0 : versionIndex.cpIndex); // u2 module_version_index; } @Override public int getLength() { // u2:module_name_index) + u2:module_flags +u2:module_version_index return 6; } } /** * u2 uses_count; * u2 uses_index[uses_count]; * or * u2 requires_count; * { u2 requires_index; * u2 requires_flags; * u2 requires_version_index; * } requires[requires_count]; */ private static class SetStruct implements DataWriter { final List usesList = new ArrayList<>(); final List> requiresList = new ArrayList<>(); SetStruct(Set source, Function nameFinder, Function versionFinder) { Objects.requireNonNull(source); source.forEach(e -> { if (e.isFlagged()) { requiresList.add(new Triplet<>( nameFinder.apply(e), ((ModuleContent.FlaggedTargetType) e).getFlags(), (((ModuleContent.VersionedFlaggedTargetType) e).getVersion() == null) ? null : versionFinder.apply(((ModuleContent.VersionedFlaggedTargetType) e).getVersion()))); } else { usesList.add(nameFinder.apply(e)); } }); } @Override public void write(CheckedDataOutputStream out) throws IOException { if (usesList.isEmpty()) { out.writeShort(requiresList.size()); // u2 requires_count; for (Triplet r : requiresList) { out.writeShort(r.first.cpIndex); // u2 requires_index; out.writeShort(r.second); // u2 requires_flags; out.writeShort(r.third == null ? 0 : r.third.cpIndex); // u2 requires_version_index; } } else { out.writeShort(usesList.size()); // u2 uses_count; for (ConstCell u : usesList) out.writeShort(u.cpIndex); // u2 uses_index[uses_count]; } } @Override public int getLength() { return usesList.isEmpty() ? // (u2:requires_count) + (u2:requires_index + u2:requires_flags + u2:requires_version_index) * requires_count 2 + 6 * requiresList.size() : // (u2:uses_count) + (u2:uses_index) * uses_count 2 + 2 * usesList.size(); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/NameInfo.java000066400000000000000000000040401514323636100255510ustar00rootroot00000000000000/* * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.asmutils.Pair; /** * Wrapper for Pair class for keeping Name information that is the Constant Pool Index and Corresponding Name. * Usually only one field is set if Option.CPX "CP index along with arguments" is used then cpIndex is set * otherwise a name. Or manually changed jasm file has both Constant Pool entries and names */ public class NameInfo extends Pair { public NameInfo(Integer cpIndex, String name) { super(cpIndex, name); } public NameInfo() { super(0, ""); } public String name() { return super.second; } public NameInfo setName(String name) { super.second = name; return this; } public int cpIndex() { return super.first; } public NameInfo setCpIndex(int index) { super.first = index; return this; } public boolean isEmpty() { return (first == 0 && (second == null || second.isEmpty())); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/NestMembersAttr.java000066400000000000000000000031111514323636100271320ustar00rootroot00000000000000/* * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import java.util.List; /** * The "classes[]" data of attributes * JEP 181 (Nest-based Access Control): class file 55.0 * NestMembers_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_classes; * u2 classes[number_of_classes]; * } */ public class NestMembersAttr extends ArrayAttr { public NestMembersAttr(ConstantPool pool, List classes) { super( pool, EAttribute.ATT_NestMembers, classes); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/OpcodeTables.java000066400000000000000000000623101514323636100264250ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.util.HashMap; /** * OpcodeTables *

* The OpcodeTables class follows a Singleton Pattern. This class contains Enums, that are * contained in private hash maps (lookup tables and reverse lookup tables). These hash * maps all have public accessors, which clients use to look-up opcodes. *

* Tokens in this table carry no external state, and are typically treated as constants. * They do not need to be reset. */ public class OpcodeTables { public static int MAX_TABLESWITCH_LENGTH = 16384; // 2^14 in bytes public static int MAX_LOOKUPSWITCH_LENGTH = 16384; // 2^14 in bytes public static int MAX_LOOKUPSWITCH_PAIRS_COUNT = 2048; // count /** * Initialized keyword and token Hash Maps (and Reverse Tables) */ static private final int MaxOpcodes = 301; static private final HashMap IntToAllOpcodes = new HashMap<>(MaxOpcodes); static private final HashMap Mnemocodes = new HashMap<>(MaxOpcodes); static { // register all of the tokens for (Opcode opc : Opcode.values()) { registerOpcode(opc); } } private static void registerOpcode(Opcode opc) { IntToAllOpcodes.put(opc.value, opc); Mnemocodes.put(opc.parseKey, opc); if (opc.alias != null) { Mnemocodes.put(opc.alias, opc); } } public static Opcode opcode(String mnemonic) { return Mnemocodes.get(mnemonic); } public static Opcode opcode(Integer mnem_code) { return IntToAllOpcodes.get(mnem_code); } /** * Marker: describes the type of Opcode. *

* certain types of Opcodes will be added to specific lookup tables. */ public enum OpcodeType { NORMAL("Normal"), NONPRIVELEGED("NonPriv"), PRIVELEGED("Priv"), WIDE("Wide"); private final String printVal; OpcodeType(String print) { printVal = print; } public String printVal() { return printVal; } } /* Opcode Enums */ public enum Opcode { /* Opcodes */ opc_dead(-2, " opc_dead", 0), opc_label(-1, "opc_label", 0), opc_nop(0, "nop", 1), opc_aconst_null(1, "aconst_null", 1), opc_iconst_m1(2, "iconst_m1", 1), opc_iconst_0(3, "iconst_0", 1), opc_iconst_1(4, "iconst_1", 1), opc_iconst_2(5, "iconst_2", 1), opc_iconst_3(6, "iconst_3", 1), opc_iconst_4(7, "iconst_4", 1), opc_iconst_5(8, "iconst_5", 1), opc_lconst_0(9, "lconst_0", 1), opc_lconst_1(10, "lconst_1", 1), opc_fconst_0(11, "fconst_0", 1), opc_fconst_1(12, "fconst_1", 1), opc_fconst_2(13, "fconst_2", 1), opc_dconst_0(14, "dconst_0", 1), opc_dconst_1(15, "dconst_1", 1), opc_bipush(16, "bipush", 2), opc_sipush(17, "sipush", 3), opc_ldc(18, "ldc", 2), opc_ldc_w(19, "ldc_w", 3), opc_ldc2_w(20, "ldc2_w", 3), opc_iload(21, "iload", 2), opc_lload(22, "lload", 2), opc_fload(23, "fload", 2), opc_dload(24, "dload", 2), opc_aload(25, "aload", 2), opc_iload_0(26, "iload_0", 1), opc_iload_1(27, "iload_1", 1), opc_iload_2(28, "iload_2", 1), opc_iload_3(29, "iload_3", 1), opc_lload_0(30, "lload_0", 1), opc_lload_1(31, "lload_1", 1), opc_lload_2(32, "lload_2", 1), opc_lload_3(33, "lload_3", 1), opc_fload_0(34, "fload_0", 1), opc_fload_1(35, "fload_1", 1), opc_fload_2(36, "fload_2", 1), opc_fload_3(37, "fload_3", 1), opc_dload_0(38, "dload_0", 1), opc_dload_1(39, "dload_1", 1), opc_dload_2(40, "dload_2", 1), opc_dload_3(41, "dload_3", 1), opc_aload_0(42, "aload_0", 1), opc_aload_1(43, "aload_1", 1), opc_aload_2(44, "aload_2", 1), opc_aload_3(45, "aload_3", 1), opc_iaload(46, "iaload", 1), opc_laload(47, "laload", 1), opc_faload(48, "faload", 1), opc_daload(49, "daload", 1), opc_aaload(50, "aaload", 1), opc_baload(51, "baload", 1), opc_caload(52, "caload", 1), opc_saload(53, "saload", 1), opc_istore(54, "istore", 2), opc_lstore(55, "lstore", 2), opc_fstore(56, "fstore", 2), opc_dstore(57, "dstore", 2), opc_astore(58, "astore", 2), opc_istore_0(59, "istore_0", 1), opc_istore_1(60, "istore_1", 1), opc_istore_2(61, "istore_2", 1), opc_istore_3(62, "istore_3", 1), opc_lstore_0(63, "lstore_0", 1), opc_lstore_1(64, "lstore_1", 1), opc_lstore_2(65, "lstore_2", 1), opc_lstore_3(66, "lstore_3", 1), opc_fstore_0(67, "fstore_0", 1), opc_fstore_1(68, "fstore_1", 1), opc_fstore_2(69, "fstore_2", 1), opc_fstore_3(70, "fstore_3", 1), opc_dstore_0(71, "dstore_0", 1), opc_dstore_1(72, "dstore_1", 1), opc_dstore_2(73, "dstore_2", 1), opc_dstore_3(74, "dstore_3", 1), opc_astore_0(75, "astore_0", 1), opc_astore_1(76, "astore_1", 1), opc_astore_2(77, "astore_2", 1), opc_astore_3(78, "astore_3", 1), opc_iastore(79, "iastore", 1), opc_lastore(80, "lastore", 1), opc_fastore(81, "fastore", 1), opc_dastore(82, "dastore", 1), opc_aastore(83, "aastore", 1), opc_bastore(84, "bastore", 1), opc_castore(85, "castore", 1), opc_sastore(86, "sastore", 1), opc_pop(87, "pop", 1), opc_pop2(88, "pop2", 1), opc_dup(89, "dup", 1), opc_dup_x1(90, "dup_x1", 1), opc_dup_x2(91, "dup_x2", 1), opc_dup2(92, "dup2", 1), opc_dup2_x1(93, "dup2_x1", 1), opc_dup2_x2(94, "dup2_x2", 1), opc_swap(95, "swap", 1), opc_iadd(96, "iadd", 1), opc_ladd(97, "ladd", 1), opc_fadd(98, "fadd", 1), opc_dadd(99, "dadd", 1), opc_isub(100, "isub", 1), opc_lsub(101, "lsub", 1), opc_fsub(102, "fsub", 1), opc_dsub(103, "dsub", 1), opc_imul(104, "imul", 1), opc_lmul(105, "lmul", 1), opc_fmul(106, "fmul", 1), opc_dmul(107, "dmul", 1), opc_idiv(108, "idiv", 1), opc_ldiv(109, "ldiv", 1), opc_fdiv(110, "fdiv", 1), opc_ddiv(111, "ddiv", 1), opc_irem(112, "irem", 1), opc_lrem(113, "lrem", 1), opc_frem(114, "frem", 1), opc_drem(115, "drem", 1), opc_ineg(116, "ineg", 1), opc_lneg(117, "lneg", 1), opc_fneg(118, "fneg", 1), opc_dneg(119, "dneg", 1), opc_ishl(120, "ishl", 1), opc_lshl(121, "lshl", 1), opc_ishr(122, "ishr", 1), opc_lshr(123, "lshr", 1), opc_iushr(124, "iushr", 1), opc_lushr(125, "lushr", 1), opc_iand(126, "iand", 1), opc_land(127, "land", 1), opc_ior(128, "ior", 1), opc_lor(129, "lor", 1), opc_ixor(130, "ixor", 1), opc_lxor(131, "lxor", 1), opc_iinc(132, "iinc", 3), opc_i2l(133, "i2l", 1), opc_i2f(134, "i2f", 1), opc_i2d(135, "i2d", 1), opc_l2i(136, "l2i", 1), opc_l2f(137, "l2f", 1), opc_l2d(138, "l2d", 1), opc_f2i(139, "f2i", 1), opc_f2l(140, "f2l", 1), opc_f2d(141, "f2d", 1), opc_d2i(142, "d2i", 1), opc_d2l(143, "d2l", 1), opc_d2f(144, "d2f", 1), opc_i2b(145, "i2b", 1), opc_i2c(146, "i2c", 1), opc_i2s(147, "i2s", 1), opc_lcmp(148, "lcmp", 1), opc_fcmpl(149, "fcmpl", 1), opc_fcmpg(150, "fcmpg", 1), opc_dcmpl(151, "dcmpl", 1), opc_dcmpg(152, "dcmpg", 1), opc_ifeq(153, "ifeq", 3), opc_ifne(154, "ifne", 3), opc_iflt(155, "iflt", 3), opc_ifge(156, "ifge", 3), opc_ifgt(157, "ifgt", 3), opc_ifle(158, "ifle", 3), opc_if_icmpeq(159, "if_icmpeq", 3), opc_if_icmpne(160, "if_icmpne", 3), opc_if_icmplt(161, "if_icmplt", 3), opc_if_icmpge(162, "if_icmpge", 3), opc_if_icmpgt(163, "if_icmpgt", 3), opc_if_icmple(164, "if_icmple", 3), opc_if_acmpeq(165, "if_acmpeq", 3), opc_if_acmpne(166, "if_acmpne", 3), opc_goto(167, "goto", 3), opc_jsr(168, "jsr", 3), opc_ret(169, "ret", 2), opc_tableswitch(170, "tableswitch", 99), opc_lookupswitch(171, "lookupswitch", 99), opc_ireturn(172, "ireturn", 1), opc_lreturn(173, "lreturn", 1), opc_freturn(174, "freturn", 1), opc_dreturn(175, "dreturn", 1), opc_areturn(176, "areturn", 1), opc_return(177, "return", 1), opc_getstatic(178, "getstatic", 3), opc_putstatic(179, "putstatic", 3), opc_getfield(180, "getfield", 3), opc_putfield(181, "putfield", 3), opc_invokevirtual(182, "invokevirtual", 3), opc_invokespecial(183, "invokespecial", "invokenonvirtual", 3), opc_invokestatic(184, "invokestatic", 3), opc_invokeinterface(185, "invokeinterface", 5), opc_invokedynamic(186, "invokedynamic", 5), opc_new(187, "new", 3), opc_newarray(188, "newarray", 2), opc_anewarray(189, "anewarray", 3), opc_arraylength(190, "arraylength", 1), opc_athrow(191, "athrow", 1), opc_checkcast(192, "checkcast", 3), opc_instanceof(193, "instanceof", 3), opc_monitorenter(194, "monitorenter", 1), opc_monitorexit(195, "monitorexit", 1), // Wide Marker (not really an opcode) - Extend local variable index by additional bytes opc_wide(196, null, "wide", 0), opc_multianewarray(197, "multianewarray", 4), opc_ifnull(198, "ifnull", 3), opc_ifnonnull(199, "ifnonnull", 3), opc_goto_w(200, "goto_w", 5), opc_jsr_w(201, "jsr_w", 5), // JVMS: The third reserved opcode, number 202 (0xca), has the mnemonic breakpoint and is intended to be used // by debuggers to implement breakpoints. opc_breakpoint(202, "breakpoint", 1), /* Pseudo-instructions */ opc_bytecode(210, "bytecode", 1), opc_try(211, "try", 0), opc_endtry(212, "endtry", 0), opc_catch(213, "catch", 0), opc_var(214, "var", 0), opc_endvar(215, "endvar", 0), opc_locals_map(216, "locals_map", 0), opc_stack_map(217, "stack_map", 0), opc_unset_fields(218, "unset_fields", 0), // StackMap Attribute (Java 6.0) This entry point of the beginning of the record or nothing. opc_stack_map_frame(219, "stack_map_frame", 0), // Always must be first record of any entry of the StackMapTable Attribute (Java 7.0 and above) opc_stack_map_entry(220, "stack_map_entry", 0), opc_stack_frame_type(221, "stack_frame_type", 0), opc_frame_type(222, "frame_type", 0), opc_entry_type(223, "entry_type", 0), opc_type(224, "type", 0), opc_endtype(225, "endtype", 0), // JVMS: Two of the reserved opcodes, numbers 254 (0xfe) and 255 (0xff), have the mnemonics impdep1 and impdep2, respectively. opc_nonpriv(254, "impdep1", 1), opc_priv(255, "impdep2", 1), /* Wide instructions */ opc_iload_w(opc_iload.value, "iload_w", 4, OpcodeType.WIDE), opc_lload_w(opc_lload.value, "lload_w", 4, OpcodeType.WIDE), opc_fload_w(opc_fload.value, "fload_w", 4, OpcodeType.WIDE), opc_dload_w(opc_dload.value, "dload_w", 4, OpcodeType.WIDE), opc_aload_w(opc_aload.value, "aload_w", 4, OpcodeType.WIDE), opc_istore_w(opc_istore.value, "istore_w", 4, OpcodeType.WIDE), opc_lstore_w(opc_lstore.value, "lstore_w", 4, OpcodeType.WIDE), opc_fstore_w(opc_fstore.value, "fstore_w", 4, OpcodeType.WIDE), opc_dstore_w(opc_dstore.value, "dstore_w", 4, OpcodeType.WIDE), opc_astore_w(opc_astore.value, "astore_w", 4, OpcodeType.WIDE), opc_ret_w(opc_ret.value, "ret_w", 4, OpcodeType.WIDE), opc_iinc_w(opc_iinc.value, "iinc_w", 6, OpcodeType.WIDE), /* Privileged instructions */ opc_load_ubyte(0, "load_ubyte", OpcodeType.NONPRIVELEGED), opc_priv_load_ubyte(0, "priv_load_ubyte", OpcodeType.PRIVELEGED), opc_load_byte(1, "load_byte", OpcodeType.NONPRIVELEGED), opc_priv_load_byte(1, "priv_load_byte", OpcodeType.PRIVELEGED), opc_load_char(2, "load_char", OpcodeType.NONPRIVELEGED), opc_priv_load_char(2, "priv_load_char", OpcodeType.PRIVELEGED), opc_load_short(3, "load_short", OpcodeType.NONPRIVELEGED), opc_priv_load_short(3, "priv_load_short", OpcodeType.PRIVELEGED), opc_load_word(4, "load_word", OpcodeType.NONPRIVELEGED), opc_priv_load_word(4, "priv_load_word", OpcodeType.PRIVELEGED), opc_load_char_oe(10, "load_char_oe", OpcodeType.NONPRIVELEGED), opc_priv_load_char_oe(10, "priv_load_char_oe", OpcodeType.PRIVELEGED), opc_load_short_oe(11, "load_short_oe", OpcodeType.NONPRIVELEGED), opc_priv_load_short_oe(11, "priv_load_short_oe", OpcodeType.PRIVELEGED), opc_load_word_oe(12, "load_word_oe", OpcodeType.NONPRIVELEGED), opc_priv_load_word_oe(12, "priv_load_word_oe", OpcodeType.PRIVELEGED), opc_ncload_ubyte(16, "ncload_ubyte", OpcodeType.NONPRIVELEGED), opc_priv_ncload_ubyte(16, "priv_ncload_ubyte", OpcodeType.PRIVELEGED), opc_ncload_byte(17, "ncload_byte", OpcodeType.NONPRIVELEGED), opc_priv_ncload_byte(17, "priv_ncload_byte", OpcodeType.PRIVELEGED), opc_ncload_char(18, "ncload_char", OpcodeType.NONPRIVELEGED), opc_priv_ncload_char(18, "priv_ncload_char", OpcodeType.PRIVELEGED), opc_ncload_short(19, "ncload_short", OpcodeType.NONPRIVELEGED), opc_priv_ncload_short(19, "priv_ncload_short", OpcodeType.PRIVELEGED), opc_ncload_word(20, "ncload_word", OpcodeType.NONPRIVELEGED), opc_priv_ncload_word(20, "priv_ncload_word", OpcodeType.PRIVELEGED), opc_ncload_char_oe(26, "ncload_char_oe", OpcodeType.NONPRIVELEGED), opc_priv_ncload_char_oe(26, "priv_ncload_char_oe", OpcodeType.PRIVELEGED), opc_ncload_short_oe(27, "ncload_short_oe", OpcodeType.NONPRIVELEGED), opc_priv_ncload_short_oe(27, "priv_ncload_short_oe", OpcodeType.PRIVELEGED), opc_ncload_word_oe(28, "ncload_word_oe", OpcodeType.NONPRIVELEGED), opc_priv_ncload_word_oe(28, "priv_ncload_word_oe", OpcodeType.PRIVELEGED), opc_cache_flush(30, "cache_flush", OpcodeType.NONPRIVELEGED), opc_priv_cache_flush(30, "priv_cache_flush", OpcodeType.PRIVELEGED), opc_store_byte(32, "store_byte", OpcodeType.NONPRIVELEGED), opc_priv_store_byte(32, "priv_store_byte", OpcodeType.PRIVELEGED), opc_store_short(34, "store_short", OpcodeType.NONPRIVELEGED), opc_priv_store_short(34, "priv_store_short", OpcodeType.PRIVELEGED), opc_store_word(36, "store_word", OpcodeType.NONPRIVELEGED), opc_priv_store_word(36, "priv_store_word", OpcodeType.PRIVELEGED), opc_store_short_oe(42, "store_short_oe", OpcodeType.NONPRIVELEGED), opc_priv_store_short_oe(42, "priv_store_short_oe", OpcodeType.PRIVELEGED), opc_store_word_oe(44, "store_word_oe", OpcodeType.NONPRIVELEGED), opc_priv_store_word_oe(44, "priv_store_word_oe", OpcodeType.PRIVELEGED), opc_ncstore_byte(48, "ncstore_byte", OpcodeType.NONPRIVELEGED), opc_priv_ncstore_byte(48, "priv_ncstore_byte", OpcodeType.PRIVELEGED), opc_ncstore_short(50, "ncstore_short", OpcodeType.NONPRIVELEGED), opc_priv_ncstore_short(50, "priv_ncstore_short", OpcodeType.PRIVELEGED), opc_ncstore_word(52, "ncstore_word", OpcodeType.NONPRIVELEGED), opc_priv_ncstore_word(52, "priv_ncstore_word", OpcodeType.PRIVELEGED), opc_ncstore_short_oe(58, "ncstore_short_oe", OpcodeType.NONPRIVELEGED), opc_priv_ncstore_short_oe(58, "priv_ncstore_short_oe", OpcodeType.PRIVELEGED), opc_ncstore_word_oe(60, "ncstore_word_oe", OpcodeType.NONPRIVELEGED), opc_priv_ncstore_word_oe(60, "priv_ncstore_word_oe", OpcodeType.PRIVELEGED), opc_zero_line(62, "zero_line", OpcodeType.NONPRIVELEGED), opc_priv_zero_line(62, "priv_zero_line", OpcodeType.PRIVELEGED), opc_ret_from_sub(5, "ret_from_sub", OpcodeType.NONPRIVELEGED), opc_enter_sync_method(63, "enter_sync_method", OpcodeType.NONPRIVELEGED), opc_priv_ret_from_trap(5, "priv_ret_from_trap", OpcodeType.PRIVELEGED), opc_priv_read_dcache_tag(6, "priv_read_dcache_tag", OpcodeType.PRIVELEGED), opc_priv_read_dcache_data(7, "priv_read_dcache_data", OpcodeType.PRIVELEGED), opc_priv_read_icache_tag(14, "priv_read_icache_tag", OpcodeType.PRIVELEGED), opc_priv_read_icache_data(15, "priv_read_icache_data", OpcodeType.PRIVELEGED), opc_priv_powerdown(22, "priv_powerdown", OpcodeType.PRIVELEGED), opc_priv_read_scache_data(23, "priv_read_scache_data", OpcodeType.PRIVELEGED), opc_priv_cache_index_flush(31, "priv_cache_index_flush", OpcodeType.PRIVELEGED), opc_priv_write_dcache_tag(38, "priv_write_dcache_tag", OpcodeType.PRIVELEGED), opc_priv_write_dcache_data(39, "priv_write_dcache_data", OpcodeType.PRIVELEGED), opc_priv_write_icache_tag(46, "priv_write_icache_tag", OpcodeType.PRIVELEGED), opc_priv_write_icache_data(47, "priv_write_icache_data", OpcodeType.PRIVELEGED), opc_priv_reset(54, "priv_reset", OpcodeType.PRIVELEGED), opc_priv_write_scache_data(55, "priv_write_scache_data", OpcodeType.PRIVELEGED), opc_priv_read_reg_0(64, "priv_read_reg_0", OpcodeType.PRIVELEGED), opc_priv_read_reg_1(65, "priv_read_reg_1", OpcodeType.PRIVELEGED), opc_priv_read_reg_2(66, "priv_read_reg_2", OpcodeType.PRIVELEGED), opc_priv_read_reg_3(67, "priv_read_reg_3", OpcodeType.PRIVELEGED), opc_priv_read_reg_4(68, "priv_read_reg_4", OpcodeType.PRIVELEGED), opc_priv_read_reg_5(69, "priv_read_reg_5", OpcodeType.PRIVELEGED), opc_priv_read_reg_6(70, "priv_read_reg_6", OpcodeType.PRIVELEGED), opc_priv_read_reg_7(71, "priv_read_reg_7", OpcodeType.PRIVELEGED), opc_priv_read_reg_8(72, "priv_read_reg_8", OpcodeType.PRIVELEGED), opc_priv_read_reg_9(73, "priv_read_reg_9", OpcodeType.PRIVELEGED), opc_priv_read_reg_10(74, "priv_read_reg_10", OpcodeType.PRIVELEGED), opc_priv_read_reg_11(75, "priv_read_reg_11", OpcodeType.PRIVELEGED), opc_priv_read_reg_12(76, "priv_read_reg_12", OpcodeType.PRIVELEGED), opc_priv_read_reg_13(77, "priv_read_reg_13", OpcodeType.PRIVELEGED), opc_priv_read_reg_14(78, "priv_read_reg_14", OpcodeType.PRIVELEGED), opc_priv_read_reg_15(79, "priv_read_reg_15", OpcodeType.PRIVELEGED), opc_priv_read_reg_16(80, "priv_read_reg_16", OpcodeType.PRIVELEGED), opc_priv_read_reg_17(81, "priv_read_reg_17", OpcodeType.PRIVELEGED), opc_priv_read_reg_18(82, "priv_read_reg_18", OpcodeType.PRIVELEGED), opc_priv_read_reg_19(83, "priv_read_reg_19", OpcodeType.PRIVELEGED), opc_priv_read_reg_20(84, "priv_read_reg_20", OpcodeType.PRIVELEGED), opc_priv_read_reg_21(85, "priv_read_reg_21", OpcodeType.PRIVELEGED), opc_priv_read_reg_22(86, "priv_read_reg_22", OpcodeType.PRIVELEGED), opc_priv_read_reg_23(87, "priv_read_reg_23", OpcodeType.PRIVELEGED), opc_priv_read_reg_24(88, "priv_read_reg_24", OpcodeType.PRIVELEGED), opc_priv_read_reg_25(89, "priv_read_reg_25", OpcodeType.PRIVELEGED), opc_priv_read_reg_26(90, "priv_read_reg_26", OpcodeType.PRIVELEGED), opc_priv_read_reg_27(91, "priv_read_reg_27", OpcodeType.PRIVELEGED), opc_priv_read_reg_28(92, "priv_read_reg_28", OpcodeType.PRIVELEGED), opc_priv_read_reg_29(93, "priv_read_reg_29", OpcodeType.PRIVELEGED), opc_priv_read_reg_30(94, "priv_read_reg_30", OpcodeType.PRIVELEGED), opc_priv_read_reg_31(95, "priv_read_reg_31", OpcodeType.PRIVELEGED), opc_priv_write_reg_0(96, "priv_write_reg_0", OpcodeType.PRIVELEGED), opc_priv_write_reg_1(97, "priv_write_reg_1", OpcodeType.PRIVELEGED), opc_priv_write_reg_2(98, "priv_write_reg_2", OpcodeType.PRIVELEGED), opc_priv_write_reg_3(99, "priv_write_reg_3", OpcodeType.PRIVELEGED), opc_priv_write_reg_4(100, "priv_write_reg_4", OpcodeType.PRIVELEGED), opc_priv_write_reg_5(101, "priv_write_reg_5", OpcodeType.PRIVELEGED), opc_priv_write_reg_6(102, "priv_write_reg_6", OpcodeType.PRIVELEGED), opc_priv_write_reg_7(103, "priv_write_reg_7", OpcodeType.PRIVELEGED), opc_priv_write_reg_8(104, "priv_write_reg_8", OpcodeType.PRIVELEGED), opc_priv_write_reg_9(105, "priv_write_reg_9", OpcodeType.PRIVELEGED), opc_priv_write_reg_10(106, "priv_write_reg_10", OpcodeType.PRIVELEGED), opc_priv_write_reg_11(107, "priv_write_reg_11", OpcodeType.PRIVELEGED), opc_priv_write_reg_12(108, "priv_write_reg_12", OpcodeType.PRIVELEGED), opc_priv_write_reg_13(109, "priv_write_reg_13", OpcodeType.PRIVELEGED), opc_priv_write_reg_14(110, "priv_write_reg_14", OpcodeType.PRIVELEGED), opc_priv_write_reg_15(111, "priv_write_reg_15", OpcodeType.PRIVELEGED), opc_priv_write_reg_16(112, "priv_write_reg_16", OpcodeType.PRIVELEGED), opc_priv_write_reg_17(113, "priv_write_reg_17", OpcodeType.PRIVELEGED), opc_priv_write_reg_18(114, "priv_write_reg_18", OpcodeType.PRIVELEGED), opc_priv_write_reg_19(115, "priv_write_reg_19", OpcodeType.PRIVELEGED), opc_priv_write_reg_20(116, "priv_write_reg_20", OpcodeType.PRIVELEGED), opc_priv_write_reg_21(117, "priv_write_reg_21", OpcodeType.PRIVELEGED), opc_priv_write_reg_22(118, "priv_write_reg_22", OpcodeType.PRIVELEGED), opc_priv_write_reg_23(119, "priv_write_reg_23", OpcodeType.PRIVELEGED), opc_priv_write_reg_24(120, "priv_write_reg_24", OpcodeType.PRIVELEGED), opc_priv_write_reg_25(121, "priv_write_reg_25", OpcodeType.PRIVELEGED), opc_priv_write_reg_26(122, "priv_write_reg_26", OpcodeType.PRIVELEGED), opc_priv_write_reg_27(123, "priv_write_reg_27", OpcodeType.PRIVELEGED), opc_priv_write_reg_28(124, "priv_write_reg_28", OpcodeType.PRIVELEGED), opc_priv_write_reg_29(125, "priv_write_reg_29", OpcodeType.PRIVELEGED), opc_priv_write_reg_30(126, "priv_write_reg_30", OpcodeType.PRIVELEGED), opc_priv_write_reg_31(127, "priv_write_reg_31", OpcodeType.PRIVELEGED); private Integer value; private String parseKey; private String alias; private Integer length; private OpcodeType type; Opcode(Integer val, String parse, OpcodeType tp) { init(val, parse, null, 2, tp); } Opcode(Integer val, String parse, int len, OpcodeType tp) { init(val, parse, null, len, tp); } Opcode(Integer val, String parse, int len) { init(val, parse, null, len, OpcodeType.NORMAL); } Opcode(Integer val, String parse, String als, int len) { init(val, parse, als, len, OpcodeType.NORMAL); } private void init(Integer val, String parse, String als, int len, OpcodeType tp) { type = tp; switch (tp) { case NORMAL -> value = val; case WIDE -> value = (opc_wide.value << 8) | val; case PRIVELEGED -> value = (opc_priv.value * 0xFF) + val; case NONPRIVELEGED -> value = (opc_nonpriv.value * 0xFF) + val; } parseKey = parse; alias = als; length = len; } public String getPrintName() { if (alias != null) { return alias; } return parseKey; } public Integer value() { return value; } public byte byteValue() { return (byte) (value & 0xFF); } public int length() { return length; } public String parseKey() { return parseKey; } public OpcodeType type() { return type; } // JVMS chapter 6.2. Reserved Opcodes public boolean isReservedOpcode() { return this.value >= 0 && this.value < Opcode.opc_bytecode.value(); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ParseAnnotation.java000066400000000000000000001335261514323636100271760ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.SyntaxError; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.jasm.TypeAnnotationTargetInfoData.*; import java.io.IOException; import java.util.ArrayList; import java.util.TreeMap; import java.util.stream.IntStream; import static org.openjdk.asmtools.jasm.ClassFileConst.*; import static org.openjdk.asmtools.jasm.ClassFileConst.AnnotationElementType.*; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.*; import static org.openjdk.asmtools.jasm.ConstantPool.ConstValue_UTF8; import static org.openjdk.asmtools.jasm.JasmTokens.AnnotationType.isInvisibleAnnotationToken; import static org.openjdk.asmtools.jasm.JasmTokens.Token; import static org.openjdk.asmtools.jasm.JasmTokens.Token.*; import static org.openjdk.asmtools.jasm.TypeAnnotationTypes.*; /** * ParserAnnotation *

* ParserAnnotation is a parser class owned by Parser.java. It is primarily responsible * for parsing Annotations (for classes, methods or fields). *

* ParserAnnotation can parse the different types of Annotation Attributes: * Runtime(In)Visible Annotations (JDK 6+) Default Annotations (JDK 6+) * Runtime(In)VisibleParameter Annotations (JDK 7+) Runtime(In)VisibleType Annotations * (JSR308, JDK8+) */ public class ParseAnnotation extends ParseBase { /** * local handles on the scanner, main parser, and the error reporting env */ private static final TargetTypeVisitor targetTypeVisitor = new TargetTypeVisitor(); protected ParseAnnotation(Parser parentParser) { super.init(parentParser); targetTypeVisitor.init(scanner); } protected void scanParamName(int totalParams, int paramNum, MethodData curMethod) throws SyntaxError { scanner.debugScan(" - - - > [ParserAnnotation.scanParamName]: Begin "); scanner.scan(); scanner.expect(Token.LBRACE); // First scan the Name (String, or CPX to name) ConstCell nameCell; if ((scanner.token == Token.IDENT) || scanner.checkTokenIdent()) { // Got a Class Name nameCell = parser.parseName(); } else if (scanner.token == Token.CPINDEX) { int cpx = scanner.intValue; nameCell = parser.pool.getCell(cpx); // check the constant ConstValue nameCellValue = nameCell.ref; if (!(nameCellValue instanceof ConstValue_UTF8)) { // throw an error environment.error(scanner.pos, "err.paramname.constnum.invaltype", cpx); throw new SyntaxError(); } } else { // throw scan error - unexpected token environment.error(scanner.pos, "err.paramname.token.unexpected", scanner.stringValue); throw new SyntaxError(); } // Got the name cell. Next, scan the access flags int mod = parser.scanModifiers(); scanner.expect(Token.RBRACE); curMethod.addMethodParameter(totalParams, paramNum, nameCell, mod); scanner.debugScan(" - - - > [ParserAnnotation.scanParamName]: End "); } /** * The main entry for parsing an annotation list. * * @return An ArrayList of parsed annotations */ ArrayList parseAnnotations() throws SyntaxError { ArrayList list = new ArrayList<>(); while (scanner.token == Token.ANNOTATION) { if (JasmTokens.AnnotationType.isAnnotationToken(scanner.stringValue)) { list.add(parseAnnotation()); } else if (JasmTokens.AnnotationType.isTypeAnnotationToken(scanner.stringValue)) { list.add(parseTypeAnnotation()); } else { return null; } } return (list.size() > 0) ? list : null; } /** * parseDefaultAnnotation *

* parses a default Annotation attribute * * @return the parsed Annotation Attribute * @throws SyntaxError * @throws SyntaxError if a scanner error occurs */ protected DefaultAnnotationAttr parseDefaultAnnotation() throws SyntaxError { scanner.scan(); DefaultAnnotationAttr attr; DataWriter value = null; scanner.expect(Token.LBRACE); if ((scanner.token != Token.EOF) && (scanner.token != Token.RBRACE)) { value = scanAnnotationData("default"); } scanner.expect(Token.RBRACE); attr = new DefaultAnnotationAttr(parser.pool, EAttribute.ATT_AnnotationDefault, value); return attr; } /** * Parses Parameter Annotations attributes. * * @param totalParams * @param curMethod * @throws SyntaxError if a scanner error occurs */ protected void parseParamAnnotation(int totalParams, MethodData curMethod) throws SyntaxError { scanner.debugScan(" - - - > [ParserAnnotation.parseParamAnnots]: Begin, totalParams = " + totalParams + " "); // The _method thinks there are N+1 params in the signature // (N = total params in the call list) + 1 (return value) // int totalParams = totalParams - 1; TreeMap> pAnnots = new TreeMap<>(); while (scanner.token == INTVAL) { // Create the Parameter Array for Param Annotations // Do something with Parameter annotations // -------------------- // First - validate that the parameter number (integer) // (eg >= 0, < numParams, and param num is not previously set) int paramNum = scanner.intValue; Integer iParamNum = Integer.valueOf(paramNum); if (paramNum < 0 || paramNum >= totalParams) { //invalid Parameter number. Throw an error. environment.error(scanner.pos, "err.invalid.paramnum", paramNum); } if (pAnnots.get(iParamNum) != null) { // paramter is already populated with annotations/pnames, Throw an error. environment.error(scanner.pos, "err.duplicate.paramnum", paramNum); } // 2nd - Parse the COLON (invalid if not present) scanner.scan(); scanner.expect(Token.COLON); // 3rd - parse either an optional ParamName, or a list of annotations if (scanner.token == Token.PARAM_NAME) { //parse the ParamName scanParamName(totalParams, iParamNum, curMethod); } // 4th - parse each Annotation (followed by comma, followed by annotation // assign array of annotations to param array if (scanner.token == Token.ANNOTATION) { ArrayList pAnnot = parseAnnotations(); pAnnots.put(iParamNum, pAnnot); for (AnnotationData data : pAnnot) { curMethod.addParamAnnotation(totalParams, paramNum, data); } } } } /** * parseTypeAnnotation - parses an individual annotation. * * @return a parsed annotation. * @throws SyntaxError if a scanner error occurs */ private AnnotationData parseTypeAnnotation() throws SyntaxError { TypeAnnotationData ta; boolean isInvisible = isInvisibleAnnotationToken(scanner.stringValue); scanner.scan(); if (scanner.token == CPINDEX) { int cpIndex = scanner.intValue; scanner.debugScan(" [ParserAnnotation.parseTypeAnnotation]: cpIndex = #%d".formatted(cpIndex)); ta = new TypeAnnotationData(parser.pool.getCell(cpIndex), isInvisible); } else { String value = scanner.stringValue; scanner.debugScan(" [ParserAnnotation.parseTypeAnnotation]: value = %s".formatted(value)); ta = new TypeAnnotationData(parser.pool.findUTF8Cell(value), isInvisible); } scanner.scan(); scanner.expect(Token.LBRACE); // Scan the usual annotation data _scanAnnotation(ta); // scan the Target (u1: target_type, union{...}: target_info) _scanTypeTarget(ta); if (scanner.token != Token.RBRACE) { // scan the Location (type_path: target_path) _scanTargetPath(ta); } scanner.expect(Token.RBRACE); return ta; } /** * Parses an individual annotation. * * @return a parsed annotation. * @throws SyntaxError if a scanner error occurs */ private AnnotationData parseAnnotation() throws SyntaxError { AnnotationData ad; boolean isInvisible = isInvisibleAnnotationToken(scanner.stringValue); scanner.debugScan(" - - - > [ParserAnnotation.parseAnnotation]: Begin "); scanner.scan(); if (scanner.token == CPINDEX) { int cpIndex = scanner.intValue; scanner.debugScan(" [ParserAnnotation.parseAnnotation]: cpIndex = #%d".formatted(cpIndex)); ad = new AnnotationData(parser.pool.getCell(cpIndex), isInvisible); } else { String value = scanner.stringValue; scanner.debugScan(" [ParserAnnotation.parseAnnotation]: value = %s".formatted(value)); ad = new AnnotationData(parser.pool.findUTF8Cell(value), isInvisible); } scanner.scan(); _scanAnnotation(ad); return ad; } /** * Parses an individual annotation-data. * * @return a parsed annotation. * @throws SyntaxError if a scanner error occurs */ private void _scanAnnotation(AnnotationData annotData) throws SyntaxError { scanner.debugScan(" - - - > [ParserAnnotation._scanAnnotation]: Begin"); scanner.expect(Token.LBRACE); while ((scanner.token != Token.EOF) && (scanner.token != Token.RBRACE)) { ConstCell nameCell = parser.parseName(); scanner.expect(Token.ASSIGN); if (nameCell.isSet()) { ConstValue refValue = nameCell.ref; if (refValue.tag != ConstType.CONSTANT_UTF8) { throw new SyntaxError(); } String name = refValue.asString(); scanner.debugScan(" [ParserAnnotation._scanAnnotation]: Annot - Field Name: " + name); DataWriter dataWriter = scanAnnotationData(name); annotData.add(new AnnotationData.ElemValuePair(nameCell, dataWriter)); } else { if (scanner.token == CPINDEX) { ConstCell refCell = parser.parseName(); scanner.debugScan(" [ParserAnnotation._scanAnnotation]: " + nameCell.cpIndex + " = " + refCell.cpIndex); annotData.add(new AnnotationData.ElemValuePair(nameCell, refCell)); } else { DataWriter dataWriter = scanAnnotationData("unknown"); annotData.add(new AnnotationData.ElemValuePair(nameCell, dataWriter)); } } // consume tokens inbetween annotation fields if (scanner.token == Token.COMMA) { scanner.scan(); } } scanner.expect(Token.RBRACE); } /** * Parses an individual annotation-data. * * @return a parsed annotation. * @throws SyntaxError if a scanner error occurs */ private void _scanTypeTarget(TypeAnnotationData annotData) throws SyntaxError { scanner.debugScan(" [ParserAnnotation._scanTypeTarget]: Begin "); scanner.expect(Token.LBRACE); //Scan the target_type and the target_info scanner.expect(Token.IDENT); scanner.debugScan(" [ParserAnnotation._scanTypeTarget]: TargetType: " + scanner.idValue); ETargetType targetType = ETargetType.getTargetType(scanner.idValue); if (targetType == null) { environment.error(scanner.pos, "err.incorrect.typeannot.target", scanner.idValue); throw new SyntaxError(); } scanner.debugScan(" [ParserAnnotation._scanTypeTarget]: Got TargetType: " + targetType); if (targetTypeVisitor.scanner == null) { targetTypeVisitor.scanner = scanner; } targetTypeVisitor.visitExcept(targetType); annotData.targetInfo = targetTypeVisitor.getTargetInfo(); annotData.targetType = targetType; scanner.debugScan(" [ParserAnnotation._scanTypeTarget]: Got TargetInfo: " + annotData.targetInfo); scanner.expect(Token.RBRACE); } /** * _scanTargetPath *

* parses and fills the type_path structure (4.7.20.2) *

* type_path { * u1 path_length; * { u1 type_path_kind; * u1 type_argument_index; * } path[path_length]; * } * * @throws SyntaxError if a scanner error occurs */ private void _scanTargetPath(TypeAnnotationData annotData) throws SyntaxError { // parse the location info scanner.expect(Token.LBRACE); while ((scanner.token != Token.EOF) && (scanner.token != Token.RBRACE)) { TypePathEntry tpe = _scanTypePathEntry(); annotData.addTypePathEntry(tpe); // throw away comma if (scanner.token == Token.COMMA) { scanner.scan(); } } scanner.expect(Token.RBRACE); } /** * _scanTypeLocation *

* parses a path entry of the type_path. *

* { u1 type_path_kind; * u1 type_argument_index; * } * * @return a parsed type path. * @throws SyntaxError if a scanner error occurs */ private TypePathEntry _scanTypePathEntry() throws SyntaxError { TypePathEntry tpe; if ((scanner.token != Token.EOF) && scanner.token.possibleTypePathKind()) { EPathKind pathKind = EPathKind.getPathKind(scanner.stringValue); if (pathKind == EPathKind.TYPE_ARGUMENT) { scanner.scan(); // need to scan the index // Take the form: TYPE_ARGUMENT{#} scanner.expect(Token.LBRACE); int index; if ((scanner.token != Token.EOF) && (scanner.token == INTVAL)) { index = scanner.intValue; scanner.scan(); } else { // incorrect Arg index environment.error(scanner.pos, "err.incorrect.typeannot.pathentry.argindex", scanner.token); throw new SyntaxError(); } tpe = new TypePathEntry(pathKind, index); scanner.expect(Token.RBRACE); } else { tpe = new TypePathEntry(pathKind, 0); scanner.scan(); } } else { // unexpected Type Path environment.error(scanner.pos, "err.incorrect.typeannot.pathentry", scanner.token); throw new SyntaxError(); } return tpe; } /** * scanAnnotationArray *

* Scans an Array of annotations. * * @param name Name of the annotation * @return Array Element * @throws SyntaxError if a scanner error occurs */ private ArrayElemValue scanAnnotationArray(String name) throws SyntaxError { scanner.scan(); ArrayElemValue arrayElem = new ArrayElemValue(); while ((scanner.token != Token.EOF) && (scanner.token != Token.RBRACE)) { DataWriter dataWriter = scanAnnotationData(name + " {}"); arrayElem.add(dataWriter); // consume tokens inbetween annotation fields if (scanner.token == Token.COMMA) { scanner.scan(); } } scanner.expect(Token.RBRACE); return arrayElem; } /** * Scans an annotation enumeration. * * @param name Annotation Name * @return Constant element value for the Class Annotation. * @throws SyntaxError if a scanner error occurs */ private DataWriter scanAnnotationClass(String name) throws SyntaxError { DataWriter constVal; // scan the next identifier. // if it is an Ident, consume it as the class name. scanner.scan(); switch (scanner.token) { case IDENT, STRINGVAL: environment.traceln("[ParserAnnotation.scanAnnotationData]:: Constant Class Field: " + name + " = " + scanner.stringValue); //need to encode the stringval as an (internal) descriptor. String desc = scanner.stringValue; // note: for annotations, a class field points to a string with the class descriptor. constVal = new ConstElemValue(AE_CLASS.tag(), parser.pool.findUTF8Cell(desc)); scanner.scan(); break; case CPINDEX: // could be a reference to a class name environment.traceln("[ParserAnnotation.scanAnnotationData]:: Constant Class Field: " + name + " = " + scanner.stringValue); Integer ConstNmCPX = Integer.valueOf(scanner.stringValue); constVal = new ClassElemValue(parser.pool.getCell(ConstNmCPX)); scanner.scan(); break; default: environment.error(scanner.pos, "err.incorrect.annot.class", scanner.stringValue); throw new SyntaxError(); } return constVal; } /** * Scans an annotation enum value. * * @return Enumeration Element Value * @throws SyntaxError if a scanner error occurs */ private EnumElemValue scanAnnotationEnum() throws SyntaxError { scanner.scan(); EnumElemValue enumval; switch (scanner.token) { case IDENT, STRINGVAL: // could be a string identifying enum class and name String type = scanner.stringValue; ConstElemValue typeConst = new ConstElemValue(AE_STRING.tag(), parser.pool.findUTF8Cell(type)); scanner.scan(); scanner.expect(Token.FIELD); switch (scanner.token) { case IDENT, STRINGVAL: String name = scanner.stringValue; ConstElemValue nameConst = new ConstElemValue(AE_STRING.tag(), parser.pool.findUTF8Cell(name)); enumval = new EnumElemValue(typeConst.constCell, nameConst.constCell); scanner.scan(); break; case CPINDEX: int nameCpx = scanner.intValue; enumval = new EnumElemValue(typeConst.constCell, parser.pool.getCell(nameCpx)); scanner.scan(); break; default: environment.error(scanner.pos, "err.incorrect.annot.enum.name", scanner.stringValue); throw new SyntaxError(); } break; case CPINDEX: int typeCpx = scanner.intValue; scanner.scan(); if( scanner.token == Token.FIELD ) { // skip "." if found // the new format uses "." to separate type and name: // @+#24 /* java/lang/annotation/Retention */ { // #11 /* value */ = enum #16.#17 /* "Ljava/lang/annotation/RetentionPolicy;".RUNTIME */ // } scanner.scan(); } //need two indexes to form a proper enum switch (scanner.token) { case CPINDEX: int nameCpx = scanner.intValue; enumval = new EnumElemValue(parser.pool.getCell(typeCpx), parser.pool.getCell(nameCpx)); scanner.scan(); break; case IDENT, STRINGVAL: // could be a string identifying enum class and name String enumName = scanner.stringValue; ConstElemValue nameConst = new ConstElemValue(AE_STRING.tag(), parser.pool.findUTF8Cell(enumName)); enumval = new EnumElemValue(parser.pool.getCell(typeCpx), nameConst.constCell); scanner.scan(); break; default: environment.error(scanner.pos, "err.incorrect.annot.enum.name", scanner.stringValue); throw new SyntaxError(); } break; default: environment.error(scanner.pos, "err.incorrect.annot.enum.type", scanner.stringValue); throw new SyntaxError(); } return enumval; } /** * scanAnnotationData *

* parses the internals of an annotation. * * @param name Annotation Name * @return a Data data structure containing the annotation data. * @throws IOException for scanning errors. */ private DataWriter scanAnnotationData(String name) { DataWriter dataWriter; switch (scanner.token) { // This handles the Annotation types (as normalized in the constant pool) // Some primitive types (Boolean, char, short, byte) are identified by a keyword. case INTVAL: environment.traceln("[ParserAnnotation.scanAnnotationData]:: Integer Field: " + name + " = " + scanner.intValue); dataWriter = new ConstElemValue(CONSTANT_INTEGER.getAnnotationElementTypeValue(), parser.pool.findIntegerCell(scanner.intValue)); scanner.scan(); break; case DOUBLEVAL: environment.traceln("[ParserAnnotation.scanAnnotationData]:: Double Field: " + name + " = " + scanner.doubleValue); double dval = scanner.doubleValue; Long val = Double.doubleToLongBits(dval); dataWriter = new ConstElemValue(CONSTANT_DOUBLE.getAnnotationElementTypeValue(), parser.pool.findDoubleCell(val)); scanner.scan(); break; case FLOATVAL: environment.traceln("[ParserAnnotation.scanAnnotationData]:: Float Field: " + name + " = " + scanner.floatValue); float fval = scanner.floatValue; Integer val1 = Float.floatToIntBits(fval); dataWriter = new ConstElemValue(CONSTANT_FLOAT.getAnnotationElementTypeValue(), parser.pool.findFloatCell(val1)); scanner.scan(); break; case LONGVAL: environment.traceln("[ParserAnnotation.scanAnnotationData]:: Long Field: " + name + " = " + scanner.longValue); dataWriter = new ConstElemValue(CONSTANT_LONG.getAnnotationElementTypeValue(), parser.pool.findLongCell(scanner.longValue)); scanner.scan(); break; case STRINGVAL: environment.traceln("[ParserAnnotation.scanAnnotationData]:: String Field: " + name + " = " + scanner.stringValue); dataWriter = new ConstElemValue(CONSTANT_UTF8.getAnnotationElementTypeValue(), parser.pool.findUTF8Cell(scanner.stringValue)); scanner.scan(); break; case CLASS: environment.traceln("[ParserAnnotation.scanAnnotationData]:: Class) keyword: " + scanner.stringValue); dataWriter = scanAnnotationClass(name); break; case ENUM: // scan the next two identifiers (eg ident.ident), or 2 CPRefs. // if it is an Ident, use consume it as the class name. environment.traceln("[ParserAnnotation.scanAnnotationData]:: Enum) keyword: " + scanner.stringValue); dataWriter = scanAnnotationEnum(); break; case IDENT: environment.traceln("[ParserAnnotation.scanAnnotationData]:: JASM Keyword: (annotation field name: " + name + ") keyword: " + scanner.stringValue); dataWriter = scanAnnotationIdent(scanner.stringValue, name); break; case ANNOTATION: environment.traceln("[ParserAnnotation.scanAnnotationData]:: Annotation Field: " + name + " = " + scanner.stringValue); dataWriter = new AnnotationElemValue(parseAnnotation()); break; case LBRACE: environment.traceln("[ParserAnnotation.scanAnnotationData]:: Annotation Array Field: " + name); dataWriter = scanAnnotationArray(name); break; case CPINDEX: environment.traceln("[ParserAnnotation.scanAnnotationData]:: Constant Field by index: " + name + " = #" + scanner.stringValue); int cpIndex = Integer.parseInt(scanner.stringValue); dataWriter = getElementValueByCPIndex(cpIndex); scanner.scan(); break; default: environment.error(scanner.pos, "err.incorrect.annot.token", scanner.token); throw new SyntaxError(); } return dataWriter; } private DataWriter getElementValueByCPIndex(int cpIndex) { DataWriter dataWriter; ConstCell cell = parser.pool.getCell(cpIndex); ConstType type = cell.getType(); if (type.oneOf(CONSTANT_UNKNOWN, CONSTANT_INTEGER, CONSTANT_FLOAT, CONSTANT_LONG, CONSTANT_DOUBLE, CONSTANT_UTF8)) { dataWriter = new ConstElemValue(type.getAnnotationElementTypeValue(), cell); } else { dataWriter = new ClassElemValue(parser.pool.getCell(cpIndex)); } return dataWriter; } /** * scanAnnotationIdent *

* parses the identifier of an annotation. * * @param ident Basic Type identifier * @param name Annotation Name * @return Basic Type Annotation data * @throws SyntaxError if a scanning error occurs */ private DataWriter scanAnnotationIdent(String ident, String name) throws SyntaxError { // Handle JASM annotation Keyword Identifiers DataWriter dataWriter; BasicType type = getBasicType(ident); switch (type) { case T_BOOLEAN: // consume the keyword, get the value scanner.scan(); switch (scanner.token) { case INTVAL: // Handle Boolean value in integer form environment.traceln("Boolean Field: " + name + " = " + scanner.intValue); int val = scanner.intValue; if (val > 1 || val < 0) { environment.traceln("Warning: Boolean Field: " + name + " value is not 0 or 1, value = " + scanner.intValue); } dataWriter = new ConstElemValue(AE_BOOLEAN.tag(), parser.pool.findIntegerCell(val)); scanner.scan(); break; case IDENT: // handle boolean value with true/false keywords int val1; switch (scanner.stringValue) { case "true": val1 = 1; break; case "false": val1 = 0; break; default: environment.error(scanner.pos, "err.incorrect.annotation", AE_BOOLEAN.printValue(), INTVAL.parseKey() + ", " + CPINDEX.parseKey() + ", " + TRUE.parseKey() + ", " + FALSE.parseKey(), scanner.stringValue); throw new SyntaxError(); } environment.traceln("Boolean Field: " + name + " = " + scanner.stringValue); dataWriter = new ConstElemValue(AE_BOOLEAN.tag(), parser.pool.findIntegerCell(val1)); scanner.scan(); break; case CPINDEX: int cpIndex = Integer.parseInt(scanner.stringValue); dataWriter = new ConstElemValue(AE_BOOLEAN.tag(), parser.pool.getCell(cpIndex)); scanner.scan(); break; default: environment.error(scanner.pos, "err.incorrect.annotation", AE_BOOLEAN.printValue(), INTVAL.parseKey() + ", " + CPINDEX.parseKey(), scanner.stringValue); throw new SyntaxError(); } break; case T_BYTE: // consume the keyword, get the value scanner.scan(); switch (scanner.token) { case INTVAL: environment.traceln("Byte Field: " + name + " = " + scanner.intValue); int val = scanner.intValue; if (val > 0xFF) { environment.traceln("Warning: Byte Field: " + name + " value is greater than 0xFF, value = " + scanner.intValue); } dataWriter = new ConstElemValue(AE_BYTE.tag(), parser.pool.findIntegerCell(val)); scanner.scan(); break; case CPINDEX: int cpIndex = Integer.parseInt(scanner.stringValue); dataWriter = new ConstElemValue(AE_BYTE.tag(), parser.pool.getCell(cpIndex)); scanner.scan(); break; default: environment.error(scanner.pos, "err.incorrect.annotation", AE_BYTE.printValue(), INTVAL.parseKey() + ", " + CPINDEX.parseKey(), scanner.stringValue); throw new SyntaxError(); } break; case T_CHAR: // consume the keyword, get the value scanner.scan(); switch (scanner.token) { case INTVAL: environment.traceln("Char Field: " + name + " = " + scanner.intValue); Integer val = scanner.intValue; // Bounds check? dataWriter = new ConstElemValue(AE_CHAR.tag(), parser.pool.findIntegerCell(val)); scanner.scan(); break; case CPINDEX: int cpIndex = Integer.parseInt(scanner.stringValue); dataWriter = new ConstElemValue(AE_CHAR.tag(), parser.pool.getCell(cpIndex)); scanner.scan(); break; default: environment.error(scanner.pos, "err.incorrect.annotation", AE_CHAR.printValue(), INTVAL.parseKey() + ", " + CPINDEX.parseKey(), scanner.stringValue); throw new SyntaxError(); } break; case T_SHORT: // consume the keyword, get the value scanner.scan(); switch (scanner.token) { case INTVAL: environment.traceln("Short Field: " + name + " = " + scanner.intValue); int val = scanner.intValue; if (val > 0xFFFF) { environment.traceln("Warning: Short Field: " + name + " value is greater than 0xFFFF, value = " + scanner.intValue); } dataWriter = new ConstElemValue(AE_SHORT.tag(), parser.pool.findIntegerCell(val)); scanner.scan(); break; case CPINDEX: int cpIndex = Integer.parseInt(scanner.stringValue); dataWriter = new ConstElemValue(AE_SHORT.tag(), parser.pool.getCell(cpIndex)); scanner.scan(); break; default: environment.error(scanner.pos, "err.incorrect.annotation", AE_SHORT.printValue(), INTVAL.parseKey() + ", " + CPINDEX.parseKey(), scanner.stringValue); throw new SyntaxError(); } break; default: environment.error(scanner.pos, "err.incorrect.annot.keyword", ident); throw new SyntaxError(); } return dataWriter; } /** * AnnotationElemValue - used to store Annotation values */ static class AnnotationElemValue implements ConstantPoolDataVisitor { AnnotationData annotationData; AnnotationElemValue(AnnotationData annotationData) { this.annotationData = annotationData; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(AE_ANNOTATION.tag()); annotationData.write(out); } @Override public int getLength() { return 1 + annotationData.getLength(); } @Override public T visit(ConstantPool pool) { annotationData = visitData(annotationData, pool); return (T) this; } } /** * Annotation Element value referring to a class */ static class ClassElemValue implements ConstantPoolDataVisitor { ConstCell constCell; ClassElemValue(ConstCell constCell) { this.constCell = constCell; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(AE_CLASS.tag()); constCell.write(out); } @Override public int getLength() { return 3; } @Override public T visit(ConstantPool pool) { constCell = visitConstCell(constCell, pool); return (T) this; } } /** * Annotation Element value referring to an Array */ static class ArrayElemValue implements ConstantPoolDataVisitor { ArrayList elemValues; ArrayElemValue() { this.elemValues = new ArrayList<>(); } void add(DataWriter elemValue) { elemValues.add(elemValue); } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(AE_ARRAY.tag()); out.writeShort(elemValues.size()); for (DataWriter eval : elemValues) { eval.write(out); } } @Override public int getLength() { return 3 + elemValues.stream().flatMapToInt(elem -> IntStream.of(elem.getLength())).sum(); } @Override public T visit(ConstantPool pool) { for (DataWriter element : elemValues) { visitData(element, pool); } return (T) this; } } /** * Annotation Element value referring to a Constant */ static class ConstElemValue implements ConstantPoolDataVisitor { char tag; ConstCell constCell; ConstElemValue(char tag, ConstCell constCell) { this.tag = tag; this.constCell = constCell; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(tag); constCell.write(out); } @Override public int getLength() { return 3; } @Override public T visit(ConstantPool pool) { if (!this.constCell.isSet()) { this.constCell = visitConstCell(this.constCell, pool); if (!AnnotationElementType.isSet(this.tag)) { tag = this.constCell.getAnnotationElementTypeValue(); } } return (T) this; } } /** * Element Value for Enums: * type_name_index * The constant_pool entry at that index must be a CONSTANT_Utf8_info structure representing a field descriptor(4.3.2). * * const_name_index * The constant_pool entry gives the simple name of the enum constant represented by this element_value structure. */ static class EnumElemValue implements ConstantPoolDataVisitor { ConstCell type; ConstCell name; EnumElemValue(ConstCell type, ConstCell name) { this.type = type; this.name = name; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(AE_ENUM.tag()); type.write(out); name.write(out); } @Override public int getLength() { return 5; } @Override public T visit(ConstantPool pool) { this.type = visitConstCell(this.type, pool); this.name = visitConstCell(this.name, pool); return (T) this; } } /** * Target Type visitor, used for constructing the target-info within a type * annotation. visitExcept() is the entry point. ti is the constructed target info. */ private static class TargetTypeVisitor extends TypeAnnotationTypes.TypeAnnotationTargetVisitor { private TypeAnnotationTargetInfoData targetInfoData; private SyntaxError syntaxError; private Scanner scanner; private JasmEnvironment environment; public void init(Scanner scanner) { this.scanner = scanner; this.environment = scanner.environment; reset(); } public final void reset() { targetInfoData = null; syntaxError = null; } //This is the entry point for a visitor that tunnels exceptions public void visitExcept(ETargetType targetType) throws SyntaxError { reset(); visit(targetType); if (syntaxError != null) { throw syntaxError; } } public TypeAnnotationTargetInfoData getTargetInfo() { return targetInfoData; } // Gathers Int values, and tunnels any exceptions thrown by the scanner private int scanIntVal(ETargetType targetType) { int ret = -1; if (scanner.token == INTVAL) { ret = scanner.intValue; try { scanner.scan(); } catch (SyntaxError se) { syntaxError = se; } } else { environment.error(scanner.pos, "err.incorrect.typeannot.targtype.int", targetType.parseKey(), scanner.token); syntaxError = new SyntaxError(); } return ret; } // Gathers String values, and tunnels any exceptions thrown by the scanner private String scanStringVal(ETargetType targetType) { String ret = ""; if (scanner.token == Token.STRINGVAL) { ret = scanner.stringValue; try { scanner.scan(); } catch (SyntaxError se) { syntaxError = se; } } else { environment.error(scanner.pos, "err.incorrect.typeannot.targtype.string", targetType.parseKey(), scanner.token); syntaxError = new SyntaxError(); } return ret; } // Gathers braces, and tunnels any exceptions thrown by the scanner private void scanBrace(boolean left) { try { scanner.expect(left ? Token.LBRACE : Token.RBRACE); } catch (SyntaxError se) { syntaxError = se; } } private boolean errorFound() { return syntaxError != null; } @Override public void visit_type_param_target(ETargetType targetType) { environment.traceln("Type Param Target: "); int byteval = scanIntVal(targetType); // param index if (!errorFound()) { targetInfoData = new TypeAnnotationTargetInfoData.type_parameter_target(targetType, byteval); } } @Override public void visit_supertype_target(ETargetType targetType) { environment.traceln("SuperType Target: "); int shortval = scanIntVal(targetType); // type index if (!errorFound()) { targetInfoData = new TypeAnnotationTargetInfoData.supertype_target(targetType, shortval); } } @Override public void visit_typeparam_bound_target(ETargetType targetType) { environment.traceln("TypeParam Bound Target: "); int byteval1 = scanIntVal(targetType); // param index if (errorFound()) { return; } int byteval2 = scanIntVal(targetType); // bound index if (errorFound()) { return; } targetInfoData = new TypeAnnotationTargetInfoData.type_parameter_bound_target(targetType, byteval1, byteval2); } @Override public void visit_empty_target(ETargetType targetType) { environment.traceln("Empty Target: "); if (!errorFound()) { targetInfoData = new TypeAnnotationTargetInfoData.empty_target(targetType); } } @Override public void visit_methodformalparam_target(ETargetType targetType) { environment.traceln("MethodParam Target: "); int byteval = scanIntVal(targetType); // param index if (!errorFound()) { targetInfoData = new formal_parameter_target(targetType, byteval); } } @Override public void visit_throws_target(ETargetType targetType) { environment.traceln("Throws Target: "); int shortval = scanIntVal(targetType); // exception index if (!errorFound()) { targetInfoData = new throws_target(targetType, shortval); } } @Override public void visit_localvar_target(ETargetType targetType) { environment.traceln("LocalVar Target: "); localvar_target locvartab = new localvar_target(targetType, 0); targetInfoData = locvartab; while ((scanner.token != Token.EOF) && (scanner.token != Token.RBRACE)) { // consume the left brace scanBrace(true); if (errorFound()) { return; } // scan the local var triple int shortval1 = scanIntVal(targetType); // startPC if (errorFound()) { return; } int shortval2 = scanIntVal(targetType); // length if (errorFound()) { return; } int shortval3 = scanIntVal(targetType); // CPX locvartab.addEntry(shortval1, shortval2, shortval3); scanBrace(false); if (errorFound()) { return; } } } @Override public void visit_catch_target(ETargetType targetType) { environment.traceln("Catch Target: "); int shortval = scanIntVal(targetType); // catch index targetInfoData = new catch_target(targetType, shortval); } @Override public void visit_offset_target(ETargetType targetType) { environment.traceln("Offset Target: "); int shortval = scanIntVal(targetType); // offset index if (!errorFound()) { targetInfoData = new offset_target(targetType, shortval); } } @Override public void visit_typearg_target(ETargetType targetType) { environment.traceln("TypeArg Target: "); int shortval = scanIntVal(targetType); // offset if (errorFound()) { return; } int byteval = scanIntVal(targetType); // type index if (errorFound()) { return; } targetInfoData = new type_argument_target(targetType, shortval, byteval); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ParseAttribute.java000066400000000000000000001004021514323636100270120ustar00rootroot00000000000000/* * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.SyntaxError; import org.openjdk.asmtools.common.structure.StackMap; import java.io.IOException; import java.util.ArrayList; import java.util.List; import static org.openjdk.asmtools.common.structure.StackMap.EntryType.*; import static org.openjdk.asmtools.jasm.JasmTokens.Token.*; import static org.openjdk.asmtools.jasm.StackMapData.UNDEFINED; public class ParseAttribute extends ParseBase { private static final String LocalVariableTable_HEADER = START.parseKey() + LENGTH.parseKey() + SLOT.parseKey() + NAME.parseKey() + DESCRIPTOR.parseKey(); private static final String LocalVariableTypeTable_HEADER = START.parseKey() + LENGTH.parseKey() + SLOT.parseKey() + NAME.parseKey() + SIGNATURE.parseKey(); private static final int LocalVariableTable_HEADER_LENGTH = LocalVariableTable_HEADER.length(); private static final int LocalVariableTypeTable_HEADER_LENGTH = LocalVariableTypeTable_HEADER.length(); protected ParseAttribute(Parser parentParser) { super.init(parentParser); } /** * Parse either localVariableTable or localVariableTypeTable according to the boolean parameter isTypeTable * * @param isTypeTable defines which localVariableTypeTable or localVariableTable is parsed * @return list of local_variable_table[i] or local_variable_type_table[i] entries */ public List parseLocalVariableTable(boolean isTypeTable) { String attributeName = isTypeTable ? "LocalVariableTypeTable" : "LocalVariableTable"; String parseKey = isTypeTable ? SIGNATURE.parseKey() : DESCRIPTOR.parseKey(); String header = isTypeTable ? LocalVariableTypeTable_HEADER : LocalVariableTable_HEADER; int headerLength = isTypeTable ? LocalVariableTypeTable_HEADER_LENGTH : LocalVariableTable_HEADER_LENGTH; ArrayList list = new ArrayList<>(); scanner.scan(); if (scanner.token == COLON) { scanner.scan(); } String buffer = ""; short slot = -1, start_pc = -1, length = -1; ConstCell nameCell = null, descriptorCell = null; while ((scanner.token != EOF) && (scanner.token != RBRACE)) { switch (scanner.token) { case START, LENGTH, SLOT, NAME, DESCRIPTOR, SIGNATURE -> { if (buffer.length() == headerLength || buffer.contains(scanner.stringValue)) { environment.throwErrorException(scanner.pos, "err.header.locvars", parseKey); } buffer += scanner.stringValue; if (!header.startsWith(buffer)) { environment.throwErrorException(scanner.pos, "err.header.locvars", parseKey); } } case INTVAL -> { if (buffer.length() != headerLength) { environment.throwErrorException(scanner.pos, "err.header.expected.locvars", parseKey); } if (start_pc == -1) { start_pc = (short) scanner.intValue; } else if (length == -1) { length = (short) scanner.intValue; } else if (slot == -1) { slot = (short) scanner.intValue; } else { if (nameCell == null) { environment.throwErrorException(scanner.pos, "err.expected.locvars", attributeName, "\"" + NAME.parseKey() + "\""); } if (descriptorCell == null) { environment.throwErrorException(scanner.pos, "err.expected.locvars", attributeName, "\"" + parseKey + "\""); } } } case STRINGVAL -> { verifyPosition(buffer, headerLength, attributeName, parseKey, start_pc, length, slot); String str = scanner.stringValue; if (nameCell == null) { nameCell = parser.pool.findUTF8Cell(str); } else if (descriptorCell == null) { descriptorCell = parser.pool.findUTF8Cell(str); list.add(new LocalVariableData(start_pc, length, slot, nameCell, descriptorCell)); // next new line slot = start_pc = length = -1; nameCell = descriptorCell = null; } else { environment.throwErrorException(scanner.pos, "err.header.expected.locvars", parseKey); } } case CPINDEX -> { // processing class references: Name, [Descriptor|Signature] verifyPosition(buffer, headerLength, attributeName, parseKey, start_pc, length, slot); String str = scanner.stringValue; if (nameCell == null) { nameCell = parser.pool.findUTF8Cell(str); } else if (descriptorCell == null) { descriptorCell = parser.pool.findUTF8Cell(str); list.add(new LocalVariableData(start_pc, length, slot, nameCell, descriptorCell)); // next new line slot = start_pc = length = -1; nameCell = descriptorCell = null; } else { environment.throwErrorException(scanner.pos, "err.header.expected.locvars", parseKey); } } default -> { if (buffer.length() != headerLength) { environment.throwErrorException(scanner.pos, "err.header.locvars", parseKey); } if (slot != -1 || start_pc != -1 || length != -1 || nameCell != null || descriptorCell != null) { environment.throwErrorException(scanner.pos, "err.expected.locvars", attributeName, " either the line {start_pc length slot \"name\" \"descriptor\"} or " + "{start_pc length slot name_index descriptor_index}"); } return list; } } scanner.scan(); } return list; } private void verifyPosition(String buffer, int headerLength, String attributeName, String parseKey, short start_pc, short length, short slot) { if (buffer.length() != headerLength) { environment.throwErrorException(scanner.pos, "err.header.locvars", parseKey); } if (start_pc == -1) { environment.throwErrorException(scanner.pos, "err.expected.locvars", attributeName, "\"start_pc\""); } else if (length == -1) { environment.throwErrorException(scanner.pos, "err.expected.locvars", attributeName, "\"length\""); } else if (slot == -1) { environment.throwErrorException(scanner.pos, "err.expected.locvars", attributeName, "\"slot\""); } } public List parseStackMap() throws SyntaxError, IOException { if (scanner.token == COLON) { // ignore scanner.scan(); } ArrayList list = new ArrayList<>(); int numEntries = 0; StackMap.EntryType entryType = UNKNOWN_TYPE; StackMapData stackMapData = null; while ((scanner.token != EOF) && (scanner.token != RBRACE)) { switch (scanner.token) { case NUMBEROFENTRIES -> { // number_of_entries scanner.scan(); scanner.expect(ASSIGN); if (scanner.token != INTVAL) { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"number of entries\""); } numEntries = scanner.intValue; } case BYTECODEOFFSET -> { // BCI if (stackMapData != null) { list.add(stackMapData); } scanner.scan(); scanner.expect(ASSIGN); if (scanner.token != INTVAL) { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "The offset value"); } stackMapData = new StackMapData(environment, false); stackMapData.setPC(scanner.intValue); } case LOCALSMAP -> { // locals_map if (stackMapData == null) { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"%s\"".formatted(BYTECODEOFFSET.parseKey())); } else { if (stackMapData.localsMap != null && stackMapData.localsMap.size() > 0) { environment.warning(scanner.pos, "warn.stackmap.redeclared", "\"%s\"".formatted(LOCALSMAP.parseKey())); } scanner.scan(); scanner.expect(ASSIGN); if (scanner.token == IDENT && scanner.stringValue.equals(LSQBRACKET.parseKey() + RSQBRACKET.parseKey())) { // empty list stackMapData.localsMap = new DataVector(); } else { scanner.expectIdentContent(LSQBRACKET); DataVector localsMap = new DataVector(); stackMapData.localsMap = localsMap; while (scanner.token != EOF) { if (scanner.token == SEMICOLON) { scanner.scan(); scanner.expectIdentContent(RSQBRACKET); break; } // list can be empty due to some issues if (scanner.token == IDENT && scanner.stringValue.equals(RSQBRACKET.parseKey())) { // LocalsMap could be empty: environment.warning(scanner.pos, "warm.locals_map.empty"); break; } parser.parseMapItem(localsMap); if (scanner.token != JasmTokens.Token.COMMA) { if (scanner.token != SEMICOLON) { environment.throwErrorException(scanner.pos, "err.token.expected", "\"" + SEMICOLON.parseKey() + "\""); } continue; } scanner.scan(); } continue; } } } case STACKMAP -> { if (stackMapData == null) { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"%s\"".formatted(BYTECODEOFFSET.parseKey())); } else { if (stackMapData.stackMap != null && stackMapData.stackMap.size() > 0) { environment.warning(scanner.pos, "warn.stackmap.redeclared", "\"%s\"".formatted(STACKMAP.parseKey())); } scanner.scan(); scanner.expect(ASSIGN); if (scanner.token == IDENT && scanner.stringValue.equals(LSQBRACKET.parseKey() + RSQBRACKET.parseKey())) { // empty list stackMapData.stackMap = new DataVector(); } else { scanner.expectIdentContent(LSQBRACKET); DataVector stackMap = new DataVector(); stackMapData.stackMap = stackMap; while (scanner.token != EOF) { if (scanner.token == SEMICOLON) { scanner.scan(); scanner.expectIdentContent(RSQBRACKET); break; } // the list can be empty due to some issues if (scanner.token == IDENT && scanner.stringValue.equals(RSQBRACKET.parseKey())) { // StackMap could be empty: environment.warning(scanner.pos, "warm.stack_map.empty"); break; } parser.parseMapItem(stackMap); if (scanner.token != JasmTokens.Token.COMMA) { if (scanner.token != SEMICOLON) { environment.throwErrorException(scanner.pos, "err.token.expected", "\"" + SEMICOLON.parseKey() + "\""); } continue; } scanner.scan(); } continue; } } } } scanner.scan(); } if (stackMapData != null) { list.add(stackMapData); } return list; } public List parseStackMapTable() throws SyntaxError, IOException { int wrapLevel = 0; int numEntries = 0; // - might be used to check that the header's number matches the actual number of records. ArrayList list = new ArrayList<>(); int stackFrameTypeValue = UNDEFINED; StackMap.EntryType entryType = UNKNOWN_TYPE; StackMapData stackMapData = null; scanner.scan(); if (scanner.token == COLON) { // ignore scanner.scan(); } while (scanner.token != EOF) { switch (scanner.token) { case LBRACE -> { if (wrapLevel == 0) { environment.throwErrorException(scanner.pos, "err.larvar.frame.expected"); } } case RBRACE -> { if (wrapLevel == 0) { return list; } wrapLevel--; } case NUMBEROFENTRIES -> { // number_of_entries scanner.scan(); scanner.expect(ASSIGN); if (scanner.token != INTVAL) { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"number of entries\""); } numEntries = scanner.intValue; } case FRAMETYPE, ENTRYTYPE -> { // frame_type, entry_type scanner.scan(); scanner.expect(ASSIGN); if (scanner.token == INTVAL) { stackFrameTypeValue = scanner.intValue; entryType = StackMap.EntryType.getByTag(stackFrameTypeValue); } if (entryType == UNKNOWN_TYPE) { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "An integer within the range of [0 to 255]"); } if (entryType == EARLY_LARVAL) { if (wrapLevel > 2) { // limit of enclosure environment.throwErrorException(scanner.pos, "err.base.frame.expected"); } wrapLevel++; } if (stackMapData == null) { stackMapData = new StackMapData(environment, parser.curCodeAttr.isTypeCheckingVerifier()); } else { JasmTokens.Token expectedToken = stackMapData.checkIntegrity(); if (expectedToken == null) { list.add(stackMapData); stackMapData = new StackMapData(environment, parser.curCodeAttr.isTypeCheckingVerifier()); } else { if (expectedToken == STACKMAP || stackMapData.getFrameType() == FULL_FRAME) { stackMapData.stackMap = new DataVector<>(); list.add(stackMapData); stackMapData = new StackMapData(environment, parser.curCodeAttr.isTypeCheckingVerifier()); environment.warning(scanner.pos, "warn.stackmap.expected", "\"%s\"".formatted(expectedToken.parseKey())); } else { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"%s\"".formatted(expectedToken.parseKey())); } } } stackMapData.setStackFrameType(stackFrameTypeValue); if (stackMapData.checkIntegrity() == null) { list.add(stackMapData); stackMapData = null; } continue; } case OFFSETDELTA -> { // offset_delta if (stackMapData == null || stackMapData.getFrameType() == SAME_FRAME) { if (wrapLevel > 0) { environment.throwErrorException(scanner.pos, "err.token.expected", RBRACE.parseKey()); } else { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"%s\"".formatted(FRAMETYPE.parseKey())); } } else { JasmTokens.Token expectedToken = stackMapData.checkIntegrity(); if (expectedToken != OFFSETDELTA) { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"%s\"".formatted(expectedToken.parseKey())); } scanner.scan(); scanner.expect(ASSIGN); if (scanner.token != INTVAL) { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "The offset_delta value"); } stackMapData.setOffset(scanner.intValue); if (stackMapData.checkIntegrity() == null) { list.add(stackMapData); stackMapData = null; } } } case LOCALSMAP -> { // locals_map if (stackMapData == null || stackMapData.getFrameType() == SAME_FRAME) { if (wrapLevel > 0) { environment.throwErrorException(scanner.pos, "err.token.expected", RBRACE.parseKey()); } else { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"%s\"".formatted(FRAMETYPE.parseKey())); } } else { JasmTokens.Token expectedToken = stackMapData.checkIntegrity(); if (expectedToken != LOCALSMAP) { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"%s\"".formatted(expectedToken.parseKey())); } scanner.scan(); scanner.expect(ASSIGN); stackMapData.localsMap = new DataVector(); // The scanner identifies an empty statement ([] in locals_map = []) as an identifier. if (scanner.token == IDENT && scanner.stringValue.equals(LSQBRACKET.parseKey() + RSQBRACKET.parseKey())) { scanner.scan(); } else { scanner.expectIdentContent(LSQBRACKET); while (scanner.token != EOF) { if (scanner.token == SEMICOLON) { scanner.scan(); scanner.expectIdentContent(RSQBRACKET); break; } // list can be empty due to some issues if (scanner.token == IDENT && scanner.stringValue.equals(RSQBRACKET.parseKey())) { // LocalsMap could be empty: environment.warning(scanner.pos, "warm.locals_map.empty"); break; } parser.parseMapItem(stackMapData.localsMap); if (scanner.token != JasmTokens.Token.COMMA) { if (scanner.token != SEMICOLON) { environment.throwErrorException(scanner.pos, "err.token.expected", "\"" + SEMICOLON.parseKey() + "\""); } continue; } scanner.scan(); } } if (stackMapData.checkIntegrity() == null) { list.add(stackMapData); stackMapData = null; } continue; } } case STACKMAP -> { if (stackMapData == null || stackMapData.getFrameType() == SAME_FRAME) { if (wrapLevel > 0) { environment.throwErrorException(scanner.pos, "err.token.expected", RBRACE.parseKey()); } else { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"%s\"".formatted(FRAMETYPE.parseKey())); } } else { JasmTokens.Token expectedToken = stackMapData.checkIntegrity(); if (expectedToken != STACKMAP) { if (expectedToken != LOCALSMAP || stackMapData.getFrameType() != FULL_FRAME) { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"%s\"".formatted(expectedToken.parseKey())); } } scanner.scan(); scanner.expect(ASSIGN); stackMapData.stackMap = new DataVector(); // The scanner identifies an empty statement ([] in stack_map = []) as an identifier. if (scanner.token == IDENT && scanner.stringValue.equals(LSQBRACKET.parseKey() + RSQBRACKET.parseKey())) { scanner.scan(); } else { scanner.expectIdentContent(LSQBRACKET); while (scanner.token != EOF) { if (scanner.token == SEMICOLON) { scanner.scan(); scanner.expectIdentContent(RSQBRACKET); break; } // the list can be empty due to some issues if (scanner.token == IDENT && scanner.stringValue.equals(RSQBRACKET.parseKey())) { // StackMap could be empty: environment.warning(scanner.pos, "warm.stack_map.empty"); break; } parser.parseMapItem(stackMapData.stackMap); if (scanner.token != JasmTokens.Token.COMMA) { if (scanner.token != SEMICOLON) { environment.throwErrorException(scanner.pos, "err.token.expected", "\"" + SEMICOLON.parseKey() + "\""); } continue; } scanner.scan(); } } if (stackMapData.checkIntegrity() == null) { list.add(stackMapData); stackMapData = null; } continue; } } case UNSETFIELDS -> { if (stackMapData == null || stackMapData.getFrameType() == SAME_FRAME) { if (wrapLevel > 0) { environment.throwErrorException(scanner.pos, "err.token.expected", RBRACE.parseKey()); } else { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"%s\"".formatted(FRAMETYPE.parseKey())); } } else { JasmTokens.Token expectedToken = stackMapData.checkIntegrity(); if (expectedToken != UNSETFIELDS) { environment.throwErrorException(scanner.pos, "err.stackmap.expected", "\"%s\"".formatted(expectedToken.parseKey())); } scanner.scan(); scanner.expect(ASSIGN); stackMapData.unsetFields = new DataVector(); // The scanner identifies an empty statement ([ ] in unset_fields = [ ]) as an identifier. if (scanner.token == IDENT && scanner.stringValue.equals(LSQBRACKET.parseKey() + RSQBRACKET.parseKey())) { scanner.scan(); } else { scanner.expectIdentContent(LSQBRACKET); while (scanner.token != EOF) { if (scanner.token == SEMICOLON) { scanner.scan(); scanner.expectIdentContent(RSQBRACKET); break; } // the list can be empty due to some issues if (scanner.token == IDENT && scanner.stringValue.equals(RSQBRACKET.parseKey())) { // StackMap could be empty: environment.warning(scanner.pos, "warm.stack_map.empty"); break; } parser.parseNameAndType(stackMapData.unsetFields); if (scanner.token != JasmTokens.Token.COMMA) { if (scanner.token != SEMICOLON) { environment.throwErrorException(scanner.pos, "err.token.expected", SEMICOLON.parseKey()); } continue; } scanner.scan(); } } if (stackMapData.checkIntegrity() == null) { list.add(stackMapData); stackMapData = null; } continue; } } } scanner.scan(); } return list; } public List parseLineTable() { ArrayList list = new ArrayList<>(); scanner.scan(); if (scanner.token == COLON) { // ignore scanner.scan(); } int start_pc = -1, line_number = -1; boolean newLine = true, colonFound = false; while ((scanner.token != EOF) && (scanner.token != RBRACE)) { switch (scanner.token) { case COLON -> { if (newLine) { environment.throwErrorException(scanner.pos, "err.expected.linetable", "line keyword"); } if (line_number == -1) { environment.throwErrorException(scanner.pos, "err.expected.linetable", "line_number:"); } else if (colonFound) { if (start_pc == -1) environment.throwErrorException(scanner.pos, "err.expected.linetable", "start_pc"); else environment.throwErrorException(scanner.pos, "err.expected.linetable", "line keyword"); } colonFound = true; } case LINE -> { if (!newLine) { environment.throwErrorException(scanner.pos, "err.expected.linetable", "line line_number: start_pc"); } newLine = false; } case INTVAL -> { if (line_number == -1) line_number = scanner.intValue; else { start_pc = scanner.intValue; list.add(new LineNumberData(start_pc, line_number)); newLine = true; colonFound = false; line_number = -1; start_pc = -1; } } default -> { if (line_number != -1 || start_pc != -1 || !newLine) { environment.throwErrorException(scanner.pos, "err.expected.linetable", "line line_number: start_pc"); } return list; } } scanner.scan(); } return list; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ParseBase.java000066400000000000000000000051401514323636100257240ustar00rootroot00000000000000/* * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.util.function.Supplier; /** * Base helper class for a Parser. */ public class ParseBase { // debug flag protected boolean debugFlag; protected Scanner scanner; protected Parser parser; protected JasmEnvironment environment; public ParseBase() { } public void init(Parser parentParser) { this.environment = parentParser.environment; this.scanner = parentParser.scanner; this.parser = parentParser; } public void init(JasmEnvironment environment, Parser parser) { this.environment = environment; this.scanner = new Scanner(environment); this.parser = parser; } public void init(JasmEnvironment environment) { this.environment = environment; } public void setDebugFlag(boolean value) { debugFlag = value; } protected void traceMethodInfoLn() { traceMethodInfoLn(() -> null); } protected void traceMethodInfoLn(String str) { traceMethodInfoLn(() -> str); } protected void traceMethodInfoLn(Supplier supplier) { if (debugFlag) { String str = supplier.get(); StackTraceElement elem = Thread.currentThread().getStackTrace()[str == null ? 3 : 2]; String msg = String.format("%s::%s[%d]%s", elem.getClassName().substring(elem.getClassName().lastIndexOf('.') + 1), elem.getMethodName(), elem.getLineNumber(), str == null ? "" : " " + str); environment.traceln(msg); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ParseConstPool.java000066400000000000000000000706521514323636100270040ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.SyntaxError; import java.util.ArrayList; import java.util.function.BiFunction; import static java.lang.String.format; import static org.openjdk.asmtools.jasm.ClassFileConst.*; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.*; import static org.openjdk.asmtools.jasm.ConstantPool.*; import static org.openjdk.asmtools.jasm.JasmTokens.Token; /** * ParserCP *

* ParseCP is a parser class owned by Parser.java. It is primarily responsible for parsing * the constant pool and constant declarations. */ public class ParseConstPool extends ParseBase { // Visitor object private final ParserCPVisitor pConstVstr; // Stop parsing a source file immediately and interpret any issue as an error private boolean exitImmediately = false; // counter of left braces private int lbrace = 0; /** * main constructor */ protected ParseConstPool(Parser parentParser) { super.init(parentParser); pConstVstr = new ParserCPVisitor(); } /** * In particular cases, it's necessary to interpret a warning issue as an error and * stop parsing a source file immediately * cpParser.setExitImmediately(true); * parseConstRef(...); * cpParser.setExitImmediately(false); */ public void setExitImmediately(boolean exitImmediately) { this.exitImmediately = exitImmediately; } /** * Parse CONSTVALUE */ protected ConstValue parseConstValue(ConstType tag) throws SyntaxError { return pConstVstr.visitExcept(tag); } private ConstType scanConstByID(boolean ignoreKeywords, boolean isBSMArgTag) throws SyntaxError { ConstType tag = null; if (!ignoreKeywords) { tag = (isBSMArgTag) ? ClassFileConst.getBSMArgumentTypeByParseKey(scanner.idValue) : ClassFileConst.getByParseKey(scanner.idValue); } traceMethodInfoLn(format("\t\tTag: %s ", tag == null ? "" : tag)); return tag; } private ConstType scanConstPrimVal() throws SyntaxError { ConstType tag; switch (scanner.token) { case BYTE -> tag = CONSTANT_BYTE; case BYTEVAL -> tag = CONSTANT_C_BYTE; case CHAR -> tag = CONSTANT_CHAR; case CHARVAL -> tag = CONSTANT_C_CHAR; case DOUBLE -> tag = CONSTANT_DOUBLE; case DOUBLEVAL -> tag = CONSTANT_C_DOUBLE; case FLOAT -> tag = ConstType.CONSTANT_FLOAT; case FLOATVAL -> tag = ConstType.CONSTANT_C_FLOAT; case LONG -> tag = ConstType.CONSTANT_LONG; case LONGVAL -> tag = ConstType.CONSTANT_C_LONG; case INT -> tag = CONSTANT_INT; case INTVAL -> tag = CONSTANT_INTEGER; case SHORT -> tag = CONSTANT_SHORT; case SHORTVAL -> tag = CONSTANT_C_SHORT; case BOOLEAN -> tag = CONSTANT_BOOLEAN; case BOOLEANVAL -> tag = CONSTANT_C_BOOLEAN; case STRINGVAL, BITS, IDENT -> tag = ConstType.CONSTANT_STRING; default -> { // problem - no constant value environment.error(scanner.pos, "err.value.expected", scanner.token.printValue()); throw new SyntaxError(); } } return tag; } private void checkWrongTag(ConstType tag, ConstType defaultTag, ConstType default2Tag) throws SyntaxError { if (defaultTag != null) { if (!tag.equals(defaultTag)) { if (default2Tag == null) { if (exitImmediately) { environment.error(scanner.pos, "err.wrong.tag", defaultTag.parseKey()); throw new SyntaxError().setFatal(); } environment.warning(scanner.pos, "warn.wrong.tag", defaultTag.parseKey()); } else if (!tag.equals(default2Tag)) { if (exitImmediately) { environment.error(scanner.pos, "err.wrong.tag2", defaultTag.parseKey(), default2Tag.parseKey()); throw new SyntaxError().setFatal(); } environment.warning(scanner.pos, "warn.wrong.tag2", defaultTag.parseKey(), default2Tag.parseKey()); } } } } protected ConstValue parseTagConstValue(ConstType defaultTag, ConstType default2Tag, boolean ignoreKeywords, boolean isBSMArgTag) throws SyntaxError { traceMethodInfoLn(() -> "\t<< DefaultTag: %s 2nd DefaultTag: %s IgnoreKeyword?: %b". formatted(defaultTag == null ? "" : defaultTag, default2Tag == null ? "" : default2Tag, ignoreKeywords)); // Lookup the Tag from the scanner ConstType tag = scanConstByID(ignoreKeywords, isBSMArgTag); traceMethodInfoLn("\tResult Tag: %s >>".formatted(tag)); // If the scanned tag is null if (tag == null) { // and, if the expected tag is null if (defaultTag == null) { // return some other type of constant as the tag tag = scanConstPrimVal(); } else { // otherwise, make the scanned-tag the same constant-type // as the expected tag. tag = defaultTag; } } else { // If the scanned tag is some constant type // and the scanned type does not equal the expected type checkWrongTag(tag, defaultTag, default2Tag); scanner.scan(); } return parseConstValue(tag); } // end parseTagConstValue protected ConstCell parseConstRef(ConstType defaultTag) throws SyntaxError { return parseConstRef(defaultTag, null, false); } /** * Parses a pair [TAG CONSTVALUE] from a constant pool entry [const #DD = TAG CONSTVALUE]. * * @return a ConstantCell holding the ConstValue * @throws SyntaxError if a syntax error occurs */ protected ConstCell parseConstPoolRef() throws SyntaxError { ConstType tag = scanConstByID(false, true); // check a tag: ConstValue ref; if (tag == null || tag.getTag() < 1) { // if element is given without tag, // i.e. instead of const #dd = long 1l; is written const #dd = 1l; ref = switch (scanner.token) { case IDENT -> { String value = scanner.stringValue; if( value.equalsIgnoreCase("true") ) { yield new ConstValue_Integer(CONSTANT_BOOLEAN, 1); } else if (value.equalsIgnoreCase("false") ) { yield new ConstValue_Integer(CONSTANT_BOOLEAN, 0); } environment.error(scanner.pos, "err.constant.kind.expected"); throw new SyntaxError().setFatal(); } case STRINGVAL -> new ConstValue_UTF8(scanner.stringValue); case INTVAL -> new ConstValue_Integer(CONSTANT_INT, scanner.intValue); case BYTEVAL -> new ConstValue_Integer(CONSTANT_BYTE, scanner.intValue); case SHORTVAL -> new ConstValue_Integer(CONSTANT_SHORT, scanner.intValue); case CHARVAL -> new ConstValue_Integer(CONSTANT_CHAR, scanner.intValue); case BOOLEANVAL -> new ConstValue_Integer(CONSTANT_BOOLEAN, scanner.intValue); case FLOATVAL -> new ConstValue_Float(Float.floatToIntBits(scanner.floatValue)); case DOUBLEVAL -> new ConstValue_Double(Double.doubleToLongBits(scanner.doubleValue)); case LONGVAL -> new ConstValue_Long(scanner.longValue); default -> { environment.error(scanner.pos, "err.constant.kind.expected"); throw new SyntaxError().setFatal(); } }; scanner.scan(); return parser.pool.findCell(ref); } scanner.scan(); ref = parseConstValue(tag); return parser.pool.findCell(ref); } protected ConstCell parseConstRef(ConstType defaultTag, ConstType default2Tag) throws SyntaxError { return parseConstRef(defaultTag, default2Tag, false); } /** * Parse an instruction argument, one of: * #NUMBER, #NAME, [TAG] CONSTVALUE */ protected ConstCell parseConstRef(ConstType defaultTag, ConstType default2Tag, boolean ignoreKeywords) throws SyntaxError { if (scanner.token == Token.CPINDEX) { int cpx = scanner.intValue; scanner.scan(); return parser.pool.getCell(cpx); } else { ConstValue ref = parseTagConstValue(defaultTag, default2Tag, ignoreKeywords, false); return parser.pool.findCell(ref); } } // end parseConstRef protected ConstCell parseBSMArgumentConstRef() throws SyntaxError { if (scanner.token == Token.CPINDEX) { int cpx = scanner.intValue; scanner.scan(); return parser.pool.getCell(cpx); } else { ConstValue ref = parseTagConstValue(null, null, false, true); return parser.pool.findCell(ref); } } // end parseConstRef /** * ParserCPVisitor *

* This inner class overrides a constant pool visitor to provide specific parsing * instructions (per method) for each type of Constant. *

* Note: since the generic visitor throws no exceptions, this derived class tunnels * the exceptions, rethrown in the visitExcept method. */ class ParserCPVisitor extends CPTagVisitor> { private SyntaxError syntaxError; //This is the entry point for a visitor that tunnels exceptions public ConstValue visitExcept(ConstType tag) throws SyntaxError { syntaxError = null; traceMethodInfoLn(); ConstValue ret = visit(tag); if (syntaxError != null) { throw syntaxError; } return ret; } @Override public ConstValue visitUTF8() { traceMethodInfoLn(); try { scanner.expect(Token.STRINGVAL); } catch (SyntaxError se) { syntaxError = se; } return new ConstValue_UTF8(scanner.stringValue); } @Override public ConstValue visitInteger(ClassFileConst.ConstType tag) { traceMethodInfoLn(); int v = 0; try { if (scanner.token == Token.BITS) { scanner.scan(); scanner.inBits = true; } v = scanner.intValue * scanner.sign; scanner.expect(Token.INTVAL); } catch (SyntaxError se) { syntaxError = se; } return new ConstValue_Integer(tag, v); } @Override public ConstValue visitLong() { traceMethodInfoLn(); ConstValue_Long valueLong = null; try { long v; if (scanner.token == Token.BITS) { scanner.scan(); scanner.inBits = true; } switch (scanner.token) { case INTVAL -> v = scanner.intValue; case LONGVAL -> v = scanner.longValue; default -> { environment.error(scanner.prevPos, "err.token.expected", "Integer"); throw new SyntaxError(); } } valueLong = new ConstValue_Long(v * scanner.sign); scanner.scan(); } catch (SyntaxError se) { syntaxError = se; } return valueLong; } @Override public ConstValue visitFloat() { traceMethodInfoLn(); ConstValue_Float valueFloat = null; try { int v; float f; scanner.inBits = false; // this needs to be initialized for each float! if (scanner.token == Token.BITS) { scanner.scan(); scanner.inBits = true; } i2f: { switch (scanner.token) { case INTVAL -> { if (scanner.inBits) { v = scanner.intValue; break i2f; } else { f = (float) scanner.intValue; } } case FLOATVAL -> f = scanner.floatValue; case DOUBLEVAL -> f = (float) scanner.doubleValue; // to be excluded? case INF -> f = Float.POSITIVE_INFINITY; case NAN -> f = Float.NaN; default -> { environment.traceln(() -> "token=" + scanner.token); environment.error(scanner.pos, "err.token.expected", ""); throw new SyntaxError(); } } v = Float.floatToIntBits(f); } if (scanner.sign == -1) { v = v ^ 0x80000000; } valueFloat = new ConstValue_Float(v); scanner.scan(); } catch (SyntaxError se) { syntaxError = se; } return valueFloat; } @Override public ConstValue visitDouble() { traceMethodInfoLn(); ConstValue_Double valueDouble = null; try { long v; double d; if (scanner.token == Token.BITS) { scanner.scan(); scanner.inBits = true; } d2l: { switch (scanner.token) { case INTVAL -> { if (scanner.inBits) { v = scanner.intValue; break d2l; } else { d = scanner.intValue; } } case LONGVAL -> { if (scanner.inBits) { v = scanner.longValue; break d2l; } else { d = (double) scanner.longValue; } } case FLOATVAL -> d = scanner.floatValue; case DOUBLEVAL -> d = scanner.doubleValue; case INF -> d = Double.POSITIVE_INFINITY; case NAN -> d = Double.NaN; default -> { environment.error(scanner.pos, "err.token.expected", "Double"); throw new SyntaxError(); } } v = Double.doubleToLongBits(d); } if (scanner.sign == -1) { v = v ^ 0x8000000000000000L; } valueDouble = new ConstValue_Double(v); scanner.scan(); } catch (SyntaxError se) { syntaxError = se; } return valueDouble; } public ConstCell visitName() { traceMethodInfoLn(); ConstCell obj = null; try { // Parse an external name: CPINDEX, string, or identifier. obj = parser.parseName(); } catch (SyntaxError se) { syntaxError = se; } return obj; } @Override public ConstValue visitMethodType() { traceMethodInfoLn(); ConstValue_MethodType obj = null; ConstCell cell = (ConstCell) visitName(); if (syntaxError == null) { obj = new ConstValue_MethodType(cell); } return obj; } @Override public ConstValue visitString() { traceMethodInfoLn(); ConstValue_String obj = null; ConstCell cell = visitName(); if (syntaxError == null) { obj = new ConstValue_String(cell); } return obj; } @Override public ConstValue visitClass() { traceMethodInfoLn(); ConstValue_Class obj = null; try { ConstCell cell = parser.parseConstantClassInfo(true); obj = new ConstValue_Class(cell); } catch (SyntaxError se) { syntaxError = se; } return obj; } @Override public ConstValue visitPackage() { traceMethodInfoLn(); ConstValue_Package obj = null; try { ConstCell cell = parser.parseConstantPackageInfo(); obj = new ConstValue_Package(cell); } catch (SyntaxError se) { syntaxError = se; } return obj; } @Override public ConstValue visitModule() { traceMethodInfoLn(); ConstValue_Module obj = null; try { ConstCell cell = parser.parseConstantModuleInfo(); obj = new ConstValue_Module(cell); } catch (SyntaxError se) { syntaxError = se; } return obj; } @Override public ConstValue visitMethodHandle() { traceMethodInfoLn(); ConstValue_MethodHandle obj = null; try { ConstCell refCell; SubTag subTag; // MethodHandle [INVOKESUBTAG|INVOKESUBTAG_INDEX] : CONSTANT_FIELD | [FIELDREF|METHODREF|INTERFACEMETHODREF] if (scanner.token == Token.INTVAL) { // INVOKESUBTAG_INDEX // Handle an explicit constant pool form subTag = subTag(scanner.intValue); scanner.scan(); scanner.expect(Token.COLON); if (scanner.token == Token.CPINDEX) { // CONSTANT_FIELD int cpx = scanner.intValue; refCell = parser.pool.getCell(cpx); scanner.scan(); } else { // [FIELDREF|METHODREF|INTERFACEMETHODREF] refCell = parser.parseMethodHandle(subTag); } } else { // INVOKESUBTAG : REF_INVOKEINTERFACE, REF_NEWINVOKESPECIAL, ... // normal JASM subTag = parser.parseSubtag(); scanner.expect(Token.COLON); if (scanner.token == Token.CPINDEX) { // CODETOOLS-7901522: Jasm doesn't allow creating REF_invoke* referring an InterfaceMethod // Parsing the case when refCell is CP index (#1) // const #1 = InterfaceMethod m:"()V"; // const #2 = MethodHandle REF_invokeSpecial:#1; int cpx = scanner.intValue; refCell = parser.pool.getCell(cpx); scanner.scan(); } else { refCell = parser.parseMethodHandle(subTag); } } obj = new ConstValue_MethodHandle(subTag, refCell); } catch (SyntaxError se) { syntaxError = se; } return obj; } public > T visitMember(ConstType tag) { traceMethodInfoLn(); T constValue = null; try { Token prevToken = scanner.token; ConstCell firstName; ConstCell ClassCell; ConstCell NameCell, NapeCell; firstName = parser.parseConstantClassInfo(false); if (scanner.token == Token.FIELD) { // DOT scanner.scan(); if (prevToken == Token.CPINDEX) { ClassCell = firstName; } else { ClassCell = parser.pool.findCell(ConstType.CONSTANT_CLASS, firstName); } NameCell = parser.parseName(); } else { // no class provided - assume current class if (parser.classData.coreClasses.this_class().isSet() || parser.classData.coreClasses.this_class().ref == null) { ClassCell = (ConstCell) parser.classData.coreClasses.this_class(); } else { ClassCell = parser.pool.findCell((ConstValue_Class) parser.classData.coreClasses.this_class().ref); } NameCell = firstName; } if (scanner.token == Token.COLON) { // name and type separately scanner.scan(); NapeCell = parser.pool.findCell(ConstType.CONSTANT_NAMEANDTYPE, NameCell, parser.parseName()); } else { // name and type as single name NapeCell = NameCell; } switch (tag) { case CONSTANT_INTERFACEMETHODREF -> constValue = (T) new ConstValue_InterfaceMethodRef(ClassCell, NapeCell); case CONSTANT_METHODREF -> constValue = (T) new ConstValue_MethodRef(ClassCell, NapeCell); case CONSTANT_FIELDREF -> constValue = (T) new ConstValue_FieldRef(ClassCell, NapeCell); } if (constValue == null) { environment.error("err.invalid.type", tag.printVal()); throw new SyntaxError().setFatal(); } } catch (SyntaxError se) { syntaxError = se; } return constValue; } @Override public ConstValue visitField() { traceMethodInfoLn(); return visitMember(ConstType.CONSTANT_FIELDREF); } @Override public ConstValue visitMethod() { traceMethodInfoLn(); return visitMember(ConstType.CONSTANT_METHODREF); } @Override public ConstValue visitInterfaceMethod() { traceMethodInfoLn(); return visitMember(ConstType.CONSTANT_INTERFACEMETHODREF); } @Override public ConstValue visitNameAndType() { traceMethodInfoLn(); ConstValue_NameAndType obj = null; try { ConstCell NameCell = parser.parseName(), TypeCell; scanner.expect(Token.COLON); TypeCell = parser.parseName(); obj = new ConstValue_NameAndType((ConstCell) NameCell, (ConstCell) TypeCell); } catch (SyntaxError se) { syntaxError = se; } return obj; } @Override public ConstValue_InvokeDynamic visitInvokeDynamic() { traceMethodInfoLn(); final BiFunction, ConstValue_InvokeDynamic> ctor = ConstValue_InvokeDynamic::new; return visitBsm(ctor); } @Override public ConstValue_Dynamic visitDynamic() { traceMethodInfoLn(); final BiFunction, ConstValue_Dynamic> ctor = ConstValue_Dynamic::new; return visitBsm(ctor); } private E visitBsm(BiFunction, E> ctor) { E obj = null; try { if (scanner.token == Token.INTVAL) { // Handle an explicit constant pool form int bsmIndex = scanner.intValue; scanner.scan(); scanner.expect(Token.COLON); if (scanner.token != Token.CPINDEX) { environment.traceln(() -> "token=" + scanner.token); environment.error(scanner.pos, "err.token.expected", ""); throw new SyntaxError(); } int cpx = scanner.intValue; scanner.scan(); // Put a placeholder in place of BSM. // resolve placeholder after the attributes are scanned. BootstrapMethodData bsmData = new BootstrapMethodData(bsmIndex); obj = ctor.apply(bsmData, parser.pool.getCell(cpx)); } else { // Handle full form ConstCell MHCell = parser.pool.findCell(parseConstValue(ConstType.CONSTANT_METHODHANDLE)); scanner.expect(Token.COLON); ConstCell NapeCell = parser.pool.findCell(parseConstValue(ConstType.CONSTANT_NAMEANDTYPE)); if (scanner.token == Token.LBRACE) { incLBRACE(); scanner.scan(); } ArrayList> bsm_args = new ArrayList<>(256); while (true) { if (ParseConstPool.this.lbrace > 0) { if (scanner.token == Token.RBRACE) { decLBRACE(); scanner.scan(); break; } else if (scanner.token == Token.SEMICOLON) { scanner.expect(Token.RBRACE); } } else if (scanner.token == Token.SEMICOLON) { break; } if (scanner.token == Token.COMMA) { scanner.scan(); } ConstCell cell = parseBSMArgumentConstRef(); bsm_args.add(cell); } if (ParseConstPool.this.lbrace == 0) { scanner.check(Token.SEMICOLON); } BootstrapMethodData bsmData = new BootstrapMethodData(MHCell, bsm_args); parser.classData.addBootstrapMethod(bsmData); obj = ctor.apply(bsmData, NapeCell); } } catch (SyntaxError se) { syntaxError = se; } return obj; } } // End Visitor public ParseConstPool decLBRACE() { ParseConstPool.this.lbrace--; return this; } public ParseConstPool incLBRACE() { ParseConstPool.this.lbrace++; return this; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/ParseInstruction.java000066400000000000000000000520411514323636100273750ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.SyntaxError; import java.io.IOException; import java.lang.reflect.Modifier; import java.util.List; import static org.openjdk.asmtools.common.structure.StackMap.EntryType.EARLY_LARVAL; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType; import static org.openjdk.asmtools.jasm.JasmTokens.Token; import static org.openjdk.asmtools.jasm.JasmTokens.Token.ENTRYTYPE; import static org.openjdk.asmtools.jasm.JasmTokens.Token.FRAMETYPE; import static org.openjdk.asmtools.jasm.OpcodeTables.*; import static org.openjdk.asmtools.jasm.OpcodeTables.Opcode.*; /** * Instruction Parser *

* ParserInstr is a parser class owned by Parser.java. It is primarily responsible for * parsing instruction byte codes. */ public class ParseInstruction extends ParseBase { /** * local handle for the constant parser - needed for parsing constants during * instruction construction. */ private final ParseConstPool instructionParser; /** * Constructor * * @param parser parent, main parser * @param cpParser constant pool parser */ protected ParseInstruction(Parser parser, ParseConstPool cpParser) throws IOException { super.init(parser); this.instructionParser = cpParser; } private boolean isInstruction(Token token) { return (token == Token.IDENT || token.in(Token.LOCALSMAP, Token.STACKMAP, Token.UNSETFIELDS)); } /** * Parse an instruction. */ protected void parseInstr() throws SyntaxError, IOException { // ignore possible line numbers after java disassembler if (scanner.token == Token.INTVAL) { scanner.scan(); } // ignore possible numeric labels after java disassembler if (scanner.token == Token.INTVAL) { scanner.scan(); } if (scanner.token == Token.COLON) { scanner.scan(); } String mnemocode; long mnenoc_pos; for (; ; ) { // read labels if (!isInstruction(scanner.token)) { return; } mnemocode = scanner.idValue; mnenoc_pos = scanner.pos; scanner.scan(); if (scanner.token != Token.COLON) { break; } // actually it was a label scanner.scan(); parser.curCodeAttr.LabelDef(mnenoc_pos, mnemocode); } Opcode opcode = OpcodeTables.opcode(mnemocode); if (opcode == null) { environment.error(mnenoc_pos, "err.wrong.mnemocode", mnemocode); throw new SyntaxError(); } OpcodeType opcodeType = opcode.type(); Indexer arg = null; Object arg2 = null; StackMapData stackMapData; scanner.debugScan(mnenoc_pos, "parseInstr: MnemoCode \'%s\'".formatted(opcode.parseKey())); switch (opcodeType) { case NORMAL: switch (opcode) { // pseudo-instructions: case opc_bytecode: for (; ; ) { if (scanner.token == Token.IDENT) { Opcode oc = OpcodeTables.opcode(scanner.stringValue); if (oc == null) { environment.error(scanner.pos, "err.unknown.bytecode", scanner.stringValue); throw new SyntaxError(); } parser.curCodeAttr.addInstr(mnenoc_pos, opc_bytecode, new Indexer(oc.value()), null); scanner.scan(); } else { parser.curCodeAttr.addInstr(mnenoc_pos, Opcode.opc_bytecode, parser.parseUInt(1), null); } if (scanner.token != Token.COMMA) { return; } scanner.scan(); } case opc_try: for (; ; ) { parser.curCodeAttr.beginTrap(scanner.pos, parser.parseIdent()); if (scanner.token != Token.COMMA) { return; } scanner.scan(); } case opc_endtry: for (; ; ) { parser.curCodeAttr.endTrap(scanner.pos, parser.parseIdent()); if (scanner.token != Token.COMMA) { return; } scanner.scan(); } case opc_catch: parser.curCodeAttr.trapHandler(scanner.pos, parser.parseIdent(), instructionParser.parseConstRef(ConstType.CONSTANT_CLASS)); return; case opc_var: for (; ; ) { parser.parseLocVarDef(opc_var); if (scanner.token != Token.COMMA) { return; } scanner.scan(); } case opc_endvar: for (; ; ) { parser.parseLocVarEnd(opc_var); if (scanner.token != Token.COMMA) { return; } scanner.scan(); } case opc_type: for (; ; ) { parser.parseLocVarDef(opc_type); if (scanner.token != Token.COMMA) { return; } scanner.scan(); } case opc_endtype: for (; ; ) { parser.parseLocVarEnd(opc_type); if (scanner.token != Token.COMMA) { return; } scanner.scan(); } case opc_locals_map: stackMapData = parser.curCodeAttr.getStackMapTable(); if (stackMapData.localsMap != null) { environment.error(scanner.pos, "err.stackmap.entity.repeated", opc_locals_map.parseKey()); } DataVector localsMap = new DataVector(); stackMapData.localsMap = localsMap; stackMapData.setScannerPosition(scanner.pos); if (scanner.token == Token.SEMICOLON) { return; // empty locals_map allowed } for (; ; ) { parser.parseMapItem(localsMap); if (scanner.token != Token.COMMA) { return; } scanner.scan(); } case opc_stack_map: stackMapData = parser.curCodeAttr.getStackMapTable(); if (stackMapData.stackMap != null) { environment.error(scanner.pos, "err.stackmap.entity.repeated", opc_stack_map.parseKey()); } DataVector stackMap = new DataVector(); stackMapData.stackMap = stackMap; stackMapData.setScannerPosition(scanner.pos); if (scanner.token == Token.SEMICOLON) { return; // empty stack_map allowed } for (; ; ) { parser.parseMapItem(stackMap); if (scanner.token != Token.COMMA) { return; } scanner.scan(); } case opc_unset_fields: stackMapData = parser.curCodeAttr.getStackMapTable(); if (!stackMapData.isWrapper()) { environment.error(scanner.pos, "err.stackmap.map.eligible", opc_unset_fields.parseKey(), EARLY_LARVAL.tagName()); } if (stackMapData.unsetFields != null) { environment.error(scanner.pos, "err.stackmap.entity.repeated", opc_unset_fields.parseKey()); } DataVector unsetFields = new DataVector(); stackMapData.unsetFields = unsetFields; stackMapData.setScannerPosition(scanner.pos); if (scanner.token == Token.SEMICOLON) { // empty unset_fields allowed scanner.scan(); scanner.expectOneOf(List.of(opc_stack_map_entry.parseKey(), opc_stack_frame_type.parseKey()), FRAMETYPE, ENTRYTYPE); } else { for (; ; ) { parser.parseNameAndType(unsetFields); if (scanner.token != Token.COMMA) { scanner.expect(Token.SEMICOLON); scanner.expectOneOf(List.of(opc_stack_map_entry.parseKey(), opc_stack_frame_type.parseKey()), FRAMETYPE, ENTRYTYPE); break; } scanner.scan(); } } opcode = opc_frame_type; scanner.scan(); // continue to the next case: opc_stack_frame_type, opc_stack_map_entry, opc_frame_type, opc_entry_type // StackMapTable Attribute (Since 7.0) case opc_stack_frame_type, opc_stack_map_entry, opc_frame_type, opc_entry_type: stackMapData = parser.curCodeAttr.getStackMapTable(); if (stackMapData.isFrameTypeSet()) { if (stackMapData.isWrapper()) { stackMapData = parser.curCodeAttr.getNextStackMapTable(); } else { environment.error(scanner.pos, "err.stackmaptable.repeated"); } } stackMapData.setScannerPosition(scanner.pos).setStackFrameTypeByName(parser.parseIdent()); return; // StackMap Attribute (Java 6.0) case opc_stack_map_frame: // stack_map_frame stackMapData = parser.curCodeAttr.getStackMapTable(); if (stackMapData.isFrameTypeSet()) { environment.error(scanner.pos, "err.stackmaptable.repeated"); } stackMapData.setScannerPosition(scanner.pos); return; // normal instructions: case opc_aload: case opc_astore: case opc_fload: case opc_fstore: case opc_iload: case opc_istore: case opc_lload: case opc_lstore: case opc_dload: case opc_dstore: case opc_ret: case opc_aload_w: case opc_astore_w: case opc_fload_w: case opc_fstore_w: case opc_iload_w: case opc_istore_w: case opc_lload_w: case opc_lstore_w: case opc_dload_w: case opc_dstore_w: case opc_ret_w: // loc var arg = parser.parseLocVarRef(); break; case opc_iinc: // loc var, const arg = parser.parseLocVarRef(); scanner.expect(Token.COMMA); arg2 = parser.parseInt(opcode.parseKey(), 1); break; case opc_tableswitch: case opc_lookupswitch: arg2 = parseSwitchTable(); break; case opc_newarray: { int type; if (scanner.token == Token.INTVAL) { type = scanner.intValue; } else if ((type = ClassFileConst.basicTypeValue(scanner.idValue)) == -1) { environment.error(scanner.pos, "err.array.type.expected"); throw new SyntaxError(); } scanner.scan(); arg = new Indexer(type); break; } case opc_new: case opc_anewarray: case opc_instanceof: case opc_checkcast: arg = instructionParser.parseConstRef(ConstType.CONSTANT_CLASS); break; case opc_bipush: arg = parser.parseInt(opcode.parseKey(), 1); break; case opc_sipush: arg = parser.parseInt(opcode.parseKey(), 2); break; case opc_ldc: case opc_ldc_w: case opc_ldc2_w: arg = instructionParser.parseConstRef(null); break; case opc_putstatic: case opc_getstatic: case opc_putfield: case opc_getfield: arg = instructionParser.parseConstRef(ConstType.CONSTANT_FIELDREF); break; case opc_invokevirtual: arg = instructionParser.parseConstRef(ConstType.CONSTANT_METHODREF); break; case opc_invokestatic: case opc_invokespecial: ConstType ctype01 = ConstType.CONSTANT_METHODREF; ConstType ctype02 = ConstType.CONSTANT_INTERFACEMETHODREF; if (Modifier.isInterface(this.parser.classData.access)) { ctype01 = ConstType.CONSTANT_INTERFACEMETHODREF; ctype02 = ConstType.CONSTANT_METHODREF; } arg = instructionParser.parseConstRef(ctype01, ctype02); break; case opc_jsr: case opc_goto: case opc_ifeq: case opc_ifge: case opc_ifgt: case opc_ifle: case opc_iflt: case opc_ifne: case opc_if_icmpeq: case opc_if_icmpne: case opc_if_icmpge: case opc_if_icmpgt: case opc_if_icmple: case opc_if_icmplt: case opc_if_acmpeq: case opc_if_acmpne: case opc_ifnull: case opc_ifnonnull: case opc_jsr_w: case opc_goto_w: arg = parseLabelRef(); break; case opc_invokeinterface: arg = instructionParser.parseConstRef(ConstType.CONSTANT_INTERFACEMETHODREF); scanner.expect(Token.COMMA); arg2 = parser.parseUInt(1); break; case opc_invokedynamic: arg = instructionParser.parseConstRef(ConstType.CONSTANT_INVOKEDYNAMIC); break; case opc_multianewarray: arg = instructionParser.parseConstRef(ConstType.CONSTANT_CLASS); scanner.expect(Token.COMMA); arg2 = parser.parseUInt(1); break; case opc_wide: case opc_nonpriv: case opc_priv: int opc2 = (opcode.value() << 8) | parser.parseUInt(1).cpIndex; opcode = opcode(opc2); break; } break; case WIDE: arg = parser.parseLocVarRef(); if (opcode == Opcode.opc_iinc_w) { // loc var, const scanner.expect(Token.COMMA); arg2 = parser.parseInt(opcode.parseKey(), 2); } break; case NONPRIVELEGED: case PRIVELEGED: break; default: environment.error(scanner.prevPos, "err.wrong.mnemocode", mnemocode); throw new SyntaxError(); } parser.curCodeAttr.addInstr(mnenoc_pos, opcode, arg, arg2); } //end parseInstr /** * Parse a Switch Table. return value: SwitchTable. */ protected SwitchTable parseSwitchTable() throws SyntaxError, IOException { scanner.expect(Token.LBRACE); Indexer label; int numpairs = 0, key; SwitchTable table = new SwitchTable(environment); tableScan: { while (numpairs < MAX_LOOKUPSWITCH_PAIRS_COUNT) { switch (scanner.token) { case INTVAL: key = scanner.intValue * scanner.sign; scanner.scan(); scanner.expect(Token.COLON); table.addEntry(key, parseLabelRef()); numpairs++; if (scanner.token != Token.SEMICOLON) { break tableScan; } scanner.scan(); break; case DEFAULT: scanner.scan(); scanner.expect(Token.COLON); if (table.defLabel != null) { environment.error("err.default.redecl"); } table.defLabel = parseLabelRef(); if (scanner.token != Token.SEMICOLON) { break tableScan; } scanner.scan(); break; default: break tableScan; } } environment.error("err.long.switchtable", MAX_LOOKUPSWITCH_PAIRS_COUNT); } // end tableScan scanner.expect(Token.RBRACE); return table; } // end parseSwitchTable /** * Parse a label instruction argument */ protected Indexer parseLabelRef() throws SyntaxError, IOException { switch (scanner.token) { case INTVAL: { int v = scanner.intValue * scanner.sign; scanner.scan(); return new Indexer(v); } case IDENT: { String label = scanner.stringValue; scanner.scan(); return parser.curCodeAttr.LabelRef(label); } } environment.error("err.label.expected"); throw new SyntaxError(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/Parser.java000066400000000000000000003540471514323636100253300ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.asmutils.StringUtils; import org.openjdk.asmtools.common.SyntaxError; import org.openjdk.asmtools.common.outputs.NamedToolOutput; import org.openjdk.asmtools.common.structure.*; import org.openjdk.asmtools.jasm.ConstantPool.ConstValue_Cell; import org.openjdk.asmtools.jasm.JasmTokens.Token; import org.openjdk.asmtools.jdis.ModuleContent; import org.openjdk.asmtools.jdis.notations.Signature; import java.io.IOException; import java.util.*; import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.stream.Collectors; import static org.openjdk.asmtools.common.structure.CFVersion.copyOf; import static org.openjdk.asmtools.common.structure.EAttribute.*; import static org.openjdk.asmtools.common.structure.EModifier.*; import static org.openjdk.asmtools.jasm.ClassData.CoreClasses.PLACE.CLASSFILE; import static org.openjdk.asmtools.jasm.ClassFileConst.*; import static org.openjdk.asmtools.jasm.ConstantPool.ConstValue_UTF8; import static org.openjdk.asmtools.jasm.Indexer.NotSet; import static org.openjdk.asmtools.jasm.JasmTokens.Token.*; import static org.openjdk.asmtools.jasm.OpcodeTables.Opcode.opc_type; import static org.openjdk.asmtools.jasm.OpcodeTables.Opcode.opc_var; import static org.openjdk.asmtools.jdis.ConstantPool.TAG.*; /** * This class is used to parse Jasm statements and expressions. * The result is a parse tree.

*

* This class implements an operator precedence parser. Errors are * reported to the Environment object, if the error can't be * resolved immediately, a SyntaxError exception is thrown.

*

* Error recovery is implemented by catching Scanner.SyntaxError exceptions * and discarding input scanner.tokens until an input token is reached that * is possibly a legal continuation.

*

* The parse tree that is constructed represents the input * exactly (no rewrites to simpler forms). This is important * if the resulting tree is to be used for code formatting in * a programming environment. Currently, only documentation comments * are retained.

*

* A parser owns several components (scanner, constant-parser, * instruction-parser, annotations-parser) to which it delegates certain * parsing responsibilities. This parser contains functions to parse the * overall form of a class, and any members (fields, methods, inner-classes). *

* Syntax errors should always be caught inside the * parser for error recovery. */ class Parser extends ParseBase { private final ArrayList clsDataList = new ArrayList<>(); /** * other parser components */ private final ParseAnnotation annotParser; // For parsing Annotations private final ParseConstPool cpParser; // for parsing Constants private final ParseInstruction instrParser; // for parsing Instructions private final ParseAttribute attributeParser; // for parsing Instructions /* Parser Fields */ protected ConstantPool pool = null; ClassData classData = null; CFVersion currentCFV; // parser cfv CodeAttr curCodeAttr; private String pkg = null; private String pkgPrefix = ""; private ArrayList packageAnnotations = null; private ArrayList classAnnotations = null; private ArrayList memberAnnotations = null; private boolean explicitCP = false; private ModuleAttr moduleAttribute; /** * Create a parser */ protected Parser(JasmEnvironment environment, CFVersion cfVersion) throws IOException { super.init(environment, this); this.cpParser = new ParseConstPool(this); this.annotParser = new ParseAnnotation(this); this.instrParser = new ParseInstruction(this, cpParser); this.attributeParser = new ParseAttribute(this); this.currentCFV = copyOf(cfVersion); } void setDebugFlags(boolean debugScanner, boolean debugMembers, boolean debugCP, boolean debugAnnot, boolean debugInstr, boolean debugAttribute) { setDebugFlag(debugMembers); scanner.setDebugFlag(debugScanner); cpParser.setDebugFlag(debugCP); annotParser.setDebugFlag(debugAnnot); instrParser.setDebugFlag(debugInstr); attributeParser.setDebugFlag(debugAttribute); } public long getPosition() { return environment.getPosition(); } private Pair parseVersion() { int majorVersion, minorVersion; if (scanner.token == Token.VERSION) { scanner.scan(); if (scanner.token == Token.INTVAL) { majorVersion = scanner.intValue; scanner.scan(); if (scanner.token == Token.COLON) { scanner.scan(); if (scanner.token == Token.INTVAL) { minorVersion = scanner.intValue; classData.cfv.setFileVersion(majorVersion, minorVersion); scanner.scan(); traceMethodInfoLn("parseVersion: " + classData.cfv.asString()); return new Pair<>(majorVersion, minorVersion); } } } } environment.error(scanner.pos, "err.version.expected"); throw new SyntaxError(); } // Parse an internal name: identifier. String parseIdent() throws SyntaxError { String v = scanner.idValue; scanner.expect(Token.IDENT); return v; } /** * Parse a local variable (type) presented in the form * (var) index #name_index:#descriptor_index; [ (var) index name:descriptor; ] * or * (type) index #name_index:#signature_index; [ (type) index name:signature; ] *

* index - a valid index into the local variable array of the current frame. * name - valid unqualified name denoting a local variable * descriptor - a field descriptor which encodes the type or the signature of a local variable in the source program */ void parseLocVarDef(OpcodeTables.Opcode opcode) throws SyntaxError { int slot = NotSet; ConstCell nameCell, descriptorCell; // The form is (var) slot #name_index:#descriptor_index; [ (var) slot name:descriptor; ] // or (type) slot #name_index:#signature_index; [ (type) slot name:signature; ] long indexPosition = scanner.pos; if (scanner.token != Token.INTVAL) { environment.throwErrorException(indexPosition, "err.locvar.expected"); } slot = scanner.intValue; if (!curCodeAttr.max_locals.inRange(slot)) { environment.throwErrorException(indexPosition, "err.locvar.wrong.index", slot, curCodeAttr.max_locals.cpIndex - 1); } scanner.scan(); // scan pair #name_index:#descriptor_index or name:descriptor // 1. scan (#)name(_index) nameCell = parseName(); scanner.expect(Token.COLON); // scan pair #name_index:#descriptor_index or name:descriptor // 1. scan (#)descriptor(_index) long descriptorPosition = scanner.pos; descriptorCell = parseName(); // check either field descriptor or signature of the local var according to the opcode if (opcode == opc_var) { FieldType fieldType = FieldType.getFieldType(((String) descriptorCell.ref.value).charAt(0)); if (fieldType == null) { environment.throwErrorException(descriptorPosition, "err.locvar.unknown.field.descriptor", slot, descriptorCell.ref.value.toString()); } } else if (opcode == opc_type) { try { // check validity of the parsed signature new Signature<>(environment.getLogger(), descriptorCell.ref.value.toString()).getFieldType(null); } catch (Exception ex) { environment.warning(descriptorPosition, "warn.loctype.wrong.field.signature", slot, descriptorCell.ref.value.toString()); } } else { environment.throwErrorException(descriptorPosition, "err.one.of.two.token.expected", opc_var.parseKey(), opc_type.parseKey()); } curCodeAttr.LocVarDataDef(opcode, indexPosition, slot, nameCell, descriptorCell); } /** * Parse The index (LOCAL_VARIABLE) into the local variable array of the instructions: * [wide]aload, astore, fload, fstore, iload, istore, lload, lstore, dload, dstore LOCAL_VARIABLE; * [wide]iinc LOCAL_VARIABLE, NUMBER; */ Indexer parseLocVarRef() throws SyntaxError { if (scanner.token == Token.INTVAL) { int index = scanner.intValue; scanner.scan(); return new Indexer(index); } else { //IMPROVEMENT: add parsing form where LOCAL_VARIABLE is a name of the LocalVariable // like aload count[| #12]; where count was defined above: var 2 count:I; environment.error(scanner.pos, "err.locvar.expected"); throw new SyntaxError(); } } /** * Parse The index (LOCAL_VARIABLE) into the local variable array of the instructions: * either endvar LOCAL_VARIABLE; or endtype LOCAL_VARIABLE; */ void parseLocVarEnd(OpcodeTables.Opcode opcode) throws SyntaxError { final long position = scanner.pos; if (scanner.token == Token.INTVAL) { int index = scanner.intValue; curCodeAttr.LocVarDataEnd(opcode, (short) index, position); scanner.scan(); } else { //IMPROVEMENT: add parsing form where LOCAL_VARIABLE is a name of the LocalVariable // like varend count[| #12]; where count was defined above: var 2 count:I; environment.error(scanner.pos, "err.locvar.expected"); throw new SyntaxError(); } } /** * Parse a set of CONSTANT_NameAndType_info entries in the following forms: * #id1, #id2, #idN; * or * fldS:"Ljava/lang/String;", fldS:"I", fldI:"I"; * * @param fields is the list of fields that is populated with a newly scanned item * @throws SyntaxError if any format error * @throws IOException if any input error */ void parseNameAndType(DataVector fields) throws SyntaxError { if (scanner.token == CPINDEX) { fields.add(new ConstantPoolIndexData(scanner.intValue)); scanner.scan(); } else { ConstCell nameCell = parseName(); scanner.expect(COLON); ConstCell typeCell = parseName(); // Define the variable ConstantPool.ConstValue_NameAndType nameAndType = new ConstantPool.ConstValue_NameAndType(nameCell, typeCell); ConstCell cell = pool.findNameAndTypeCell(nameAndType); fields.add(new ConstantPoolIndexData(cell, pool)); } } void parseMapItem(DataVector map) throws SyntaxError, IOException { StackMap.VerificationType itemVerificationType = StackMap.getVerificationType(scanner.intValue, Optional.empty()); ConstType tag = null; Indexer arg = null; Token token = scanner.token; int iValue = scanner.intValue; String sValue = scanner.stringValue; scanner.scan(); resolve: { switch (token) { case INTVAL: break resolve; case CLASS: itemVerificationType = StackMap.VerificationType.ITEM_Object; tag = ConstType.CONSTANT_CLASS; break resolve; case CPINDEX: itemVerificationType = StackMap.VerificationType.ITEM_Object; arg = pool.getCell(iValue); break resolve; case IDENT: itemVerificationType = StackMap.getVerificationType(sValue); tag = ClassFileConst.getByParseKey(sValue); if (itemVerificationType != null) { // itemType OK if ((tag != null) // ambiguity: "int," or "int 77,"? && (scanner.token != SEMICOLON) && (scanner.token != COMMA)) { itemVerificationType = StackMap.VerificationType.ITEM_Object; } break resolve; } else if (tag != null) { // tag OK itemVerificationType = StackMap.VerificationType.ITEM_Object; break resolve; } } // resolution failed: itemVerificationType = StackMap.VerificationType.ITEM_Bogus; environment.error("err.itemtype.expected", "<" + token.printValue() + ">"); } switch (itemVerificationType) { case ITEM_Object -> { // followed by CP index if (arg == null) { arg = pool.findCell(cpParser.parseConstValue(tag)); } map.addElement(new StackMapData.StackMapItemTaggedPointer(itemVerificationType, arg)); } case ITEM_NewObject -> { // followed by label arg = instrParser.parseLabelRef(); map.addElement(new StackMapData.StackMapItemTaggedPointer(itemVerificationType, arg)); } default -> map.addElement(new StackMapData.StackMapItemTagged(itemVerificationType)); } } /** * Parse an external name: CPINDEX, string, or identifier. */ ConstCell parseName() throws SyntaxError { traceMethodInfoLn(); String v; if (scanner.token == CPINDEX) { int cpx = scanner.intValue; scanner.scan(); return pool.getCell(cpx); } else if (scanner.token == STRINGVAL) { v = scanner.stringValue; scanner.scan(); return pool.findUTF8Cell(v); } else if (scanner.token.isPossibleClassName()) { // In many cases, Identifiers can correctly have the same // names as keywords. Let's allow Class Names. v = scanner.idValue; scanner.scan(); return pool.findUTF8Cell(v); } environment.error(scanner.pos, "err.name.expected", "\"" + scanner.token + "\""); throw new SyntaxError(); } /** * Parses a field or method reference for a method handle. */ ConstCell parseMethodHandle(SubTag subtag) throws SyntaxError { ConstCell refCell; switch (subtag) { // If the value of the reference_kind item is // 1 (REF_getField), 2 (REF_getStatic), 3 (REF_putField) or 4 (REF_putStatic), // then the constant_pool entry at that index must be a CONSTANT_Fieldref_info structure (4.4.2) // representing a field for which a method handle is to be created. jvms-4.4.8-200-C-A case REF_GETFIELD, REF_GETSTATIC, REF_PUTFIELD, REF_PUTSTATIC -> refCell = pool.findCell(cpParser.parseConstValue(ConstType.CONSTANT_FIELDREF)); // If the value of the reference_kind item is // 5 (REF_invokeVirtual) or 8 (REF_newInvokeSpecial), // then the constant_pool entry at that index must be a CONSTANT_Methodref_info structure (4.4.2) // representing a class's method or constructor (2.9.1) for which a method handle is to be created. // jvms-4.4.8-200-C-B case REF_INVOKEVIRTUAL, REF_NEWINVOKESPECIAL -> { cpParser.setExitImmediately(true); refCell = cpParser.parseConstRef(ConstType.CONSTANT_METHODREF, ConstType.CONSTANT_INTERFACEMETHODREF); cpParser.setExitImmediately(false); checkReferenceIndex(getPosition(), ConstType.CONSTANT_METHODREF, null); } case REF_INVOKESTATIC, REF_INVOKESPECIAL -> { // CODETOOLS-7902333 // 4.4.8. The CONSTANT_MethodHandle_info Structure // reference_index // The value of the reference_index item must be a valid index into the constant_pool table. // The constant_pool entry at that index must be as follows: // If the value of the reference_kind item is 6 (REF_invokeStatic) or 7 (REF_invokeSpecial), // then if the class file version number is less than 52.0, the constant_pool entry at that index must be // a CONSTANT_Methodref_info structure representing a class's method for which a method handle is to be created; // if the class file version number is 52.0 or above, the constant_pool entry at that index must be // either a CONSTANT_Methodref_info structure or a CONSTANT_InterfaceMethodref_info structure (4.4.2) // representing a class's or interface's method for which a method handle is to be created. ConstType ctype01 = ConstType.CONSTANT_METHODREF; ConstType ctype02 = ConstType.CONSTANT_INTERFACEMETHODREF; if (this.classData.cfv.major_version() >= 52 && EModifier.isInterface(this.classData.access)) { ctype01 = ConstType.CONSTANT_INTERFACEMETHODREF; ctype02 = ConstType.CONSTANT_METHODREF; } cpParser.setExitImmediately(true); refCell = cpParser.parseConstRef(ctype01, ctype02); cpParser.setExitImmediately(false); checkReferenceIndex(getPosition(), ctype01, ctype02); } case REF_INVOKEINTERFACE -> { cpParser.setExitImmediately(true); refCell = cpParser.parseConstRef(ConstType.CONSTANT_INTERFACEMETHODREF, ConstType.CONSTANT_METHODREF); cpParser.setExitImmediately(false); checkReferenceIndex(getPosition(), ConstType.CONSTANT_INTERFACEMETHODREF, null); } default -> // should not reach throw new SyntaxError(); } return refCell; } /** * Check the pair reference_kind:reference_index where reference_kind is any from: * REF_invokeVirtual, REF_newInvokeSpecial, REF_invokeStatic, REF_invokeSpecial, REF_invokeInterface * and reference_index is one of [Empty], Method or InterfaceMethod * There are possible entries: * ldc Dynamic REF_newInvokeSpecial:InterfaceMethod LdcConDyTwice."": * ldc Dynamic REF_invokeInterface:LdcConDyTwice."": * ldc Dynamic REF_newInvokeSpecial:Method LdcConDyTwice."": * ldc MethodHandle REF_newInvokeSpecial:InterfaceMethod LdcConDyTwice."": * ldc MethodHandle REF_invokeInterface:LdcConDyTwice."": * ldc MethodHandle REF_newInvokeSpecial:Method LdcConDyTwice."": * invokedynamic MethodHandle REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: * invokedynamic MethodHandle REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants * .... * * @param position the position in a source file * @param defaultTag expected reference_index tag (Method or InterfaceMethod) * @param defaultTag2 2nd expected reference_index tag (Method or InterfaceMethod) */ private void checkReferenceIndex(long position, ConstType defaultTag, ConstType defaultTag2) { if (!scanner.token.in(COLON, SEMICOLON, COMMA)) { if (defaultTag2 != null) { environment.error(position, "err.wrong.tag2", defaultTag.parseKey(), defaultTag2.parseKey()); } else { environment.error(position, "err.wrong.tag", defaultTag.parseKey()); } throw new SyntaxError().setFatal(); } } /** * Parses a sub-tag value in a method handle. */ SubTag parseSubtag() throws SyntaxError { SubTag subtag = switch (scanner.token) { case IDENT -> subTag(scanner.stringValue); case INTVAL -> subTag(scanner.intValue); default -> null; }; if (subtag == null) { environment.error("err.subtag.expected"); throw new SyntaxError(); } scanner.scan(); return subtag; } ConstCell parseConstantPackageInfo() throws SyntaxError { if (scanner.token == CPINDEX) { int cpx = scanner.intValue; scanner.scan(); return pool.getCell(cpx); } else if (scanner.token == STRINGVAL || // Some identifiers might coincide with token names. // these should be OK to use as identifier names. scanner.token.isPossibleClassName()) { String packageName = scanner.stringValue; scanner.scan(); return pool.findPackageCell(packageName); } else { throwSyntaxError("err.package.name.expected"); return null; } } ConstCell parseConstantModuleInfo() throws SyntaxError { if (scanner.token == CPINDEX) { int cpx = scanner.intValue; scanner.scan(); return pool.getCell(cpx); } else if (scanner.token == STRINGVAL || // Some identifiers might coincide with token names. // these should be OK to use as identifier names. scanner.token.isPossibleModuleName()) { String moduleName = scanner.stringValue; scanner.scan(); return pool.findModuleCell(moduleName); } else { throwSyntaxError("err.module.name.expected"); return null; } } ConstCell parseConstantClassInfo(boolean uncond) throws SyntaxError { if (scanner.token == CPINDEX) { int cpx = scanner.intValue; scanner.scan(); return pool.getCell(cpx); } else if (scanner.token == STRINGVAL || // Some identifiers might coincide with token names. // These should be OK to use as identifier names. scanner.token.isPossibleClassName()) { String value = scanner.stringValue; scanner.scan(); value = prependPackage(value, uncond); return pool.findUTF8Cell(value); } else { throwSyntaxError("err.class.name.expected"); return null; } } private void throwSyntaxError(String msgId) throws SyntaxError { ConstType key = ClassFileConst.getByTag(scanner.token.value()); environment.traceln("Unrecognized token %s: %s", scanner.token.toString(), key == null ? "null" : key.parseKey()); environment.error(scanner.prevPos, msgId, "\"" + scanner.token.parseKey() + "\""); throw new SyntaxError(); } private String prependPackage(String className, boolean uncond) { if (uncond || (scanner.token == Token.FIELD)) { if ((!className.contains("/")) // class identifier doesn't contain "/" && (!className.contains("["))) { // class identifier doesn't contain "[" className = pkgPrefix + className; // add package } } return className; } /** * Parse a signed integer of size bytes long. * size = 1 or 2 */ Indexer parseInt(String opCode, int size) throws SyntaxError { if (scanner.token == Token.BITS) { scanner.scan(); } if (scanner.token != Token.INTVAL) { environment.error(scanner.pos, "err.int.expected"); throw new SyntaxError(); } int arg = scanner.intValue * scanner.sign; switch (size) { case 1: // if ((arg>127)||(arg<-128)) { // 0xFF not allowed if ((arg > 255) || (arg < -128)) { // to allow 0xFF environment.error(scanner.pos, "err.value.large", opCode, arg, "1 byte"); throw new SyntaxError(); } break; case 2: // if ((arg > 32767) || (arg < -32768)) { //this seems // natural but is not backward compatible. Some tests contain // expressions like: sipush 0x8765; if ((arg > 65535) || (arg < -32768)) { environment.error(scanner.pos, "err.value.large", opCode, arg, "2 bytes"); throw new SyntaxError(); } break; default: throw new InternalError("parseInt(" + size + ")"); } scanner.scan(); return new Indexer(arg); } /** * Parse an unsigned integer of size bytes long. * size = 1 or 2 */ Indexer parseUInt(int size) throws SyntaxError { if (scanner.token != Token.INTVAL) { environment.error(scanner.pos, "err.int.expected"); throw new SyntaxError(); } if (scanner.sign == -1) { environment.error(scanner.pos, "err.neg.forbidden"); throw new SyntaxError(); } int arg = scanner.intValue; switch (size) { case 1: if (arg > 255) { environment.error(scanner.pos, "err.value.large", "ubyte", arg, "1 byte"); throw new SyntaxError(); } break; case 2: if (arg > 65535) { environment.error(scanner.pos, "err.value.large", "ushort", arg, "2 bytes"); throw new SyntaxError(); } break; default: throw new InternalError("parseUInt(" + size + ")"); } scanner.scan(); return new Indexer(arg); } /** * Parse constant declaration */ private void parseConstDef() { for (; ; ) { if (scanner.token == Token.CPINDEX) { int cpx = scanner.intValue; scanner.scan(); scanner.expect(Token.ASSIGN); traceMethodInfoLn("\ncpIndex: %d".formatted(cpx)); pool.setCell(cpx, cpParser.parseConstPoolRef()); } else { environment.error("err.const.def.expected"); throw new SyntaxError(); } if (scanner.token != COMMA) { scanner.expect(SEMICOLON); return; } scanner.scan(); // COMMA } } /** * Parse the modifiers */ private int scanModifier(int mod) throws SyntaxError { int nextmod; long prevpos; while (true) { nextmod = 0; switch (scanner.token) { case PUBLIC -> nextmod = ACC_PUBLIC.getFlag(); case PRIVATE -> nextmod = ACC_PRIVATE.getFlag(); case PROTECTED -> nextmod = ACC_PROTECTED.getFlag(); case STATIC -> nextmod = ACC_STATIC.getFlag(); case FINAL -> nextmod = ACC_FINAL.getFlag(); case SYNCHRONIZED -> nextmod = ACC_SYNCHRONIZED.getFlag(); case SUPER -> nextmod = ACC_SUPER.getFlag(); case IDENTITY -> nextmod = ACC_IDENTITY.getFlag() | VALUE_OBJECTS_ATTRIBUTE.getFlag(); case VALUE -> nextmod = ACC_VALUE.getFlag() | VALUE_OBJECTS_ATTRIBUTE.getFlag(); case VOLATILE -> nextmod = ACC_VOLATILE.getFlag(); case BRIDGE -> nextmod = ACC_BRIDGE.getFlag(); case TRANSIENT -> nextmod = ACC_TRANSIENT.getFlag(); case VARARGS -> nextmod = ACC_VARARGS.getFlag(); case NATIVE -> nextmod = ACC_NATIVE.getFlag(); case INTERFACE -> nextmod = ACC_INTERFACE.getFlag(); case ABSTRACT -> nextmod = ACC_ABSTRACT.getFlag(); case STRICT -> nextmod = ACC_STRICT.getFlag(); case ENUM -> nextmod = ACC_ENUM.getFlag(); case SYNTHETIC -> nextmod = this.classData.cfv.isSyntheticAttributeContext() ? SYNTHETIC_ATTRIBUTE.getFlag() : ACC_SYNTHETIC.getFlag(); case ANNOTATION_ACCESS -> nextmod = ACC_ANNOTATION.getFlag(); case DEPRECATED -> nextmod = DEPRECATED_ATTRIBUTE.getFlag(); case MANDATED -> nextmod = ACC_MANDATED.getFlag(); case INTVAL -> nextmod = scanner.intValue; default -> { return nextmod; } } prevpos = scanner.pos; scanner.scan(); if ((mod & nextmod) == 0) { return nextmod; } environment.warning(prevpos, "warn.repeated.modifier"); } } int scanModifiers() throws SyntaxError { int mod = 0, nextmod; while (true) { nextmod = scanModifier(mod); if (nextmod == 0) { return mod; } mod = mod | nextmod; } } /** * Parse a field. */ private void parseField(int mod) throws SyntaxError { // Parses in the form: // FIELD (, FIELD)*; // where // FIELD = NAME:DESCRIPTOR(:SIGNATURE)? CONST_VALUE? // FIELD = NAME:DESCRIPTOR(:SIGNATURE_FULL)? // FIELD = NAME:DESCRIPTOR CONST_VALUE(:SIGNATURE_FULL)? // NAME = (CPINDEX | IDENT) // DESCRIPTOR = (CPINDEX | STRING) // SIGNATURE = (CPINDEX | STRING) // SIGNATURE_FULL=Signature SIGNATURE // CONST_VALUE = ASSIGN CONSTREF traceMethodInfoLn("Begin"); // check access modifiers: Checker.checkFieldModifiers(classData, mod, scanner.prevPos); while (true) { ConstCell nameCell = parseName(); scanner.expect(COLON); ConstCell typeCell = parseName(); // Define the variable FieldData fld = classData.addField(mod, nameCell, typeCell); if (memberAnnotations != null) { fld.addAnnotations(memberAnnotations); } // Parse the optional attribute: signature if (scanner.token == COLON) { scanner.scan(); if (scanner.token == SIGNATURE) { scanner.scan(); // skip } ConstCell signatureCell = parseName(); fld.setSignatureAttr(signatureCell); } // Parse the optional initializer if (scanner.token == ASSIGN) { scanner.scan(); fld.SetInitialValue(cpParser.parseConstRef(null)); } if (scanner.token == COLON) { scanner.scan(); fld.checkExistence(ATT_Signature, () -> environment.warning(scanner.pos, "warn.repeat.signature.field")); if (scanner.token == SIGNATURE) { scanner.scan(); // skip } ConstCell signatureCell = parseName(); fld.setSignatureAttr(signatureCell); } // If the next scanner.token is a comma, then there is more if (scanner.token != COMMA) { scanner.expect(SEMICOLON); return; } scanner.scan(); } // end while } // end parseField /** * Scan method's signature to determine the size of parameters. */ private int countParams(ConstCell sigCell) throws SyntaxError { String sig; try { ConstValue_UTF8 strConst = (ConstValue_UTF8) sigCell.ref; sig = strConst.value; } catch (NullPointerException | ClassCastException e) { return 0; // ??? TBD } int siglen = sig.length(), k = 0, loccnt = 0; String errMsg = "\"({JavaTypeSignature})Result\" is missing."; boolean arraytype = false; scan: { if (k >= siglen) { break scan; } if (sig.charAt(k) != '(') { errMsg = "A \"(\" token is expected in \"({JavaTypeSignature})Result\""; break scan; } for (k = 1; k < siglen; k++) { switch (sig.charAt(k)) { case ')': if (arraytype) { errMsg = "An array type signature is expected: \"[JavaTypeSignature\""; break scan; } return loccnt; case '[': arraytype = true; break; case 'B': case 'C': case 'F': case 'I': case 'S': case 'Z': loccnt++; arraytype = false; break; case 'D': case 'J': loccnt++; if (arraytype) { arraytype = false; } else { loccnt++; } break; case 'L': case 'Q': for (; ; k++) { if (k >= siglen) { errMsg = "ClassTypeSignature is not properly terminated: L{PackageSpecifier/}SimpleClassTypeSignature;"; break scan; } if (sig.charAt(k) == ';') { break; } } loccnt++; arraytype = false; break; default: errMsg = "Unknown token \"%s\" in \"({JavaTypeSignature})Result\"".formatted(sig.charAt(k)); break scan; } } } environment.warning(scanner.prevPos, "err.msig.malformed", k + 1, errMsg); return loccnt; } /** * Parse a method. */ private void parseMethod(int mod) throws SyntaxError, IOException { traceMethodInfoLn("Begin"); long scannerPosition = scanner.prevPos; // The start of the method ConstCell nameCell = parseName(); ConstValue_UTF8 strConst = (ConstValue_UTF8) nameCell.ref; String name = strConst.value; boolean is_clinit = name.equals(""); // TODO: not a good way to detect factories... boolean is_init = name.equals("") && !EModifier.isStatic(mod); // check access modifiers: Checker.checkMethodModifiers(classData, mod, scannerPosition, is_init, is_clinit); scanner.expect(Token.COLON); ConstCell typeCell = parseName(); int paramCount = countParams(typeCell); if ((!EModifier.isStatic(mod)) && !is_clinit) { paramCount++; } if (paramCount > 255) { environment.warning(scanner.pos, "warn.msig.more255", Integer.toString(paramCount)); } MethodData curMethod = (MethodData) classData.StartMethod(mod, nameCell, typeCell, null).addAnnotations(memberAnnotations); // Parse the optional attribute(s): signature // :SIGNATURE or :#d if (scanner.token == COLON) { scanner.scan(); if (!scanner.expectOneOfToken(CPINDEX, IDENT, STRINGVAL)) { environment.error(scanner.pos, "err.name.expected", "\"" + scanner.token.parseKey() + "\""); throw new SyntaxError(); } // Signature expected ConstCell signatureCell = parseName(); if (signatureCell != null) { curMethod.setSignatureAttr(signatureCell); } } boolean nextAttributeExpected = false, endClassExpected = false; if (scanner.token == SEMICOLON) { // probably method header is closed // public varargs abstract Method #5:#6:#15; endClassExpected = true; } // Parse the optional attribute(s): signature, exceptions, default annotation boolean parseNext = true; do { switch (scanner.token) { // Parse throws clause, it expected to be the last clause. case THROWS -> { if (curMethod.hasExceptions()) { environment.warning(scanner.pos, "warn.method_info.attribute.repeated", ATT_Exceptions.parseKey()); } nextAttributeExpected = false; ArrayList> exceptions = parseThrowsClause(curMethod.getExceptions()); curMethod.addExceptions(exceptions); if( scanner.token == SEMICOLON ) { parseNext = false; scanner.scan(); } else if( scanner.expectOneOfToken(STACK, LOCAL, LBRACE) ) { parseNext = false; } } // Parse default clause case DEFAULT -> { if (curMethod.getDefaultAnnotation() != null) { environment.throwErrorException(scanner.pos, "err.method_info.attribute.repeated", ATT_AnnotationDefault.parseKey()); } DefaultAnnotationAttr defAnnot = annotParser.parseDefaultAnnotation(); if (defAnnot != null) { curMethod.setDefaultAnnotation(defAnnot); } if (scanner.token == SEMICOLON) { endClassExpected = true; parseNext = false; } else if (scanner.expectOneOfToken(SIGNATURE, THROWS)) { continue; } scanner.scan(); } // parse signature case SIGNATURE -> { scanner.scan(); if (curMethod.getSignatureAttr() != null) { environment.warning(scanner.pos, "warn.method_info.attribute.repeated", ATT_Signature.parseKey()); } nextAttributeExpected = false; ConstCell signatureCell = parseName(); if (signatureCell != null) { curMethod.setSignatureAttr(signatureCell); } } case SEMICOLON -> { parseNext = false; scanner.scan(); } case COMMA -> { nextAttributeExpected = true; scanner.scan(); } default -> { if (nextAttributeExpected) { ArrayList expected = new ArrayList<>(); if (curMethod.getDefaultAnnotation() == null) { expected.add(DEFAULT); } if (!curMethod.hasExceptions()) { expected.add(THROWS); } if (curMethod.getSignatureAttr() == null) { expected.add(SIGNATURE); } if (expected.size() != 1) { environment.throwErrorException(scanner.prevPos, "err.one.of.N.token.expected", JasmTokens.asString(expected)); } else { environment.throwErrorException(scanner.prevPos, "err.token.expected", expected.get(0).parseKey()); } } parseNext = false; } } } while (parseNext); if (!endClassExpected) { Indexer max_stack = null, max_locals = null; do { if (scanner.token == STACK) { scanner.scan(); max_stack = parseUInt(2); } if (scanner.token == LOCAL) { scanner.scan(); max_locals = parseUInt(2); } if (scanner.token == INTVAL) { annotParser.parseParamAnnotation(paramCount, curMethod); } } while (scanner.token.in(STACK, LOCAL, INTVAL)); if (scanner.token == SEMICOLON) { if ((max_stack != null) || (max_locals != null)) { environment.error("err.token.expected", LBRACE.parseKey()); } scanner.scan(); } else if (!EModifier.isAbstract(mod)) { scanner.expect(LBRACE); curCodeAttr = curMethod.startCode(paramCount, max_stack, max_locals); parseCodeAttribute(); curCodeAttr.endCode(); scanner.expect(RBRACE); } else { // abstract method could have empty body {} and even not empty if (scanner.token == LBRACE) { scanner.scan(); curCodeAttr = curMethod.startCode(paramCount, max_stack, max_locals); parseCodeAttribute(); curCodeAttr.endCode(); scanner.expect(RBRACE); } } } classData.EndMethod(); traceMethodInfoLn("End of the method " + curMethod); } // end parseMethod private void parseCodeAttribute() throws IOException { while ((scanner.token != EOF) && (scanner.token != RBRACE)) { instrParser.parseInstr(); if (scanner.token == RBRACE) { break; } else if (scanner.token == LINETABLE_HEADER) { curCodeAttr.fillLineTable(attributeParser.parseLineTable()); continue; } else if (scanner.token == LOCALVARIABLES_HEADER) { curCodeAttr.fillLocalVariableTable(false, attributeParser.parseLocalVariableTable(false)); continue; } else if (scanner.token == LOCALVARIABLETYPES_HEADER) { curCodeAttr.fillLocalVariableTable(true, attributeParser.parseLocalVariableTable(true)); continue; } else if (scanner.token == ANNOTATION) { curCodeAttr.addAnnotations(annotParser.parseAnnotations()); continue; } else if (scanner.token == STACKMAP_HEADER) { curCodeAttr.fillStackMapTable(attributeParser.parseStackMap()); continue; } else if (scanner.token == STACKMAPTABLE_HEADER) { curCodeAttr.fillStackMapTable(attributeParser.parseStackMapTable()); continue; } scanner.expect(SEMICOLON); } } /** * @return list of the exception classes */ private ArrayList> parseThrowsClause(DataVectorAttr> exceptionList) { scanner.scan(); ArrayList> list = new ArrayList<>(); for (; ; ) { ConstCell exc = cpParser.parseConstRef(ConstType.CONSTANT_CLASS); if (exceptionList != null && exceptionList.contains(exc)) { environment.warning(scanner.pos, "warn.exc.repeated"); } list.add(exc); if (scanner.token == SEMICOLON) { break; } else if (scanner.token != COMMA) { break; } scanner.scan(); } return list; } /** * Parse a group of BootstrapMethod entries. *

* BootstrapMethods { * N: MethodHandle; * ( * Arguments: * (ARG,)* * ARG; * )? * } */ private void parseBootstrapMethodGroup() throws SyntaxError { scanner.scan(); scanner.expect(LBRACE); List expectedToken = List.of(INTVAL); int mhIndex = 0; ConstCell MHCell = null; ArrayList> bsm_args = new ArrayList<>(10); while (true) { switch (scanner.token) { case INTVAL -> { // 0: if (!expectedToken.contains(scanner.token)) { environment.throwErrorException(scanner.pos, "err.token.expected", INTVAL.parseKey()); } if (MHCell != null) { classData.addBootstrapMethod(new BootstrapMethodData(MHCell, bsm_args)); } scanner.expect(INTVAL); mhIndex = scanner.intValue; scanner.expect(COLON); MHCell = parseMHCell(); if (scanner.token == CPINDEX) { scanner.scan(); scanner.expect(SEMICOLON); } expectedToken = List.of(ARGUMENTS, INTVAL, RBRACE); } case ARGUMENTS -> { if (!expectedToken.contains(scanner.token)) { environment.throwErrorException(scanner.pos, "err.token.isnot.expected", ARGUMENTS.parseKey()); } scanner.scan(); scanner.expect(COLON); cpParser.incLBRACE(); // scan Bootstrap arguments bsm_args = new ArrayList<>(10); expectedToken = List.of(CPINDEX, IDENT, CLASS); while (true) { if (scanner.token.in(CPINDEX, IDENT, CLASS)) { if (!expectedToken.contains(scanner.token)) { environment.throwErrorException(scanner.pos, "err.bootstrap.arg.is.not.expected"); } bsm_args.add(cpParser.parseConstRef(null)); expectedToken = List.of(COMMA, SEMICOLON); } else if (scanner.token == COMMA) { if (!expectedToken.contains(scanner.token)) { environment.throwErrorException(scanner.pos, "err.token.isnot.expected", COMMA.parseKey()); } scanner.scan(); expectedToken = List.of(CPINDEX, IDENT); } else if (scanner.token == SEMICOLON) { if (!expectedToken.contains(scanner.token)) { environment.throwErrorException(scanner.pos, "err.token.isnot.expected", SEMICOLON.parseKey()); } cpParser.decLBRACE(); scanner.scan(); break; } else { if (bsm_args.isEmpty()) { environment.throwErrorException(scanner.pos, "err.bootstrap.arg.expected"); } else { String expectedTokens = expectedToken.stream().map(Token::printValue). collect(Collectors.joining(", ")); environment.throwErrorException(scanner.pos, "err.one.of.N.token.expected", expectedTokens); } } } classData.addBootstrapMethod(new BootstrapMethodData(MHCell, bsm_args)); MHCell = null; bsm_args = new ArrayList<>(10); expectedToken = List.of(INTVAL, RBRACE); } case RBRACE -> { if (!expectedToken.contains(scanner.token)) { environment.throwErrorException(scanner.pos, "err.token.expected", RBRACE.parseKey()); } if (MHCell != null) { classData.addBootstrapMethod(new BootstrapMethodData(MHCell, bsm_args)); } scanner.scan(); return; } default -> { String expectedTokens = expectedToken.stream().map(Token::printValue).collect(Collectors.joining(", ")); environment.throwErrorException(scanner.pos, (expectedToken.size() == 1) ? "err.token.expected" : "err.one.of.N.token.expected", expectedTokens); } } } } /** * Parse a BootstrapMethod entry individually. *

* Two formats are supported: * BootstrapMethod #METHODHANDLE (#ARG)*; * BootstrapMethod #MH; { (#ARG,)* (ARG)? } */ private void parseBootstrapMethod() throws SyntaxError { ArrayList> bsm_args = new ArrayList<>(256); ConstCell MHCell = parseMHCell(); if (scanner.token != LBRACE) { // in the case BootstrapMethod REF_invokeStatic:Phoo.phee:"()LBoo;"; { } don't skip LBRACE scanner.scan(); } if (scanner.token == SEMICOLON) { // BOOTSTRAPMETHOD MethodHandle; ({(ARG,)* ARG;]})? scanner.scan(); if (scanner.token == LBRACE) { scanner.scan(); cpParser.incLBRACE(); if (scanner.token == RBRACE) { // BSMethod doesn't have arguments. classData.addBootstrapMethod(new BootstrapMethodData(MHCell, List.of())); scanner.scan(); return; } // scan Bootstrap arguments while (true) { bsm_args.add(cpParser.parseConstRef(null)); if (scanner.token.in(COMMA, SEMICOLON)) { scanner.scan(); if (scanner.token == RBRACE) { cpParser.decLBRACE(); scanner.scan(); break; } } else if (scanner.token == RBRACE) { cpParser.decLBRACE(); scanner.scan(); break; } else { environment.throwErrorException(scanner.pos, "err.one.of.N.token.expected", "%s, %s, or %s".formatted(COMMA.printValue(), SEMICOLON.printValue(), RBRACE.printValue())); } } } // else BSMethod doesn't have arguments: BootstrapMethod #MH; classData.addBootstrapMethod(new BootstrapMethodData(MHCell, bsm_args)); } if (scanner.token == LBRACE) { scanner.scan(); cpParser.incLBRACE(); if (scanner.token == RBRACE) { // BSMethod doesn't have arguments. classData.addBootstrapMethod(new BootstrapMethodData(MHCell, List.of())); scanner.scan(); return; } // scan Bootstrap arguments while (true) { bsm_args.add(cpParser.parseConstRef(null)); if (scanner.token.in(COMMA, SEMICOLON)) { scanner.scan(); if (scanner.token == RBRACE) { cpParser.decLBRACE(); scanner.scan(); break; } } else if (scanner.token == RBRACE) { cpParser.decLBRACE(); scanner.scan(); break; } else { environment.throwErrorException(scanner.pos, "err.one.of.N.token.expected", "%s, %s, or %s".formatted(COMMA.printValue(), SEMICOLON.printValue(), RBRACE.printValue())); } } classData.addBootstrapMethod(new BootstrapMethodData(MHCell, bsm_args)); } else if (scanner.token == Token.CPINDEX) { // CPX can be a CPX to a MethodHandle constant // BootstrapMethod #MH #ARG1 #ARG2; int cpx = scanner.intValue; bsm_args.add(pool.getCell(cpx)); scanner.scan(); while (scanner.token != Token.SEMICOLON) { if (scanner.token == Token.CPINDEX) { bsm_args.add(pool.getCell(scanner.intValue)); } else { // throw error, bootstrap method is not recognizable environment.throwErrorException(scanner.pos, "invalid.bootstrapmethod"); } scanner.scan(); } classData.addBootstrapMethod(new BootstrapMethodData(MHCell, bsm_args)); } } private ConstCell parseMHCell() throws SyntaxError { ConstCell MHCell; if (scanner.token == CPINDEX) { // MethodHandle #CPX int cpx = scanner.intValue; MHCell = pool.getCell(cpx); } else { // MethodHandle [INVOKESUBTAG|INVOKESUBTAG_INDEX] : [METHODREF|INTERFACEMETHODREF] // INVOKESUBTAG : REF_INVOKEINTERFACE, REF_NEWINVOKESPECIAL, ... SubTag subTag = parser.parseSubtag(); scanner.expect(Token.COLON); if (scanner.token == Token.CPINDEX) { int cpx = scanner.intValue; MHCell = pool.getCell(cpx); scanner.scan(); } else { MHCell = parser.parseMethodHandle(subTag); } scanner.expect(SEMICOLON); } return MHCell; } /** * Parse the class Signature entry. */ private void parseClassSignature() throws SyntaxError { // Parses in the form: // SIGNATURE; // where // SIGNATURE = (CPINDEX | STRING) traceMethodInfoLn("Begin"); ConstCell signatureCell = parseName(); traceMethodInfoLn("Signature: " + signatureCell); classData.setSignatureAttr(signatureCell); } /** * Parse class reference used by statements: * this_class[:] (CPINDEX | STRING); * super_class[:] (CPINDEX | STRING); */ private void parseClassRef(Consumer> consumer) { traceMethodInfoLn("Begin"); if (scanner.token == COLON) { scanner.scan(); } ConstCell nm = cpParser.parseConstRef(ConstType.CONSTANT_CLASS, null, true); consumer.accept(nm); } private void parseSourceFile() throws SyntaxError { // Parses in the form: // SOURCEFILE (CPINDEX | IDENT); traceMethodInfoLn("Begin"); String cpSourceFile = null; if (pool.findUTF8Cell(EAttribute.ATT_SourceFile.parseKey()) != null) { String sourceName = environment.getSourceName(); ConstCell cell = pool.lookupUTF8Cell(name -> name.contains(sourceName) && StringUtils.contains.apply(name, List.of(".java", ".jcod", ".jasm", ".class"))); if (cell != null) { cpSourceFile = (String) cell.ref.value; } } ConstCell sourceFileCell = parseName(); if (sourceFileCell.ref == null && sourceFileCell.cpIndex != NotSet) { environment.error(scanner.prevPos, "err.wrong.sourcefile.ref"); throw new SyntaxError(); } traceMethodInfoLn("Source File: " + sourceFileCell); if (cpSourceFile != null && !cpSourceFile.equals(sourceFileCell.ref.value)) { // new file name that overwrites CP value. environment.warning(scanner.prevPos, "warn.extra.attribute", EAttribute.ATT_SourceFile.parseKey(), sourceFileCell.ref.value); } classData.setSourceFileAttr(sourceFileCell); } /** * Parse a SourceDebugExtension attribute */ private void parseSourceDebugExtension() throws SyntaxError { // Parses in the form: // SOURCEDEBUGEXTENSION { ("STRING"; | (0x?? )+; )+ } traceMethodInfoLn("Begin"); SourceDebugExtensionAttr sourceDebugExtensionAttr = classData.setSourceDebugExtensionAttr(); boolean prevSemicolonParsed = true; scanner.expect(LBRACE); while (true) { switch (scanner.token) { case INTVAL, BYTEVAL, SHORT -> { try { sourceDebugExtensionAttr.append(scanner.intValue); } catch (IllegalArgumentException ex) { environment.error(scanner.pos, "err.token.expected", STRINGVAL.parseKey()); throw new SyntaxError(); } // SEMICOLON ignored if list of bytes prevSemicolonParsed = false; } case STRINGVAL -> { if (!prevSemicolonParsed) { environment.error(scanner.pos, "err.token.expected", SEMICOLON.parseKey()); throw new SyntaxError(); } try { sourceDebugExtensionAttr.append(scanner.stringValue); } catch (IllegalArgumentException ex) { environment.error(scanner.pos, "err.token.expected", BYTEVAL.parseKey()); throw new SyntaxError(); } prevSemicolonParsed = false; } case SEMICOLON -> { if (prevSemicolonParsed) { environment.error(scanner.pos, "err.token.expected", (sourceDebugExtensionAttr.type == SourceDebugExtensionAttr.Type.BYTE) ? BYTEVAL.parseKey() : STRINGVAL.parseKey()); throw new SyntaxError(); } prevSemicolonParsed = true; } case RBRACE -> { if (!prevSemicolonParsed) { environment.error(scanner.pos, "err.token.expected", SEMICOLON.parseKey()); throw new SyntaxError(); } if (sourceDebugExtensionAttr.isEmpty()) { environment.warning(scanner.pos, "warn.empty.debug.extension"); } scanner.scan(); return; } default -> { if (prevSemicolonParsed) { environment.error(scanner.pos, "err.one.of.two.token.expected", STRINGVAL.parseKey(), RBRACE.parseKey()); } else { environment.error(scanner.pos, "err.token.expected", SEMICOLON.parseKey()); } throw new SyntaxError(); } } // next line scanner.scan(); } } /** * Parse a NestHost entry */ private void parseNestHost() throws SyntaxError { // Parses in the form: // NESTHOST IDENT; traceMethodInfoLn("Begin"); ConstCell cell = parseConstantClassInfo(true); if (!cell.getType().oneOf(ConstType.CONSTANT_UTF8, ConstType.CONSTANT_CLASS)) { throwSyntaxError("err.class.name.expected"); } classData.addNestHost(cell); traceMethodInfoLn("NestHost: class " + cell); scanner.expect(SEMICOLON); } /** * Parse a list of classes belonging to the [NestMembers | PermittedSubclasses] entry */ private void parseClasses(Consumer> classesConsumer) throws SyntaxError { ArrayList classes = new ArrayList<>(); // Parses in the form: // (NESTMEMBERS|PERMITTEDSUBCLASSES)? IDENT(, IDENT)*; traceMethodInfoLn("Begin"); while (true) { ConstCell cell = parseConstantClassInfo(true); if (!cell.getType().oneOf(ConstType.CONSTANT_UTF8, ConstType.CONSTANT_CLASS)) { throwSyntaxError("err.class.name.expected"); } classes.add(cell); traceMethodInfoLn("Added cell: " + cell); if (scanner.token != COMMA) { scanner.expect(SEMICOLON); classesConsumer.accept(classes); return; } scanner.scan(); } } /** * Valhalla specific * Parse a list of Utf-8 belonging to the [LoadableDescriptors] entry */ private void parseUtf8List(Consumer> utf8Consumer) throws SyntaxError { ArrayList utf8List = new ArrayList<>(); // Parses in the form: // (LOADABLEDESCRIPTORS)? IDENT(, IDENT)*; traceMethodInfoLn("Begin"); while (true) { ConstCell cell = parseName(); if (!cell.getType().equals(ConstType.CONSTANT_UTF8)) { throwSyntaxError("err.field.descriptor.expected"); } utf8List.add(cell); traceMethodInfoLn("Added cell: " + cell); if (scanner.token != COMMA) { scanner.expect(SEMICOLON); utf8Consumer.accept(utf8List); return; } scanner.scan(); } } private void parseEnclosingMethod() { // Parse in the form: // ENCLOSINGMETHOD (CPINDEX | CLASS_NAME)(: CPINDEX | METHOD_NAME:"METHOD_SIGNATURE"); traceMethodInfoLn("Begin"); ConstCell classCell = cpParser.parseConstRef(ConstType.CONSTANT_CLASS, null, true); if (scanner.token == SEMICOLON) { //If the current class is not immediately enclosed by a method or constructor, // then the value of the method_index item must be zero. classData.addEnclosingMethod(classCell, null); return; } scanner.expect(COLON); ConstCell methodCell = null; if (scanner.token.in(CPINDEX, INTVAL)) { int methodCPIdx = scanner.intValue; if (methodCPIdx != 0) { methodCell = pool.getCell(methodCPIdx); } scanner.scan(); } else { methodCell = pool.findCell(cpParser.parseConstValue(ConstType.CONSTANT_NAMEANDTYPE)); } classData.addEnclosingMethod(classCell, methodCell); } // Parse the Record entry private void parseRecord() throws SyntaxError { // Parses in the form: // RECORD { (COMPONENT)+ } // where // COMPONENT Component (ANNOTATION)* NAME:DESCRIPTOR(:SIGNATURE)? (,|;) // NAME = (CPINDEX | IDENT) // DESCRIPTOR = (CPINDEX | STRING) // SIGNATURE = (CPINDEX | STRING) traceMethodInfoLn("Begin"); scanner.expect(LBRACE); RecordData rd = classData.setRecord(scanner.pos); while (true) { if (scanner.token == RBRACE) { if (rd.isEmpty()) { environment.warning(scanner.pos, "warn.no.components.in.record.attribute"); classData.rejectRecord(); } scanner.scan(); break; } ConstCell nameCell, descCell, signatureCell = null; ArrayList componentAnnotations = null; if (scanner.token == ANNOTATION) { componentAnnotations = annotParser.parseAnnotations(); } scanner.expect(COMPONENT); nameCell = parseName(); scanner.expect(COLON); descCell = parseName(); switch (scanner.token) { case COMMA, SEMICOLON -> { // end of the component scanner.scan(); if (scanner.token == SIGNATURE) { scanner.scan(); signatureCell = parseName(); } else { rd.addComponent(nameCell, descCell, signatureCell, componentAnnotations); continue; } } case COLON -> { // Parse the optional attribute: signature scanner.scan(); if (scanner.token == SIGNATURE) { scanner.scan(); } signatureCell = parseName(); } } rd.addComponent(nameCell, descCell, signatureCell, componentAnnotations); if (!scanner.token.in(COMMA, SEMICOLON)) { environment.throwErrorException(scanner.pos, "err.one.of.two.token.expected", "<" + SEMICOLON.printValue() + ">", "<" + COMMA.printValue() + ">"); } // next component scanner.scan(); } // end while traceMethodInfoLn("End"); } /** * Parse a group of InnerClasses. * * @param mod inner_class_access_flags is ignored for a group of inner classes. */ private void parseInnerClassGroup(int mod) throws SyntaxError, IOException { // Parses in the form: // INNERCLASSES { (INNER_CLASS)+ } // INNER_CLASS = MODIFIERS (INNERCLASSNAME =)? (INNERCLASS) (OF OUTERCLASS)? [;|,] // } // where // INNERCLASSNAME = (IDENT | CPX_IN-CL-NM) // INNERCLASS = (CLASS IDENT | CPX_IN-CL) (S2) // OUTERCLASS = (CLASS IDENT | CPX_OT-CL) (S3) // // Note: // If a class reference cannot be identified using IDENT, CPX indexes must be used. traceMethodInfoLn("Begin"); if (mod != 0) { environment.warning(scanner.pos, "warn.invalid.modifier.innerclasses"); } scanner.expect(LBRACE); while (true) { if (scanner.token == RBRACE) { if (classData.innerClasses == null || classData.innerClasses.isEmpty()) { environment.warning(scanner.pos, "warn.no.classes.in.innnerclasses"); } scanner.scan(); break; } parseInnerClass(0); if (!scanner.token.in(COMMA, SEMICOLON)) { environment.throwErrorException(scanner.pos, "err.one.of.two.token.expected", "<" + SEMICOLON.printValue() + ">", "<" + COMMA.printValue() + ">"); } scanner.scan(); } traceMethodInfoLn("End"); } /** * Parse an inner class. * * @param mod inner_class_access_flags */ private void parseInnerClass(int mod) throws SyntaxError, IOException { // Parses in the form: // MODIFIERS (INNERCLASSNAME =)? (INNERCLASS) (OF OUTERCLASS)? ; // // where // INNERCLASSNAME = (IDENT | CPX_IN-CL-NM) // INNERCLASS = (CLASS IDENT | CPX_IN-CL) (S2) // OUTERCLASS = (CLASS IDENT | CPX_OT-CL) (S3) // // Note: // If a class reference cannot be identified using IDENT, CPX indexes must be used. // check access modifiers: traceMethodInfoLn("Begin"); Checker.checkInnerClassModifiers(classData, mod, scanner.pos); // possible case "MODIFIERS InnerClass MODIFIERS (INNERCLASSNAME =)? (INNERCLASS) (OF OUTERCLASS)? ;" int inlineMod = scanModifiers(); if (mod != 0 && inlineMod != 0) { environment.warning(scanner.pos, "warn.both.modifiers.apply", EModifier.asKeywords(mod | inlineMod, ClassFileContext.INNER_CLASS).strip()); } mod |= inlineMod; ConstCell nameCell, innerClass = null, outerClass = null; if (scanner.token == CLASS) { nameCell = pool.getCell(0); // no NameIndex parseInnerClass_s2(mod, nameCell, innerClass, outerClass); } else { if (scanner.token == IDENT && scanner.checkTokenIdent()) { // Got a Class Name nameCell = parseName(); parseInnerClass_s1(mod, nameCell, innerClass, outerClass); } else if (scanner.token == CPINDEX) { // CPX can be either a CPX to an InnerClassName, // or a CPX to an InnerClassInfo int cpx = scanner.intValue; nameCell = pool.getCell(cpx); ConstValue nameCellValue = nameCell.ref; if (nameCellValue instanceof ConstValue_UTF8) { // got a name cell scanner.scan(); parseInnerClass_s1(mod, nameCell, innerClass, outerClass); } else { // got a CPRef cell nameCell = pool.getCell(0); // no NameIndex parseInnerClass_s2(mod, nameCell, innerClass, outerClass); } } else if (scanner.token.isPossibleJasmIdentifier()) { // The name InnerClass of the inner class is allowed. nameCell = pool.findUTF8Cell(scanner.token.parseKey()); scanner.scan(); parseInnerClass_s1(mod, nameCell, innerClass, outerClass); } else { pic_error(); } } traceMethodInfoLn("End"); } private void parseInnerClass_s1(int mod, ConstCell nameCell, ConstCell innerClass, ConstCell outerClass) throws IOException { // the next scanner.token must be '=' if (scanner.token == ASSIGN) { scanner.scan(); parseInnerClass_s2(mod, nameCell, innerClass, outerClass); } else { pic_error(); } } private void parseInnerClass_s2(int mod, ConstCell nameCell, ConstCell innerClass, ConstCell outerClass) throws IOException { // scanner.token is either "CLASS IDENT" or "CPX_Class" if ((scanner.token == CPINDEX) || (scanner.token == CLASS)) { if (scanner.token == CPINDEX) { innerClass = cpParser.parseConstRef(ConstType.CONSTANT_CLASS); } if (scanner.token == CLASS) { // next symbol needs to be InnerClass scanner.scan(); // innerClass = cpParser.parseConstRef(ConstType.CONSTANT_CLASS); ignore keywords as much as possible: // private static InnerClass Module = class NormalModule$Module of class NormalModule; innerClass = cpParser.parseConstRef(ConstType.CONSTANT_CLASS, null, true); } // See if declaration is terminated if (scanner.token == SEMICOLON) { // InnerClass is complete, no OUTERINFO; outerClass = pool.getCell(0); pic_tracecreate(mod, nameCell, innerClass, outerClass); classData.addInnerClass(mod, nameCell, innerClass, outerClass); } else if (scanner.token == OF) { // got an outer class reference parseInnerClass_s3(mod, nameCell, innerClass, outerClass); } else { pic_error(); } } else { pic_error(); } } private void parseInnerClass_s3(int mod, ConstCell nameCell, ConstCell innerClass, ConstCell outerClass) throws IOException { scanner.scan(); if ((scanner.token == CLASS) || (scanner.token == CPINDEX)) { if (scanner.token == CLASS) { // next symbol needs to be InnerClass scanner.scan(); // outerClass = cpParser.parseConstRef(ConstType.CONSTANT_CLASS); ignore keywords as much as possible: // private static InnerClass NormalModule = class Module$NormalModule of class Module; outerClass = cpParser.parseConstRef(ConstType.CONSTANT_CLASS, null, true); } if (scanner.token == CPINDEX) { outerClass = cpParser.parseConstRef(ConstType.CONSTANT_CLASS); } if (scanner.token == SEMICOLON) { pic_tracecreate(mod, nameCell, innerClass, outerClass); classData.addInnerClass(mod, nameCell, innerClass, outerClass); } else { pic_error(); } } else { pic_error(); } } private void pic_tracecreate(int mod, ConstCell nameCell, ConstCell innerClass, ConstCell outerClass) { // throw error, IC is not recognizable traceMethodInfoLn("Creating InnerClass:"); environment.trace("[" + EModifier.asNames(mod, ClassFileContext.INNER_CLASS) + "], "); if (nameCell != pool.getCell(0)) { ConstValue value = nameCell.ref; if (value != null) { environment.trace(value + " =\n\t\t"); } } ConstValue_Cell ici_val = (ConstValue_Cell) innerClass.ref; ConstCell ici_ascii = ici_val.value; // Constant pool may not be numberized yet. // // check values before dereference on a trace. if (ici_ascii.ref == null) { environment.trace("<#cpx-unresolved> "); } else { if (ici_ascii.ref.value == null) { environment.trace("<#cpx-0> "); } else { environment.trace(ici_ascii.ref.value + " "); } } if (outerClass != pool.getCell(0)) { if (outerClass.cpIndex != 0) { ConstValue_Cell oci_val = (ConstValue_Cell) outerClass.ref; ConstCell oci_ascii = oci_val.value; if (oci_ascii.ref == null) { environment.trace("\n\t\tof <#cpx-unresolved> "); } else { ConstValue_UTF8 cval = (ConstValue_UTF8) oci_ascii.ref; if (cval.value == null) { environment.trace("\n\t\tof <#cpx-0> "); } else { environment.trace("\n\t\tof " + cval.value); } } } } environment.trace("\n"); } private void pic_error() { // throw error, IC is not recognizable environment.error(scanner.pos, "err.invalid.innerclass"); throw new SyntaxError(); } /** * The match() method is used to quickly match opening * brackets (ie: '(', '{', or '[') with their closing * counterpart. This is useful during error recovery.

*

* Scan to a matching '}', ']' or ')'. The current scanner.token must be * a '{', '[' or '('; */ private void match(Token open, Token close) { int depth = 1; while (true) { scanner.scan(); if (scanner.token == open) { depth++; } else if (scanner.token == close) { if (--depth == 0) { return; } } else if (scanner.token == EOF) { environment.error(scanner.pos, "err.unbalanced.paren"); return; } } } /** * Recover after a syntax error in a field. This involves * discarding scanner.tokens until an EOF or a possible legal * continuation is encountered. */ private void recoverField() throws SyntaxError { while (true) { switch (scanner.token) { case EOF: case STATIC: case FINAL: case PUBLIC: case PRIVATE: case SYNCHRONIZED: case TRANSIENT: case PROTECTED: case VOLATILE: case NATIVE: // case INTERFACE: see below case ABSTRACT: case ANNOTATION_ACCESS: // possible begin of a field, continue return; case LBRACE: match(LBRACE, RBRACE); scanner.scan(); break; case LPAREN: match(LPAREN, RPAREN); scanner.scan(); break; case LSQBRACKET: match(LSQBRACKET, RSQBRACKET); scanner.scan(); break; case RBRACE: case INTERFACE: case CLASS: case IMPORT: case PACKAGE: // begin of something outside a class, panic more endClass(); traceMethodInfoLn("scanner position %d".formatted(scanner.pos)); throw new SyntaxError().setFatal(); default: // don't know what to do, skip scanner.scan(); break; } } } /** * Parse a class or interface declaration. */ private void parseClass(int mod) throws IOException { long posa = scanner.pos; traceMethodInfoLn("Begin"); // check access modifiers: Checker.checkClassModifiers(mod, scanner); if (classAnnotations != null) { classData.addAnnotations(classAnnotations); } // move the tokenizer to the identifier: if (scanner.token == CLASS) { scanner.scan(); } else if (scanner.token == ANNOTATION) { scanner.scan(); if (scanner.token == INTERFACE) { mod |= ACC_ANNOTATION.getFlag() | ACC_INTERFACE.getFlag(); scanner.scan(); } else { environment.error(scanner.prevPos, "err.one.of.two.token.expected", ANNOTATION.parseKey(), INTERFACE.parseKey()); throw new SyntaxError(); } } // Parse the class name ConstCell nm = cpParser.parseConstRef(ConstType.CONSTANT_CLASS, null, true); if (scanner.token == FIELD) { // DOT String fileExtension; scanner.scan(); switch (scanner.token) { // CLASS token added to allow: // class ClassName.class version 45:0 {..} case STRINGVAL, CLASS -> fileExtension = scanner.stringValue; case IDENT -> fileExtension = scanner.idValue; default -> { environment.error(scanner.pos, "err.name.expected", "\"" + scanner.token.parseKey() + "\""); throw new SyntaxError(); } } scanner.scan(); classData.fileExtension = "." + fileExtension; } else if (scanner.token == MODULE) { environment.error(scanner.prevPos, "err.token.expected", "\"" + OPEN.parseKey() + "\""); throw new SyntaxError(); } else if (scanner.token == SEMICOLON) { // drop the semicolon following a name scanner.scan(); } else if (scanner.token == COLON) { // parse optional attribute Signature scanner.scan(); parseClassSignature(); } // Parse extends clause ConstCell sup = null; if (scanner.token == EXTENDS) { scanner.scan(); // sup = cpParser.parseConstRef(ConstType.CONSTANT_CLASS); ignore keywords as much as possible: // class Module$NormalModule extends Module version 63:0 sup = cpParser.parseConstRef(ConstType.CONSTANT_CLASS, null, true); while (scanner.token == COMMA) { scanner.scan(); environment.warning(posa, "warn.multiple.inherit"); // sup = cpParser.parseConstRef(ConstType.CONSTANT_CLASS); ignore keywords as much as possible: // class Module$NormalModule extends Module version 63:0 sup = cpParser.parseConstRef(ConstType.CONSTANT_CLASS, null, true); } } // Parse implements clause ArrayList impl = new ArrayList<>(); if (scanner.token == IMPLEMENTS) { do { scanner.scan(); // Indexer intf = cpParser.parseConstRef(ConstType.CONSTANT_CLASS); ignore keywords as much as possible: // public interface AddressField implements Field version 63:0 Indexer intf = cpParser.parseConstRef(ConstType.CONSTANT_CLASS, null, true); if (impl.contains(intf)) { environment.warning(posa, "warn.intf.repeated", intf); } else { impl.add(intf); } } while (scanner.token == COMMA); } // parse version if (scanner.token == LBRACE) { // no version info in the source if (!classData.cfv.isSet() && !classData.cfv.isSetByParameter()) { // the version isn't set by params classData.cfv.initClassDefaultVersion(); environment.warning(scanner.prevPos, "warn.default.cfv", classData.cfv.asString()); } } else { if (classData.cfv.isSet() && classData.cfv.isSetByParameter() && classData.cfv.isFrozen()) { int minor = classData.cfv.minor_version(); int major = classData.cfv.major_version(); String version = classData.cfv.asString(); String option = classData.cfv.isThresholdSet() ? classData.cfv.asThresholdString() : classData.cfv.asString(); Pair ver = parseVersion(); if (classData.cfv.isSetByParameter() && (ver.first != major || ver.second != minor)) environment.warning(scanner.prevPos, "warn.isset.cfv", version, option); } else { parseVersion(); if (EModifier.GlobalContext() == ClassFileContext.VALUE_OBJECTS && !classData.cfv.isValueObjectContext()) { environment.warning(scanner.prevPos, "warn.value.object.defined", classData.cfv.asString(), CFVersion.ValueObjectsVersion().asString()); } } } scanner.expect(LBRACE); // Begin a new class classData.init(mod, nm, sup, impl); // Parse class members while ((scanner.token != EOF) && (scanner.token != RBRACE)) { switch (scanner.token) { case SEMICOLON -> // Empty fields are allowed scanner.scan(); case CONST -> { scanner.scan(); parseConstDef(); explicitCP = true; } default -> // scanner.token is some member. parseClassMembers(); } } scanner.expect(RBRACE); endClass(); } // end parseClass /** * Parses a package or type name in a module statement(s) * * @return Pair Either Package/Type name or CP Index for this Package/Type name. */ private NameInfo parseTypeName() { String name = "", field = ""; int cpIndex = 0; if (scanner.token == IDENT) { while (true) { if (scanner.token.isPossibleClassName()) { name = name + field + scanner.idValue; scanner.scan(); } else { environment.error(scanner.pos, "err.name.expected", "\"" + scanner.token.parseKey() + "\""); throw new SyntaxError(); } if (scanner.token == FIELD) { environment.warning(scanner.pos, "warn.dot.will.be.converted"); field = "/"; scanner.scan(); } else { break; } } } else if (scanner.token == CPINDEX) { cpIndex = scanner.intValue; scanner.scan(); } return new NameInfo(cpIndex, name); } /** * Parses a module name in a module statement(s) * * @return Pair Either Module name or CP Index for the module name. */ private NameInfo parseModuleName() { String field = ""; NameInfo nameInfo = new NameInfo(); if (scanner.token == IDENT) { while (true) { if (scanner.token.isPossibleModuleName()) { nameInfo.setName(nameInfo.name() + field + scanner.idValue); scanner.scanModuleStatement(); } else { environment.error(scanner.pos, "err.module.name.expected", "\"" + scanner.token.parseKey() + "\""); throw new SyntaxError().setFatal(); } if (scanner.token == FIELD) { field = Character.toString((char) scanner.token.value()); scanner.scanModuleStatement(); } else { break; } } } else if (scanner.token == CPINDEX) { nameInfo.setCpIndex(scanner.intValue); scanner.scan(); } else { environment.error(scanner.pos, "err.module.name.expected", "\"" + scanner.token.parseKey() + "\""); throw new SyntaxError().setFatal(); } return nameInfo; } /** * Parse a module declaration. */ private void parseModule(int mod) throws IOException { traceMethodInfoLn("Begin"); if (mod != 0) { environment.warning(scanner.pos, "warn.modifiers.ignored", EModifier.asNames(mod, ClassFileContext.MODULE)); } if (classAnnotations != null) { classData.addAnnotations(classAnnotations); } moduleAttribute = new ModuleAttr(classData); if (scanner.token == OPEN) { moduleAttribute.openModule(); scanner.scan(); } // move the tokenizer to the identifier: if (scanner.token == MODULE) { scanner.scanModuleStatement(); // scanner.scan(); } else { environment.error(scanner.pos, "err.token.expected", MODULE.parseKey()); throw new SyntaxError().setFatal(); } // Parse the module name NameInfo moduleNameInfo = parseModuleName(); if (moduleNameInfo.isEmpty()) { environment.error(scanner.pos, "err.name.expected", "\"" + scanner.token + "\""); throw new SyntaxError().setFatal(); } if (moduleNameInfo.cpIndex() != 0) { moduleAttribute.setModuleNameCpIndex(moduleNameInfo.cpIndex()); } else { moduleAttribute.setModuleName(moduleNameInfo.name()); } // parse version if (scanner.token == LBRACE) { classData.cfv.initModuleDefaultVersion(); environment.warning(scanner.pos, "warn.default.cfv", classData.cfv.asString()); } else { parseVersion(); } scanner.expect(LBRACE); // Begin a new class as module classData.initAsModule(); // Parse module statement(s) while ((scanner.token != EOF) && (scanner.token != RBRACE)) { switch (scanner.token) { case CONST -> { // Parse constant declarations scanner.scan(); parseConstDef(); explicitCP = true; } case REQUIRES -> scanRequires(moduleAttribute.requires); case EXPORTS -> scanStatement(moduleAttribute.exports, this::parseTypeName, this::parseModuleName, TO, true, "err.exports.expected"); case OPENS -> scanStatement(moduleAttribute.opens, this::parseTypeName, this::parseModuleName, TO, true, "err.opens.expected"); case PROVIDES -> scanStatement(moduleAttribute.provides, this::parseTypeName, this::parseTypeName, WITH, false, "err.provides.expected"); case USES -> scanStatement(moduleAttribute.uses, "err.uses.expected"); case SEMICOLON -> // Empty fields are allowed scanner.scan(); default -> { environment.error(scanner.pos, "err.module.statement.expected"); throw new SyntaxError().setFatal(); } } // end switch } // while scanner.expect(RBRACE); // End of the module endModule(); } // end parseModule /** * Scans ModuleStatement: requires [transitive|static|mandated|synthetic] ModuleName ; * Scans ModuleStatement: requires [transitive|static|mandated|synthetic] #ref ; */ private void scanRequires(Consumer action) { int flags = 0; NameInfo moduleNameInfo = new NameInfo(); scanner.scanModuleStatement(); while (scanner.token != SEMICOLON) { switch (scanner.token) { case STATIC -> { if (EModifier.isStaticPhase(flags) || !moduleNameInfo.isEmpty()) { environment.error(scanner.pos, "err.requires.expected"); throw new SyntaxError().setFatal(); } flags |= EModifier.ACC_STATIC_PHASE.getFlag(); } case TRANSITIVE -> { if (EModifier.isTransitive(flags) || !moduleNameInfo.isEmpty()) { environment.error(scanner.pos, "err.requires.expected"); throw new SyntaxError().setFatal(); } flags |= EModifier.ACC_TRANSITIVE.getFlag(); } case SYNTHETIC -> { if (EModifier.isSynthetic(flags) || !moduleNameInfo.isEmpty()) { environment.error(scanner.pos, "err.requires.expected"); throw new SyntaxError().setFatal(); } flags |= EModifier.ACC_SYNTHETIC.getFlag(); } case MANDATED -> { if (EModifier.isMandated(flags) || !moduleNameInfo.isEmpty()) { environment.error(scanner.pos, "err.requires.expected"); throw new SyntaxError().setFatal(); } flags |= EModifier.ACC_MANDATED.getFlag(); } case IDENT, CPINDEX -> { if (!moduleNameInfo.isEmpty()) { environment.error(scanner.pos, "err.requires.expected"); throw new SyntaxError().setFatal(); } moduleNameInfo = parseModuleName(); continue; } default -> { environment.error(scanner.pos, "err.requires.expected"); throw new SyntaxError().setFatal(); } } scanner.scanModuleStatement(); } // SEMICOLON if (moduleNameInfo.isEmpty()) { environment.error(scanner.pos, "err.requires.expected"); throw new SyntaxError().setFatal(); } action.accept(new ModuleContent.Dependence(moduleNameInfo.cpIndex(), moduleNameInfo.name(), flags, null)); scanner.scanModuleStatement(); } /** * Scans Module Statement(s): * exports [mandated|synthetic] packageName [to ModuleName {, ModuleName}*] ; * opens [mandated|synthetic] packageName [to ModuleName {, ModuleName}*] ; * provides TypeName with TypeName {,typeName} ; */ private void scanStatement( BiConsumer> action, NameSupplier source, NameSupplier target, Token startList, boolean emptyListAllowed, String err) throws IOException { boolean isProvidesStatement = (startList == WITH); int flags = 0; // [mandated|synthetic] NameInfo typeNameInfo = new NameInfo(); HashSet nameInfos = new HashSet<>(); // to ModuleName {, ModuleName}* Or with TypeName {,typeName}* scanner.scan(); while (scanner.token != SEMICOLON) { switch (scanner.token) { case SYNTHETIC -> { if (EModifier.isSynthetic(flags) || !typeNameInfo.isEmpty() || isProvidesStatement) { environment.error(scanner.pos, err); throw new SyntaxError().setFatal(); } flags |= EModifier.ACC_SYNTHETIC.getFlag(); } case MANDATED -> { if (EModifier.isMandated(flags) || !typeNameInfo.isEmpty() || isProvidesStatement) { environment.error(scanner.pos, err); throw new SyntaxError().setFatal(); } flags |= EModifier.ACC_MANDATED.getFlag(); } case IDENT, CPINDEX -> { if (!typeNameInfo.isEmpty()) { environment.error(scanner.pos, err); throw new SyntaxError().setFatal(); } typeNameInfo = source.get(); continue; } case TO, WITH -> { // to[with] nameInfos = scanList(isProvidesStatement ? () -> scanner.scan() : () -> scanner.scanModuleStatement(), target, err, false); continue; } default -> { environment.error(scanner.pos, err); throw new SyntaxError().setFatal(); } } if (isProvidesStatement) scanner.scan(); else scanner.scanModuleStatement(); } // SEMICOLON if (typeNameInfo.isEmpty() || (nameInfos.isEmpty() && !emptyListAllowed)) { environment.error(scanner.pos, err); throw new SyntaxError().setFatal(); } if (isProvidesStatement) { // provides with Class(es) Set classes = nameInfos.stream(). map(nameInfo -> new ModuleContent.TargetType(CONSTANT_CLASS, nameInfo.cpIndex(), nameInfo.name())). collect(Collectors.toSet()); action.accept( (T) (new ModuleContent.FlaggedTargetType(CONSTANT_CLASS, typeNameInfo.cpIndex(), typeNameInfo.name(), flags, ClassFileContext.MODULE)), classes); } else { // Package to Module(s) Set modules = nameInfos.stream(). map(nameInfo -> new ModuleContent.TargetType(CONSTANT_MODULE, nameInfo.cpIndex(), nameInfo.name())). collect(Collectors.toSet()); action.accept( (T) (new ModuleContent.FlaggedTargetType(CONSTANT_PACKAGE, typeNameInfo.cpIndex(), typeNameInfo.name(), flags, ClassFileContext.MODULE)), modules); } scanner.scan(); } /** * Scans ModuleStatement: uses TypeName; */ private void scanStatement(Consumer action, String err) throws IOException { HashSet nameInfos = scanList(() -> scanner.scan(), this::parseTypeName, err, true); // SEMICOLON if (nameInfos.size() != 1) { environment.error(scanner.pos, err); throw new SyntaxError().setFatal(); } nameInfos. forEach(nameInfo -> action.accept(new ModuleContent.TargetType(CONSTANT_CLASS, nameInfo.cpIndex(), nameInfo.name()))); scanner.scan(); } /** * Scans the "to" or "with" part of the following ModuleStatement: * exports PackageName [to ModuleName {, ModuleName}] ;, * opens PackageName [to ModuleName {, ModuleName}] ; * provides TypeName with TypeName [,typeName] ; * uses TypeName; *

* : [ModuleName {, ModuleName}]; , [TypeName [,typeName]]; or TypeName; */ private HashSet scanList(Method scanMethod, NameSupplier target, String err, boolean onlyOneElement) throws IOException { HashSet nameInfos = new HashSet<>(); boolean comma = false, first = true; scanMethod.call(); while (scanner.token != SEMICOLON) { switch (scanner.token) { case COMMA -> { if (comma || first || onlyOneElement) { environment.error(scanner.pos, err); throw new SyntaxError().setFatal(); } comma = true; } case IDENT, CPINDEX -> { if (!first && !comma) { environment.error(scanner.pos, err); throw new SyntaxError().setFatal(); } nameInfos.add(target.get()); comma = false; first = false; continue; } default -> { environment.error(scanner.pos, err); throw new SyntaxError().setFatal(); } } scanner.scan(); } // SEMICOLON if (nameInfos.isEmpty() || comma) { environment.error(scanner.pos, err); throw new SyntaxError().setFatal(); } return nameInfos; } private void parseClassMembers() throws IOException { traceMethodInfoLn("Begin"); boolean bothFound = false; // Parse annotations if (scanner.token == ANNOTATION) { memberAnnotations = annotParser.parseAnnotations(); } // Parse modifiers int mod = scanModifiers(); try { switch (scanner.token) { case FIELDREF -> { scanner.scan(); parseField(mod); } case METHODREF -> { scanner.scan(); parseMethod(mod); } case INNERCLASS -> { scanner.scan(); if (scanner.stringValue.equals(INNERCLASS.alias())) { // Parse a group of InnerClasses {....} parseInnerClassGroup(mod); } else { // Parse an InnerClass individually. parseInnerClass(mod); } } case BOOTSTRAPMETHOD -> { if (scanner.stringValue.equals(BOOTSTRAPMETHOD.alias())) { // Parse a group of BootstrapMethods {....} parseBootstrapMethodGroup(); } else { scanner.scan(); // Parse a BootstrapMethod individually. parseBootstrapMethod(); } } case SIGNATURE -> { scanner.scan(); classData.setSignatureAttr(parseName(), scanner.pos); scanner.expect(SEMICOLON); } case THIS_CLASS -> { scanner.scan(); parseClassRef(constCell -> classData.coreClasses.this_class(CLASSFILE, constCell)); scanner.expect(SEMICOLON); } case SUPER_CLASS -> { scanner.scan(); parseClassRef(constCell -> classData.coreClasses.super_class(CLASSFILE, constCell)); scanner.expect(SEMICOLON); } // case SOURCEFILE -> { classData.checkExistence(ATT_SourceFile, scanner.pos); scanner.scan(); parseSourceFile(); scanner.expect(SEMICOLON); } case SOURCEDEBUGEXTENSION -> { classData.checkExistence(ATT_SourceDebugExtension, scanner.pos); scanner.scan(); parseSourceDebugExtension(); } case NESTHOST -> { classData.checkExistence(ATT_NestHost, scanner.pos). checkExistence(ATT_NestMembers, () -> environment.warning(scanner.pos, "err.both.nesthost.nestmembers.found")); scanner.scan(); parseNestHost(); } case NESTMEMBERS -> { classData.checkExistence(ATT_NestMembers, scanner.pos). checkExistence(ATT_NestHost, () -> environment.warning(scanner.pos, "err.both.nesthost.nestmembers.found")); scanner.scan(); parseClasses(list -> classData.addNestMembers(list)); } case PERMITTEDSUBCLASSES -> { // JEP 360 classData.checkExistence(ATT_PermittedSubclasses, scanner.pos); scanner.scan(); parseClasses(list -> classData.addPermittedSubclasses(list)); } case RECORD -> { // JEP 359 classData.checkExistence(ATT_Record, scanner.pos); scanner.scan(); parseRecord(); } case LOADABLEDESCRIPTORS -> { classData.checkExistence(ATT_LoadableDescriptors, scanner.pos); scanner.scan(); parseUtf8List(list -> classData.addLoadableDescriptors(list)); } case ENCLOSINGMETHOD -> { classData.checkExistence(ATT_EnclosingMethod, scanner.pos); scanner.scan(); parseEnclosingMethod(); } default -> { environment.error(scanner.pos, "err.field.expected"); throw new SyntaxError().setFatal(); } } // end switch } catch (SyntaxError e) { if (!e.isFatal()) { recoverField(); } else { throw new SyntaxError().setFatal(); } } traceMethodInfoLn("End"); memberAnnotations = null; } /** * Recover after a syntax error in the file. * This involves discarding scanner.tokens until an EOF * or a possible legal continuation is encountered. */ private void recoverFile() throws IOException { while (true) { environment.traceln(() -> "recoverFile: scanner.token=" + scanner.token); switch (scanner.token) { case CLASS: case INTERFACE: // Start of a new source file statement, continue return; case LBRACE: match(LBRACE, RBRACE); scanner.scan(); break; case LPAREN: match(LPAREN, RPAREN); scanner.scan(); break; case LSQBRACKET: match(LSQBRACKET, RSQBRACKET); scanner.scan(); break; case EOF: return; default: // Don't know what to do, skip scanner.scan(); break; } } } /** * End class */ private void endClass() { if (explicitCP) { // Fix references in the constant pool (for explicitly coded CPs) // TODO Synthetic in package info pool.fixRefsInPool(); // Fix any bootstrap Method references too classData.relinkBootstrapMethods(); // Fix Source file if it isn't defined. if (classData.sourceFileAttr == null) { String sourceFileName = environment.getSimpleInputFileName(); String sourceName = environment.getSourceName(); classData.sourceFileAttr = new SourceFileAttr(this.classData.pool, sourceFileName). updateIfFound(this.classData.pool, name -> name.contains(sourceName) && StringUtils.contains.apply(name, List.of(".java", ".jcod", ".jasm", ".class")) ); } } else { // Fix Source file if it isn't defined. if (classData.sourceFileAttr == null) { classData.sourceFileAttr = new CPXAttr(pool, EAttribute.ATT_SourceFile, pool.findUTF8Cell(environment.getSimpleInputFileName())); } } classData.endClass(); clsDataList.add(classData); initializeClassData(); } /** * End package-info */ private void endPackageInfo() { if (explicitCP) { // Fix references in the constant pool (for explicitly coded CPs) pool.fixRefsInPool(); // Fix Source file if it isn't defined. if (classData.sourceFileAttr == null) { String sourceName = environment.getSimpleInputFileName(); classData.sourceFileAttr = new SourceFileAttr(this.classData.pool, sourceName). updateIfFound(this.classData.pool, name -> name.contains("package-info.")); } } else { // Fix Source file if it isn't defined. if (classData.sourceFileAttr == null) { classData.sourceFileAttr = new CPXAttr(pool, EAttribute.ATT_SourceFile, pool.findUTF8Cell(environment.getSimpleInputFileName())); } } classData.endPackageInfo(); clsDataList.add(classData); classData = null; } /** * End module */ private void endModule() { if (explicitCP) { // Fix references in the constant pool (for explicitly coded CPs) pool.fixRefsInPool(); // Fix Source file if it isn't defined. if (classData.sourceFileAttr == null) { String sourceName = environment.getSimpleInputFileName(); classData.sourceFileAttr = new SourceFileAttr(this.classData.pool, sourceName). updateIfFound(this.classData.pool, name -> name.contains("module-info.")); } } else { // Fix Source file if it isn't defined. if (classData.sourceFileAttr == null) { classData.sourceFileAttr = new CPXAttr(pool, EAttribute.ATT_SourceFile, pool.findUTF8Cell(environment.getSimpleInputFileName())); } } classData.endModule(moduleAttribute); clsDataList.add(classData); classData = null; } final ClassData[] getClassesData() { return clsDataList.toArray(new ClassData[0]); } /** * Determines whether the JASM file is for a package-info class * or for a module-info class. *

* creates the correct kind of ClassData accordingly. * * @throws IOException if any parse exception is met */ private void parseJasmPackages() throws IOException { if (scanner.token.in(CONST, ANNOTATION, PACKAGE)) { boolean scanNext = true; try { while ((scanner.token != EOF) && scanNext) { switch (scanner.token) { case CONST: // Parse constant declarations scanner.scan(); parseConstDef(); explicitCP = true; break; case SEMICOLON: // Empty fields are allowed scanner.scan(); break; case ANNOTATION: packageAnnotations = annotParser.parseAnnotations(); break; case PACKAGE: // Package statement scanner.scan(); long where = scanner.pos; String id = parseIdent(); if (scanner.token != SEMICOLON) { parseVersion(); scanner.expect(SEMICOLON); } if (pkg == null) { pkg = id; pkgPrefix = id + "/"; } else { environment.error(where, "err.package.repeated"); } traceMethodInfoLn("{PARSED} package-prefix: \"" + pkgPrefix + "\""); default: scanNext = false; } // end switch } // while } catch (SyntaxError e) { recoverFile(); } // skip bogus semi colons while (scanner.token == SEMICOLON) { scanner.scan(); } // checks that we compile module or package compilation unit if (scanner.token == EOF) { environment.traceln("Scanner: EOF"); String sourceName = environment.getSimpleInputFileName(); // package-info if (sourceName.contains("package-info")) { environment.traceln(() -> "Creating \"package-info.jasm\": package: " + pkg + " " + classData.cfv.asString()); // Interface package-info should be marked ACC_INTERFACE and ACC_ABSTRACT flags int mod = ACC_INTERFACE.getFlag() | ACC_ABSTRACT.getFlag(); // If the class file version number is less than 50.0, then the ACC_SYNTHETIC flag is unset; // if the class file version number is 50.0 or above, then the ACC_SYNTHETIC flag is set. if (classData.cfv.major_version() > 49) { mod |= SYNTHETIC_ATTRIBUTE.getFlag(); } classData.initAsPackageInfo(mod, pkgPrefix + "package-info"); if (packageAnnotations != null) { classData.addAnnotations(packageAnnotations); } endPackageInfo(); } return; } if (pkg == null && packageAnnotations != null) { // RemoveModules classAnnotations = packageAnnotations; packageAnnotations = null; } } } /** * Parse an Jasm file. * 1. File FILENAME or class file CLASSNAME takes the highest priority. This filename cannot be overridden. * 2. Public class CLASSNAME { }– class name is CLASSNAME, and this CLASSNAME will be used to generate the filename (i.e., CLASSNAME.class). * 3. this_class – The filename will be CLASSNAME.class, but the class name will be this_class. */ void parseFile() { try { initializeClassData(); // First parse the first line // file FILENAME || classfile CLASSNAME String destinationFileName = parseResultingFile(); if (destinationFileName != null) { if (environment.getToolOutput() instanceof NamedToolOutput namedToolOutput) { namedToolOutput.setDestinationFileName(destinationFileName); } } // parse any package identifiers (and associated package annotations) parseJasmPackages(); while (scanner.token != EOF) { // Second, parse any class identifiers (and associated class annotations) try { // Parse annotations if (scanner.token == ANNOTATION) { classAnnotations = annotParser.parseAnnotations(); } // Parse class modifiers int mod = scanModifiers(); if (mod == 0) { switch (scanner.token) { case OPEN: case MODULE: case CLASS: case INTERFACE: case CPINDEX: case STRINGVAL: case IDENT: // this is a class declaration anyway break; case SEMICOLON: // Bogus semi colon scanner.scan(); continue; default: // no class declaration found environment.error(scanner.pos, "err.toplevel.expected"); throw new SyntaxError(); } } else if (EModifier.isInterface(mod) && (scanner.token != CLASS)) { // rare syntactic sugar: // interface == abstract interface class mod |= ACC_ABSTRACT.getFlag(); } if (scanner.token == MODULE || scanner.token == OPEN) parseModule(mod); else parseClass(mod); classAnnotations = null; } catch (SyntaxError e) { environment.traceln("^^^^^^^ Syntax Error ^^^^^^^^^^^^"); if (scanner.environment.getVerboseFlag()) e.printStackTrace(); if (!e.isFatal()) { recoverFile(); } break; } } } catch (IOException e) { environment.error(scanner.pos, "io.exception", environment.getSimpleInputFileName()); } catch (Error er) { er.printStackTrace(); } } //end parseFile /** * The source text file can be free form (newlines are considered blanks) and may contain Java-style commenting. * The first line of a JASM file represents the name of the resulting file in the destination directory. * This name does not affect the content of the resulting file. This line has two forms: * file FILENAME; * or * classfile CLASSNAME; * In the latter case, extension .class will be added to form FILENAME. */ private String parseResultingFile() throws IOException { boolean addExtension = false; String name = null; if (scanner.token.in(FILE, CLASS_FILE)) { while ((scanner.token != EOF)) { switch (scanner.token) { case FILE -> { if (name != null) { environment.throwErrorException(scanner.pos, "err.token.expected", SEMICOLON.parseKey()); } } case CLASS_FILE -> { if (name != null) { environment.throwErrorException(scanner.pos, "err.token.expected", SEMICOLON.printValue()); } addExtension = true; } case IDENT, CLASS -> { name = name == null ? scanner.stringValue : name + scanner.stringValue; } case FIELD -> { // "." is recognized as FIELD token name = name == null ? "." : name + "."; } case SEMICOLON -> { if (name == null) { environment.throwErrorException(scanner.pos, "err.token.expected", addExtension ? "CLASSNAME" : "FILENAME"); } scanner.scan(); return name.concat(addExtension ? ".class" : ""); } default -> { if (name == null) { environment.throwErrorException(scanner.pos, "err.token.expected", addExtension ? "CLASSNAME" : "FILENAME"); } else { environment.throwErrorException(scanner.pos, "err.token.expected", SEMICOLON.printValue()); } } } // end switch scanner.scan(); } // while } return name; } private void initializeClassData() { // parser environment and copy of the parser cfv. classData = new ClassData(this.environment, copyOf(this.currentCFV)); pool = classData.pool; } @FunctionalInterface interface NameSupplier { NameInfo get() throws IOException; } @FunctionalInterface interface Method { void call() throws IOException; } /** * The main compile error for the parser */ static class CompilerError extends Error { CompilerError(String message) { super(message); } } } //end Parser jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/PermittedSubclassesAttr.java000066400000000000000000000031371514323636100307030ustar00rootroot00000000000000/* * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import java.util.List; /** * The "classes[]" data of attributes * JEP 360 (Sealed types): class file 59.65535 * PermittedSubclasses_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_classes; * u2 classes[number_of_classes]; * } */ public class PermittedSubclassesAttr extends ArrayAttr { public PermittedSubclassesAttr(ConstantPool pool, List classes) { super(pool, EAttribute.ATT_PermittedSubclasses, classes); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/RecordData.java000066400000000000000000000076061514323636100261000ustar00rootroot00000000000000/* * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.common.structure.ELocation; import org.openjdk.asmtools.common.structure.EModifier; import java.io.IOException; import java.util.ArrayList; import java.util.List; import static org.openjdk.asmtools.common.structure.EModifier.*; /** * The record attribute (JEP 359 since class file 58.65535) */ public class RecordData extends AttrData { private ClassData classData; private List components = new ArrayList<>(); /** * @param classData callback reference to class data to manipulate signature attribute */ public RecordData(ClassData classData) { super(classData.pool, EAttribute.ATT_Record); this.classData = classData; } public void addComponent(ConstCell nameCell, ConstCell descCell, ConstCell signature, ArrayList annotations) { // Define a field if absent FieldData fd = classData.addFieldIfAbsent(EModifier.getFlags(ACC_MANDATED, ACC_PRIVATE, ACC_FINAL), nameCell, descCell); ComponentData cd = new ComponentData(classData, fd); if( annotations != null ) { cd.addAnnotations(annotations); } if( signature != null ) { cd.setSignatureAttr(signature); } components.add(cd); } public boolean isEmpty() { return components.isEmpty(); } @Override public void write(CheckedDataOutputStream out) throws IOException { super.write(out); out.writeShort(components.size()); for (ComponentData cd : components) { cd.write(out); } } @Override public int attrLength() { int compsLength = components.stream().mapToInt(c -> c.getLength()).sum(); return 2 + compsLength; } class ComponentData extends MemberData { private ClassData classData; private FieldData field; public ComponentData(ClassData classData, FieldData field) { super(classData.pool, classData.getEnvironment()); this.attributeLocation = ELocation.record_component_info; this.classData = classData; this.field = field; } @Override protected DataVector getAttrVector() { return classData.getDataVector(signatureAttr); } public void write(CheckedDataOutputStream out) throws IOException, Parser.CompilerError { out.writeShort(field.getNameDesc().value.first.cpIndex); out.writeShort(field.getNameDesc().value.second.cpIndex); DataVector attrs = getAttrVector(); attrs.write(out); } public int getLength() { return 4 + getAttrVector().getLength(); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/Scanner.java000066400000000000000000001035051514323636100254540ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.asmutils.StringUtils; import org.openjdk.asmtools.common.SyntaxError; import java.util.Arrays; import java.util.List; import java.util.function.Predicate; import java.util.function.Supplier; import java.util.stream.Collectors; import static org.openjdk.asmtools.common.CompilerConstants.EOF; import static org.openjdk.asmtools.jasm.JasmTokens.Token; import static org.openjdk.asmtools.jasm.JasmTokens.keyword_token_ident; /** * A Scanner for Jasm tokens. Errors are reported to the environment object.

*

* The scanner keeps track of the current token, the value of the current token (if any), * and the start position of the current token.

*

* The scan() method advances the scanner to the next token in the input.

*

* The match() method is used to quickly match opening brackets (ie: '(', '{', or '[') * with their closing counterpart. This is useful during error recovery.

*

* The compiler treats either "\n", "\r" or "\r\n" as the end of a line.

*/ public class Scanner extends ParseBase { // The current character protected int ch; // Current token protected Token token; // The position of the current token protected long pos; // Token values. protected int intValue; protected long longValue; protected float floatValue; protected double doubleValue; protected String stringValue; protected String idValue; protected int radix; // Radix, when reading int or long /* doc comment preceding the most recent token */ protected String docComment; /** * The position of the previous token */ protected long prevPos; protected int sign; // sign, when reading number protected boolean inBits; // inBits prefix, when reading number /* A growable character buffer. */ private int count; private char[] buffer = new char[32]; // private Predicate escapingAllowed; private final Predicate noFunc = (ch) -> false; private final Predicate yesAndProcessFunc = (ch) -> { boolean res = ((ch == '\\') || (ch == ':') || (ch == '@')); if (res) putCh('\\'); return res; }; /** * main constructor. *

* Create a scanner to scan an input stream. */ protected Scanner(JasmEnvironment environment) { super.init(environment); escapingAllowed = noFunc; ch = environment.read(); xscan(); } protected void scanModuleStatement() { try { escapingAllowed = yesAndProcessFunc; scan(); } finally { escapingAllowed = noFunc; } } /** * Scan the next token. */ protected void scan() { int signloc = 1; prevPos = pos; prefix: for (; ; ) { xscan(); switch (token) { case SIGN: signloc = signloc * intValue; break; default: break prefix; } } switch (token) { case INTVAL, LONGVAL, FLOATVAL, DOUBLEVAL, INF, NAN -> sign = signloc; default -> { } } } /** * Check the token may be identifier */ protected final boolean checkTokenIdent() { return token.isPossibleJasmIdentifier(); } /** * Expects the token, scans the next token or throws an exception. */ protected final void expect(Token t) throws SyntaxError { check(t); scan(); } /** * Expects an identifier token with parsed content of the token, * scans the next token or throws an exception. */ protected final void expectIdentContent(Token t) throws SyntaxError { if (token != Token.IDENT || !stringValue.equals(t.parseKey())) { environment.throwErrorException(pos, "err.token.expected", "\"" + t.parseKey() + "\""); } scan(); } protected final void expectOneOf(List identifiers, Token... tokens) throws SyntaxError { boolean foundTokens = expectOneOfToken(tokens), foundIdents = expectOneOfIdent(identifiers.toArray(new String[0])); if (!foundTokens && !foundIdents) { String list = identifiers.stream().map("\"%s\""::formatted). collect(Collectors.joining(",")); list = "[ %s,%s ]".formatted(list, Arrays.stream(tokens). map(t -> "\"%s\"".formatted(t.parseKey())). collect(Collectors.joining(","))); environment.error(pos, "err.one.of.N.token.expected", list); } } /** * Expects one of the token in the list, scans the next token or throws an exception. */ protected final boolean expectOneOfToken(Token... tokens) throws SyntaxError { for (Token t : tokens) { if (token == t) { return true; } } return false; } /** * Expects one of Identifier in the list, scans the next token or throws an exception. */ protected final boolean expectOneOfIdent(String... identifiers) throws SyntaxError { if (token == Token.IDENT) { for (String ident : identifiers) { if (stringValue.equals(ident)) { return true; } } } return false; } /** * Checks the token, throws an exception if different */ protected final void check(Token t) throws SyntaxError { if (token != t) { if ((t != Token.IDENT) || !checkTokenIdent()) { environment.traceln("expect: " + t + " instead of " + token); if (t == Token.IDENT) { environment.error(pos, "err.identifier.expected"); } else { environment.error(pos, "err.token.expected", "<" + t.parseKey() + ">"); } } } } private void putCh(int ch) { if (count == buffer.length) { char[] newBuffer = new char[buffer.length * 2]; System.arraycopy(buffer, 0, newBuffer, 0, buffer.length); buffer = newBuffer; } buffer[count++] = (char) ch; } private String bufferString() { char[] buf = new char[count]; System.arraycopy(buffer, 0, buf, 0, count); return new String(buf); } /** * Scan a comment. This method should be called once the initial /, * and the next * character have been read. */ private void skipComment() { while (true) { switch (ch) { case EOF: environment.error(pos, "err.eof.in.comment"); return; case '*': if ((ch = environment.read()) == '/') { ch = environment.read(); return; } break; default: ch = environment.read(); break; } } } /** * Scan a doc comment. This method should be called once the initial /, * and * have * been read. It gathers the content of the comment (without leading spaces and '*'s) * in the string buffer. */ @SuppressWarnings("empty-statement") private String scanDocComment() { count = 0; if (ch == '*') { do { ch = environment.read(); } while (ch == '*'); if (ch == '/') { ch = environment.read(); return ""; } } switch (ch) { case '\n', ' ' -> ch = environment.read(); } boolean seenstar = false; int c = count; while (true) { switch (ch) { case EOF: environment.error(pos, "err.eof.in.comment"); return bufferString(); case '\n': putCh('\n'); ch = environment.read(); seenstar = false; c = count; break; case ' ': case '\t': putCh(ch); ch = environment.read(); break; case '*': if (seenstar) { if ((ch = environment.read()) == '/') { ch = environment.read(); count = c; return bufferString(); } putCh('*'); } else { seenstar = true; count = c; while ((ch = environment.read()) == '*') ; switch (ch) { case ' ' -> ch = environment.read(); case '/' -> { ch = environment.read(); count = c; return bufferString(); } } } break; default: if (!seenstar) { seenstar = true; } putCh(ch); ch = environment.read(); c = count; break; } } } /** * Scan a decimal at this point */ private void scanCPRef() { int prevCh = ch; switch (ch = environment.read()) { case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' -> { boolean overflow = false; long value = ch - '0'; count = 0; putCh(ch); // save character in buffer numberLoop: for (; ; ) { switch (ch = environment.read()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': putCh(ch); if (overflow) { break; } value = (value * 10) + (ch - '0'); overflow = (value > 0xFFFF); break; default: break numberLoop; } } // while true intValue = (int) value; stringValue = bufferString(); token = Token.CPINDEX; if (overflow) { environment.error(pos, "err.overflow"); } } default -> { stringValue = Character.toString((char) prevCh); environment.throwErrorException(environment.getPosition(), "err.invalid.number", stringValue); intValue = 0; token = Token.CPINDEX; ch = environment.read(); } } } // scanCPRef() /** * Scan a number. The first digit of the number should be the current character. We * may be scanning hex, decimal, or octal at this point */ private void scanNumber() { boolean seenNonOctal = false; boolean overflow = false; radix = (ch == '0' ? 8 : 10); long value = ch - '0'; count = 0; putCh(ch); // save character in buffer numberLoop: for (; ; ) { switch (ch = environment.read()) { case '.': if (radix == 16) { break numberLoop; // an illegal character } scanReal(); return; case '8': case '9': // We can't yet throw an error if reading an octal. We might // discover we're really reading a real. seenNonOctal = true; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': putCh(ch); if (radix == 10) { overflow = overflow || (value * 10) / 10 != value; value = (value * 10) + (ch - '0'); overflow = overflow || (value - 1 < -1); } else if (radix == 8) { overflow = overflow || (value >>> 61) != 0; value = (value << 3) + (ch - '0'); } else { overflow = overflow || (value >>> 60) != 0; value = (value << 4) + (ch - '0'); } break; case 'd': case 'D': case 'e': case 'E': case 'f': case 'F': if (radix != 16) { scanReal(); return; } // fall through case 'a': case 'A': case 'b': case 'B': case 'c': case 'C': putCh(ch); if (radix != 16) { break numberLoop; // an illegal character } overflow = overflow || (value >>> 60) != 0; value = (value << 4) + 10 + Character.toLowerCase((char) ch) - 'a'; break; case 'l': case 'L': ch = environment.read(); // skip over 'l' longValue = value; token = Token.LONGVAL; break numberLoop; case 'x': case 'X': // if the first character is a '0' and this is the second // letter, then read in a hexadecimal number. Otherwise, error. if (count == 1 && radix == 8) { radix = 16; break; } else { // we'll get an illegal character error break numberLoop; } default: intValue = (int) value; token = Token.INTVAL; break numberLoop; } } // while true // we have just finished reading the number. The next thing better // not be a letter or digit. if (Character.isLetterOrDigit(ch) || ch == '.') { environment.error(environment.getPosition(), "err.invalid.number", Character.toString((char) ch)); do { ch = environment.read(); } while (Character.isLetterOrDigit(ch) || ch == '.'); intValue = 0; token = Token.INTVAL; } else if (radix == 8 && seenNonOctal) { intValue = 0; token = Token.INTVAL; environment.error(environment.getPosition(), "err.invalid.octal.number"); } else if (overflow || (token == Token.INTVAL && ((radix == 10) ? (intValue - 1 < -1) : ((value & 0xFFFFFFFF00000000L) != 0)))) { intValue = 0; // so we don't get second overflow in Parser longValue = 0; environment.error(pos, "err.overflow"); } } // scanNumber() /** * Scan a float. We are either looking at the decimal, or we have already seen it and * put it into the buffer. We haven't seen an exponent. Scan a float. Should be called * with the current character is either the 'e', 'E' or '.' */ private void scanReal() { boolean seenExponent = false; boolean isSingleFloat = false; char lastChar; if (ch == '.') { putCh(ch); ch = environment.read(); } numberLoop: for (; ; ch = environment.read()) { switch (ch) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': putCh(ch); break; case 'e': case 'E': if (seenExponent) { break numberLoop; // we'll get a format error } putCh(ch); seenExponent = true; break; case '+': case '-': lastChar = buffer[count - 1]; if (lastChar != 'e' && lastChar != 'E') { break numberLoop; // this isn't an error, though! } putCh(ch); break; case 'f': case 'F': ch = environment.read(); // skip over 'f' isSingleFloat = true; break numberLoop; case 'd': case 'D': ch = environment.read(); // skip over 'd' // fall through default: break numberLoop; } // sswitch } // loop // we have just finished reading the number. The next thing better // not be a letter or digit. if (Character.isLetterOrDigit(ch) || ch == '.') { environment.error(environment.getPosition(), "err.invalid.number", Character.toString((char) ch)); do { ch = environment.read(); } while (Character.isLetterOrDigit(ch) || ch == '.'); doubleValue = 0; token = Token.DOUBLEVAL; } else { token = isSingleFloat ? Token.FLOATVAL : Token.DOUBLEVAL; try { lastChar = buffer[count - 1]; if (lastChar == 'e' || lastChar == 'E' || lastChar == '+' || lastChar == '-') { environment.error(environment.getPosition() - 1, "err.float.format"); } else if (isSingleFloat) { floatValue = Float.parseFloat(bufferString()); if (Float.isInfinite(floatValue)) { environment.error(pos, "err.overflow"); } } else { doubleValue = Double.parseDouble(bufferString()); if (Double.isInfinite(doubleValue)) { environment.error(pos, "err.overflow"); environment.error(pos, "err.overflow"); } } } catch (NumberFormatException ee) { environment.error(pos, "err.float.format"); doubleValue = 0; floatValue = 0; } } } // scanReal /** * Scan an escape character. * * @return the character or '\\' */ private long scanEscapeChar() { long p = environment.getPosition(); switch (ch = environment.read()) { case '0', '1', '2', '3', '4', '5', '6', '7' -> { int n = ch - '0'; for (int i = 2; i > 0; i--) { switch (ch = environment.read()) { case '0', '1', '2', '3', '4', '5', '6', '7' -> n = (n << 3) + ch - '0'; default -> { if (n > 0xFF) { environment.error(p, "err.invalid.escape.char"); } return n; } } } ch = environment.read(); if (n > 0xFF) { environment.error(p, "err.invalid.escape.char"); } return n; } case 'r' -> { ch = environment.read(); return '\r'; } case 'n' -> { ch = environment.read(); return '\n'; } case 'f' -> { ch = environment.read(); return '\f'; } case 'b' -> { ch = environment.read(); return '\b'; } case 't' -> { ch = environment.read(); return '\t'; } case '\\' -> { ch = environment.read(); return '\\'; } case '\"' -> { ch = environment.read(); return '\"'; } case '\'' -> { ch = environment.read(); return '\''; } case 'u' -> { int unich = environment.convertUnicode(); ch = environment.read(); return unich; } } return '\\'; } /** * Scan a string. The current character should be the opening " of the string. */ private void scanString() { token = Token.STRINGVAL; count = 0; ch = environment.read(); // Scan a String while (true) { switch (ch) { case EOF -> { environment.error(pos, "err.eof.in.string"); stringValue = bufferString(); return; } case '\n' -> { ch = environment.read(); environment.error(pos, "err.newline.in.string"); stringValue = bufferString(); return; } case '"' -> { ch = environment.read(); stringValue = bufferString(); return; } case '\\' -> { long c = scanEscapeChar(); if (c >= 0) { putCh((char) c); } } default -> { putCh(ch); ch = environment.read(); } } } } /** * Scan an Identifier. The current character should be the first character of the * identifier. */ private void scanIdentifier(char[] prefix) { int firstChar; count = 0; if (prefix != null) { for (; ; ) { for (char c : prefix) putCh(c); ch = environment.read(); if (ch == '\\') { ch = environment.read(); if (ch == 'u') { ch = environment.convertUnicode(); if (!Character.isLetterOrDigit(ch)) { prefix = new char[]{(char) ch}; continue; } } else if (escapingAllowed.test(ch)) { prefix = new char[]{(char) ch}; continue; } long p = environment.getPosition(); environment.error(p, "err.invalid.escape.char"); } break; } } firstChar = ch; boolean firstIteration = true; scanloop: while (true) { putCh(ch); ch = environment.read(); // Check to see if the annotation marker is at // the front of the identifier. if (firstIteration && firstChar == '@') { // Maybe a type annotation if (ch == 'T') { // type annotation putCh(ch); ch = environment.read(); } // is either a runtime visible or invisible annotation if (ch == '+' || ch == '-') { // regular annotation // possible annotation - // need to eat up the '@+' or '@-' putCh(ch); ch = environment.read(); } idValue = bufferString(); stringValue = idValue; token = Token.ANNOTATION; return; } firstIteration = false; if (!Character.isJavaIdentifierPart(ch) && !StringUtils.isOneOf(ch, '-', '[', ']', '(', ')', '<', '>')) { switch (ch) { case '/': {// may be comment right after identifier int c = environment.lookForward(); if ((c == '*') || (c == '/')) { break scanloop; // yes, comment } break; // no, continue to parse identifier } case '\\': ch = environment.read(); if (ch == 'u') { ch = environment.convertUnicode(); if (!Character.isLetterOrDigit(ch)) { break; } } else if (escapingAllowed.test(ch)) { break; } long p = environment.getPosition(); environment.error(p, "err.invalid.escape.char"); default: break scanloop; } // end switch } } // end scanloop idValue = bufferString(); stringValue = idValue; token = keyword_token_ident(idValue); traceMethodInfoLn("token = %s value = '%s'".formatted(token, idValue)); } // end scanIdentifier //============================== @SuppressWarnings("empty-statement") protected final void xscan() { // throws IOException { docComment = null; loop: for (; ; ) { pos = environment.getPosition(); if (Character.isLetter(ch) || StringUtils.isOneOf(ch, '$', '_', '@', '[', ']', '(', ')', '<', '>')) { scanIdentifier(null); break; } else if (ch == EOF) { token = Token.EOF; break; } else if (ch == '\n' || ch == '\r' || ch == ' ' || ch == '\t' || ch == '\f') { ch = environment.read(); } else if (ch == '/') { switch (ch = environment.read()) { case '/': // Parse a // comment while (((ch = environment.read()) != EOF) && (ch != '\n')) ; break; case '*': ch = environment.read(); if (ch == '*') { docComment = scanDocComment(); } else { skipComment(); } break; default: token = Token.DIV; break loop; } } else if (ch == '"') { scanString(); break; } else if (ch == '-') { intValue = -1; token = Token.SIGN; ch = environment.read(); break; } else if (ch == '+') { intValue = 1; ch = environment.read(); token = Token.SIGN; break; } else if (ch == '0' || ch == '1' || ch == '2' || ch == '3' || ch == '4' || ch == '5' || ch == '6' || ch == '7' || ch == '8' || ch == '9') { scanNumber(); break; } else if (ch == '.') { switch (ch = environment.read()) { case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' -> { count = 0; putCh('.'); scanReal(); } default -> token = Token.FIELD; } break; } else if (ch == '{') { ch = environment.read(); token = Token.LBRACE; break; } else if (ch == '}') { ch = environment.read(); token = Token.RBRACE; break; } else if (ch == ',') { ch = environment.read(); token = Token.COMMA; break; } else if (ch == ';') { ch = environment.read(); token = Token.SEMICOLON; break; } else if (ch == ':') { ch = environment.read(); token = Token.COLON; break; } else if (ch == '=') { if ((ch = environment.read()) == '=') { ch = environment.read(); token = Token.EQ; break; } token = Token.ASSIGN; break; } else if (ch == '\u001a') {// Our one concession to DOS. if ((ch = environment.read()) == EOF) { token = Token.EOF; break; } environment.warning(prevPos, "warn.funny.char", ch); ch = environment.read(); } else if (ch == '#') { int c = environment.lookForward(); if (c == '{') { // '#' char denotes a "paramMethod name" token ch = environment.read(); token = Token.PARAM_NAME; break loop; } // otherwise, it is a normal cpref scanCPRef(); break loop; } else if (ch == '\\') { ch = environment.read(); if (ch == 'u') { ch = environment.convertUnicode(); if (Character.isLetterOrDigit(ch) && !Character.isDigit(ch)) { scanIdentifier(null); break; } } else if (escapingAllowed.test(ch)) { scanIdentifier(new char[]{'\\', (char) ch}); break; } // if ((ch = in.read()) == 'u') { // ch = in.convertUnicode(); // if (isUCLetter(ch)) { // scanIdentifier(); // break loop; // } // } long ln = environment.lineNumber(pos); long lineOffset = environment.lineOffset(ln, pos); environment.traceln(() -> "Funny char with code='%c' at %d:%d".formatted(ch, ln, lineOffset)); environment.warning(pos, "warn.funny.char", ch); ch = environment.read(); } else { long ln = environment.lineNumber(pos); long lineOffset = environment.lineOffset(ln, pos); environment.traceln(() -> "Funny char with code='%c' at %d:%d".formatted(ch, ln, lineOffset)); environment.warning(pos, "warn.funny.char", ch); ch = environment.read(); } } } protected void debugScan(String debStr) { if (environment.isTraceFlag()) { if (token == null) { environment.traceln(debStr.concat("<<>>")); return; } environment.trace(debStr.concat(token.toString())); switch (token) { case IDENT -> environment.traceln(" = '" + stringValue + "' {idValue = '" + idValue + "'}"); case STRINGVAL -> environment.traceln(" = {stringValue}: \"" + stringValue + "\""); case INTVAL -> environment.traceln(" = {intValue}: " + intValue); case FLOATVAL -> environment.traceln(" = {floatValue}: " + floatValue); case DOUBLEVAL -> environment.traceln(" = {doubleValue}: " + doubleValue); default -> environment.traceln(""); } } } protected void debugScan(long position, String debStr) { if (environment.isTraceFlag()) { long lineNumber = environment.lineNumber(position); long linePos = environment.lineOffset(lineNumber, position); debugScan("[%4d,%-2d] ".formatted(lineNumber,linePos).concat(debStr)); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/SourceDebugExtensionAttr.java000066400000000000000000000071701514323636100310230ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import java.io.IOException; import java.util.ArrayList; import java.util.List; import static java.nio.charset.StandardCharsets.UTF_8; import static org.openjdk.asmtools.asmutils.HexUtils.toByteArray; /** * SourceDebugExtension_attribute { * u2 attribute_name_index; * u4 attribute_length; * u1 debug_extension[attribute_length]; * The debug_extension array holds extended debugging information which has no semantic effect on the JVM. * The information is represented using a modified UTF-8 string (§4.4.7) with no terminating zero byte. * } */ public class SourceDebugExtensionAttr extends AttrData { StringBuilder utf8DebugExtension = new StringBuilder(); List byteDebugExtension = new ArrayList<>(); // Defines type of the attribute either it is presented as UTF8 string or Byte array. public enum Type { NONE, UTF8, BYTE; } // by default the type isn't defined. First append operation will define the type. Type type = Type.NONE; SourceDebugExtensionAttr(ConstantPool pool) { super(pool, EAttribute.ATT_SourceDebugExtension); } public boolean isEmpty() { return switch (type) { case UTF8 -> utf8DebugExtension.isEmpty(); case BYTE -> byteDebugExtension.isEmpty(); case NONE -> true; // not initialized }; } public void append(String str) throws IllegalArgumentException { if (type == Type.BYTE) throw new IllegalArgumentException("The valid modified UTF-8 string is expected."); utf8DebugExtension.append(str); type = Type.UTF8; } public void append(int value) { if (type == Type.UTF8) throw new IllegalArgumentException("The byte representation of the string is expected."); byteDebugExtension.add((byte) value); type = Type.BYTE; } public int attrLength() { // 4.4.7. The CONSTANT_Utf8_info Structure // u2 length; + (u1 bytes[length]).length(); return switch (type) { case UTF8 -> utf8DebugExtension.toString().getBytes(UTF_8).length; case BYTE -> byteDebugExtension.size(); case NONE -> 0; }; } public void write(CheckedDataOutputStream out) throws IOException { super.write(out); // attr name, attr length switch (type) { case UTF8 -> out.writeBytes(utf8DebugExtension.toString()); case BYTE -> out.write(toByteArray(byteDebugExtension)); case NONE -> out.write(0); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/SourceFileAttr.java000066400000000000000000000062031514323636100267530ustar00rootroot00000000000000/* * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import java.io.IOException; import java.util.function.Function; /** * SourceFile_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 sourcefile_index; * } */ public class SourceFileAttr extends AttrData { private String sourceFileName; private ConstCell sourceFileNameCell = null; /** * Constructs SourceFile Attribute without creating Constant Pool UTF8 SourceFile * * @param pool constant pool of parsed class data * @param sourceFileName a name of a parsed file */ public SourceFileAttr(ConstantPool pool, String sourceFileName) { super(pool, EAttribute.ATT_SourceFile); this.sourceFileName = sourceFileName; } /** * Constructs SourceFile Attribute without creating Constant Pool UTF8 SourceFile * * @param pool constant pool of parsed class data * @param sourceFileNameCell ConstantPool UTF8 cell */ public SourceFileAttr(ConstantPool pool, ConstCell sourceFileNameCell) { super(pool, EAttribute.ATT_SourceFile); this.sourceFileNameCell = sourceFileNameCell; } /** * Finds CP UTF cell with string that applies to the rule. * If such UTF8 string exists then replaces it with a new source file name * otherwise creates a new UTF8 cell to fill out Source File Attribute */ public SourceFileAttr updateIfFound(ConstantPool pool, Function rule) { sourceFileNameCell = pool.lookupUTF8Cell(rule); if( sourceFileNameCell != null ) { sourceFileNameCell.ref.value = sourceFileName; } else { sourceFileNameCell = pool.findUTF8Cell(this.sourceFileName); } return this; } @Override public int attrLength() { return 2; } @Override public void write(CheckedDataOutputStream out) throws IOException { if( sourceFileNameCell != null ) { super.write(out); // attribute name & length out.writeShort(sourceFileNameCell.cpIndex); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/StackMapData.java000066400000000000000000000370261514323636100263640ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.StackMap; import java.io.IOException; import java.util.Objects; import static org.openjdk.asmtools.common.structure.StackMap.EntryType.*; import static org.openjdk.asmtools.jasm.JasmTokens.Token.*; /** * 4.7.4. The StackMapTable Attribute *

* StackMapTable_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_entries; * stack_map_entry entries[number_of_entries]; * } */ public class StackMapData implements DataWriter { static final int UNDEFINED = -1; final JasmEnvironment environment; private long scannerPosition = 0; // Indicates that a method's Code attribute has a StackMapTable attribute (CFV >= 50.0) or has // StackMap_attribute { // u2 attribute_name_index; // u4 attribute_length; // u2 number_of_entries; // stack_map_entry entries[number_of_entries]; //} where // stack_map_entry { // u2 offset; // u2 number_of_locals; // verification_type_info locals[number_of_locals]; // u2 number_of_stack_items; // verification_type_info stack[number_of_stack_items]; //} final boolean hasStackMapTable; private int pc = UNDEFINED; private int offset = UNDEFINED; private StackMap.EntryType entryType = UNKNOWN_TYPE; DataVector localsMap, stackMap, unsetFields; /** * In a class file whose version number is 50.0 or above, if a method's Code attribute does not have a StackMapTable attribute, * it has an implicit stack map attribute (§4.10.1). This implicit stack map attribute is equivalent to a StackMapTable * attribute with number_of_entries equal to zero. * * @param hasStackMapTable false if a method's Code attribute does not have a StackMapTable attribute */ StackMapData(JasmEnvironment environment, boolean hasStackMapTable) { this.environment = environment; this.hasStackMapTable = hasStackMapTable; } StackMapData setOffset(StackMapData prevFrame) { offset = (prevFrame == null) ? pc : (pc - prevFrame.pc - 1); return this; } StackMapData setOffset(int offset) { this.offset = offset; return this; } StackMapData setPC(int pc) { this.pc = pc; return this; } StackMapData setStackFrameTypeByName(String stackFrameTypeName) { Objects.requireNonNull(stackFrameTypeName, () -> this.environment.getLogger().getResourceString("err.obj.is.null", "String stackFrameType")); this.entryType = StackMap.getEntryTypeByName(stackFrameTypeName); if (this.entryType == UNKNOWN_TYPE) { environment.error(scannerPosition, "err.invalid.stack.frame.type", stackFrameTypeName); } return this; } /** * Sets Stack Frame type by number in table presentation: frame_type = 252 * * @param stackFrameTypeValue frame type tag * @return StackMapData object */ StackMapData setStackFrameType(int stackFrameTypeValue) { this.entryType = StackMap.EntryType.getByTag(stackFrameTypeValue); if (this.entryType == SAME_FRAME) { this.offset = stackFrameTypeValue; } else if (this.entryType == SAME_LOCALS_1_STACK_ITEM_FRAME) { this.offset = stackFrameTypeValue - SAME_LOCALS_1_STACK_ITEM_FRAME.fromTag(); } return this; } StackMapData setScannerPosition(long scannerPosition) { this.scannerPosition = scannerPosition; return this; } /** * Checks whether a method's Code attribute has a StackMapTable attribute. * * @return true if a method's Code attribute has a StackMapTable attribute. */ boolean isFrameTypeSet() { return hasStackMapTable ? this.entryType != UNKNOWN_TYPE : this.pc != UNDEFINED; } /** * The early_larval_frame wraps a base_frame. * As a wrapper, it doesn't supply the offset_delta. * * @return true if the StackMapData is a base_frame wrapper. */ boolean isWrapper() { return hasStackMapTable && entryType == EARLY_LARVAL; } @Override public boolean isCountable() { return !isWrapper(); } /** * Checks whether all fields corresponding to the current frame type are set. * * @return null if all fields are sufficiently valid to be written for the current stack map entry otherwise * expected token */ JasmTokens.Token checkIntegrity() { switch (entryType) { case SAME_FRAME -> { // 0-63 return null; } case SAME_LOCALS_1_STACK_ITEM_FRAME -> { // 64 - 127 return isFull(stackMap) ? null : STACKMAP; } case EARLY_LARVAL -> { // 246 return isFull(unsetFields) ? null : UNSETFIELDS; } case SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED -> { // 247 if (offset == UNDEFINED) { return OFFSETDELTA; } return isFull(stackMap) ? null : STACKMAP; } case CHOP_1_FRAME, CHOP_2_FRAME, CHOP_3_FRAME, // 248-250 SAME_FRAME_EXTENDED -> { // 251 return (offset == UNDEFINED) ? OFFSETDELTA : null; } case APPEND_FRAME -> { // 252-254 if (offset == UNDEFINED) { return OFFSETDELTA; } return isFull(localsMap) ? null : LOCALSMAP; } case FULL_FRAME -> { // 255 if (offset == UNDEFINED) { return OFFSETDELTA; } if (!isFull(localsMap)) { return LOCALSMAP; } if (!isFull(stackMap)) { return STACKMAP; } } } return null; } private boolean isFull(DataVector... maps) { for (DataVector map : maps) { if (map == null) return false; } return true; } @Override public int getLength() { int length = (hasStackMapTable) ? 1 : 0; if (!isFrameTypeSet() || !hasStackMapTable) { // in the case when either stack_frame_type or frame_type wasn't meet or // StackMap_attribute instead of StackMapTable_attribute entryType = FULL_FRAME; } switch (entryType) { case SAME_FRAME: break; case SAME_LOCALS_1_STACK_ITEM_FRAME: length += stackMap.getLength() - 2; break; case SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED: length += stackMap.getLength(); break; case EARLY_LARVAL: length += 2 + (unsetFields == null ? 0 : unsetFields.getLength()-2); break; case CHOP_1_FRAME: case CHOP_2_FRAME: case CHOP_3_FRAME: case SAME_FRAME_EXTENDED: length += 2; break; case APPEND_FRAME: length += 2 + (localsMap == null ? 0 : (localsMap.getLength() - 2)); break; case FULL_FRAME: length += 2; length += (localsMap == null ? 2 : localsMap.getLength()); length += (stackMap == null ? 2 : stackMap.getLength()); break; default: } return length; } @Override public void write(CheckedDataOutputStream out) throws IOException { if (!hasStackMapTable) { // Indicates that a method's Code attribute doesn't have a StackMapTable attribute (CFV >= 50.0) // but has // StackMap_attribute { // u2 attribute_name_index; // u4 attribute_length; // u2 number_of_entries; // stack_map_entry entries[number_of_entries]; //} where // stack_map_entry { // u2 offset; // u2 number_of_locals; // verification_type_info locals[number_of_locals]; // u2 number_of_stack_items; // verification_type_info stack[number_of_stack_items]; //} entryType = FULL_FRAME; } switch (entryType) { case EARLY_LARVAL -> { out.writeByte(entryType.fromTag()); if (unsetFields == null) { out.writeShort(0); } else { unsetFields.write(out); } } case SAME_FRAME -> { if (!SAME_FRAME.inRange(offset)) { environment.error(scannerPosition, "err.invalid.offset.frame.type", offset, entryType.printName()); break; } out.writeByte(offset); } case SAME_LOCALS_1_STACK_ITEM_FRAME -> { if (stackMap == null) { environment.error(scannerPosition, "err.no.stack.map", entryType.printName()); break; } if (stackMap.elements.size() != 1) { environment.error(scannerPosition, "err.should.be.only.one.stack.map.element", entryType.printName()); break; } // The offset_delta value for the frame is given by the formula frame_type - 64. if (offset >= 64) { environment.error(scannerPosition, "err.invalid.offset.frame.type", offset, entryType.printName()); break; } out.writeByte(entryType.fromTag() + offset); stackMap.writeElements(out); } case SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED -> { if (stackMap == null) { environment.error(scannerPosition, "err.no.locals.map", entryType.printName()); break; } if (stackMap.elements.size() != 1) { environment.error(scannerPosition, "err.should.be.only.one.stack.map.element", entryType.printName()); break; } out.writeByte(entryType.fromTag()); out.writeShort(offset); stackMap.writeElements(out); } case CHOP_1_FRAME, CHOP_2_FRAME, CHOP_3_FRAME, SAME_FRAME_EXTENDED -> { boolean error = false; if (stackMap != null) { environment.error(scannerPosition, "err.unexpected.stack.maps", entryType.printName()); error = true; } if (localsMap != null) { environment.error(scannerPosition, "err.unexpected.locals.maps", entryType.printName()); error = true; } if (error) { break; } out.writeByte(entryType.fromTag()); out.writeShort(offset); } case APPEND_FRAME -> { if (localsMap == null) { environment.error(scannerPosition, "err.no.locals.map", entryType.printName()); break; } if (localsMap.elements.size() > 3) { environment.error(scannerPosition, "err.more.locals.map.elements"); break; } out.writeByte(entryType.fromTag() + localsMap.elements.size() - 1); out.writeShort(offset); localsMap.writeElements(out); } case FULL_FRAME -> { if (hasStackMapTable) { // method's Code attribute has a StackMapTable attribute (CFV >= 50.0) out.writeByte(entryType.fromTag()); out.writeShort(offset); } else { // method's Code attribute doesn't has a StackMap attribute (CFV < 50.0) out.writeShort(pc); } if (localsMap == null) { out.writeShort(0); } else { localsMap.write(out); } if (stackMap == null) { out.writeShort(0); } else { stackMap.write(out); } } default -> environment.error(scannerPosition, "err.stackmap.entry.type.not.set", entryType.fromTag()); } } public StackMap.EntryType getFrameType() { return entryType; } /** * verification_type_info: * Top_variable_info, Integer_variable_info, Float_variable_info, Null_variable_info, * UninitializedThis_variable_info, Long_variable_info, Double_variable_info * Common format: * *_info { * u1 tag = ITEM_*; // from 0 to 6 * } */ static public class StackMapItemTagged implements DataWriter { StackMap.VerificationType itemVerificationType; StackMapItemTagged(StackMap.VerificationType itemVerificationType) { this.itemVerificationType = itemVerificationType; } @Override public int getLength() { return 1; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(itemVerificationType.tag()); } } /** * verification_type_info: * Object_variable_info, Uninitialized_variable_info * Common Format: * *_info { * u1 tag = ITEM_*; // from 7 to 8 * u2 cpool_index/offset; * } */ static public class StackMapItemTaggedPointer implements DataWriter { StackMap.VerificationType itemVerificationType; // Object_variable_info.cpool_index, ITEM_Uninitialized.offset Indexer arg; StackMapItemTaggedPointer(StackMap.VerificationType itemVerificationType, Indexer arg) { this.itemVerificationType = itemVerificationType; this.arg = arg; } @Override public int getLength() { return 3; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(itemVerificationType.tag()); out.writeShort(arg.cpIndex); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/SwitchTable.java000066400000000000000000000120321514323636100262660ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; import java.util.ArrayList; /** * tableswitch * <0-3 byte pad> * defaultbyte1 * defaultbyte2 * defaultbyte3 * defaultbyte4 * lowbyte1 * lowbyte2 * lowbyte3 * lowbyte4 * highbyte1 * highbyte2 * highbyte3 * highbyte4 * jump offsets... * * tableswitch * default: u4 * low: u4 * high: u4 * jump offsets: * * * ... * * or * lookupswitch * <0-3 byte pad> * defaultbyte1 * defaultbyte2 * defaultbyte3 * defaultbyte4 * npairs1 * npairs2 * npairs3 * npairs4 * match-offset pairs... * * lookupswitch * default: u4 * match_count: u4 * match_1: * match_2: * ... * match_n: * */ class SwitchTable { Indexer defLabel = null; ArrayList labels = new ArrayList<>(); ArrayList keys = new ArrayList<>(); // for tableswitch: Indexer[] resLabels; int high, low; int pc, pad; JasmEnvironment environment; SwitchTable(JasmEnvironment environment) { this.environment = environment; } void addEntry(int key, Indexer label) { keys.add(key); labels.add(label); } // for lookupswitch: int calcLookupSwitch(int pc) { this.pc = pc; pad = ((3 - pc) & 0x3); int len = 1 + pad + (keys.size() + 1) * 8; if (defLabel == null) { defLabel = new Indexer(pc + len); } return len; } void writeLookupSwitch(CheckedDataOutputStream out) throws IOException { environment.traceln(() -> " writeLookupSwitch: pc=" + pc + " pad=" + pad + " deflabel=" + defLabel.cpIndex); int k; for (k = 0; k < pad; k++) { out.writeByte(0); } out.writeInt(defLabel.cpIndex - pc); out.writeInt(keys.size()); for (k = 0; k < keys.size(); k++) { out.writeInt(keys.get(k)); out.writeInt((labels.get(k)).cpIndex - pc); } } int recalcTableSwitch(int pc) { int k; int numpairs = keys.size(); int high1 = Integer.MIN_VALUE, low1 = Integer.MAX_VALUE; int numslots = 0; if (numpairs > 0) { for (k = 0; k < numpairs; k++) { int key = keys.get(k); if (key > high1) { high1 = key; } if (key < low1) { low1 = key; } } numslots = high1 - low1 + 1; } environment.traceln(" recalcTableSwitch: low=%d high=%d".formatted(low1, high1)); this.pc = pc; pad = ((3 - pc) & 0x3); int len = 1 + pad + (numslots + 3) * 4; if (defLabel == null) { defLabel = new Indexer(pc + len); } Indexer[] resLabels1 = new Indexer[numslots]; for (k = 0; k < numslots; k++) { resLabels1[k] = defLabel; } for (k = 0; k < numpairs; k++) { environment.traceln(" keys.data[%d]=%s".formatted(k, keys.get(k))); resLabels1[keys.get(k) - low1] = labels.get(k); } this.resLabels = resLabels1; this.labels = null; this.keys = null; this.high = high1; this.low = low1; return len; } void writeTableSwitch(CheckedDataOutputStream out) throws IOException { int k; for (k = 0; k < pad; k++) { out.writeByte(0); } out.writeInt(defLabel.cpIndex - pc); out.writeInt(low); out.writeInt(high); for (k = 0; k < resLabels.length; k++) { out.writeInt(resLabels[k].cpIndex - pc); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/TableFormatModel.java000066400000000000000000000117351514323636100272470ustar00rootroot00000000000000/* * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.jdis.*; import org.openjdk.asmtools.jdis.BootstrapMethodData; import org.openjdk.asmtools.jdis.ConstantPool; import org.openjdk.asmtools.jdis.ExceptionData; import org.openjdk.asmtools.jdis.FieldData; import org.openjdk.asmtools.jdis.InnerClassData; import org.openjdk.asmtools.jdis.LineNumberData; import org.openjdk.asmtools.jdis.LocalVariableData; import org.openjdk.asmtools.jdis.MethodData; import org.openjdk.asmtools.jdis.RecordData; import org.openjdk.asmtools.jdis.StackMapData; /** * The TableFormatModel class stores and manages attributes that support a tabular (javap-like) format, * which can be switched on using the --table option. */ public class TableFormatModel { public enum Token { NOT_SUPPORTED("NotSupported", null, null, null), SOURCE_FILE("SourceFile", EAttribute.ATT_SourceFile, JasmTokens.Token.SOURCEFILE, SourceFileData.class), ENCLOSING_METHOD("EnclosingMethod", EAttribute.ATT_EnclosingMethod, JasmTokens.Token.ENCLOSINGMETHOD, EnclosingMethodData.class), NEST_MEMBERS("NestMembers", EAttribute.ATT_NestMembers, JasmTokens.Token.NESTMEMBERS, NestMembersData.class), NEST_HOST("NestHost", EAttribute.ATT_NestHost, JasmTokens.Token.NESTHOST, NestHostData.class), INNER_CLASSES("InnerClasses", EAttribute.ATT_InnerClasses, JasmTokens.Token.INNERCLASS, InnerClassData.class), SIGNATURE("Signature", EAttribute.ATT_Signature, JasmTokens.Token.SIGNATURE, SignatureData.class), CONSTANT_POOL("Constant pool", null, null, ConstantPool.class), METHOD_DATA("Method_info", null, null, MethodData.class), FIELD_DATA("Field_info", null, null, FieldData.class), RECORD_DATA("record_component_info", null, null, RecordData.class), LINE_NUMBERS("LineNumberTable", EAttribute.ATT_LineNumberTable, JasmTokens.Token.LINETABLE_HEADER, LineNumberData.class), LOCAL_VARIABLES("LocalVariableTable", EAttribute.ATT_LocalVariableTable, JasmTokens.Token.LOCALVARIABLES_HEADER, LocalVariableData.class), LOCAL_VARIABLE_TYPES("LocalVariableTypeTable", EAttribute.ATT_LocalVariableTypeTable, JasmTokens.Token.LOCALVARIABLETYPES_HEADER, LocalVariableTypeData.class), EXCEPTIONS("throws", null, JasmTokens.Token.THROWS, ExceptionData.class), STACK_MAP("StackMap", EAttribute.ATT_StackMap, JasmTokens.Token.STACKMAP, StackMapData.class), STACK_MAP_TABLE("StackMapTable", EAttribute.ATT_StackMapTable, JasmTokens.Token.STACKMAPTABLE_HEADER, StackMapData.class), BOOTSTRAP_METHOD("BootstrapMethods", EAttribute.ATT_BootstrapMethods, JasmTokens.Token.BOOTSTRAPMETHOD, BootstrapMethodData.class); final private String parseKey; final private EAttribute attribute; final private JasmTokens.Token jasmToken; final private String printKey; final private Class owner; Token(String parseKey, EAttribute attribute, JasmTokens.Token jasmToken, Class owner) { this.parseKey = parseKey; this.attribute = attribute; this.jasmToken = jasmToken; this.printKey = "%s".formatted(parseKey); this.owner = owner; } public String parseKey() { return parseKey; } public String printKey() { return printKey; } public boolean isExtendedPrintingSupported() { return owner != null; } public EAttribute getAttribute() { return attribute; } public JasmTokens.Token getJasmToken() { return jasmToken; } public static Token getBy(Class cls) { for (Token item : Token.values()) { if (cls.equals(item.owner)) { return item; } } return NOT_SUPPORTED; } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/TypeAnnotationData.java000066400000000000000000000060461514323636100276330ustar00rootroot00000000000000/* * Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.jasm.TypeAnnotationTypes.ETargetType; import org.openjdk.asmtools.jasm.TypeAnnotationTypes.TypePathEntry; import java.io.IOException; import static java.lang.String.format; import static org.openjdk.asmtools.asmutils.StringUtils.repeat; /** * JVMS 4.7.20. * type_annotation { * u1 target_type; * union { * type_parameter_target; * supertype_target; * type_parameter_bound_target; * empty_target; * formal_parameter_target; * throws_target; * localvar_target; * catch_target; * offset_target; * type_argument_target; * } target_info; * type_path target_path; * u2 type_index; * // * // * u2 num_element_value_pairs; * { u2 element_name_index; * element_value value; * } element_value_pairs[num_element_value_pairs]; * } */ public class TypeAnnotationData extends AnnotationData { protected ETargetType targetType; protected TypeAnnotationTargetInfoData targetInfo; protected TypeAnnotationTypePathData typePath; public TypeAnnotationData(Indexer typeCPX, boolean invisible) { super(typeCPX, invisible); typePath = new TypeAnnotationTypePathData(); } @Override public int getLength() { // lengthOf(annotations[]) + lengthOf(targetType) + lengthOf(targetInfo) + lengthOf(targetInfo) return super.getLength() + 1 + targetInfo.getLength() + typePath.getLength(); } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(targetType.value); targetInfo.write(out); typePath.write(out); super.write(out); } public void addTypePathEntry(TypePathEntry path) { typePath.addTypePathEntry(path); } @Override public String toString() { return format("%s %s %s", targetType.toString(), targetInfo.toString(), typePath.toString()); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/TypeAnnotationTargetInfoData.java000066400000000000000000000357221514323636100316210ustar00rootroot00000000000000/* * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import java.io.IOException; import java.util.ArrayList; import static java.lang.String.format; /** * TargetInfo (4.7.20.1. The target_info union) *

* BaseClass for any Type Annotation Target-Info. */ public abstract class TypeAnnotationTargetInfoData implements DataWriter { protected TypeAnnotationTypes.ETargetType targetType; public TypeAnnotationTargetInfoData(TypeAnnotationTypes.ETargetType targetType) { this.targetType = targetType; } public TypeAnnotationTypes.ETargetType getTargetType() { return targetType; } public String toPrintString() { // print the TargetType and TargetInfo String targetInfo = _toPrintString(); return (targetInfo.isBlank()) ? format(" { %s } ", targetType._toPrintString()) : format(" { %s %s } ", targetType._toPrintString(), targetInfo); } public abstract void write(CheckedDataOutputStream out) throws IOException; @Override public String toString() { return format("%s_target %s", targetType.targetInfo().printValue(), _toString()); } protected abstract String _toPrintString(); protected abstract String _toString(); /** * type_parameter_target (4.7.20.1. The target_info union) *

* The type_parameter_target item indicates that an annotation appears on the declaration of the i'th type parameter * of a generic class, generic interface, generic method, or generic constructor. *

* type_parameter_target { * u1 type_parameter_index; * } */ public static class type_parameter_target extends TypeAnnotationTargetInfoData { int typeParamIndex; public type_parameter_target(TypeAnnotationTypes.ETargetType tt, int index) { super(tt); typeParamIndex = index; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(typeParamIndex); } @Override public int getLength() { return 1; } @Override protected String _toString() { return format("{ type_parameter_index: %d; }", typeParamIndex); } @Override protected String _toPrintString() { return String.valueOf(typeParamIndex); } } /** * supertype_target (4.7.20.1. The target_info union) *

* The supertype_target item indicates that an annotation appears on a type in the extends or implements clause of * a class or interface declaration. *

* supertype_target { * u2 supertype_index; * } */ public static class supertype_target extends TypeAnnotationTargetInfoData { int superTypeIndex; public supertype_target(TypeAnnotationTypes.ETargetType tt, int index) { super(tt); superTypeIndex = index; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(superTypeIndex); } @Override public int getLength() { return 2; } @Override protected String _toString() { return format("{ supertype_index: %d; }", superTypeIndex); } @Override protected String _toPrintString() { return String.valueOf(superTypeIndex); } } /** * type_parameter_bound_target (4.7.20.1. The target_info union) *

* The type_parameter_bound_target item indicates that an annotation appears on the i'th bound of the j'th type * parameter declaration of a generic class, interface, method, or constructor. *

* type_parameter_bound_target { * u1 type_parameter_index; * u1 bound_index; * } */ public static class type_parameter_bound_target extends TypeAnnotationTargetInfoData { int typeParamIndex; int boundIndex; public type_parameter_bound_target(TypeAnnotationTypes.ETargetType tt, int pindx, int bindx) { super(tt); typeParamIndex = pindx; boundIndex = bindx; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(typeParamIndex); out.writeByte(boundIndex); } @Override protected String _toPrintString() { return typeParamIndex + " " + boundIndex; } @Override public int getLength() { return 2; } @Override protected String _toString() { return format("{ type_parameter_index: %d; bound_index: %d; }", typeParamIndex, boundIndex); } } /** * empty_target (4.7.20.1. The target_info union) *

* The empty_target item indicates that an annotation appears on either the type in a field declaration, * the return type of a method, the type of a newly constructed object, or the receiver type of a method or constructor. *

* empty_target { * } */ public static class empty_target extends TypeAnnotationTargetInfoData { public empty_target(TypeAnnotationTypes.ETargetType tt) { super(tt); } @Override protected String _toPrintString() { return ""; } @Override public void write(CheckedDataOutputStream out) throws IOException { // do nothing } @Override public int getLength() { return 0; } @Override protected String _toString() { return "{ }"; } } /** * formal_parameter_target (4.7.20.1. The target_info union) *

* The formal_parameter_target item indicates that an annotation appears on the type in a formal parameter * declaration of a method, constructor, or lambda expression. *

* formal_parameter_target { * u1 formal_parameter_index; * } */ public static class formal_parameter_target extends TypeAnnotationTargetInfoData { int formalParamIndex; public formal_parameter_target(TypeAnnotationTypes.ETargetType tt, int index) { super(tt); formalParamIndex = index; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(formalParamIndex); } @Override protected String _toPrintString() { return String.valueOf(formalParamIndex); } @Override public int getLength() { return 1; } @Override protected String _toString() { return format("{ formal_parameter_index: %d; }", formalParamIndex); } } /** * throws_target (4.7.20.1. The target_info union) *

* The throws_target item indicates that an annotation appears on the i'th type in the throws clause of a method or * constructor declaration. *

* throws_target { * u2 throws_type_index; * } */ public static class throws_target extends TypeAnnotationTargetInfoData { int throwsTypeIndex; public throws_target(TypeAnnotationTypes.ETargetType tt, int index) { super(tt); throwsTypeIndex = index; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(throwsTypeIndex); } @Override public int getLength() { return 2; } @Override protected String _toString() { return format("{ throws_type_index: %d; }", throwsTypeIndex); } @Override protected String _toPrintString() { return String.valueOf(throwsTypeIndex); } } /** * localvar_target (4.7.20.1. The target_info union) *

* The localvar_target item indicates that an annotation appears on the type in a local variable declaration, * including a variable declared as a resource in a try-with-resources statement. *

* localvar_target { * u2 table_length; * { u2 start_pc; * u2 length; * u2 index; * } table[table_length]; * } */ public static class localvar_target extends TypeAnnotationTargetInfoData { ArrayList table; public localvar_target(TypeAnnotationTypes.ETargetType tt, int size) { super(tt); table = new ArrayList<>(size); } public void addEntry(int startPC, int length, int cpx) { LocalVar_Entry entry = new LocalVar_Entry(startPC, length, cpx); table.add(entry); } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(table.size()); for (LocalVar_Entry entry : table) { entry.write(out); } } @Override public int getLength() { return 2 + // U2 for table size (6 * table.size()); // (3 * U2) for each table entry } @Override protected String _toString() { int i = 0; String str = format("{ %d {", table.size()); for (LocalVar_Entry entry : table) { str = str.concat(format(" [%d]: %s;", i++, entry.toString())); } return str.concat(" } }"); } @Override protected String _toPrintString() { final StringBuilder sb = new StringBuilder(); table.stream().forEach(e -> sb.append(e._toPrintString())); return sb.toString(); } public static class LocalVar_Entry { public int startPC; public int length; public int cpx; public LocalVar_Entry(int st, int len, int index) { startPC = st; length = len; cpx = index; } void write(CheckedDataOutputStream out) throws IOException { out.writeShort(startPC); out.writeShort(length); out.writeShort(cpx); } public String toString() { return format("start_pc: %d, length: %d, index: %d", startPC, length, cpx); } protected String _toPrintString() { return "{ " + startPC + " " + length + " " + cpx + " }"; } } } /** * catch_target (4.7.20.1. The target_info union) *

* The catch_target item indicates that an annotation appears on the i'th type in an exception parameter declaration. *

* catch_target { * u2 exception_table_index; * } */ public static class catch_target extends TypeAnnotationTargetInfoData { int exceptionTableIndex; public catch_target(TypeAnnotationTypes.ETargetType tt, int index) { super(tt); exceptionTableIndex = index; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(exceptionTableIndex); } @Override public int getLength() { return 2; } @Override protected String _toString() { return format("{ exception_table_index: %d; }", exceptionTableIndex); } @Override protected String _toPrintString() { return String.valueOf(exceptionTableIndex); } } /** * offset_target (4.7.20.1. The target_info union) *

* The offset_target item indicates that an annotation appears on either the type in an instanceof expression or * a new expression, or the type before the :: in a method reference expression. *

* offset_target { * u2 offset; * } */ public static class offset_target extends TypeAnnotationTargetInfoData { int offset; public offset_target(TypeAnnotationTypes.ETargetType tt, int offset) { super(tt); this.offset = offset; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(offset); } @Override protected String _toPrintString() { return String.valueOf(offset); } @Override public int getLength() { return 2; } @Override protected String _toString() { return format("{ offset: %d; }", offset); } } /** * type_argument_target (4.7.20.1. The target_info union) *

* The type_argument_target item indicates that an annotation appears either on the i'th type in a cast expression, * or on the i'th type argument in the explicit type argument list for any of the following: a new expression, * an explicit constructor invocation statement, a method invocation expression, or a method reference expression *

* type_argument_target { * u2 offset; * u1 type_argument_index; * } */ public static class type_argument_target extends TypeAnnotationTargetInfoData { int offset; int typeArgumentIndex; public type_argument_target(TypeAnnotationTypes.ETargetType targetType, int offset, int index) { super(targetType); this.offset = offset; typeArgumentIndex = index; } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeShort(offset); out.writeByte(typeArgumentIndex); } @Override protected String _toPrintString() { return offset + " " + typeArgumentIndex; } @Override public int getLength() { return 3; } @Override protected String _toString() { return format("{ offset: %d; type_argument_index: %d; }", offset, typeArgumentIndex); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/TypeAnnotationTypePathData.java000066400000000000000000000050341514323636100313060ustar00rootroot00000000000000/* * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.openjdk.asmtools.jasm.TypeAnnotationTypes.TypePathEntry; import java.io.IOException; import java.util.ArrayList; import java.util.stream.Collectors; /** * JVMS 4.7.20.2. The type_path structure *

* type_path { * u1 path_length; * { u1 type_path_kind; * u1 type_argument_index; * } path[path_length]; * } */ public class TypeAnnotationTypePathData implements DataWriter { private ArrayList typePathEntries = new ArrayList<>(); public void addTypePathEntry(TypePathEntry entry) { typePathEntries.add(entry); } @Override public void write(CheckedDataOutputStream out) throws IOException { out.writeByte(typePathEntries.size()); for (TypePathEntry entry : typePathEntries) { out.writeByte(entry.getTypePathKind()); out.writeByte(entry.getTypeArgumentIndex()); } } @Override public int getLength() { return 1 + typePathEntries.size() * 2; } @Override public String toString() { if (typePathEntries.size() > 0) { StringBuilder sb = new StringBuilder("{ "); sb.append(typePathEntries.stream().map(e -> e.toString()).collect(Collectors.joining(", "))); sb.append(" }"); return sb.toString(); } return ""; } /** * jdis: get a string representation of type path structure for kids printing */ public String toPrintString() { return toString(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/TypeAnnotationTypes.java000066400000000000000000000255151514323636100300700ustar00rootroot00000000000000/* * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; /** * Type annotation types: target_type, target_info and target_path */ public class TypeAnnotationTypes { /** * Interpretation of type_path_kind values (Table 4.7.20.2-A) */ public enum EPathKind { ARRAY(0), INNER_TYPE(1), WILDCARD(2), TYPE_ARGUMENT(3); private final int tag; public static final int maxLen = 3; EPathKind(int tag) { this.tag = tag; } public int tag() { return tag; } public String parseKey() { return this.toString(); } static EPathKind getPathKind(String token) { for (EPathKind pk : values()) { if( pk.parseKey().equals(token)) { return pk; } } return null; } } // will throw ArrayIndexOutOfBounds if i < 0 or i > 3 static public EPathKind getPathKind(int i) { return EPathKind.values()[i]; } static public class TypePathEntry { private final EPathKind kind; private final int typeArgumentIndex; public TypePathEntry(int kind, int typeArgumentIndex) { this.kind = getPathKind(kind); this.typeArgumentIndex = typeArgumentIndex; } public TypePathEntry(EPathKind kind, int typeArgumentIndex) { this.kind = kind; this.typeArgumentIndex = typeArgumentIndex; } public int getTypePathKind() { return kind.tag(); } public int getTypeArgumentIndex() { return typeArgumentIndex; } @Override public String toString() { // Chapter 4.7.20.2 The type_path structure // if the value of the type_path_kind is 0,1, or 2, then the value of the // type_argument_index item is 0. return kind.parseKey() + ( kind.tag == 3 ? "{" + typeArgumentIndex +"}" : ""); } } /** * union { * type_parameter_target; * supertype_target; * type_parameter_bound_target; * empty_target; * method_formal_parameter_target; * throws_target; * localvar_target; * catch_target; * offset_target; * type_argument_target; * } target_info; */ public enum ETargetInfo { TYPEPARAM ("TYPEPARAM", "type_parameter"), SUPERTYPE ("SUPERTYPE", "supertype"), TYPEPARAM_BOUND ("TYPEPARAM_BOUND", "type_parameter_bound"), EMPTY ("EMPTY", "empty"), METHODPARAM ("METHODPARAM", "formal_parameter"), EXCEPTION ("EXCEPTION", "throws"), LOCALVAR ("LOCALVAR", "localvar"), CATCH ("CATCH", "catch"), OFFSET ("OFFSET", "offset"), TYPEARG ("TYPEARG", "type_argument"); private final String parseKey; private final String printValue; ETargetInfo(String parse, String printValue) { parseKey = parse; this.printValue = printValue; } public String parseKey() { return this.parseKey; } public String printValue() { return this.printValue; } } /** * Interpretation of target_type values (Table 4.7.20-A./B.) */ static public enum ETargetType { class_type_param (0x00, "CLASS_TYPE_PARAMETER", ETargetInfo.TYPEPARAM, "class/interface type parameter"), meth_type_param (0x01, "METHOD_TYPE_PARAMETER", ETargetInfo.TYPEPARAM, "method/constructor type parameter"), class_exts_impls (0x10, "CLASS_EXTENDS", ETargetInfo.SUPERTYPE, "class extends/implements"), class_type_param_bnds (0x11, "CLASS_TYPE_PARAMETER_BOUND", ETargetInfo.TYPEPARAM_BOUND, "class/interface type parameter bounds"), meth_type_param_bnds (0x12, "METHOD_TYPE_PARAMETER_BOUND", ETargetInfo.TYPEPARAM_BOUND, "method/constructor type parameter bounds"), field (0x13, "FIELD", ETargetInfo.EMPTY, "field"), meth_ret_type (0x14, "METHOD_RETURN", ETargetInfo.EMPTY, "method return type"), meth_receiver (0x15, "METHOD_RECEIVER", ETargetInfo.EMPTY, "method receiver"), meth_formal_param (0x16, "METHOD_FORMAL_PARAMETER", ETargetInfo.METHODPARAM, "method formal parameter type"), throws_type (0x17, "THROWS", ETargetInfo.EXCEPTION, "exception type in throws"), local_var (0x40, "LOCAL_VARIABLE", ETargetInfo.LOCALVAR, "local variable"), resource_var (0x41, "RESOURCE_VARIABLE", ETargetInfo.LOCALVAR, "resource variable"), exception_param (0x42, "EXCEPTION_PARAM", ETargetInfo.CATCH, "exception parameter"), type_test (0x43, "INSTANCEOF", ETargetInfo.OFFSET, "type test (instanceof)"), obj_creat (0x44, "NEW", ETargetInfo.OFFSET, "object creation (new)"), constr_ref_receiver (0x45, "CONSTRUCTOR_REFERENCE_RECEIVER", ETargetInfo.OFFSET, "constructor reference receiver"), meth_ref_receiver (0x46, "METHOD_REFERENCE_RECEIVER", ETargetInfo.OFFSET, "method reference receiver"), cast (0x47, "CAST", ETargetInfo.TYPEARG, "cast"), constr_invoc_typearg (0x48, "CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT", ETargetInfo.TYPEARG, "type argument in constructor call"), meth_invoc_typearg (0x49, "METHOD_INVOCATION_TYPE_ARGUMENT", ETargetInfo.TYPEARG, "type argument in method call"), constr_ref_typearg (0x4A, "CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT", ETargetInfo.TYPEARG, "type argument in constructor reference"), meth_ref_typearg (0x4B, "METHOD_REFERENCE_TYPE_ARGUMENT", ETargetInfo.TYPEARG, "type argument in method reference"); public static final int maxTag = 0x9A; public static final int maxLen = 36; public final int value; private final String parseKey; private final ETargetInfo targetInfo; private final String printVal; ETargetType(int val, String parse, ETargetInfo targetInfo, String printVal) { value = val; parseKey = parse; this.targetInfo = targetInfo; this.printVal = printVal; } public String parseKey() { return parseKey; } public ETargetInfo targetInfo() { return targetInfo; } public String _toPrintString() { return this.parseKey; } @Override public String toString() { return String.format("%s[%#x]", parseKey, value); } public static ETargetType getTargetType(int typeCode) { for( ETargetType type: ETargetType.values() ) { if (type.value == typeCode) { return type; } } return null; } static public ETargetType getTargetType(String typeName) { for( ETargetType type: ETargetType.values() ) { if (type.parseKey.equals(typeName)) { return type; } } return null; } }; /* TypeAnnotationVisitor Methods */ public static class TypeAnnotationTargetVisitor { public final void visit(ETargetType tt) { switch (tt) { case class_type_param: case meth_type_param: visit_type_param_target(tt); break; case class_exts_impls: visit_supertype_target(tt); break; case class_type_param_bnds: case meth_type_param_bnds: visit_typeparam_bound_target(tt); break; case field: case meth_ret_type: case meth_receiver: visit_empty_target(tt); break; case meth_formal_param: visit_methodformalparam_target(tt); break; case throws_type: visit_throws_target(tt); break; case local_var: case resource_var: visit_localvar_target(tt); break; case exception_param: visit_catch_target(tt); break; case type_test: case obj_creat: case constr_ref_receiver: case meth_ref_receiver: visit_offset_target(tt); break; case cast: case constr_invoc_typearg: case meth_invoc_typearg: case constr_ref_typearg: case meth_ref_typearg: visit_typearg_target(tt); break; } } public void visit_type_param_target(ETargetType tt) { } public void visit_supertype_target(ETargetType tt) { } public void visit_typeparam_bound_target(ETargetType tt) { } public void visit_empty_target(ETargetType tt) { } public void visit_methodformalparam_target(ETargetType tt) { } public void visit_throws_target(ETargetType tt) { } public void visit_localvar_target(ETargetType tt) { } public void visit_catch_target(ETargetType tt) { } public void visit_offset_target(ETargetType tt) { } public void visit_typearg_target(ETargetType tt) { } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jasm/i18n.properties000066400000000000000000000406171514323636100261210ustar00rootroot00000000000000# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. info.usage=\ Usage: java -jar asmtools.jar jasm [options] |- compile into class file(s)\n\ \ if - is provided, is used\n\ where possible options include: # see also shared section in asmtools/i18 info.opt.nowrite=\ \ -nowrite Do not write generated class files info.opt.strict=\ \ -strict Consider warnings as errors info.opt.nowarn=\ \ -nowarn Do not print warnings info.opt.cv=\ \ -cv Set operating class file version if not specified in the source file (by default {0}.{1}) info.opt.fixcv=\ \ -fixcv Override class file version in source file(s) info.opt.fixcv.full=\ \ -fixcv Update class file version to major.minor if file''s version is below the threshold() err.cv_requires_arg=-cv option requires the argument err.fix_cv_requires_arg=-fixcv option requires the argument either or - err.invalid_major_minor_param=Invalid parameter err.invalid_threshold_major_minor_param=Invalid parameter \"-fixcv '{-}'\" err.invalid_option=Invalid option: {0} err.byte.limit=Unspecified byte-limit # I/O errors err.cannot.read=Cannot read {0} err.cannot.write=Cannot write to {0} err.cannot.create=Cannot create {0} # Scanner: err.invalid.escape.char=Invalid escape character err.eof.in.comment=Comment isn't terminated at the end of input err.invalid.number=Invalid character "{0}" in number err.invalid.octal.number=Invalid character in octal number err.overflow=Numeric overflow err.float.format=Invalid floating point format err.eof.in.string=String isn't terminated at the end of input err.newline.in.string=String isn't terminated at the end of line warn.funny.char=Invalid character with code {0} in input err.unbalanced.paren=Unbalanced parentheses # Parser: err.package.repeated=Package statement repeated warn.intf.repeated=Interface {0} repeated warn.exc.repeated=Exception repeated in throws clause warn.record.repeated=Record attribute repeated warn.method_info.attribute.repeated=The {0} attribute repeated in the method_info structure err.method_info.attribute.repeated=The {0} attribute repeated in the method_info structure err.toplevel.expected=Class, module or interface declaration expected err.const.def.expected=Constant declaration expected err.field.expected=Class member declaration expected err.token.expected=\"{0}\" token is expected err.token.isnot.expected=\"{0}\" token is not expected err.identifier.expected=Jasm identifier expected err.one.of.two.token.expected=Either \"{0}\" or \"{1}\" token is expected err.one.of.N.token.expected=One of {0} tokens is expected warn.one.of.two.token.expected=Expected \"{0}\" or \"{1}\" token; interpreted as \"{2}\" err.field.descriptor.expected=Either a field descriptor or Constant Pool index expected, got {0} err.class.name.expected=Either a class name or Constant Pool index expected, got {0} err.module.name.expected=Either a module name or Constant Pool index expected, got {0} err.package.name.expected=Either package name or Constant Pool index expected, got {0} err.name.expected=Either name or Constant Pool index expected, got {0} err.int.expected=Integer expected err.value.expected=Value expected near \"{0}\" err.subtag.expected=Subtag expected warn.cannot.delete.class.cell=Cannot delete Constant Pool entry \"{0}\" because only class cells are accepted err.wrong.sourcefile.ref= SourceFile attribute incorrectly points to the ConstantPool # SourceDebugExtension warn.empty.debug.extension=The SourceDebugExtension attribute has the empty debug_extension structure. #Local var index #name_index:#descriptor_index; [ var index name:descriptor; ] #Local type index #name_index:#signature_index; [ var index name:signature; ] err.locvar.expected=A valid index into the local variable array of the current frame expected err.locvar.wrong.index=The index in the local variable array \"{0}\" is not in the range [0..{1}] [0..Code_attribute.max_locals-1] err.locvar.unknown.field.descriptor=Valid field descriptor of the local variable \"{0}\" expected instead of \"{1}\" warn.loctype.wrong.field.signature=Invalid field signature found for local variable in slot \"{0}\": \"{1}\" err.locvar.slot.occupied=The slot \"{0}\" is occupied by another local variable err.locvar.undecl=Local variable isn't declared for the slot \"{0}\" err.fieldType.undecl=Field type isn't declared for the slot \"{0}\" warn.locvar.ambiqous=endvar {0}; expected for the local variable warn.loctype.ambiqous=endtype {0}; expected for the local variable # warn.multiple.inherit=Multiple inheritance is not supported err.const.undecl=Constant #{0} not declared err.const.redecl=Constant Pool entry {0} has been redeclared or overlaps with entry {1} warn.const.fill=Missing Constant Pool entry(ies) {0} might be auto-filled with Utf8[null] warn.const0.redecl=Re-declaration of Constant #0 cannot be written to the class file err.extra.attribute=There may be at most one \"{0}\" attribute in the attributes table of a \"{1}\" structure. warn.redeclared.attribute=The new attribute \"{0}\" overwrites an already declared one in the \"{1}\" structure. warn.extra.attribute=The \"{0}\" attribute is already declared in the constant pool structure. A new value \"{1}\" is used. err.both.nesthost.nestmembers.found=The attribute table of a ClassFile structure must not contain both a NestMembers attribute and a NestHost attribute warn.no.components.in.record.attribute=Record should have at least one component warn.modifiers.ignored=The class access modifier(s) {0} ignored err.neg.forbidden=Negative integer is not allowed err.value.large={0} value {1} does not fit in {2} err.array.type.expected=Array type code expected err.wrong.mnemocode=Invalid mnemocode ({0}) err.unknown.bytecode=Unknown bytecode ({0}) err.default.redecl=Default statement already declared in this table err.long.switchtable=Switch table is too long {0} err.io.exception=I/O error in {0} err.wrong.tag=Wrong tag: {0} expected err.wrong.tag2=Wrong tag: Either {0} or {1} expected warn.wrong.tag=Wrong tag: {0} expected warn.wrong.tag2=Wrong tag: Either {0} or {1} expected err.constant.kind.expected=Expected one of the valid constant kinds from the constant pool # Code Gen: err.label.redecl=Label {0} redeclared err.label.undecl=Label {0} not declared err.label.expected=Label expected err.trap.tryredecl= redeclared err.trap.endtryredecl= redeclared err.trap.notry=No found err.trap.noendtry=No found warn.trap.notref=No declared err.msig.malformed=Malformed method signature at position {0}. {1} err.no.classname=Class name isn't defined warn.msig.more255=Number of parameters too large ({0}>255) warn.repeated.modifier=Ambiguous use of similar modifiers #Interface/class warn.value.object.defined=Class file version {0} does not conform to the new kind of objects; expected version {1} warn.invalid.modifier.interface.set=\"{0}\": If the ACC_INTERFACE flag is set, the ACC_FINAL, ACC_SUPER, ACC_ENUM, and ACC_MODULE flags must not be set. warn.invalid.modifier.interface.set.vo=\"{0}\": If the ACC_INTERFACE flag is set, the ACC_FINAL, ACC_IDENTITY, ACC_ENUM, and ACC_MODULE flags must not be set. warn.invalid.modifier.not.interface.set=\"{0}\": If the ACC_INTERFACE flag is not set ACC_ANNOTATION, and ACC_MODULE flags must not be set. warn.invalid.modifier.not.interface.set.vo=\"{0}\": If the ACC_INTERFACE flag is not set a value class must have at least one of its ACC_FINAL, ACC_IDENTITY, or ACC_ABSTRACT flags set warn.invalid.modifier.int.abs=\"{0}\": If the ACC_INTERFACE flag is set, the ACC_ABSTRACT flag must also be set warn.invalid.modifier.class=Invalid modifier(s) for a class: \"{0}\" warn.invalid.modifier.class.finabs=\"{0}\": Class cannot be both abstract and final # Field warn.invalid.modifier.intfield=\"{0}\": Interface field must be ACC_PUBLIC, ACC_STATIC, and ACC_FINAL only and may have ACC_STRICT_INIT or ACC_SYNTHETIC flag set warn.invalid.modifier.for.value=\"{0}\": Each field of a value class must have at least one of its ACC_STATIC or ACC_STRICT_INIT flags set warn.repeat.signature.field=Signature attribute repeated warn.invalid.modifier.field=Invalid modifier(s) for a field {0} warn.invalid.modifier.acc=\"{0}\": Each field of a class may have at most one of its ACC_PUBLIC, ACC_PRIVATE, and ACC_PROTECTED flags set warn.invalid.modifier.fiva=\"{0}\": Each field of a class must not have both its ACC_FINAL and ACC_VOLATILE flags set # Methods warn.invalid.modifier.mth=Invalid modifier(s) for a method {0} warn.init.in_int= method cannot be an interface method warn.clinit.static=In a class file whose version number is 51.0 or above, a method whose name is must have its ACC_STATIC flag set {0} warn.invalid.modifier.method=Methods of interfaces must not have ACC_PROTECTED, ACC_FINAL, ACC_SYNCHRONIZED and ACC_NATIVE flags set {0} warn.invalid.modifier.intmth.less.52=In a class file whose version number is less than 52.0, each method of interface must be abstract public only {0} warn.invalid.modifier.intmth.is.52=In a class file whose version number is 52.0 or above, each method of an interface must have exactly one of its ACC_PUBLIC and ACC_PRIVATE flags set {0} warn.invalid.modifier.init=Invalid modifier(s) for method {0} warn.invalid.modifier.abst=Invalid modifier(s) for abstract method {0} warn.invalid.modifier.mth.acc=Each method of a class may have at most one of its ACC_PUBLIC, ACC_PRIVATE, and ACC_PROTECTED flags set {0} warn.invalid.modifier.strict=If a method of a class or interface (whose major version number is at least 46 and at most 60) has its ACC_ABSTRACT flag set, it must not have its ACC_STRICT flag set #Code attribute warn.instruction.operand.value.overflow={0} - The argument {2} of the ''{1}'' instruction is written. It is larger than allowed {3} # Inner class warn.invalid.modifier.innerclass=Invalid modifier(s) for an inner class {0} warn.invalid.modifier.innerclasses=Modifier(s) are ignored as they cannot be applied to a group of inner classes warn.no.classes.in.innnerclasses=InnerClasses group should have at least one inner class warn.both.modifiers.apply= Combined \"{0}\" modifiers apply to the InnerClass # Stack frame err.invalid.offset.frame.type=Offset value {0} is not valid for the \"{1}\" entry type err.no.stack.map=Stack map element for the \"{0}\" entry type is absent err.no.locals.map=Locals map element for the \"{0}\" entry type is absent err.should.be.only.one.stack.map.element=Should be only one stack map element for the \"{0}\" entry type err.unexpected.stack.maps=There are unexpected stack maps for the \"{0}\" entry type err.unexpected.locals.maps=There are unexpected locals maps for the \"{0}\" entry type err.more.locals.map.elements=There are more than locals map elements for the \"append_frame\" entry type err.itemtype.expected=StackMap entry type expected instead of {0} err.stackmap.entity.repeated={0} redeclared err.stackmap.entry.type.not.set=StackMap entry type is not set err.invalid.stack.frame.type=Unknown entry type \"{0}\" of the StackMapTable err.stackmaptable.repeated=A method''s Code attribute already has a StackMapTable attribute err.stackmap.map.eligible={0} are only eligible in stack_map_frame {1} # err.stackmap.expected={0} is expected warn.stackmap.expected={0} is expected warn.stackmap.redeclared=The {0} overwrites an already declared one. err.base.frame.expected=base_frame is expected err.larvar.frame.expected=early_larval_frame must be declared before the wrapped base_frame. err.version.expected=class file version expected err.invalid.innerclass=Invalid declaration of Inner Class err.bootstrap.arg.expected=BootstrapMethod argument is expected err.bootstrap.arg.is.not.expected=BootstrapMethod argument is not expected warn.bootstrapmethod.attr.bad=Bad bootstrap method attribute index {0} warn.bootstrapmethod.attr.expected=Invoke dynamic \"{0}\" has undefined method attribute index err.invalid.paramnum=Invalid Parameter Number: {0} err.duplicate.paramnum=Duplicate Parameter Number: {0} err.paramname.constnum.invaltype=ParameterName CPX at {0} is not a ConstantString err.paramname.token.unexpected=Incorrect ParamName, unrecognized token: \"{0}\" #LineNumber table err.expected.linetable=The LineNumberTable format is incorrect; \"{0}\" is expected #LocalValue table err.header.locvars=The table header is incorrect; \"Start Length Slot Name {0}\" is expected err.header.expected.locvars=The table header is expected: \"Start Length Slot Name {0}\" err.expected.locvars=The {0} format is incorrect; {1} is expected # annotations Errors err.incorrect.annot.class=Incorrect Annotation (class), expected class name or CP index, got \"{0}\" err.incorrect.annot.enum.type=Incorrect Annotation (enum), expected type_name or CP index, got \"{0}\" err.incorrect.annot.enum.name==Incorrect Annotation (enum), expected const_name or CP index, got \"{0}\" err.incorrect.annot.token=Incorrect Annotation, unrecognized token: \"{0}\" err.incorrect.annotation=Incorrect Annotation ({0}), expected {1}, got \"{2}\" err.incorrect.annot.keyword=Incorrect Annotation keyword \"{0}\" err.incorrect.typeannot.target=Incorrect TypeAnnotation target \"{0}\" err.incorrect.typeannot.targtype.string=Incorrect TypeAnnotation \"{0}\" argument: (expected String), \"{1}\" err.incorrect.typeannot.targtype.int=Incorrect TypeAnnotation \"{0}\" argument: (expected Integer), \"{1}\" err.incorrect.typeannot.pathentry=Incorrect TypeAnnotation TargetPath PathEntry \"{0}\" err.incorrect.typeannot.pathentry.argindex=Incorrect TypeAnnotation TargetPath PathEntry ArgIndex (expected Integer), \"{0}\" # moduleContent Errors warn.default.cfv=Class file version not specified in file or by -cv parameter. Defaulting to version \"{0}\" warn.isset.cfv=The class file version is set to {0} using the \"-fixcv {1}\" option. err.module.statement.expected= Module statement expected err.requires.expected=Module statement \"requires [transitive | static | mandated | synthetic] ModuleName;\" expected err.exports.expected=Module statement \"exports [mandated | synthetic] PackageName [to ModuleName(1)[,ModuleName(2)[...]]];\" expected err.provides.expected=Module statement \"provides ClassName with ClassName(1)[,ClassName(2)[...]]];\" expected err.opens.expected=Module statement \"opens [mandated | synthetic] PackageName [to ModuleName(1)[,ModuleName(2)[...]]];\" expected err.uses.expected=Module statement \"uses ClassName;\" expected # warn.dot.will.be.converted=Forward slash \"/\" expected instead of dot \".\". The dot is replaced by \"/\" # Compiler Errors err.constcell.empty.nameInfo={0} emptyInfo err.constcell.null.val=Constant Pool Cell {0} without value err.constcell.invarg=Cell[{0}] has #{1} err.entity.not.in.cp=\"{0}\" not found in Constant Pool err.constcell.is.undef=Const Cell has undefined Constant pool index and null value err.constcell.is.null=ConstCell.value can''t be null err.values.not.eq=Seeking value {0} is not equal to found {1} err.instr.null.arg=Null arg for {0} err.instr.wrong.arg={0} has the wrong index #{1} into the Constant Pool warn.instr.wrong.arg={0} has the wrong index #{1} into the Constant Pool err.instr.arg.long=Too long argument of {0}: {1} err.instr.opc.len={0} has wrong length {1} err.instr.opc.unknown={0} has an unknown type err.cpindex.notfound=Constant Pool index {0} is not found err.instr.oversize=The length of the {0} instruction {1} exceeds the allowed limit of {2} bytes # Common errors err.obj.is.null=Fatal Error: Object reference \"{0}\" is null err.invalid.type=Invalid type of Constant Pool Constant {0} jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jcoder/000077500000000000000000000000001514323636100235305ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jcoder/ByteBuffer.java000066400000000000000000000077271514323636100264450ustar00rootroot00000000000000/* * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jcoder; /** * Compiles just 1 source file */ class ByteBuffer extends java.io.OutputStream { String className; /** * The buffer where elements are stored. */ byte data[]; /** * The number of elements in the buffer. */ int length; /** * The size of the increment. If it is 0 the size of the buffer is doubled * everytime it needs to grow. */ protected int capacityIncrement; /** * Constructs an empty vector with the specified storage capacity and the specified * capacityIncrement. * * @param initialCapacity the initial storage capacity of the vector * @param capacityIncrement how much to increase the element's size by. */ public ByteBuffer(int initialCapacity, int capacityIncrement) { this.data = new byte[initialCapacity]; this.capacityIncrement = capacityIncrement; } /** * Constructs an empty vector with the specified storage capacity. * * @param initialCapacity the initial storage capacity of the vector */ public ByteBuffer(int initialCapacity) { this(initialCapacity, 0); } /** * Constructs an empty vector. */ public ByteBuffer() { this(30); } /** * Constructs a full vector. */ public ByteBuffer(byte data[], int capacityIncrement) { this.length = data.length; this.data = data; this.capacityIncrement = capacityIncrement; } /** * Constructs a full vector. */ public ByteBuffer(byte data[]) { this(data, 0); } /** * Returns the number of elements in the vector. Note that this is not the same as the * vector's capacity. */ public final int size() { return length; } /** * Ensures that the vector has at least the specified capacity. * * @param minCapacity the desired minimum capacity */ public final synchronized void ensureCapacity(int minCapacity) { int oldCapacity = data.length; if (minCapacity <= oldCapacity) { return; } byte oldData[] = data; int newCapacity = (capacityIncrement > 0) ? (oldCapacity + capacityIncrement) : (oldCapacity * 2); if (newCapacity < minCapacity) { newCapacity = minCapacity; } data = new byte[newCapacity]; System.arraycopy(oldData, 0, data, 0, length); } /*======================================*/ public void write(int val) { ensureCapacity(length + 1); data[length++] = (byte) val; } public void writeAt(int index, long val, int width) { for (int i = 0; i < width; i++) { data[index + i] = (byte) (val >> (width - 1 - i) * 8); } } public void append(long val, int width) { ensureCapacity(length + width); writeAt(length, val, width); length += width; } } // end ByteBuffer jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jcoder/JcodTokens.java000066400000000000000000000227121514323636100264420ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jcoder; import org.openjdk.asmtools.common.structure.StackMap; import org.openjdk.asmtools.jasm.ClassFileConst; import java.util.HashMap; /** * JcodTokens *

* This class contains tokens specific to parsing JCOD syntax. *

* The classes in JcodTokens are following a Singleton Pattern. These classes are Enums, * and they are contained in private hash maps (lookup tables and reverse lookup tables). * These hash maps all have public accessors, which clients use to look-up enums. *

* Tokens in this table carry no external state, and are typically treated as constants. * They do not need to be reset. */ public class JcodTokens { /*-------------------------------------------------------- */ /* Marker: describes the type of Keyword */ static public enum KeywordType { TOKEN(0, "TOKEN"), KEYWORD(3, "KEYWORD"); private final Integer value; private final String printval; KeywordType(Integer val, String print) { value = val; printval = print; } public String printval() { return printval; } } /*-------------------------------------------------------- */ /* Marker - describes the type of token */ /* this is rather cosmetic, no function currently. */ static public enum TokenType { VALUE(0, "Value"), KEYWORDS(1, "Keywords"), PUNCTUATION(2, "Punctuation"), JDEC(3, "JDec"), STACKMAP(4, "StackMap"), MISC(5, "Misc"); private final Integer value; private final String printVal; TokenType(Integer val, String printVal) { value = val; this.printVal = printVal; } public String printVal() { return printVal; } } /*-------------------------------------------------------- */ /** * Scanner Tokens (Definitive List) */ static public enum Token { EOF(-1, "EOF", "EOF", TokenType.MISC), IDENT(60, "IDENT", "IDENT", TokenType.VALUE), LONGSTRINGVAL(61, "LONGSTRINGVAL", "LONGSTRING", TokenType.VALUE), INTVAL(65, "INTVAL", "INT", TokenType.VALUE), LONGVAL(66, "LONGVAL", "LONG", TokenType.VALUE), STRINGVAL(69, "STRINGVAL", "STRING", TokenType.VALUE), CLASS(70, "CLASS", "class", TokenType.KEYWORDS, KeywordType.KEYWORD), INTERFACE(71, "INTERFACE", "interface", TokenType.KEYWORDS, KeywordType.KEYWORD), DIV(72, "DIV", "div", TokenType.KEYWORDS), EQ(73, "EQ", "eq", TokenType.KEYWORDS), ASSIGN(74, "ASSIGN", "assign", TokenType.KEYWORDS), MODULE(75, "MODULE", "module", TokenType.KEYWORDS, KeywordType.KEYWORD), COLON(134, "COLON", ":", TokenType.PUNCTUATION), SEMICOLON(135, "SEMICOLON", ";", TokenType.PUNCTUATION, KeywordType.KEYWORD), COMMA(0, "COMMA", ",", TokenType.PUNCTUATION, KeywordType.KEYWORD), LBRACE(138, "LBRACE", "{", TokenType.PUNCTUATION, KeywordType.KEYWORD), RBRACE(139, "RBRACE", "}", TokenType.PUNCTUATION, KeywordType.KEYWORD), LPAREN(140, "LPAREN", "(", TokenType.PUNCTUATION, KeywordType.KEYWORD), RPAREN(141, "RPAREN", ")", TokenType.PUNCTUATION, KeywordType.KEYWORD), LSQBRACKET(142, "LSQBRACKET", "[", TokenType.PUNCTUATION, KeywordType.KEYWORD), RSQBRACKET(143, "RSQBRACKET", "]", TokenType.PUNCTUATION, KeywordType.KEYWORD), BYTEINDEX(156, "BYTEINDEX", "b", TokenType.JDEC, KeywordType.KEYWORD), SHORTINDEX(157, "SHORTINDEX", "s", TokenType.JDEC, KeywordType.KEYWORD), ATTR(158, "ATTR", "Attr", TokenType.JDEC, KeywordType.KEYWORD), BYTES(159, "BYTES", "Bytes", TokenType.JDEC, KeywordType.KEYWORD), MACRO(160, "MACRO", "Attr", TokenType.JDEC), COMP(161, "COMP", "Component", TokenType.JDEC, KeywordType.KEYWORD), FILE(162, "FILE", "file", TokenType.JDEC, KeywordType.KEYWORD), ZEROINDEX(163, "ZEROINDEX", "z", TokenType.STACKMAP, KeywordType.KEYWORD); private Integer value; private String printval; private String parsekey; private TokenType tk_type; private KeywordType key_type; // By default, if a KeywordType is not specified, it has the value 'TOKEN' Token(Integer val, String print, String op) { init(val, print, op, TokenType.VALUE, KeywordType.TOKEN); } Token(Integer val, String print, String op, TokenType tt) { init(val, print, op, tt, KeywordType.TOKEN); } Token(Integer val, String print, String op, TokenType tt, KeywordType kt) { init(val, print, op, tt, kt); } private void init(Integer val, String print, String op, TokenType tt, KeywordType kt) { value = val; printval = print; parsekey = op; tk_type = tt; key_type = kt; } public String printval() { return printval; } public String parsekey() { return parsekey; } public int value() { return value; } @Override public String toString() { return "<" + printval + "> [" + value + "]"; } } /** * Initialized keyword and token Hash Maps (and Reverse Tables) */ protected static final int MaxTokens = 172; private static HashMap TagToTokens = new HashMap<>(MaxTokens); private static HashMap SymbolToTokens = new HashMap<>(MaxTokens); private static HashMap ParsekeyToTokens = new HashMap<>(MaxTokens); protected static final int MaxKeywords = 40; private static HashMap TagToKeywords = new HashMap<>(MaxKeywords); private static HashMap SymbolToKeywords = new HashMap<>(MaxKeywords); private static HashMap ParsekeyToKeywords = new HashMap<>(MaxKeywords); static { // register all the tokens for (Token tk : Token.values()) { registerToken(tk); } SymbolToKeywords.put(Token.INTVAL.printval(), Token.INTVAL); ParsekeyToKeywords.put(Token.INTVAL.parsekey(), Token.INTVAL); SymbolToKeywords.put(Token.STRINGVAL.printval(), Token.STRINGVAL); ParsekeyToKeywords.put(Token.STRINGVAL.parsekey(), Token.STRINGVAL); } private static void registerToken(Token tk) { // Tag is a keyword if (tk.key_type == KeywordType.KEYWORD) { TagToKeywords.put(tk.value, tk); SymbolToKeywords.put(tk.printval, tk); if (tk.parsekey != null) { ParsekeyToKeywords.put(tk.parsekey, tk); } } // Finally, register all tokens TagToTokens.put(tk.value, tk); SymbolToTokens.put(tk.printval, tk); ParsekeyToTokens.put(tk.printval, tk); } /* Token accessors */ public static Token token(int tk) { return TagToTokens.get(tk); } public static Token keyword_token(int tk) { return TagToKeywords.get(tk); } /* Reverse lookup accessors */ public static Token token(String parsekey) { return ParsekeyToTokens.get(parsekey); } public static Token keyword_token(String parsekey) { return ParsekeyToKeywords.get(parsekey); } /* Reverse lookup by ID accessors */ public static Token token_ID(String ID) { return ParsekeyToTokens.get(ID); } public static Token keyword_token_ID(String ID) { return ParsekeyToKeywords.get(ID); } public static String keywordName(int token) { String retval = ""; if (token > TagToTokens.size()) { retval = null; } else { Token tk = keyword_token(token); if (tk != null) { retval = tk.parsekey; } } return retval; } public static Token keyword_token_ident(String idValue) { Token kwd = keyword_token(idValue); if (kwd == null) { kwd = Token.IDENT; } return kwd; } public static int keyword_token_int(String idValue) { return keyword_token_ident(idValue).value(); } public static int getConstTagByParseString(String stringValue) { ClassFileConst.ConstType constType = ClassFileConst.getByParseKey(stringValue); return constType != null ? constType.getTag() : StackMap.VerificationType.getByParseKey(stringValue).tag(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jcoder/Jcoder.java000066400000000000000000000661061514323636100256120ustar00rootroot00000000000000/* * Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jcoder; import org.openjdk.asmtools.common.SyntaxError; import org.openjdk.asmtools.common.structure.EAttribute; import java.io.*; import java.nio.charset.Charset; import java.util.*; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.CONSTANT_CLASS; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.CONSTANT_UTF8; import static org.openjdk.asmtools.jasm.JasmTokens.Token.SEMICOLON; import static org.openjdk.asmtools.jasm.JasmTokens.Token.STRINGVAL; import static org.openjdk.asmtools.jcoder.JcodTokens.Token; /** * Compiles just 1 source file */ class Jcoder { protected JcoderEnvironment environment; protected Scanner scanner; protected Hashtable attributes = new Hashtable<>(); /*-------------------------------------------------------- */ /* Jcoder Fields */ private final ArrayList Classes = new ArrayList<>(); private ByteBuffer buf; private DataOutputStream outStream; private int depth = 0; private String tabStr = ""; private final Context context; /*-------------------------------------------------------- */ /* Jcoder inner classes */ /*-------------------------------------------------------- */ /* ContextTag (marker) - describes the type of token */ /* this is rather cosmetic, no function currently. */ private enum ContextTag { NULL(""), CLASS("Class"), CONSTANTPOOL("Constant-Pool"), INTERFACES("Interfaces"), INTERFACE("Interface"), METHODS("Methods"), METHOD("Method"), FIELDS("Fields"), FIELD("Field"), ATTRIBUTE("Attribute"); private final String printValue; ContextTag(String value) { printValue = value; } public String printval() { return printValue; } } /* ContextVal (marker) - Specific value on a context stack */ private static class ContextVal { public ContextTag tag; int compCount; ContextVal owner; ContextVal(ContextTag tg) { tag = tg; compCount = 0; owner = null; } ContextVal(ContextTag tg, ContextVal ownr) { tag = tg; compCount = 0; owner = ownr; } } /* Context - Context stack */ public static class Context { Stack stack; private boolean hasCP; private boolean hasMethods; private boolean hasInterfaces; private boolean hasFields; // Index of the constant pool entry, used for identity of the Attribute private int cpIndex = 0; Context() { stack = new Stack<>(); init(); } boolean isConstantPool() { return !stack.empty() && (stack.peek().tag == ContextTag.CONSTANTPOOL); } boolean isAttribute() { return !stack.empty() && (stack.peek().tag == ContextTag.ATTRIBUTE); } public void init() { stack.removeAllElements(); hasCP = false; hasMethods = false; hasInterfaces = false; hasFields = false; cpIndex = 0; } void update() { if (stack.empty()) { stack.push(new ContextVal(ContextTag.CLASS)); return; } ContextVal currentCtx = stack.peek(); switch (currentCtx.tag) { case CLASS -> { if (!hasCP) { stack.push(new ContextVal(ContextTag.CONSTANTPOOL)); hasCP = true; } else if (!hasInterfaces) { stack.push(new ContextVal(ContextTag.INTERFACES)); hasInterfaces = true; } else if (!hasFields) { stack.push(new ContextVal(ContextTag.FIELDS)); hasFields = true; } else if (!hasMethods) { stack.push(new ContextVal(ContextTag.METHODS)); hasMethods = true; } else { // must be class attributes currentCtx.compCount += 1; stack.push(new ContextVal(ContextTag.ATTRIBUTE, currentCtx)); } } case INTERFACES -> { currentCtx.compCount += 1; stack.push(new ContextVal(ContextTag.INTERFACE, currentCtx)); } case FIELDS -> { currentCtx.compCount += 1; stack.push(new ContextVal(ContextTag.FIELD, currentCtx)); } case METHODS -> { currentCtx.compCount += 1; stack.push(new ContextVal(ContextTag.METHOD, currentCtx)); } case FIELD, METHOD, ATTRIBUTE -> { currentCtx.compCount += 1; stack.push(new ContextVal(ContextTag.ATTRIBUTE, currentCtx)); } } } void exit() { if (!stack.isEmpty()) { stack.pop(); } } public String toString() { if (stack.isEmpty()) { return ""; } ContextVal currentCtx = stack.peek(); String retval = currentCtx.tag.printval(); switch (currentCtx.tag) { case INTERFACE, METHOD, FIELD, ATTRIBUTE -> { if (currentCtx.owner != null) { retval += "[" + currentCtx.owner.compCount + "]"; } } } return retval; } public void setConstantPoolIndex(int cpx) { cpIndex = cpx; } public int getConstantPoolIndex() { return cpIndex; } } /* Jcoder */ /** * Create a parser */ Jcoder(JcoderEnvironment environment, HashMap macros) throws IOException { scanner = new Scanner(environment, macros); this.environment = environment; context = new Context(); } /** * Expect a token, return its value, scan the next token or throw an exception. */ private void expect(Token t) throws SyntaxError, IOException { if (scanner.token != t) { environment.traceln(() -> "expect: %s instead of %s".formatted(t.printval(), scanner.token.printval())); if (t == Token.IDENT) { environment.error(scanner.pos, "err.identifier.expected"); } else { environment.error(scanner.pos, "err.token.expected", t.toString()); } throw new SyntaxError(); } scanner.scan(); } private void recoverField() throws SyntaxError, IOException { while (true) { switch (scanner.token) { case LBRACE -> { scanner.match(Token.LBRACE, Token.RBRACE); scanner.scan(); } case LPAREN -> { scanner.match(Token.LPAREN, Token.RPAREN); scanner.scan(); } case LSQBRACKET -> { scanner.match(Token.LSQBRACKET, Token.RSQBRACKET); scanner.scan(); } case RBRACE, EOF, INTERFACE, CLASS -> // begin of something outside a class, panic more throw new SyntaxError(); default -> // don't know what to do, skip scanner.scan(); } } } /** * Parse an array of struct. */ private void parseArray() throws IOException { scanner.scan(); int length0 = buf.length; long pos0 = scanner.pos; int num_expected; if (scanner.token == Token.INTVAL) { num_expected = scanner.intValue; scanner.scan(); } else { num_expected = -1; } expect(Token.RSQBRACKET); int numSize; switch (scanner.token) { case BYTEINDEX -> { scanner.scan(); numSize = 1; } case SHORTINDEX -> { scanner.scan(); numSize = 2; } case ZEROINDEX -> { scanner.scan(); numSize = 0; } default -> numSize = 2; } buf.append(num_expected, numSize); int num_present = parseStruct(); if (num_expected == -1) { environment.trace(" buf.writeAt(" + length0 + ", " + num_present + ", " + numSize + "); "); // skip array size if (numSize > 0) { buf.writeAt(length0, num_present, numSize); } } else if (num_expected != num_present) { if (context.isConstantPool() && num_expected == num_present + 1) return; environment.warning(pos0, "warn.array.wronglength", num_expected, num_present); } } /** * Parse a byte array. */ private void parseByteArray() throws IOException { scanner.scan(); expect(Token.LSQBRACKET); int length0 = buf.length; long pos0 = scanner.pos; int len_expected; if (scanner.token == Token.INTVAL) { len_expected = scanner.intValue; scanner.scan(); } else { len_expected = -1; } expect(Token.RSQBRACKET); int lenSize; switch (scanner.token) { case BYTEINDEX -> { scanner.scan(); lenSize = 1; } case SHORTINDEX -> { scanner.scan(); lenSize = 2; } case ZEROINDEX -> { scanner.scan(); lenSize = 0; } default -> lenSize = 4; } // skip array size if (lenSize > 0) { buf.append(len_expected, lenSize); } int length1 = buf.length; parseStruct(); int len_present = buf.length - length1; if (len_expected == -1) { environment.trace(" buf.writeAt(" + length0 + ", " + len_present + ", " + lenSize + "); "); // skip array size if (lenSize > 0) { buf.writeAt(length0, len_present, lenSize); } } else if (len_expected != len_present) { environment.warning(pos0, "warn.array.wronglength", len_expected, len_present); } } /** * Parse an Attribute. */ private void parseAttr() throws IOException { scanner.scan(); expect(Token.LPAREN); int cpx; // index int const. pool if (scanner.token == Token.INTVAL) { cpx = scanner.intValue; context.setConstantPoolIndex(cpx); scanner.scan(); } else { environment.error(scanner.pos, "err.attrname.expected"); throw new SyntaxError(); } buf.append(cpx, 2); long pos0 = scanner.pos; int length0 = buf.length; int len_expected; if (scanner.token == Token.COMMA) { scanner.scan(); len_expected = scanner.intValue; expect(Token.INTVAL); } else { len_expected = -1; } buf.append(len_expected, 4); expect(Token.RPAREN); parseStruct(); int len_present = buf.length - (length0 + 4); if (len_expected == -1) { buf.writeAt(length0, len_present, 4); } else if (len_expected != len_present) { environment.warning(pos0, "warn.attr.wronglength", len_expected, len_present); } } // end parseAttr /** * Parse a Component of JavaCard .cap file. */ private void parseComp() throws IOException { scanner.scan(); expect(Token.LPAREN); int tag = scanner.intValue; // index int const. pool expect(Token.INTVAL); buf.append(tag, 1); long pos0 = scanner.pos; int length0 = buf.length; int len_expected; if (scanner.token == Token.COMMA) { scanner.scan(); len_expected = scanner.intValue; expect(Token.INTVAL); } else { len_expected = -1; } buf.append(len_expected, 2); expect(Token.RPAREN); parseStruct(); int len_present = buf.length - (length0 + 2); if (len_expected == -1) { buf.writeAt(length0, len_present, 2); } else if (len_expected != len_present) { environment.warning(pos0, "warn.attr.wronglength", len_expected, len_present); } } // end parseComp private void adjustDepth(boolean up) { if (up) { depth += 1; context.update(); scanner.setDebugCP(context.isConstantPool()); } else { depth -= 1; context.exit(); } int tabAmt = 4; int len = depth * tabAmt; tabStr = " ".repeat(Math.max(0, len)); } /** * Parse a structure. */ private int parseStruct() throws IOException { int scanedCFV = 0; int minor = 0; int major = 0; adjustDepth(true); environment.traceln(" "); environment.traceln(tabStr + "MapStruct { <" + context + "> "); expect(Token.LBRACE); int num = 0; int addElem = 0; while (true) { try { switch (scanner.token) { case COMMA: // ignored scanner.scan(); break; case SEMICOLON: num++; addElem = 0; scanner.scan(); break; case CLASS: scanner.addConstDebug(CONSTANT_CLASS); environment.trace("class "); scanner.longValue = CONSTANT_CLASS.getTag(); scanner.intSize = 1; case INTVAL: environment.trace("int [" + scanner.longValue + "] "); if (scanner.longValue == 0xCAFEBABEl && environment.cfv.isSetByParameter()) { scanedCFV++; } else { if (scanedCFV > 0) { if (scanedCFV == 1) { scanedCFV++; minor = scanner.intValue; // skip writing until major analysis scanner.scan(); break; } else { scanedCFV = 0; major = scanner.intValue; environment.trace(" Got file version: " + major + ":" + minor); // check version update if needed and go on environment.cfv.setFileVersion((short) major, (short) minor); buf.append(environment.cfv.minor_version(), scanner.intSize); buf.append(environment.cfv.major_version(), scanner.intSize); scanner.scan(); addElem = 1; break; } } } buf.append(scanner.longValue, scanner.intSize); scanner.scan(); addElem = 1; break; case STRINGVAL: String name = parseUTF(); if (context.isConstantPool()) { EAttribute attr = EAttribute.get(name); if (attr != EAttribute.ATT_Unrecognized) { attributes.put(num, attr); } } // SEMICOLON was already parsed in num++; addElem = 0; break; case LONGSTRINGVAL: scanner.scan(); environment.traceln(tabStr + "LongString [\"" + Arrays.toString(scanner.longStringValue.data) + "\"] "); buf.write(scanner.longStringValue.data, 0, scanner.longStringValue.length); addElem = 1; break; case LBRACE: parseStruct(); addElem = 1; break; case LSQBRACKET: parseArray(); addElem = 1; break; case BYTES: environment.trace("bytes "); parseByteArray(); addElem = 1; break; case ATTR: environment.trace("attr "); parseAttr(); addElem = 1; break; case COMP: environment.trace("comp "); parseComp(); addElem = 1; break; case RBRACE: scanner.scan(); environment.traceln(System.lineSeparator() + tabStr + "} // MapStruct <" + context + "> ]"); adjustDepth(false); return num + addElem; default: environment.traceln("unexp token=" + scanner.token); environment.traceln(" scanner.stringval = \"" + scanner.stringValue + "\""); environment.error(scanner.pos, "err.element.expected"); throw new SyntaxError(); } } catch (SyntaxError e) { recoverField(); } } } // end parseStruct String decodeText(String input, String encoding) throws IOException { return new BufferedReader( new InputStreamReader( new ByteArrayInputStream(input.getBytes()), Charset.forName(encoding))) .readLine(); } // Parse multiline UTF strings private String parseUTF() throws IOException { StringBuilder sb = new StringBuilder(); boolean prevSemicolonParsed = true; while (true) { switch (scanner.token) { case STRINGVAL: if (!prevSemicolonParsed) { environment.error(scanner.pos, "err.token.expected", SEMICOLON.parseKey()); throw new SyntaxError(); } scanner.scan(); scanner.addConstDebug(CONSTANT_UTF8); environment.traceln(tabStr + "UTF8 [\"" + scanner.stringValue + "\"] "); sb.append(scanner.stringValue); prevSemicolonParsed = false; break; case SEMICOLON: if (prevSemicolonParsed) { environment.error(scanner.pos, "err.token.expected", STRINGVAL.parseKey()); throw new SyntaxError(); } prevSemicolonParsed = true; scanner.scan(); break; default: if (!prevSemicolonParsed) { environment.error(scanner.pos, "err.token.expected", SEMICOLON.parseKey()); throw new SyntaxError(); } if (context.isAttribute() && attributes.get(context.getConstantPoolIndex()) == EAttribute.ATT_SourceDebugExtension) { outStream.writeBytes(sb.toString()); } else { outStream.writeUTF(sb.toString()); } return sb.toString(); } } } /** * Recover after a syntax error in the file. This involves discarding tokens until an * EOF or a possible legal continuation is encountered. */ private void recoverFile() throws IOException { while (true) { switch (scanner.token) { case CLASS, INTERFACE, EOF -> { // Start of a new source file statement, continue or EOF return; } case LBRACE -> { scanner.match(Token.LBRACE, Token.RBRACE); scanner.scan(); } case LPAREN -> { scanner.match(Token.LPAREN, Token.RPAREN); scanner.scan(); } case LSQBRACKET -> { scanner.match(Token.LSQBRACKET, Token.RSQBRACKET); scanner.scan(); } default -> // Don't know what to do, skip scanner.scan(); } } } /** * Parse module declaration */ private void parseModule() throws IOException { // skip module name as a redundant element scanner.skipTill(Scanner.LBRACE); buf = new ByteBuffer(); outStream = new DataOutputStream(buf); buf.className = "module-info.class"; scanner.scan(); environment.traceln("starting " + buf.className); // Parse the clause parseClause(); environment.traceln("ending " + buf.className); } /** * Parse a class or interface declaration. */ private void parseClass(Token prev) throws IOException { scanner.scan(); buf = new ByteBuffer(); outStream = new DataOutputStream(buf); // Parse the class name switch (scanner.token) { case BYTEINDEX, SHORTINDEX, ATTR, BYTES, MACRO, COMP, FILE, IDENT -> { if (prev == Token.FILE) { buf.className = scanner.stringValue; } else { buf.className = scanner.stringValue + ".class"; } } case STRINGVAL -> buf.className = scanner.stringValue; default -> { environment.error(scanner.prevPos, "err.name.expected", "\"" + scanner.token.parsekey() + "\""); throw new SyntaxError(); } } scanner.scan(); environment.traceln("starting class " + buf.className); // Parse the clause parseClause(); environment.traceln("ending class " + buf.className); } // end parseClass private void parseClause() throws IOException { switch (scanner.token) { case LBRACE -> parseStruct(); case LSQBRACKET -> parseArray(); case BYTES -> parseByteArray(); case ATTR -> parseAttr(); case COMP -> parseComp(); default -> environment.error(scanner.pos, "err.struct.expected"); } } // Parse an Jcoder file. void parseFile() { environment.traceln("PARSER"); context.init(); if (scanner.token == Token.EOF) { environment.error("err.file.empty", environment.getSimpleInputFileName()); return; } try { while (scanner.token != Token.EOF) { try { switch (scanner.token) { case CLASS, MODULE, INTERFACE, FILE -> { Token t = scanner.token; if (t == Token.MODULE) { parseModule(); } else { parseClass(t); } // End of the class,interface or module Classes.add(buf); } case SEMICOLON -> // Bogus semi colon scanner.scan(); case EOF -> { return; // The end } default -> { environment.traceln("unexpected token=" + scanner.token); environment.error(scanner.pos, "err.toplevel.expected"); throw new SyntaxError(); } } } catch (SyntaxError e) { String msg = e.getMessage(); environment.traceln(() -> "SyntaxError %s".formatted(msg == null ? "" : msg)); environment.printException(e); recoverFile(); } } } catch (IOException e) { environment.error(scanner.pos, "err.io.exception", environment.getSimpleInputFileName()); } } //end parseFile /** * write to the directory passed with -d option */ public void write(ByteBuffer cls) throws IOException { String myname = cls.className; if (myname == null) { environment.error("err.cannot.write"); return; } try (BufferedOutputStream bos = new BufferedOutputStream(environment.getToolOutput().getDataOutputStream())) { bos.write(cls.data, 0, cls.length); } catch (IOException ignored) { } } /** * Writes the classes */ public void write() throws IOException { for (ByteBuffer cls : Classes) { environment.getToolOutput().startClass(cls.className, Optional.empty(), environment); write(cls); environment.getToolOutput().finishClass(cls.className); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jcoder/JcoderEnvironment.java000066400000000000000000000153471514323636100300400ustar00rootroot00000000000000/* * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110EOF301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jcoder; import org.openjdk.asmtools.common.CompilerLogger; import org.openjdk.asmtools.common.EMessageKind; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.common.inputs.TextInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.common.structure.CFVersion; import java.io.DataInputStream; import java.io.IOException; import java.net.URISyntaxException; import static org.openjdk.asmtools.common.CompilerConstants.*; public class JcoderEnvironment extends Environment { final CFVersion cfv; InputFile inputFile; /** * @param builder the jcoder environment builder */ private JcoderEnvironment(Builder builder) { super(builder); cfv = new CFVersion(); } @Override public void setToolInput(ToolInput toolInput) throws IOException, URISyntaxException { try { // content of the jcod input file super.setToolInput(toolInput); this.inputFile = new InputFile(getDataInputStream()); } catch (IOException ioe) { error("err.cannot.read", toolInput); throw ioe; } } // proxy methods @Override public void warning(long where, String id, Object... args) { getLogger().warning(where, id, args); } @Override public void error(long where, String id, Object... args) { getLogger().error(where, id, args); } @Override public void warning(String id, Object... args) { getLogger().warning(NOWHERE, id, args); } @Override public void error(String id, Object... args) { getLogger().error(NOWHERE, id, args); } // Jcoder specific methods public long getErrorCount() { return getLogger().getCount(EMessageKind.ERROR); } public boolean hasMessages() { return !super.getLogger().noMessages(); } /** * @param printTotals whether to print the total line: N warning(s), K error(s) * @return 0 if there are no errors otherwise a number of errors */ public int flush(boolean printTotals) { return super.getLogger().flush(printTotals); } public long getPosition() { return inputFile == null ? 0 : inputFile.position; } public int read() throws IOException { return inputFile.readUTF(); } static class JcoderBuilder extends Builder { public JcoderBuilder(ToolOutput toolOutput, DualStreamToolOutput log) { super(toolOutput, new CompilerLogger("jcoder", JcoderEnvironment.class, log)); } @Override public JcoderEnvironment build() { return new JcoderEnvironment(this); } } class InputFile extends TextInput { private int pushBack = EOF; private int index = 0; InputFile(DataInputStream dataInputStream) throws IOException { super(dataInputStream); } private int getChar() { try { return strData.charAt(index++); } catch (StringIndexOutOfBoundsException e) { return EOF; } } @Override public int readUTF() { position = ((long) linepos << OFFSET_BITS) | charPos; charPos += OFFSET_INC; int c = pushBack; if (c == EOF) { c = getChar(); } else { pushBack = EOF; } // parse special characters switch (c) { case BACKSLASH -> { // BACKSLASH is a special code indicating a pushback of a backslash that // definitely isn't the start of a unicode sequence. return '\\'; } case '\\' -> { if ((c = getChar()) != 'u') { pushBack = (c == '\\' ? BACKSLASH : c); return '\\'; } // we have a unicode sequence charPos += OFFSET_INC; while ((c = getChar()) == 'u') { charPos += OFFSET_INC; } // unicode escape sequence int d = 0; for (int i = 0; i < 4; i++, charPos += OFFSET_INC, c = getChar()) { switch (c) { case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' -> d = (d << 4) + c - '0'; case 'a', 'b', 'c', 'd', 'e', 'f' -> d = (d << 4) + 10 + c - 'a'; case 'A', 'B', 'C', 'D', 'E', 'F' -> d = (d << 4) + 10 + c - 'A'; default -> { error(position, "err.invalid.escape.char"); pushBack = c; return d; } } } pushBack = c; return d; } case '\n' -> { linepos++; return '\n'; } case '\r' -> { if ((c = getChar()) != '\n') { pushBack = c; } else { charPos += OFFSET_INC; } linepos++; return '\n'; } default -> { return c; } } } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jcoder/JcoderTool.java000066400000000000000000000035161514323636100264440ustar00rootroot00000000000000/* * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jcoder; import org.openjdk.asmtools.common.Compiler; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.common.outputs.log.StderrLog; public abstract class JcoderTool extends Compiler { protected JcoderTool(ToolOutput toolOutput) { super(toolOutput, new StderrLog()); } protected JcoderTool(ToolOutput toolOutput, DualStreamToolOutput logger) { super(toolOutput, logger); } @Override public JcoderEnvironment getEnvironment(ToolOutput toolOutput, DualStreamToolOutput log) { JcoderEnvironment.JcoderBuilder builder = new JcoderEnvironment.JcoderBuilder(toolOutput, log); return builder.build(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jcoder/Main.java000066400000000000000000000302021514323636100252540ustar00rootroot00000000000000/* * Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jcoder; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.common.inputs.FileInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.PrintWriterOutput; import org.openjdk.asmtools.common.outputs.StdoutOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualOutputStreamOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import java.io.IOException; import java.io.PrintStream; import java.io.PrintWriter; import java.net.URISyntaxException; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.regex.PatternSyntaxException; import static org.openjdk.asmtools.Main.*; import static org.openjdk.asmtools.common.Environment.FAILED; import static org.openjdk.asmtools.common.Environment.OK; import static org.openjdk.asmtools.common.outputs.FSOutput.FSDestination.DIR; import static org.openjdk.asmtools.util.ProductInfo.FULL_VERSION; /** * Jcoder is an assembler that accepts a text file based on the JCod Specification, * and produces a .class file for use with a Java Virtual Machine. *

* Main entry point of the JCoder assembler :: jcod to class */ public class Main extends JcoderTool { HashMap macros = new HashMap<>(1); // tool options private boolean noWriteFlag = false; // Do not write generated class files private boolean ignoreFlag = false; // Ignore non-fatal error(s) that suppress writing class files public Main(ToolOutput toolOutput, String... argv) { super(toolOutput); parseArgs(argv); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, String... argv) { this(toolOutput, log, null, argv); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, ToolInput toolInput, String... argv) { super(toolOutput, log); if (toolInput != null) { fileList.add(toolInput); } parseArgs(argv); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, ToolInput... toolInputs) { super(toolOutput, log); Collections.addAll(fileList, toolInputs); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, ToolInput toolInput) { super(toolOutput, log); fileList.add(toolInput); } /** * Deprecated method to support external tools having it * * @param ref A stream to which to write reference output * @param toolName the tool's name (ignored) */ @Deprecated public Main(PrintWriter ref, String toolName) { super(new PrintWriterOutput(ref)); } /** * Deprecated method to support external tools having it * * @param out A stream to which to write reference output * @param toolName the tool's name (ignored) */ @Deprecated public Main(PrintStream out, String toolName) { this(new PrintWriter(out), toolName); } // jcoder entry point public static void main(String... argv) { Main compiler = new Main(new StdoutOutput(), argv); System.exit(compiler.compile()); } @Override public void usage() { environment.flush(false); environment.usage(List.of( "info.usage", "info.opt.d", "info.opt.w", "info.opt.nowrite", "info.opt.ignore", "info.opt.fixcv", "info.opt.fixcv.full", "info.opt.t", "info.opt.v", "info.opt.version" )); } // Run jcoder compiler when args already parsed @Override public synchronized int compile() { macros.put("VERSION", "3;45"); // compile all input files int rc = OK; try { for (ToolInput inputFileName : fileList) { environment.setToolInput(inputFileName); Jcoder parser = new Jcoder(environment, macros); parser.parseFile(); if (noWriteFlag || (environment.getErrorCount() > 0 && !ignoreFlag)) { continue; } parser.write(); if (environment.hasMessages()) rc += environment.flush(true); } } catch (IOException | URISyntaxException | Error exception) { environment.printException(exception); } catch (Throwable exception) { // all untrapped exception/errors that escaped CompilerLogger environment.printException(exception); environment.error(exception); } if (environment.hasMessages()) rc += environment.flush(true); return rc; } @Override protected void parseArgs(String... argv) { try { // Parse arguments for (int i = 0; i < argv.length; i++) { String arg = argv[i]; switch (arg) { // public options case "-v" -> setVerboseFlag(true); case "-t" -> { setVerboseFlag(true); setTraceFlag(true); } case DIR_SWITCH -> { setFSDestination(DIR, ++i, argv); } case WRITE_SWITCH -> { // -w environment.setIgnorePackage(true); setFSDestination(DIR, ++i, argv); } case DUAL_LOG_SWITCH -> environment.setOutputs(new DualOutputStreamOutput()); // TODO: restore using macro's case "-m" -> { if ((i + 1) >= argv.length) { environment.error("err.m_requires_macro"); usage(); throw new IllegalArgumentException(); } try { String[] macroPair = argv[++i].split("[.:]+", 2); if (macroPair.length == 2) { macros.put(macroPair[0], macroPair[1]); } else { throw new NumberFormatException(); } } catch (PatternSyntaxException | NumberFormatException exception) { environment.error("err.invalid_macro"); usage(); throw new IllegalArgumentException(); } } case "-nowrite" -> noWriteFlag = true; case "-ignore" -> ignoreFlag = true; case VERSION_SWITCH -> { environment.println(FULL_VERSION); System.exit(OK); } case "-h", "-help", "-?" -> { usage(); System.exit((OK)); } case STDIN_SWITCH -> { addStdIn(); } // overrides cf version even if it's defined in the source file. case "-fixcv" -> { if ((i + 1) >= argv.length) { environment.error("err.fix_cv_requires_arg"); usage(); throw new IllegalArgumentException(); } String cfvArg = argv[++i]; boolean withThreshold = cfvArg.contains("-"); try { if (withThreshold) { String[] versions = cfvArg.split("-", 2); String[] versionsThreshold = versions[0].split("[.:]+", 2); String[] versionsUpdate = versions[1].split("[.:]+", 2); if (versionsThreshold.length != 2 || versionsUpdate.length != 2) { throw new NumberFormatException(); } Pair versionsPair = new Pair<>(Integer.parseInt(versionsThreshold[0]), Integer.parseInt(versionsThreshold[1])); if (versionsPair.second > 0xFFFF || versionsPair.first > 0xFFFF) { throw new NumberFormatException(); } environment.cfv.setThreshold(versionsPair.first, versionsPair.second); versionsPair = new Pair<>(Integer.parseInt(versionsUpdate[0]), Integer.parseInt(versionsUpdate[1])); if (versionsPair.second > 0xFFFF || versionsPair.first > 0xFFFF) { throw new NumberFormatException(); } environment.cfv.setVersion(versionsPair.first, versionsPair.second).setByParameter(true).setFrozen(true); } else { String[] versions = cfvArg.split("[.:]+", 2); if (versions.length == 2) { Pair versionsPair = new Pair<>(Integer.parseInt(versions[0]), Integer.parseInt(versions[1])); if (versionsPair.second > 0xFFFF || versionsPair.first > 0xFFFF) { throw new NumberFormatException(); } environment.cfv.setVersion(Integer.parseInt(versions[0]), Integer.parseInt(versions[1])). setByParameter(true).setFrozen(true); } else { throw new NumberFormatException(); } } } catch (PatternSyntaxException | NumberFormatException exception) { environment.error("err.invalid_threshold_major_minor_param"); usage(); throw new IllegalArgumentException(); } } default -> { if (arg.startsWith("-")) { environment.error("err.invalid_option", arg); usage(); throw new IllegalArgumentException(); } else { fileList.add(new FileInput(argv[i])); } } } } if (fileList.isEmpty()) { usage(); System.exit(FAILED); } } catch (IllegalArgumentException iae) { if (environment.hasMessages()) { environment.flush(false); } System.exit(FAILED); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jcoder/Scanner.java000066400000000000000000000615251514323636100257750ustar00rootroot00000000000000/* * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jcoder; import org.openjdk.asmtools.common.SyntaxError; import org.openjdk.asmtools.jasm.ClassFileConst; import java.io.IOException; import java.util.HashMap; import static org.openjdk.asmtools.jcoder.JcodTokens.*; /** * A Scanner for Jcoder tokens. Errors are reported to the environment object.

*

* The scanner keeps track of the current token, the value of the current token (if any), * and the start position of the current token.

*

* The scan() method advances the scanner to the next token in the input.

*

* The match() method is used to quickly match opening brackets (ie: '(', '{', or '[') * with their closing counter part. This is useful during error recovery.

*

* The compiler treats either "\n", "\r" or "\r\n" as the end of a line.

*/ public class Scanner { // End of input public static final int EOF = -1; public static final int LBRACE = 123; // "{" // Where errors are reported protected JcoderEnvironment environment; // Input stream protected JcoderEnvironment.InputFile inputFile; // The current character protected int ch, prevCh = -1; protected String macro; protected int indexMacro; // Current token protected Token token; // The position of the current token protected long pos; // The position of the previous token protected long prevPos; // Token values. protected long longValue; protected int intValue; protected int intSize; protected String stringValue; protected ByteBuffer longStringValue; protected int sign; // sign, when reading number /* A doc comment preceding the most recent token */ protected String docComment; HashMap macros = new HashMap<>(); private boolean debugCP = false; private int numCPentrs = 0; /** * A growable character buffer. */ private int count; private char[] buffer = new char[32]; // Create a scanner to scan an input stream. protected Scanner(JcoderEnvironment environment, HashMap macros) throws IOException { this(environment); this.macros = macros; } // for use in jcfront. protected Scanner(JcoderEnvironment environment) throws IOException { this.environment = environment; this.inputFile = environment.inputFile; ch = environment.read(); prevPos = environment.getPosition(); scan(); } /* *********************************************** */ void setDebugCP(boolean enable) { if (enable) { numCPentrs = 0; } debugCP = enable; } void addConstDebug(ClassFileConst.ConstType ct) { numCPentrs++; environment.traceln("\n Const[" + numCPentrs + "] = " + ct.printVal()); } void setMacro(String macro) { this.macro = macro; indexMacro = 0; prevCh = ch; } void readCh() throws IOException { if (macro != null) { if (indexMacro < macro.length()) { ch = macro.charAt(indexMacro); } macro = null; } if (prevCh >= 0) { ch = prevCh; prevCh = -1; } else { ch = inputFile.readUTF(); } } private void putc(int ch) { if (count == buffer.length) { char[] newBuffer = new char[buffer.length * 2]; System.arraycopy(buffer, 0, newBuffer, 0, buffer.length); buffer = newBuffer; } buffer[count++] = (char) ch; } private String bufferString() { char[] buf = new char[count]; System.arraycopy(buffer, 0, buf, 0, count); return new String(buf); } /** * Scan a comment. This method should be called once the initial /, * and the next * character have been read. */ private void skipComment() throws IOException { while (true) { switch (ch) { case EOF -> { environment.error(pos, "err.eof.in.comment"); return; } case '*' -> { readCh(); if (ch == '/') { readCh(); return; } } default -> readCh(); } } } /** * Scan a doc comment. This method should be called once the initial /, * and * have * been read. It gathers the content of the comment (witout leading spaces and '*'s) * in the string buffer. */ private String scanDocComment() throws IOException { count = 0; if (ch == '*') { do { readCh(); } while (ch == '*'); if (ch == '/') { readCh(); return ""; } } switch (ch) { case '\n', ' ' -> readCh(); } boolean seenstar = false; int c = count; while (true) { switch (ch) { case EOF: environment.error(pos, "err.eof.in.comment"); return bufferString(); case '\n': putc('\n'); readCh(); seenstar = false; c = count; break; case ' ': case '\t': putc(ch); readCh(); break; case '*': if (seenstar) { readCh(); if (ch == '/') { readCh(); count = c; return bufferString(); } putc('*'); } else { seenstar = true; count = c; do { readCh(); } while (ch == '*'); switch (ch) { case ' ' -> readCh(); case '/' -> { readCh(); count = c; return bufferString(); } } } break; default: if (!seenstar) { seenstar = true; } putc(ch); readCh(); c = count; break; } } } /** * Scan a decimal number */ private void scanDecNumber() throws IOException { boolean overflow = false; long value = ch - '0'; count = 0; token = Token.INTVAL; intSize = 2; // default putc(ch); // save character in buffer numberLoop: for (; ; ) { readCh(); switch (ch) { case '8': case '9': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': putc(ch); overflow = overflow || (value * 10) / 10 != value; value = (value * 10) + (ch - '0'); overflow = overflow || (value - 1 < -1); break; case 'b': readCh(); intSize = 1; break numberLoop; case 's': readCh(); intSize = 2; break numberLoop; case 'i': readCh(); intSize = 4; break numberLoop; case 'l': readCh(); intSize = 8; break numberLoop; default: break numberLoop; } } longValue = value; intValue = (int) value; // we have just finished reading the number. The next thing better // not be a letter or digit. if (Character.isJavaIdentifierPart((char) ch) || ch == '.') { environment.error(inputFile.position, "err.invalid.number", Character.toString((char) ch)); do { readCh(); } while (Character.isJavaIdentifierPart((char) ch) || ch == '.'); return; } if (overflow) { environment.error(pos, "err.overflow"); } } // scanNumber() /** * Scan a hex number. */ private void scanHexNumber() throws IOException { boolean overflow = false; long value = 0; int cypher; count = 0; token = Token.INTVAL; intSize = 2; // default putc(ch); // save character in buffer numberLoop: for (int k = 0; ; k++) { readCh(); switch (ch) { case '8': case '9': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': cypher = (char) ch - '0'; break; case 'd': case 'D': case 'e': case 'E': case 'f': case 'F': case 'a': case 'A': case 'b': case 'B': case 'c': case 'C': cypher = 10 + Character.toLowerCase((char) ch) - 'a'; break; default: break numberLoop; } putc(ch); overflow = overflow || ((value >>> 60) != 0); value = (value << 4) + cypher; intSize = (k + 1) / 2; } longValue = value; intValue = (int) value; // we have just finished reading the number. The next thing better // not be a letter or digit. if (Character.isJavaIdentifierPart((char) ch) || ch == '.') { environment.error(inputFile.position, "err.invalid.number", Character.toString((char) ch)); do { readCh(); } while (Character.isJavaIdentifierPart((char) ch) || ch == '.'); intValue = 0; // } else if ( overflow || (intValue - 1 < -1) ) { } else if (overflow) { intValue = 0; // so we don't get second overflow in Parser environment.error(pos, "err.overflow"); } } // scanNumber() /** * Scan an escape character. * * @return the character or -1 if it escaped an end-of-line. */ private int scanEscapeChar() throws IOException { long p = inputFile.position; readCh(); switch (ch) { case '0', '1', '2', '3', '4', '5', '6', '7' -> { int n = ch - '0'; for (int i = 2; i > 0; i--) { readCh(); switch (ch) { case '0', '1', '2', '3', '4', '5', '6', '7' -> n = (n << 3) + ch - '0'; default -> { if (n > 0xFF) { environment.error(p, "err.invalid.escape.char"); } return n; } } } readCh(); if (n > 0xFF) { environment.error(p, "err.invalid.escape.char"); } return n; } case 'r' -> { readCh(); return '\r'; } case 'n' -> { readCh(); return '\n'; } case 'f' -> { readCh(); return '\f'; } case 'b' -> { readCh(); return '\b'; } case 't' -> { readCh(); return '\t'; } case '\\' -> { readCh(); return '\\'; } case '\"' -> { readCh(); return '\"'; } case '\'' -> { readCh(); return '\''; } } environment.error(p, "err.invalid.escape.char"); readCh(); return -1; } /** * Scan a string. The current character should be the opening " of the string. */ private void scanString() throws IOException { token = Token.STRINGVAL; count = 0; readCh(); loop: for (; ; ) { switch (ch) { case EOF: environment.error(pos, "err.eof.in.string"); break loop; case '\n': readCh(); environment.error(pos, "err.newline.in.string"); break loop; case '"': readCh(); break loop; case '\\': { int c = scanEscapeChar(); if (c >= 0) { putc((char) c); } break; } default: putc(ch); readCh(); break; } } stringValue = bufferString(); } /** * Scan a character array. The current character should be the opening ' of the array. */ private void scanCharArray() throws IOException { token = Token.LONGSTRINGVAL; ByteBuffer buf = new ByteBuffer(); count = 0; readCh(); loop: for (; ; ) { int c = ch; switch (ch) { case EOF: environment.error(pos, "err.eof.in.string"); break loop; case '\n': readCh(); environment.error(pos, "err.newline.in.string"); break loop; case '\'': readCh(); break loop; case '\\': c = scanEscapeChar(); if (c < 0) { break; } // no break - continue default: // see description of java.io.DataOutput.writeUTF() if ((c > 0) && (c <= 0x7F)) { buf.write(c); } else if ((c == 0) || ((c >= 0x80) && (c <= 0x7FF))) { buf.write(0xC0 | (0x1F & (c >> 6))); buf.write(0x80 | (0x3f & c)); } else { buf.write(0xc0 | (0x0f & (c >> 12))); buf.write(0x80 | (0x3f & (c >> 6))); buf.write(0x80 | (0x3f & c)); } readCh(); } } longStringValue = buf; } /** * Scan an Identifier. The current character should be the first character of the * identifier. */ private void scanIdentifier() throws IOException { count = 0; boolean compound = false; for (; ; ) { putc(ch); readCh(); if ((ch == '/') || (ch == '.') || (ch == '-')) { compound = true; } else if (!Character.isJavaIdentifierPart((char) ch)) { break; } } stringValue = bufferString(); if (compound) { token = Token.IDENT; } else { token = keyword_token_ident(stringValue); if (token == Token.IDENT) { intValue = getConstTagByParseString(stringValue); if (intValue != -1) { // this is a constant if (debugCP) { ClassFileConst.ConstType constType = ClassFileConst.getByParseKey(stringValue); if (constType != null) { addConstDebug(constType); } } token = Token.INTVAL; intSize = 1; longValue = intValue; } } } } // end scanIdentifier // skip till symbol protected void skipTill(int sym) throws IOException { while (true) { if (ch == EOF) { environment.error(pos, "err.eof.in.comment"); return; } else if (ch == sym) { return; } readCh(); } } protected long xscan() throws IOException { long retPos = pos; prevPos = inputFile.position; docComment = null; sign = 1; for (; ; ) { pos = inputFile.position; switch (ch) { case EOF: token = Token.EOF; return retPos; case '\n': case ' ': case '\t': case '\f': readCh(); break; case '/': readCh(); switch (ch) { case '/': // Parse a // comment do { readCh(); } while ((ch != EOF) && (ch != '\n')); break; case '*': readCh(); if (ch == '*') { docComment = scanDocComment(); } else { skipComment(); } break; default: token = Token.DIV; return retPos; } break; case '"': scanString(); return retPos; case '\'': scanCharArray(); return retPos; case '-': sign = -sign; // hack: no check that numbers only are allowed after case '+': readCh(); break; case '0': readCh(); token = Token.INTVAL; longValue = intValue = 0; switch (ch) { case 'x', 'X' -> scanHexNumber(); case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' -> scanDecNumber(); case 'b' -> { readCh(); intSize = 1; } case 's' -> { readCh(); intSize = 2; } case 'i' -> { readCh(); intSize = 4; } case 'l' -> { readCh(); intSize = 8; } default -> intSize = 2; } return retPos; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': scanDecNumber(); return retPos; case '{': readCh(); token = Token.LBRACE; return retPos; case '}': readCh(); token = Token.RBRACE; return retPos; case '(': readCh(); token = Token.LPAREN; return retPos; case ')': readCh(); token = Token.RPAREN; return retPos; case '[': readCh(); token = Token.LSQBRACKET; return retPos; case ']': readCh(); token = Token.RSQBRACKET; return retPos; case ',': readCh(); token = Token.COMMA; return retPos; case ';': readCh(); token = Token.SEMICOLON; return retPos; case ':': readCh(); token = Token.COLON; return retPos; case '=': readCh(); if (ch == '=') { readCh(); token = Token.EQ; return retPos; } token = Token.ASSIGN; return retPos; case '\u001a': // Our one concession to DOS. readCh(); if (ch == EOF) { token = Token.EOF; return retPos; } environment.error(pos, "err.funny.char"); readCh(); break; case '#': readCh(); scanDecNumber(); return retPos; case '&': { readCh(); retPos = pos; if (!Character.isJavaIdentifierStart((char) ch)) { environment.error(pos, "err.identifier.expected"); } scanIdentifier(); String macroId = stringValue; String macro = macros.get(macroId); if (macro == null) { environment.error(pos, "err.macro.undecl", macroId); throw new SyntaxError(); } setMacro(macro); readCh(); } break; default: if (Character.isJavaIdentifierStart((char) ch)) { scanIdentifier(); return retPos; } environment.error(pos, "err.funny.char"); readCh(); break; } } } /** * Scan to a matching '}', ']' or ')'. The current token must be a '{', '[' or '('; */ protected void match(Token open, Token close) throws IOException { int depth = 1; while (true) { scan(); if (token == open) { depth++; } else if (token == close) { if (--depth == 0) { return; } } else if (token == Token.EOF) { environment.error(pos, "err.unbalanced.paren"); return; } } } /** * Scan the next token. * * @return the position of the previous token. */ protected long scan() throws IOException { return xscan(); } /** * Scan the next token. * * @return the position of the previous token. */ protected long scanMacro() throws IOException { return xscan(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jcoder/i18n.properties000066400000000000000000000063651514323636100264370ustar00rootroot00000000000000# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. info.usage=\ Usage: java -jar asmtools.jar jcoder [options] |- compile into class file(s)\n\ \ if - is provided, is used\n\ where possible options include: # see also shared section in asmtools/i18 info.opt.nowrite=\ \ -nowrite Do not write generated class files info.opt.ignore=\ \ -ignore Ignore non-fatal error(s) that suppress writing class files info.opt.fixcv=\ \ -fixcv Override class file version in source file(s) info.opt.fixcv.full=\ \ -fixcv Update class file version to major:minor if file''s version is below the threshold() err.invalid_option=invalid option: {0} err.m_requires_macro=-m requires argument \"id:\" err.invalid_macro=Invalid parameter id:[.] err.fix_cv_requires_arg=-fixcv option requires the argument either or - err.invalid_threshold_major_minor_param=Invalid parameter \"-fixvc '{-}'\" # I/O errors err.cannot.read=Cannot read {0} err.cannot.write=Cannot write to {0} err.fatal_exception=fatal exception err.file.empty=The file is empty: {0} err.eof.in.comment=Comment not terminated at end of input. err.invalid.number=Invalid character \"{0}\" in number. err.overflow=Numeric overflow. err.eof.in.string=String not terminated at end of input. err.newline.in.string=String not terminated at end of line. err.funny.char=Invalid character in input. err.unbalanced.paren=Unbalanced parentheses. err.toplevel.expected=Class or interface declaration expected. err.token.expected=\"{0}\" expected. err.identifier.expected=Identifier expected. err.name.expected=Name expected. err.io.exception=I/O error in {0}. warn.array.wronglength=Expected array length \"{0}\" does not match the actual length \"{1}\"; expected length written. warn.attr.wronglength=Expected attribute length \"{0}\" does not match the actual length \"{1}\"; expected length written. err.attrname.expected=Attribute's name or index expected. err.element.expected=The primary element of the ClassFile structure is expected. err.struct.expected=A structured element of the ClassFile is expected. err.macro.undecl=Macro \"{0}\" undefined. err.invalid.escape.char=Invalid escape char. jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdec/000077500000000000000000000000001514323636100231675ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdec/ClassData.java000066400000000000000000001752771514323636100257140ustar00rootroot00000000000000/* * Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdec; import org.openjdk.asmtools.asmutils.StringUtils; import org.openjdk.asmtools.common.FormatError; import org.openjdk.asmtools.common.outputs.StdoutOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.structure.*; import org.openjdk.asmtools.jcoder.JcodTokens; import java.io.DataInputStream; import java.io.EOFException; import java.io.IOException; import java.net.URISyntaxException; import java.nio.ByteBuffer; import java.util.Optional; import static java.lang.Math.min; import static java.lang.String.format; import static org.openjdk.asmtools.Main.sharedI18n; import static org.openjdk.asmtools.asmutils.StringUtils.*; import static org.openjdk.asmtools.common.structure.ClassFileContext.MODULE_DIRECTIVES; import static org.openjdk.asmtools.common.structure.ClassFileContext.VALUE_OBJECTS; import static org.openjdk.asmtools.jasm.ClassFileConst.*; import static org.openjdk.asmtools.jasm.ClassFileConst.AnnotationElementType.AE_UNKNOWN; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.CONSTANT_MODULE; import static org.openjdk.asmtools.jasm.ClassFileConst.ConstType.CONSTANT_UTF8; import static org.openjdk.asmtools.jasm.TypeAnnotationTypes.ETargetInfo; import static org.openjdk.asmtools.jasm.TypeAnnotationTypes.ETargetType; import static org.openjdk.asmtools.jcoder.JcodTokens.Token.IDENT; /** * Class data of the Java Decoder */ class ClassData { private static final int COMMENT_OFFSET = 42; private static final int BYTES_IN_LINE_SPACED_OUT = 12; // Format: 0x04 0x3C 0x04 0x3D; private static final int BYTES_IN_LINE_CONDENSED = 8; // Format: 0x043C043D043E1B1C; private static final String ERROR_PREFIX = " // The ConstantPoll Index "; private static final String INDENT_STRING = " "; private static final int INDENT_LENGTH = INDENT_STRING.length(); /*========================================================*/ private final NestedByteArrayInputStream arrayInputStream; private final DataInputStream inputStream; protected JdecEnvironment environment; /* ====================================================== */ private byte[] types; private Object[] cpool; private int CPlen; private int[] cpe_pos; private String entityType = ""; private String entityName = ""; /*========================================================*/ private int indent = 0; ClassData(JdecEnvironment environment) throws IOException, URISyntaxException { this.environment = environment; // try (DataInputStream dis = environment.getToolInput().getDataInputStream(Optional.empty())) { byte[] buf = new byte[dis.available()]; if (dis.read(buf) <= 0) { throw new FormatError(environment.getLogger(), "err.file.empty", environment.getSimpleInputFileName()); } arrayInputStream = new NestedByteArrayInputStream(buf); inputStream = new DataInputStream(arrayInputStream); } } private String toHex(long val, int width) { StringBuilder s = new StringBuilder(); for (int i = width * 2 - 1; i >= 0; i--) { s.append(hexTable[((int) (val >> (4 * i))) & 0xF]); } return "0x" + s; } private String toHex(long val) { int width; for (width = 8; width > 0; width--) { if ((val >> (width - 1) * 8) != 0) { break; } } return toHex(val, width); } private void printByteHex(int b) { environment.print(hexTable[(b >> 4) & 0xF]); environment.print(hexTable[b & 0xF]); } /** * @param in input stream to get bytes for printing * @param len number of bytes * @param printSeparately defines a format of printed lines which will be either 0x04 0x3C 0x04 0x3D; or 0x043C043D043E1B1C; * @param ignoreException Whether to propagate the exception or ignore it * @throws IOException exception might happen while reading DataInputStream **/ private void printBytes(DataInputStream in, int len, boolean printSeparately, boolean ignoreException) throws IOException { int i = 0; boolean printed = false; final int BYTES_IN_LINE = printSeparately ? BYTES_IN_LINE_SPACED_OUT : BYTES_IN_LINE_CONDENSED; try { for (; i < len; i++) { byte b = in.readByte(); if (i % BYTES_IN_LINE == 0) { out_print(printSeparately ? "" : "0x"); } if (printSeparately) { environment.print("0x"); } printByteHex(b); printed = true; if (printSeparately) { if (i % BYTES_IN_LINE == BYTES_IN_LINE - 1) { environment.println(";"); } else if (i + 1 != len) { environment.print(" "); } } else { if (i % BYTES_IN_LINE == BYTES_IN_LINE - 1) { environment.println(";"); } } } } catch (EOFException ignored) { if (!ignoreException) { throw ignored; } } finally { if (printed) { if (len % 8 != 0) { if (i > 0) environment.println(";"); else out_println(";"); } } } } private void printUtf8String(DataInputStream in, int len) throws IOException { final int CHARS_IN_LINE = 78; readUtf8String(in, len, CHARS_IN_LINE).forEach(s -> environment.println(getOutString("") + s)); } private void printRestOfBytes() { for (int i = 0; ; i++) { try { byte b = inputStream.readByte(); if (i % BYTES_IN_LINE_SPACED_OUT == 0) environment.print(INDENT_STRING); else environment.print(" "); environment.print("0x"); printByteHex(b); if (i % BYTES_IN_LINE_SPACED_OUT == BYTES_IN_LINE_SPACED_OUT - 1) environment.println(";"); } catch (IOException e) { environment.println(";"); return; } } } private void printBytes(byte[] buf) { boolean newline = false; for (int i = 0; i < buf.length; i++) { if (i % BYTES_IN_LINE_SPACED_OUT == 0) environment.print(INDENT_STRING); else environment.print(" "); environment.print("0x"); printByteHex(buf[i]); if (i % BYTES_IN_LINE_SPACED_OUT == BYTES_IN_LINE_SPACED_OUT - 1) { newline = true; environment.println(";"); } else { newline = false; } } if (!newline) environment.println(";"); } private void printUtf8InfoIndex(int index, String indexName) { out_print("#" + index + "; // "); String comment = indexName; try { if (environment.printDetailsFlag) { comment = format("%-16s", indexName) + " : " + cpool[index]; } } catch (Exception ignored) { } environment.println(comment); } private void out_begin(String s) { environment.println(getOutString(s)); indent++; } private void out_print(String s) { environment.print(getOutString(s)); } private void out_println(String s) { environment.println(getOutString(s)); } private String getOutString(String s) { s = formatComments(s, indent); return repeat(INDENT_STRING, indent) + s; } private void out_end(String s) { s = formatComments(s, indent - 1); environment.println(repeat(INDENT_STRING, --indent) + s); } private String startArray(int length) { return "[" + (environment.printDetailsFlag ? Integer.toString(length) : "") + "]"; } private void startArrayCmt(int length, String comment) { out_begin(startArray(length) + format(" {%s", comment == null ? "" : " // " + comment)); } private void startArrayCmtB(int length, String comment) { out_begin(startArray(length) + format("b {%s", comment == null ? "" : " // " + comment)); } private void readCP(byte[] alreadyRead, DataInputStream in) throws IOException { int length = in.readUnsignedShort(); CPlen = length; environment.traceln("jdec.trace.CP_len", length); types = new byte[length]; cpool = new Object[length]; cpe_pos = new int[length]; for (int i = 1; i < length; i++) { byte btag; int v1; long lv; cpe_pos[i] = arrayInputStream.getPos(); btag = in.readByte(); environment.traceln("jdec.trace.CP_entry", i, btag); types[i] = btag; ConstType tg = getByTag(btag); switch (tg) { case CONSTANT_UTF8, CONSTANT_ASCIZ -> cpool[i] = in.readUTF(); case CONSTANT_INTEGER, CONSTANT_INT, CONSTANT_BYTE, CONSTANT_C_BYTE, CONSTANT_CHAR, CONSTANT_C_CHAR, CONSTANT_SHORT, CONSTANT_C_SHORT, CONSTANT_C_BOOLEAN, CONSTANT_BOOLEAN -> { v1 = in.readInt(); cpool[i] = v1; } case CONSTANT_FLOAT, CONSTANT_C_FLOAT -> { v1 = Float.floatToIntBits(in.readFloat()); cpool[i] = v1; } case CONSTANT_LONG, CONSTANT_C_LONG -> { lv = in.readLong(); cpool[i] = lv; i++; } case CONSTANT_DOUBLE, CONSTANT_C_DOUBLE -> { lv = Double.doubleToLongBits(in.readDouble()); cpool[i] = lv; i++; } case CONSTANT_CLASS, CONSTANT_C_CLASS, CONSTANT_STRING, CONSTANT_L_STRING, CONSTANT_MODULE, CONSTANT_PACKAGE -> { v1 = in.readUnsignedShort(); cpool[i] = v1; } case CONSTANT_INTERFACEMETHODREF, CONSTANT_INTERFACEMETHOD, CONSTANT_FIELDREF, CONSTANT_FIELD, CONSTANT_METHODREF, CONSTANT_METHOD, CONSTANT_NAMEANDTYPE -> cpool[i] = "#" + in.readUnsignedShort() + " #" + in.readUnsignedShort(); case CONSTANT_DYNAMIC, CONSTANT_INVOKEDYNAMIC -> cpool[i] = in.readUnsignedShort() + "s #" + in.readUnsignedShort(); case CONSTANT_METHODHANDLE -> cpool[i] = in.readUnsignedByte() + "b #" + in.readUnsignedShort(); case CONSTANT_METHODTYPE -> cpool[i] = "#" + in.readUnsignedShort(); default -> { cpool[i] = in.readUnsignedShort(); CPlen = ++i; // the output can be not ready if file output is used. if (!environment.getToolOutput().isReady()) { environment.setToolOutput(new StdoutOutput()); } out_println("class {"); printBytes(alreadyRead); indent++; printCP(); // exception will be thrown here. } } } } private void printCP() { int length = CPlen; startArrayCmt(length, "Constant Pool"); out_println("; // first element is empty"); try { int size; for (int i = 1; i < length; i = i + size) { size = 1; byte btag = types[i]; ConstType tg = getByTag(btag); int pos = cpe_pos[i]; String tagstr; String valstr; int v1; long lv; if (tg != null) { tagstr = tg.parseKey(); } else { throw new Error("Can't get a tg representing the type of Constant in the Constant Pool at: " + i); } switch (tg) { case CONSTANT_UTF8, CONSTANT_ASCIZ -> { tagstr = CONSTANT_UTF8.parseKey(); valstr = StringUtils.Utf8ToString(getStringByIndex(i), "\""); } case CONSTANT_INTEGER, CONSTANT_INT, CONSTANT_BYTE, CONSTANT_C_BYTE, CONSTANT_CHAR, CONSTANT_C_CHAR, CONSTANT_SHORT, CONSTANT_C_SHORT, CONSTANT_C_BOOLEAN, CONSTANT_BOOLEAN, CONSTANT_FLOAT, CONSTANT_C_FLOAT -> { v1 = (Integer) cpool[i]; valstr = toHex(v1, 4); } case CONSTANT_DOUBLE, CONSTANT_C_DOUBLE, CONSTANT_LONG, CONSTANT_C_LONG -> { lv = (Long) cpool[i]; valstr = toHex(lv, 8) + ";"; size = 2; } case CONSTANT_MODULE, CONSTANT_PACKAGE, CONSTANT_CLASS, CONSTANT_C_CLASS, CONSTANT_STRING, CONSTANT_L_STRING -> { v1 = (Integer) cpool[i]; valstr = "#" + v1; } case CONSTANT_INTERFACEMETHODREF, CONSTANT_INTERFACEMETHOD, CONSTANT_FIELDREF, CONSTANT_FIELD, CONSTANT_METHODREF, CONSTANT_METHOD, CONSTANT_NAMEANDTYPE, CONSTANT_METHODHANDLE, CONSTANT_METHODTYPE, CONSTANT_DYNAMIC, CONSTANT_INVOKEDYNAMIC -> valstr = getStringByIndex(i); default -> { out_println(toHex(btag, 1) + "; // invalid constant type: " + (int) btag + " for element " + i); throw new ClassFormatError("Invalid constant type: " + (int) btag + " for element " + i); } } out_print(tagstr + " " + valstr + "; // #" + i); if (environment.printDetailsFlag) { out_println(" at " + toHex(pos)); } else { environment.println(); } } } finally { out_end("}" + (environment.printDetailsFlag ? " // end of Constant Pool" : "")); environment.println(); } } /** * CONSTANT_Module_info { * u1 tag; // == CONSTANT_MODULE(19) * u2 name_index; * } * * @return Constant Pool module name by name_index */ private String getModuleName() { int idx = 0; String name = ""; for (int i = 1; i < types.length; i++) { if (types[i] == CONSTANT_MODULE.getTag()) { idx = i; break; } } if (idx != 0) { try { name = StringUtils.Utf8ToString(getNameByRefIndex(idx)); } catch (Throwable ignored) { /* ignored*/ } } return name; } private String getStringPos() { return " at " + toHex(arrayInputStream.getPos()); } private String getCommentPosCond() { if (environment.printDetailsFlag) { return " // " + getStringPos(); } else { return ""; } } private void decodeCPXAttr(DataInputStream in, int len, String attrname) throws IOException { decodeCPXAttrM(in, len, attrname, 1); } private void decodeCPXAttrM(DataInputStream in, int len, String attrName, int expectedIndices) throws IOException { if (len != expectedIndices * 2) { out_println("// == invalid length of " + attrName + " attr: " + len + " (should be " + (expectedIndices * 2) + ") =="); printBytes(in, len, false, false); } else { StringBuilder outputString = new StringBuilder(); for (int k = 1; k <= expectedIndices; k++) { outputString.append("#").append(in.readUnsignedShort()).append("; "); if (k % 16 == 0) { out_println(outputString.toString().replaceAll("\\s+$", "")); outputString = new StringBuilder(); } } if (!outputString.isEmpty()) { out_println(outputString.toString().replaceAll("\\s+$", "")); } } } /** * Reads from * early_larval_frame { * u1 frame_type = EARLY_LARVAL; // 246 * u2 number_of_unset_fields; * u2 unset_fields[number_of_unset_fields]; * base_frame base; * } * the structure unset_fields[number_of_unset_fields] and returns its string presentation * * @param in input stream * @return String presentation of the aggregation of [number_of_unset_fields] {unset_fields } * @throws IOException if IO exception occurs */ private String getUnsetFields(DataInputStream in) throws IOException { int num = in.readUnsignedShort(); StringBuilder sb = new StringBuilder(20); sb.append(startArray(num)).append('{'); try { for (int i = 0; i < num; i++) { int cpIndex = in.readUnsignedShort(); // unset_field[i] sb.append("#").append(cpIndex); if (i < num - 1) { sb.append("; "); } } } finally { sb.append('}'); } return sb.toString(); } private String getStackMap(DataInputStream in, int elementsNum) throws IOException { int num; StringBuilder sb = new StringBuilder(20); if (elementsNum > 0) { num = elementsNum; } else { num = in.readUnsignedShort(); } sb.append(startArray(num)).append(elementsNum > 0 ? "z" : "").append('{'); try { for (int k = 0; k < num; k++) { int maptype = in.readUnsignedByte(); StackMap.VerificationType verificationType = StackMap.getVerificationType(maptype, Optional.of((s, a) -> environment.printErrorLn(s, a))); String maptypeImg; if (environment.printDetailsFlag) { maptypeImg = maptype + "b"; } else { try { maptypeImg = verificationType.parseKey(); } catch (ArrayIndexOutOfBoundsException e) { maptypeImg = "/* BAD TYPE: */ " + maptype + "b"; } } switch (verificationType) { case ITEM_Object, ITEM_NewObject -> maptypeImg = maptypeImg + ",#" + in.readUnsignedShort(); case ITEM_UNKNOWN -> maptypeImg = maptype + "b"; default -> { } } sb.append(maptypeImg); if (k < num - 1) { sb.append("; "); } } } finally { sb.append('}'); } return sb.toString(); } /** * Processes 4.7.20 The RuntimeVisibleTypeAnnotations Attribute, 4.7.21 The RuntimeInvisibleTypeAnnotations Attribute * type_annotation structure. */ private void decodeTargetTypeAndRefInfo(DataInputStream in) throws IOException { int tt = in.readUnsignedByte(); // [4.7.20] annotations[], type_annotation { u1 target_type; ...} ETargetType targetType = ETargetType.getTargetType(tt); if (targetType == null) { throw new Error("Type annotation: invalid target_type(u1) " + tt); } ETargetInfo targetInfo = targetType.targetInfo(); out_println(toHex(tt, 1) + "; // target_type: " + targetType.parseKey()); switch (targetInfo) { case TYPEPARAM: //[3.3.1] meth_type_param, class_type_param: out_println(toHex(in.readUnsignedByte(), 1) + "; // param_index"); break; case SUPERTYPE: //[3.3.2] class_exts_impls out_println(toHex(in.readUnsignedShort(), 2) + "; // type_index"); break; case TYPEPARAM_BOUND: //[3.3.3] class_type_param_bnds, meth_type_param_bnds out_println(toHex(in.readUnsignedByte(), 1) + "; // param_index"); out_println(toHex(in.readUnsignedByte(), 1) + "; // bound_index"); break; case EMPTY: //[3.3.4] meth_receiver, meth_ret_type, field // NOTE: reference_info is empty for this annotation's target break; case METHODPARAM: //[3.3.5] meth_formal_param: out_println(toHex(in.readUnsignedByte(), 1) + "; // parameter_index"); break; case EXCEPTION: //[3.3.61] throws_type //KTL: Updated index to UShort for JSR308 change out_println(in.readUnsignedShort() + "; // type_index"); break; case LOCALVAR: //[3.3.7] local_var, resource_var { int lv_num = in.readUnsignedShort(); startArrayCmt(lv_num, "local_variables"); try { for (int i = 0; i < lv_num; i++) { out_println(in.readUnsignedShort() + " " + in.readUnsignedShort() + " " + in.readUnsignedShort() + ";" + getCommentPosCond()); } } finally { out_end("}"); } } break; case CATCH: //[3.3.8] exception_param out_println(in.readUnsignedShort() + "; // exception_table_index"); break; case OFFSET: //[3.3.9] type_test (instanceof), obj_creat (new) // constr_ref_receiver, meth_ref_receiver out_println(in.readUnsignedShort() + "; // offset"); break; case TYPEARG: //[3.3.10] cast, constr_ref_typearg, meth_invoc_typearg // constr_invoc_typearg, meth_ref_typearg out_println(in.readUnsignedShort() + "; // offset"); out_println(toHex(in.readUnsignedByte(), 1) + "; // type_index"); break; default: // should never happen out_println(toHex(tt, 1) + "; // invalid target_info: " + tt); throw new ClassFormatError(); } // [4.7.20.2] int path_length = in.readUnsignedByte(); // type_path { u1 path_length; ...} startArrayCmtB(path_length, "type_paths"); try { for (int i = 0; i < path_length; i++) { // print the type_path elements out_println("{ " + toHex(in.readUnsignedByte(), 1) // { u1 type_path_kind; + "; " + toHex(in.readUnsignedByte(), 1) // u1 type_argument_index; } + "; } // type_path[" + i + "]"); // path[i] } } finally { out_end("}"); } } private void decodeElementValue(DataInputStream in, ToolOutput out) throws IOException { out_begin("{ // element_value"); try { char tg = (char) in.readByte(); AnnotationElementType tag = getAnnotationElementType(tg); if (tag != AE_UNKNOWN) { out_println("'" + tg + "';"); } switch (tag) { case AE_BYTE, AE_CHAR, AE_DOUBLE, AE_FLOAT, AE_INT, AE_LONG, AE_SHORT, AE_BOOLEAN, AE_STRING -> decodeCPXAttr(in, 2, "const_value_index"); case AE_ENUM -> { out_begin("{ // enum_const_value"); decodeCPXAttr(in, 2, "type_name_index"); decodeCPXAttr(in, 2, "const_name_index"); out_end("} // enum_const_value"); } case AE_CLASS -> decodeCPXAttr(in, 2, "class_info_index"); case AE_ANNOTATION -> decodeAnnotation(in, out); case AE_ARRAY -> { int ev_num = in.readUnsignedShort(); startArrayCmt(ev_num, "array_value"); try { for (int i = 0; i < ev_num; i++) { decodeElementValue(in, out); if (i < ev_num - 1) { out_println(";"); } } } finally { out_end("} // array_value"); } } case AE_UNKNOWN -> { String msg = "invalid element_value" + (StringUtils.isPrintableChar(tg) ? " tag type : " + tg : "??"); out_println(toHex(tg, 1) + "; // " + msg); throw new ClassFormatError(msg); } } } finally { out_end("} // element_value"); } } private void decodeAnnotation(DataInputStream in, ToolOutput out) throws IOException { out_begin("{ // annotation"); try { decodeCPXAttr(in, 2, "field descriptor"); int evp_num = in.readUnsignedShort(); decodeElementValuePairs(evp_num, in, out); } finally { out_end("} // annotation"); } } private void decodeElementValuePairs(int count, DataInputStream in, ToolOutput out) throws IOException { startArrayCmt(count, "element_value_pairs"); try { for (int i = 0; i < count; i++) { out_begin("{ // element value pair"); try { decodeCPXAttr(in, 2, "name of the annotation type element"); decodeElementValue(in, out); } finally { out_end("} // element value pair"); if (i < count - 1) { out_println(";"); } } } } finally { out_end("} // element_value_pairs"); } } /** * component_info { JEP 359 Record(Preview): class file 58.65535 * u2 name_index; * u2 descriptor_index; * u2 attributes_count; * attribute_info attributes[attributes_count]; * } *

* or * field_info { * u2 access_flags; * u2 name_index; * u2 descriptor_index; * u2 attributes_count; * attribute_info attributes[attributes_count]; * } * or * method_info { * u2 access_flags; * u2 name_index; * u2 descriptor_index; * u2 attributes_count; * attribute_info attributes[attributes_count]; * } */ private void decodeInfo(DataInputStream in, ToolOutput out, String elementName, boolean hasAccessFlag) throws IOException { out_begin("{ // " + elementName + (environment.printDetailsFlag ? getStringPos() : "")); try { if (hasAccessFlag) { // u2 access_flags; out_println(toHex(in.readShort(), 2) + "; // access"); } // u2 name_index printUtf8InfoIndex(in.readUnsignedShort(), "name_index"); // u2 descriptor_index printUtf8InfoIndex(in.readUnsignedShort(), "descriptor_index"); // u2 attributes_count; // attribute_info attributes[attributes_count] decodeAttrs(in, out); } finally { out_end("}"); } } private void decodeTypeAnnotation(DataInputStream in, ToolOutput out) throws IOException { out_begin("{ // type_annotation"); try { decodeTargetTypeAndRefInfo(in); decodeCPXAttr(in, 2, "field descriptor"); int evp_num = in.readUnsignedShort(); decodeElementValuePairs(evp_num, in, out); } finally { out_end("} // type_annotation"); } } private void decodeBootstrapMethod(DataInputStream in) throws IOException { out_begin("{ // bootstrap_method"); try { out_println("#" + in.readUnsignedShort() + "; // bootstrap_method_ref"); int bm_args_cnt = in.readUnsignedShort(); startArrayCmt(bm_args_cnt, "bootstrap_arguments"); try { for (int i = 0; i < bm_args_cnt; i++) { out_println("#" + in.readUnsignedShort() + ";" + getCommentPosCond()); } } finally { out_end("} // bootstrap_arguments"); } } finally { out_end("} // bootstrap_method"); } } private void decodeAttr(DataInputStream in, ToolOutput out) throws IOException { // Read one attribute String posComment = getStringPos(); int name_cpx = 0, btag, len; String AttrName = ""; try { name_cpx = in.readUnsignedShort(); btag = types[name_cpx]; ConstType tag = getByTag(btag); if (tag == ConstType.CONSTANT_UTF8) { AttrName = getStringByIndex(name_cpx); } } catch (ArrayIndexOutOfBoundsException ignored) { environment.print(getOutString("")); environment.println("// == %s ==", sharedI18n.getString("main.error.wrong.bytes")); } EAttribute tg = EAttribute.get(AttrName); String endingComment = AttrName.isEmpty() ? "#" + name_cpx : AttrName; len = in.readInt(); arrayInputStream.enter(len); try { if (environment.printDetailsFlag) { out_begin("Attr(#" + name_cpx + ", " + len + ") { // " + endingComment + posComment); } else { out_begin("Attr(#" + name_cpx + ") { // " + endingComment); } switch (tg) { case ATT_Code -> { out_println(in.readUnsignedShort() + "; // max_stack"); out_println(in.readUnsignedShort() + "; // max_locals"); int code_len = in.readInt(); out_begin("Bytes" + startArray(code_len) + "{"); try { printBytes(in, code_len, true, false); } finally { out_end("}"); } int trap_num = in.readUnsignedShort(); /* { u2 start_pc; u2 end_pc; u2 handler_pc; u2 catch_type; } exception_table[exception_table_length]; */ startArrayCmt(trap_num, "Traps"); try { for (int i = 0; i < trap_num; i++) { out_println( "%4d %4d %4d %3d;".formatted(in.readUnsignedShort(), in.readUnsignedShort(), in.readUnsignedShort(), in.readUnsignedShort()) + getCommentPosCond()); } } finally { out_end("} // end of Traps"); } // Read the attributes decodeAttrs(in, out); } case ATT_Exceptions -> { int count = in.readUnsignedShort(); startArrayCmt(count, AttrName); try { for (int i = 0; i < count; i++) { out_println("#" + in.readUnsignedShort() + ";" + getCommentPosCond()); } } finally { out_end("}"); } } case ATT_LineNumberTable -> { int ll_num = in.readUnsignedShort(); startArrayCmt(ll_num, "line_number_table"); try { for (int i = 0; i < ll_num; i++) { out_println( "%4d %4d;".formatted(in.readUnsignedShort(), in.readUnsignedShort()) + getCommentPosCond()); } } finally { out_end("}"); } } case ATT_LocalVariableTable, ATT_LocalVariableTypeTable -> { int lvt_num = in.readUnsignedShort(); startArrayCmt(lvt_num, AttrName); try { for (int i = 0; i < lvt_num; i++) { out_println( "%4d %4d %4d %4d %3d;".formatted(in.readUnsignedShort(), in.readUnsignedShort(), in.readUnsignedShort(), in.readUnsignedShort(), in.readUnsignedShort()) + getCommentPosCond()); } } finally { out_end("}"); } } case ATT_InnerClasses -> { int ic_num = in.readUnsignedShort(); startArrayCmt(ic_num, "classes"); try { for (int i = 0; i < ic_num; i++) { int inner_class_info_index = in.readUnsignedShort(); int outer_class_info_index = in.readUnsignedShort(); int inner_name_index = in.readUnsignedShort(); int inner_class_access_flags = in.readUnsignedShort(); out_println("%5s %5s %5s %3s;".formatted( "#" + inner_class_info_index, "#" + outer_class_info_index, "#" + inner_name_index, "" + inner_class_access_flags) + getInnerClassComment(inner_class_access_flags)); } } finally { out_end("}"); } } case ATT_StackMap -> { int e_num = in.readUnsignedShort(); startArrayCmt(e_num, ""); try { for (int k = 0; k < e_num; k++) { int start_pc = in.readUnsignedShort(); environment.println(format("%d, %s, %s;", start_pc, getStackMap(in, 0), getStackMap(in, 0))); } } finally { out_end("}"); } } case ATT_StackMapTable -> { int wrappingLevel = 0; int et_num = in.readUnsignedShort(); startArrayCmt(et_num, ""); try { int idx = 0; // wrapper (early_larval_frame) is skipped. while (idx < et_num) { int frame_type = in.readUnsignedByte(); StackMap.EntryType ftype = StackMap.stackMapEntryType(frame_type); String indentString = (wrappingLevel > 0) ? INDENT_STRING.repeat(min(wrappingLevel, 4)) : ""; switch (ftype) { case SAME_FRAME -> { // entryType is same_frame; out_println(indentString.concat(frame_type + "b; // same_frame")); wrappingLevel = checkWrapping(wrappingLevel); } case SAME_LOCALS_1_STACK_ITEM_FRAME -> { // entryType is same_locals_1_stack_item_frame // read additional single stack element out_println(indentString.concat(format("%db, %s; // same_locals_1_stack_item_frame", frame_type, getStackMap(in, 1)))); wrappingLevel = checkWrapping(wrappingLevel); } case EARLY_LARVAL -> { // entryType is early_larval_frame out_println(indentString.concat(format("%db, %s, { // early_larval_frame", frame_type, getUnsetFields(in)))); wrappingLevel++; continue; // skip idx increasing } case SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED -> { // entryType is same_locals_1_stack_item_frame_extended // read additional single stack element int noffset = in.readUnsignedShort(); out_println(indentString.concat(format("%db, %d, %s; // same_locals_1_stack_item_frame_extended", frame_type, noffset, getStackMap(in, 1)))); wrappingLevel = checkWrapping(wrappingLevel); } case CHOP_1_FRAME, CHOP_2_FRAME, CHOP_3_FRAME -> { // entryType is chop_frame int coffset = in.readUnsignedShort(); out_println(indentString.concat(format("%db, %d; // chop_frame %d", frame_type, coffset, 251 - frame_type))); wrappingLevel = checkWrapping(wrappingLevel); } case SAME_FRAME_EXTENDED -> { // entryType is same_frame_extended; int xoffset = in.readUnsignedShort(); out_println(indentString.concat(format("%db, %d; // same_frame_extended", frame_type, xoffset))); wrappingLevel = checkWrapping(wrappingLevel); } case APPEND_FRAME -> { // entryType is append_frame // read additional locals int aoffset = in.readUnsignedShort(); out_println(indentString.concat(format("%db, %d, %s; // append_frame %d", frame_type, aoffset, getStackMap(in, frame_type - 251), frame_type - 251))); wrappingLevel = checkWrapping(wrappingLevel); } case FULL_FRAME -> { // entryType is full_frame int foffset = in.readUnsignedShort(); out_println(indentString.concat(format("%db, %d, %s, %s; // full_frame", frame_type, foffset, getStackMap(in, 0), getStackMap(in, 0)))); wrappingLevel = checkWrapping(wrappingLevel); } } idx++; } } finally { out_end("}"); } } case ATT_EnclosingMethod -> decodeCPXAttrM(in, len, AttrName, 2); case ATT_AnnotationDefault -> decodeElementValue(in, out); case ATT_RuntimeInvisibleAnnotations, ATT_RuntimeVisibleAnnotations -> { int an_num = in.readUnsignedShort(); startArrayCmt(an_num, "annotations"); try { for (int i = 0; i < an_num; i++) { decodeAnnotation(in, out); if (i < an_num - 1) { out_println(";"); } } } finally { out_end("}"); } } // 4.7.20 The RuntimeVisibleTypeAnnotations Attribute // 4.7.21 The RuntimeInvisibleTypeAnnotations Attribute case ATT_RuntimeInvisibleTypeAnnotations, ATT_RuntimeVisibleTypeAnnotations -> { int ant_num = in.readUnsignedShort(); startArrayCmt(ant_num, "annotations"); try { for (int i = 0; i < ant_num; i++) { decodeTypeAnnotation(in, out); if (i < ant_num - 1) { out_println(";"); } } } finally { out_end("}"); } } case ATT_RuntimeInvisibleParameterAnnotations, ATT_RuntimeVisibleParameterAnnotations -> { int pm_num = in.readUnsignedByte(); startArrayCmtB(pm_num, "parameters"); try { for (int k = 0; k < pm_num; k++) { int anp_num = in.readUnsignedShort(); startArrayCmt(anp_num, "annotations"); try { for (int i = 0; i < anp_num; i++) { decodeAnnotation(in, out); if (k < anp_num - 1) { out_println(";"); } } } finally { out_end("}"); } if (k < pm_num - 1) { out_println(";"); } } } finally { out_end("}"); } } case ATT_BootstrapMethods -> { int bm_num = in.readUnsignedShort(); startArrayCmt(bm_num, "bootstrap_methods"); try { for (int i = 0; i < bm_num; i++) { decodeBootstrapMethod(in); if (i < bm_num - 1) { out_println(";"); } } } finally { out_end("}"); } } case ATT_Module -> decodeModule(in); case ATT_TargetPlatform -> decodeCPXAttrM(in, len, AttrName, 3); case ATT_ModulePackages -> { int p_num = in.readUnsignedShort(); startArrayCmt(p_num, null); try { decodeCPXAttrM(in, len - 2, AttrName, p_num); } finally { out_end("}"); } } // MethodParameters_attribute { // u2 attribute_name_index; // u4 attribute_length; // u1 parameters_count; // { u2 name_index; // u2 access_flags; // } parameters[parameters_count]; // } case ATT_MethodParameters -> { int pcount = in.readUnsignedByte(); startArrayCmtB(pcount, AttrName); try { for (int i = 0; i < pcount; i++) { out_println("#" + in.readUnsignedShort() + " " + toHex(in.readUnsignedShort(), 2) + ";" + getCommentPosCond()); } } finally { out_end("}"); } } // JEP 359 Record(Preview): class file 58.65535 // Record_attribute { // u2 attribute_name_index; // u4 attribute_length; // u2 components_count; // component_info components[components_count]; // } case ATT_Record -> { int ncomps = in.readUnsignedShort(); startArrayCmt(ncomps, "components"); try { for (int i = 0; i < ncomps; i++) { decodeInfo(in, out, "component", false); if (i < ncomps - 1) { out_println(";"); } } } finally { out_end("}"); } } case ATT_ConstantValue, ATT_Signature, ATT_SourceFile -> decodeCPXAttr(in, len, AttrName); // JEP 181 (Nest-based Access Control): class file 55.0 // NestHost_attribute { // u2 attribute_name_index; // u4 attribute_length; // u2 host_class_index; // } case ATT_NestHost -> decodeTypes(in, 1, "class"); // JEP 181 (Nest-based Access Control): class file 55.0 // NestMembers_attribute { // u2 attribute_name_index; // u4 attribute_length; // u2 number_of_classes; // u2 classes[number_of_classes]; // } // JEP 360 (Sealed types): class file 59.65535 // PermittedSubclasses_attribute { // u2 attribute_name_index; // u4 attribute_length; // u2 number_of_classes; // u2 classes[number_of_classes]; // } case ATT_NestMembers -> { int nsubtypes = in.readUnsignedShort(); startArrayCmt(nsubtypes, "classes"); try { decodeTypes(in, nsubtypes, "class"); } finally { out_end("}"); } } case ATT_PermittedSubclasses -> { int nsubtypes = in.readUnsignedShort(); startArrayCmt(nsubtypes, "subclasses"); try { decodeTypes(in, nsubtypes, "subclass"); } finally { out_end("}"); } } // Valhalla: // // LoadableDescriptors_attribute { // u2 attribute_name_index; // u4 attribute_length; // u2 number_of_descriptors; // u2 descriptors[number_of_descriptors]; // } case ATT_LoadableDescriptors -> { int nsubtypes = in.readUnsignedShort(); startArrayCmt(nsubtypes, "Utf8"); try { decodeTypes(in, nsubtypes, "descriptor"); } finally { out_end("}"); } } // SourceDebugExtension_attribute { // u2 attribute_name_index; // u4 attribute_length; // u1 debug_extension[attribute_length]; // } case ATT_SourceDebugExtension -> { printUtf8String(in, len); endingComment = "Attr(#" + name_cpx + ")"; } default -> { printBytes(in, len, true, false); endingComment = "Attr(#" + name_cpx + ")"; } } } catch (EOFException e) { environment.println(getOutString("") + "// == The unexpected end of attribute array while parsing. =="); } finally { int rest = arrayInputStream.available(); if (rest > 0) { environment.println(getOutString("") + "// == The attribute array started at" + posComment + " has " + rest + " bytes more than expected. =="); printBytes(in, rest, true, true); } out_end("} // end of " + endingComment); arrayInputStream.leave(); } } private void decodeModuleStatement(String statementName, DataInputStream in) throws IOException { int index, nFlags; String sComment; // u2 {exports|opens}_count int count = in.readUnsignedShort(); startArrayCmt(count, statementName); try { for (int i = 0; i < count; i++) { // u2 {exports|opens}_index; u2 {exports|opens}_flags index = in.readUnsignedShort(); nFlags = in.readUnsignedShort(); sComment = environment.printDetailsFlag ? format(" // [ %s ]", EModifier.asNames(nFlags, MODULE_DIRECTIVES)) : ""; out_println(format("#%d %s%s", index, toHex(nFlags, 2), sComment)); int exports_to_count = in.readUnsignedShort(); startArrayCmt(exports_to_count, null); try { for (int j = 0; j < exports_to_count; j++) { out_println("#" + in.readUnsignedShort() + ";"); } } finally { out_end("};"); } } } finally { out_end("} // of " + statementName); environment.println(); } } private void decodeModule(DataInputStream in) throws IOException { int nFlags; String sComment; //u2 module_name_index int index = in.readUnsignedShort(); out_print("#" + index + "; // "); if (environment.printDetailsFlag) { environment.println(format("%-16s", "name_index")); } else { environment.println("name_index"); } // u2 module_flags int moduleFlags = in.readUnsignedShort(); out_println(format("%s; //flags%s", toHex(moduleFlags, 2), environment.printDetailsFlag ? EModifier.asNames(moduleFlags, MODULE_DIRECTIVES) + " " : "")); environment.println(); //u2 module_version int versionIndex = in.readUnsignedShort(); out_println("#" + versionIndex + "; // version"); // u2 requires_count int count = in.readUnsignedShort(); startArrayCmt(count, "requires"); try { for (int i = 0; i < count; i++) { // u2 requires_index; u2 requires_flags; u2 requires_version_index index = in.readUnsignedShort(); nFlags = in.readUnsignedShort(); versionIndex = in.readUnsignedShort(); sComment = environment.printDetailsFlag ? format(" // %s", EModifier.asNames(nFlags, MODULE_DIRECTIVES)) : ""; out_println(format("#%d %s #%d;%s", index, toHex(nFlags, 2), versionIndex, sComment)); } } finally { out_end("} // end of requires"); environment.println(); } decodeModuleStatement("exports", in); decodeModuleStatement("opens", in); // u2 uses_count count = in.readUnsignedShort(); startArrayCmt(count, "uses"); try { for (int i = 0; i < count; i++) { // u2 uses_index out_println("#" + in.readUnsignedShort() + ";"); } } finally { out_end("} // end of uses"); environment.println(); } count = in.readUnsignedShort(); // u2 provides_count startArrayCmt(count, "provides"); try { for (int i = 0; i < count; i++) { // u2 provides_index out_println("#" + in.readUnsignedShort()); int provides_with_count = in.readUnsignedShort(); // u2 provides_with_count startArrayCmt(provides_with_count, null); try { for (int j = 0; j < provides_with_count; j++) { // u2 provides_with_index; out_println("#" + in.readUnsignedShort() + ";"); } } finally { out_end("};"); } } } finally { out_end("} // end of provides"); environment.println(); } } private void decodeAttrs(DataInputStream in, ToolOutput out) throws IOException { // Read the attributes int attr_num = in.readUnsignedShort(); startArrayCmt(attr_num, "Attributes"); try { for (int i = 0; i < attr_num; i++) { decodeAttr(in, out); if (i + 1 < attr_num) { out_println(";"); } } } finally { out_end("} // end of Attributes"); } } private void decodeMembers(DataInputStream in, ToolOutput out, String groupName, String elementName) throws IOException { int count = in.readUnsignedShort(); environment.traceln(groupName + "=" + count); startArrayCmt(count, groupName); try { for (int i = 0; i < count; i++) { decodeInfo(in, out, elementName, true); if (i + 1 < count) { out_println(";"); } } } finally { out_end("} // end of " + groupName); environment.println(); } } String getInnerClassComment(int inner_class_access_flags) { StringBuilder sb = new StringBuilder(); if (environment.printDetailsFlag) { sb.append("// access [ ").append(EModifier.asNames(inner_class_access_flags, ClassFileContext.INNER_CLASS)).append(" ]"); } return sb.toString(); } void decodeClass() throws IOException { boolean printingStarted = false; // Read the header try { int magic = inputStream.readInt(); int min_version = inputStream.readUnsignedShort(); int version = inputStream.readUnsignedShort(); ByteBuffer byteBuffer = ByteBuffer.allocate(8).putInt(magic). putShort((short) min_version). putShort((short) version); // Read the constant pool readCP(byteBuffer.array(), inputStream); short access = inputStream.readShort(); // don't care about sign int this_cpx = inputStream.readUnsignedShort(); try { entityName = (String) cpool[(Integer) cpool[this_cpx]]; if (entityName.equals("module-info")) { entityType = "module"; entityName = getModuleName(); } else { entityType = "class"; } environment.getToolOutput().startClass(entityName, Optional.of(".jcod"), environment); if (!entityName.isEmpty() && (JcodTokens.keyword_token_ident(entityName) != IDENT || JcodTokens.getConstTagByParseString(entityName) != -1)) { // JCod can't parse a entityName matching a keyword or a constant value, // then use the filename instead: out_begin(format("file \"%s.class\" {", entityName)); } else { if (entityName.startsWith(ERROR_PREFIX)) out_begin(format("%s { %s", entityType, entityName)); else out_begin(format("%s %s {", entityType, entityName)); } printingStarted = true; } catch (Exception e) { entityName = environment.getToolInput().getName(); environment.println("// " + e.getMessage() + " while accessing entityName"); out_begin(format("%s %s { // source file name", entityType, entityName)); printingStarted = true; } if (magic != JAVA_MAGIC) { out_println(toHex(magic, 4) + "; // wrong magic: " + toHex(JAVA_MAGIC, 4) + " expected"); } else { out_println(toHex(magic, 4) + ";"); } out_println(min_version + "; // minor version"); out_println(version + "; // version"); if (CFVersion.isValueObjectContext(version, min_version)) { EModifier.setGlobalContext(VALUE_OBJECTS); } // Print the constant pool printCP(); out_println(toHex(access, 2) + "; // access" + (environment.printDetailsFlag ? " [ " + EModifier.asNames(access, ClassFileContext.CLASS) + " ]" : "")); out_println("#" + this_cpx + "; // this_cpx"); int super_cpx = inputStream.readUnsignedShort(); out_println("#" + super_cpx + "; // super_cpx"); environment.traceln("jdec.trace.access_thisCpx_superCpx", access, this_cpx, super_cpx); environment.println(); // Read the interfaces int numinterfaces = inputStream.readUnsignedShort(); environment.traceln("jdec.trace.numinterfaces", numinterfaces); startArrayCmt(numinterfaces, "Interfaces"); try { decodeTypes(inputStream, numinterfaces, "interface"); } finally { out_end("} // end of Interfaces"); environment.println(); } // Read the fields decodeMembers(inputStream, environment.getToolOutput(), "Fields", "field"); // Read the methods decodeMembers(inputStream, environment.getToolOutput(), "Methods", "method"); // Read the attributes decodeAttrs(inputStream, environment.getToolOutput()); } catch (EOFException ignored) { } catch (ClassFormatError err) { String msg = err.getMessage(); environment.println(INDENT_STRING + "// ClassFormatError" + (msg == null || msg.isEmpty() ? "" : ": " + msg)); printRestOfBytes(); printingStarted = true; throw err; } finally { if (printingStarted) { if (environment.printDetailsFlag && (!entityName.isBlank() || !entityType.isBlank())) { out_end(format("} // end of %s %s", entityType, entityName)); } else { out_end("}"); } } environment.getToolOutput().finishClass(entityName); } } // end decodeClass() private int checkWrapping(int wrappingLevel) { if (wrappingLevel > 0) { for (int i = wrappingLevel - 1; i >= 0; i--) { out_println(INDENT_STRING.repeat(i).concat("};")); } } return 0; } private void decodeTypes(DataInputStream in, int count, String typeName) throws IOException { for (int i = 0; i < count; i++) { int type_cpx = in.readUnsignedShort(); environment.traceln("jdec.trace.type", i, type_cpx); String s = "#" + type_cpx + ";"; if (environment.printDetailsFlag) { Object cpObj = cpool[type_cpx]; String name; if (cpObj instanceof Integer index) { name = "%s: %s".formatted(typeName, getStringByIndex(index)); } else { name = "%s: %s".formatted(typeName, cpObj); } out_println(s + " // " + name + getStringPos()); } else { out_println(s); } } } private String getStringByIndex(int idx) { Object obj = cpool[idx]; if (obj instanceof String str) { return str; } else { return "%s #%d refers to a ConstantPool Object: %s". formatted(ERROR_PREFIX, idx, String.valueOf(obj)); } } private String getNameByRefIndex(int idx) { Object obj = cpool[idx]; if (obj instanceof Integer ref) { return getStringByIndex(ref); } else { return "%s #%d refers to a ConstantPool Object: %s". formatted(ERROR_PREFIX, idx, String.valueOf(obj)); } } private String formatComments(String str, int shift) { String[] pair = str.split("//"); int len = pair.length; if (len < 2) { return str; } String s = pair[0]; for (int i = 1; i <= len - 2; i++) { s = s.concat("//").concat(pair[i]); } return s + repeat(" ", COMMENT_OFFSET - s.length() - shift * INDENT_LENGTH) + " // " + pair[len - 1].trim(); } }// end class ClassData jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdec/JdecEnvironment.java000066400000000000000000000056131514323636100271310ustar00rootroot00000000000000/* * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdec; import org.openjdk.asmtools.common.DecompilerLogger; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import static java.lang.String.format; public class JdecEnvironment extends Environment { protected boolean printDetailsFlag; // Output stream or files or custom Strings private final ToolOutput toolOutput; /** * @param builder the jdec environment builder */ private JdecEnvironment(Builder builder) { super(builder); this.toolOutput = builder.toolOutput; } @Override public void printErrorLn(String format, Object... args) { getLogger().printErrorLn(format, args); } public Environment setPrintDetailsFlag(boolean value) { this.printDetailsFlag = value; return this; } @Override public void println(String format, Object... args) { getToolOutput().printlns((args == null || args.length == 0) ? format : format(format, args)); } @Override public void println() { getToolOutput().printlns(""); } @Override public void print(String format, Object... args) { getToolOutput().prints((args == null || args.length == 0) ? format : format(format, args)); } @Override public void print(char ch) { getToolOutput().prints(ch); } static class JDecBuilder extends Builder { public JDecBuilder(ToolOutput toolOutput, DualStreamToolOutput log) { super(toolOutput, new DecompilerLogger("jdec", JdecEnvironment.class, log)); } @Override public JdecEnvironment build() { return new JdecEnvironment(this); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdec/JdecTool.java000066400000000000000000000040041514323636100255330ustar00rootroot00000000000000/* * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdec; import org.openjdk.asmtools.common.Decoder; import org.openjdk.asmtools.common.outputs.EscapedPrintStreamOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.common.outputs.log.StderrLog; import java.io.PrintStream; public abstract class JdecTool extends Decoder { protected JdecTool(ToolOutput toolOutput, DualStreamToolOutput log) { super(toolOutput, log); } protected JdecTool(ToolOutput toolOutput) { super(toolOutput, new StderrLog()); } protected JdecTool(PrintStream toolOutput) { this(new EscapedPrintStreamOutput(toolOutput)); } @Override public JdecEnvironment getEnvironment(ToolOutput toolOutput, DualStreamToolOutput log) { JdecEnvironment.JDecBuilder builder = new JdecEnvironment.JDecBuilder(toolOutput, log); return builder.build(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdec/Main.java000066400000000000000000000154561514323636100247310ustar00rootroot00000000000000/* * Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdec; import org.openjdk.asmtools.common.inputs.FileInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.EscapedPrintStreamOutput; import org.openjdk.asmtools.common.outputs.StdoutOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualOutputStreamOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.common.outputs.log.StderrLog; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Collections; import java.util.List; import static org.openjdk.asmtools.Main.*; import static org.openjdk.asmtools.common.Environment.FAILED; import static org.openjdk.asmtools.common.Environment.OK; import static org.openjdk.asmtools.common.outputs.FSOutput.FSDestination.DIR; import static org.openjdk.asmtools.util.ProductInfo.FULL_VERSION; /** * jdec is a disassembler that accepts a .class file, and prints the plain-text translation of jcod source file * to the standard output. *

* Main program of the Java DECoder :: class to jcod */ public class Main extends JdecTool { public Main(ToolOutput toolOutput, DualStreamToolOutput log, ToolInput... toolInputs) { super(toolOutput, log); Collections.addAll(fileList, toolInputs); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, ToolInput toolInput, String... argv) { super(toolOutput, log); if (toolInput != null) { fileList.add(toolInput); } parseArgs(argv); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, String... argv) { this(toolOutput, log, null, argv); } public Main(EscapedPrintStreamOutput toolOutput, String[] argv) { this(toolOutput, new StderrLog(), argv); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, ToolInput toolInput) { super(toolOutput, log); fileList.add(toolInput); } // jdec entry point public static void main(String... argv) { Main decoder = new Main(new StdoutOutput(), argv); System.exit(decoder.decode()); } @Override public void usage() { environment.usage(List.of( "info.usage", "info.opt.d", "info.opt.w", "info.opt.g", "info.opt.v", "info.opt.version")); } @Override protected void parseArgs(String... argv) { // Parse arguments for (int i = 0; i < argv.length; i++) { String arg = argv[i]; switch (arg) { case "-g": setPrintDetails(true); break; case "-v": environment.setVerboseFlag(true); break; case "-t": environment.setVerboseFlag(true); environment.setTraceFlag(true); break; case WRITE_SWITCH: // -w environment.setIgnorePackage(true); setFSDestination(DIR, ++i, argv); break; case DIR_SWITCH: setFSDestination(DIR, ++i, argv); break; case DUAL_LOG_SWITCH: this.environment.setOutputs(new DualOutputStreamOutput()); break; case VERSION_SWITCH: environment.println(FULL_VERSION); System.exit(OK); case "-h", "-help": usage(); System.exit(OK); case STDIN_SWITCH: addStdIn(); break; default: if (arg.startsWith("-")) { environment.error("err.invalid_option", arg); usage(); System.exit(FAILED); } else { fileList.add(new FileInput(arg)); } } } if (fileList.isEmpty()) { usage(); System.exit(FAILED); } } public void setPrintDetails(boolean value) { environment.setPrintDetailsFlag(value); } /** * Runs the decoder */ @Override public synchronized int decode() { int rc = OK; for (ToolInput toolInput : fileList) { try { environment.setToolInput(toolInput); ClassData classData = new ClassData(environment); classData.decodeClass(); environment.getOutputs().flush(); rc += environment.getLogger().registerTotalIssues(rc, toolInput); environment.getLogger().flush(); continue; } catch (FileNotFoundException fnf) { environment.printException(fnf); environment.error("err.not_found", toolInput); rc = FAILED; } catch (IOException | ClassFormatError ioe) { environment.error(ioe); environment.printException(ioe); rc += environment.getLogger().registerTotalIssues(rc, toolInput); } catch (Error error) { environment.error(error); environment.printException(error); rc += environment.getLogger().registerTotalIssues(rc, toolInput); } catch (Exception ex) { environment.error(ex); environment.printException(ex); rc += environment.getLogger().registerTotalIssues(rc, toolInput); } environment.getLogger().flush(); break; } return rc; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdec/NestedByteArrayInputStream.java000066400000000000000000000037051514323636100313000ustar00rootroot00000000000000/* * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdec; import java.io.ByteArrayInputStream; import java.util.Stack; /** * this class provides functionality needed to read class files: *

*/ public class NestedByteArrayInputStream extends ByteArrayInputStream { NestedByteArrayInputStream(byte buf[]) { super(buf); } NestedByteArrayInputStream(byte buf[], int offset, int length) { super(buf, offset, length); } public int getPos() { return pos; } Stack savedStates = new Stack(); public void enter(int range) { savedStates.push(count); if (pos + range < count) { count = pos + range; } } public void leave() { pos = count; count = ((Integer) savedStates.pop()).intValue(); } } // end class NestedByteArrayInputStream jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdec/i18n.properties000066400000000000000000000032351514323636100260670ustar00rootroot00000000000000# Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. info.usage=\ Usage: java -jar asmtools.jar jdec [options] |- decompile into jcod file(s)\n\ \ if - is provided, is used\n\ where possible options include: # see also shared section in asmtools/i18 info.opt.g=\ \ -g Generate a detailed output format err.invalid_option=Invalid option: {0} err.not_found=No such file: {0} err.count.issues={0}{1}in the file: {2} err.file.empty=The file is empty: {0} jdec.trace.CP_len=CP len= {0} jdec.trace.CP_entry=CP entry # {0} tag= {1} jdec.trace.access_thisCpx_superCpx=access={0} this_cpx={1} super_cpx={2} jdec.trace.numinterfaces=numinterfaces={0} jdec.trace.type=type_cpx[{0}]={1} jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/000077500000000000000000000000001514323636100232135ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/AnnotationData.java000066400000000000000000000137571514323636100267770ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import java.io.DataInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.stream.Collectors; import static org.openjdk.asmtools.jdis.MemberData.AnnotationElementState.*; public class AnnotationData extends MemberData { protected String visibleAnnotationToken = "@+"; protected String invisibleAnnotationToken = "@-"; protected String dataName = "AnnotationData"; private final ArrayList annotationElements = new ArrayList<>(); private int type_cpx = 0; //an index into the constant pool indicating the annotation type for this annotation. private final boolean invisible; public AnnotationData(T data, boolean invisible) { super(data); this.invisible = invisible; } public void read(DataInputStream in) throws IOException { type_cpx = in.readShort(); int elemValueLength = in.readShort(); for (int i = 0; i < elemValueLength; i++) { AnnotationElement elem = new AnnotationElement(data); elem.read(in, invisible); annotationElements.add(elem); } } @Override public void print() throws IOException { printHeader(); printBody(); } // Prints the annotation header. protected void printHeader() { //Print annotation Header, which consists of the // Annotation Token ('@'), visibility ('+', '-'), // and the annotation name (type index, CPX). // Mark whether it is invisible or not. String annotationName = pool.getString(type_cpx, index -> null); if (printCPIndex) { annotationName = "#" + type_cpx + (annotationName != null && (!skipComments) ? " /* %s */".formatted(annotationName) : ""); } else { if (annotationName == null) { annotationName = "#" + type_cpx; } else { annotationName = "\"" + annotationName + "\""; } } switch (getAnnotationElementState()) { case HAS_DEFAULT_VALUE -> { println(" " + DEFAULT_VALUE_PREFIX); printIndent(invisible ? invisibleAnnotationToken : visibleAnnotationToken).print(annotationName); setCommentOffset(getCommentOffset()); } case PARAMETER_ANNOTATION, INLINED_ELEMENT -> print(invisible ? invisibleAnnotationToken : visibleAnnotationToken).print(annotationName); default -> printIndent(invisible ? invisibleAnnotationToken : visibleAnnotationToken).print(annotationName); } } protected void printBody() throws IOException { // For a standard annotation, print out brackets, // and list the name/value pairs. if (isEmpty()) { // Marker annotation print(" { }"); } else { switch (getAnnotationElementState()) { case HAS_DEFAULT_VALUE -> { println(" {"); printBodyOfDefaultData(); println(); decIndent(); printIndent("}"); } case INLINED_ELEMENT -> { incIndent().printIndentLn("{"); printBodyOfData(); printIndent("}").decIndent(); } default -> { println(" {"); printBodyOfData(); printIndent("}"); } } } } // Prints the annotation value that is the default. protected void printBodyOfDefaultData() throws IOException { int prefixLength = getCommentOffset(); for (AnnotationElement annotationElement : annotationElements) { print(enlargedIndent(prefixLength)); annotationElement.setElementState(RIGHT_OPERAND); annotationElement.print(); } } // Prints the annotation value that is the default. protected void printBodyOfData() throws IOException { int i = 0; for (AnnotationElement annotationElement : annotationElements) { annotationElement.setCommentOffset(getCommentOffset()).setTheSame(this).incIndent(); annotationElement.print(); println((i++ < annotationElements.size() - 1) ? "," : ""); } } @Override public String toString() { StringBuilder sb = new StringBuilder(); String annotationName = pool.getString(type_cpx, index -> "#" + index); sb.append(invisible ? invisibleAnnotationToken : visibleAnnotationToken); sb.append(annotationName).append("{"); sb.append(annotationElements.stream().map(AnnotationElement::toString).collect(Collectors.joining(","))); return sb.append("}").toString(); } /** * @return true if annotation has no elements */ public boolean isEmpty() { return annotationElements.isEmpty(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/AnnotationElement.java000066400000000000000000000376351514323636100275200ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.FormatError; import java.io.DataInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.function.Supplier; import java.util.stream.Collectors; import static java.lang.String.format; import static org.openjdk.asmtools.asmutils.StringUtils.Utf8ToString; import static org.openjdk.asmtools.asmutils.StringUtils.isPrintableChar; import static org.openjdk.asmtools.jasm.ClassFileConst.AnnotationElementType; import static org.openjdk.asmtools.jasm.ClassFileConst.getAnnotationElementType; import static org.openjdk.asmtools.jdis.MemberData.AnnotationElementState.*; /** * Base class of all AnnotationElement entries */ public class AnnotationElement> extends MemberData { //constant pool index for the name of the Annotation Element public int name_cpx; public AnnotationValue value = null; public AnnotationElement(T data) { super(data); } /* * Static factory - creates Annotation Elements. */ public static

> AnnotationValue

readValue(DataInputStream in, P data, boolean invisible) throws IOException { AnnotationValue

val; char tg = (char) in.readByte(); AnnotationElementType tag = getAnnotationElementType(tg); switch (tag) { // String, Byte, Char, Int (no need to add keyword), Short, Boolean, Float, Double, Long, Class case AE_STRING, AE_BYTE, AE_CHAR, AE_INT, AE_SHORT, AE_BOOLEAN, AE_FLOAT, AE_DOUBLE, AE_LONG, AE_CLASS -> { // CPX based Annotation int cpx = in.readShort(); val = new CPX_AnnotationValue<>(tag, data, cpx); } // Enum case AE_ENUM -> { // CPX2 based Annotation int cpx1 = in.readShort(); int cpx2 = in.readShort(); val = new CPX2_AnnotationValue<>(tag, data, cpx1, cpx2); } // Annotation case AE_ANNOTATION -> { AnnotationData

annotationData = new AnnotationData<>(data, invisible); annotationData.read(in); val = new Annotation_AnnotationValue<>(tag, data, annotationData); } // Array case AE_ARRAY -> { Array_AnnotationValue

arrayAnnotationValue = new Array_AnnotationValue<>(tag, data); val = arrayAnnotationValue; int cnt = in.readShort(); for (int i = 0; i < cnt; i++) { arrayAnnotationValue.add(readValue(in, data, invisible)); } } default -> { if (data.bestEffort) { data.environment.error("err.unknown.tag", isPrintableChar(tg) ? tg : '?', Integer.toHexString(tg)); val = new Annotation_AnnotationValue<>(tag, data, null); } else { throw new FormatError(data.environment.getLogger(), "err.unknown.tag", isPrintableChar(tg) ? tg : '?', Integer.toHexString(tg)); } } } return val; } /** * Read and resolve the method data called from ClassData. precondition: NumFields has * already been read from the stream. */ public void read(DataInputStream in, boolean invisible) throws IOException { name_cpx = in.readShort(); value = readValue(in, data, invisible); environment.traceln("AnnotationElement: cpIndex#%d=%s value=%s", name_cpx, pool.getString(name_cpx, index -> "????"), value.toString()); } public String stringVal() { String name = pool.getName(name_cpx); if (printCPIndex) { return (skipComments) ? format("#%d", name_cpx) : format("#%d /* %s */", name_cpx, name); } return name; } @Override public void print() throws IOException { printIndent(stringVal() + " = "); value.setTheSame(this).incIndent(); if (value.elementType == AnnotationElementType.AE_ARRAY) { if (((Array_AnnotationValue) value).annotationValues.size() == 0) { print("{ }"); } else { println().print(getIndentString()); value.print(); printIndent("}"); } } else { value.setElementState(this.getAnnotationElementState()); value.print(); } } @Override public String toString() { return ""; } /** * Base class for an annotation value. */ public static class AnnotationValue> extends MemberData { // tag the descriptor for the constant public AnnotationElementType elementType; public AnnotationValue(AnnotationElementType elementType, T data) { super(data); this.elementType = elementType; memberType = "AnnotationValue"; } @Override public String toString() { return format("<%s %s %s>", memberType, elementType.printValue(), stringVal()); } protected String stringVal() { return ""; } @Override public void print() throws IOException { print(PadLeft(elementType.value(), 4)); } } /** * Annotation value which is described by a single CPX entries (i.e. String, byte, char, * int, short, boolean, float, long, double, class reference). */ public static class CPX_AnnotationValue> extends AnnotationValue { public int cpx; public CPX_AnnotationValue(AnnotationElementType elementType, T data, int cpx) { super(elementType, data); this.cpx = cpx; memberType = "CPX_AnnotationValue"; } @Override public String stringVal() { StringBuilder sb = new StringBuilder(); switch (elementType) { // String case AE_STRING -> sb.append(valueAsString("", () -> Utf8ToString(pool.getString(cpx, index -> "#" + cpx), "\""))); // Byte, Char, Short case AE_BYTE, AE_CHAR, AE_SHORT -> sb.append(valueAsString(elementType.printValue(), () -> pool.getConst(cpx).stringVal())); // Int (no need to add keyword), Long, Float, Double case AE_INT, AE_FLOAT, AE_DOUBLE, AE_LONG -> sb.append(valueAsString("", () -> pool.getConst(cpx).stringVal())); // Boolean case AE_BOOLEAN -> sb.append(valueAsString(elementType.printValue(), () -> ((ConstantPool.CP_Int) pool.getConst(cpx)).value == 0 ? "false" : "true")); // Class case AE_CLASS -> sb.append(valueAsString(elementType.printValue(), () -> pool.getName(cpx))); default -> { } } return sb.toString(); } private String valueAsString(String prefix, Supplier supplier) { String str = prefix.isEmpty() ? "" : prefix + " "; if (printCPIndex) { if (skipComments) { str += format("#%d", cpx); } else { str += format("#%d /* %s */", cpx, supplier.get()); } } else { str += supplier.get(); } return str; } @Override public void print() { AnnotationElementState state = getAnnotationElementState(); if (state == HAS_DEFAULT_VALUE) { print(getDefaultValuePrefix() + "%s }", stringVal()); } else if (state == RIGHT_OPERAND) { print(" %s }", stringVal()); } else { print(stringVal()); } } } /** * AnnotationValue that contain 2 cpx indices (i.e. enums). */ public static class CPX2_AnnotationValue> extends AnnotationValue { public int cpx1; public int cpx2; public CPX2_AnnotationValue(AnnotationElementType elementType, T data, int cpx1, int cpx2) { super(elementType, data); this.cpx1 = cpx1; this.cpx2 = cpx2; memberType = "CPX2_AnnotationValue"; } @Override public String stringVal() { StringBuilder sb = new StringBuilder(); // Enum if (elementType == AnnotationElementType.AE_ENUM) { // print the enum type and constant name String className = pool.getName(cpx1); String name = pool.getName(cpx2); sb.append(elementType.printValue()).append(' '); if (printCPIndex) { sb.append(format("#%d.#%d", cpx1, cpx2)); if (!skipComments) { sb.append(format(" /* %s.%s */", className, name)); } } else { sb.append(className).append(".").append(name); } } return sb.toString(); } @Override public String toString() { return format("<%s %s>", memberType, stringVal()); } @Override public void print() { if (getAnnotationElementState() == HAS_DEFAULT_VALUE) { print(getDefaultValuePrefix() + "%s }", stringVal()); } else { print(stringVal()); } } } /** * Annotation value that is an array of annotation elements. */ public static class Array_AnnotationValue> extends AnnotationValue { public ArrayList> annotationValues = new ArrayList<>(); public Array_AnnotationValue(AnnotationElementType elementType, T data) { super(elementType, data); memberType = "Array_AnnotationValue"; } @Override public String stringVal() { return super.stringVal() + "={" + annotationValues.stream().map(AnnotationValue::toString).collect(Collectors.joining(",")) + '}'; } public void add(AnnotationValue annotationValue) { annotationValues.add(annotationValue); } @Override public void print() throws IOException { int count = annotationValues.size(); if (annotationValues.size() > 0) { AnnotationElementState state = getAnnotationElementState(); if (state == HAS_DEFAULT_VALUE || state == INLINED_ELEMENT) { printDefaultAnnotationElement(count); } else { printAnnotationElement(count); } } else { // Empty default array value. print(getDefaultValuePrefix() + "{ } }"); } } private

> int getIndent(P value) { if (value instanceof Annotation_AnnotationValue || value instanceof CPX_AnnotationValue) { return getCommentOffset() + DEFAULT_VALUE_PREFIX.length() + getIndentSize(); } return 1; } private int getItemsPerLine(int count, AnnotationElementType type) { return switch (type) { case AE_CLASS, AE_ANNOTATION, AE_ENUM, AE_ARRAY -> 1; default -> (count > 10) ? (count % 2 == 0 ? 4 : 6) : (count % 2 == 0 ? 2 : 3); }; } public void printDefaultAnnotationElement(int count) throws IOException { int i = 0, lineIndent = getIndent(annotationValues.get(0)); int ItemsPerLine = getAnnotationElementState() == INLINED_ELEMENT ? 1 : getItemsPerLine(count, annotationValues.get(0).elementType); println(getDefaultValuePrefix() + "{ "); printPadLeft(INDENT_STRING, INDENT_OFFSET * 2); for (AnnotationValue annotationValue : annotationValues) { annotationValue.setElementState(INLINED_ELEMENT); annotationValue.setCommentOffset(lineIndent); if (annotationValue instanceof Annotation_AnnotationValue || annotationValue instanceof CPX_AnnotationValue || annotationValue instanceof CPX2_AnnotationValue) { if (i % ItemsPerLine == 0 && i != 0) printPadLeft(INDENT_STRING, INDENT_OFFSET * 2); } annotationValue.print(); // entry if (i < count - 1) print("," + (i % ItemsPerLine == (ItemsPerLine - 1) ? System.lineSeparator() : " ")); i++; } println(" }").print(" }"); } public void printAnnotationElement(int count) throws IOException { int i = 0; println("{"); for (AnnotationValue annotationValue : annotationValues) { annotationValue.setTheSame(this); if (annotationValue instanceof CPX_AnnotationValue || annotationValue instanceof CPX2_AnnotationValue) { print(annotationValue.getIndentString()); } annotationValue.print(); // entry if (i < count - 1) println(","); i++; } println(); } } /** * Annotation value that is a reference to an annotation. */ public static class Annotation_AnnotationValue> extends AnnotationValue { AnnotationData annotationData; public Annotation_AnnotationValue(AnnotationElementType annotationElementType, T data, AnnotationData annotationData) { super(annotationElementType, data); this.annotationData = annotationData; memberType = "Annotation_AnnotationValue"; } @Override public String stringVal() { return annotationData.toString(); } @Override public Annotation_AnnotationValue setElementState(AnnotationElementState state) { super.setElementState(state); annotationData.setElementState(state); return this; } @Override public void print() throws IOException { if (this.annotationData != null) { // data might be null if -best-effort is set // sets the same offset, Indent etc. annotationData.setCommentOffset(this.getCommentOffset()); annotationData.setTheSame(this); annotationData.print(); // check off } } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/AttrData.java000066400000000000000000000073111514323636100255640ustar00rootroot00000000000000/* * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.asmutils.HexUtils; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.common.FormatError; import org.openjdk.asmtools.common.structure.EAttribute; import java.io.DataInputStream; import java.io.IOException; import java.util.Arrays; import java.util.stream.Collectors; import java.util.stream.IntStream; import static java.lang.Math.min; import static org.openjdk.asmtools.asmutils.HexUtils.toHex; public class AttrData { private final int MAX_DATA_PRINT_SIZE = 10; private EAttribute attributeInfo; // private int name_cpx; private int length; private byte[] data; final Environment environment; public AttrData(Environment environment, EAttribute attributeInfo) { this.environment = environment; this.attributeInfo = attributeInfo; } public void read(int name_cpx, int attrLength, DataInputStream in) throws IOException { this.name_cpx = name_cpx; this.length = attrLength; try { data = new byte[attrLength]; in.readFully(data); environment.traceln("AttrData:#%d length=%d", name_cpx, attrLength); } catch (NegativeArraySizeException | ArrayIndexOutOfBoundsException ex) { throw new FormatError(environment.getLogger(), "err.invalid.attribute.length", attributeInfo.printValue(), attrLength); } } public String dataAsString() { if (data != null && data.length > 0) { int maxLength = min( MAX_DATA_PRINT_SIZE, data.length ); String res = IntStream.range(0, maxLength).mapToObj(i -> HexUtils.toHex(i)).collect(Collectors.joining(", ")); if (data.length > MAX_DATA_PRINT_SIZE) { res += ", ..."; } return res; } return ""; } /** * ATTRIBUTE_NAME_attribute { * u2 attribute_name_index; * u4 attribute_length; * ... * } * * @param name_cpx set the ConstantPool index of the attribute name * @return the current instance */ public AttrData setNameCpx(int name_cpx) { this.name_cpx = name_cpx; return this; } public AttrData setLength(int length) { this.length = length; return this; } /** * ATTRIBUTE_NAME_attribute { * u2 attribute_name_index; * u4 attribute_length; * ... * } * * @return attribute_name_index */ public int getNameCpx() { return name_cpx; } public int getLength() { return length; } public EAttribute getAttributeInfo() { return attributeInfo; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/AttributeData.java000066400000000000000000000126331514323636100266200ustar00rootroot00000000000000/* * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.FormatError; import org.openjdk.asmtools.common.ToolLogger; import org.openjdk.asmtools.jasm.TableFormatModel; import java.io.DataInputStream; import java.io.IOException; import java.util.function.Supplier; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.ENCLOSING_METHOD; /** * Base class for attributes: SourceFile, NestHost, EnclosingMethod with format: *

* attribute { * u2 attribute_name_index; * u4 attribute_length; SourceFile, NestHost: 2 EnclosingMethod: 4 * u2 constant_pool_index; sourcefile_index, host_class_index, class_index * **** * u2 method_index; Only if EnclosingMethod */ public abstract class AttributeData> extends Indenter { protected ConstantPool pool; protected ToolLogger logger; protected int attribute_length = 0; // Constant pool: SourceFile, NestHost class, Inner class. protected String name = null; // sourcefile_index, host_class_index, class_index protected int cpx; // only applicable to EnclosingMethod // EnclosingMethod: If the current class is not immediately enclosed by a method or constructor, // then the value of the method_index (that is equal to CONSTANT_NameAndType_info_index;) item must be zero. protected int methodCpx = 0; // Utility functions Supplier idxStringSupplier; private Printable indexPrinter = () -> println(idxStringSupplier.get()); private Printable namePrinter; private Printable indexAndNamePrinter = () -> print(PadRight(idxStringSupplier.get(), getPrintAttributeCommentPadding())). println((name != null) ? " // %s".formatted(name) : ""); protected AttributeData(ClassData classData, TableFormatModel.Token token) { super(classData.toolOutput); pool = classData.pool; logger = classData.data.environment.getLogger(); tableToken = token; switch (tableToken) { case SOURCE_FILE -> { attribute_length = 2; idxStringSupplier = () -> "#%d;".formatted(cpx); namePrinter = () -> println("\"%s\";".formatted(name != null ? name : "???")); } case NEST_HOST -> { attribute_length = 2; idxStringSupplier = () -> "#%d;".formatted(cpx); namePrinter = () -> println("%s;".formatted(name != null ? name : "\"???\"")); } case ENCLOSING_METHOD -> { attribute_length = 4; idxStringSupplier = () -> "#%d:#%d;".formatted(cpx, methodCpx); namePrinter = () -> println("%s;".formatted(name)); } default -> throw new RuntimeException( "Implementation of \"%s\" is not supported".formatted(tableToken.parseKey())); } } public A read(DataInputStream in, int attribute_length) throws IOException, ClassFormatError { if (attribute_length != this.attribute_length) { if (bestEffort) { logger.error("err.invalid.attribute.length", tableToken.getAttribute().printValue(), attribute_length); } else { throw new FormatError(logger, "err.invalid.attribute.length", tableToken.getAttribute().printValue(), attribute_length); } } this.cpx = in.readUnsignedShort(); if (tableToken == ENCLOSING_METHOD) { this.methodCpx = in.readUnsignedShort(); } return (A) this; } @Override protected void jasmPrint() { calculateName(); printIndent(PadRight(tableToken.getJasmToken().parseKey(), getPrintAttributeKeyPadding())); if (printCPIndex) { if (skipComments) { indexPrinter.print(); } else { indexAndNamePrinter.print(); } } else { namePrinter.print(); } } /** * There are no differences between the simple (jasm) and extended (table) presentations of NestHost, * SourceFile, EnclosingMethod attribute, and NestMembers attribute. */ @Override protected void tablePrint() { this.jasmPrint(); } protected abstract String calculateName(); @FunctionalInterface public interface Printable { void print(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/BootstrapMethodData.java000066400000000000000000000213211514323636100277650ustar00rootroot00000000000000/* * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import java.io.DataInputStream; import java.io.IOException; import java.util.ArrayList; import static java.lang.String.format; import static org.openjdk.asmtools.jasm.JasmTokens.Token.BOOTSTRAPMETHOD; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.BOOTSTRAP_METHOD; /** * BootstrapMethods_attribute { * ... * { u2 bootstrap_method_ref; * u2 num_bootstrap_arguments; * u2 bootstrap_arguments[num_bootstrap_arguments]; * } * } */ public class BootstrapMethodData extends Element { int bsmRef; // u2 bootstrap_method_ref; ArrayList bsmArguments; // u2 bootstrap_arguments[num_bootstrap_arguments]; int numBsmArgs; // num_bootstrap_arguments int indexOffset; public BootstrapMethodData(ClassData classData, Container container) { super(classData, container); tableToken = BOOTSTRAP_METHOD; indexOffset = classData.printProgramCounter ? PROGRAM_COUNTER_PLACEHOLDER_LENGTH : INSTR_PREFIX_LENGTH - getIndentStep(); } @Override public boolean isPrintable() { return bsmArguments != null && !bsmArguments.isEmpty(); } /** * Read and resolve the bootstrap method data called from ClassData. */ public void read(DataInputStream in) throws IOException { // read the Methods CP indexes bsmRef = in.readUnsignedShort(); numBsmArgs = in.readUnsignedShort(); bsmArguments = new ArrayList<>(numBsmArgs); for (int i = 0; i < numBsmArgs; i++) { bsmArguments.add(in.readUnsignedShort()); } } @Override protected void jasmPrint(int index, int size) throws IOException { int commentOffset = getCommentOffset() - TABLE_PADDING; final BsmInfo bsmInfo = getBsmInfo(); printIndent(PadRight(BOOTSTRAPMETHOD.parseKey(), TABLE_PADDING)); if (printCPIndex) { if (skipComments) { println("#%d;".formatted(bsmRef)); } else { printPadRight("#%d;".formatted(bsmRef), commentOffset). println(" // %s".formatted(formatOperandLine(bsmInfo.strBsm(), getCommentOffset() + getIndentSize(), " // ", InvokeDynamicBreakPositions))); } } else { println(formatOperandLine( "%s".formatted(bsmInfo.strBsm()), TABLE_PADDING + getIndentStep(), "", BootstrapMethodBreakPositions) ); } printIndent(PadRight(" ", TABLE_PADDING)).print("{ "); if (numBsmArgs > 0) { println(); incIndent(2); if (printCPIndex) { for (int i = 0; i < numBsmArgs; i++) { int argRef = bsmArguments.get(i); String delim = (i != numBsmArgs - 1) ? "," : ""; boolean notLastIdx = i != numBsmArgs - 1; printIndent(PadRight(" ", TABLE_PADDING)); if (skipComments) { println("#%d%s".formatted(argRef, delim)); } else { String strArg = bsmInfo.cpx2Const().bsmArgWithoutDelimitersAsString(argRef, notLastIdx); strArg = formatOperandLine(strArg, getCommentOffset() + getIndentStep(), " // ", InvokeDynamicBreakPositions); printPadRight("#%d%s".formatted(argRef, delim), commentOffset - getIndentStep() * 2). println(" // %s".formatted(strArg)); } } } else { String strArgs = bsmInfo.cpx2Const().bsmArgsAsString(this); printIndent(PadRight(" ", TABLE_PADDING - getIndentStep())). println(formatOperandLine(strArgs, TABLE_PADDING + getIndentStep() * 2, "", BootstrapArgumentsBreakPositions)); } decIndent(2); printIndent(PadRight(" ", TABLE_PADDING)); } println("}"); if (index < size - 1) println(); } @Override protected void tablePrint(int index, int size) throws IOException { final int commentOffset = getCommentOffset() - indexOffset - getIndentSize(); final BsmInfo bsmInfo = getBsmInfo(); if (index == 0) { printIndentLn("%s {".formatted(BOOTSTRAPMETHOD.alias())); } incIndent(); printIndent(PadRight(format("%2d:", index), indexOffset)); if (printCPIndex) { if (skipComments) { println("#%d;".formatted(bsmRef)); } else { printPadRight("#%d;".formatted(bsmRef), commentOffset). println(" // %s".formatted(formatOperandLine( "%s".formatted(bsmInfo.strBsm()), getCommentOffset() + getIndentStep(), " // ", BootstrapMethodBreakPositions))); } } else { println(formatOperandLine("%s".formatted(bsmInfo.strBsm()), indexOffset + getIndentStep() * 2, "", BootstrapMethodBreakPositions) ); } if (numBsmArgs > 0) { printIndentLn(" Arguments:"); if (printCPIndex) { int argOffs = commentOffset + indexOffset + getIndentStep() * 2; for (int i = 0; i < numBsmArgs; i++) { int argRef = bsmArguments.get(i); boolean notLastIdx = i != numBsmArgs - 1; String delim = (i != numBsmArgs - 1) ? "," : ";"; printIndent(PadRight("", indexOffset)); if (printCPIndex) { if (skipComments) { println("#%d%s".formatted(argRef, delim)); } else { String strArg = bsmInfo.cpx2Const().bsmArgWithoutDelimitersAsString(argRef, notLastIdx); strArg = formatOperandLine(strArg, argOffs, " // ", InvokeDynamicBreakPositions); printPadRight("#%d%s".formatted(argRef, delim), commentOffset).println(" // %s".formatted(strArg)); } } } } else { String strArgs = bsmInfo.cpx2Const().bsmArgsAsString(this); printIndent(PadRight(" ", indexOffset)); println(formatOperandLine(strArgs, indexOffset + getIndentStep() * 2, "", BootstrapArgumentsBreakPositions) + ";"); } } if (index < size - 1) println(); else { decIndent(); printIndentLn("}"); } } private BsmInfo getBsmInfo() { String strBsm; ConstantPool.Constant cnt = owner.pool.getConst(bsmRef); ConstantPool.CPX2 cpx2Const = owner.pool.getCPX2(ConstantPool.TAG.CONSTANT_NULL); if (cnt instanceof ConstantPool.CPX2 cpx) { cpx2Const = cpx; strBsm = cpx.stringVal() + ";"; } else { strBsm = owner.environment.getInfo("info.corrupted_bootstrap_method_ref"); if (!printCPIndex) { strBsm = PadRight("#%d".formatted(bsmRef), CIRCULAR_COMMENT_OFFSET).concat(" // ").concat(strBsm); } } BsmInfo bsmInfo = new BsmInfo(strBsm, cpx2Const); return bsmInfo; } private record BsmInfo(String strBsm, ConstantPool.CPX2 cpx2Const) { } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/ClassArrayData.java000066400000000000000000000117561514323636100267260ustar00rootroot00000000000000/* * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.jasm.JasmTokens; import java.io.DataInputStream; import java.io.IOException; /** * Base class of the "classes[]" data of attributes: *

* Exceptions_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_exceptions; * u2 exception_index_table[number_of_exceptions]; * } * The exception_index_table[i] is an index of a CONSTANT_Class_info structure representing a class type * that this method is declared to throw. *

* JEP 181 (Nest-based Access Control): class file 55.0 * NestMembers_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_classes; * u2 classes[number_of_classes]; * } *

* JEP 360 (Sealed types): class file 59.65535 * PermittedSubclasses_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_classes; * u2 classes[number_of_classes]; * } *

*/ public class ClassArrayData extends MemberData { JasmTokens.Token token; int[] indexes; protected > ClassArrayData(M classData, JasmTokens.Token token) { super(classData); this.token = token; } public ClassArrayData read(DataInputStream in, int attribute_length) throws IOException, ClassFormatError { int number_of_entities = in.readUnsignedShort(); if (attribute_length != 2 + number_of_entities * 2) { throw new ClassFormatError("%s_attribute: Invalid attribute length".formatted(token.parseKey())); } indexes = new int[number_of_entities]; for (int i = 0; i < number_of_entities; i++) { indexes[i] = in.readUnsignedShort(); } return this; } @Override public void jasmPrint() { if (indexes.length > 2) { jasmPrintLong(); } else { jasmPrintShort(); } } public void jasmPrintShort() { StringBuilder indexes = new StringBuilder(); StringBuilder names = new StringBuilder(); int lastIndex = this.indexes.length - 1; String eoNames = (printCPIndex) ? "" : ";"; for (int i = 0; i <= lastIndex; i++) { if (printCPIndex) { indexes.append("#").append(this.indexes[i]).append(i == lastIndex ? ";" : ", "); } names.append(pool.StringValue(this.indexes[i])).append(i == lastIndex ? eoNames : ", "); } printIndent(PadRight(token.parseKey(), getPrintAttributeKeyPadding())); if (printCPIndex) { if (skipComments) { println(indexes.toString()); } else { print(PadRight(indexes.toString(), getPrintAttributeCommentPadding())).println(" // " + names); } } else { println(names.toString()); } } public void jasmPrintLong() { String name = token.parseKey(); String locIndent = " ".repeat(name.length()); int lastIndex = indexes.length - 1; for (int i = 0; i <= lastIndex; i++) { if (printCPIndex) { if (skipComments) { printIndent(PadRight((i == 0) ? name : locIndent, getPrintAttributeKeyPadding())). print("#%d".formatted(indexes[i])).println(i == lastIndex ? ";" : ","); } else { printIndent(PadRight((i == 0) ? name : locIndent, getPrintAttributeKeyPadding())). print(PadRight("#%d%s".formatted(indexes[i], (i == lastIndex) ? ";" : ","), getPrintAttributeCommentPadding())). println(" // %s".formatted(pool.StringValue(indexes[i]))); } } else { printIndent(PadRight((i == 0) ? name : locIndent, getPrintAttributeKeyPadding())). print(pool.StringValue(indexes[i])).println(i == lastIndex ? ";" : ","); } } } @Override protected void tablePrint() { jasmPrint(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/ClassData.java000066400000000000000000001013331514323636100257160ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.asmutils.HexUtils; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.common.DecompilerLogger; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.common.FormatError; import org.openjdk.asmtools.common.SyntaxError; import org.openjdk.asmtools.common.inputs.FileInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.structure.CFVersion; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.common.structure.EModifier; import org.openjdk.asmtools.jdis.notations.Type; import java.io.DataInputStream; import java.io.EOFException; import java.io.IOException; import java.nio.file.Path; import java.security.MessageDigest; import java.text.DateFormat; import java.time.LocalDate; import java.time.ZoneId; import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.stream.Collectors; import static java.lang.String.format; import static org.openjdk.asmtools.common.structure.ClassFileContext.*; import static org.openjdk.asmtools.common.structure.EModifier.ACC_ABSTRACT; import static org.openjdk.asmtools.common.structure.EModifier.ACC_SUPER; import static org.openjdk.asmtools.jasm.ClassFileConst.JAVA_MAGIC; import static org.openjdk.asmtools.jdis.ClassData.COMPILATION_UNIT.MODULE_INFO; /** * Central class data for of the Java Disassembler */ public class ClassData extends MemberData { // internal status of the class data private boolean alreadyPrinted = false; private boolean canBePrinted = false; // Sufficient class info has been read and is now ready to be printed // Version info protected CFVersion cfVersion = new CFVersion(); // Constant Pool index to this class protected int this_cpx; // Constant Pool index to this classes parent (super) protected int super_cpx; // Pre-initialized Constant Pool names calculated by this_cpx protected String className = ""; protected String packageName = ""; protected String classShortName = ""; // The interfaces this class implements protected int[] interfaces; // The fields of this class protected Container fields; // The methods of this class protected Container methods; /** * Attributes: * SourceFile 45.3 * InnerClasses 45.3 * EnclosingMethod 49.0 * SourceDebugExtension 49.0 * BootstrapMethods 51.0 * Module, ModulePackages, ModuleMainClass 53.0 * NestHost, NestMembers 55.0 * Record 60.0 * PermittedSubclasses 61.0 * ------------------------------------------------- * Synthetic 45.3 * Deprecated 45.3 * Signature 49.0 * RuntimeVisibleAnnotations 49.0 * RuntimeInvisibleAnnotations 49.0 * RuntimeVisibleTypeAnnotations 52.0 * RuntimeInvisibleTypeAnnotations 52.0 */ private int totalAttributes = 0; // The SourceFile Attribute (since 45.3) protected SourceFileData sourceFileData; // The inner-classes of this class (since 45.3) protected Container innerClasses; // The EnclosingMethod Attribute (since 49.0) protected EnclosingMethodData enclosingMethodData; // The record attribute of this class (since class file 58.65535) protected RecordData recordData; // The bootstrap methods this class implements protected Container bootstrapMethods; //The module this class file presents protected ModuleData moduleData; // The NestHost of this class (since class file: 55.0) protected NestHostData nestHost; // The NestMembers of this class (since class file: 55.0) protected NestMembersData nestMembers; // The PermittedSubclasses of this class (JEP 360 (Sealed types): class file 59.65535) protected PermittedSubclassesData permittedSubclassesData; protected SourceDebugExtensionData sourceDebugExtensionData; // Valhalla protected LoadableDescriptorsData loadableDescriptorsData; // source file data private TextLines sourceLines = null; private Path classFile = null; public > ClassData(E environment) { super(environment); memberType = "ClassData"; super.environment = environment; environment.traceln("printOptions=" + Options.asShortString()); super.pool = new ConstantPool(this); super.init(this); } public boolean isDetailedOutput() { return detailedOutput || extraDetailedOutput; } /** * Read and resolve the field data */ protected void readFields(DataInputStream in) throws IOException { int nFields = in.readUnsignedShort(); environment.traceln("fields=#" + nFields); fields = new Container<>(this, FieldData.class, nFields); for (int k = 0; k < nFields; k++) { FieldData field = new FieldData(this); environment.traceln(" FieldData: #" + k); field.read(in); fields.add(field); } } /** * Read and resolve the method data */ protected void readMethods(DataInputStream in) throws IOException { int nMethods = in.readUnsignedShort(); environment.traceln("methods=#" + nMethods); methods = new Container<>(this, MethodData.class, nMethods); for (int k = 0; k < nMethods; k++) { MethodData method = new MethodData(this); environment.traceln("MethodData: #" + k); method.read(in); methods.add(method); } } /** * Read and resolve the interface data */ protected void readInterfaces(DataInputStream in) throws IOException { // Read the interface names int nInterfaces = in.readUnsignedShort(); environment.traceln("interfaces=#" + nInterfaces); interfaces = new int[nInterfaces]; for (int i = 0; i < nInterfaces; i++) { int interfaceCpx = in.readShort(); environment.traceln(" InterfaceCpx[" + i + "]=" + interfaceCpx); interfaces[i] = interfaceCpx; } } /** * Read and resolve the attribute data */ @Override protected boolean handleAttributes(DataInputStream in, EAttribute attributeTag, int attributeLength) throws IOException { // Read the Attributes boolean handled = true; totalAttributes++; switch (attributeTag) { case ATT_Signature -> { if (signature != null) { environment.warning("warn.one.attribute.required", "Signature", "ClassFile"); } signature = new SignatureData(this).read(in, attributeLength); } case ATT_SourceFile -> { // Read SourceFile attribute if (sourceFileData != null) { environment.warning("warn.one.attribute.required", "SourceFile", "ClassFile"); } sourceFileData = new SourceFileData(this).read(in, attributeLength); } case ATT_EnclosingMethod -> { // Read EnclosingMethod attribute if (enclosingMethodData != null) { environment.warning("warn.one.attribute.required", "EnclosingMethod", "ClassFile"); } enclosingMethodData = new EnclosingMethodData(this).read(in, attributeLength); } case ATT_SourceDebugExtension -> sourceDebugExtensionData = new SourceDebugExtensionData(this).read(in, attributeLength); case ATT_InnerClasses -> { // Read InnerClasses Attr int count = in.readUnsignedShort(); if (2 + count * 8 != attributeLength) { if (bestEffort) { environment.getLogger().error( "err.invalid.attribute.length", "InnerClasses_attribute", attributeLength); } else { throw new FormatError(environment.getLogger(), "err.invalid.attribute.length", "InnerClasses_attribute", attributeLength); } } innerClasses = new Container<>(this, InnerClassData.class, count). setHasSize(!isTableOutput() && !skipComments && !tableFormat); innerClasses.setCommentOffset(this.getCommentOffset()); for (int j = 0; j < count; j++) { InnerClassData innerClass = new InnerClassData(this, innerClasses); innerClass.read(in); innerClasses.add(innerClass); } } case ATT_BootstrapMethods -> { // Read BootstrapMethods Attr int count = in.readUnsignedShort(); bootstrapMethods = new Container<>(this, BootstrapMethodData.class, count); bootstrapMethods.setCommentOffset(this.getCommentOffset()); for (int j = 0; j < count; j++) { BootstrapMethodData bsmData = new BootstrapMethodData(this, bootstrapMethods); bsmData.read(in); bootstrapMethods.add(bsmData); } } case ATT_Module -> { // Read Module Attribute moduleData = new ModuleData(this); moduleData.read(in); } case ATT_NestHost -> // Read NestHost Attribute (since class file: 55.0) nestHost = new NestHostData(this).read(in, attributeLength); case ATT_NestMembers -> // Read NestMembers Attribute (since class file: 55.0) nestMembers = new NestMembersData(this).read(in, attributeLength); case ATT_Record -> recordData = new RecordData(this).read(in); case ATT_PermittedSubclasses -> // Read PermittedSubclasses Attribute (JEP 360 (Sealed types): class file 59.65535) permittedSubclassesData = new PermittedSubclassesData(this).read(in, attributeLength); case ATT_LoadableDescriptors -> // Valhalla loadableDescriptorsData = new LoadableDescriptorsData(this).read(in, attributeLength); default -> handled = false; } return handled; } /** * Read and resolve the class data */ public void read(final DataInputStream in, final Path src) throws IOException { classFile = src; // Read the header try { int magic = in.readInt(); if (magic != JAVA_MAGIC) { environment.warning("warn.wrong.magic", HexUtils.toHex(JAVA_MAGIC), HexUtils.toHex(magic)); } cfVersion.setMinorVersion(in.readUnsignedShort()); cfVersion.setMajorVersion(in.readUnsignedShort()); // Read the constant pool pool.read(in).InitializePrintData(); access = in.readUnsignedShort(); this_cpx = in.readUnsignedShort(); super_cpx = in.readUnsignedShort(); environment.traceln("0x%04X [ %s] this_cpx=%d super_cpx=%d", access, EModifier.asNames(access, EModifier.isModule(access) ? CLASS : MODULE), this_cpx, super_cpx); // Read the interfaces readInterfaces(in); // Read the fields readFields(in); // Read the methods readMethods(in); // Read the attributes readAttributes(in); //Pre-initialize names,indexes needed for printing. initClassNames(this_cpx); // environment.traceln("\n<< Reading is done >>"); // Final initialization based on just read class data. if (cfVersion.isValueObjectContext()) { EModifier.setGlobalContext(VALUE_OBJECTS); } } catch (EOFException eofException) { environment.error("err.eof"); } } /** * Initializes class, package names needed for printing asm file * * @param this_cpx The constant_pool entry at that index is a CONSTANT_Class_info structure (§4.4.1) * representing the class or interface defined by this class file or * this_class is module-info in the case of a module. */ private void initClassNames(int this_cpx) { this.className = pool.getClassName(this_cpx); final int idx = className.lastIndexOf('/'); if (idx != -1) { this.packageName = className.substring(0, idx); this.classShortName = className.substring(idx + 1); } else { this.classShortName = className; } if (sourceFileData != null) { sourceFileData.getName(); } } /** * Determines if this Class has a package * * @return true if the package exists for this class */ public boolean hasPackage() { return !this.packageName.isEmpty(); } public String getClassName() { return className; } /** * Read and resolve the attribute data */ public String getSrcLine(int lineNum) { if (sourceLines == null) { return null; // impossible call } String line; try { line = sourceLines.getLine(lineNum); } catch (ArrayIndexOutOfBoundsException e) { line = format("Line number %d is out of bounds", lineNum); } return line; } @Override protected void printAnnotations(List... annotationLists) throws IOException { for (List list : annotationLists) { if (list != null) { for (T annotation : list) { annotation.initIndent(0); annotation.print(); println(); } } } } /** * Prints the JASM file as much as it was read if exceptions occur during reading. */ public void postPrint() { if (!alreadyPrinted && canBePrinted) { try { this.print(); } catch (Exception ignored) { } } try { environment.getToolOutput().finishClass(className); } catch (IOException ignored) { } environment.getOutputs().flush(); } /** * Print jasm file in simple/table format. */ @Override public void print() throws IOException { if (COMPILATION_UNIT.get(className, access) == MODULE_INFO) { // module-info compilation unit // Print the Annotations printAnnotations(visibleAnnotations, invisibleAnnotations); // Print Module Header if (moduleData == null) { // exception: 4.7.25. The Module Attribute is empty. moduleData = new ModuleData(this); } print(moduleData.getModuleHeader(format("version %s", cfVersion.asString()))); println(); println("{"); // Print the constant pool if (printConstantPool) { pool.print(); } canBePrinted = true; // Print module attributes moduleData.print(); // print(format("} // end of module %s", moduleData.getModuleName())); if (moduleData.getModuleVersion() != null) print("@" + moduleData.getModuleVersion()); println(); // Print the Annotations printAnnotations(visibleAnnotations, invisibleAnnotations); printAnnotations(visibleTypeAnnotations, invisibleTypeAnnotations); if (hasPackage()) { println(String.format("package %s version %s;", packageName, cfVersion.asString())); } } else { // class/interface compilation unit // Print either extended(table) or Jasm-formatted Annotations, Header, and ConstantPool. printClassIntroduction(); canBePrinted = true; // Load source file info. if (printSourceLines && (sourceFileData != null)) { String sourceName = sourceFileData.calculateName(); if (sourceName != null) { sourceLines = new TextLines(classFile.getParent(), sourceName); } } // get the list of attributes that would be printed. it might be empty. final List printableAttributes = getListOfPrintableAttributes( signature, sourceFileData, enclosingMethodData, sourceDebugExtensionData, recordData, // Print the Record (since class file 58.65535 JEP 359) nestHost, // Print the NestHost (since class file: 55.0) innerClasses, nestMembers, // Print the NestMembers (since class file: 55.0) permittedSubclassesData, // Print PermittedSubclasses Attribute (JEP 360 (Sealed types): class file 59.65535) loadableDescriptorsData, bootstrapMethods ); int commentOffset = getCommentOffset(); // Print the fields if (printMemberDataList(fields, commentOffset) && isPrintable(methods) && !printableAttributes.isEmpty()) { println(); } setCommentOffset(commentOffset -= getIndentSize()); // Print the methods if (printMemberDataList(methods, commentOffset) && !printableAttributes.isEmpty()) { println(); } // Print the attributes printAttributes(printableAttributes, commentOffset); if (skipComments) { println("}"); } else { println(format("} // end Class %s%s", className, sourceFileData != null ? " compiled from \"" + sourceFileData.calculateName() + "\"" : "")); } alreadyPrinted = true; } List issues = pool.getIssues(); if (!issues.isEmpty()) { for (IOException ioe : issues) { environment.error(ioe); } throw new SyntaxError(); } } protected void printClassIntroduction() throws IOException { printSysInfo(); if (hasPackage()) { println(format("package %s;%n", packageName)); } // Print class annotations printAnnotations(visibleAnnotations, invisibleAnnotations); printAnnotations(visibleTypeAnnotations, invisibleTypeAnnotations); // Print ClassDeclaration printJasmClassDeclaration(); println("{"); int thisCommentOffset = pool.getCommentOffset(); // Print the constant pool if (printConstantPool) { pool.print(); setCommentOffset(thisCommentOffset); } // Print (this|super)_class if (extraDetailedOutput && !dropClasses) { if (printCPIndex) { if (skipComments) { printIndentLn("this_class: #%d;".formatted(this_cpx), thisCommentOffset); printIndentLn("super_class: #%d;".formatted(super_cpx), thisCommentOffset); } else { thisCommentOffset -= getIndentSize(); printIndent(PadRight("this_class: #%d;".formatted(this_cpx), thisCommentOffset)). println(" // " + pool.getClassName(this_cpx, cpx -> "invalid index into the constant_pool table")); printIndent(PadRight("super_class: #%d;".formatted(super_cpx), thisCommentOffset)). println(" // " + pool.getClassName(super_cpx, cpx -> "invalid index into the constant_pool table")); } } else { printIndentLn("this_class: %s;". formatted(pool.getClassName(this_cpx, cpx -> "invalid index into the constant_pool table"))); printIndentLn("super_class: %s;". formatted(pool.getClassName(super_cpx, cpx -> "invalid index into the constant_pool table"))); } println(); } } @Override protected void printSysInfo() { if (sysInfo) { ToolInput toolInput = environment.getToolInput(); String thisClassName = pool.getJavaClassName(this_cpx, ""); boolean isClass = !EModifier.isInterface(access); Date lm; String prefix = " * "; println("/**"); if (toolInput instanceof FileInput) { println(prefix + "Classfile " + classFile.toAbsolutePath()); lm = new Date(classFile.toFile().lastModified()); } else { String name = classFile.toString(); println(prefix + "Classfile " + name.substring(name.lastIndexOf('/') + 1)); lm = Date.from(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant()); } DateFormat df = DateFormat.getDateInstance(); int length = toolInput.getSize(); if (length > 0) { println(prefix + INDENT_STRING + "Last modified %s; size %d bytes", df.format(lm), length); } else { println(prefix + INDENT_STRING + "Last modified %s", df.format(lm)); } MessageDigest msd = toolInput.getMessageDigest(); if (msd != null) { byte[] digest = msd.digest(); if (digest != null) { StringBuilder sb = new StringBuilder(); for (byte b : digest) sb.append(String.format("%02x", b)); println(prefix + INDENT_STRING + msd.getAlgorithm() + " checksum " + sb); } } if (sourceFileData != null) { println(prefix + INDENT_STRING + "Compiled from \"%s\"".formatted(sourceFileData.calculateName())); } // Print java descriptor of a class/interface if (isClass) { print(prefix + EModifier.asKeywords(access & ~ACC_SUPER.getFlag(), CLASS) + "class " + thisClassName); } else { print(prefix + EModifier.asKeywords(access & ~ACC_ABSTRACT.getFlag() & ~ACC_SUPER.getFlag(), CLASS) + "interface " + thisClassName); } if (signature == null) { // use info from class file header if (isClass && super_cpx != 0) { String superClassName = pool.getJavaClassName(this_cpx, ""); if (!superClassName.equals("java.lang.Object")) { print(" extends " + superClassName); } } for (int i = 0; i < interfaces.length; i++) { print(i == 0 ? (isClass ? " implements " : " extends ") : ","); print(pool.getJavaClassName(interfaces[i], "")); } println(); } else { Type signType = signature.getSignatureType(); String sign = signature.getJavaSignature(); if (signType instanceof Type.ClassSigType) print(sign); else if (!signType.isObject()) { print(" extends " + sign); } println(); } println(prefix + INDENT_STRING + "minor version: " + cfVersion.minor_version()); println(prefix + INDENT_STRING + "major version: " + cfVersion.major_version()); println(prefix + INDENT_STRING + "flags: (0x%04x) %s".formatted(access, EModifier.asNames(access, CLASS))); println(prefix + INDENT_STRING + "this_class: %s".formatted(pool.getClassName(this_cpx, cpx -> "invalid index into the constant_pool table"))); println(prefix + INDENT_STRING + "super_class: %s".formatted(pool.getClassName(super_cpx, cpx -> "invalid index into the constant_pool table"))); println(prefix + INDENT_STRING + "interfaces: %d, fields: %d, methods: %d, attributes: %d", interfaces.length, fields.size(), methods.size(), totalAttributes); println(" */"); } } protected void printJasmClassDeclaration() { { String shortClassName = pool.inRange(this_cpx) ? pool.getShortClassName(this_cpx, this.packageName) : "?? invalid index"; // In Java SE 8, the ACC_SUPER semantics became mandatory, regardless of the setting of ACC_SUPER or // the class file version number, and the flag no longer had any effect. // however, to not print it where it was, would cause hotswap of such class to // throw java.lang.UnsupportedOperationException: class redefinition failed: attempted to change the class modifiers Pair signInfo = (signature != null) ? signature.getJasmPrintInfo((i) -> pool.inRange(i)) : new Pair<>("", ""); // An interface is distinguished by the ACC_INTERFACE flag being set. if (EModifier.isInterface(access)) { // interface compilation unit print(EModifier.asKeywords(access & ~ACC_ABSTRACT.getFlag(), CLASS)); print(printCPIndex ? (skipComments ? format("interface #%d%s", this_cpx, signInfo.first) : format("interface #%d%s /* %s%s */", this_cpx, signInfo.first, shortClassName, signInfo.second) ) : format("interface %s", shortClassName, signInfo.second) ); } else { // class compilation unit // add synthetic, deprecated if necessary print(EModifier.asKeywords(access, CLASS) + getPseudoFlagsAsString()); print(printCPIndex ? (skipComments ? format("class #%d%s", this_cpx, signInfo.first) : format("class #%d%s /* %s%s */", this_cpx, signInfo.first, shortClassName, signInfo.second) ) : format("class %s%s", shortClassName, signInfo.second) ); // if base class is not j.l.Object prints the "extends" statement if (this_cpx < pool.size() && this_cpx > 0) { if (!pool.getClassName(super_cpx).equals("java/lang/Object")) { print(printCPIndex ? (skipComments ? format(" extends #%d", super_cpx) : format(" extends #%d /* %s */", super_cpx, pool.getShortClassName(super_cpx, this.packageName)) ) : format(" extends %s", pool.getShortClassName(super_cpx, this.packageName)) ); } } else { print(printCPIndex ? (skipComments ? format(" extends #%d", super_cpx) : format(" extends #%d /* ?? invalid index */", super_cpx) ) : " extends ??"); } } // print the "implements" statement int numInterfaces = interfaces.length; if (numInterfaces > 0) { String statement; String sNames = Arrays.stream(interfaces). mapToObj(cpx -> pool.getShortClassName(cpx, this.packageName)). collect(Collectors.joining(", ")); if (printCPIndex) { String sIndexes = Arrays.stream(interfaces). mapToObj(cpx -> format("#%d", cpx)). collect(Collectors.joining(", ")); if (skipComments) { statement = format("%simplements %s", (numInterfaces > 1) ? "\n" + getIndentString() : " ", sIndexes); } else { statement = format("%simplements %s /* %s */", (numInterfaces > 1) ? "\n" + getIndentString() : " ", sIndexes, sNames); } } else { statement = format("%simplements %s", (numInterfaces > 1) ? "\n" + getIndentString() : " ", sNames); } print(statement); } println("%sversion %s", (numInterfaces > 1) ? "\n" + getIndentString() : " ", cfVersion.asString()); } } private

List

getListOfPrintableAttributes(P... attributes) { return Arrays.stream(attributes).filter(a -> isPrintable(a)).toList(); } // Utility methods to check whether cottages of data would be printed private

boolean isPrintable(P... attributes) { return Arrays.stream(attributes). anyMatch(attribute -> attribute != null && attribute.isPrintable()); } private

void printAttributes(List

attributeList, int commentOffset) throws IOException { int len = attributeList.size(); boolean printed = false; for (int i = 0; i < len; i++) { P attribute = attributeList.get(i); if (isPrintable(attribute)) { if (Indenter.class.isAssignableFrom(attribute.getClass())) { ((Indenter) attribute).setCommentOffset(commentOffset); } attribute.print(); printed = true; } if (printed && (i + 1 < len)) { println(); printed = false; } } // TODO: Prints corrupted attributes if any. } private boolean printMemberDataList(Container, ClassData> list, int commentOffset) throws IOException { if (list != null && list.size() > 0) { list.setCommentOffset(commentOffset).print(); return true; } return false; } public enum COMPILATION_UNIT { MODULE_INFO, PACKAGE_INFO, CLASS_UNIT; /** * @param className Pre-initialized Constant Pool name calculated by this_cpx * @param access access flags (modifiers) * @return compilation unit */ public static COMPILATION_UNIT get(String className, int access) { if (className.endsWith("module-info") || EModifier.isModule(access)) { // module-info compilation unit return MODULE_INFO; } else if (className.endsWith("package-info") && EModifier.isInterface(access)) { // package-info compilation unit return PACKAGE_INFO; } else { return CLASS_UNIT; } } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/CodeData.java000066400000000000000000001242341514323636100255300ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.asmutils.HexUtils; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.common.structure.StackMap; import java.io.DataInputStream; import java.io.IOException; import java.util.*; import static java.lang.String.format; import static org.openjdk.asmtools.asmutils.HexUtils.toHex; import static org.openjdk.asmtools.common.structure.EAttribute.ATT_RuntimeInvisibleTypeAnnotations; import static org.openjdk.asmtools.common.structure.EAttribute.get; import static org.openjdk.asmtools.jasm.ClassFileConst.BasicType; import static org.openjdk.asmtools.jasm.ClassFileConst.getBasicType; import static org.openjdk.asmtools.jasm.JasmTokens.Token.LOCAL; import static org.openjdk.asmtools.jasm.JasmTokens.Token.STACK; import static org.openjdk.asmtools.jasm.OpcodeTables.Opcode; import static org.openjdk.asmtools.jasm.OpcodeTables.Opcode.opc_bytecode; import static org.openjdk.asmtools.jasm.OpcodeTables.opcode; /** * Code data for a code attribute in method members in a class of the Java Disassembler */ public class CodeData extends MemberData { /** * reversed bytecode index hash, associates labels with ByteCode indexes */ private final HashMap instructionAttrs = new HashMap<>(); // Raw byte array for the byte codes protected byte[] code; // Limit for the stack size protected int max_stack; // Limit for the number of local vars protected int max_locals; // The remaining attributes of this class protected ArrayList attrs = new ArrayList<>(0); // AttrData // Trap table, describes exceptions caught private ArrayList trap_table = new ArrayList<>(0); // TrapData // Line Number table, describes source lines associated with ByteCode indexes private Container lineNumberTable; // Local Variable table, describes variable scopes associated with ByteCode indexes private Container localVariableTable; // Local Variable Type table, describes variable types associated with variables private Container localVariableTypeTable; // stack map table, describes compiler hints for stack rep, associated with ByteCode indexes private StackMapTable stackMapTable; // The boolean firstStackEntry is calculated based on the index of the StackMap entry in the table. // Is firstStackEntry the entries[0] in the stack_map_entry structure? // In other words, does StackMapData[i] describe the second stack map entry of the method ignoring leading modifiers? private boolean firstStackEntry = true; //The visible type annotations for this method private ArrayList> visibleTypeAnnotations; // The invisible type annotations for this method private ArrayList> invisibleTypeAnnotations; private int instructionOffset, attributeOffset; public CodeData(MethodData data) { super(data); if (data.printProgramCounter) { instructionOffset = PROGRAM_COUNTER_PLACEHOLDER_LENGTH; attributeOffset = instructionOffset; } else { instructionOffset = INSTR_PREFIX_LENGTH; attributeOffset = instructionOffset - getIndentStep(); } } private static int align(int n) { return (n + 3) & ~3; } private int getByte(int pc) throws IndexOutOfBoundsException { if (pc < 0 || pc >= code.length) { throw new IndexOutOfBoundsException(environment.getInfo("err.out.of.range", pc)); } return code[pc]; } private int getUByte(int pc) throws IndexOutOfBoundsException { if (pc < 0 || pc >= code.length) { throw new IndexOutOfBoundsException(environment.getInfo("err.out.of.range", pc)); } return code[pc] & 0xFF; } private int getShort(int pc) throws IndexOutOfBoundsException { if (pc < 0 || pc + 1 >= code.length) { throw new IndexOutOfBoundsException(environment.getInfo("err.out.of.range", pc)); } return (code[pc] << 8) | (code[pc + 1] & 0xFF); } private int getUShort(int pc) throws IndexOutOfBoundsException { if (pc < 0 || pc + 1 >= code.length) { throw new IndexOutOfBoundsException(environment.getInfo("err.out.of.range", pc)); } return ((code[pc] << 8) | (code[pc + 1] & 0xFF)) & 0xFFFF; } private int getInt(int pc) throws IndexOutOfBoundsException { return (getShort(pc) << 16) | (getShort(pc + 2) & 0xFFFF); } protected InstructionAttr getInstructionAttribute(int pc) { Integer PC = pc; InstructionAttr res = instructionAttrs.get(PC); if (res == null) { res = new InstructionAttr(this.data); res.setTheSame(this).incIndent(); instructionAttrs.put(PC, res); } return res; } protected InstructionAttr getLastInstruction() { return instructionAttrs.get(Collections.max(instructionAttrs.keySet())); } protected InstructionAttr getFirstInstruction() { return instructionAttrs.get(Collections.min(instructionAttrs.keySet())); } /* Read Methods */ private Container readLineNumberTable(DataInputStream in, boolean ignoreMemorization) throws IOException { int len = in.readInt(); // attr_length int nLines = in.readUnsignedShort(); Container table = ignoreMemorization ? null : new Container<>(this, LineNumberData.class, nLines); environment.traceln("CodeAttr: LineNumberTable[%d] length=%d", nLines, len); for (int l = 0; l < nLines; l++) { LineNumberData data = new LineNumberData(in, this.data); if (!ignoreMemorization) { table.add(data); } } return table; } private Container readLocalVariableTable(DataInputStream in, boolean ignoreMemorization) throws IOException { int len = in.readInt(); // attr_length int nLines = in.readUnsignedShort(); Container table = ignoreMemorization ? null : new Container<>(this, LocalVariableData.class, nLines); environment.traceln("CodeAttr: LocalVariableTable[%d] length=%d", nLines, len); for (int l = 0; l < nLines; l++) { LocalVariableData data = new LocalVariableData(owner, in, this.data); if (!ignoreMemorization) { table.add(data); } } return table; } private Container readLocalVariableTypeTable(DataInputStream in, boolean ignoreMemorization) throws IOException { int len = in.readInt(); // attr_length int nLines = in.readUnsignedShort(); Container table = ignoreMemorization ? null : new Container<>(this, LocalVariableTypeData.class, nLines); environment.traceln("CodeAttr: LocalVariableTypeTable[%d] length=%d", nLines, len); for (int l = 0; l < nLines; l++) { LocalVariableTypeData data = new LocalVariableTypeData(owner, in, this.data); if (!ignoreMemorization) { table.add(data); } } return table; } private void readTrapTable(DataInputStream in) throws IOException { int trap_table_len = in.readUnsignedShort(); environment.traceln("CodeAttr: TrapTable[%d]", trap_table_len); trap_table = new ArrayList<>(trap_table_len); for (int l = 0; l < trap_table_len; l++) { trap_table.add(new TrapData(in, l)); } } private void readStackMapEntity(EAttribute attribute, DataInputStream in) throws IOException { int len = in.readInt(); // attr_length int stackMapLength = in.readUnsignedShort(); stackMapTable = new StackMapTable(attribute, this, stackMapLength); firstStackEntry = true; environment.traceln(() -> "CodeAttr: %s: attrLength=%d num=%d".formatted(attribute.name(), len, stackMapLength)); int prevFrame_pc = 0; int idx = 0; boolean nextIsWrapped = false; int wrapLevel = 0; while (idx < stackMapLength) { StackMapData stackMapData = switch (attribute) { case ATT_StackMap -> new StackMapData(this, in); case ATT_StackMapTable -> new StackMapData(calculateFirstPosition(idx), prevFrame_pc, this, in); default -> throw new IllegalStateException("Unexpected value: " + attribute); }; prevFrame_pc = stackMapData.getFramePC(); if (stackMapData.getStackEntryType() == StackMap.EntryType.EARLY_LARVAL) { stackMapData.isWrapped = nextIsWrapped; // Negative test case:EARLY_LARVAL belongs to EARLY_LARVAL stackMapData.wrapLevel = wrapLevel; stackMapTable.add(stackMapData, true); nextIsWrapped = true; wrapLevel++; } else { stackMapData.isWrapped = nextIsWrapped; stackMapData.wrapLevel = wrapLevel; stackMapTable.add(stackMapData, false); nextIsWrapped = false; wrapLevel = 0; idx++; } } } /** * Calculates whether a StackMapTable[index] entry is the first in the table, ignoring wrappers * * @param index index of the entry in the StackMapTable * @return true if index refers to the first entry that isn't wrapper. */ private boolean calculateFirstPosition(int index) { if (firstStackEntry) { if (index == 0 || stackMapTable.wrappers.get(index - 1)) { return true; } firstStackEntry = false; } return false; } private void readTypeAnnotations(DataInputStream in, boolean isInvisible) throws IOException { int attrLength = in.readInt(); // Read Type Annotations Attr int count = in.readShort(); ArrayList> tannots = new ArrayList<>(count); environment.traceln("CodeAttr: Runtime%sisibleTypeAnnotation: attrLength=%d num= %d", (isInvisible ? "Inv" : "V"), attrLength, count); for (int index = 0; index < count; index++) { TypeAnnotationData tannot = new TypeAnnotationData<>(this.data, isInvisible); tannot.read(in); tannots.add(tannot); } if (isInvisible) { invisibleTypeAnnotations = tannots; } else { visibleTypeAnnotations = tannots; } } /** * Read and resolve the code attribute data called from MethodData. precondition: * NumFields has already been read from the stream. */ public void read(DataInputStream in, int codeAttrLength) throws IOException { // Read the code in the Code Attribute max_stack = in.readUnsignedShort(); max_locals = in.readUnsignedShort(); int codelen = in.readInt(); environment.traceln("CodeAttr: CodeLength=%d FullLength=%d max_stack=%d max_locals=%d", codelen, codeAttrLength, max_stack, max_locals); // read the raw code bytes code = new byte[codelen]; in.read(code, 0, codelen); //read the trap table readTrapTable(in); // Read any attributes of the Code Attribute int nattr = in.readUnsignedShort(); environment.traceln("CodeAttr: add.attr: %d", nattr); for (int k = 0; k < nattr; k++) { int name_cpx = in.readUnsignedShort(); // verify the Attrs name ConstantPool.Constant name_const = pool.getConst(name_cpx); if (name_const != null && name_const.tag == ConstantPool.TAG.CONSTANT_UTF8) { String attrName = pool.getString(name_cpx, index -> "#" + index); environment.traceln("CodeAttr: attr: " + attrName); // process the attr EAttribute attrTag = get(attrName); switch (attrTag) { case ATT_LineNumberTable -> lineNumberTable = readLineNumberTable(in, !printLineNumber); case ATT_LocalVariableTable -> localVariableTable = readLocalVariableTable(in, !printLocalVariables); case ATT_LocalVariableTypeTable -> localVariableTypeTable = readLocalVariableTypeTable(in, !printLocalVariableTypes); case ATT_StackMap, ATT_StackMapTable -> readStackMapEntity(attrTag, in); case ATT_RuntimeVisibleTypeAnnotations, ATT_RuntimeInvisibleTypeAnnotations -> readTypeAnnotations(in, attrTag == ATT_RuntimeInvisibleTypeAnnotations); default -> { AttrData attr = new AttrData(environment, attrTag); int attrLen = in.readInt(); // attr_length attr.read(name_cpx, attrLen, in); attrs.add(attr); } } } } } /* Code Resolution Methods */ private int checkForLabelRef(int pc) { int opc = getUByte(pc); Opcode opcode = opcode(opc); try { if (opcode == null) { // nonexistent opcode - but we have to print something getInstructionAttribute(pc).referred = true; return 1; } switch (opcode) { case opc_tableswitch -> { try { int tb = align(pc + 1); int default_skip = getInt(tb); /* default skip pamount */ int low = getInt(tb + 4); int high = getInt(tb + 8); int count = high - low; for (int i = 0; i <= count; i++) { getInstructionAttribute(pc + getInt(tb + 12 + 4 * i)).referred = true; } getInstructionAttribute(default_skip + pc).referred = true; return tb - pc + 16 + count * 4; } catch (IndexOutOfBoundsException e) { environment.error(e); getInstructionAttribute(pc).referred = true; return 1; } } case opc_lookupswitch -> { try { int tb = align(pc + 1); int default_skip = getInt(tb); /* default skip pamount */ int npairs = getInt(tb + 4); for (int i = 1; i <= npairs; i++) { getInstructionAttribute(pc + getInt(tb + 4 + i * 8)).referred = true; } getInstructionAttribute(default_skip + pc).referred = true; return tb - pc + (npairs + 1) * 8; } catch (IndexOutOfBoundsException e) { environment.error(e); getInstructionAttribute(pc).referred = true; return 1; } } case opc_jsr, opc_goto, opc_ifeq, opc_ifge, opc_ifgt, opc_ifle, opc_iflt, opc_ifne, opc_if_icmpeq, opc_if_icmpne, opc_if_icmpge, opc_if_icmpgt, opc_if_icmple, opc_if_icmplt, opc_if_acmpeq, opc_if_acmpne, opc_ifnull, opc_ifnonnull -> { try { getInstructionAttribute(pc + getShort(pc + 1)).referred = true; return 3; } catch (IndexOutOfBoundsException e) { environment.error(e); getInstructionAttribute(pc).referred = true; return 1; } } case opc_jsr_w, opc_goto_w -> { getInstructionAttribute(pc + getInt(pc + 1)).referred = true; return 5; } case opc_wide, opc_nonpriv, opc_priv -> { int opc2 = (opcode.value() << 8) + getUByte(pc + 1); opcode = opcode(opc2); } } if (opcode != null) { int opclen = opcode.length(); return opclen == 0 ? 1 : opclen; // bugfix for 4614404 } else { return 1; } } catch (ArrayIndexOutOfBoundsException e) { return 1; } } // end checkForLabelRef private void loadLabelTable() { for (int pc = 0; pc < code.length; ) { pc = pc + checkForLabelRef(pc); } } private void loadLineNumTable() { for (LineNumberData entry : lineNumberTable) { getInstructionAttribute(entry.start_pc).lineNum = entry.line_number; } } private void loadStackMap() { ArrayList wrappers = null; boolean firstWrapper = true; for (int i = 0; i < stackMapTable.size(); i++) { StackMapData entry = stackMapTable.get(i); if (stackMapTable.wrappers.get(i)) { if (wrappers == null) { wrappers = new ArrayList<>(); } wrappers.add(entry); } else { firstWrapper = false; InstructionAttr instr = getInstructionAttribute(entry.frame_pc); instr.stackMapEntry = entry; instr.stackMapWrappers = wrappers; wrappers = null; } } if (wrappers != null) { // get either first or last instruction and assign modifiers to it. InstructionAttr instr = (firstWrapper) ? getFirstInstruction() : getLastInstruction(); instr.stackMapWrappers = wrappers; } } private void loadLocalVariableTable() { for (LocalVariableData entry : localVariableTable) { getInstructionAttribute(entry.start_pc).addVar(entry); getInstructionAttribute(entry.start_pc + entry.length).addEndVar(entry); } } private void loadLocalVariableTypeTable() { for (LocalVariableTypeData entry : localVariableTypeTable) { getInstructionAttribute(entry.start_pc).addType(entry); getInstructionAttribute(entry.start_pc + entry.length).addEndType(entry); } } private void loadTrapTable() { for (TrapData entry : trap_table) { getInstructionAttribute(entry.start_pc).addTrap(entry); getInstructionAttribute(entry.end_pc).addEndTrap(entry); getInstructionAttribute(entry.handler_pc).add_handler(entry); } } /* Print Methods */ private int printInstrLn(int pc, int shift) { int opc = getUByte(pc), opc2; Opcode opcode = opcode(opc), opcode2; String mnem; if (opcode == null) { // nonexistent opcode - but we have to print something print(PadRight("bytecode", OPERAND_PLACEHOLDER_LENGTH + 1)). println((printHEX ? toHex(opc) : opc) + ";"); return 1; } switch (opcode) { case opc_nonpriv, opc_priv -> { int count = 1; List validBytes = checkCodeBounds(pc, count); if (validBytes.size() == count) { opc2 = getUByte(pc + 1); int finalopc = (opc << 8) + opc2; opcode2 = opcode(finalopc); if (opcode2 == null) { // assume all (even nonexistent) priv and nonpriv instructions // are 2 bytes long print(PadRight(opcode.parseKey(), OPERAND_PLACEHOLDER_LENGTH + 1)). println((printHEX ? toHex(opc2) : opc2) + ";"); } else { println(opcode2.parseKey() + ";"); } } else printBytes(opcode.byteValue(), validBytes, shift); return 2; } case opc_wide -> { int count = 1; List validBytes = checkCodeBounds(pc, count); if (validBytes.size() != count) { printBytes(opcode.byteValue(), validBytes, shift); return 1; } opc2 = getUByte(pc + 1); int finalopcwide = (opc << 8) + opc2; opcode2 = opcode(finalopcwide); if (opcode2 == null) { // nonexistent opcode - but we have to print something print(PadRight(opc_bytecode.parseKey(), OPERAND_PLACEHOLDER_LENGTH + 1)). println(opcode.getPrintName() + ";"); return 1; } else { mnem = opcode2.parseKey(); } if (opcode2 == Opcode.opc_iinc_w) { count = 5; validBytes = checkCodeBounds(pc, 5); if (validBytes.size() == count) { print(PadRight(mnem, OPERAND_PLACEHOLDER_LENGTH + 1)); println("%d, %d;", getUShort(pc + 2), getUShort(pc + 4)); } else printBytes(opcode.byteValue(), validBytes, shift); return 6; } else { count = 3; validBytes = checkCodeBounds(pc, 3); if (validBytes.size() == count) { print(PadRight(mnem, OPERAND_PLACEHOLDER_LENGTH + 1)).println("%d;", getUShort(pc + 2)); } else printBytes(opcode.byteValue(), validBytes, shift); return 4; } } } mnem = opcode.parseKey(); if (mnem == null) { // nonexistent opcode - but we have to print something print(PadRight("bytecode", OPERAND_PLACEHOLDER_LENGTH + 1)).println(opcode + ";"); return 1; } if (!opcode.isReservedOpcode()) { // == opcode.value() >= Opcode.opc_bytecode.value(); // pseudo opcodes should be printed as bytecodes print(PadRight("bytecode", OPERAND_PLACEHOLDER_LENGTH + 1)).println(opcode + ";"); return 1; } String operand = opcode.parseKey(); switch (opcode) { case opc_aload, opc_astore, opc_fload, opc_fstore, opc_iload, opc_istore, opc_lload, opc_lstore, opc_dload, opc_dstore, opc_ret -> { int count = 1; List validBytes = checkCodeBounds(pc, count); if (validBytes.size() == count) print(PadRight(operand, OPERAND_PLACEHOLDER_LENGTH + 1)).println(getUByte(pc + 1) + ";"); else printBytes(opcode.byteValue(), validBytes, shift); return 2; } case opc_iinc -> { int count = 2; List validBytes = checkCodeBounds(pc, count); if (validBytes.size() == count) print(PadRight(operand, OPERAND_PLACEHOLDER_LENGTH + 1)). println("%d, %d;", getUByte(pc + 1), getByte(pc + 2)); else printBytes(opcode.byteValue(), validBytes, shift); return 3; } case opc_tableswitch -> { boolean notPrinted = true; try { int tb = align(pc + 1); int default_skip = getInt(tb); /* default skip pamount */ int low = getInt(tb + 4); int high = getInt(tb + 8); int count = high - low; printPadRight(format("%s { ", PadRight(operand, OPERAND_PLACEHOLDER_LENGTH)), getCommentOffset()); println(printCPIndex && !skipComments ? " // " + low + " to " + high : ""); notPrinted = false; for (int i = 0; i <= count; i++) { // 9 == "default: ".length() print(enlargedIndent(PadRight(format("%2d: ", i + low), 9), shift)). println(data.getLabelPrefix() + (pc + getInt(tb + 12 + 4 * i)) + ";"); } print(enlargedIndent( PadRight("default: " + data.getLabelPrefix() + (default_skip + pc), OPERAND_PLACEHOLDER_LENGTH - getIndentStep() - 2), shift) ).println(" };"); return tb - pc + 16 + count * 4; } catch (IndexOutOfBoundsException e) { if (notPrinted) { println("%s { ".formatted(operand)); printIndentLn(enlargedIndent("BOGUS;", shift)); println(enlargedIndent(" };", shift)); } else { println("BOGUS;").println(enlargedIndent(" };", shift)); } environment.error(e); return 1; } } case opc_lookupswitch -> { boolean notPrinted = true; try { int tb = align(pc + 1); int default_skip = getInt(tb); int nPairs = getInt(tb + 4); printPadRight(format("%s { ", PadRight(operand, OPERAND_PLACEHOLDER_LENGTH)), getCommentOffset()); println(printCPIndex && !skipComments ? " // " + nPairs : ""); notPrinted = false; Pair[] lookupswitchPairs = getLookupswitchPairs(tb, nPairs); // 9 == "default: ".length() int caseLength = Math.max(9, Arrays.stream(lookupswitchPairs). mapToInt(p -> String.valueOf(p.first).length()).max().orElse(0) + 2); for (int i = 0; i < nPairs; i++) { print(enlargedIndent(PadRight(format("%2d:", lookupswitchPairs[i].first), caseLength), shift)). println(data.getLabelPrefix() + (pc + lookupswitchPairs[i].second) + ";"); } print(enlargedIndent( PadRight(PadRight("default: ", caseLength) + data.getLabelPrefix() + (default_skip + pc), OPERAND_PLACEHOLDER_LENGTH - getIndentStep() - 2), shift)).println(" };"); return tb - pc + (nPairs + 1) * 8; } catch (IndexOutOfBoundsException e) { if (notPrinted) { println("%s { ".formatted(operand)); } printIndentLn(enlargedIndent("BOGUS;", shift)); println(enlargedIndent(" };", shift)); environment.error(e); return 1; } } case opc_newarray -> { int count = 1; List validBytes = checkCodeBounds(pc, count); if (validBytes.size() == count) { int tp = getUByte(pc + 1); BasicType basicType = getBasicType(tp); if (basicType == null) { print(PadRight(operand, OPERAND_PLACEHOLDER_LENGTH + 1)). println("BOGUS TYPE: " + toHex(tp, 8) + ";"); } else { print(PadRight(operand, OPERAND_PLACEHOLDER_LENGTH + 1)). println(basicType.printValue() + ";"); } } else printBytes(opcode.byteValue(), validBytes, shift); return 2; } case opc_ldc, opc_ldc_w, opc_ldc2_w, opc_invokedynamic -> { try { int index, opLength; Map> breakPositions = new HashMap<>(); if (opcode == Opcode.opc_ldc) { opLength = 2; breakPositions = LdwBreakPositions; index = getUByte(pc + 1); } else if (opcode == Opcode.opc_invokedynamic) { opLength = 5; breakPositions = InvokeDynamicBreakPositions; index = getUShort(pc + 1); // getUbyte(pc + 3); // getUbyte(pc + 4); // reserved bytes } else { // opc_ldc*_w opLength = 3; breakPositions = LdwBreakPositions; index = getUShort(pc + 1); } pool.setPrintTAG(true); if (printCPIndex) { if (skipComments) { println(format("%s #%d;", PadRight(operand, OPERAND_PLACEHOLDER_LENGTH), index)); } else { printPadRight( format("%s #%d;", PadRight(operand, OPERAND_PLACEHOLDER_LENGTH), index), getCommentOffset()). print(" // "); println( formatOperandLine(pool.ConstantStrValue(index), getCommentOffset() + shift, " // ", breakPositions)); } } else { // TODO: Check Offset calculation print(PadRight(operand, OPERAND_PLACEHOLDER_LENGTH + 1)); println(formatOperandLine(pool.ConstantStrValue(index), OPERAND_PLACEHOLDER_LENGTH + shift + 1, "", breakPositions) + ";"); } pool.setPrintTAG(false); return opLength; } catch (IndexOutOfBoundsException e) { if (printCPIndex) { if (skipComments) { println(format("%s BOGUS;", PadRight(operand, OPERAND_PLACEHOLDER_LENGTH))); } else { printPadRight(format("%s BOGUS;", PadRight(operand, OPERAND_PLACEHOLDER_LENGTH)), getCommentOffset()).println(" // " + e.getMessage()); } } else { print(PadRight(operand, OPERAND_PLACEHOLDER_LENGTH + 1)).println("BOGUS;"); } environment.error(e); return 1; } } case opc_anewarray, opc_instanceof, opc_checkcast, opc_new, opc_putstatic, opc_getstatic, opc_putfield, opc_getfield, opc_invokevirtual, opc_invokespecial, opc_invokestatic -> { int count = 2; List validBytes = checkCodeBounds(pc, count); if (validBytes.size() == count) { int index = getUShort(pc + 1); if (printCPIndex) { if (skipComments) { println(format("%s #%d;", PadRight(operand, OPERAND_PLACEHOLDER_LENGTH), index)); } else { printPadRight(format("%s #%d;", PadRight(operand, OPERAND_PLACEHOLDER_LENGTH), index), getCommentOffset()).println(" // " + pool.ConstantStrValue(index)); } } else { print(PadRight(operand, OPERAND_PLACEHOLDER_LENGTH + 1)); println(pool.ConstantStrValue(index) + ";"); } } else printBytes(opcode.byteValue(), validBytes, shift); return 3; } case opc_multianewarray, opc_invokeinterface -> { int count = opcode == Opcode.opc_multianewarray ? 3 : 4; List validBytes = checkCodeBounds(pc, count); if (validBytes.size() == count) { int index = getUShort(pc + 1); int dimensions = getUByte(pc + 3); // nargs in case of opc_invokeinterface if (printCPIndex) { if (skipComments) { println(format("%s #%d, %d;", PadRight(operand, OPERAND_PLACEHOLDER_LENGTH), index, dimensions)); } else { printPadRight(format("%s #%d, %d;", PadRight(operand, OPERAND_PLACEHOLDER_LENGTH), index, dimensions), getCommentOffset()).println(" // " + pool.ConstantStrValue(index)); } } else { print(PadRight(operand, OPERAND_PLACEHOLDER_LENGTH + 1)); println("%s, %d;", pool.ConstantStrValue(index), dimensions); } } else { printBytes(opcode.byteValue(), validBytes, shift); } return count + 1; } case opc_sipush -> { int count = 2; List validBytes = checkCodeBounds(pc, count); if (validBytes.size() == count) print(PadRight(operand, OPERAND_PLACEHOLDER_LENGTH + 1)).println(getShort(pc + 1) + ";"); else printBytes(opcode.byteValue(), validBytes, shift); return 3; } case opc_bipush -> { int count = 1; List validBytes = checkCodeBounds(pc, count); if (validBytes.size() == count) print(PadRight(operand, OPERAND_PLACEHOLDER_LENGTH + 1)).println(getByte(pc + 1) + ";"); else printBytes(opcode.byteValue(), validBytes, shift); return 2; } case opc_jsr, opc_goto, opc_ifeq, opc_ifge, opc_ifgt, opc_ifle, opc_iflt, opc_ifne, opc_if_icmpeq, opc_if_icmpne, opc_if_icmpge, opc_if_icmpgt, opc_if_icmple, opc_if_icmplt, opc_if_acmpeq, opc_if_acmpne, opc_ifnull, opc_ifnonnull -> { int count = 2; List validBytes = checkCodeBounds(pc, count); if (validBytes.size() == count) print(PadRight(operand, OPERAND_PLACEHOLDER_LENGTH + 1)). println(data.getLabelPrefix() + (pc + getShort(pc + 1)) + ";"); else printBytes(opcode.byteValue(), validBytes, shift); return 3; } case opc_jsr_w, opc_goto_w -> { int count = 4; List validBytes = checkCodeBounds(pc, count); if (validBytes.size() == count) print(PadRight(operand, OPERAND_PLACEHOLDER_LENGTH + 1)). println(data.getLabelPrefix() + (pc + getInt(pc + 1)) + ";"); else printBytes(opcode.byteValue(), validBytes, shift); return 5; } default -> { println(operand + ";"); return 1; } } } // end printInstr /** * @param opcode byte encoding of an instruction * @param bytes bytes corresponding to the instruction's parameters * @param shift printing indentation for output bytes */ private void printBytes(byte opcode, List bytes, int shift) { print(PadRight(opc_bytecode.parseKey(), OPERAND_PLACEHOLDER_LENGTH + 1)). println(HexUtils.toHex(opcode) + ";"); for (byte b : bytes) { printPadLeft(" ", shift). print(PadRight(opc_bytecode.parseKey(), OPERAND_PLACEHOLDER_LENGTH + 1)). println(HexUtils.toHex(b) + ";"); } } /** * Checks whether the bytes corresponding to the instruction's parameters belong to the code attribute. * * @param ind code index of the instruction * @param count number of bytes corresponding to the instruction's parameters * @return The list of bytes corresponds to the instruction's parameters that belong to the code attribute. * If the count does not match the list size, it indicates that the instruction is truncated. */ private List checkCodeBounds(int ind, int count) { List list = new ArrayList<>(); int codeLength = code.length; for (int i = 1; i <= count; i++) { if (ind + i < codeLength) list.add(code[i]); else return list; } return list; } private Pair[] getLookupswitchPairs(int pad, int count) { try { Pair[] pairs = new Pair[count]; for (int i = 1; i <= count; i++) { pairs[i - 1] = new Pair<>(getInt(pad + i * 8), getInt(pad + 4 + i * 8)); } return pairs; } catch (NegativeArraySizeException e) { throw new IndexOutOfBoundsException(environment.getInfo("err.out.of.range", count)); } } /** * Prints the code data to the current output stream if code exists (method isn't abstract) */ public void print() throws IOException { if (lineNumberTable != null) { loadLineNumTable(); } // Preparing the inlined StackMapTable to have early_larval_frame tied to other frame types for which it is a wrapper. if (stackMapTable != null && !tableFormat) { loadStackMap(); } if (!data.printProgramCounter) { loadLabelTable(); } loadTrapTable(); if (localVariableTable != null) { loadLocalVariableTable(); } if (localVariableTypeTable != null) { loadLocalVariableTypeTable(); } // stack 3 locals 1 incIndent().printIndentLn("%s %d %s %d", STACK.parseKey(), max_stack, LOCAL.parseKey(), max_locals).decIndent(); // Print ParamAnnotations if found. data.printMethodParameters(); // Print Code Attribute printIndentLn("{"); InstructionAttr insAttr = instructionAttrs.get(0); setCommentOffset(getCommentOffset() - instructionOffset - getIndentSize()); for (int pc = 0; pc < code.length; ) { if (insAttr != null) { incIndent(); insAttr.setCommentOffset(this.getCommentOffset()); insAttr.printBegins(attributeOffset); decIndent(); } if (data.printProgramCounter) { incIndent(); printIndent(PadRight(format("%2d:", pc), instructionOffset)); } else { printIndent(PadRight(((insAttr != null) && insAttr.referred) ? data.getLabelPrefix() + pc + ":" : " ", instructionOffset)); incIndent(); } if (insAttr != null) { if (insAttr.printStackMap_Table(attributeOffset)) { print(enlargedIndent(attributeOffset)); } } pc = pc + printInstrLn(pc, attributeOffset + getIndentSize()); insAttr = instructionAttrs.get(pc); if (insAttr != null) { insAttr.printEnds(attributeOffset); decIndent(); } decIndent(); } // the right brace can be labelled: if (insAttr != null && insAttr.stackMapEntry != null && insAttr.referred) { if (data.printProgramCounter) { incIndent(); printIndent(PadRight("%2d:".formatted(code.length), 0)); decIndent(); } else { printIndent(PadRight("%s%d:".formatted(data.getLabelPrefix(), code.length), code.length), 0); } } // Print code's type annotations printAnnotations(visibleTypeAnnotations, invisibleTypeAnnotations); // Print printAttributes(lineNumberTable, localVariableTable, localVariableTypeTable, stackMapTable); printIndentLn("}"); } @Override public MemberData setSignature(SignatureData signatureData) { throw new RuntimeException("The Code Attribute does not have a signature attribute"); } public Environment getEnvironment() { return environment; } /** * Prints ClassData annotations * * @throws IOException signals that an exception of some sort has occurred */ @Override protected void printAnnotations(List... annotationLists) throws IOException { boolean firstTime = true; for (List list : annotationLists) { if (list != null) { println(firstTime); for (T annotation : list) { firstTime = false; annotation.print(); println(); } } } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/ConstantPool.java000066400000000000000000001241621514323636100265070ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.asmutils.HexUtils; import org.openjdk.asmtools.asmutils.Range; import org.openjdk.asmtools.asmutils.StringUtils; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.common.outputs.ToolOutput; import java.io.DataInputStream; import java.io.IOException; import java.util.*; import java.util.function.Function; import static java.lang.Math.max; import static java.lang.String.format; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.CONSTANT_POOL; /** * Class representing the Constant Pool */ public class ConstantPool extends Indenter { public static final Function funcInvalidCPIndex = index -> "??? Invalid constant_pool reference #%d".formatted(index); private static final Hashtable tagHash = new Hashtable<>(); private static final Hashtable subTagHash = new Hashtable<>(); // Class initializer Code static { // Make sure all the tags get initialized before being used. tagHash.put(TAG.CONSTANT_UTF8.value(), TAG.CONSTANT_UTF8); // Obsolete: tagHash.put(TAG.CONSTANT_UNICODE.value(), TAG.CONSTANT_UNICODE); tagHash.put(TAG.CONSTANT_INTEGER.value(), TAG.CONSTANT_INTEGER); tagHash.put(TAG.CONSTANT_FLOAT.value(), TAG.CONSTANT_FLOAT); tagHash.put(TAG.CONSTANT_LONG.value(), TAG.CONSTANT_LONG); tagHash.put(TAG.CONSTANT_DOUBLE.value(), TAG.CONSTANT_DOUBLE); tagHash.put(TAG.CONSTANT_CLASS.value(), TAG.CONSTANT_CLASS); tagHash.put(TAG.CONSTANT_STRING.value(), TAG.CONSTANT_STRING); tagHash.put(TAG.CONSTANT_FIELD.value(), TAG.CONSTANT_FIELD); tagHash.put(TAG.CONSTANT_METHOD.value(), TAG.CONSTANT_METHOD); tagHash.put(TAG.CONSTANT_INTERFACEMETHOD.value(), TAG.CONSTANT_INTERFACEMETHOD); tagHash.put(TAG.CONSTANT_NAMEANDTYPE.value(), TAG.CONSTANT_NAMEANDTYPE); tagHash.put(TAG.CONSTANT_METHODHANDLE.value(), TAG.CONSTANT_METHODHANDLE); tagHash.put(TAG.CONSTANT_METHODTYPE.value(), TAG.CONSTANT_METHODTYPE); tagHash.put(TAG.CONSTANT_DYNAMIC.value(), TAG.CONSTANT_DYNAMIC); tagHash.put(TAG.CONSTANT_INVOKEDYNAMIC.value(), TAG.CONSTANT_INVOKEDYNAMIC); tagHash.put(TAG.CONSTANT_MODULE.value(), TAG.CONSTANT_MODULE); tagHash.put(TAG.CONSTANT_PACKAGE.value(), TAG.CONSTANT_PACKAGE); subTagHash.put(SUBTAG.REF_GETFIELD.value(), SUBTAG.REF_GETFIELD); subTagHash.put(SUBTAG.REF_GETSTATIC.value(), SUBTAG.REF_GETSTATIC); subTagHash.put(SUBTAG.REF_PUTFIELD.value(), SUBTAG.REF_PUTFIELD); subTagHash.put(SUBTAG.REF_PUTSTATIC.value(), SUBTAG.REF_PUTSTATIC); subTagHash.put(SUBTAG.REF_INVOKEVIRTUAL.value(), SUBTAG.REF_INVOKEVIRTUAL); subTagHash.put(SUBTAG.REF_INVOKESTATIC.value(), SUBTAG.REF_INVOKESTATIC); subTagHash.put(SUBTAG.REF_INVOKESPECIAL.value(), SUBTAG.REF_INVOKESPECIAL); subTagHash.put(SUBTAG.REF_NEWINVOKESPECIAL.value(), SUBTAG.REF_NEWINVOKESPECIAL); subTagHash.put(SUBTAG.REF_INVOKEINTERFACE.value(), SUBTAG.REF_INVOKEINTERFACE); } /** * Reference to the class data */ private final ClassData classData; private Environment environment; /** * The actual pool of Constants */ private ArrayList pool; private Range range; private boolean printTAG = false; /* ConstantPool Constructors */ public ConstantPool(ClassData cd) { this(cd, 10); } public ConstantPool(ClassData classData, int size) { super(classData.toolOutput); this.classData = classData; this.environment = classData.environment; tableToken = CONSTANT_POOL; pool = new ArrayList<>(size); } public void setPrintTAG(boolean value) { this.printTAG = value; } public String getPrintedTAG(TAG tag) { return (this.printTAG) ? tag.tagName + " " : ""; } public int size() { return pool.size(); } public boolean inRange(int value) { if (range == null) { range = new Range<>(1, pool.size() - 1); } return range.in(value); } /** * decodes a ConstantPool and it's constants from a data stream. */ ConstantPool read(DataInputStream in) throws IOException { // constant_pool_count //The value of the constant_pool_count item is equal to the number of entries in the constant_pool table plus one. int constant_pool_count = in.readUnsignedShort(); int tagSize; pool = new ArrayList<>(constant_pool_count); pool.add(0, null); environment.traceln("constant_pool_count = " + constant_pool_count); for (int i = 1; i < constant_pool_count; i += tagSize) { byte tagByte = in.readByte(); TAG tag = tagHash.get(tagByte); if (tag == null) { throw new ClassFormatError( format("Error while reading constant pool for %s: unexpected tag at #%d: %d", environment.getToolInput(), i, tagByte)); } tagSize = tag.size(); environment.traceln("\tCP entry #" + i + " tag[" + tagByte + "]\t=\t" + tag); switch (tag) { case CONSTANT_UTF8 -> pool.add(i, new CP_Str(tag, in.readUTF())); case CONSTANT_INTEGER -> pool.add(i, new CP_Int(tag, in.readInt())); case CONSTANT_LONG -> { pool.add(i, new CP_Long(tag, in.readLong())); // handle null entry to account for Longs taking up 2 CP slots pool.add(null); } case CONSTANT_FLOAT -> pool.add(i, new CP_Float(tag, in.readFloat())); case CONSTANT_DOUBLE -> { pool.add(i, new CP_Double(tag, in.readDouble())); // handle null entry to account for Doubles taking up 2 CP slots pool.add(null); } case CONSTANT_CLASS, CONSTANT_STRING, CONSTANT_METHODTYPE, CONSTANT_PACKAGE, CONSTANT_MODULE -> pool.add(i, new CPX(tag, in.readUnsignedShort())); case CONSTANT_FIELD, CONSTANT_METHOD, CONSTANT_INTERFACEMETHOD, CONSTANT_NAMEANDTYPE, CONSTANT_DYNAMIC, CONSTANT_INVOKEDYNAMIC -> pool.add(i, new CPX2(tag, in.readUnsignedShort(), in.readUnsignedShort())); case CONSTANT_METHODHANDLE -> pool.add(i, new CPX2(tag, in.readUnsignedByte(), in.readUnsignedShort())); default -> throw new ClassFormatError("invalid constant type: " + (int) tagByte); } } return this; } /** * Public getter - Safely gets a Constant from the CP at a given index. */ public Constant getConst(int cpx) { if (inRange(cpx)) { return pool.get(cpx); } else { return null; } } /** * Safely gets the string representation of a ConstantUTF8 from the CP at a given index. *

* Returns either the UTF8 string, or a default ConstantUTF8 built by CP index * with the function funcGetDefaultString like: index-> "#" + index */ public String getString(int cpx, Function funcGetDefaultString) { String str = funcGetDefaultString.apply(cpx); if (inRange(cpx)) { Constant cns = pool.get(cpx); if (cns != null && cns.tag == TAG.CONSTANT_UTF8) { CP_Str cns1 = (CP_Str) cns; str = cns1.value; } } return str; } /** * Safely gets the string representation of a ConstantModule from the CP at a given index. *

* Returns either the Java Module name, or a default class name built by CP index * with the function funcGetDefaultModuleName like: index-> "#" + index */ public String getModuleName(int cpx, Function funcGetDefaultModuleName) { String str = funcGetDefaultModuleName.apply(cpx); if (inRange(cpx)) { Constant cns = pool.get(cpx); if (cns != null && cns.tag == TAG.CONSTANT_MODULE) { str = cns.stringVal(); } } return str; } public String getModuleName(int cpx) { return getModuleName(cpx, index -> "#" + index); } /** * Public string val - Safely gets the string representation of a ConstantPackage from the CP at a given index. *

* Returns either the Java Package name, or a default class name built by CP index * with the function funcGetDefaultPackageName like: index-> "#" + index */ public String getPackageName(int cpx, Function funcGetDefaultPackageName) { String str = funcGetDefaultPackageName.apply(cpx); if (inRange(cpx)) { Constant cns = pool.get(cpx); if (cns != null && cns.tag == TAG.CONSTANT_PACKAGE) { str = cns.stringVal(); } } return str; } public String getPackageName(int cpx) { return getPackageName(cpx, index -> "#" + index); } /** * Safely gets a Java name from a ConstantUTF8 from the CP at a given index. *

* Returns either null (if invalid), or the Java name value of the UTF8 */ public String getName(int cpx) { String str = getString(cpx, index -> null); if (str == null) { return ""; } return Utils.javaName(str); } /** * Safely gets a Java class name from a ConstantClass from the CP at a given index. *

* Returns either the Java class name, or a CP index reference string. */ public String getClassName(int cpx) { return getClassName(cpx, index -> "#" + index); } public String getMethodName(int cpx) { Constant cns = pool.get(cpx); if (cns != null && cns instanceof CPX2 cpx2) { return cpx2.stringVal(); } else { return cns.stringVal(); } } /** * Gets a string representation of the constant_pool entry at the specified index, * pointing to a CONSTANT_NameAndType_info structure with a field descriptor. * * @param cpx the constant_pool index pointing to CONSTANT_NameAndType_info * @return a string presentation of the CONSTANT_NameAndType_info structure */ public String getFieldNameTypeAsString(int cpx) { Constant cns = pool.get(cpx); if (cns == null || (cns.tag != TAG.CONSTANT_NAMEANDTYPE) || referredBy(cpx, TAG.CONSTANT_METHOD, TAG.CONSTANT_INTERFACEMETHOD, TAG.CONSTANT_METHODHANDLE, TAG.CONSTANT_DYNAMIC, TAG.CONSTANT_INVOKEDYNAMIC)) { String msg = environment.getLogger().getResourceString("warn.field.nametype.required", cpx); return (printCPIndex) ? msg : "??? #%d %s".formatted(cpx, msg); } return cns.stringVal(); } public boolean referredBy(int cpx, TAG... tags) { Optional cns = pool.stream().filter(item -> item != null && item.tag.belongsTo(tags)).filter(c -> ((CPX2) c).value2 == cpx).findFirst(); return cns.isPresent(); } /** * Safely gets a Java class name from a ConstantClass from the CP at a given index. *

* Returns either the Java class name, or a message string formatted by cpx: formatString.formatted(cpx) */ public String getJavaClassName(int cpx, String formatString) { String str = getClassName(cpx, index -> null); return (str == null) ? formatString.formatted(cpx) : str.replace('/', '.'); } /** * Safely gets a Java class name from a ConstantClass from the CP at a given index. *

* Returns either the Java class name, or a default class name built by CP index * with the function funcGetDefaultClassName like: index-> "#" + index */ public String getClassName(int cpx, Function funcGetDefaultClassName) { Constant cns = getConstantOfClassName(cpx); if (cns == null) { return funcGetDefaultClassName.apply(cpx); } return getClassName((CPX) cns); } public Constant getConstantOfClassName(int cpx) { if (!inRange(cpx)) { return null; } Constant cns = pool.get(cpx); if (cns == null || cns.tag != TAG.CONSTANT_CLASS) { return null; } return cns; } /** * Safely gets a Java class name from a ConstantClass from a CPX2 constant pool * object. (eg. Method/Field/Interface Ref) *

* Returns either the Java class name, or a CP index reference string. */ public String getClassName(CPX2 classConst) { return _getClassName(classConst.value); } /** * Safely gets a Java class name from a ConstantClass from a CPX constant pool object. * (eg. Class Ref) *

* Returns either the Java class name, or a CP index reference string. */ public String getClassName(CPX classConst) { return _getClassName(classConst.value); } /** * Helper for getting class name. It checks ConstantPool bounds, does name conversion. */ private String _getClassName(int nameIndex) { String res = "#" + nameIndex; if (!inRange(nameIndex)) { return res; } Constant nameConst = pool.get(nameIndex); if (nameConst == null || nameConst.tag != TAG.CONSTANT_UTF8) { return res; } CP_Str name = (CP_Str) nameConst; String classname = name.value; if (Utils.isClassArrayDescriptor(classname)) { classname = "\"%s\"".formatted(classname); } return classname; } /** * Shortens a class name (if the class is in the given package). * Works with a string-encoded classname. * * @param className fully qualified name of the class * @param packageName the package */ public String getShortClassName(String className, String packageName) { final int idx = className.lastIndexOf('/'); if (idx == packageName.length() && className.startsWith(packageName)) { return className.substring(idx + 1); } return className; } /** * Shortens a class name (if the class is in the given package). * Works with a CP index to a ConstantClass. * * @param cpx the Constant Pool index to a CONSTANT_Class_info * @param packageName the package */ public String getShortClassName(int cpx, String packageName) { String name = Utils.javaName(getClassName(cpx)); return getShortClassName(name, packageName); } /** * Getter that safely gets the string descriptor of a subtag */ private String subtagToString(int subtag) { SUBTAG st = subTagHash.get((byte) subtag); if (st == null) { return "BOGUS_SUBTAG:" + subtag; } return st.tagName; } /** * Safely gets the string value of any Constant at any CP index. */ public String StringValue(int cpx) { if (!inRange(cpx)) { return "".formatted(cpx); } Constant cnst = pool.get(cpx); if (cnst == null) { return ""; } return cnst.stringVal(); } /** * Safely gets the string value of any Constant at any CP index. This string is either * a Constant's String value or a CP index reference string. The Constant string has * a tag descriptor in the beginning. */ public String ConstantStrValue(int cpx) { if (cpx == 0 || !inRange(cpx)) { return "#" + cpx; } Constant cns = pool.get(cpx); if (cns == null) { return "#" + cpx; } if (cns instanceof CPX2 cns2) { if (cns2.value == classData.this_cpx && cns2.refersClassMember()) { cpx = cns2.value2; } } return cns.tag.tagName + " " + StringValue(cpx); } @Override public boolean isTableOutput() { return tableFormat; } @Override protected void jasmPrint() { int size; if (extraDetailedOutput && !skipComments) { printIndentLn("// %s:".formatted(tableToken.printKey())); } for (int idx = 1; idx < pool.size(); idx += size) { Constant cns = pool.get(idx); printIndent(this.CPXPlaceHolder, idx); if (cns == null) { size = 0; printIndentLn("null;"); } else { size = cns.size(); cns.setCommentPadding(getCommentPadding()); // simple printing cns.jasmPrint(toolOutput, this.tagPadding); } } printIndentLn(); } @Override protected void tablePrint() { int size; if (extraDetailedOutput && !skipComments) { printIndentLn("// %s:".formatted(tableToken.printKey())); } for (int idx = 1; idx < pool.size(); idx += size) { Constant cns = pool.get(idx); printIndent(this.CPXPlaceHolder, idx); if (cns == null) { size = 0; printIndentLn("null;"); } else { size = cns.size(); cns.setCommentPadding(getCommentPadding()); // extended printing cns.tablePrint(toolOutput, this.tagPadding); } } printIndentLn(); } private String CPXPlaceHolder = ""; private int CPXPlaceHolderLength = 0; private int CPXLength = 0; private int tagPadding = 0; /** * Initialize printing data once the pool was read. * Prepare offsets, paddings, etc. needed for printing */ protected ConstantPool InitializePrintData() { int maxTagNameLength = pool.stream().mapToInt(elem -> (elem == null) ? 4 : elem.tag.getPrintWidth(tableFormat)).max().orElse(10); this.CPXLength = pool.size() > 100 ? 4 : 3; // similar to javap format like this: // Constant pool: // #1 = Methodref #2.#3 // java/lang/Object."":()V // #2 = Class #4 // java/lang/Object // if (javap-like format) :: // int maxTagAliasLength = pool.stream().mapToInt(elem -> (elem == null) ? 4 : // elem.tag.tagAlias().length()).max().orElse(10); // this.tagPadding = maxTagAliasLength + 1; // this.CPXPlaceHolder = "%" + CPXLength + "s = ".formatted("#%d"); this.tagPadding = maxTagNameLength + 1; this.CPXPlaceHolder = "const #%-" + CPXLength + "d = "; this.CPXPlaceHolderLength = this.CPXPlaceHolder.formatted(pool.size()).length(); // --const #XX = --TagPadding-|--commentPadding---// // --const #25 = class--------|#34;---------------// TesterInfo$Priority // --#XX = // IIhhhhhhhhhhhhTTTTTTTTTTTTTCCCCCCCCCCCCCCCCCCCC // 123456789012345678901234567890123 4567890123456789012 // II + hhhhhhhhhhhhhhhhhhhhhhhh + TTTTTTTTTT + CCCCCCCCCCCCCCCCCCC this.commentOffset = getIndentSize() + this.CPXPlaceHolderLength + tagPadding + this.getCommentPadding(); return this; } public int getCommentPadding() { return max(COMMENT_PADDING, tagPadding); } public List getIssues() { return this.pool.stream().filter(Objects::nonNull). flatMap(constant -> constant.getIssues().stream().filter(Objects::nonNull)). toList(); } public CPX2 getCPX2(TAG tag) { return new CPX2(tag); } public boolean CheckEntryType(int cpIndex, TAG... tags) { Constant cell = getConst(cpIndex); if (cell != null) { return cell.tag.belongsTo(tags); } return false; } public TAG getTag(int cpIndex) { Constant cell = getConst(cpIndex); if (cell != null) { return cell.tag; } return null; } /** * TAG - A Tag descriptor of constants in the constant pool */ public enum TAG { CONSTANT_NULL((byte) 0, "null", "CONSTANT_NULL", 1), CONSTANT_UTF8((byte) 1, "Utf8", "CONSTANT_UTF8", 1), // Obsolete CONSTANT_UNICODE((byte) 2, "unicode", "CONSTANT_UNICODE", 1), CONSTANT_INTEGER((byte) 3, "int", "Integer", "CONSTANT_INTEGER", 1), CONSTANT_FLOAT((byte) 4, "float", "Float", "CONSTANT_FLOAT", 1), CONSTANT_LONG((byte) 5, "long", "Long", "CONSTANT_LONG", 2), CONSTANT_DOUBLE((byte) 6, "double", "Double", "CONSTANT_DOUBLE", 2), CONSTANT_CLASS((byte) 7, "class", "Class", "CONSTANT_CLASS", 1), CONSTANT_STRING((byte) 8, "String", "CONSTANT_STRING", 1), CONSTANT_FIELD((byte) 9, "Field", "Fieldref", "CONSTANT_FIELD", 1), CONSTANT_METHOD((byte) 10, "Method", "Methodref", "CONSTANT_METHOD", 1), CONSTANT_INTERFACEMETHOD((byte) 11, "InterfaceMethod", "InterfaceMethodref", "CONSTANT_INTERFACEMETHOD", 1), CONSTANT_NAMEANDTYPE((byte) 12, "NameAndType", "CONSTANT_NAMEANDTYPE", 1), CONSTANT_METHODHANDLE((byte) 15, "MethodHandle", "CONSTANT_METHODHANDLE", 1), CONSTANT_METHODTYPE((byte) 16, "MethodType", "CONSTANT_METHODTYPE", 1), CONSTANT_DYNAMIC((byte) 17, "Dynamic", "CONSTANT_DYNAMIC", 1), CONSTANT_INVOKEDYNAMIC((byte) 18, "InvokeDynamic", "CONSTANT_INVOKEDYNAMIC", 1), CONSTANT_MODULE((byte) 19, "Module", "CONSTANT_MODULE", 1), CONSTANT_PACKAGE((byte) 20, "Package", "CONSTANT_PACKAGE", 1); private final Byte value; private final String tagName; private final String tagAlias; private final String printValue; private final int size; TAG(byte value, String tagName, String printValue, int size) { this.value = value; this.tagName = tagName; this.tagAlias = ""; this.printValue = printValue; this.size = size; } TAG(byte value, String tagName, String tagAlias, String printValue, int size) { this.value = value; this.tagName = tagName; this.tagAlias = tagAlias; this.printValue = printValue; this.size = size; } public String printValue() { String[] strings = this.name().split("_"); return strings[0] + "_" + strings[1].substring(0, 1).toUpperCase() + strings[1].substring(1).toLowerCase(); } public boolean belongsTo(TAG... tags) { for (TAG tag : tags) { if (this.value.equals(tag.value)) { return true; } } return false; } public byte value() { return value; } public String tagName() { return tagName; } public int getPrintWidth(boolean tableFormat) { String str = tableFormat ? this.tagAlias() : this.tagName; return str.length(); } public String tagAlias() { return tagAlias.isEmpty() ? tagName : tagAlias; } public int size() { return size; } @Override public String toString() { return "<" + tagName + "> "; } } /** * SUBTAG - A Tag descriptor of form method-handle constants */ public enum SUBTAG { REF_GETFIELD((byte) 1, "REF_getField", "REF_GETFIELD"), REF_GETSTATIC((byte) 2, "REF_getStatic", "REF_GETSTATIC"), REF_PUTFIELD((byte) 3, "REF_putField", "REF_PUTFIELD"), REF_PUTSTATIC((byte) 4, "REF_putStatic", "REF_PUTSTATIC"), REF_INVOKEVIRTUAL((byte) 5, "REF_invokeVirtual", "REF_INVOKEVIRTUAL"), REF_INVOKESTATIC((byte) 6, "REF_invokeStatic", "REF_INVOKESTATIC"), REF_INVOKESPECIAL((byte) 7, "REF_invokeSpecial", "REF_INVOKESPECIAL"), REF_NEWINVOKESPECIAL((byte) 8, "REF_newInvokeSpecial", "REF_NEWINVOKESPECIAL"), REF_INVOKEINTERFACE((byte) 9, "REF_invokeInterface", "REF_INVOKEINTERFACE"); private final Byte value; private final String tagName; private final String printValue; SUBTAG(byte val, String tagName, String printValue) { value = val; this.tagName = tagName; this.printValue = printValue; } public byte value() { return value; } public String description() { return printValue; } @Override public String toString() { return "<" + tagName + "> "; } } /** * Constant - Base class of all constant entries */ public abstract class Constant { // tag the descriptor for the constant protected final TAG tag; protected final T value; private final List issues = new ArrayList<>(); // comment shift is used by the print method protected int commentPadding = Indenter.COMMENT_PADDING; public Constant(TAG tag, T value) { this.tag = tag; this.value = value; } public void jasmPrint(ToolOutput out, int spacePadding) { out.prints(PadRight(tag.tagName(), spacePadding)); } public void tablePrint(ToolOutput out, int spacePadding) { out.prints(PadRight(tag.tagAlias(), spacePadding)); } public int size() { return 1; } public List getIssues() { return issues; } public void setIssue(IOException value) { issues.add(value); } public void setCommentPadding(int commentPadding) { this.commentPadding = commentPadding; } public String stringVal() { return String.valueOf(value); } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Constant)) return false; Constant constant = (Constant) o; if (tag != constant.tag) return false; return value.equals(constant.value); } @Override public int hashCode() { int result = tag.hashCode(); result = 31 * result + value.hashCode(); return result; } @Override public String toString() { return "".formatted(tag, stringVal()); } } /** * CP_Str - Constant entries that contain String data. usually is a CONSTANT_UTF8 */ class CP_Str extends Constant { CP_Str(TAG tag, String value) { super(tag, value); } public String stringVal() { return StringUtils.Utf8ToString(value, "\""); } @Override public void jasmPrint(ToolOutput out, int spacePadding) { super.jasmPrint(out, spacePadding); out.printlns(stringVal() + ";"); } @Override public void tablePrint(ToolOutput out, int spacePadding) { super.tablePrint(out, spacePadding); // out.printlns(StringUtils.Utf8ToString(value)); out.printlns(stringVal() + ";"); } } /** * CP_Int - Constant entries that contain Integer data. usually is a CONSTANT_INTEGER */ class CP_Int extends Constant { CP_Int(TAG tag, int value) { super(tag, value); } @Override public String stringVal() { return classData.printHEX ? HexUtils.toHex(value) : value.toString(); } @Override public void jasmPrint(ToolOutput out, int spacePadding) { super.jasmPrint(out, spacePadding); out.printlns(stringVal() + ";"); } @Override public void tablePrint(ToolOutput out, int spacePadding) { super.tablePrint(out, spacePadding); // out.printlns(stringVal()); out.printlns(stringVal() + ";"); } } /** * CP_Long - Constant entries that contain LongInteger data. usually is a CONSTANT_LONG * These take up 2 slots in the constant pool. */ class CP_Long extends Constant { CP_Long(TAG tag, long value) { super(tag, value); } @Override public String stringVal() { return classData.printHEX ? HexUtils.toHex(value) + 'l' : value.toString() + 'l'; } @Override public void jasmPrint(ToolOutput out, int spacePadding) { super.jasmPrint(out, spacePadding); out.printlns(stringVal() + ";"); } @Override public void tablePrint(ToolOutput out, int spacePadding) { super.tablePrint(out, spacePadding); // out.printlns(stringVal()); out.printlns(stringVal() + ";"); } @Override public int size() { return 2; } } /** * CP_Float - Constant entries that contain Float data. usually is a CONSTANT_FLOAT */ class CP_Float extends Constant { CP_Float(TAG tag, float value) { super(tag, value); } @Override public String stringVal() { if (classData.printHEX) { return "bits " + HexUtils.toHex(Float.floatToIntBits(value)); } String sf = (value).toString(); if (value.isNaN() || value.isInfinite()) { return sf; } return sf + "f"; } @Override public void jasmPrint(ToolOutput out, int spacePadding) { super.jasmPrint(out, spacePadding); out.printlns(stringVal() + ";"); } @Override public void tablePrint(ToolOutput out, int spacePadding) { super.tablePrint(out, spacePadding); // out.printlns(stringVal()); out.printlns(stringVal() + ";"); } } /** * CP_Double - Constant entries that contain double-precision float data. usually is a CONSTANT_DOUBLE * These take up 2 slots in the constant pool. */ class CP_Double extends Constant { CP_Double(TAG tag, double value) { super(tag, value); } @Override public String stringVal() { if (classData.printHEX) { return "bits " + HexUtils.toHex(Double.doubleToLongBits(value)) + 'l'; } String sd = value.toString(); if (value.isNaN() || value.isInfinite()) { return sd; } return sd + "d"; } @Override public void jasmPrint(ToolOutput out, int spacePadding) { super.jasmPrint(out, spacePadding); out.printlns(stringVal() + ";"); } @Override public void tablePrint(ToolOutput out, int spacePadding) { super.tablePrint(out, spacePadding); // out.printlns(stringVal()); out.printlns(stringVal() + ";"); } @Override public int size() { return 2; } } /** * CPX - Constant entries that contain a single constant-pool index. Usually, this includes: * CONSTANT_CLASS CONSTANT_METHODTYPE CONSTANT_STRING CONSTANT_MODULE CONSTANT_PACKAGE */ class CPX extends Constant { // value is Constant Pool index CPX(TAG tag, int cpx) { super(tag, cpx); } @Override public String stringVal() { String str = "UnknownTag"; switch (tag) { case CONSTANT_CLASS -> str = getShortClassName(getClassName(this), classData.packageName); case CONSTANT_PACKAGE, CONSTANT_MODULE -> str = getString(value, index -> "#" + index); case CONSTANT_METHODTYPE, CONSTANT_STRING -> str = StringValue(value); default -> { } } return str; } @Override public void jasmPrint(ToolOutput out, int spacePadding) { super.jasmPrint(out, spacePadding); print(); } @Override public void tablePrint(ToolOutput out, int spacePadding) { super.tablePrint(out, spacePadding); print(); } // Identical printing part for both JASM (simple) and extended (table) formats. private void print() { switch (tag) { case CONSTANT_CLASS, CONSTANT_STRING, CONSTANT_METHODTYPE, CONSTANT_PACKAGE, CONSTANT_MODULE -> { if (skipComments) { println("#" + value + ";"); } else { printPadRight("#" + value + ";", commentPadding).println(" // " + stringVal()); } } default -> { } } } } /** * CPX2 - Constant entries that contain two constant-pool indices. Usually, this includes: * CONSTANT_FIELD CONSTANT_METHOD CONSTANT_INTERFACEMETHOD CONSTANT_NAMEANDTYPE * CONSTANT_METHODHANDLE CONSTANT_DYNAMIC CONSTANT_INVOKEDYNAMIC */ public class CPX2 extends Constant { protected final int value2; // stack to control circular references in bsm arguments. final Stack stack = new Stack<>(); CPX2(TAG tag, int cpx1, int cpx2) { super(tag, cpx1); this.value2 = cpx2; } CPX2(TAG tag) { super(tag, 0); this.value2 = 0; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof CPX2)) return false; if (!super.equals(o)) return false; CPX2 cpx2 = (CPX2) o; return value2 == cpx2.value2; } @Override public int hashCode() { int result = super.hashCode(); result = 31 * result + value2; return result; } @Override public String stringVal() { String str = "UnknownTag"; switch (tag) { case CONSTANT_FIELD: // CODETOOLS-7902660: the tag Field is not necessary while printing static parameters of a bsm // Example: MethodHandle REF_getField:ClassName.FieldName:"I" str = getShortClassName(getClassName(value), classData.packageName) + "." + StringValue(value2); break; case CONSTANT_METHOD: case CONSTANT_INTERFACEMETHOD: // CODETOOLS-7902648: added printing of the tag: Method/Interface to clarify // interpreting CONSTANT_MethodHandle_info:reference_kind // Example: invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ObjectMethods.bootstrap str = getPrintedTAG(tag) + getShortClassName(getClassName(value), classData.packageName) + "." + StringValue(value2); break; case CONSTANT_NAMEANDTYPE: str = getName(value) + ":" + StringValue(value2); break; case CONSTANT_METHODHANDLE: str = subtagToString(value) + ":" + StringValue(value2); break; case CONSTANT_DYNAMIC: case CONSTANT_INVOKEDYNAMIC: int bsmAttributeIndex = value; int nameTypeIndex = value2; BootstrapMethodData bsmData; try { bsmData = classData.bootstrapMethods.get(bsmAttributeIndex); } catch (NullPointerException npe) { return ""; } catch (IndexOutOfBoundsException ioobe) { return ""; } int bsm_ref = bsmData.bsmRef; str = "%s:%s%s".formatted(StringValue(bsm_ref), StringValue(nameTypeIndex), bsmArgsAsString(bsmData, "{", "}")); default: break; } return str; } public String bsmArgsAsString(BootstrapMethodData bsmData) { return bsmArgsAsString(bsmData, "", ""); } public String bsmArgsAsString(BootstrapMethodData bsmData, String LeftBracket, String RightBracket) { StringBuilder sb = new StringBuilder(); int bsmArgsLen = bsmData.bsmArguments.size(); sb.append(LeftBracket); if (bsmArgsLen > 0) { for (int i = 0; i < bsmArgsLen; i++) { int bsmArgIdx = bsmData.bsmArguments.get(i); boolean notLastIdx = i != bsmArgsLen - 1; sb.append(bsmArgAsString(bsmArgIdx, notLastIdx)); } } sb.append(RightBracket); return sb.toString(); } public String bsmArgAsString(int bsmArgIdx, boolean notLastIdx) { return bsmArgAsString(bsmArgIdx, notLastIdx ? ARGUMENT_DELIMITER : "", notLastIdx ? LINE_SPLITTER : ""); } public String bsmArgWithoutDelimitersAsString(int bsmArgIdx, boolean notLastIdx) { return bsmArgAsString(bsmArgIdx, "", notLastIdx ? LINE_SPLITTER : ""); } public String bsmArgAsString(int bsmArgIdx, String argDelimiter, String lineSplitter) { String str = ""; if (inRange(bsmArgIdx)) { Constant cnt = pool.get(bsmArgIdx); if (stack.search(this) == -1) { stack.push(this); str = str.concat(ConstantStrValue(bsmArgIdx)).concat(argDelimiter); stack.pop(); } else { String ref; if (cnt instanceof CPX2) { ref = format("%-8s %d:#%d; ", cnt.tag.tagName(), cnt.value, ((CPX2) cnt).value2); } else { ref = format("%-8s #%d; ", cnt.tag.tagName(), cnt.value); } String msg = "circular reference to " + cnt.tag.tagName() + " #" + bsmArgIdx; if (printCPIndex) { str = str.concat(PadRight(ref, CIRCULAR_COMMENT_OFFSET)).concat("<").concat(msg).concat(">").concat(argDelimiter); } else { str = str.concat(PadRight(ref, CIRCULAR_COMMENT_OFFSET)).concat(" // <").concat(msg).concat(">").concat(lineSplitter); } cnt.setIssue(new IOException(msg)); } } else { str = environment.getInfo("info.corrupted_cp_entry"); } return str; } @Override public void jasmPrint(ToolOutput out, int spacePadding) { super.jasmPrint(out, spacePadding); print(); } @Override public void tablePrint(ToolOutput out, int spacePadding) { super.tablePrint(out, spacePadding); print(); } // Identical printing part for both JASM (simple) and extended (table) formats. private void print() { if (skipComments) { switch (tag) { case CONSTANT_FIELD, CONSTANT_METHOD, CONSTANT_INTERFACEMETHOD -> println("#%d.#%d;", value, value2); case CONSTANT_METHODHANDLE, CONSTANT_DYNAMIC, CONSTANT_INVOKEDYNAMIC -> println("%d:#%d;", value, value2); case CONSTANT_NAMEANDTYPE -> println("#%d:#%d;", value, value2); default -> printPadRight(format("%d:#%d;", value, value2), commentPadding).println(" // unknown tag: " + tag.tagName); } } else { switch (tag) { case CONSTANT_FIELD, CONSTANT_METHOD, CONSTANT_INTERFACEMETHOD -> printPadRight(format("#%d.#%d;", value, value2), commentPadding).println(" // " + stringVal()); case CONSTANT_METHODHANDLE -> printPadRight(format("%d:#%d;", value, value2), commentPadding).println(" // " + stringVal()); case CONSTANT_NAMEANDTYPE -> printPadRight(format("#%d:#%d;", value, value2), commentPadding).println(" // " + stringVal()); case CONSTANT_DYNAMIC, CONSTANT_INVOKEDYNAMIC -> printPadRight(format("%d:#%d;", value, value2), commentPadding).println(" // #%d:%s", value, StringValue(value2)); default -> printPadRight(format("%d:#%d;", value, value2), commentPadding).println(" // unknown tag: " + tag.tagName); } } } public boolean refersClassMember() { return tag == TAG.CONSTANT_FIELD || tag == TAG.CONSTANT_METHOD || tag == TAG.CONSTANT_INTERFACEMETHOD; } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/Container.java000066400000000000000000000120201514323636100257730ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.jasm.TableFormatModel; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.Spliterator; import java.util.function.Consumer; public class Container> extends Indenter implements Iterable, Measurable { protected final ArrayList elements; protected M owner; public Container(M owner, Class elementClass, int initialCapacity) { this.owner = owner; this.elements = new ArrayList<>(initialCapacity); this.tableToken = TableFormatModel.Token.getBy(elementClass); } protected final boolean isCollectionMeasurable() { return (!this.elements.isEmpty() && elements.get(0) instanceof Measurable); } @Override public void print() throws IOException { int size = this.size(); if (size > 0) { boolean isExtendedPrintingSupported = tableToken.isExtendedPrintingSupported(); setMaxPrintSize(getPrintSize()); for (int i = 0; i < size; i++) { T element = elements.get(i); if (element instanceof Measurable measurable) { measurable.setMaxPrintSize(this.getMaxPrintSize()); } element.setCommentOffset(this.getCommentOffset()); if (isExtendedPrintingSupported && isTableOutput()) element.tablePrint(i, size); else element.jasmPrint(i, size); } } } public void add(T element) throws IOException { if (element instanceof MemberData md) { ((MemberData) md).setOwner(this.owner); } elements.add(element); } public int size() { return elements.size(); } public T get(int index) { return elements.get(index); } @Override public boolean isPrintable() { return !elements.isEmpty() && elements.stream().anyMatch(Printable::isPrintable); } /** * Calculates max print size of elements in a collection if they are measurable * In the case of s collection the print size is equal to max print size * * @return maxSize or 0 */ @Override public int getPrintSize() { if (!maxSizeCalculated && isCollectionMeasurable()) { this.maxSize = isCollectionMeasurable() ? elements.stream().map(e -> (Measurable) e). mapToInt(Measurable::getPrintSize).max().orElse(0) : 0; maxSizeCalculated = true; } return this.maxSize; } /** * Sets max print size to all elements of the collection */ @Override public void setMaxPrintSize(int maxSize) { if (maxSize > 0 && isCollectionMeasurable()) { elements.stream().map(e -> (Measurable) e).peek(e -> e.setMaxPrintSize(maxSize)); } } /** * Calculates max print size of elements in a collection if they are measurable * In the case of s collection the print size is equal to max print size * * @return maxSize or 0 */ @Override public int getMaxPrintSize() { return getPrintSize(); } /** * Set up print-ability of cartage * * @param value print-ability * @return the instance */ public Container setPrintable(boolean value) { printable = value; return this; } /** * Set up measure-ability of cartage * * @param value can be measured * @return the instance */ public Container setHasSize(boolean value) { hasSize = true; return this; } @Override public Iterator iterator() { return elements.iterator(); } @Override public void forEach(Consumer action) { elements.forEach(action); } @Override public Spliterator spliterator() { return elements.spliterator(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/Element.java000066400000000000000000000030231514323636100254450ustar00rootroot00000000000000/* * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; /** * The element of the class Container that belongs to the owner M */ public class Element> extends Indenter { protected M owner; protected Container container; public Element(M owner, Container container) { super(owner.toolOutput); this.owner = owner; this.container = container; } @Override public int getCommentOffset() { return container.getCommentOffset(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/EnclosingMethodData.java000066400000000000000000000045331514323636100277370ustar00rootroot00000000000000/* * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.ENCLOSING_METHOD; /** * The EnclosingMethod attribute since 45.3 *

* EnclosingMethod_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 class_index; * u2 method_index; that is equal to CONSTANT_NameAndType_info_index; * } */ public class EnclosingMethodData extends AttributeData { public EnclosingMethodData(ClassData classData) { super(classData, ENCLOSING_METHOD); } public String calculateName() { if (this.name == null) { if (printCPIndex) { this.name = (pool.getClassName(cpx, index -> logger.getResourceString("info.invalid_cp_entry"))); } else { this.name = "\"". concat(pool.getClassName(cpx, index -> "%s #%d". formatted(logger.getResourceString("info.invalid_cp_entry"), index))). concat("\""); } if (this.methodCpx != 0) { this.name += ":" + pool.getMethodName(this.methodCpx); } } return this.name; } public EnclosingMethodData getName() { name = pool.getString(cpx, index -> "#%d".formatted(index)); return this; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/ExceptionData.java000066400000000000000000000021421514323636100266050ustar00rootroot00000000000000package org.openjdk.asmtools.jdis; import java.io.DataInputStream; import java.io.IOException; import static org.openjdk.asmtools.jasm.JasmTokens.Token.THROWS; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.EXCEPTIONS; /** * Exceptions_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_exceptions; * u2 exception_index_table[number_of_exceptions]; * } */ public class ExceptionData extends ClassArrayData { private int keywordPadding = -1; public ExceptionData(ClassData classData) { super(classData, THROWS); tableToken = EXCEPTIONS; } public ExceptionData read(DataInputStream in, int attribute_length) throws IOException, ClassFormatError { return (ExceptionData) super.read(in, attribute_length); } public ExceptionData setKeywordPadding(int keywordPadding) { this.keywordPadding = keywordPadding; return this; } @Override protected int getPrintAttributeKeyPadding() { return keywordPadding == -1 ? super.getPrintAttributeKeyPadding() : keywordPadding; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/FieldData.java000066400000000000000000000231111514323636100256710ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.FormatError; import org.openjdk.asmtools.common.structure.ClassFileContext; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.common.structure.ELocation; import org.openjdk.asmtools.common.structure.EModifier; import org.openjdk.asmtools.jasm.JasmTokens; import java.io.DataInputStream; import java.io.IOException; import java.util.List; import static java.lang.Math.max; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.SIGNATURE; import static org.openjdk.asmtools.jdis.ConstantPool.TAG.*; /** * Field data for field members in a class of the Java Disassembler */ public class FieldData extends MemberData implements Measurable { // CP index to the field name protected int name_cpx; // CP index to the field type protected int type_cpx; // CP index to the field value protected int value_cpx = UNDEFINED; public FieldData(ClassData classData) { super(classData); memberType = "FieldData"; } @Override protected boolean handleAttributes(DataInputStream in, EAttribute attributeTag, int attributeLength) throws IOException { // Read the Attributes boolean handled = true; switch (attributeTag) { case ATT_Signature -> { if (signature != null) { environment.warning("warn.one.attribute.required", EAttribute.ATT_Signature.printValue(), ELocation.field_info.toString()); } signature = new SignatureData(data).read(in, attributeLength); } case ATT_ConstantValue -> { if (attributeLength != 2) { if (bestEffort) { environment.error("err.invalid.attribute.length", EAttribute.ATT_ConstantValue.printValue(), attributeLength); } else { throw new FormatError(environment.getLogger(), "err.invalid.attribute.length", EAttribute.ATT_ConstantValue.printValue(), attributeLength); } } if (getListOf(EAttribute.ATT_ConstantValue).size() > 1) { environment.warning("warn.one.attribute.required", EAttribute.ATT_ConstantValue.printValue(), ELocation.field_info.toString()); } value_cpx = in.readUnsignedShort(); if (!pool.inRange(value_cpx)) { environment.warning("warn.attribute.constantvalue.incorrect", value_cpx); } else { if (!pool.CheckEntryType(value_cpx, CONSTANT_INTEGER, CONSTANT_FLOAT, CONSTANT_DOUBLE, CONSTANT_LONG, CONSTANT_STRING)) { ConstantPool.TAG tag = pool.getTag(value_cpx); String tagName = tag == null ? "unknown" : tag.printValue(); environment.warning("warn.attribute.type.incorrect", tagName); } } } default -> handled = false; } return handled; } @Override protected boolean handleUnrecognizedAttributes(DataInputStream in, int attributeNameCpx, int attributeLength) throws IOException { if (!data.pool.inRange(attributeNameCpx)) { environment.warning("warn.attribute.name.corrupted", attributeNameCpx); } else { environment.warning("warn.attribute.name.incorrect", attributeNameCpx); } return false; } /** * Read and resolve the field data called from ClassData. * Precondition: NumFields has already been read from the stream. */ public void read(DataInputStream in) throws IOException { // read the Fields CP indexes access = in.readUnsignedShort(); name_cpx = in.readUnsignedShort(); type_cpx = in.readUnsignedShort(); // Read the attributes readAttributes(in); // environment.traceln(() -> "FieldData: name[%d]=%s type[%d]=%s%s".formatted( name_cpx, data.pool.getString(name_cpx, index -> "#%d?".formatted(index)), type_cpx, data.pool.getString(type_cpx, index -> "#%d?".formatted(index)), signature != null ? signature : "")); } /** * Prints the field data to the current output stream called from ClassData. */ @Override protected void jasmPrint(int index, int size) throws IOException { boolean printSignature = signature != null && signature.isPrintable() && tableFormat; // Print annotations first super.printAnnotations(visibleAnnotations, invisibleAnnotations); super.printAnnotations(visibleTypeAnnotations, invisibleTypeAnnotations); if (getListOf(EAttribute.ATT_Unrecognized).size() > 0) { List list = getListOf(EAttribute.ATT_Unrecognized); for (AttrData attr : list) { printIndentLn("// Ignored unrecognized attribute: { u2 #%d; u4 %d; u1[ %s ]; }". formatted(attr.getNameCpx(), attr.getLength(), attr.dataAsString())); } } if (!printCPIndex && value_cpx != UNDEFINED && !pool.CheckEntryType(value_cpx, CONSTANT_INTEGER, CONSTANT_FLOAT, CONSTANT_DOUBLE, CONSTANT_LONG, CONSTANT_STRING)) { ConstantPool.TAG tag = pool.getTag(value_cpx); String tagName = tag == null ? "unknown" : tag.printValue(); printIndentLn("// ".concat(environment.getInfo("warn.attribute.constantvalue.unrecognized",value_cpx, tagName))); } // print field StringBuilder prefix = new StringBuilder(getIndentString()). append(EModifier.asKeywords(access, ClassFileContext.FIELD)); // add synthetic, deprecated if necessary prefix.append(getPseudoFlagsAsString()); // field prefix.append(JasmTokens.Token.FIELDREF.parseKey()).append(' '); int keywordPadding = max(prefix.length() - getIndentSize() * 2, SIGNATURE.parseKey().length() + getIndentSize()); printVar(prefix, (value_cpx != UNDEFINED) ? getConstantValue(" = ") : null, printSignature ? ":" : ";", name_cpx, type_cpx, value_cpx); // print Signature if necessary if (printSignature) { signature.setKeywordPadding(keywordPadding). incIndent(). setCommentOffset(this.getCommentOffset() - getIndentStep() * 2); signature.print(); } } private String getConstantValue(String prefix) { if (!printCPIndex && value_cpx != UNDEFINED && !pool.CheckEntryType(value_cpx, CONSTANT_INTEGER, CONSTANT_FLOAT, CONSTANT_DOUBLE, CONSTANT_LONG, CONSTANT_STRING)) { return ""; } else { return prefix.concat(data.pool.ConstantStrValue(value_cpx)); } } /** * Prints the field data to the current output stream called from ClassData. */ @Override protected void tablePrint(int index, int size) throws IOException { //There are no differences between the simple (jasm) and extended (table) presentations of field info. this.jasmPrint(index, size); } private String getFieldDefinitionString() { if (printCPIndex && !skipComments) { StringBuilder sb = new StringBuilder(EModifier.asKeywords(access, ClassFileContext.FIELD)); // add synthetic, deprecated if necessary sb.append(getPseudoFlagsAsString()); // field sb.append(JasmTokens.Token.FIELDREF.parseKey()).append(' '); sb.append('#').append(name_cpx).append(":#").append(type_cpx); if (signature != null && !signature.isPrintable()) { sb.append(":#").append(signature.getCPIndex()); } if (value_cpx != UNDEFINED) { sb.append(" = #").append(value_cpx); } sb.append(';'); return sb.toString(); } return ""; } @Override public int getCommentOffset() { return Math.max(super.getCommentOffset(), this.maxSize + getIndentSize()); } @Override public int getPrintSize() { String line = getFieldDefinitionString(); return line.length(); } @Override public void setMaxPrintSize(int size) { this.maxSize = size; } @Override public int getMaxPrintSize() { return this.maxSize; } } // end FieldData jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/Indenter.java000066400000000000000000000453021514323636100256320ustar00rootroot00000000000000/* * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.jasm.TableFormatModel; import java.io.IOException; import java.util.*; import static java.lang.System.lineSeparator; import static org.openjdk.asmtools.jdis.Options.PrintOption.*; public abstract class Indenter implements Printable { public static final int UNDEFINED = -1; public static final int INDENT_STEP = 2; public static final int INDENT_OFFSET = 2; public static final String INDENT_CHAR = " "; public static final String INDENT_STRING = INDENT_CHAR.repeat(INDENT_STEP); // Global formatting strings public static final String ARGUMENT_DELIMITER = "^"; public static final String LINE_SPLITTER = "â¾€"; public static final String NO_BSM_ARGUMENTS = "{}"; public static final String NO_BSM_ARGUMENTS_REGEX = "\\{\\}"; public static final String REPLACEMENT_NO_BSM_ARGUMENTS = ""; // Global numbers public static final int PROGRAM_COUNTER_PLACEHOLDER_LENGTH = 7; public static final int INSTR_PREFIX_LENGTH = 7; public static final int STACKMAP_TYPE_PLACEHOLDER_LENGTH = 18; public static final int OPERAND_PLACEHOLDER_LENGTH = 17; public static int TABLE_PADDING = OPERAND_PLACEHOLDER_LENGTH + INSTR_PREFIX_LENGTH + 1; public static final int COMMENT_PADDING = (Options.contains(TABLE)) ? 16 : 20; public static final int INITIAL_COMMENT_OFFSET = 0; // Initial offset that will be dynamically updated public static final int CIRCULAR_COMMENT_OFFSET = 25; protected final boolean tableFormat = Options.contains(TABLE); protected final boolean sysInfo = Options.contains(SYSINFO); protected final boolean detailedOutput = Options.contains(DETAILED_Output); protected final boolean extraDetailedOutput = Options.contains(EXTRA_DETAILED_Output); protected final boolean bestEffort = Options.contains(BEST_EFFORT); // Discard printing attributes protected final boolean dropSourceFile = Options.contains(DROP_Source); protected final boolean dropClasses = Options.contains(DROP_Classes); protected final boolean dropSignatures = Options.contains(DROP_Signatures); protected final boolean dropCharacterRange = Options.contains(DROP_CharacterRange); // Extra printing instruction protected final boolean printLocalVariables = Options.contains(LOCAL_VARIABLE_All, LOCAL_VARIABLE_Vars); protected final boolean printLocalVariableTypes = Options.contains(LOCAL_VARIABLE_All, LOCAL_VARIABLE_Types); protected final boolean printLineNumber = Options.contains(LINE_NUMBER_TABLE_Numbers, LINE_NUMBER_TABLE_Lines, LINE_NUMBER_TABLE_Table, TABLE); // internal references protected final boolean printCPIndex = Options.contains(CP_INDEX); protected final boolean skipComments = Options.contains(NO_COMMENTS); protected final boolean printProgramCounter = Options.contains(PRINT_BCI); protected final boolean printLabelAsIdentifiers = Options.contains(LABELS) && !printProgramCounter; protected final boolean printConstantPool = Options.contains(CONSTANT_POOL); protected final boolean printSourceLines = Options.contains(LINE_NUMBER_TABLE_Lines); protected final boolean printLineTable = Options.contains(LINE_NUMBER_TABLE_Table); protected final boolean printLineTableLines = Options.contains(LINE_NUMBER_TABLE_Lines); protected final boolean printLineTableNumbers = Options.contains(LINE_NUMBER_TABLE_Numbers); protected final boolean printHEX = Options.contains(HEX); // protected boolean printable = true; // indicated that an entity has a size in a collection protected boolean hasSize = false; protected TableFormatModel.Token tableToken = TableFormatModel.Token.NOT_SUPPORTED; // // the maximum size of the same elements in the collection to calculate printing bounds // applies only to entities that implement Measurable interface. protected int maxSize = 0; protected boolean maxSizeCalculated = false; // protected ToolOutput toolOutput; // private final String LabelPrefix = printLabelAsIdentifiers ? "L" : ""; // protected int commentOffset = INITIAL_COMMENT_OFFSET; private int length, offset, step; private String fillString; /** * If a table format is supported and the tool option TABLE is set, prints an object as a table entry. */ public void print() throws IOException { if (isTableOutput()) { tablePrint(); } else { jasmPrint(); } } public boolean isTableOutput() { return this.tableFormatSupported() && tableFormat; } @Override public boolean tableFormatSupported() { return tableToken.isExtendedPrintingSupported(); } protected String getTitle() { throw new NotImplementedException(this.getClass().getName()); } protected void tablePrint() throws IOException { throw new NotImplementedException(this.getClass().getName()); } protected void jasmPrint() throws IOException { throw new NotImplementedException(this.getClass().getName()); } protected void tablePrint(int index, int size) throws IOException { throw new NotImplementedException(this.getClass().getName()); } protected void jasmPrint(int index, int size) throws IOException { throw new NotImplementedException(this.getClass().getName()); } public void print(int index, int size) throws IOException { if (isTableOutput()) { tablePrint(index, size); } else { jasmPrint(index, size); } } public Indenter(ToolOutput toolOutput) { this(); this.toolOutput = toolOutput; } protected Indenter() { this.length = 0; this.step = INDENT_STEP; this.offset = INDENT_OFFSET; this.fillString = INDENT_CHAR; } protected String getLabelPrefix() { return LabelPrefix; } public Indenter printIndentLn(String s) { toolOutput.printlns(Indent(s)); return this; } public Indenter printIndentLn() { toolOutput.printlns(""); return this; } public int getIndentStep() { return this.step; } public Indenter printIndentLn(String format, Object... args) { toolOutput.printlns(Indent(new Formatter().format(format, args).toString())); return this; } public Indenter printIndent(String format, Object... args) { toolOutput.prints(Indent(new Formatter().format(format, args).toString())); return this; } public Indenter printIndent(String s) { String str = Indent(s); toolOutput.prints(str); return this; } public Indenter printIndent() { toolOutput.prints(getIndentString()); return this; } public Indenter printPadRight(String s, int totalWidth) { toolOutput.prints(PadRight(s, totalWidth)); return this; } public Indenter printPadLeft(String s, int totalWidth) { toolOutput.prints(PadLeft(s, totalWidth)); return this; } public Indenter printIndentPadRight(String str, int totalWidth) { toolOutput.prints(IndentPadRight(str, totalWidth)); return this; } public Indenter printIndentPadLeft(String str, int totalWidth) { toolOutput.prints(IndentPadLeft(str, totalWidth)); return this; } public Indenter print(String s) { toolOutput.prints(s); return this; } public Indenter print(String format, Object... args) { toolOutput.prints(new Formatter().format(format, args).toString()); return this; } public Indenter println(String s) { toolOutput.printlns(s); return this; } public Indenter println() { toolOutput.printlns(""); return this; } public Indenter println(boolean isPrint) { if (isPrint) { toolOutput.printlns(""); } return this; } public Indenter println(String format, Object... args) { toolOutput.printlns(new Formatter().format(format, args).toString()); return this; } public Indenter incIndent() { return incIndent(1); } public Indenter decIndent() { return decIndent(1); } public Indenter incIndent(int count) { length += step * count; return this; } public Indenter decIndent(int count) { length -= step * count; if (length < 0) { length = 0; } return this; } public Indenter setTheSame(Indenter that) { this.length = that.length; this.offset = that.offset; this.step = that.step; this.commentOffset = that.commentOffset; this.fillString = that.fillString; return this; } public Indenter initIndent(int initialOffset) { this.length = 0; this.step = INDENT_STEP; this.offset = initialOffset; this.fillString = INDENT_CHAR; return this; } public int getIndentSize() { return this.offset + this.length; } public String nCopies(int n) { // create a string made up of n copies of string fillString return String.join("", Collections.nCopies(n < 0 ? 0 : n, this.fillString)); } /** * Creates indent string based on current indent size. */ public String getIndentString() { return this.nCopies(this.getIndentSize()); } /** * Formats input string by adding indent string and padding spaces from the left. * "[indent][PaddingSpaces][string]" * -----totalWidth------- */ public String IndentPadLeft(String str, int totalWidth) { return this.getIndentString() + PadLeft(str, totalWidth); } /** * Formats input string by adding indent string and padding spaces from the left. * "[indent][string][PaddingSpaces]" * -----totalWidth------- */ public String IndentPadRight(String str, int totalWidth) { return this.getIndentString() + PadRight(str, totalWidth); } /** * Formats input string by adding indent string and padding spaces from the left. * "[PaddingSpaces][string]" * -----totalWidth------- */ public String PadLeft(String str, int totalWidth) { if (totalWidth > 0) { int count = totalWidth - str.length(); if (count > 0) { str = nCopies(count) + str; } } return str; } public String PadRight(String str, int totalWidth) { if (totalWidth > 0) { int count = totalWidth - str.length(); if (count > 0) { str = str + nCopies(count); } } return str; } public String padRight(String value, int width, char pad) { if (value.length() >= width) return value; char[] buf = new char[width]; Arrays.fill(buf, value.length(), width, pad); value.getChars(0, value.length(), buf, 0); return new String(buf); } public String padLeft(String value, int width, char pad) { if (value.length() >= width) return value; char[] buf = new char[width]; int padLen = width - value.length(); Arrays.fill(buf, 0, padLen, pad); value.getChars(0, value.length(), buf, padLen); return new String(buf); } public String Indent(String str) { return this.getIndentString() + str; } public String enlargedIndent(String str, int shift) { this.offset += shift; str = Indent(str); this.offset -= shift; return str; } public String enlargedIndent(int shift) { return enlargedIndent("", shift); } /** * @return the common offset of comments for printing methods */ public int getCommentOffset() { return commentOffset; } public Indenter setCommentOffset(int commentOffset) { this.commentOffset = commentOffset; return this; } /** * @return the common offset of the indent */ public int getOffset() { return offset; } public Indenter setOffset(int offset) { this.offset = offset; return this; } /** * Calculates offsets for Class's attributes: *

* 12AAAAAAAAAAAAAAAAAAAAAAAAAAACCCCCCCCCCCCCCCCC * SourceFile #126; // TestMethods0.java * 12 - Indent * AAA.A - getPrintAttributeKeyPadding() * CCC.C - getPrintAttributeCommentPadding() * * @return */ protected int getPrintAttributeKeyPadding() { int instructionOffset = (printProgramCounter) ? PROGRAM_COUNTER_PLACEHOLDER_LENGTH : INSTR_PREFIX_LENGTH; int attributeOffset = (printProgramCounter) ? instructionOffset : (instructionOffset - getIndentStep()); return instructionOffset + attributeOffset + OPERAND_PLACEHOLDER_LENGTH - getIndentSize() * 2; } protected int getPrintAttributeCommentPadding() { return getCommentOffset() - getPrintAttributeKeyPadding(); } public Indenter setHasSize(boolean hasSize) { this.hasSize = hasSize; return this; } protected final static Map> InvokeDynamicBreakPositions = Map.of( 0, List.of(2, 3), 1, List.of(3), 2, List.of(3)); protected final static Map> LdwBreakPositions = Map.of( 0, List.of(3), 1, List.of(3), 2, List.of(3)); protected final static Map> BootstrapMethodBreakPositions = Map.of(0, List.of(2, 3)); protected final static Map> BootstrapArgumentsBreakPositions = Map.of(0, List.of(3)); /** * Formats invokedynamic/ldc dynamic operand line and Bootstrap arguments * * @param str non-formatted operand line * @param offset indent for new lines * @param prefix prefix placed upfront new lines * @param breakPositions numbers where after ":" a lineSeparator is added to wrap a very long operand lines * @return formatted operand line */ protected String formatOperandLine(String str, int offset, String prefix, Map> breakPositions) { boolean noArgs = str.contains(NO_BSM_ARGUMENTS); if (noArgs) { str = str.replaceAll(NO_BSM_ARGUMENTS_REGEX, REPLACEMENT_NO_BSM_ARGUMENTS); } StringTokenizer st = new StringTokenizer(str, ":\"{}\\" + ARGUMENT_DELIMITER + LINE_SPLITTER, true); StringBuilder sb = new StringBuilder(80); boolean processTokens = true; String prevToken = ""; int nItems = 0, nLevel = 0; while (st.hasMoreTokens()) { String token = st.nextToken(); List breaks = breakPositions.getOrDefault(nLevel, Collections.emptyList()); switch (token) { case ":": sb.append(token); if (processTokens) { nItems++; if (breaks.contains(nItems)) { sb.append(lineSeparator()).append(nCopies(offset)).append(prefix). append(nCopies(getIndentStep() * nLevel)); } } break; case "}": if (processTokens) { nLevel = (nLevel == 0) ? nLevel : nLevel - 1; nItems = 0; sb.append(lineSeparator()).append(nCopies(offset)). append(prefix).append(nCopies(getIndentStep() * nLevel)).append(token); } else sb.append(token); break; case "{": if (processTokens) { nLevel++; nItems = 0; sb.append(" {").append(lineSeparator()).append(nCopies(offset)). append(prefix).append(nCopies(getIndentStep() * nLevel)); } else { sb.append(token); } break; case "\"": if (!prevToken.equals("\\")) processTokens = !processTokens; sb.append(token); break; case ARGUMENT_DELIMITER: if (processTokens) { sb.append(',').append(lineSeparator()).append(nCopies(offset)). append(prefix).append(nCopies(getIndentStep() * nLevel)); nItems = 0; } else { sb.append(ARGUMENT_DELIMITER); } break; case LINE_SPLITTER: if (processTokens) { sb.append(lineSeparator()).append(nCopies(offset)). append(prefix).append(nCopies(getIndentStep() * nLevel)); } else { sb.append(ARGUMENT_DELIMITER); } break; default: sb.append(token); break; } prevToken = token; } str = sb.toString(); if (noArgs) { str = str.replaceAll(REPLACEMENT_NO_BSM_ARGUMENTS, NO_BSM_ARGUMENTS); } return str; } public static class NotImplementedException extends RuntimeException { private static final long serialVersionUID = 1L; public NotImplementedException(String where) { super("".formatted(where)); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/InnerClassData.java000066400000000000000000000137761514323636100267270ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.structure.ClassFileContext; import org.openjdk.asmtools.common.structure.EModifier; import java.io.DataInputStream; import java.io.IOException; import static java.lang.Math.max; import static java.lang.String.format; import static org.openjdk.asmtools.jasm.JasmTokens.Token.INNERCLASS; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.INNER_CLASSES; /** * 4.7.6. The InnerClasses Attribute */ public class InnerClassData extends Element implements Measurable { int inner_class_info_index; int outer_class_info_index; int inner_name_index; int access; private int calculatedCommentOffset = 0; private String jasmPrefix = Indent(PadRight(INNERCLASS.parseKey(), TABLE_PADDING)); public InnerClassData(ClassData classData, Container container) { super(classData, container); this.tableToken = INNER_CLASSES; } @Override public int getCommentOffset() { if (this.calculatedCommentOffset == 0) { if (isTableOutput()) { this.calculatedCommentOffset = container.getCommentOffset() - getIndentStep(); this.calculatedCommentOffset = max(this.calculatedCommentOffset, getMaxPrintSize()); } else { this.calculatedCommentOffset = container.getCommentOffset() - getIndentStep(); calculatedCommentOffset = max(this.calculatedCommentOffset, getMaxPrintSize() + jasmPrefix.length()); } } return calculatedCommentOffset; } public void read(DataInputStream in) throws IOException { inner_class_info_index = in.readUnsignedShort(); outer_class_info_index = in.readUnsignedShort(); inner_name_index = in.readUnsignedShort(); access = in.readUnsignedShort(); } // end read @Override public void jasmPrint(int index, int size) throws IOException { String line = jasmPrefix.concat(EModifier.asKeywords(access, ClassFileContext.INNER_CLASS)); if (printCPIndex) { line = getClassDefinitionString(line); if (skipComments) { print(line); } else { print(PadRight(line, this.getCommentOffset())).print(" // "); } } else { print(line); } if (!printCPIndex || (printCPIndex && !skipComments)) { if (inner_name_index != 0) print(owner.pool.getName(inner_name_index) + " = "); if (inner_class_info_index != 0) print(owner.pool.ConstantStrValue(inner_class_info_index)); if (outer_class_info_index != 0) print(format(" of %s", owner.pool.ConstantStrValue(outer_class_info_index))); println(owner.printCPIndex && !skipComments ? "" : ";"); } else { println(); } } @Override public void tablePrint(int index, int size) throws IOException { if (index == 0) { printIndentLn("%s {".formatted(INNERCLASS.alias())); } incIndent(); String prefix = EModifier.asKeywords(access, ClassFileContext.INNER_CLASS); if (printCPIndex) { prefix = getClassDefinitionString(prefix); if (skipComments) { printIndent(prefix); } else { printIndentPadRight(prefix, this.getCommentOffset()).print(" // "); } } else { printIndent(prefix); } if (!printCPIndex || (printCPIndex && !skipComments)) { if (inner_name_index != 0) print("%s = ".formatted(owner.pool.getName(inner_name_index))); if (inner_class_info_index != 0) print(owner.pool.ConstantStrValue(inner_class_info_index)); if (outer_class_info_index != 0) print(format(" of %s", owner.pool.ConstantStrValue(outer_class_info_index))); println(owner.printCPIndex && !skipComments ? "" : ";"); } else { println(); } decIndent(); if (index == size - 1) { printIndentLn("}"); } } private String getClassDefinitionString(String line) { if (inner_name_index != 0) line = line.concat("#%d = ".formatted(inner_name_index)); if (inner_class_info_index != 0) line = line.concat("#%d".formatted(inner_class_info_index)); if (outer_class_info_index != 0) { line = line.concat(" of #%d".formatted(outer_class_info_index)); } return line.concat(";"); } @Override public int getPrintSize() { String line = getClassDefinitionString(EModifier.asKeywords(access, ClassFileContext.INNER_CLASS)); return line.length() + 1; } @Override public void setMaxPrintSize(int size) { this.maxSize = size; } @Override public int getMaxPrintSize() { return this.maxSize; } } // end InnerClassData jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/InstructionAttr.java000066400000000000000000000406161514323636100272410ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.asmutils.Pair; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import static java.lang.Math.max; import static java.lang.String.format; import static org.openjdk.asmtools.jasm.JasmTokens.Token.FRAMETYPE; import static org.openjdk.asmtools.jasm.OpcodeTables.Opcode; /** * instruction attributes */ class InstructionAttr extends MemberData { short lineNum = 0; boolean referred = false; // from some other instruction ArrayList vars; ArrayList types; ArrayList endVars; ArrayList endTypes; ArrayList handlers; ArrayList traps; ArrayList endTraps; List stackMapWrappers; StackMapData stackMapEntry; ClassData classData; private int attributeOffset; public InstructionAttr(MethodData methodData) { super(methodData); this.classData = methodData.data; } void addTrap(TrapData trap) { if (traps == null) { traps = new ArrayList<>(4); } traps.add(trap); } void addEndTrap(TrapData endTrap) { if (endTraps == null) { endTraps = new ArrayList<>(4); } endTraps.add(endTrap); } void add_handler(TrapData endHandler) { if (handlers == null) { handlers = new ArrayList<>(4); } handlers.add(endHandler); } public void printBegins(int shift) { this.attributeOffset = shift; // Prints additional information for instruction: // source line number; printInlinedLineNumber(); // begin of exception handler; printBeginOfExceptionHandlers(shift); // begin of trap scores; printBeginOfTrapScores(shift); // begin of locVar and locVarTypes printBeginOfLocVars(shift); } public void printEnds(int shift) { // Prints additional information for instruction: // end of local variables, local variable types and trap scopes; if (endTypes != null && !tableFormat) { print(enlargedIndent(PadRight(Opcode.opc_endtype.parseKey(), STACKMAP_TYPE_PLACEHOLDER_LENGTH), shift)); println(endTypes.stream().map(ev -> Short.toString(ev.slot)).collect(Collectors.joining(",")) + ";"); } if (endVars != null && !tableFormat) { print(enlargedIndent(PadRight(Opcode.opc_endvar.parseKey(), STACKMAP_TYPE_PLACEHOLDER_LENGTH), shift)); println(endVars.stream().map(ev -> Short.toString(ev.slot)).collect(Collectors.joining(",")) + ";"); } if (endTraps != null) { print(enlargedIndent(PadRight(Opcode.opc_endtry.parseKey(), STACKMAP_TYPE_PLACEHOLDER_LENGTH), shift)); println(endTraps.stream().map(TrapData::id).collect(Collectors.joining(",")) + ";"); } } /** * @param shift how is shifted a list of verification types of locals_map/stack_map * @return true if something is printed */ public boolean printStackMap_Table(int shift) { // will the stackmap(table) be printed as table if the table is chosen? if (tableFormat || (stackMapEntry == null && stackMapWrappers == null)) { return false; } else if (stackMapEntry != null) { return stackMapEntry.belongsToStackMapTable() ? printStackMapTable(shift) : printStackMap(shift); } else { return stackMapWrappers.get(0).belongsToStackMapTable() ? printStackMapTable(shift) : printStackMap(shift); } } private boolean printStackMapTable(int shift) { int mapShift = getCommentOffset() - STACKMAP_TYPE_PLACEHOLDER_LENGTH; boolean wrapped = stackMapWrappers != null; String opCodeName = Opcode.opc_stack_frame_type.parseKey(); String prefix = ""; String listPrefix = INDENT_STRING; // print wrappers if found if (wrapped) { for (int i = 0; i < stackMapWrappers.size(); i++) { StackMapData smd = stackMapWrappers.get(i); if (i > 0) { opCodeName = Opcode.opc_frame_type.parseKey(); prefix = INDENT_STRING; listPrefix = prefix + INDENT_STRING; } printPadRight(prefix + opCodeName, STACKMAP_TYPE_PLACEHOLDER_LENGTH); if (printCPIndex && !skipComments) { print(PadRight(smd.stackEntryType.tagName() + ";", mapShift)). println(" // %s %s".formatted(FRAMETYPE.parseKey(), smd.stackEntryTypeValue)); } else { println(smd.stackEntryType.tagName() + ";"); } int[] unsetFields = smd.unsetFields; printFields(unsetFields, shift); if ((unsetFields == null) || (unsetFields.length == 0)) { println(this.enlargedIndent(listPrefix + Opcode.opc_unset_fields.parseKey() + ";", shift)); } print(enlargedIndent(attributeOffset)); } } opCodeName = Opcode.opc_stack_frame_type.parseKey(); // print StackMap entry if (stackMapEntry != null) { if (wrapped) { opCodeName = Opcode.opc_frame_type.parseKey(); prefix += INDENT_STRING; // println("{").print(enlargedIndent(attributeOffset)); } listPrefix = prefix + INDENT_STRING; printPadRight(prefix + opCodeName, STACKMAP_TYPE_PLACEHOLDER_LENGTH); if (printCPIndex && !skipComments) { print(PadRight(stackMapEntry.stackEntryType.tagName() + ";", mapShift)). println(" // %s %s".formatted(FRAMETYPE.parseKey(), stackMapEntry.stackEntryTypeValue)); } else { println(stackMapEntry.stackEntryType.tagName() + ";"); } int[] lockMap = stackMapEntry.lockMap; if ((lockMap == null) || (lockMap.length == 0)) { if (stackMapEntry.stackEntryType.hasLocalMap()) { println(this.enlargedIndent(listPrefix + Opcode.opc_locals_map.parseKey() + ";", shift)); } } else { mapShift = printEntries(stackMapEntry.getMapListAsString(lockMap, ""), listPrefix + Opcode.opc_locals_map.parseKey(), shift, mapShift); } int[] stackMap = stackMapEntry.stackMap; if ((stackMap == null) || (stackMap.length == 0)) { if (stackMapEntry.stackEntryType.hasStackMap()) { println(this.enlargedIndent(listPrefix + Opcode.opc_stack_map.parseKey() + ";", shift)); } } else { printEntries(stackMapEntry.getMapListAsString(stackMap, ""), listPrefix + Opcode.opc_stack_map.parseKey(), shift, mapShift); } // if (wrapped) { // println(enlargedIndent(attributeOffset) + "}"); // } } return stackMapWrappers != null || stackMapEntry != null; } private boolean printStackMap(int shift) { int mapShift = getCommentOffset() - STACKMAP_TYPE_PLACEHOLDER_LENGTH; printPadRight(Opcode.opc_stack_map_frame.parseKey() + ";", STACKMAP_TYPE_PLACEHOLDER_LENGTH); if (printCPIndex && !skipComments) { print(PadRight(" ", mapShift)).println(" // offset " + stackMapEntry.frame_pc); } else { println(); } mapShift = printEntries(stackMapEntry.getMapListAsString(stackMapEntry.lockMap, ""), Opcode.opc_locals_map.parseKey(), shift, mapShift); printEntries(stackMapEntry.getMapListAsString(stackMapEntry.stackMap, ""), Opcode.opc_stack_map.parseKey(), shift, mapShift); return true; } private void printFields(int[] unsetFields, int shift) { int mapShift = getCommentOffset() - STACKMAP_TYPE_PLACEHOLDER_LENGTH; if (unsetFields != null && (unsetFields.length > 0)) { final int limit = unsetFields.length - 1; Pair, List> line = stackMapEntry.getFieldListAsString(unsetFields); String left = line.first.stream().collect(Collectors.joining(", ")).concat(";"); String right = line.second.stream().collect(Collectors.joining(", ")).concat(";"); String title = enlargedIndent(PadRight(INDENT_STRING + Opcode.opc_unset_fields.parseKey(), STACKMAP_TYPE_PLACEHOLDER_LENGTH), shift); print(title); // empties the title to use it as indent. title = nCopies(title.length()); if (printCPIndex) { if (skipComments) { println(left); } else { if (limit == 0) { print(PadRight(left, mapShift)).println(" // " + right); } else { print(PadRight(line.first.get(0).concat(","), mapShift)).println(" // " + line.second.get(0).concat(",")); for (int i = 1; i <= limit; i++) { String delim = i == limit ? ";" : ","; String id = line.first.get(i).concat(delim); String field = line.second.get(i).concat(delim); print(title).print(PadRight(id, mapShift)).println(" // " + field); } } } } else { if (limit == 0) { println(right); } else { println(line.second.get(0).concat(",")); for (int i = 1; i <= limit; i++) { String delim = i == limit ? ";" : ","; String field = line.second.get(i).concat(delim); print(title).println(field); } } } } } private int printEntries(Pair entriesLine, String title, int shift, int mapShift) { if (entriesLine != null) { boolean isEmpty = entriesLine.first.isEmpty() && entriesLine.second.isEmpty(); print(this.enlargedIndent(PadRight(title + (isEmpty ? ";" : ""), STACKMAP_TYPE_PLACEHOLDER_LENGTH), shift)); if (printCPIndex) { if (skipComments) { println(entriesLine.first); } else { print(PadRight(entriesLine.first, mapShift)); mapShift = max(mapShift, entriesLine.first.length()); if( !isEmpty ) { print(" // "); } } } if (!printCPIndex || (printCPIndex && !skipComments)) { println(entriesLine.second); } } return mapShift; } void addVar(LocalVariableData var) { if (vars == null) { vars = new ArrayList<>(4); } vars.add(var); } void addType(LocalVariableTypeData type) { if (types == null) { types = new ArrayList<>(4); } types.add(type); } void addEndType(LocalVariableTypeData endType) { if (endTypes == null) { endTypes = new ArrayList<>(4); } endTypes.add(endType); } void addEndVar(LocalVariableData endVar) { if (endVars == null) { endVars = new ArrayList<>(4); } endVars.add(endVar); } private void printInlinedLineNumber() { boolean eitherOpt = data.printLineTableNumbers || data.printLineTableLines; boolean bothOpt = data.printLineTableNumbers && data.printLineTableLines; if (eitherOpt && (lineNum != 0)) { decIndent(); if (bothOpt) { String srcLine = classData.getSrcLine(lineNum); printIndentLn("// " + lineNum + (srcLine != null ? "# " + srcLine : "")); } else if (data.printLineTableNumbers) { printIndentLn("// %d#", lineNum); } else if (data.printLineTableLines) { String srcLine = classData.getSrcLine(lineNum); printIndentLn(srcLine != null ? "// " + srcLine : ""); } incIndent(); } } private void printBeginOfExceptionHandlers(int shift) { if (handlers != null) { for (TrapData line : handlers) { print(this.enlargedIndent(PadRight(Opcode.opc_catch.parseKey(), STACKMAP_TYPE_PLACEHOLDER_LENGTH), shift)); if (printCPIndex) { if (skipComments) { println("%s #%d;", line.id(), line.catch_cpx); } else { print(PadRight(format("%s #%d;", line.id(), line.catch_cpx), getCommentOffset() - STACKMAP_TYPE_PLACEHOLDER_LENGTH)); println(" // " + (line.catch_cpx == 0 ? "any" : data.pool.getClassName(line.catch_cpx))); } } else { println("%s %s;", line.id(), data.pool.getClassName(line.catch_cpx)); } } } } private void printBeginOfTrapScores(int shift) { if (traps != null) { print(this.enlargedIndent(PadRight(Opcode.opc_try.parseKey(), STACKMAP_TYPE_PLACEHOLDER_LENGTH), shift)); println(traps.stream().map(TrapData::id).collect(Collectors.joining(", ")) + ";"); } } private void printBeginOfLocVars(int shift) { if ((vars != null) && !tableFormat) { for (LocalVariableData line : vars) { print(this.enlargedIndent(PadRight(Opcode.opc_var.parseKey(), STACKMAP_TYPE_PLACEHOLDER_LENGTH), shift)); if (printCPIndex) { if (skipComments) { println("%d #%d:#%d;", line.slot, line.name_cpx, line.sig_cpx); } else { print(PadRight(format("%d #%d:#%d;", line.slot, line.name_cpx, line.sig_cpx), getCommentOffset() - STACKMAP_TYPE_PLACEHOLDER_LENGTH)); println(" // %s:%s", data.pool.getName(line.name_cpx), data.pool.getName(line.sig_cpx)); } } else { println("%d %s:%s;", line.slot, data.pool.getName(line.name_cpx), data.pool.getName(line.sig_cpx)); } } } if (types != null && !tableFormat) { for (LocalVariableTypeData type : types) { print(this.enlargedIndent(PadRight(Opcode.opc_type.parseKey(), STACKMAP_TYPE_PLACEHOLDER_LENGTH), shift)); if (printCPIndex) { if (skipComments) { println("%d #%d:#%d;", type.slot, type.name_cpx, type.sig_cpx); } else { print(PadRight(format("%d #%d:#%d;", type.slot, type.name_cpx, type.sig_cpx), getCommentOffset() - STACKMAP_TYPE_PLACEHOLDER_LENGTH)); println(" // %s:%s", data.pool.getName(type.name_cpx), data.pool.getName(type.sig_cpx)); } } else { println("%d %s:%s;", type.slot, data.pool.getName(type.name_cpx), data.pool.getName(type.sig_cpx)); } } } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/JdisEnvironment.java000066400000000000000000000043501514323636100271760ustar00rootroot00000000000000/* * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.DecompilerLogger; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; public class JdisEnvironment extends Environment { /** * @param builder the jdis environment builder */ private JdisEnvironment(Builder builder) { super(builder); } @Override public void printErrorLn(String format, Object... args) { getLogger().printErrorLn(format, args); } @Override public void warning(String format, Object... args) { getLogger().warning(format, args); } static class JdisBuilder extends Environment.Builder { public JdisBuilder(ToolOutput toolOutput, DualStreamToolOutput outerLog) { super(toolOutput, new DecompilerLogger("jdis", JdisEnvironment.class, outerLog)); } @Override public JdisEnvironment build() { return new JdisEnvironment(this); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/JdisTool.java000066400000000000000000000035441514323636100256130ustar00rootroot00000000000000/* * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.Decoder; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.common.outputs.log.StderrLog; import org.openjdk.asmtools.jdis.JdisEnvironment.JdisBuilder; public abstract class JdisTool extends Decoder { protected JdisTool(ToolOutput toolOutput, DualStreamToolOutput outerLog) { super(toolOutput, outerLog); } protected JdisTool(ToolOutput toolOutput) { super(toolOutput, new StderrLog()); } @Override public JdisEnvironment getEnvironment(ToolOutput toolOutput, DualStreamToolOutput outerLog) { JdisBuilder builder = new JdisBuilder(toolOutput, outerLog); return builder.build(); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/LineNumberData.java000066400000000000000000000056411514323636100267160ustar00rootroot00000000000000package org.openjdk.asmtools.jdis; import java.io.DataInputStream; import java.io.IOException; import static org.openjdk.asmtools.jasm.JasmTokens.Token.LINETABLE_HEADER; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.LINE_NUMBERS; /** * Represents a single line number data entry within a Line Number Table attribute. * This class extends the Indenter class to provide indentation functionality. */ public class LineNumberData extends Indenter { /** * The starting program counter of this line number entry. */ protected short start_pc; /** * The line number corresponding to the start_pc. */ protected short line_number; /** * A format string used for printing the line number data. */ protected String format; /** * Checks if this LineNumberData instance should be printed. * * @return true if either printLineTable or tableFormat is enabled, false otherwise. */ @Override public boolean isPrintable() { return printLineTable; } /** * Prints this LineNumberData instance in JASM format. * * @param index the index of this entry in the Line Number Table * @param size the total number of entries in the Line Number Table * @throws IOException if an I/O error occurs during printing */ @Override protected void jasmPrint(int index, int size) throws IOException { incIndent(); if (index == 0) { printIndentLn(getTitle()); } printIndentLn(format.formatted("line", line_number, start_pc)); } @Override protected String getTitle() { return LINETABLE_HEADER.parseKey() + ":"; } /** * Prints this LineNumberData instance in Table(javap) format. * * @param index the index of this entry in the Line Number Table * @param size the total number of entries in the Line Number Table * @throws IOException if an I/O error occurs during printing */ @Override protected void tablePrint(int index, int size) throws IOException { //There are no differences between the simple (jasm) and extended (table) presentations of LineNumberTable info. this.jasmPrint(index, size); } /** * Constructs a new LineNumberData instance from the given DataInputStream and MethodData. * * @param in the DataInputStream containing the line number data * @param methodData the MethodData instance associated with this LineNumberData * @throws IOException if an I/O error occurs during construction */ public LineNumberData(DataInputStream in, MethodData methodData) throws IOException { start_pc = in.readShort(); line_number = in.readShort(); super.toolOutput = methodData.toolOutput; int n = methodData.printProgramCounter ? PROGRAM_COUNTER_PLACEHOLDER_LENGTH + 4 : INSTR_PREFIX_LENGTH + 2; format = "%" + n + "s %4d: %7d"; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/LoadableDescriptorsData.java000066400000000000000000000033471514323636100306040ustar00rootroot00000000000000/* * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.jasm.JasmTokens; import java.io.DataInputStream; import java.io.IOException; /** * Valhalla: *

* LoadableDescriptors_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_descriptors; * u2 descriptors[number_of_descriptors]; * } */ public class LoadableDescriptorsData extends Utf8ArrayData { public LoadableDescriptorsData(ClassData cls) { super(cls, JasmTokens.Token.LOADABLEDESCRIPTORS); } public LoadableDescriptorsData read(DataInputStream in, int attribute_length) throws IOException, ClassFormatError { return (LoadableDescriptorsData) super.read(in, attribute_length); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/LocalData.java000066400000000000000000000065341514323636100257120ustar00rootroot00000000000000/* * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import java.io.DataInputStream; import java.io.IOException; import java.text.MessageFormat; /** * LocalTable_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 local_table_length; * { u2 start_pc; * u2 length; * u2 name_index; * u2 descriptor/signature_index; * u2 index; * } local_table[local__table_length]; * } */ public abstract class LocalData> extends Indenter { protected short start_pc, length, name_cpx, sig_cpx, slot; protected ConstantPool pool; protected String header; protected String format; public LocalData(MemberData owner, DataInputStream in, MethodData methodData, String fieldFacet) throws IOException { start_pc = in.readShort(); length = in.readShort(); name_cpx = in.readShort(); sig_cpx = in.readShort(); slot = in.readShort(); super.toolOutput = methodData.toolOutput; pool = methodData.getConstantPool(); int shift = methodData.calculateInlinedTitleShift("Start"); header = (MessageFormat.format("%{0}s Length Slot Name %s", shift)). formatted("Start", fieldFacet); format = MessageFormat.format("%{0}d %6d %4d %4s %s", shift); } @Override public int getCommentOffset() { return super.getCommentOffset() + PROGRAM_COUNTER_PLACEHOLDER_LENGTH; } @Override protected void tablePrint(int index, int size) throws IOException { incIndent(); if (index == 0) { printIndentLn(getTitle()); printIndentLn(header); } String nameCpx = PadRight("#%s".formatted(name_cpx), 6); String name = pool.StringValue(name_cpx); String type = pool.StringValue(sig_cpx); if (printCPIndex) { if (skipComments) { printIndentLn(format.formatted(start_pc, length, slot, nameCpx, "#%s".formatted(sig_cpx))); } else { String str = format.formatted(start_pc, length, slot, nameCpx, "%-4s".formatted("#" + sig_cpx)); printIndent(PadRight(str, getCommentOffset())); println(" // %s:%s".formatted(name, type)); } } else { printIndentLn(format.formatted(start_pc, length, slot, PadRight(name, 6), type)); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/LocalVariableData.java000066400000000000000000000037251514323636100273570ustar00rootroot00000000000000/* * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.jasm.TableFormatModel; import java.io.DataInputStream; import java.io.IOException; import static org.openjdk.asmtools.jasm.JasmTokens.Token.*; /** * LocalVariableTable_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 local_variable_table_length; * { u2 start_pc; * u2 length; * u2 name_index; * u2 descriptor_index; * u2 index; * } local_variable_table[local_variable_table_length]; * } */ public class LocalVariableData> extends LocalData { @Override public boolean isPrintable() { return printLocalVariables && tableFormat; } public LocalVariableData(M owner, DataInputStream in, MethodData methodData) throws IOException { super(owner, in, methodData, DESCRIPTOR.parseKey()); } @Override protected String getTitle() { return LOCALVARIABLES_HEADER.parseKey() + ":"; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/LocalVariableTypeData.java000066400000000000000000000040201514323636100302060ustar00rootroot00000000000000/* * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import java.io.DataInputStream; import java.io.IOException; import static org.openjdk.asmtools.jasm.JasmTokens.Token.LOCALVARIABLETYPES_HEADER; import static org.openjdk.asmtools.jasm.JasmTokens.Token.SIGNATURE; /** * LocalVariableTypeTable_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 local_variable_type_table_length; * { u2 start_pc; * u2 length; * u2 name_index; * u2 signature_index; * u2 index; * } local_variable_type_table[local_variable_type_table_length]; * } */ public class LocalVariableTypeData> extends LocalData { public boolean isPrintable() { return printLocalVariableTypes && tableFormat; } public LocalVariableTypeData(M owner, DataInputStream in, MethodData methodData) throws IOException { super(owner, in, methodData, SIGNATURE.parseKey()); } @Override protected String getTitle() { return LOCALVARIABLETYPES_HEADER.parseKey() + ":"; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/Main.java000066400000000000000000000310341514323636100247430ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.inputs.FileInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.StdoutOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.DualOutputStreamOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import java.io.DataInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Paths; import java.util.Collections; import java.util.List; import java.util.Optional; import static org.openjdk.asmtools.Main.WRITE_SWITCH; import static org.openjdk.asmtools.common.Environment.FAILED; import static org.openjdk.asmtools.common.Environment.OK; import static org.openjdk.asmtools.common.outputs.FSOutput.FSDestination.DIR; import static org.openjdk.asmtools.common.outputs.FSOutput.FSDestination.FILE; import static org.openjdk.asmtools.jdis.Options.PrintOption; import static org.openjdk.asmtools.jdis.Options.PrintOption.*; import static org.openjdk.asmtools.util.ProductInfo.FULL_VERSION; /** * jdis is a disassembler that accepts a .class file, and prints the plain-text translation of jasm source file * to the standard output. *

* Main program of the Java Disassembler :: class to jasm */ public class Main extends JdisTool { public Main(ToolOutput toolOutput, DualStreamToolOutput log, ToolInput... toolInputs) { super(toolOutput, log); Collections.addAll(fileList, toolInputs); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, ToolInput toolInput) { super(toolOutput, log); fileList.add(toolInput); } public Main(ToolOutput toolOutput, DualStreamToolOutput log, ToolInput toolInput, String... argv) { super(toolOutput, log); if (toolInput != null) { fileList.add(toolInput); } parseArgs(argv); } public Main(ToolOutput toolOutput, String... argv) { super(toolOutput); parseArgs(argv); } public Main(ToolOutput toolOutput, DualStreamToolOutput logger, String... argv) { super(toolOutput, logger); parseArgs(argv); } // jdis entry point public static void main(String... argv) { Main disassembler = new Main(new StdoutOutput(), argv); System.exit(disassembler.disasm()); } // Runs disassembler with args public synchronized boolean disasm(String... argv) { parseArgs(argv); return this.disasm() == OK; } @Override public synchronized int decode() { return this.disasm(); } public synchronized boolean decode(String... argv) { return this.disasm(argv); } // Runs disassembler when args already parsed public synchronized int disasm() { int rc = OK; for (ToolInput toolInput : fileList) { ClassData classData = null; try { environment.setToolInput(toolInput); classData = new ClassData(environment); toolInput.setDetailedInput(classData.isDetailedOutput()); try (DataInputStream dis = toolInput.getDataInputStream(Optional.of(environment))) { classData.read(dis, Paths.get(toolInput.getName())); } environment.traceln(() -> "Options:\n%s\n".formatted(Options.getPrintOptions())); environment.getToolOutput().startClass(classData.className, Optional.of(".jasm"), environment); classData.print(); environment.getToolOutput().finishClass(classData.className); environment.getOutputs().flush(); rc += environment.getLogger().registerTotalIssues(rc, toolInput); environment.getLogger().flush(); continue; } catch (FileNotFoundException fnf) { environment.printException(fnf); environment.error("err.not_found", toolInput); rc = FAILED; } catch (IOException | ClassFormatError ioe) { classData.postPrint(); environment.error(ioe); environment.printException(ioe); rc += environment.getLogger().registerTotalIssues(rc, toolInput); } catch (Error error) { classData.postPrint(); environment.error(error); environment.printException(error); rc += environment.getLogger().registerTotalIssues(rc, toolInput); } catch (Exception ex) { classData.postPrint(); environment.error(ex); environment.printException(ex); rc += environment.getLogger().registerTotalIssues(rc, toolInput); } environment.getLogger().flush(); break; } return rc; } @Override public void usage() { environment.usage(List.of( "info.usage", "info.opt.d", "info.opt.w", "info.opt.g", "info.opt.gg", "info.opt.nc", "info.opt.table", "info.opt.hx", "info.opt.instr.offset", "info.opt.sysinfo", "info.opt.lnt", "info.opt.lvt", "info.opt.drop", "info.opt.b", "info.opt.version", "info.opt.t", "info.opt.v" )); } @Override protected void parseArgs(String... argv) { Options.setDefaultOutputOptions(); // Parse arguments for (int i = 0; i < argv.length; i++) { String arg = argv[i]; switch (arg) { case "-g": Options.setDetailedOutputOptions(); break; case "-v": Options.set(VERBOSE); environment.setVerboseFlag(true); break; case "-sysinfo": Options.set(SYSINFO); break; case "-t": Options.set(VERBOSE); Options.set(TRACE); environment.setVerboseFlag(true); environment.setTraceFlag(true); break; case "-pc": Options.set(PRINT_BCI); break; case "-nc": Options.set(NO_COMMENTS); break; case "-hx": Options.set(HEX); break; case "-f": // -f setFSDestination(FILE, ++i, argv); break; case org.openjdk.asmtools.Main.DIR_SWITCH: // -d setFSDestination(DIR, ++i, argv); break; case WRITE_SWITCH: // -w environment.setIgnorePackage(true); setFSDestination(DIR, ++i, argv); break; case org.openjdk.asmtools.Main.DUAL_LOG_SWITCH: // -dls this.environment.setOutputs(new DualOutputStreamOutput()); break; case org.openjdk.asmtools.Main.VERSION_SWITCH: // -version environment.println(FULL_VERSION); System.exit(OK); case org.openjdk.asmtools.Main.STDIN_SWITCH: // - addStdIn(); break; case "-h", "-help": usage(); System.exit(OK); case "-best-effort": Options.set(BEST_EFFORT); break; case "-gg": Options.setDetailedOutputOptions(); Options.set(EXTRA_DETAILED_Output); break; case "-table": Options.set(PrintOption.TABLE); break; default: if (arg.startsWith("-")) { if (arg.startsWith("-drop")) { if (!parseParameters("-drop", arg, "DROP", DROP_All)) { usage(); System.exit(FAILED); } } else if (arg.startsWith("-lnt")) { if (!parseParameters("-lnt", arg, "LINE_NUMBER_TABLE", LINE_NUMBER_TABLE_All)) { usage(); System.exit(FAILED); } } else if (arg.startsWith("-lvt")) { if (!parseParameters("-lvt", arg, "LOCAL_VARIABLE", LOCAL_VARIABLE_All)) { usage(); System.exit(FAILED); } } else { environment.error("err.invalid_option", arg); usage(); System.exit(FAILED); } } else { fileList.add(new FileInput(arg)); } } } if (fileList.isEmpty()) { usage(); System.exit(FAILED); } } /** * Parse parameters group -option:parameters [parameters=option1,option2] * * @param option one of the options [-lvt, -drop, -lnt] * @param parameters one of combinations corresponded to the option: * , or * * @param optPrefix prefix of the PR: LINE_NUMBER_TABLE, LOCAL_VARIABLE or DROP * @param blankOption option that is used if there are no parameters option1,option2... attached to the -option * @return true if parameters group parsed successfully */ private boolean parseParameters(String option, String parameters, String optPrefix, PrintOption blankOption) { parameters = parameters.substring(option.length()); if (parameters.isBlank()) { if (!blankOption.isActive()) { environment.error("err.option.unsupported", option + ":all"); return false; } blankOption.apply(); } else if (parameters.matches("^[:=-]+.*")) { parameters = parameters.substring(1); String[] prmArray = parameters.split(","); for (int i = 0; i < prmArray.length; i++) { PrintOption printOption = getStringFlag(optPrefix, prmArray[i]); if (printOption == null || !printOption.name().startsWith(optPrefix)) { environment.error("err.invalid_parameter_of_option", prmArray[i], option); return false; } else if (!printOption.isActive()) { environment.error("err.option.unsupported", "%s:%s".formatted(option, prmArray[i])); return false; } printOption.apply(); if (printOption.equals(blankOption)) { // blank options is equal to return true; } } } else { environment.error("err.option.unsupported", option + parameters); return false; } return true; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/Measurable.java000066400000000000000000000024111514323636100261340ustar00rootroot00000000000000/* * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; /** * Indicates that the element has a specific printable measurement/size. */ public interface Measurable { int getPrintSize(); void setMaxPrintSize(int size); int getMaxPrintSize(); } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/MemberData.java000066400000000000000000000340751514323636100260700ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.common.FormatError; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.jasm.JasmTokens; import java.io.DataInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; import static java.lang.String.format; /** * Base class for ClassData, MethodData, FieldData and RecordData(JEP 360) */ public abstract class MemberData extends Indenter { // String prefix to print Defaults for Annotation Interface Elements protected static final String DEFAULT_VALUE_PREFIX = "default { "; protected T data; protected Environment environment; // Environment of this data protected ConstantPool pool; protected String memberType = ""; private String contextDefaultValuePrefix = null; public MemberData setOwner(MemberData> owner) { this.owner = owner; return this; } MemberData> owner; // access flags (modifiers) protected int access; // extra flags protected boolean isSynthetic = false; protected boolean isDeprecated = false; // indicates the state of the annotation element public enum AnnotationElementState { HAS_DEFAULT_VALUE, // An annotation interface element has a default value DEFAULT_STATE, PARAMETER_ANNOTATION, RIGHT_OPERAND, INLINED_ELEMENT // An annotation element is element of an annotation element. } private AnnotationElementState annotationElementState = AnnotationElementState.DEFAULT_STATE; // Signature can be located in ClassFile, field_info, method_info, and component_info protected SignatureData signature; // The visible annotations for this class, member( field or method) or record component protected ArrayList visibleAnnotations; // The invisible annotations for this class, member( field or method) or record component protected ArrayList invisibleAnnotations; // The visible annotations for this class, member( field or method) or record component protected ArrayList visibleTypeAnnotations; // The invisible annotations for this class, member( field or method) or record component protected ArrayList invisibleTypeAnnotations; // The remaining attributes of this class, member( field or method) or record component protected ArrayList attributes; public MemberData(T data) { super(data.toolOutput); this.environment = data.environment; init(data); } public MemberData(Environment environment) { super(environment.getToolOutput()); this.environment = environment; } public void init(T data) { this.data = data; this.pool = data.pool; } /** * Prints system comments if the option -sysinfo is used. */ protected void printSysInfo() { if (sysInfo) { throw new RuntimeException("Not implemented yet"); } } public MemberData setSignature(SignatureData signatureData) { this.signature = signatureData; return this; } public ConstantPool getConstantPool() { return pool; } protected boolean handleAttributes(DataInputStream in, EAttribute attributeTag, int attributeLength) throws IOException { // sub-classes override return false; } protected boolean handleUnrecognizedAttributes(DataInputStream in, int attributeNameCpx, int attributeLength) throws IOException { // sub-classes override return false; } protected String getPseudoFlagsAsString() { String s = ""; if (isSynthetic) s += "%s ".formatted(JasmTokens.Token.SYNTHETIC.parseKey()); if (isDeprecated) s += "%s ".formatted(JasmTokens.Token.DEPRECATED.parseKey()); return s; } /** * Gets a state of the annotation element */ public AnnotationElementState getAnnotationElementState() { return annotationElementState; } /** * Sets the state of the annotation element */ public MemberData setElementState(AnnotationElementState state) { annotationElementState = state; return this; } protected int getAnnotationsCount() { return ((visibleAnnotations == null) ? 0 : visibleAnnotations.size()) + ((invisibleAnnotations == null) ? 0 : invisibleAnnotations.size()) + ((visibleTypeAnnotations == null) ? 0 : visibleTypeAnnotations.size()) + ((invisibleTypeAnnotations == null) ? 0 : invisibleTypeAnnotations.size()); } /** * Print member's (ClassData, MethodData, FieldData and RecordData) annotations * * @throws IOException signals that an exception to some sort has occurred */ protected void printAnnotations(List... annotationLists) throws IOException { for (List list : annotationLists) { if (list != null) { for (T annotation : list) { annotation.setTheSame(this).print(); println(); } } } } protected void printAttributes(Container... tables) throws IOException { for (Container table : tables) { if (table != null && table.isPrintable()) { table.setCommentOffset(this.getCommentOffset()).print(); } } } /** * Prints field or a record component * * @param prefix the field prefix: "private static final Field" or the component prefix: "synthetic Component" * @param postfix String presentation of the end of line (either ":" or ";") * @param name_cpx Field/Component name cpIndex * @param type_cpx Field/Component type cpIndex * @param value_cpx either cpIndex of an initial field's value or 0 * if it's a component or the field doesn't have an initial value. */ protected void printVar(StringBuilder prefix, String postfix, String eol, int name_cpx, int type_cpx, int value_cpx) { Pair signInfo = (this.signature != null) ? this.signature.getJasmPrintInfo((i) -> pool.inRange(i)) : new Pair<>("", ""); if (printCPIndex) { prefix.append('#').append(name_cpx).append(":#").append(type_cpx).append(signInfo.first); if (value_cpx != UNDEFINED ) { prefix.append(" = #").append(value_cpx); } prefix.append(eol); if (skipComments) { print(prefix.toString()); } else { printPadRight(prefix.toString(), getCommentOffset()).print(" // "); print("%s:%s%s%s".formatted( data.pool.getName(name_cpx), data.pool.getName(type_cpx), signInfo.second, postfix != null ? postfix : "")); } } else { prefix.append(data.pool.getName(name_cpx)).append(':'). append(data.pool.getName(type_cpx)). append(signInfo.second); if (postfix != null) { prefix.append(postfix); } print("%s%s".formatted(prefix, eol)); } println(); } protected void readAttributes(DataInputStream in) throws IOException { // Read the Attributes int attributesCount = in.readUnsignedShort(); attributes = new ArrayList<>(attributesCount); environment.traceln(format("%s - Attributes[%d]", memberType, attributesCount)); AttrData attrData; for (int k = 0; k < attributesCount; k++) { int name_cpx = in.readUnsignedShort(); String attr_name = data.pool.getString(name_cpx, index -> "#" + index); environment.traceln(format("Attribute#%d name[%d]=\"%s\"", k, name_cpx, attr_name)); EAttribute tag = EAttribute.get(attr_name); int attrLength = in.readInt(); attrData = new AttrData(environment, tag); attributes.add(attrData); switch (tag) { case ATT_Synthetic: // Read Synthetic Attribute if (attrLength != 0) { if (bestEffort) { environment.getLogger().error( "err.invalid.attribute.length", tag.printValue(), attrLength); } else { throw new FormatError(environment.getLogger(), "err.invalid.attribute.length", tag.printValue(), attrLength); } } isSynthetic = true; break; case ATT_Deprecated: // Read Deprecated Attribute if (attrLength != 0) { if (bestEffort) { environment.getLogger().error( "err.invalid.attribute.length", tag.printValue(), attrLength); } else { throw new FormatError(environment.getLogger(), "err.invalid.attribute.length", tag.printValue(), attrLength); } } isDeprecated = true; break; case ATT_RuntimeVisibleAnnotations: case ATT_RuntimeInvisibleAnnotations: // Read Annotations Attribute int count = in.readShort(); ArrayList annotations = new ArrayList<>(count); boolean invisible = (tag == EAttribute.ATT_RuntimeInvisibleAnnotations); for (int i = 0; i < count; i++) { AnnotationData annotationData = new AnnotationData(data, invisible); annotationData.read(in); annotations.add(annotationData); } if (invisible) { invisibleAnnotations = annotations; } else { visibleAnnotations = annotations; } break; case ATT_RuntimeVisibleTypeAnnotations: case ATT_RuntimeInvisibleTypeAnnotations: // Read Type Annotations Attribute count = in.readShort(); ArrayList typeAnnotations = new ArrayList<>(count); invisible = (tag == EAttribute.ATT_RuntimeInvisibleTypeAnnotations); for (int i = 0; i < count; i++) { TypeAnnotationData typeAnnotationData = new TypeAnnotationData(data, invisible); typeAnnotationData.read(in); typeAnnotations.add(typeAnnotationData); } if (invisible) { invisibleTypeAnnotations = typeAnnotations; } else { visibleTypeAnnotations = typeAnnotations; } break; case ATT_Unrecognized: handleUnrecognizedAttributes(in,name_cpx, attrLength); attrData.read(name_cpx, attrLength, in); break; default: boolean handled = handleAttributes(in, tag, attrLength); if (!handled) { attrData.read(name_cpx, attrLength, in); } else { attrData.setNameCpx(name_cpx).setLength(attrLength); } break; } } } public List getListOf(EAttribute attributeTag) { return attributes.stream().filter(a -> a.getAttributeInfo().equals(attributeTag)).toList(); } /** * | 012: aad * |iiSSSSSHeader.... * ii - indent SSSS - shift that is returned. */ public int calculateInlinedTitleShift(String Header) { return ( (printProgramCounter) ? PROGRAM_COUNTER_PLACEHOLDER_LENGTH + getIndentStep() * 2 + Header.length() - getIndentSize() : INSTR_PREFIX_LENGTH + getIndentStep() * 2 + Header.length() - getIndentSize() * 2 ) - getIndentSize(); } protected String getDefaultValuePrefix() { if( contextDefaultValuePrefix == null ) { contextDefaultValuePrefix = printCPIndex ? DEFAULT_VALUE_PREFIX : " " + DEFAULT_VALUE_PREFIX; } return contextDefaultValuePrefix; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/MethodData.java000066400000000000000000000500161514323636100260720ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.common.structure.ClassFileContext; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.common.structure.EModifier; import org.openjdk.asmtools.jdis.notations.Signature; import org.openjdk.asmtools.jdis.notations.Type; import java.io.DataInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; import static java.lang.Math.max; import static org.openjdk.asmtools.common.structure.ClassFileContext.METHOD; import static org.openjdk.asmtools.jasm.JasmTokens.Token; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.METHOD_DATA; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.SIGNATURE; import static org.openjdk.asmtools.jdis.ConstantPool.funcInvalidCPIndex; import static org.openjdk.asmtools.jdis.MemberData.AnnotationElementState.HAS_DEFAULT_VALUE; import static org.openjdk.asmtools.jdis.MemberData.AnnotationElementState.PARAMETER_ANNOTATION; /** * Method data for method members in a class of the Java Disassembler */ public class MethodData extends MemberData { //ConstantPool index to the method name protected int name_cpx; //ConstantPool index to the method descriptor, representing the types of parameters that the method takes, // and a return descriptor, representing the type of the value (if any) that the method returns. protected int descriptor_cpx; //The parameter names for this method protected ArrayList methodParameters; //The visible parameter annotations for this method protected ParameterAnnotationData visibleParameterAnnotations; //The invisible parameter annotations for this method protected ParameterAnnotationData invisibleParameterAnnotations; // The invisible parameter annotations for this method protected AnnotationElement.AnnotationValue defaultAnnotation; // The exception table (thrown exceptions) for this method. Maybe null protected ExceptionData exceptions; // The code data for this method. Maybe null private CodeData code; public MethodData(ClassData classData) { super(classData); tableToken = METHOD_DATA; super.memberType = "MethodData"; setCommentOffset(classData.pool.getCommentOffset()); methodParameters = null; } /* Read Methods */ @Override protected boolean handleAttributes(DataInputStream in, EAttribute attributeTag, int attributeLength) throws IOException { // Read the Attributes boolean handled = true; switch (attributeTag) { case ATT_Code -> { code = new CodeData(this); code.read(in, attributeLength); } case ATT_Signature -> { if (this.signature != null) { environment.warning("warn.one.attribute.required", "Signature", "method_info"); } setSignature(new SignatureData(data).read(in, attributeLength)); } case ATT_Exceptions -> exceptions = new ExceptionData(data).read(in, attributeLength); case ATT_MethodParameters -> readMethodParameters(in); case ATT_RuntimeVisibleParameterAnnotations, ATT_RuntimeInvisibleParameterAnnotations -> { boolean invisible = (attributeTag == EAttribute.ATT_RuntimeInvisibleParameterAnnotations); ParameterAnnotationData parameterAnnotationData = new ParameterAnnotationData(this, invisible); parameterAnnotationData.read(in); if (invisible) { invisibleParameterAnnotations = parameterAnnotationData; } else { visibleParameterAnnotations = parameterAnnotationData; } } case ATT_AnnotationDefault -> defaultAnnotation = AnnotationElement.readValue(in, data, false); default -> handled = false; } return handled; } /** * Read and resolve the method data called from ClassData. * Precondition: Meth has already been read from the stream. */ public void read(DataInputStream in) throws IOException { // read the Methods CP indexes access = in.readUnsignedShort(); // & MM_METHOD; // Q name_cpx = in.readUnsignedShort(); descriptor_cpx = in.readUnsignedShort(); environment.traceln(() -> "MethodData: {modifiers[%d]}:%s name[%d]=%s signature[%d]=%s" .formatted(access, EModifier.asNames(access, ClassFileContext.METHOD).isEmpty() ? "" : EModifier.asNames(access, ClassFileContext.METHOD).isEmpty(), name_cpx, data.pool.getString(name_cpx, index -> "???"), descriptor_cpx, data.pool.getString(descriptor_cpx, index -> "???"))); // Read the attributes readAttributes(in); } private void readMethodParameters(DataInputStream in) throws IOException { // this is not really a CodeAttr attribute, it's part of the CodeAttr int num_params = in.readUnsignedByte(); environment.traceln(() -> "MethodParametersAttr[%d]".formatted(num_params)); methodParameters = new ArrayList<>(num_params); for (int i = 0; i < num_params; i++) { short paramNameCpx = (short) in.readUnsignedShort(); int paramAccess = in.readUnsignedShort(); environment.traceln("()->MethodParameter[%d] = { name[%d]: \"%s\" modifiers[%d]: %s}". formatted(i, paramNameCpx, pool.getString(paramNameCpx, index -> "???"), paramAccess, EModifier.asNames(paramAccess, ClassFileContext.METHOD))); methodParameters.add(i, new MethodParameterData(paramNameCpx, paramAccess)); } } private record ParameterAnnotationsSizes(int visibleParameterAnnotationsCount, int invisibleParameterAnnotationsCount) { boolean hasParameterAnnotations() { return visibleParameterAnnotationsCount > 0 || invisibleParameterAnnotationsCount > 0; } } private ParameterAnnotationsSizes parameterAnnotationsSizes = null; private ParameterAnnotationsSizes ParameterAnnotationsSizes() { if (parameterAnnotationsSizes == null) { parameterAnnotationsSizes = new ParameterAnnotationsSizes( visibleParameterAnnotations != null ? visibleParameterAnnotations.numParameters() : 0, invisibleParameterAnnotations != null ? invisibleParameterAnnotations.numParameters() : 0); } return parameterAnnotationsSizes; } private boolean hasAnnotationParameters() { return ParameterAnnotationsSizes().hasParameterAnnotations() || methodParameters != null && methodParameters.size() > 0; } private boolean hasDefaultAnnotation() { return defaultAnnotation != null; } /** * Print The MethodParameters Attribute and the parameter annotations for this method. * Called from CodeAttr (since JASM code integrates the ParameterAnnotation Syntax inside the method body). */ public void printMethodParameters() throws IOException { // ParameterAnnotation(s) or MethodParameters found. if (hasAnnotationParameters()) { incIndent(); int totalWidth = printProgramCounter ? 7 : 5; int pNumSize = methodParameters != null ? methodParameters.size() : 0; int maxParams = max(pNumSize, parameterAnnotationsSizes.invisibleParameterAnnotationsCount()); maxParams = max(parameterAnnotationsSizes.visibleParameterAnnotationsCount(), maxParams); String[] paramNames = getPrintableParameterNames(maxParams); for (int paramNum = 0; paramNum < maxParams; paramNum++) { ArrayList visAnnotationDataList = (visibleParameterAnnotations != null && paramNum < parameterAnnotationsSizes.visibleParameterAnnotationsCount()) ? visibleParameterAnnotations.get(paramNum) : null; ArrayList invisAnnotationDataList = (invisibleParameterAnnotations != null && paramNum < parameterAnnotationsSizes.invisibleParameterAnnotationsCount()) ? invisibleParameterAnnotations.get(paramNum) : null; MethodParameterData methodParameterData = (methodParameters != null) ? methodParameters.get(paramNum) : null; boolean hasAnnotations = ((visAnnotationDataList != null) || (invisAnnotationDataList != null)); if ((methodParameterData != null) || hasAnnotations) { // Print the Param number (header) int annotOffset = 3; printIndent(PadRight("%2d: ".formatted(paramNum), totalWidth)); // Print the Parameter name if (methodParameterData != null) { printPadRight(paramNames[paramNum], annotOffset); } // Print any visible param annotations printAnnotationDataList(visAnnotationDataList, annotOffset); // Print any invisible param annotations printAnnotationDataList(invisAnnotationDataList, annotOffset); // Reset the line if there were parameters println(); } } decIndent(); } } /** * Prints a list of Visible/Invisible parameter annotations */ private void printAnnotationDataList(List annotationDataList, int offset) throws IOException { if (annotationDataList != null) { for (AnnotationData annot : annotationDataList) { println().print(enlargedIndent(offset)); annot.setElementState(PARAMETER_ANNOTATION).setOffset(offset + getIndentSize()).print(); } } } private String[] getPrintableParameterNames(int maxParams) { String[] names = new String[maxParams]; if (methodParameters != null) { for (int paramNum = 0; paramNum < maxParams; paramNum++) { MethodParameterData methodParameterData = methodParameters.get(paramNum); // get printable parameter name names[paramNum] = Token.PARAM_NAME.parseKey() + "{ "; if (printCPIndex) { names[paramNum] += "#%d ".formatted(methodParameterData.name_cpx); if (!skipComments && methodParameterData.name_cpx != 0) { names[paramNum] += "/* %s */ ".formatted(data.pool.getString(methodParameterData.name_cpx, index -> "#" + index)); } if (methodParameterData.access != 0) { names[paramNum] += EModifier.asKeywords(methodParameterData.access, ClassFileContext.METHOD_PARAMETERS); } } else { if (methodParameterData.name_cpx != 0) { names[paramNum] += data.pool.getString(methodParameterData.name_cpx, index -> "#" + index) + " "; } else { names[paramNum] += "#0 "; } if (methodParameterData.access != 0) { names[paramNum] += EModifier.asKeywords(methodParameterData.access, ClassFileContext.METHOD_PARAMETERS); } } names[paramNum] += "}"; } } return names; } private String getMethodModifiers() { return EModifier.asKeywords(access, ClassFileContext.METHOD). // add synthetic, deprecated if necessary concat(getPseudoFlagsAsString()); } /** * Prints the method data to the current output stream. Called from ClassData. * [SystemInfo]? * [@(=|-)Annotations]* * [modifiers]* Method name:descriptor[:signature]?(1) [;]?(2) * 1) :signature if !table * 2) if !tableSignatureFormat AND !hasCode AND !hasAnnotationParameters AND !hasException * [default(;|,)(3)] 3) ; if * */ @Override protected void jasmPrint(int index, int size) throws IOException { boolean isSignaturePrintable = this.signature != null && this.signature.isPrintable(); boolean tableSignatureFormat = isSignaturePrintable && this.signature.isTableOutput(); boolean hasExceptions = exceptions != null; boolean hasCode = code != null; boolean hasCodeInfo = hasCode || hasAnnotationParameters() || hasExceptions; boolean noExtraInfo = !hasCodeInfo && !tableSignatureFormat; if (index > 0) { // Print empty line between methods println(); } printSysInfo(); super.printAnnotations(visibleAnnotations, invisibleAnnotations); super.printAnnotations(visibleTypeAnnotations, invisibleTypeAnnotations); String methSignature = getMethodModifiers(); methSignature = methSignature.concat(Token.METHODREF.parseKey()); methSignature = PadRight(methSignature, max(methSignature.length() + 1, SIGNATURE.parseKey().length() + getIndentSize() * 2)); int keywordPadding = methSignature.length() - getIndentSize(); // get JASM Signature info Pair jasmSignInfo = (isSignaturePrintable) ? signature.getJasmPrintInfo((i) -> pool.inRange(i)) : new Pair<>("", ""); if (printCPIndex) { // print the CPX method descriptor methSignature = methSignature.concat("#%d:#%d".formatted(name_cpx, descriptor_cpx)).concat(jasmSignInfo.first); if (noExtraInfo && !hasDefaultAnnotation()) { methSignature = methSignature.concat(";"); } if (skipComments) { if (defaultAnnotation != null) { printIndent(PadRight(methSignature, getCommentOffset())); } else { printIndent(methSignature); } } else { printIndent(PadRight(methSignature, getCommentOffset())); String comment = (defaultAnnotation != null ? " /* " : " // "). concat("%s:%s".formatted(data.pool.getName(name_cpx), data.pool.getName(descriptor_cpx), jasmSignInfo.second)). concat(jasmSignInfo.second). concat(defaultAnnotation != null ? " */ " : " "); print(comment); } } else { methSignature = methSignature.concat(data.pool.getName(name_cpx) + ":"). concat(data.pool.getName(descriptor_cpx)). concat(jasmSignInfo.second); if (noExtraInfo && !hasDefaultAnnotation()) { methSignature = methSignature.concat(";"); } printIndent(methSignature); } // followed by default annotation (JLS 9.6.2) // public abstract Method #7:#8 /* ivalue:"()I" */ default { #10 /* 1 */ }; if (hasDefaultAnnotation()) { // printIndent(PadRight(methSignature, getCommentOffset())); defaultAnnotation.incIndent().setCommentOffset(getIndentSize() - getIndentStep()); defaultAnnotation.setElementState(HAS_DEFAULT_VALUE); defaultAnnotation.print(); // finish up the method declaration if (!hasCodeInfo) { print(!tableSignatureFormat ? ";" : ","); } } if (tableSignatureFormat) { // print separately println(); signature.disableNewLine().setKeywordPadding(keywordPadding).incIndent(). setCommentOffset(this.getCommentOffset() - getIndentStep()); signature.terminateMethodSignature(!hasExceptions); signature.print(); } // followed by exception table if (exceptions != null) { println(); exceptions.setKeywordPadding(keywordPadding).incIndent().setCommentOffset(this.getCommentOffset() - getIndentStep()); exceptions.print(); } else { println(); } if (code != null) { code.setCommentOffset(this.getCommentOffset()); code.print(); } else { if (hasAnnotationParameters()) { printMethodParameters(); } } } @Override public void tablePrint(int index, int size) throws IOException { //There are no differences between the simple (jasm) and extended (table) presentations of record_component_info. jasmPrint(index, size); } @Override protected void printSysInfo() { if (sysInfo) { int paramCount = EModifier.isStatic(access) ? 0 : 1; String prefix = getIndentString() + " * "; String methodModifiers = getMethodModifiers(); Type signatureType = signature != null ? signature.getSignatureType() : new Signature<>(environment.getLogger(), descriptor_cpx).getType(pool); String methodName = data.pool.getString(name_cpx, funcInvalidCPIndex); boolean isConstructor = methodName.equals(""); String methodSignature = signatureType.toString(); if (signatureType instanceof Type.MethodType methodType) { paramCount += methodType.paramTypes.size(); } int i = 0; if (isConstructor) { methodName = data.getClassName(); methodSignature = methodSignature.substring(methodSignature.indexOf("(")); } else { i = methodSignature.indexOf('('); } methodName = methodSignature.substring(0, i).concat(methodName). concat(methodSignature.substring(i)).replaceAll("/", "."); String descriptor = data.pool.getString(descriptor_cpx, funcInvalidCPIndex); printIndentLn("/**"); println(prefix + methodModifiers + methodName); prefix = prefix.concat(getIndentString()); println(prefix + "descriptor: " + descriptor); if (signature != null) { println(prefix + "signature: " + data.pool.getString(signature.getCPIndex(), funcInvalidCPIndex)); } println(prefix + "flags: (0x%04x) %s".formatted(access, EModifier.asNames(access, METHOD))); println(prefix + "stack: %d, locals: %d, args_size: %d".formatted(this.code.max_stack, this.code.max_locals, paramCount)); printIndentLn(" */"); } } /** * MethodParamData */ static class MethodParameterData { public int access; public int name_cpx; public MethodParameterData(int name, int access) { this.access = access; this.name_cpx = name; } } } // end MethodData jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/ModuleContent.java000066400000000000000000000364501514323636100266460ustar00rootroot00000000000000/* * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.structure.ClassFileContext; import org.openjdk.asmtools.common.structure.EModifier; import org.openjdk.asmtools.jasm.NameInfo; import java.util.*; import java.util.stream.Collectors; import static java.lang.String.format; import static org.openjdk.asmtools.common.structure.ClassFileContext.*; import static org.openjdk.asmtools.jdis.ConstantPool.TAG.*; /** * Internal presentation of a module */ public final class ModuleContent extends Indenter { private static int MODULE_DIRECTIVE_PADDING = 9; //* A module name and module_flags public final Header header; //* A service dependence's of this module public final Set uses; //* Modules on which the current module has a dependence. public final Set requires; //* A module exports, may be qualified or unqualified. public final Map> exports; //* Packages, to be opened by the current module public final Map> opens; //* A service that a dule provides one or more implementations of. public final Map> provides; private ModuleContent(Builder builder) { this.header = builder.header; this.requires = Collections.unmodifiableSet(builder.requires); this.exports = Collections.unmodifiableMap(builder.exports); this.opens = Collections.unmodifiableMap(builder.opens); this.uses = Collections.unmodifiableSet(builder.uses); this.provides = Collections.unmodifiableMap(builder.provides); } public String getModuleFlags() { return EModifier.asKeywords(header.getFlags(), MODULE); } public String getModuleName() { return header.getModuleName(); } // Gets the Constant Pool index to this module public int getModuleCPX() { return header.getModuleCPX(); } public String getModuleVersion() { return header.getModuleVersion(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); requires.stream().forEach( d -> sb.append(IndentPadRight("requires", MODULE_DIRECTIVE_PADDING)). append(d). append(format(";%s%n", d.getModuleVersion() == null ? "" : " // @" + d.getModuleVersion()))); // exports.entrySet().stream() .filter(e -> e.getValue().isEmpty()) .map(e -> IndentPadRight("exports", MODULE_DIRECTIVE_PADDING).concat(format("%s;%n", e.getKey().toString()))) .forEach(sb::append); exports.entrySet().stream() .filter(e -> !e.getValue().isEmpty()) .map(e -> IndentPadRight("exports", MODULE_DIRECTIVE_PADDING). concat(format("%s to%n%s;%n", e.getKey().toString(), e.getValue().stream(). map(mn -> this.enlargedIndent(mn.toString(), MODULE_DIRECTIVE_PADDING)). collect(Collectors.joining(",\n")))) ).forEach(sb::append); // opens.entrySet().stream() .filter(e -> e.getValue().isEmpty()) .map(e -> IndentPadRight("opens", MODULE_DIRECTIVE_PADDING).concat(format("%s;%n", e.getKey().toString()))) .forEach(sb::append); opens.entrySet().stream() .filter(e -> !e.getValue().isEmpty()) .map(e -> IndentPadRight("opens", MODULE_DIRECTIVE_PADDING). concat(format("%s to%n%s;%n", e.getKey().toString(), e.getValue().stream() .map(mn -> this.enlargedIndent(mn.toString(), MODULE_DIRECTIVE_PADDING)) .collect(Collectors.joining(",\n"))))) .forEach(sb::append); // uses.stream().map(s -> IndentPadRight("uses", MODULE_DIRECTIVE_PADDING).concat(format("%s;%n", s))) .forEach(sb::append); // provides.entrySet().stream() .filter(e -> !e.getValue().isEmpty()) .map(e -> IndentPadRight("provides", MODULE_DIRECTIVE_PADDING). concat(format("%s with%n%s;%n", e.getKey().toString(), e.getValue().stream() .map(mn -> this.enlargedIndent(mn.toString(), MODULE_DIRECTIVE_PADDING)) .collect(Collectors.joining(",\n"))))) .forEach(sb::append); // if (sb.length() > 0 && Character.isWhitespace(sb.charAt(sb.length() - 1))) { sb.deleteCharAt(sb.length() - 1); } return sb.toString(); } // A module header consists of a module name and module flags public final static class Header extends VersionedFlaggedTargetType { Header(int cpIndex, String typeName, int flag, String moduleVersion) { super(CONSTANT_MODULE, cpIndex, typeName, flag, MODULE, moduleVersion); } public String getModuleName() { return getTypeName(); } public int getModuleFlags() { return getFlags(); } public String getModuleVersion() { return getVersion(); } // Gets the Constant Pool index to this module public int getModuleCPX() { return getCPIndex(); } } //* A module on which the current module has a dependence. public final static class Dependence extends VersionedFlaggedTargetType { public Dependence(int cpIndex, String moduleName, int flag, String moduleVersion) { super(CONSTANT_MODULE, cpIndex, moduleName, flag, REQUIRES, moduleVersion); } public String getModuleVersion() { return getVersion(); } } public final static class Uses extends TargetType { public Uses(int cpIndex, String typeName) { super(CONSTANT_CLASS, cpIndex, typeName); } public Uses(TargetType targetType) { this(targetType.getCPIndex(), targetType.getTypeName()); } } //* A provided type of the current module. public final static class Provided extends TargetType { public Provided(int cpIndex, String typeName) { super(CONSTANT_CLASS, cpIndex, typeName); } public Provided(TargetType targetType) { this(targetType.getCPIndex(), targetType.getTypeName()); } } //* An opened package of the current module. public final static class Opened extends FlaggedTargetType { public Opened(int cpIndex, String typeName, int opensFlags) { super(CONSTANT_PACKAGE, cpIndex, typeName, opensFlags, OPENS); } public Opened(FlaggedTargetType targetType) { this(targetType.getCPIndex(), targetType.getTypeName(), targetType.getFlags()); } } //* An exported package of the current module. public final static class Exported extends FlaggedTargetType { public Exported(int cpIndex, String typeName, int exportsFlags) { super(CONSTANT_PACKAGE, cpIndex, typeName, exportsFlags, EXPORTS); } public Exported(FlaggedTargetType targetType) { this(targetType.getCPIndex(), targetType.getTypeName(), targetType.getFlags()); } } public static class VersionedFlaggedTargetType extends FlaggedTargetType { private String version; VersionedFlaggedTargetType(ConstantPool.TAG tag, int cpIndex, String typeName, int flag, ClassFileContext context, String version) { super(tag, cpIndex, typeName, flag, context); this.version = version != null && !version.isEmpty() ? version : null; } public String getVersion() { return version; } @Override public int hashCode() { int code = version == null ? 0 : version.hashCode(); return code + super.hashCode(); } } public static class FlaggedTargetType extends TargetType { private int flag; private ClassFileContext context; public FlaggedTargetType(ConstantPool.TAG tag, int cpIndex, String typeName, int flag, ClassFileContext context) { super(tag, cpIndex, typeName); this.flag = flag; this.context = context; } public boolean isFlagged() { return true; } public int getFlags() { return flag; } public void setFlag(int value) { flag = value; } @Override public int hashCode() { return super.hashCode() + flag; } @Override public boolean equals(Object obj) { return super.equals(obj) && ((FlaggedTargetType) obj).flag == this.flag; } @Override public String toString() { return EModifier.asKeywords(this.flag, context) + super.toString(); } } public static class TargetType extends NameInfo implements Comparable { // Type of constant in the constant pool private final ConstantPool.TAG tag; public TargetType(ConstantPool.TAG tag, int cpIndex, String typeName) { super(cpIndex, typeName); this.tag = tag; } public String getTypeName() { return super.name(); } public int getCPIndex() { return super.cpIndex(); } public boolean isFlagged() { return false; } @Override public int hashCode() { return super.cpIndex() + super.name().hashCode() * 11; } @Override public boolean equals(Object obj) { if (obj instanceof TargetType) { TargetType t = (TargetType) obj; return this.name().equals(t.getTypeName()); } return false; } @Override public int compareTo(TargetType t) { return this.name().compareTo(t.getTypeName()); } @Override public String toString() { return (Options.contains(Options.PrintOption.CP_INDEX)) ? String.format("#%-4d /* %s */", getCPIndex(), name()) : name(); } } /** * The module builder. */ public static final class Builder { final Set requires = new HashSet<>(); final Map> exports = new HashMap<>(); final Map> opens = new HashMap<>(); final Set uses = new HashSet<>(); final Map> provides = new HashMap<>(); private Header header; private int moduleFlags = EModifier.ACC_NONE.getFlag(); private int cpIndex; private String moduleName; private String moduleVersion; public Builder() { } public Builder(int cpIndex, String moduleName, int moduleFlags, String moduleVersion) { this.cpIndex = cpIndex; this.moduleFlags = moduleFlags; this.moduleName = moduleName; this.moduleVersion = moduleVersion; } public void setModuleFlags(int moduleFlags) { this.moduleFlags = moduleFlags; } public void setCpIndex(int cpIndex) { this.cpIndex = cpIndex; } public void setModuleName(String moduleName) { this.moduleName = moduleName; } public void setModuleVersion(String moduleVersion) { this.moduleVersion = moduleVersion; } public Builder require(int cpIndex, String d, int requiresFlag, String version) { return require(new Dependence(cpIndex, d, requiresFlag, version)); } public Builder require(Dependence dependence) { requires.add(dependence); return this; } public Builder exports(Exported p, Set ms) { return add(exports, p, ms); } public Builder exports(int cpIndex, String packageName, int exportFlags) { return add(exports, new Exported(cpIndex, packageName, exportFlags), new HashSet<>()); } public Builder exports(int cpIndex, String packageName, int exportFlags, Set ms) { return add(exports, new Exported(cpIndex, packageName, exportFlags), ms); } public Builder opens(Opened p, Set ms) { return add(opens, p, ms); } public Builder opens(int cpIndex, String packageName, int exportFlags) { return add(opens, new Opened(cpIndex, packageName, exportFlags), new HashSet<>()); } public Builder opens(int cpIndex, String packageName, int exportFlags, Set ms) { return add(opens, new Opened(cpIndex, packageName, exportFlags), ms); } public Builder provides(Provided t, Set implementations) { return add(provides, t, implementations); } public Builder provides(int cpIndex, String serviceName, Set implementations) { return this.provides(new Provided(cpIndex, serviceName), implementations); } public Builder uses(int cpIndex, String serviceName) { return this.uses(new Uses(cpIndex, serviceName)); } public Builder uses(Uses service) { uses.add(service); return this; } /** * @return The new module */ public ModuleContent build() { header = new Header(cpIndex, moduleName, moduleFlags, moduleVersion); return new ModuleContent(this); } private Builder add(Map> collection, T source, Set target) { Objects.requireNonNull(source); Objects.requireNonNull(target); if (!collection.containsKey(source)) collection.put(source, new HashSet<>()); collection.get(source).addAll(target); return this; } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/ModuleData.java000066400000000000000000000240621514323636100261010ustar00rootroot00000000000000/* * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.FormatError; import org.openjdk.asmtools.jasm.JasmTokens; import java.io.DataInputStream; import java.io.IOException; import java.util.HashSet; import java.util.Set; import static org.openjdk.asmtools.jdis.ConstantPool.TAG.CONSTANT_CLASS; import static org.openjdk.asmtools.jdis.ConstantPool.TAG.CONSTANT_MODULE; import static org.openjdk.asmtools.jdis.Options.PrintOption.CP_INDEX; /** * The module attribute data. */ public class ModuleData extends MemberData { protected final boolean printCPIndex = Options.contains(CP_INDEX); private ModuleContent moduleContent; public ModuleData(ClassData classData) { super(classData); } public String getModuleName() { return moduleContent == null ? "N/A" : moduleContent.getModuleName(); } public String getModuleVersion() { return moduleContent == null ? null : moduleContent.getModuleVersion(); } public String getModuleHeader(String versionString) { StringBuilder sb = new StringBuilder(25); if (moduleContent == null) { sb.append(JasmTokens.Token.MODULE.parseKey()); sb.append(' '); if (printCPIndex) { sb.append(String.format("#?? /* %s */", getModuleName())); } else { sb.append(getModuleName()); } if (versionString != null && versionString.length() > 0) { sb.append(' ').append(versionString); } } else { sb.append(moduleContent.getModuleFlags()); sb.append(JasmTokens.Token.MODULE.parseKey()).append(' '); if (printCPIndex) { sb.append(String.format("#%d /* %s%s%s", moduleContent.getModuleCPX(), moduleContent.getModuleName(), moduleContent.getModuleVersion() != null ? "@" + moduleContent.getModuleVersion() + " */" : " */", (versionString != null && versionString.length() > 0) ? " " + versionString : "")); } else { sb.append(moduleContent.getModuleName()); if (versionString != null && versionString.length() > 0) { sb.append(' ').append(versionString); } if (moduleContent.getModuleVersion() != null) { sb.append("// @").append(moduleContent.getModuleVersion()); } } } return sb.toString(); } /** * Reads and resolve the method's attribute data called from ClassData. */ public void read(DataInputStream in) throws FormatError { int index, moduleFlags, versionIndex; String moduleName, version; ModuleContent.Builder builder = null; try { // u2 module_name_index; index = in.readUnsignedShort(); moduleName = pool.getModuleName(index); // u2 module_flags; moduleFlags = in.readUnsignedShort(); // u2 module_version_index; versionIndex = in.readUnsignedShort(); version = pool.getString(versionIndex, ind -> null); builder = new ModuleContent.Builder(index, moduleName, moduleFlags, version); } catch (IOException ioe) { if (bestEffort) { environment.getLogger().error("err.invalid_header"); if (builder == null) { return; } } else { throw new FormatError(environment.getLogger(), "err.invalid_header"); } } try { int requires_count = in.readUnsignedShort(); for (int i = 0; i < requires_count; i++) { index = in.readUnsignedShort(); int requiresFlags = in.readUnsignedShort(); versionIndex = in.readUnsignedShort(); moduleName = pool.getModuleName(index); version = pool.getString(versionIndex, ind -> null); builder.require(index, moduleName, requiresFlags, version); } } catch (IOException ioe) { if (bestEffort) { environment.getLogger().error("err.invalid_requires"); } else { throw new FormatError(environment.getLogger(), "err.invalid_requires"); } } try { int exports_count = in.readUnsignedShort(); if (exports_count > 0) { for (int i = 0; i < exports_count; i++) { index = in.readUnsignedShort(); String packageName = pool.getPackageName(index); int exportsFlags = in.readUnsignedShort(); int exports_to_count = in.readUnsignedShort(); if (exports_to_count > 0) { Set targets = new HashSet<>(exports_to_count); for (int j = 0; j < exports_to_count; j++) { int exports_to_index = in.readUnsignedShort(); targets.add(new ModuleContent.TargetType(CONSTANT_MODULE, exports_to_index, pool.getModuleName(exports_to_index))); } builder.exports(index, packageName, exportsFlags, targets); } else { builder.exports(index, packageName, exportsFlags); } } } } catch (IOException ioe) { if (bestEffort) { environment.getLogger().error("err.invalid_exports"); } else { throw new FormatError(environment.getLogger(), "err.invalid_exports"); } } try { int opens_count = in.readUnsignedShort(); if (opens_count > 0) { for (int i = 0; i < opens_count; i++) { index = in.readUnsignedShort(); String packageName = pool.getPackageName(index); int opensFlags = in.readUnsignedShort(); int opens_to_count = in.readUnsignedShort(); if (opens_to_count > 0) { Set opens = new HashSet<>(opens_to_count); for (int j = 0; j < opens_to_count; j++) { int opens_to_index = in.readUnsignedShort(); opens.add(new ModuleContent.TargetType(CONSTANT_MODULE, opens_to_index, pool.getModuleName(opens_to_index))); } builder.opens(index, packageName, opensFlags, opens); } else { builder.opens(index, packageName, opensFlags); } } } } catch (IOException ioe) { if (bestEffort) { environment.getLogger().error("err.invalid_opens"); } else { throw new FormatError(environment.getLogger(), "err.invalid_opens"); } } try { int uses_count = in.readUnsignedShort(); if (uses_count > 0) { for (int i = 0; i < uses_count; i++) { index = in.readUnsignedShort(); String serviceName = pool.getClassName(index); builder.uses(index, serviceName); } } } catch (IOException ioe) { if (bestEffort) { environment.getLogger().error("err.invalid_uses"); } else { throw new FormatError(environment.getLogger(), "err.invalid_uses"); } } try { int provides_count = in.readUnsignedShort(); if (provides_count > 0) { for (int i = 0; i < provides_count; i++) { index = in.readUnsignedShort(); String serviceName = pool.getClassName(index); int provides_with_count = in.readUnsignedShort(); Set implNames = new HashSet<>(provides_with_count); for (int j = 0; j < provides_with_count; j++) { int provides_with_index = in.readUnsignedShort(); implNames.add(new ModuleContent.TargetType(CONSTANT_CLASS, provides_with_index, pool.getClassName(provides_with_index))); } builder.provides(index, serviceName, implNames); } } } catch (IOException ioe) { if (bestEffort) { environment.getLogger().error("err.invalid_provides"); } else { throw new FormatError(environment.getLogger(), "err.invalid_provides"); } } moduleContent = builder.build(); } /* Print Module Content */ public void print() { if (moduleContent != null) { String s = moduleContent.toString(); if (!s.isEmpty()) { println(s); } } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/NestHostData.java000066400000000000000000000033721514323636100264240ustar00rootroot00000000000000/* * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.NEST_HOST; /** * The NestHost attribute data *

* NestHost_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 host_class_index; * } * since class file 55.0 (JEP 181) */ public class NestHostData extends AttributeData { public NestHostData(ClassData classData) { super(classData, NEST_HOST); } public String calculateName() { if (this.name == null) { this.name = pool.getClassName(cpx, index -> "%s #%d".formatted(logger.getResourceString("info.invalid_cp_entry"), index)); } return this.name; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/NestMembersData.java000066400000000000000000000036271514323636100271040ustar00rootroot00000000000000/* * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.jasm.JasmTokens; import java.io.DataInputStream; import java.io.IOException; import static java.lang.String.format; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.NEST_MEMBERS; /** * The NestMembers attribute data *

* JEP 181 (Nest-based Access Control): class file 55.0 * NestMembers_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_classes; * u2 classes[number_of_classes]; * } */ public class NestMembersData extends ClassArrayData { public NestMembersData(ClassData cls) { super(cls, JasmTokens.Token.NESTMEMBERS); tableToken = NEST_MEMBERS; } public NestMembersData read(DataInputStream in, int attribute_length) throws IOException, ClassFormatError { return (NestMembersData) super.read(in, attribute_length); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/Options.java000066400000000000000000000166671514323636100255310ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import java.util.EnumSet; import java.util.function.Consumer; import java.util.stream.Collectors; import static java.lang.String.format; import static org.openjdk.asmtools.jdis.Indenter.*; import static org.openjdk.asmtools.jdis.Options.PrintOption.*; /** * The singleton class to share global options among jdis classes. */ public class Options { // Initial options correspond to calling the tool without options. static private final EnumSet PRINT_OPTIONS = EnumSet.of( // default option(s) LABELS); public static String getPrintOptions() { return PRINT_OPTIONS.stream().map(op -> format("%-26s: \"%s\"", op.name(), op.descriptor)). collect(Collectors.joining("\n")); } // Print Options public enum PrintOption { NONE("No options"), CONSTANT_POOL("Constant Pool"), PRINT_BCI("Program Counter - for all instructions"), LABELS("Labels (as identifiers)"), CP_INDEX("CP index along with arguments"), LINE_NUMBER_TABLE_Numbers("Line Numbers in comments"), LINE_NUMBER_TABLE_Lines("Java Source Lines in comments"), LINE_NUMBER_TABLE_Table("LineNumberTable attribute as table"), LINE_NUMBER_TABLE_All("Line Numbers, Source Lines, attribute as Table", (option) -> setGroupOption(option)), LOCAL_VARIABLE_Vars("Print LocalVariableTable attribute"), LOCAL_VARIABLE_Types("Print LocalVariableTypeTable attribute"), LOCAL_VARIABLE_All("Print both LocalVariableTable and LocalVariableTypeTable attributes", (option) -> setGroupOption(option)), HEX("Numbers as hexadecimals"), TRACE("Print internal traces, debug information"), SYSINFO("system information"), NO_COMMENTS("No comments, suppress printing comments"), VERBOSE("Verbose information"), TABLE("Attributes as table"), DROP_Source("Discard SourceFile attribute"), DROP_Signatures("Discard Signature attribute"), DROP_Classes("Discard this_class and super_class pair"), DROP_CharacterRange("Discard CharacterRangeTable attribute"), DROP_All("Discard SourceFile, CharacterRangeTable attributes, this_class and super_class pair", (option) -> setGroupOption(option)), DETAILED_Output("Detailed output"), EXTRA_DETAILED_Output("Detailed output, this_class and super_class pair"), BEST_EFFORT("Print as much as possible despite errors"); final String descriptor; final Consumer action; PrintOption(String descriptor) { this.descriptor = descriptor; this.action = null; } PrintOption(String descriptor, Consumer action) { this.descriptor = descriptor; this.action = action; } public void apply() { if (this.action != null) action.accept(this); else set(this); } /** * @return PR if PR value has format {Prefix}{Any Chars}_{flag} and flag == postfix otherwise null */ public static PrintOption getStringFlag(String prefix, String flag) { for (PrintOption item : PrintOption.values()) { String name = item.name(); if (name.startsWith(prefix)) { int ind = item.name().lastIndexOf('_'); if (ind > 0 && name.substring(ind + 1).equalsIgnoreCase(flag)) { return item; } } } return null; } private static final EnumSet inProgresses = EnumSet.of( DROP_CharacterRange); public boolean isActive() { return !PrintOption.inProgresses.contains(this); } } static private final EnumSet DETAILED_OUTPUT = EnumSet.of( // -g: detailed output format CONSTANT_POOL, PRINT_BCI, CP_INDEX, // Print LocalVariables, LocalVariableTypes only if it's specified. // LOCAL_VARIABLE_Vars, LOCAL_VARIABLE_Types, DETAILED_Output ); static private final EnumSet DROP_ALL = EnumSet.of( // -drop || -drop:all DROP_Source, DROP_Classes, DROP_CharacterRange ); static private final EnumSet LINE_NUMBER_TABLE_ALL = EnumSet.of( LINE_NUMBER_TABLE_Numbers, LINE_NUMBER_TABLE_Lines, LINE_NUMBER_TABLE_Table ); static private final EnumSet LOCAL_VARIABLE_ALL = EnumSet.of( LOCAL_VARIABLE_Vars, LOCAL_VARIABLE_Types ); public static void set(PrintOption val) { if (val == PRINT_BCI) { TABLE_PADDING = OPERAND_PLACEHOLDER_LENGTH + INSTR_PREFIX_LENGTH + 3; } PRINT_OPTIONS.add(val); } public static void unset(PrintOption val) { if (val == PRINT_BCI) { TABLE_PADDING = OPERAND_PLACEHOLDER_LENGTH + INSTR_PREFIX_LENGTH + 1; } PRINT_OPTIONS.remove(val); } public static void setDetailedOutputOptions() { set(DETAILED_OUTPUT); unset(PrintOption.LABELS); } public static void set(EnumSet vals) { for (PrintOption val : vals) { set(val); } } public static void unset(EnumSet vals) { for (PrintOption val : vals) { unset(val); } } public static void setGroupOption(PrintOption option) { switch (option) { case LOCAL_VARIABLE_All -> set(LOCAL_VARIABLE_ALL); case LINE_NUMBER_TABLE_All -> set(LINE_NUMBER_TABLE_ALL); case DROP_All -> set(DROP_ALL); default -> throw new RuntimeException("%s ia not group option".formatted(option.name())); } } public static void setDefaultOutputOptions() { PRINT_OPTIONS.clear(); set(PrintOption.LABELS); } public static boolean contains(PrintOption... vals) { for (PrintOption val : vals) { if (PRINT_OPTIONS.contains(val)) { return true; } } return false; } public static String asShortString() { return format("[ %s ]", PRINT_OPTIONS.stream().map(item -> item.name()).collect(Collectors.joining(", "))); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/ParameterAnnotationData.java000066400000000000000000000061621514323636100306300ustar00rootroot00000000000000/* * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import java.io.DataInputStream; import java.io.IOException; import java.util.ArrayList; /** * 4.7.18. The RuntimeVisibleParameterAnnotations Attribute * 4.7.19. The RuntimeInvisibleParameterAnnotations Attribute * * RuntimeVisibleParameterAnnotations | RuntimeInvisibleParameterAnnotations_attribute { * u2 attribute_name_index; * u4 attribute_length; * u1 num_parameters; * { u2 num_annotations; * annotation annotations[num_annotations]; * } parameter_annotations[num_parameters]; * } * */ public class ParameterAnnotationData extends MemberData{ private final boolean invisible; private ArrayList>> array = null; public ParameterAnnotationData(T data, boolean invisible) { super(data); this.invisible = invisible; } public int numParameters() { return (array == null) ? 0 : array.size(); } public ArrayList> get(int i) { return array.get(i); } public void read(DataInputStream in) throws IOException { int numParams = in.readByte(); environment.traceln("ParameterAnnotationData[%d]:", numParams); array = new ArrayList<>(numParams); for (int paramNum = 0; paramNum < numParams; paramNum++) { int numAnnotations = in.readShort(); environment.traceln(" Param#[%d]: numAnnotations= %d", paramNum, numAnnotations); if (numAnnotations > 0) { // read annotation ArrayList> paramAnnotationList = new ArrayList<>(numAnnotations); for (int annotIndex = 0; annotIndex < numAnnotations; annotIndex++) { AnnotationData annotationData = new AnnotationData(data, invisible); annotationData.read(in); paramAnnotationList.add(annotationData); } array.add(paramNum, paramAnnotationList); } else { array.add(paramNum, null); } } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/PermittedSubclassesData.java000066400000000000000000000034501514323636100306370ustar00rootroot00000000000000/* * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.jasm.JasmTokens; import java.io.DataInputStream; import java.io.IOException; /** * The PermittedSubclasses attribute data *

* JEP 360 (Sealed types): class file 59.65535 * PermittedSubclasses_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_classes; * u2 classes[number_of_classes]; * } */ public class PermittedSubclassesData extends ClassArrayData { public PermittedSubclassesData(ClassData cls) { super(cls, JasmTokens.Token.PERMITTEDSUBCLASSES); } public PermittedSubclassesData read(DataInputStream in, int attribute_length) throws IOException, ClassFormatError { return (PermittedSubclassesData) super.read(in, attribute_length); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/Printable.java000066400000000000000000000025571514323636100260070ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import java.io.IOException; public interface Printable { void print() throws IOException; default boolean isPrintable() { return true; } /** * @return true if a table format is supported */ default boolean tableFormatSupported() { return false; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/RecordData.java000066400000000000000000000147271514323636100261010ustar00rootroot00000000000000/* * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.jasm.JasmTokens; import org.openjdk.asmtools.jasm.TableFormatModel; import java.io.DataInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; import static org.openjdk.asmtools.jasm.JasmTokens.Token.RECORD; /** * The Record attribute data *

* since class file 58.65535 (JEP 359) */ public class RecordData extends MemberData { private List components; public RecordData(ClassData classData) { super(classData); this.tableToken = TableFormatModel.Token.RECORD_DATA; } public RecordData read(DataInputStream in) throws IOException { int count = in.readUnsignedShort(); environment.traceln("components=" + count); components = new ArrayList<>(count); for (int i = 0; i < count; i++) { components.add(new Component(data).read(in)); } return this; } /** * Prints the record data to the current output stream. Called from ClassData. */ @Override public void print() throws IOException { int count = components.size(); if (count > 0) { boolean isExtendedPrintingSupported = tableToken.isExtendedPrintingSupported(); printIndentLn("%s {".formatted(RECORD.parseKey())); for (int i = 0; i < count; i++) { Component cn = components.get(i); cn.setCommentOffset(getCommentOffset() + getIndentSize()).incIndent(); if (isExtendedPrintingSupported && isTableOutput()) cn.tablePrint(i, count); else cn.jasmPrint(i, count); } printIndentLn("}"); } } /** * record_component_info { * u2 name_index; * u2 descriptor_index; * u2 attributes_count; * attribute_info attributes[attributes_count]; * } */ public static class Component extends MemberData { // CP index to a CONSTANT_Utf8_info structure representing a valid unqualified name denoting the record component private int name_cpx; // CP index to a CONSTANT_Utf8_info structure representing a field descriptor which encodes the type of the record component (§4.3.2). private int descriptor_cpx; public Component(ClassData classData) { super(classData); memberType = "RecordData"; } @Override protected boolean handleAttributes(DataInputStream in, EAttribute attributeTag, int attributeLength) throws IOException { // Read the Attributes boolean handled = true; if (attributeTag == EAttribute.ATT_Signature) { if (signature != null) { environment.warning("warn.one.attribute.required", "Signature", "record_component_info"); } signature = new SignatureData(data).read(in, attributeLength); } else { handled = false; } return handled; } /** * Read and resolve the component data called from ClassData. */ public Component read(DataInputStream in) throws IOException { // read the Component CP indexes name_cpx = in.readUnsignedShort(); descriptor_cpx = in.readUnsignedShort(); environment.traceln("RecordComponent: name[%d]=%s descriptor[%d]=%s". formatted(name_cpx, data.pool.getString(name_cpx, index -> "?"), descriptor_cpx, data.pool.getString(descriptor_cpx, index -> "?"))); // Read the attributes readAttributes(in); return this; } /** * Prints the component data to the current output stream. Called from RecordData. */ @Override public void jasmPrint(int index, int size) throws IOException { boolean printSignature = signature != null && signature.isPrintable() && tableFormat; // print component's attributes super.printAnnotations(visibleAnnotations, invisibleAnnotations); super.printAnnotations(visibleTypeAnnotations, invisibleTypeAnnotations); // print component: add synthetic, deprecated if necessary int keywordPadding = getPrintAttributeKeyPadding() + getIndentSize() * 2 - INDENT_STEP; String prefix = PadRight( Indent(getPseudoFlagsAsString()).concat(JasmTokens.Token.COMPONENT.parseKey()), keywordPadding); printVar(new StringBuilder(prefix), null, printSignature ? ":" : ";", name_cpx, descriptor_cpx, UNDEFINED); // print Signature if necessary if (printSignature) { keywordPadding -= getIndentSize() + INDENT_STEP; signature.setKeywordPadding(keywordPadding).incIndent().incIndent(). setCommentOffset(this.getCommentOffset() - getIndentStep() * 2 - INDENT_STEP); signature.print(); } } @Override public void tablePrint(int index, int size) throws IOException { //There are no differences between the simple (jasm) and extended (table) presentations of record_component_info. jasmPrint(index, size); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/SignatureData.java000066400000000000000000000143671514323636100266240ustar00rootroot00000000000000/* * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.common.FormatError; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.jdis.notations.Signature; import org.openjdk.asmtools.jdis.notations.Type; import java.io.DataInputStream; import java.io.IOException; import java.util.function.Function; import static java.lang.String.format; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.SIGNATURE; /** * The Signature attribute data since class file 49.0 *

* Signature_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 signature_index; * } */ public class SignatureData extends MemberData { private int cpIndex; private Type signatureType = null; private int keywordPadding = -1; private String attributeTerminator = ";"; // in some cases, the new line should not end the printed signature private String eol = System.getProperty("line.separator"); public SignatureData(ClassData classData) { super(classData); this.tableToken = SIGNATURE; } public int getCPIndex() { return cpIndex; } @Override public boolean isPrintable() { return !dropSignatures; } public SignatureData read(DataInputStream in, int attribute_length) throws IOException, ClassFormatError { if (attribute_length != 2) { if (bestEffort) { environment.getLogger().error( "err.invalid.attribute.length", EAttribute.ATT_Signature.printValue(), attribute_length); } else { throw new FormatError(environment.getLogger(), "err.invalid.attribute.length", EAttribute.ATT_Signature.printValue(), attribute_length); } } cpIndex = in.readUnsignedShort(); return this; } @Override public String toString() { return format("signature[%d]=%s", cpIndex, pool.StringValue(cpIndex)); } public String getJavaSignature() { if (signatureType == null) { signatureType = new Signature(environment.getLogger(), cpIndex).getType(pool); } return signatureType != null ? signatureType.toString().replace('/', '.') : pool.StringValue(cpIndex); } public Type getSignatureType() { if (signatureType == null) { signatureType = new Signature(environment.getLogger(), cpIndex).getType(pool); } return signatureType; } public SignatureData setKeywordPadding(int keywordPadding) { this.keywordPadding = keywordPadding; return this; } @Override protected int getPrintAttributeKeyPadding() { return keywordPadding == -1 ? super.getPrintAttributeKeyPadding() : keywordPadding; } public SignatureData disableNewLine() { this.eol = ""; return this; } public SignatureData enableNewLine() { this.eol = System.getProperty("line.separator"); return this; } @Override protected void tablePrint() { printIndent(PadRight(tableToken.printKey(), getPrintAttributeKeyPadding())); String sign = pool.StringValue(cpIndex); if (printCPIndex) { if (skipComments) { print("#%d%s".formatted(cpIndex,this.attributeTerminator).concat(eol)); } else { print(PadRight("#%d%s".formatted(cpIndex,this.attributeTerminator), getPrintAttributeCommentPadding())). print(" // ".concat(sign).concat(eol)); } } else { print(sign.concat("%s".formatted(this.attributeTerminator)).concat(eol)); } } @Override protected void jasmPrint() { printIndent(PadRight(SIGNATURE.parseKey(), getPrintAttributeKeyPadding())); String sign = pool.StringValue(cpIndex); if (printCPIndex) { if (skipComments) { print("#%d%s".formatted(cpIndex,this.attributeTerminator).concat(eol)); } else { print(PadRight("#%d%s".formatted(cpIndex,this.attributeTerminator), getPrintAttributeCommentPadding())). print(" // ".concat(sign).concat(eol)); } } else { print(sign.concat("%s".formatted(this.attributeTerminator)).concat(eol)); } } /** * @param checkRange function to check that index belongs CP * @return a string representation of the index and signature used to print the JASM-specific signature * of ClassFile, field_info, method_info, or record_component_info. * Alternatively, return an empty pair (new Pair("", "")) if extended (table-specific) printing is requested. */ public Pair getJasmPrintInfo(Function checkRange) { return (tableFormat) ? new Pair<>("", "") : new Pair<>(format(":#%d", cpIndex), checkRange.apply(cpIndex) ? ":" + pool.StringValue(cpIndex) : ":?%d Invalid constant_pool index".formatted(cpIndex)); } public void terminateMethodSignature(boolean value) { this.attributeTerminator = value ? ";" : ","; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/SourceDebugExtensionData.java000066400000000000000000000042061514323636100307560ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import java.io.DataInputStream; import java.io.IOException; import java.util.List; import static org.openjdk.asmtools.asmutils.StringUtils.readUtf8String; import static org.openjdk.asmtools.jasm.JasmTokens.Token.SOURCEDEBUGEXTENSION; /** * The SourceDebugExtension attribute *

* SourceDebugExtension_attribute { * u2 attribute_name_index; * u4 attribute_length; * u1 debug_extension[attribute_length]; * } */ public class SourceDebugExtensionData extends Indenter { List debug_extension; public SourceDebugExtensionData(ClassData classData) { super(classData.toolOutput); } public SourceDebugExtensionData read(DataInputStream in, int attribute_length) throws IOException, ClassFormatError { debug_extension = readUtf8String(in, attribute_length, 76 - getIndentSize()); return this; } @Override public void print() { printIndentLn(SOURCEDEBUGEXTENSION.parseKey() + " {"); incIndent(); debug_extension.forEach(s -> printIndentLn(s)); decIndent(); printIndentLn("}"); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/SourceFileData.java000066400000000000000000000035761514323636100267230ustar00rootroot00000000000000/* * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.SOURCE_FILE; /** * The SourceFile attribute since 45.3 *

* SourceFile_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 sourcefile_index; * } */ public class SourceFileData extends AttributeData { public SourceFileData(ClassData classData) { super(classData, SOURCE_FILE); } @Override public boolean isPrintable() { return !dropSourceFile && calculateName() != null; } public String calculateName() { if (this.name == null) { this.name = pool.getString(cpx, index -> null); } return this.name; } public SourceFileData getName() { name = pool.getString(cpx, index -> "#%d".formatted(index)); return this; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/StackMapData.java000066400000000000000000000513731514323636100263640ustar00rootroot00000000000000/* * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.asmutils.Pair; import org.openjdk.asmtools.asmutils.Range; import org.openjdk.asmtools.common.structure.EAttribute; import org.openjdk.asmtools.common.structure.StackMap; import java.io.DataInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; import static org.openjdk.asmtools.asmutils.StringUtils.mapToHexString; import static org.openjdk.asmtools.common.structure.EAttribute.ATT_StackMap; import static org.openjdk.asmtools.common.structure.EAttribute.ATT_StackMapTable; import static org.openjdk.asmtools.common.structure.StackMap.EntryType.EARLY_LARVAL; import static org.openjdk.asmtools.common.structure.StackMap.EntryType.FULL_FRAME; import static org.openjdk.asmtools.jasm.JasmTokens.Token.*; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.STACK_MAP; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.STACK_MAP_TABLE; /** * Represents one entry of StackMapTable attribute: *

* union stack_map_entry { * same_frame; * same_locals_1_stack_item_frame; * same_locals_1_stack_item_frame_extended; * chop_frame; * same_frame_extended; * append_frame; * full_frame; * } *

* or StackMap attribute *

* stack_map_entry { * u2 offset; * u2 number_of_locals; * verification_type_info locals[number_of_locals]; * u2 number_of_stack_items; * verification_type_info stack[number_of_stack_items]; * } * * @see Code Attribute * @see StackMapTable Attribute */ public class StackMapData extends MemberData { static Range range = new Range<>(247, 255); private final EAttribute attribute; StackMap.EntryType stackEntryType; // stack frame type value int stackEntryTypeValue; boolean isWrapped = false; int wrapLevel = 0; // isWrapped == false int frame_pc; int offset; int[] lockMap; int[] stackMap; int[] unsetFields; private Printer printer; private int doubleIndent = getIndentStep() * 2; private int tripleIndent = getIndentStep() * 3; private String intLine = ""; private String strLine = ""; private int shift; private String tableHeader = ""; @FunctionalInterface public interface Printer { void accept(Integer t, Integer u) throws IOException; } /** * Prints the StackMap data in Jasm format. * * @param index the index of the current entry * @param size the total number of entries * @throws IOException if an I/O error occurs while printing */ @Override protected void jasmPrint(int index, int size) throws IOException { incIndent(); if (index == 0) { printIndentLn(tableHeader); } printer.accept(index, size); decIndent(); } private void stackMapPrinter(int index, int size) throws IOException { println(enlargedIndent(intLine.formatted(BYTECODEOFFSET.parseKey(), frame_pc), getIndentStep())); for (Map.Entry> entry : Map.of( "%-10s".formatted(STACKMAP.parseKey()), new Pair<>(stackMap != null, stackMap), "%-10s".formatted(LOCALSMAP.parseKey()), new Pair<>(lockMap != null, lockMap)).entrySet()) { if (entry.getValue().first) { int[] map = entry.getValue().second; Pair line = getMapListAsString(map, " "); String record = strLine.formatted(entry.getKey(), "[" + (printCPIndex ? line.first : line.second) + "]"); if (printCPIndex) { if (skipComments) { println(enlargedIndent(record, getIndentStep() * 2)); } else { print(PadRight(enlargedIndent(record, getIndentStep()), getCommentOffsetFor(27, 2))); println(map.length == 0 ? "" : " //" + line.second); } } else { println(enlargedIndent(record, getIndentStep() * 2)); } } } } private void stackMapTablePrinter(int index, int size) { String strFrameType = intLine.formatted(FRAMETYPE.parseKey(), stackEntryTypeValue); int padding = 0; if (isWrapped) { incIndent(wrapLevel); } if (skipComments && printCPIndex) { printIndentLn(strFrameType); } else { padding = doubleIndent + ((printCPIndex) ? getCommentOffsetFor(strFrameType, 2) : strFrameType.length() + padding * getIndentStep()); if (printCPIndex) { printIndent(PadRight(strFrameType, padding - getIndentStep() * (wrapLevel + 2))); println(skipComments ? "" : " // " + stackEntryType.printName()); } else { printIndent(PadRight(strFrameType, padding - getIndentStep() * wrapLevel)); println(skipComments ? "" : " // " + stackEntryType.printName()); } } if (range.in(stackEntryTypeValue)) { println(enlargedIndent(intLine.formatted(OFFSETDELTA.parseKey(), offset), doubleIndent)); } if (stackEntryType == EARLY_LARVAL) { if (unsetFields != null) { final int limit = unsetFields.length - 1; String delim = limit >= 0 ? "; " : ""; String prefix = "%-12s".formatted(UNSETFIELDS.parseKey()); Pair, List> line = getFieldListAsString(unsetFields); String left = line.first.stream().collect(Collectors.joining(", ")).concat(delim); String right = line.second.stream().collect(Collectors.joining(", ")).concat(delim); String record = strLine.formatted(prefix, "[ " + (printCPIndex ? left : right) + "] {"); if (printCPIndex) { if (skipComments) { println(enlargedIndent(record, doubleIndent)); } else { if (limit <= 0) { print(PadRight(enlargedIndent(record, doubleIndent), padding)); println(unsetFields.length == 0 ? "" : " // " + right); } else { String str = PadRight(enlargedIndent(strLine.formatted( prefix, "[ " + line.first.get(0).concat(",")), doubleIndent), padding); int offs = str.indexOf('[') - INDENT_STEP * (wrapLevel + 1); print(str).println(" // " + line.second.get(0)); for (int i = 1; i <= limit; i++) { delim = i == limit ? "; ] {" : ","; String id = line.first.get(i); String field = line.second.get(i); print(PadRight(enlargedIndent(id.concat(delim), offs), padding)). println(" // " + field); } } } } else { if (limit <= 0) { println(enlargedIndent(record, doubleIndent)); } else { // first element println(enlargedIndent(strLine.formatted( prefix, "[ " + line.second.get(0).concat(",")), doubleIndent)); for (int i = 1; i <= limit; i++) { delim = i == limit ? "; ] {" : ","; String field = line.second.get(i); println(enlargedIndent(" %s%s".formatted(field, delim), padding - 2)); } } } } } else { for (Map.Entry> entry : Map.of( STACKMAP.parseKey(), new Pair<>(stackMap != null, stackMap), LOCALSMAP.parseKey(), new Pair<>(lockMap != null, lockMap)).entrySet()) { if (entry.getValue().first) { // map found int[] map = entry.getValue().second; Pair line = getMapListAsString(map, " "); String record = "[" + (printCPIndex ? line.first : line.second) + "]"; if (printCPIndex) { if (skipComments) { println(enlargedIndent(strLine.formatted(entry.getKey(), record), doubleIndent)); } else { print(PadRight(enlargedIndent(strLine.formatted(entry.getKey(), record), doubleIndent), padding)). println(" //" + line.second); } } else { println(enlargedIndent(strLine.formatted(entry.getKey(), record), doubleIndent)); } } } if (isWrapped) { for (int i = 0; i < wrapLevel; i++) { println(enlargedIndent(" }", (printCPIndex) ? tripleIndent : doubleIndent)); decIndent(); } } } } @Override protected void tablePrint(int index, int size) throws IOException { //There are no differences between the simple (jasm) and extended (table) presentations of StackMapTable attribute. this.jasmPrint(index, size); } @Override public boolean isPrintable() { return tableFormat; } /** * Constructor for ATT_StackMap (Java 5,6) * * @param code the code attribute where this attribute is located * @param in the input stream * @throws IOException the exception if something went wrong */ public StackMapData(CodeData code, DataInputStream in) throws IOException { super(code); this.attribute = ATT_StackMap; super.memberType = ATT_StackMap.parseKey(); super.tableToken = STACK_MAP; this.printer = this::stackMapPrinter; this.stackEntryType = FULL_FRAME; this.stackEntryTypeValue = FULL_FRAME.fromTag(); this.frame_pc = in.readUnsignedShort(); this.lockMap = readMap(in); this.stackMap = readMap(in); environment.traceln(() -> " stack_map_entry:pc=%d numloc=%s numstack=%s".formatted(frame_pc, mapToHexString(lockMap), mapToHexString(stackMap))); } /** * Constructor for ATT_StackMapTable (Java 6, 7+) * * @param firstStackMap is it an entries[0] in the stack_map_entry structure? i.e. Does the StackMapData describe * the second stack map frame of the method? * @param prevFrame_pc the bytecode offset of the previous entry (entries[current_index-1]) * @param code the code attribute where this attribute is located * @param in the input stream * @throws IOException the exception if something went wrong */ public StackMapData(boolean firstStackMap, int prevFrame_pc, CodeData code, DataInputStream in) throws IOException { super(code); this.attribute = ATT_StackMapTable; super.memberType = ATT_StackMapTable.parseKey(); super.tableToken = STACK_MAP_TABLE; stackEntryTypeValue = in.readUnsignedByte(); stackEntryType = StackMap.stackMapEntryType(stackEntryTypeValue); printer = this::stackMapTablePrinter; switch (stackEntryType) { case EARLY_LARVAL -> { // Valhalla: The entry type is early_larval_frame (246) offset = UNDEFINED; this.unsetFields = readFields(in); environment.traceln(() -> " early_larval_frame=%d".formatted(stackEntryTypeValue)); } case SAME_FRAME -> { // The entry type is same_frame; offset = stackEntryTypeValue; environment.traceln(() -> " same_frame=%d".formatted(stackEntryTypeValue)); } case SAME_FRAME_EXTENDED -> { // The entry type is same_frame_extended; offset = in.readUnsignedShort(); environment.traceln(() -> " same_frame_extended=%d, offset=%d".formatted(stackEntryTypeValue, offset)); } case SAME_LOCALS_1_STACK_ITEM_FRAME -> { // The entry type is same_locals_1_stack_item_frame offset = stackEntryTypeValue - 64; stackMap = readMapElements(in, 1); environment.traceln(() -> " same_locals_1_stack_item_frame=%d, offset=%d, numstack=%s".formatted( stackEntryTypeValue, offset, mapToHexString(stackMap))); } case SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED -> { // The entry type is same_locals_1_stack_item_frame_extended offset = in.readUnsignedShort(); stackMap = readMapElements(in, 1); environment.traceln(() -> " same_locals_1_stack_item_frame_extended=%d, offset=%d, numstack=%s".formatted( stackEntryTypeValue, offset, mapToHexString(stackMap))); } case CHOP_1_FRAME, CHOP_2_FRAME, CHOP_3_FRAME -> { // The entry type is chop_frame offset = in.readUnsignedShort(); environment.traceln(() -> " chop_frame=%d offset=%d".formatted(stackEntryTypeValue, offset)); } case APPEND_FRAME -> { // The entry type is append_frame offset = in.readUnsignedShort(); lockMap = readMapElements(in, stackEntryTypeValue - 251); environment.traceln(() -> " append_frame=%d offset=%d numlock=%s".formatted( stackEntryTypeValue, offset, mapToHexString(lockMap))); } case FULL_FRAME -> { // The entry type is full_frame offset = in.readUnsignedShort(); lockMap = readMap(in); stackMap = readMap(in); environment.traceln(() -> " full_frame=%d offset=%d numloc=%s numstack=%s".formatted( stackEntryTypeValue, offset, mapToHexString(lockMap), mapToHexString(stackMap))); } default -> environment.traceln(() -> "incorrect entry_type argument"); } if (prevFrame_pc <= 0 && firstStackMap) { frame_pc = offset; } else { frame_pc = prevFrame_pc + offset + 1; } } /** * @return the bytecode offset at which a stack map frame applies */ public int getFramePC() { return frame_pc; } public StackMap.EntryType getStackEntryType() { return stackEntryType; } public Pair, List> getFieldListAsString(int[] fields) { int count = fields.length; ArrayList left = new ArrayList<>(count); ArrayList right = new ArrayList<>(count); for (int index : fields) { if (data.printCPIndex) { left.add("#%d".formatted(index)); } right.add(data.pool.getFieldNameTypeAsString(index)); } return new Pair<>(left, right); } public Pair getMapListAsString(int[] map, String delimiter) { if (map == null || map.length == 0) { return new Pair<>("", ""); } StringBuilder left = new StringBuilder(); StringBuilder right = new StringBuilder(); int count = map.length - 1; for (int k = 0; k <= count; k++) { if (k == 0) { left.append(delimiter); right.append(delimiter); } int fullMapType = map[k]; int mtVal = fullMapType & 0xFF; StackMap.VerificationType mapVerificationType = StackMap.getVerificationType(mtVal, Optional.of((s, a) -> environment.error(s, a))); String prefix = k == 0 ? "" : " "; int argument = fullMapType >> 8; switch (mapVerificationType) { case ITEM_Object -> { if (data.printCPIndex) { left.append(prefix).append("#").append(argument); } right.append(prefix).append(data.pool.ConstantStrValue(argument)); } case ITEM_NewObject -> { if (data.printCPIndex) { left.append(prefix).append(mtVal); left.append(" ").append(getLabelPrefix()).append(argument); } right.append(prefix).append(mapVerificationType.printName()); right.append(" ").append(getLabelPrefix()).append(argument); } default -> { if (data.printCPIndex) { left.append(prefix).append(mtVal); } right.append(prefix).append(mapVerificationType.printName()); } } if (data.printCPIndex) { left.append(k == count ? ';' : ','); } right.append((k == count ? ';' : ',')); if (k == count) { left.append(delimiter); right.append(delimiter); } } return new Pair<>(left.toString(), right.toString()); } /** * @return true if the entity presents a StackMapTable since Java 6 */ public boolean belongsToStackMapTable() { return attribute == ATT_StackMapTable; } /** * Sets helper printing particles */ public StackMapData setPrintParticles(String intLine, String strLine, int shift) { this.intLine = intLine; this.strLine = strLine; this.shift = shift; return this; } /** * Sets table header */ public StackMapData setHeader(String header) { this.tableHeader = header; return this; } private int[] readMap(DataInputStream in) throws IOException { int num = in.readUnsignedShort(); return readMapElements(in, num); } private int[] readFields(DataInputStream in) throws IOException { int num = in.readUnsignedShort(); int[] fields = new int[num]; for (int i = 0; i < num; i++) { fields[i] = in.readUnsignedShort(); } return fields; } private int[] readMapElements(DataInputStream in, int num) throws IOException { int[] map = new int[num]; for (int k = 0; k < num; k++) { int mt_val; mt_val = in.readUnsignedByte(); StackMap.VerificationType stackMapVerificationType = StackMap.getVerificationType(mt_val, Optional.of((s, a) -> environment.error(s, a))); switch (stackMapVerificationType) { case ITEM_Object -> mt_val = mt_val | (in.readUnsignedShort() << 8); case ITEM_NewObject -> { int pc = in.readUnsignedShort(); data.getInstructionAttribute(pc).referred = true; mt_val = mt_val | (pc << 8); } } map[k] = mt_val; } return map; } private int getCommentOffsetFor(String line, int shiftCount) { return owner.getPrintAttributeCommentPadding() + shift + line.length() - shiftCount * getIndentStep() - 2; } private int getCommentOffsetFor(int lineLength, int shiftCount) { return owner.getPrintAttributeCommentPadding() + shift + lineLength - shiftCount * getIndentStep() - 2; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/StackMapTable.java000066400000000000000000000104761514323636100265410ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.structure.EAttribute; import java.io.IOException; import java.util.ArrayList; import static org.openjdk.asmtools.jasm.JasmTokens.Token.*; /** * StackMapTable_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_entries; * stack_map_frame entries[number_of_entries]; * } */ public class StackMapTable extends Container { private final EAttribute attribute; // Container for flags of elements: true is for a container element is a wrapper // (i.e. early_larval_frame) for the next one. protected final ArrayList wrappers; private String jasmHeader = ": number_of_entries = %d"; private String intLine = "n/a"; private String strLine = "n/a"; private int shift; /** * @param attribute either Implicit stack map attribute or the StackMapTable attribute of the container * @param owner * @param initialCapacity initial capacity of the stack_map_frame entries[number_of_entries]; */ public StackMapTable(EAttribute attribute, CodeData owner, int initialCapacity) { super(owner, StackMapData.class, initialCapacity); this.wrappers = new ArrayList<>(initialCapacity); this.attribute = attribute; switch (this.attribute) { case ATT_StackMap -> { shift = owner.calculateInlinedTitleShift(LOCALSMAP.parseKey()); jasmHeader = STACKMAP_HEADER.parseKey() + jasmHeader; } case ATT_StackMapTable -> { shift = owner.calculateInlinedTitleShift(FRAMETYPE.parseKey()); jasmHeader = STACKMAPTABLE_HEADER.parseKey() + jasmHeader; } default -> throw new IllegalStateException("Unexpected value: " + this.attribute); } intLine = "%" + shift + "s = %-3d"; strLine = "%" + shift + "s = %s"; } public void add(StackMapData element, boolean isWrapper) throws IOException { element.setPrintParticles(intLine, strLine, shift); super.add(element); wrappers.add(isWrapper); } public int real_size() { int mWrappers = (int) wrappers.stream() .filter(Boolean::booleanValue) .count(); return elements.size() - mWrappers; } /** * Prints StackMapTable_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_entries; * stack_map_frame entries[number_of_entries]; * } * * There are no differences between the simple (jasm) and extended (table) presentations of StackMapTable attribute. * * @throws IOException if an I/O error occurs while printing */ @Override public void print() throws IOException { int size = this.size(); if (size > 0) { elements.get(0).setHeader(jasmHeader.formatted(real_size())); setMaxPrintSize(getPrintSize()); for (int i = 0; i < size; i++) { StackMapData element = elements.get(i); element.setCommentOffset(this.getCommentOffset()); element.jasmPrint(i, size); } } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/TextLines.java000066400000000000000000000040151514323636100257750ustar00rootroot00000000000000/* * Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; /** * A container for the java sources tied to an asm output when -sl in on */ public class TextLines { final Path file; List lines; public TextLines(Path directory, String sourceFileName) { file = directory == null ? Paths.get(sourceFileName) : directory.resolve(sourceFileName); try { lines = Files.readAllLines(file, StandardCharsets.UTF_8); } catch (IOException ignore) {} } public String getLine(int index) { if( lines != null ) { if (index < 1 || index >= lines.size()) { return String.format("Line number %d is out of range in \"%s\"", index, file); } return lines.get(index - 1); } return String.format("\"%s\" not found", file); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/TrapData.java000066400000000000000000000034551514323636100255650ustar00rootroot00000000000000/* * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import java.io.DataInputStream; import java.io.IOException; /** * Exception table entry (JVMS 4.7.3 The Code Attribute) describes one exception handler * in the code array {@link CodeData}. */ class TrapData { int num; // exception_table int start_pc, // u2 end_pc, // u2 handler_pc, // u2 catch_cpx; // u2 public TrapData(DataInputStream in, int num) throws IOException { this.num = num; start_pc = in.readUnsignedShort(); end_pc = in.readUnsignedShort(); handler_pc = in.readUnsignedShort(); catch_cpx = in.readUnsignedShort(); } // returns recommended identifier public String id() { return "T" + num; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/TypeAnnotationData.java000066400000000000000000000254421514323636100276330ustar00rootroot00000000000000/* * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.jasm.TypeAnnotationTargetInfoData; import org.openjdk.asmtools.jasm.TypeAnnotationTypePathData; import java.io.DataInputStream; import java.io.IOException; import static org.openjdk.asmtools.jasm.TypeAnnotationTargetInfoData.*; import static org.openjdk.asmtools.jasm.TypeAnnotationTypes.*; /** * Type Annotation data is a specific kind of AnnotationData. As well as the normal data * items needed to present an annotation, Type annotations require a TargetInfo * descriptor. This descriptor is based on a TargetType, and it optionally may contain a * location descriptor (when the Type is embedded in a collection). *

* The TypeAnnotationData class is based on JDis's AnnotationData class, and contains the * (jasm) class for representing TargetInfo. */ public class TypeAnnotationData extends AnnotationData { private final TargetTypeVisitor targetTypeVisitor = new TargetTypeVisitor(); private TypeAnnotationTargetInfoData targetInfo; private final TypeAnnotationTypePathData typePath; public TypeAnnotationData(T data, boolean invisible) { super(data, invisible); targetInfo = null; typePath = new TypeAnnotationTypePathData(); visibleAnnotationToken = "@T+"; invisibleAnnotationToken = "@T-"; dataName = "TypeAnnotationData"; } @Override public void read(DataInputStream in) throws IOException { int targetTypeID = in.readUnsignedByte(); ETargetType targetType = ETargetType.getTargetType(targetTypeID); if (targetType == null) { // Throw some kind of error for bad target type index throw new IOException("Bad target type: " + targetTypeID + " in TypeAnnotationData"); } // read the target info targetTypeVisitor.init(in); targetTypeVisitor.visitExcept(targetType); targetInfo = targetTypeVisitor.getTargetInfo(); // read the target path info int len = in.readUnsignedByte(); environment.traceln("[TypeAnnotationData.read]: Reading Location (length = " + len + ")."); environment.trace("[TypeAnnotationData.read]: [ "); for (int i = 0; i < len; i++) { int pathType = in.readUnsignedByte(); String pk = (getPathKind(pathType)).parseKey(); char pathArgIndex = (char) in.readUnsignedByte(); typePath.addTypePathEntry(new TypePathEntry(pathType, pathArgIndex)); environment.trace(" " + pk + "(" + pathType + "," + pathArgIndex + "), "); } environment.traceln("] "); super.read(in); } @Override protected void printBody() throws IOException { // For a type annotation, print out brackets, // print out the (regular) annotation name/value pairs, // then print out the target types. /* Previous version -------------------------------------------------------------------------------------------- out.print(" {"); super.printBody(out, ""); targetInfo.print(out, tab); typePath.print(out, tab); out.print(tab + "}"); -------------------------------------------------------------------------------------------- */ if (isEmpty()) { // Marker annotation print(" { { }"); } else { println(" {"); setElementState(AnnotationElementState.INLINED_ELEMENT); super.printBody(); } print(targetInfo.toPrintString()); String location = typePath.toPrintString(); if (!location.isBlank()) { print(location + " "); } print("}"); } /** * Target Type visitor, used for constructing the target-info within a type * annotation. visitExcept() is the entry point. ti is the constructed target info. */ private class TargetTypeVisitor extends TypeAnnotationTargetVisitor { private TypeAnnotationTargetInfoData targetInfo = null; private IOException IOProb = null; private DataInputStream in; public void init(DataInputStream in) { this.in = in; } public int scanByteVal() { int val = 0; try { val = in.readUnsignedByte(); } catch (IOException e) { IOProb = e; } return val; } public int scanShortVal() { int val = 0; try { val = in.readUnsignedShort(); } catch (IOException e) { IOProb = e; } return val; } //This is the entry point for a visitor that tunnels exceptions public void visitExcept(ETargetType targetType) throws IOException { IOProb = null; targetInfo = null; environment.traceln("Target Type: " + targetType.parseKey()); visit(targetType); if (IOProb != null) { throw IOProb; } } public TypeAnnotationTargetInfoData getTargetInfo() { return targetInfo; } private boolean error() { return IOProb != null; } @Override public void visit_type_param_target(ETargetType targetType) { environment.trace("Type Param Target: "); int paramIndex = scanByteVal(); environment.traceln("{ param_index: " + paramIndex + "}"); if (!error()) { targetInfo = new type_parameter_target(targetType, paramIndex); } } @Override public void visit_supertype_target(ETargetType targetType) { environment.trace("SuperType Target: "); int typeIndex = scanShortVal(); environment.traceln("{ type_index: " + typeIndex + "}"); if (!error()) { targetInfo = new supertype_target(targetType, typeIndex); } } @Override public void visit_typeparam_bound_target(ETargetType targetType) { environment.trace("TypeParam Bound Target: "); int paramIndex = scanByteVal(); if (error()) { return; } int boundIndex = scanByteVal(); if (error()) { return; } environment.traceln("{ param_index: " + paramIndex + " bound_index: " + boundIndex + "}"); targetInfo = new type_parameter_bound_target(targetType, paramIndex, boundIndex); } @Override public void visit_empty_target(ETargetType targetType) { environment.traceln("Empty Target: "); if (!error()) { targetInfo = new empty_target(targetType); } } @Override public void visit_methodformalparam_target(ETargetType targetType) { environment.trace("MethodFormalParam Target: "); int paramIndex = scanByteVal(); environment.traceln("{ param_index: " + paramIndex + "}"); if (!error()) { targetInfo = new formal_parameter_target(targetType, paramIndex); } } @Override public void visit_throws_target(ETargetType targetType) { environment.trace("Throws Target: "); int exceptionIndex = scanShortVal(); environment.traceln("{ exception_index: " + exceptionIndex + "}"); if (!error()) { targetInfo = new throws_target(targetType, exceptionIndex); } } @Override public void visit_localvar_target(ETargetType targetType) { environment.traceln("LocalVar Target: "); int tableLength = scanShortVal(); // table length (short) if (error()) { return; } localvar_target locvartab = new localvar_target(targetType, tableLength); targetInfo = locvartab; for (int i = 0; i < tableLength; i++) { int startPC = scanShortVal(); if (error()) { return; } int length = scanShortVal(); if (error()) { return; } int CPX = scanShortVal(); environment.trace("LocalVar[" + i + "]: "); environment.traceln("{ startPC: " + startPC + ", length: " + length + ", CPX: " + CPX + "}"); locvartab.addEntry(startPC, length, CPX); } } @Override public void visit_catch_target(ETargetType targetType) { environment.trace("Catch Target: "); int catchIndex = scanShortVal(); environment.traceln("{ catch_index: " + catchIndex + "}"); if (!error()) { targetInfo = new catch_target(targetType, catchIndex); } } @Override public void visit_offset_target(ETargetType targetType) { environment.trace("Offset Target: "); int offsetIndex = scanShortVal(); environment.traceln("{ offset_index: " + offsetIndex + "}"); if (!error()) { targetInfo = new offset_target(targetType, offsetIndex); } } @Override public void visit_typearg_target(ETargetType targetType) { environment.trace("TypeArg Target: "); int offset = scanShortVal(); if (error()) { return; } int typeIndex = scanByteVal(); if (error()) { return; } environment.traceln("{ offset: " + offset + " type_index: " + typeIndex + "}"); targetInfo = new type_argument_target(targetType, offset, typeIndex); } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/Utf8ArrayData.java000066400000000000000000000046531514323636100265050ustar00rootroot00000000000000package org.openjdk.asmtools.jdis; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.jasm.ConstantPool; import org.openjdk.asmtools.jasm.DataVector; import org.openjdk.asmtools.jasm.JasmTokens; public class Utf8ArrayData extends ClassArrayData { protected > Utf8ArrayData(M classData, JasmTokens.Token token) { super(classData, token); } public void jasmPrintShort() { StringBuilder indexes = new StringBuilder(); StringBuilder names = new StringBuilder(); int lastIndex = this.indexes.length - 1; String eoNames = (printCPIndex) ? "" : ";"; for (int i = 0; i <= lastIndex; i++) { if (printCPIndex) { indexes.append("#").append(this.indexes[i]).append(i == lastIndex ? ";" : ", "); } names.append(pool.StringValue(this.indexes[i])).append(i == lastIndex ? eoNames : ", "); } printIndent(PadRight(token.parseKey(), getPrintAttributeKeyPadding())); if (printCPIndex) { if (skipComments) { println(indexes.toString()); } else { print(PadRight(indexes.toString(), getPrintAttributeCommentPadding())).println(" // " + names); } } else { println(names.toString()); } } public void jasmPrintLong() { String name = token.parseKey(); String locIndent = " ".repeat(name.length()); int lastIndex = indexes.length - 1; for (int i = 0; i <= lastIndex; i++) { if (printCPIndex) { if (skipComments) { printIndent(PadRight((i == 0) ? name : locIndent, getPrintAttributeKeyPadding())). print("#%d".formatted(indexes[i])).println(i == lastIndex ? ";" : ","); } else { printIndent(PadRight((i == 0) ? name : locIndent, getPrintAttributeKeyPadding())). print(PadRight("#%d%s".formatted(indexes[i], (i == lastIndex) ? ";" : ","), getPrintAttributeCommentPadding())). println(" // %s".formatted(pool.StringValue(indexes[i]))); } } else { printIndent(PadRight((i == 0) ? name : locIndent, getPrintAttributeKeyPadding())). print(pool.StringValue(indexes[i])).println(i == lastIndex ? ";" : ","); } } } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/Utils.java000066400000000000000000000040371514323636100251620ustar00rootroot00000000000000/* * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; public class Utils { static public String javaName(String name) { if (name == null) { return "null"; } int len = name.length(); if (len == 0) { return "\"\""; } char cc = '/'; fullname: { // xxx/yyy/zzz for (int k = 0; k < len; k++) { char c = name.charAt(k); if (cc == '/') { if (!Character.isJavaIdentifierStart(c) && c != '-') { break fullname; } } else if (c != '/') { if (!Character.isJavaIdentifierPart(c) && c != '-') { break fullname; } } cc = c; } return name; } return "\"" + name + "\""; } static public boolean isClassArrayDescriptor(String name) { return (name != null) && name.startsWith("["); } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/i18n.properties000066400000000000000000000130301514323636100261050ustar00rootroot00000000000000# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. info.usage=\ Usage: java -jar asmtools.jar jdis [options] |- decompile into jasm file(s)\n\ \ if - is provided, is used\n\ where possible options include: # see also shared section in asmtools/i18 info.opt.g=\ \ -g Generate a detailed output format. info.opt.b=\ \ -best-effort Print as much information as possible despite errors; suppresses the -v option. info.opt.gg=\ \ -gg Generate a detailed output format. This includes displaying\ \nthe pair of this_class and super_class. info.opt.lnt=\ \ -lnt:\n Print the LineNumberTable attribute in a Code attribute:\ \n table - print the LineNumberTable attribute as a table \ \n numbers - print numbers of source lines in inlined comments\ \n lines - print Java source lines if a class file with LineNumberTable attribute and Java source file are in the same folder\ \n all - print both line numbers and Java source lines in inlined comments, and LineNumberTable attribute as a table\ \nThe ''-lnt'' without parameters functions the same way as ''-lnt:all'' info.opt.lvt=\ \ -lvt:\n Print LocalVariableTable,LocalVariableTypeTable attributes in a Code attribute:\ \n vars - print LocalVariableTable attribute\ \n types - print LocalVariableTypeTable attribute\ \n all - print both LocalVariableTable and LocalVariableTypeTable attributes\ \nThe ''-lvt'' without parameters functions the same way as ''-lvt:all'' info.opt.instr.offset=\ \ -pc Print instruction offsets when the output is not detailed with the options -g or -gg. info.opt.nc=\ \ -nc Don''t print comments info.opt.hx=\ \ -hx Generate floating-point constants in hexadecimal format. info.opt.table=\ \ -table Print specific attributes in a table format resembling the style of the ''javap'' command. info.opt.sysinfo=\ \ -sysinfo Show system info (path, size, date, SHA-256 hash) of class being processed info.opt.drop=\ \ -drop:\n Discard some attributes or their groups where:\ \n source - SourceFile attribute\ \n classes - this_class, super_class pair\ \n all - SourceFile attribute, this_class and super_class pair\ \n The ''-drop'' without parameters functions the same way as ''-drop:all'' #info.opt.drop.ex=\ #\ -drop:\n Discard some attributes or their groups where:\ #\n all=SourceFile,CharacterRange\ #\nThe ''-drop'' without parameters functions the same way as ''-drop:all'' err.cannot.write=Cannot write to {0} err.invalid_option=Invalid option: {0} err.invalid_parameter_of_option=Invalid parameter \"{0}\" of option: {1} err.option.unsupported=Not implemented yet: {0} err.not_found=No such file: {0} err.count.issues={0}{1}in the file: {2} err.unknown.tag=Unknown tag in annotation \"{0}\" [0x{1}] err.invalid.attribute.length={0}: Invalid attribute length #{1} warn.one.attribute.required=There is more than one \"{0}\" attribute in the attributes table of a \"{1}\" structure. The last one is used. warn.attribute.name.corrupted=The value of the attribute_name_index #{0} item is not a valid index into the constant_pool table. The attribute is ignored. warn.attribute.name.incorrect=The attribute_name_index #{0} refers to an unknown attribute name. The attribute is ignored. warn.attribute.type.incorrect=The constant_pool entry \"{0}\" is not of an appropriate type for the field. warn.attribute.constantvalue.incorrect=The constantvalue_index \"{0}\" is not a valid index into the constant_pool table. warn.attribute.constantvalue.unrecognized=Unrecognized constantvalue_index: #{0} [ {1} ] warn.field.nametype.required=The ConstantPool[{0}] must be a CONSTANT_NameAndType_info structure with a field descriptor err.invalid_header=Invalid Module attributes table err.invalid_requires=Invalid requires table err.invalid_exports=Invalid exports table err.invalid_opens=Invalid opens table err.invalid_uses=Invalid uses table err.invalid_provides=Invalid provides table err.invalid.desc=Invalid descriptor \"{0}\" err.invalid.desc.at=Descriptor is invalid at offset \"{0}\" in \"{1}\" err.eof=The end of the file was unexpectedly reached while reading class data info.corrupted_cp_entry=??? The entry is missing from the constant_pool table info.invalid_cp_entry=??? Invalid constant_pool reference info.corrupted_bootstrap_method_ref=??? Invalid bootstrap method reference warn.wrong.magic=The magic number identifying the class file format is expected to be {0}. The invalid magic number {1} will be ignored. err.out.of.range=The index {0} is out of range for the code array of the method. jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/notations/000077500000000000000000000000001514323636100252315ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/notations/Descriptor.java000066400000000000000000000137221514323636100302170ustar00rootroot00000000000000/* * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis.notations; import org.openjdk.asmtools.common.FormatError; import org.openjdk.asmtools.common.ToolLogger; import org.openjdk.asmtools.jdis.ConstantPool; /** * See JVMS, section 4.4. */ public class Descriptor { private static final int UNDEF = -1; public static class InvalidDescriptor extends FormatError { InvalidDescriptor(T logger, String desc) { super(logger, "err.invalid.desc", desc); } InvalidDescriptor(T logger, String desc, int index) { super(logger, "err.invalid.desc.at", index, desc); } } public final int index; public final String descriptor; public final T logger; /** * Constructor for the descriptor placed in the constant_pool * * @param logger to log any exceptions if they occur. * @param index a valid reference into the constant_pool table */ public Descriptor(T logger, int index) { this.index = index; this.descriptor = null; this.logger = logger; } /** * Constructor for the descriptor presented as String * * @param logger to log any exceptions if they occur. * @param descriptor the string presentation of the descriptor */ public Descriptor(T logger, String descriptor) { this.index = UNDEF; this.descriptor = descriptor; this.logger = logger; } public String getValue(ConstantPool pool) { return pool == null ? this.descriptor : pool.getString(index, i -> "#" + index); } public int getParameterCount(ConstantPool constant_pool) throws InvalidDescriptor { String desc = getValue(constant_pool); int end = desc.indexOf(")"); if (end == -1) throw new InvalidDescriptor(logger, desc); parse(desc, 0, end + 1); return count; } public String getParameterTypes(ConstantPool constant_pool) throws InvalidDescriptor { String desc = getValue(constant_pool); int end = desc.indexOf(")"); if (end == -1) throw new InvalidDescriptor(logger, desc); return parse(desc, 0, end + 1); } public String getReturnType(ConstantPool constant_pool) throws InvalidDescriptor { String desc = getValue(constant_pool); int end = desc.indexOf(")"); if (end == -1) throw new InvalidDescriptor(logger, desc); return parse(desc, end + 1, desc.length()); } public String getFieldType(ConstantPool constant_pool) throws InvalidDescriptor { String desc = getValue(constant_pool); return parse(desc, 0, desc.length()); } private String parse(String desc, int start, int end) throws InvalidDescriptor { int p = start; StringBuilder sb = new StringBuilder(); int dims = 0; count = 0; while (p < end) { String type; char ch; switch (ch = desc.charAt(p++)) { case '(': sb.append('('); continue; case ')': sb.append(')'); continue; case '[': dims++; continue; case 'B': type = "byte"; break; case 'C': type = "char"; break; case 'D': type = "double"; break; case 'F': type = "float"; break; case 'I': type = "int"; break; case 'J': type = "long"; break; case 'L': int sep = desc.indexOf(';', p); if (sep == -1) throw new InvalidDescriptor(logger, desc, p - 1); type = desc.substring(p, sep).replace('/', '.'); p = sep + 1; break; case 'S': type = "short"; break; case 'Z': type = "boolean"; break; case 'V': type = "void"; break; default: throw new InvalidDescriptor(logger, desc, p - 1); } if (sb.length() > 1 && sb.charAt(0) == '(') sb.append(", "); sb.append(type); for (; dims > 0; dims--) sb.append("[]"); count++; } return sb.toString(); } private int count; } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/notations/DescriptorException.java000066400000000000000000000025511514323636100320740ustar00rootroot00000000000000/* * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis.notations; public class DescriptorException extends Exception { private static final long serialVersionUID = 2411890273788901032L; } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/notations/Signature.java000066400000000000000000000206761514323636100300500ustar00rootroot00000000000000/* * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis.notations; import org.openjdk.asmtools.common.ToolLogger; import org.openjdk.asmtools.jdis.ConstantPool; import org.openjdk.asmtools.jdis.notations.Type.*; import java.util.ArrayList; import java.util.List; /** * See JVMS 4.4.4. */ public class Signature extends Descriptor { /** * Constructor for the signature placed in the constant_pool * * @param logger to log any exceptions, if they occur. * @param index a valid reference into the constant_pool table */ public Signature(T logger, int index) { super(logger, index); } /** * Constructor for the descriptor presented as String * * @param logger to log any exceptions if they occur. * @param signature the string presentation of the descriptor */ public Signature(T logger, String signature) { super(logger, signature); } public Type getType(ConstantPool pool) { if (type == null) type = parse(getValue(pool)); return type; } @Override public int getParameterCount(ConstantPool pool) { MethodType m = (MethodType) getType(pool); return m.paramTypes.size(); } @Override public String getParameterTypes(ConstantPool pool) { MethodType m = (MethodType) getType(pool); StringBuilder sb = new StringBuilder(); sb.append("("); String sep = ""; for (Type paramType : m.paramTypes) { sb.append(sep); sb.append(paramType); sep = ", "; } sb.append(")"); return sb.toString(); } @Override public String getReturnType(ConstantPool pool) { MethodType m = (MethodType) getType(pool); return m.returnType.toString(); } @Override public String getFieldType(ConstantPool pool) { return getType(pool).toString(); } private Type parse(String sig) { this.sig = sig; sigp = 0; List typeParamTypes = null; if (sig.charAt(sigp) == '<') typeParamTypes = parseTypeParamTypes(); if (sig.charAt(sigp) == '(') { List paramTypes = parseTypeSignatures(')'); Type returnType = parseTypeSignature(); List throwsTypes = null; while (sigp < sig.length() && sig.charAt(sigp) == '^') { sigp++; if (throwsTypes == null) throwsTypes = new ArrayList<>(); throwsTypes.add(parseTypeSignature()); } return new MethodType(typeParamTypes, paramTypes, returnType, throwsTypes); } else { Type t = parseTypeSignature(); if (typeParamTypes == null && sigp == sig.length()) return t; Type superclass = t; List superinterfaces = null; while (sigp < sig.length()) { if (superinterfaces == null) superinterfaces = new ArrayList<>(); superinterfaces.add(parseTypeSignature()); } return new ClassSigType(typeParamTypes, superclass, superinterfaces); } } private Type parseTypeSignature() { switch (sig.charAt(sigp)) { case 'B': sigp++; return new SimpleType("byte"); case 'C': sigp++; return new SimpleType("char"); case 'D': sigp++; return new SimpleType("double"); case 'F': sigp++; return new SimpleType("float"); case 'I': sigp++; return new SimpleType("int"); case 'J': sigp++; return new SimpleType("long"); case 'L': return parseClassTypeSignature(); case 'S': sigp++; return new SimpleType("short"); case 'T': return parseTypeVariableSignature(); case 'V': sigp++; return new SimpleType("void"); case 'Z': sigp++; return new SimpleType("boolean"); case '[': sigp++; return new ArrayType(parseTypeSignature()); case '*': sigp++; return new WildcardType(); case '+': sigp++; return new WildcardType(WildcardType.Kind.EXTENDS, parseTypeSignature()); case '-': sigp++; return new WildcardType(WildcardType.Kind.SUPER, parseTypeSignature()); default: throw new IllegalStateException(debugInfo()); } } private List parseTypeSignatures(char term) { sigp++; List types = new ArrayList<>(); while (sig.charAt(sigp) != term) types.add(parseTypeSignature()); sigp++; return types; } private Type parseClassTypeSignature() { assert sig.charAt(sigp) == 'L'; sigp++; return parseClassTypeSignatureRest(); } private Type parseClassTypeSignatureRest() { StringBuilder sb = new StringBuilder(); List argTypes = null; ClassType t = null; char sigch; do { switch (sigch = sig.charAt(sigp)) { case '<': argTypes = parseTypeSignatures('>'); break; case '.': case ';': sigp++; t = new ClassType(t, sb.toString(), argTypes); sb.setLength(0); argTypes = null; break; default: sigp++; sb.append(sigch); break; } } while (sigch != ';'); return t; } private List parseTypeParamTypes() { assert sig.charAt(sigp) == '<'; sigp++; List types = new ArrayList<>(); while (sig.charAt(sigp) != '>') types.add(parseTypeParamType()); sigp++; return types; } private TypeParamType parseTypeParamType() { int sep = sig.indexOf(":", sigp); String name = sig.substring(sigp, sep); Type classBound = null; List interfaceBounds = null; sigp = sep + 1; if (sig.charAt(sigp) != ':') classBound = parseTypeSignature(); while (sig.charAt(sigp) == ':') { sigp++; if (interfaceBounds == null) interfaceBounds = new ArrayList<>(); interfaceBounds.add(parseTypeSignature()); } return new TypeParamType(name, classBound, interfaceBounds); } private Type parseTypeVariableSignature() { sigp++; int sep = sig.indexOf(';', sigp); Type t = new SimpleType(sig.substring(sigp, sep)); sigp = sep + 1; return t; } private String debugInfo() { return sig.substring(0, sigp) + "!" + sig.charAt(sigp) + "!" + sig.substring(sigp + 1); } private String sig; private int sigp; private Type type; } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/jdis/notations/Type.java000066400000000000000000000274131514323636100270240ustar00rootroot00000000000000/* * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis.notations; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; /** * Family of classes used to represent the parsed form of a {@link Descriptor} * or {@link Signature}. */ public abstract class Type { protected Type() { } public boolean isObject() { return false; } public abstract R accept(Visitor visitor, D data); protected static void append(StringBuilder sb, String prefix, List types, String suffix) { sb.append(prefix); String sep = ""; for (Type t : types) { sb.append(sep); sb.append(t); sep = ", "; } sb.append(suffix); } protected static void appendIfNotEmpty(StringBuilder sb, String prefix, List types, String suffix) { if (types != null && types.size() > 0) append(sb, prefix, types, suffix); } public interface Visitor { R visitSimpleType(SimpleType type, P p); R visitArrayType(ArrayType type, P p); R visitMethodType(MethodType type, P p); R visitClassSigType(ClassSigType type, P p); R visitClassType(ClassType type, P p); R visitTypeParamType(TypeParamType type, P p); R visitWildcardType(WildcardType type, P p); } /** * Represents a type signature with a simple name. The name may be that of a * primitive type, such "{@code int}, {@code float}, etc * or that of a type argument, such as {@code T}, {@code K}, {@code V}, etc. *

* See: * JVMS 4.3.2 * BaseType: * {@code B}, {@code C}, {@code D}, {@code F}, {@code I}, * {@code J}, {@code S}, {@code Z}; * VoidDescriptor: * {@code V}; * JVMS 4.3.4 * TypeVariableSignature: * {@code T} Identifier {@code ;} */ public static class SimpleType extends Type { public SimpleType(String name) { this.name = name; } public R accept(Visitor visitor, D data) { return visitor.visitSimpleType(this, data); } public boolean isPrimitiveType() { return primitiveTypes.contains(name); } // where private static final Set primitiveTypes = new HashSet<>(Arrays.asList( "boolean", "byte", "char", "double", "float", "int", "long", "short", "void")); @Override public String toString() { return name; } public final String name; } /** * Represents an array type signature. *

* See: * JVMS 4.3.4 * ArrayTypeSignature: * {@code [} TypeSignature {@code ]} */ public static class ArrayType extends Type { public ArrayType(Type elemType) { this.elemType = elemType; } public R accept(Visitor visitor, D data) { return visitor.visitArrayType(this, data); } @Override public String toString() { return elemType + "[]"; } public final Type elemType; } /** * Represents a method type signature. *

* See; * JVMS 4.3.4 * MethodTypeSignature: * FormalTypeParameters_opt {@code (} TypeSignature* {@code)} ReturnType * ThrowsSignature* */ public static class MethodType extends Type { public MethodType(List paramTypes, Type resultType) { this(null, paramTypes, resultType, null); } public MethodType(List typeParamTypes, List paramTypes, Type returnType, List throwsTypes) { this.typeParamTypes = typeParamTypes; this.paramTypes = paramTypes; this.returnType = returnType; this.throwsTypes = throwsTypes; } public R accept(Visitor visitor, D data) { return visitor.visitMethodType(this, data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); appendIfNotEmpty(sb, "<", typeParamTypes, "> "); sb.append(returnType); append(sb, " (", paramTypes, ")"); appendIfNotEmpty(sb, " throws ", throwsTypes, ""); return sb.toString(); } public final List typeParamTypes; public final List paramTypes; public final Type returnType; public final List throwsTypes; } /** * Represents a class signature. These describe the signature of * a class that has type arguments. *

* See: * JVMS 4.3.4 * ClassSignature: * FormalTypeParameters_opt SuperclassSignature SuperinterfaceSignature* */ public static class ClassSigType extends Type { public ClassSigType(List typeParamTypes, Type superclassType, List superinterfaceTypes) { this.typeParamTypes = typeParamTypes; this.superclassType = superclassType; this.superinterfaceTypes = superinterfaceTypes; } public R accept(Visitor visitor, D data) { return visitor.visitClassSigType(this, data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); appendIfNotEmpty(sb, "<", typeParamTypes, ">"); if (superclassType != null) { sb.append(" extends "); sb.append(superclassType); } appendIfNotEmpty(sb, " implements ", superinterfaceTypes, ""); return sb.toString(); } public final List typeParamTypes; public final Type superclassType; public final List superinterfaceTypes; } /** * Represents a class type signature. This is used to represent a * reference to a class, such as in a field, parameter, return type, etc. *

* See: * JVMS 4.3.4 * ClassTypeSignature: * {@code L} PackageSpecifier_opt SimpleClassTypeSignature * ClassTypeSignatureSuffix* {@code ;} * PackageSpecifier: * Identifier {@code /} PackageSpecifier* * SimpleClassTypeSignature: * Identifier TypeArguments_opt } * ClassTypeSignatureSuffix: * {@code .} SimpleClassTypeSignature */ public static class ClassType extends Type { public ClassType(ClassType outerType, String name, List typeArgs) { this.outerType = outerType; this.name = name; this.typeArgs = typeArgs; } public R accept(Visitor visitor, D data) { return visitor.visitClassType(this, data); } public String getBinaryName() { if (outerType == null) return name; else return (outerType.getBinaryName() + "$" + name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); if (outerType != null) { sb.append(outerType); sb.append("."); } sb.append(name); appendIfNotEmpty(sb, "<", typeArgs, ">"); return sb.toString(); } @Override public boolean isObject() { return (outerType == null) && name.equals("java/lang/Object") && (typeArgs == null || typeArgs.isEmpty()); } public final ClassType outerType; public final String name; public final List typeArgs; } /** * Represents a FormalTypeParameter. These are used to declare the type * parameters for generic classes and methods. *

* See: * JVMS 4.3.4 * FormalTypeParameters: * {@code <} FormalTypeParameter+ {@code >} * FormalTypeParameter: * Identifier ClassBound InterfaceBound* * ClassBound: * {@code :} FieldTypeSignature_opt * InterfaceBound: * {@code :} FieldTypeSignature */ public static class TypeParamType extends Type { public TypeParamType(String name, Type classBound, List interfaceBounds) { this.name = name; this.classBound = classBound; this.interfaceBounds = interfaceBounds; } public R accept(Visitor visitor, D data) { return visitor.visitTypeParamType(this, data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(name); String sep = " extends "; if (classBound != null) { sb.append(sep); sb.append(classBound); sep = " & "; } if (interfaceBounds != null) { for (Type bound : interfaceBounds) { sb.append(sep); sb.append(bound); sep = " & "; } } return sb.toString(); } public final String name; public final Type classBound; public final List interfaceBounds; } /** * Represents a wildcard type argument. A type argument that is not a * wildcard type argument will be represented by a ClassType, ArrayType, etc. *

* See: * JVMS 4.3.4 * TypeArgument: * WildcardIndicator_opt FieldTypeSignature * {@code *} * WildcardIndicator: * {@code +} * {@code -} */ public static class WildcardType extends Type { public enum Kind {UNBOUNDED, EXTENDS, SUPER} public WildcardType() { this(Kind.UNBOUNDED, null); } public WildcardType(Kind kind, Type boundType) { this.kind = kind; this.boundType = boundType; } public R accept(Visitor visitor, D data) { return visitor.visitWildcardType(this, data); } @Override public String toString() { switch (kind) { case UNBOUNDED: return "?"; case EXTENDS: return "? extends " + boundType; case SUPER: return "? super " + boundType; default: throw new AssertionError(); } } public final Kind kind; public final Type boundType; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/util/000077500000000000000000000000001514323636100232375ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/util/I18NResourceBundle.java000066400000000000000000000136441514323636100274330ustar00rootroot00000000000000/* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.util; import java.text.MessageFormat; import java.util.Enumeration; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; /** * A class that lazily opens a package-specific resource bundle containing localization * data for a class. */ public class I18NResourceBundle extends ResourceBundle { private boolean warn = true; /** * Get a package-specific resource bundle for a class containing localization data. * The bundle is named i18n.properties in the same package as the given class. * * @param c the class for which to obtain the resource bundle * @return the appropriate resource bundle for the class */ public static I18NResourceBundle getBundleForClass(Class c) { String cn = c.getName(); int dot = cn.lastIndexOf('.'); String rn = (dot == -1 ? "i18n" : cn.substring(0, dot) + ".i18n"); return new I18NResourceBundle(rn, c.getClassLoader()); } /** * Create a resource bundle for the given name. The actual resource bundle will not be * loaded until it is needed. * * @param name The name of the actual resource bundle to use. */ private I18NResourceBundle(String name, ClassLoader cl) { this.name = name; this.classLoader = cl; } // /** // * Get an entry from the resource bundle. If the resource cannot be found, a message // * is printed to the console and the result will be a string containing the method // * parameters. // * // * @param key the name of the entry to be returned // * @param arg an argument to be formatted into the result using // * {@link java.text.MessageFormat#format} // * @return the formatted string // */ // public String getString(String key, Object arg) { // return getString(key, new Object[]{arg}); // } /** * Get an entry from the resource bundle. If the resource cannot be found, a message * is printed to the console and the result will be a string containing the method * parameters. * * @param key the name of the entry to be returned * @param args an array of arguments to be formatted into the result using * {@link java.text.MessageFormat#format} * @return the formatted string */ public String getString(String key, Object... args) { try { String resourceString = getString(key); return MessageFormat.format(resourceString, args); } catch (MissingResourceException mre) { return null; } catch(IllegalArgumentException iae) { return iae.getMessage(); } } /** * Get an entry from the bundle, returning null if it is not found. * * @param key the name of the entry to be returned * @return the value of the entry, or null if it is not found. */ public String getOptionalString(String key) { if (delegate == null) { delegate = ResourceBundle.getBundle(name, Locale.getDefault(), classLoader); } try { String s = (String) (delegate.getObject(key)); if (s != null) { System.out.println("i18n: " + key); } return s; } catch (MissingResourceException e) { return null; } } public void setWarn(boolean warn) { this.warn = warn; } /** * A required internal method for ResourceBundle. Load the actual resource bundle, if * it has not yet been loaded, then hand the request off to that bundle. If the * resource cannot be found, a message is printed to the console and the result will * be the original tag. */ protected Object handleGetObject(String key) throws MissingResourceException { try { if (delegate == null) { delegate = ResourceBundle.getBundle(name, Locale.getDefault(), classLoader); } return delegate.getObject(key); } catch (MissingResourceException e) { if (warn) { System.err.println("WARNING: resource: '" + key + "' not found in " + name); } return key; } } /** * A required internal method for ResourceBundle. Load the actual resource bundle, if * it has not yet been loaded, then hand the request off to that bundle. */ public Enumeration getKeys() { if (delegate == null) { delegate = ResourceBundle.getBundle(name); } return delegate.getKeys(); } /** * Returns the name of this bundle (useful for methods using bundle name instead of * instance, such as Logger creation, * * @return the name of this resource bundle */ public String getName() { return name; } private String name; private ResourceBundle delegate; private ClassLoader classLoader; } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/util/ProductInfo.java000066400000000000000000000047701514323636100263460ustar00rootroot00000000000000/* * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.util; import java.util.ResourceBundle; /** * Class providing access to the product info. * productinfo.properties will be generated during the build */ public class ProductInfo { static { init(); } /** * Returns the value of the specified property */ public static String getProperty(String propName) { try { return bundle.getString(propName); } catch (java.util.MissingResourceException e) { return null; } } /** * Version of the product in the short format, like 5.0 */ public static final String VERSION = version(); /** * Full version of the product, including build number and date of creation */ public static final String FULL_VERSION = fullVersion(); private static final String BUNDLE_NAME = "org.openjdk.asmtools.util.productinfo"; private static ResourceBundle bundle; /** * Initializes the bundle */ private static void init() { bundle = ResourceBundle.getBundle(BUNDLE_NAME); } private static String version() { return getProperty("PRODUCT_VERSION"); } private static String fullVersion() { return getProperty("PRODUCT_NAME_LONG") + ", version " + version() + " " + getProperty("PRODUCT_MILESTONE") + " " + getProperty("PRODUCT_BUILDNUMBER") + " (" + getProperty("PRODUCT_DATE") + ")"; } } jtreg8-8.2.1+1+ds1/asmtools/src/org/openjdk/asmtools/util/productinfo.properties000066400000000000000000000023741514323636100277170ustar00rootroot00000000000000# Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. PRODUCT_NAME = %%PRODUCT_NAME%% PRODUCT_VERSION = %%PRODUCT_VERSION%% PRODUCT_MILESTONE = %%PRODUCT_MILESTONE%% PRODUCT_BUILDNUMBER = %%PRODUCT_BUILDNUMBER%% PRODUCT_NAME_LONG = %%PRODUCT_NAME_LONG%% PRODUCT_DATE = %%BUILD_DATE%% jtreg8-8.2.1+1+ds1/asmtools/test/000077500000000000000000000000001514323636100163705ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/000077500000000000000000000000001514323636100173115ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/000077500000000000000000000000001514323636100201005ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/000077500000000000000000000000001514323636100215325ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/000077500000000000000000000000001514323636100233735ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/000077500000000000000000000000001514323636100253765ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/BootstrapMethods/000077500000000000000000000000001514323636100306775ustar00rootroot00000000000000BootstrapMethodsAttributeTests.java000066400000000000000000000066371514323636100377070ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/BootstrapMethods/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.attribute.BootstrapMethods; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.ArgumentsProvider; import org.junit.jupiter.params.provider.ArgumentsSource; import org.openjdk.asmtools.lib.action.EAsmTool; import org.openjdk.asmtools.lib.action.EToolArguments; import org.openjdk.asmtools.lib.action.Jdis; import org.openjdk.asmtools.lib.attributes.Attribute; import org.openjdk.asmtools.lib.ext.CaptureSystemOutput; import org.openjdk.asmtools.lib.log.LogAndReturn; import java.io.IOException; import java.util.stream.Stream; import static org.hamcrest.Matchers.containsString; import static org.openjdk.asmtools.lib.ext.CaptureSystemOutput.Kind.OUTPUT; public class BootstrapMethodsAttributeTests { private static Jdis jdis = new Jdis(); @ParameterizedTest @ArgumentsSource(BootstrapMethodsAttributeProvider.class) @CaptureSystemOutput(value = OUTPUT, mute = true) void testOutput(Attribute data, CaptureSystemOutput.OutputCapture outputCapture) throws IOException { outputCapture.expect(containsString(data.getClassName())); int rc = data.run(); Assertions.assertEquals(data.getExpectedRc(), rc); for (EToolArguments args : EToolArguments.ofTool(EAsmTool.JDIS)) { String fname = data.getSimpleClassName() + args.getPostfix(); LogAndReturn res = jdis.setArgs(args).decode(data.getContent()); } } @BeforeAll public static void setUp() throws IOException { jdis.setDestDir().setDebug(false); } @AfterAll public static void tearDown() throws IOException { } } class BootstrapMethodsAttributeProvider implements ArgumentsProvider { @Override public Stream provideArguments(ExtensionContext context) { String packageName = BootstrapMethodsAttributeTests.class.getPackage().getName(); return Stream.of( Arguments.of(new Attribute(Attribute.Kind.CLASS_MAIN, packageName.concat(".data.BootstrapExample01"), 1)), Arguments.of(new Attribute(Attribute.Kind.CLASS_MAIN, packageName.concat(".data.BootstrapExample02"), 4)) ); } } Case7903791.java000066400000000000000000000215711514323636100331300ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/BootstrapMethods/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.attribute.BootstrapMethods; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.common.inputs.StringInput; import org.openjdk.asmtools.lib.action.*; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.Stream; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.core.AllOf.allOf; import static org.openjdk.asmtools.lib.utility.StringUtils.funcNormalizeText; import static org.openjdk.asmtools.lib.utility.StringUtils.funcSubStrCount; @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class Case7903791 { private Jasm jasm = new Jasm(); private Jcoder jcoder = new Jcoder(); private File resourceDir; private static Stream getJasmParameters() { return Stream.of( Arguments.of("BSMCase7903791.jasm", EToolArguments.JDIS_G, List.of( (Consumer) (text) -> assertThat(text, allOf( containsString("_:\"()Ljava/lang/String;\"{}"), containsString("I:\"Ljava/lang/Class;\"{},") )), (Consumer) (text) -> Assertions.assertEquals(3, funcSubStrCount.apply(text, "{}")), (Consumer) (text) -> Assertions.assertEquals(2, funcSubStrCount.apply(text, "{ }")) ) ), Arguments.of("BSMCase7903791.g.jasm", EToolArguments.JDIS_G_T, List.of( (Consumer) (text) -> assertThat(text, allOf( containsString("_:\"()Ljava/lang/String;\"{}"), containsString("I:\"Ljava/lang/Class;\"{},") )), (Consumer) (text) -> Assertions.assertEquals(1, funcSubStrCount.apply(text, "Arguments")), (Consumer) (text) -> Assertions.assertEquals(3, funcSubStrCount.apply(text, "{}")), (Consumer) (text) -> Assertions.assertEquals(0, funcSubStrCount.apply(text, "{ }")) ) ), Arguments.of("BSMCase7903791.g.t.jasm", EToolArguments.JDIS, List.of( (Consumer) (text) -> assertThat(text, allOf( containsString("_:\"()Ljava/lang/String;\"{}"), containsString("I:\"Ljava/lang/Class;\"{},") )), (Consumer) (text) -> Assertions.assertEquals(3, funcSubStrCount.apply(text, "{}")), (Consumer) (text) -> Assertions.assertEquals(2, funcSubStrCount.apply(text, "{ }")) ) ) ); } private static Stream getJcodParameters() { return Stream.of( Arguments.of("BSMCase7903791.g.jcod", EToolArguments.JDEC_G, List.of( (Consumer) (text) -> assertThat(text, allOf( containsString("[3] { // bootstrap_methods"), containsString("[4] { // bootstrap_arguments") )), (Consumer) (text) -> Assertions.assertEquals(1, funcSubStrCount.apply(text, "[4] { // bootstrap_arguments")), (Consumer) (text) -> Assertions.assertEquals(2, funcSubStrCount.apply(text, "[0] { // bootstrap_arguments")) ) ) ); } @BeforeAll public void init() throws IOException { resourceDir = new File(Objects.requireNonNull(this.getClass(). getResource("BSMCase7903791.jasm")).getFile()).getParentFile(); } @ParameterizedTest @MethodSource("getJasmParameters") public void jasmTest(String resourceName, EToolArguments args, List> tests) { // jasm to class in memory // jasm.setDebug(true); LogAndBinResults binResult = jasm.compile(List.of(resourceDir + File.separator + resourceName)); // class produced correctly Assertions.assertTrue(binResult.log.toString().isEmpty()); Assertions.assertEquals(0, binResult.result); // class to jasm LogAndTextResults textResult = new Jdis().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); String jasmText = textResult.getResultAsString(Function.identity()); String normJasmText = funcNormalizeText.apply(jasmText); for (Consumer testConsumer : tests) { testConsumer.accept(normJasmText); } // jasm to class binResult = jasm.compile(new StringInput(jasmText)); // class produced correctly Assertions.assertEquals(0, binResult.result); Assertions.assertTrue(binResult.log.toString().isEmpty()); // class to jasm textResult = new Jdis().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); jasmText = textResult.getResultAsString(Function.identity()); normJasmText = funcNormalizeText.apply(jasmText); for (Consumer testConsumer : tests) { testConsumer.accept(normJasmText); } // class to jcod textResult = new Jdec().setArgs(EToolArguments.JDEC_G).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); // jcod to class binResult = jcoder.compile(new StringInput(textResult.getResultAsString(Function.identity()))); Assertions.assertEquals(0, binResult.result); } @ParameterizedTest @MethodSource("getJcodParameters") public void jcoderTest(String resourceName, EToolArguments args, List> tests) { // jcod to class in memory LogAndBinResults binResult = jcoder.compile(List.of(resourceDir + File.separator + resourceName)); // class produced correctly Assertions.assertEquals(0, binResult.result); Assertions.assertTrue(binResult.log.toString().isEmpty()); // class to jcod LogAndTextResults textResult = new Jdec().setArgs(args).decode(binResult.getAsByteInput()); String jcoderText = textResult.getResultAsString(funcNormalizeText); Assertions.assertEquals(0, textResult.result); for (Consumer testConsumer : tests) { testConsumer.accept(jcoderText); } // class to jasm twice textResult = new Jdis().setArgs(EToolArguments.JDIS_G_T_LNT_LVT).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); textResult = new Jdis().setArgs(EToolArguments.JDIS_GG_NC_LNT_LVT).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/BootstrapMethods/data/000077500000000000000000000000001514323636100316105ustar00rootroot00000000000000BootstrapExample01.java000066400000000000000000000063031514323636100360300ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/BootstrapMethods/data/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.attribute.BootstrapMethods.data; import java.lang.invoke.*; public class BootstrapExample01 { public static int main(String[] args) throws Throwable { // Dynamically resolve and invoke a method MethodHandle dynamicHandle = getDynamicInvoker(); // Expected multiline output: // Bootstrap method called with: // Lookup: BootstrapExample01 // Method Name: dynamicInvoke // Method Type: (String)void // Target method called with message: Hello, BootstrapExample01! dynamicHandle.invokeExact("Hello, BootstrapExample01!"); return 1; } // Bootstrap method - this defines the linkage for invokedynamic public static CallSite bootstrap(MethodHandles.Lookup lookup, String methodName, MethodType methodType) throws Throwable { System.out.println("Bootstrap method called with:"); System.out.println("Lookup: " + lookup); System.out.println("Method Name: " + methodName); System.out.println("Method Type: " + methodType); // Resolve the target method (example: static method in this class) MethodHandle targetHandle = lookup.findStatic(BootstrapExample01.class, "targetMethod", methodType); return new ConstantCallSite(targetHandle); } // Target method to be invoked dynamically public static void targetMethod(String message) { System.out.println("Target method called with message: " + message); } // Invokedynamic simulation for demonstration public static MethodHandle getDynamicInvoker() throws Throwable { MethodType bootstrapMethodType = MethodType.methodType(CallSite.class, MethodHandles.Lookup.class, String.class, MethodType.class); MethodHandle bootstrapHandle = MethodHandles.lookup().findStatic(BootstrapExample01.class, "bootstrap", bootstrapMethodType); // Define the signature of the invokedynamic target MethodType targetMethodType = MethodType.methodType(void.class, String.class); CallSite callSite = (CallSite) bootstrapHandle.invoke(MethodHandles.lookup(), "dynamicInvoke", targetMethodType); return callSite.dynamicInvoker(); } } BootstrapExample02.java000066400000000000000000000031151514323636100360270ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/BootstrapMethods/data/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.attribute.BootstrapMethods.data; import java.util.function.Function; public class BootstrapExample02 { public static int main(String[] args) { Function string = s -> " = 2 x " + s; Function square = i -> (int) Math.pow(i, 2); Integer result = square.apply(2); String message = string.apply("2"); // expected: 4 = 2 x 2 System.out.println("%s %s%s".formatted(BootstrapExample02.class.getName(), result, message)); return result; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/ConstantValue/000077500000000000000000000000001514323636100301645ustar00rootroot00000000000000ConstantValueAttributeTests.java000066400000000000000000000627131514323636100364560ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/ConstantValue/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.attribute.ConstantValue; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.ArgumentsProvider; import org.junit.jupiter.params.provider.ArgumentsSource; import org.openjdk.asmtools.lib.action.Jcoder; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.transform.ResultChecker; import org.openjdk.asmtools.lib.transform.TransformLoader; import org.openjdk.asmtools.lib.transform.pipeline.*; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardOpenOption; import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.stream.Stream; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.*; // TODO: The -g option should be added to JDIS. It will allow keeping incorrect references to CP, and after the JASM-to-class step, the class will be loaded with CFE. public class ConstantValueAttributeTests extends ResultChecker { private static final boolean DEBUG = false; private static final String PACKAGE_PREFIX = "javasoft.sqe.tests.vm.classfmt.atr"; @ParameterizedTest(name = "{0} - {2}") @ArgumentsSource(ConstantValueAttributeJcodProvider_1.class) void testClassJasmClassChaining(String jcodFileName, String fqClassName, Class expectedException) throws IOException { JcodToClassConverter inputConverter = new JcodToClassConverter(); // Define the pipeline Pipeline pipeline = new Pipeline<>(inputConverter) .addStage(new ClassToJasmConverter()) .addStage(new JasmToClassConverter()) .addStage(new ClassToJcodConverter()) .addStage(new JcodToClassConverter()); Path jcodFilePath = Path.of(loadJcodFile(jcodFileName)); Jcod jcodInput = new Jcod(new Pipeline.Status(jcodFilePath), true); // Execute the pipeline Clazz finalOutput = pipeline.execute(jcodInput); byte[] classBytes = finalOutput.record().byteOutput().getOutputs().get(0).getBody(); // Step 3: Load the transformed class TransformLoader transformLoader = new TransformLoader(ConstantValueAttributeTests.class.getClassLoader()) .setTransformFilter(className -> className.contains(PACKAGE_PREFIX)); if (expectedException == null) { // Positive scenario: Class file should load successfully Optional loadedClass = Optional.empty(); try { loadedClass = transformLoader.loadClassFromBuffer( PACKAGE_PREFIX.concat(".").concat(fqClassName), classBytes, false ); } catch (Exception e) { fail(e); } assertTrue(loadedClass.isPresent(), "Class loading failed: No object returned."); assertEquals(Class.class, loadedClass.get().getClass(), "Loaded object is not a Class."); } else { // Negative scenario: Class file fails to load and throws an expected exception assertThrows(expectedException, () -> transformLoader.loadClassFromBuffer( PACKAGE_PREFIX.concat(".").concat(fqClassName), classBytes, false) ); } } /** * The test tries to use 'jdis' tool to compile jasm file that is illegal in content. Generation should fail. *
    *
  • Setup: Locate the JCod file. Resolves the jcod file path stored in the test repository and compile this using 'jcoder' tool
  • *
  • Step 1: Generate (Class -> Jasm). Generate jasm file from the class file 'jdis' tool
  • *
      *
    • Positive scenario: None
    • *
    • Negative scenario: 'jdis' operation fails with Fatal error in file
    • *
    *
* * @param jcodFileName - jcod File in the test resources repository * @throws IOException - Thrown from the GeneratorAction, CompileAction and temporary file operations. */ @ParameterizedTest(name = "{0}") @ArgumentsSource(ProviderForToolError_1.class) void testJdisError_InvalidAttrLength_01(String jcodFileName) throws IOException { final String expectedStageToFail = "classToJasm2"; var jcodToClass = new JcodToClassConverter("jcodToClass1"); var classToJasmFails = new ClassToJasmConverter(expectedStageToFail); //Failure is expected here var jasmToClass = new JasmToClassConverter("jasmToClass3"); var classToJcod = new ClassToJcodConverter("classToJcod4"); // Define the pipeline Pipeline pipeline = new Pipeline<>(jcodToClass) .addStage(classToJasmFails) .addStage(jasmToClass) .addStage(classToJcod); Path jcodFilePath = Path.of(loadJcodFile(jcodFileName)); Jcod jcodInput = new Jcod(new Pipeline.Status(jcodFilePath), true); // Execute the pipeline Jcod finalOutput = pipeline.execute(jcodInput); // Step 1.1: Verify jdis output assertThat(classToJasmFails.record().log().toString(), Matchers.allOf( Matchers.containsString("jdis - ERROR: ATT_ConstantValue: Invalid attribute length #4"), Matchers.containsString("1 error(s) in the file: bytes/bytes") ) ); assertThat(finalOutput.record().log().toString(), Matchers.allOf( Matchers.containsString("jdis - ERROR: ATT_ConstantValue: Invalid attribute length #4"), Matchers.containsString("1 error(s) in the file: bytes/bytes") ) ); } @Test //The field_info structure contains two ConstantValue attributes in the attributes table. void testClassJasmClassChainingX() throws IOException { String jcodFileName = "atrcvl00301m1n.jcod"; String fqClassName = "atrcvl003.atrcvl00301m1.atrcvl00301m1n"; JcodToClassConverter inputConverter = new JcodToClassConverter(); ClassToJasmConverter warningConverter = new ClassToJasmConverter(); JasmToClassConverter xx = new JasmToClassConverter(); // Define the pipeline Pipeline pipeline = new Pipeline<>(inputConverter) .addStage(warningConverter) .addStage(new JasmToClassConverter()) .addStage(new ClassToJcodConverter()) .addStage(new JcodToClassConverter()); Path jcodFilePath = Path.of(loadJcodFile(jcodFileName)); Jcod jcodInput = new Jcod(new Pipeline.Status(jcodFilePath), true); // Execute the pipeline Clazz finalOutput = pipeline.execute(jcodInput); byte[] classBytes = finalOutput.record().byteOutput().getOutputs().get(0).getBody(); assertThat(warningConverter.record().log().toString(), Matchers.allOf( Matchers.containsString("WARN: There is more than one \"ATT_ConstantValue\" " + "attribute in the attributes table of a \"field_info\" structure. " + "The last one is used") ) ); // Step 3: Load the transformed class TransformLoader transformLoader = new TransformLoader(ConstantValueAttributeTests.class.getClassLoader()) .setTransformFilter(className -> className.contains(PACKAGE_PREFIX)); Optional loadedClass = Optional.empty(); try { loadedClass = transformLoader.loadClassFromBuffer( PACKAGE_PREFIX.concat(".").concat(fqClassName), classBytes, false ); } catch (Exception e) { fail(e); } assertTrue(loadedClass.isPresent(), "Class loading failed: No object returned."); assertEquals(Class.class, loadedClass.get().getClass(), "Loaded object is not a Class."); } /** * Locate the JCod file. Resolves the jcod file path stored in the test repository and compile this using 'jcoder' tool * * @param jcodFileName jcod File in the test resources repository * @return Output of the CompileAction * @throws IOException CompileAction fails */ private LogAndBinResults produceClassInputFromJcod(String jcodFileName) throws IOException { // Step 1: Locate the JCod file String jcodFilePath = loadJcodFile(jcodFileName); // Step 1.1: Compile JCod -> Class LogAndBinResults compileResult = new Jcoder().compile(List.of(jcodFilePath)); println("Compile JCod to Class", compileResult.log.toString()); return compileResult; } /** * Loads a JCOD file from the resources' directory. * * @param jcodFileName The name of the JCOD file. * @return The JCOD file content as a byte array. */ private String loadJcodFile(String jcodFileName) { String resourceName = String.format("/jcod-files/%s", jcodFileName); File resourceDir = new File(Objects.requireNonNull(this.getClass().getResource(resourceName)).getFile()).getParentFile(); return resourceDir + File.separator + jcodFileName; } /** * Writes the given byte array to a temporary file with the specified file name and extension. * * @param fileName The prefix for the temporary file name. * @param ext The suffix (extension) for the temporary file. * @param buffer The byte array to write to the file. * @return The path to the created temporary file. * @throws IOException If an I/O error occurs. * @throws NullPointerException If any of the arguments are null. */ public static Path writeBytesToFile(String fileName, String ext, byte[] buffer) throws IOException { // Validate input parameters Objects.requireNonNull(fileName, "File name must not be null"); Objects.requireNonNull(ext, "File extension must not be null"); Objects.requireNonNull(buffer, "Buffer must not be null"); // Create a temporary file with the given prefix and suffix Path tempFile = Files.createTempFile(fileName, ext); // Write the byte array to the file Files.write(tempFile, buffer, StandardOpenOption.WRITE); return tempFile; } /** * Provides test arguments for the parameterized test. */ static class ConstantValueAttributeJcodProvider_1 implements ArgumentsProvider { @Override public Stream provideArguments(ExtensionContext extensionContext) { return Stream.of( Arguments.of("atrcvl00101m10p.jcod", "atrcvl001.atrcvl00101m1.atrcvl00101m10p", null), Arguments.of("atrcvl00101m1t0p.jcod", "atrcvl001.atrcvl00101m1t.atrcvl00101m1t0p", null), Arguments.of("atrcvl00102m10p.jcod", "atrcvl001.atrcvl00102m1.atrcvl00102m10p", null), Arguments.of("atrcvl00102m1t0p.jcod", "atrcvl001.atrcvl00102m1t.atrcvl00102m1t0p", null), // The field_info structure contains two ConstantValue attributes in the attributes table. //TODO: Warning is thrown (not error) Arguments.of("atrcvl00301m1n.jcod", "atrcvl003.atrcvl00301m1.atrcvl00301m1n", null), Arguments.of("atrcvl00301m1p.jcod", "atrcvl003.atrcvl00301m1.atrcvl00301m1p", null), // TODO: Need a way to compile a .java file for p to access n file // Arguments.of("atrcvl00401m1p.jcod", "atrcvl004.atrcvl00401m1.atrcvl00401m1p", null), // The value of the attribute_name_index item is equal to zero. //TODO: Warning is thrown (not error) Arguments.of("atrcvl00501m1n.jcod", "atrcvl005.atrcvl00501m1.atrcvl00501m1n", null), Arguments.of("atrcvl00501m1p.jcod", "atrcvl005.atrcvl00501m1.atrcvl00501m1p", null), // The value of the attribute_name_index item is equal to constant_pool_length. //TODO: Warning is thrown (not error) Arguments.of("atrcvl00502m1n.jcod", "atrcvl005.atrcvl00502m1.atrcvl00502m1n", null), Arguments.of("atrcvl00502m1p.jcod", "atrcvl005.atrcvl00502m1.atrcvl00502m1p", null), // The constant_pool entry at the attribute_name_index is not a CONSTANT_Utf8_info structure. //TODO: Warning is thrown (not error) Arguments.of("atrcvl00601m1n.jcod", "atrcvl006.atrcvl00601m1.atrcvl00601m1n", null), Arguments.of("atrcvl00601m1p.jcod", "atrcvl006.atrcvl00601m1.atrcvl00601m1p", null), Arguments.of("atrcvl00701m10p.jcod", "atrcvl007.atrcvl00701m1.atrcvl00701m10p", null), Arguments.of("atrcvl00702m10p.jcod", "atrcvl007.atrcvl00702m1.atrcvl00702m10p", null), Arguments.of("atrcvl00702m11p.jcod", "atrcvl007.atrcvl00702m1.atrcvl00702m11p", null), //TODO: Warning is thrown (not error) Arguments.of("atrcvl00801m1n.jcod", "atrcvl008.atrcvl00801m1.atrcvl00801m1n", ClassFormatError.class), Arguments.of("atrcvl00801m1p.jcod", "atrcvl008.atrcvl00801m1.atrcvl00801m1p", null), Arguments.of("atrcvl00802m1n.jcod", "atrcvl008.atrcvl00802m1.atrcvl00802m1n", ClassFormatError.class), Arguments.of("atrcvl00802m1p.jcod", "atrcvl008.atrcvl00802m1.atrcvl00802m1p", null), Arguments.of("atrcvl00901m1n.jcod", "atrcvl009.atrcvl00901m1.atrcvl00901m1n", ClassFormatError.class), Arguments.of("atrcvl00901m1p.jcod", "atrcvl009.atrcvl00901m1.atrcvl00901m1p", null), Arguments.of("atrcvl00902m1n.jcod", "atrcvl009.atrcvl00902m1.atrcvl00902m1n", ClassFormatError.class), Arguments.of("atrcvl00902m1p.jcod", "atrcvl009.atrcvl00902m1.atrcvl00902m1p", null), Arguments.of("atrcvl00903m1n.jcod", "atrcvl009.atrcvl00903m1.atrcvl00903m1n", ClassFormatError.class), Arguments.of("atrcvl00903m1p.jcod", "atrcvl009.atrcvl00903m1.atrcvl00903m1p", null), Arguments.of("atrcvl00904m1n.jcod", "atrcvl009.atrcvl00904m1.atrcvl00904m1n", ClassFormatError.class), Arguments.of("atrcvl00904m1p.jcod", "atrcvl009.atrcvl00904m1.atrcvl00904m1p", null), Arguments.of("atrcvl00905m1n.jcod", "atrcvl009.atrcvl00905m1.atrcvl00905m1n", ClassFormatError.class), Arguments.of("atrcvl00905m1p.jcod", "atrcvl009.atrcvl00905m1.atrcvl00905m1p", null), Arguments.of("atrcvl00906m1n.jcod", "atrcvl009.atrcvl00906m1.atrcvl00906m1n", ClassFormatError.class), Arguments.of("atrcvl00906m1p.jcod", "atrcvl009.atrcvl00906m1.atrcvl00906m1p", null), Arguments.of("atrcvl00907m1n.jcod", "atrcvl009.atrcvl00907m1.atrcvl00907m1n", ClassFormatError.class), Arguments.of("atrcvl00907m1p.jcod", "atrcvl009.atrcvl00907m1.atrcvl00907m1p", null), Arguments.of("atrcvl00908m1n.jcod", "atrcvl009.atrcvl00908m1.atrcvl00908m1n", ClassFormatError.class), Arguments.of("atrcvl00908m1p.jcod", "atrcvl009.atrcvl00908m1.atrcvl00908m1p", null), Arguments.of("atrcvl00909m1n.jcod", "atrcvl009.atrcvl00909m1.atrcvl00909m1n", ClassFormatError.class), Arguments.of("atrcvl00909m1p.jcod", "atrcvl009.atrcvl00909m1.atrcvl00909m1p", null), Arguments.of("atrcvl01001m1n.jcod", "atrcvl010.atrcvl01001m1.atrcvl01001m1n", ClassFormatError.class), Arguments.of("atrcvl01001m1p.jcod", "atrcvl010.atrcvl01001m1.atrcvl01001m1p", null), Arguments.of("atrcvl01002m10p.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m10p", null), Arguments.of("atrcvl01002m110p.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m110p", null), Arguments.of("atrcvl01002m111n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m111n", ClassFormatError.class), Arguments.of("atrcvl01002m112n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m112n", ClassFormatError.class), Arguments.of("atrcvl01002m113n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m113n", ClassFormatError.class), Arguments.of("atrcvl01002m114n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m114n", ClassFormatError.class), Arguments.of("atrcvl01002m115p.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m115p", null), Arguments.of("atrcvl01002m116n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m116n", ClassFormatError.class), Arguments.of("atrcvl01002m117n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m117n", ClassFormatError.class), Arguments.of("atrcvl01002m118n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m118n", ClassFormatError.class), Arguments.of("atrcvl01002m119n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m119n", ClassFormatError.class), Arguments.of("atrcvl01002m11n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m11n", ClassFormatError.class), Arguments.of("atrcvl01002m120p.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m120p", null), Arguments.of("atrcvl01002m121n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m121n", ClassFormatError.class), Arguments.of("atrcvl01002m122n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m122n", ClassFormatError.class), Arguments.of("atrcvl01002m123n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m123n", ClassFormatError.class), Arguments.of("atrcvl01002m124n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m124n", ClassFormatError.class), Arguments.of("atrcvl01002m125n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m125n", ClassFormatError.class), Arguments.of("atrcvl01002m126n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m126n", ClassFormatError.class), Arguments.of("atrcvl01002m127n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m127n", ClassFormatError.class), Arguments.of("atrcvl01002m128n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m128n", ClassFormatError.class), Arguments.of("atrcvl01002m129n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m129n", ClassFormatError.class), Arguments.of("atrcvl01002m12n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m12n", ClassFormatError.class), Arguments.of("atrcvl01002m130p.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m130p", null), Arguments.of("atrcvl01002m131n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m131n", ClassFormatError.class), Arguments.of("atrcvl01002m132n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m132n", ClassFormatError.class), Arguments.of("atrcvl01002m133n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m133n", ClassFormatError.class), Arguments.of("atrcvl01002m134n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m134n", ClassFormatError.class), Arguments.of("atrcvl01002m135n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m135n", ClassFormatError.class), Arguments.of("atrcvl01002m136n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m136n", ClassFormatError.class), Arguments.of("atrcvl01002m137n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m137n", ClassFormatError.class), Arguments.of("atrcvl01002m138n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m138n", ClassFormatError.class), Arguments.of("atrcvl01002m139n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m139n", ClassFormatError.class), Arguments.of("atrcvl01002m13n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m13n", ClassFormatError.class), Arguments.of("atrcvl01002m140p.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m140p", null), Arguments.of("atrcvl01002m141n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m141n", ClassFormatError.class), Arguments.of("atrcvl01002m142n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m142n", ClassFormatError.class), Arguments.of("atrcvl01002m143n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m143n", ClassFormatError.class), Arguments.of("atrcvl01002m144n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m144n", ClassFormatError.class), Arguments.of("atrcvl01002m145n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m145n", ClassFormatError.class), Arguments.of("atrcvl01002m146n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m146n", ClassFormatError.class), Arguments.of("atrcvl01002m147n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m147n", ClassFormatError.class), Arguments.of("atrcvl01002m148n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m148n", ClassFormatError.class), Arguments.of("atrcvl01002m149n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m149n", ClassFormatError.class), Arguments.of("atrcvl01002m14n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m14n", ClassFormatError.class), Arguments.of("atrcvl01002m150p.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m150p", null), Arguments.of("atrcvl01002m151n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m151n", ClassFormatError.class), Arguments.of("atrcvl01002m152n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m152n", ClassFormatError.class), Arguments.of("atrcvl01002m153n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m153n", ClassFormatError.class), Arguments.of("atrcvl01002m154n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m154n", ClassFormatError.class), Arguments.of("atrcvl01002m155n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m155n", ClassFormatError.class), Arguments.of("atrcvl01002m156n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m156n", ClassFormatError.class), Arguments.of("atrcvl01002m157n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m157n", ClassFormatError.class), Arguments.of("atrcvl01002m158n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m158n", ClassFormatError.class), Arguments.of("atrcvl01002m159n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m159n", ClassFormatError.class), Arguments.of("atrcvl01002m15p.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m15p", null), Arguments.of("atrcvl01002m160p.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m160p", null), Arguments.of("atrcvl01002m16n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m16n", ClassFormatError.class), Arguments.of("atrcvl01002m17n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m17n", ClassFormatError.class), Arguments.of("atrcvl01002m18n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m18n", ClassFormatError.class), Arguments.of("atrcvl01002m19n.jcod", "atrcvl010.atrcvl01002m1.atrcvl01002m19n", ClassFormatError.class), Arguments.of("atrcod00101m1p.jcod", "atrcod001.atrcod00101m1.atrcod00101m1p", null), // TODO: CFE not found Arguments.of("atrcod00101m1n.jcod", "atrcod001.atrcod00101m1.atrcod00101m1n", null) ); } } /** * Provides test arguments for the parameterized test. */ static class ProviderForToolError_1 implements ArgumentsProvider { @Override public Stream provideArguments(ExtensionContext extensionContext) { return Stream.of( // Instead of 2, length of the ConstantValue attribute is set to 4. Arguments.of("atrcvl00701m11n.jcod", "atrcvl007.atrcvl00701m1.atrcvl00701m11n", null), // Length of an attribute with a name like "ConstantValue" is set to 4. Arguments.of("atrcvl00702m12n.jcod", "atrcvl007.atrcvl00702m1.atrcvl00702m12n", ClassFormatError.class) ); } } /* Debug logger */ private void println(String context, String text) { if (DEBUG && text != null && !text.isEmpty()) System.out.printf("[%s] %s%n", context, text); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/LoadableDescriptors/000077500000000000000000000000001514323636100313235ustar00rootroot00000000000000LoadableDescriptorsTests.java000066400000000000000000000223711514323636100370640ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/LoadableDescriptors/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.attribute.LoadableDescriptors; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.common.inputs.StringInput; import org.openjdk.asmtools.lib.action.*; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.Stream; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.matchesPattern; import static org.hamcrest.core.AllOf.allOf; import static org.openjdk.asmtools.lib.utility.StringUtils.funcNormalizeText; import static org.openjdk.asmtools.lib.utility.StringUtils.funcSubStrCount; @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class LoadableDescriptorsTests { private Jasm jasm = new Jasm(); private Jcoder jcoder = new Jcoder(); private File resourceDir; private static Stream getJasmParameters() { return Stream.of( Arguments.of("Test01.jasm", EToolArguments.JDIS_G_T, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*const #\\d = Utf8 \"LLoadableDescriptors01;\";.*"), matchesPattern(".*const #\\d = Utf8 \"LLoadableDescriptors02;\";.*"), matchesPattern(".*LoadableDescriptors #\\d, #\\d; // \"LLoadableDescriptors01;\", \"LLoadableDescriptors02;\".*") ) ), (Consumer) (text) -> Assertions.assertEquals(10, funcSubStrCount.apply(text, "LoadableDescriptors")) ) ), Arguments.of("LoadableDescriptorsAttributeTest$X.jasm", EToolArguments.JDIS, List.of( (Consumer) (text) -> Assertions.assertEquals(1, funcSubStrCount.apply(text, "LoadableDescriptors ")), (Consumer) (text) -> Assertions.assertEquals(3, funcSubStrCount.apply(text, "strict ")) ) ), Arguments.of("LoadableDescriptorsAttributeTest$X.g.jasm", EToolArguments.JDIS_G_T, List.of( (Consumer) (text) -> Assertions.assertEquals(1, funcSubStrCount.apply(text, "LoadableDescriptors ")), (Consumer) (text) -> Assertions.assertEquals(3, funcSubStrCount.apply(text, "strict ")) ) ), Arguments.of("LoadableDescriptorsAttributeTest$X.g.t.jasm", EToolArguments.JDIS_G, List.of( (Consumer) (text) -> Assertions.assertEquals(1, funcSubStrCount.apply(text, "LoadableDescriptors ")), (Consumer) (text) -> Assertions.assertEquals(3, funcSubStrCount.apply(text, "strict ")) ) ) ); } private static Stream getJcodParameters() { return Stream.of( Arguments.of("LoadableDescriptorsAttributeTest$X.jcod", EToolArguments.JDEC_G, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*Attr\\(#\\d\\d, \\d\\) \\{ // LoadableDescriptors at.*"), matchesPattern(".*descriptor: LLoadableDescriptorsAttributeTest\\$V3.*"), matchesPattern(".*descriptor: LLoadableDescriptorsAttributeTest\\$V7.*"), matchesPattern(".*descriptor: LLoadableDescriptorsAttributeTest\\$V2.*") ) )) ), Arguments.of("LoadableDescriptorsAttributeTest$X.g.jcod", EToolArguments.JDEC, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*Attr\\(#\\d\\d\\) \\{ // LoadableDescriptors.*"))), (Consumer) (text) -> Assertions.assertEquals(26, funcSubStrCount.apply(text, "LoadableDescriptors")) ) ) ); } @BeforeAll public void init() throws IOException { resourceDir = new File(Objects.requireNonNull(this.getClass(). getResource("Test01.jasm")).getFile()).getParentFile(); } @ParameterizedTest @MethodSource("getJasmParameters") public void jasmTest(String resourceName, EToolArguments args, List> tests) { // jasm to class in memory // jasm.setDebug(true); LogAndBinResults binResult = jasm.compile(List.of(resourceDir + File.separator + resourceName)); // class produced correctly Assertions.assertTrue(binResult.log.toString().isEmpty()); Assertions.assertEquals(0, binResult.result); // class to jasm LogAndTextResults textResult = new Jdis().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); String jasmText = textResult.getResultAsString(Function.identity()); String normJasmText = funcNormalizeText.apply(jasmText); for (Consumer testConsumer : tests) { testConsumer.accept(normJasmText); } // jasm to class binResult = jasm.compile(new StringInput(jasmText)); // class produced correctly Assertions.assertEquals(0, binResult.result); Assertions.assertTrue(binResult.log.toString().isEmpty()); // class to jasm textResult = new Jdis().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); jasmText = textResult.getResultAsString(Function.identity()); normJasmText = funcNormalizeText.apply(jasmText); for (Consumer testConsumer : tests) { testConsumer.accept(normJasmText); } // class to jcod textResult = new Jdec().setArgs(EToolArguments.JDEC_G).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); // jcod to class binResult = jcoder.compile(new StringInput(textResult.getResultAsString(Function.identity()))); Assertions.assertEquals(0, binResult.result); } @ParameterizedTest @MethodSource("getJcodParameters") public void jcoderTest(String resourceName, EToolArguments args, List> tests) { // jcod to class in memory LogAndBinResults binResult = jcoder.compile(List.of(resourceDir + File.separator + resourceName)); // class produced correctly Assertions.assertEquals(0, binResult.result); Assertions.assertTrue(binResult.log.toString().isEmpty()); // class to jcod LogAndTextResults textResult = new Jdec().setArgs(args).decode(binResult.getAsByteInput()); String jcoderText = textResult.getResultAsString(funcNormalizeText); Assertions.assertEquals(0, textResult.result); for (Consumer testConsumer : tests) { testConsumer.accept(jcoderText); } // class to jasm twice textResult = new Jdis().setArgs(EToolArguments.JDIS_G_T_LNT_LVT).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); textResult = new Jdis().setArgs(EToolArguments.JDIS_GG_NC_LNT_LVT).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/NestHost/000077500000000000000000000000001514323636100271455ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/NestHost/NestHostTests.java000066400000000000000000000144511514323636100326070ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.attribute.NestHost; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.common.inputs.StringInput; import org.openjdk.asmtools.lib.action.*; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import org.openjdk.asmtools.lib.script.TestScript; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.Stream; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.matchesPattern; import static org.hamcrest.core.AllOf.allOf; import static org.openjdk.asmtools.lib.utility.StringUtils.funcNormalizeText; import static org.openjdk.asmtools.lib.utility.StringUtils.funcSubStrCount; @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class NestHostTests extends TestScript { private Jasm jasm = new Jasm(); private Jcoder jcoder = new Jcoder(); private File resourceDir; private static Stream getJasmParameters() { return Stream.of( Arguments.of("Test01.jasm", EToolArguments.JDIS_G, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*const #\\d = class #\\d; // NestHost01.*"), matchesPattern(".*NestHost #\\d; // org/openjdk/asmtools/attribute/NestHost/NestHost01.*") )), (Consumer) (text) -> Assertions.assertEquals(11, funcSubStrCount.apply(text, "NestHost")) ) ), Arguments.of("Test01.jasm", EToolArguments.JDIS, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*NestHost org/openjdk/asmtools/attribute/NestHost/NestHost01;.*") )) ) ), Arguments.of("Test01.g.jasm", EToolArguments.JDIS_G_T, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*const #\\d = Class #\\d; // NestHost01.*"), matchesPattern(".*NestHost #\\d; // org/openjdk/asmtools/attribute/NestHost/NestHost01.*") )), (Consumer) (text) -> Assertions.assertEquals(11, funcSubStrCount.apply(text, "NestHost")) ) ), Arguments.of("Test02.jasm", EToolArguments.JDIS_G, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*const #\\d = class #\\d; // NestHost02.*"), matchesPattern(".*NestHost #\\d; // org/openjdk/asmtools/attribute/NestHost/NestHost02.*") )), (Consumer) (text) -> Assertions.assertEquals(11, funcSubStrCount.apply(text, "NestHost")) ) ), Arguments.of("Test02.jasm", EToolArguments.JDIS, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*NestHost org/openjdk/asmtools/attribute/NestHost/NestHost02;.*") )) ) ) ); } private static Stream getJcodParameters() { return Stream.of( Arguments.of("Test01.jcod", EToolArguments.JDEC_G, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*#\\d; // class: org/openjdk/asmtools/attribute/NestHost/NestHost01.*"), matchesPattern(".*Attr.#\\d, 2. \\{ // NestHost.*") )), (Consumer) (text) -> Assertions.assertEquals(11, funcSubStrCount.apply(text, "NestHost")) ) ) ); } @BeforeAll public void init() throws IOException { // initialize resource directory super.init("Test01.jasm"); } @ParameterizedTest @MethodSource("getJasmParameters") public void jasmTest(String resourceName, EToolArguments args, List> tests) { super.jasmTest(resourceName, args, tests); } @ParameterizedTest @MethodSource("getJcodParameters") public void jcoderTest(String resourceName, EToolArguments args, List> tests) { super.jcoderTest(resourceName, args, tests); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/NestMembers/000077500000000000000000000000001514323636100276225ustar00rootroot00000000000000NestMembersTests.java000066400000000000000000000176741514323636100336740ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/NestMembers/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.attribute.NestMembers; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.common.inputs.StringInput; import org.openjdk.asmtools.lib.action.*; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.Stream; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.matchesPattern; import static org.hamcrest.core.AllOf.allOf; import static org.openjdk.asmtools.lib.utility.StringUtils.funcNormalizeText; import static org.openjdk.asmtools.lib.utility.StringUtils.funcSubStrCount; @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class NestMembersTests { private Jasm jasm = new Jasm(); private Jcoder jcoder = new Jcoder(); private File resourceDir; private static Stream getJasmParameters() { return Stream.of( Arguments.of("Test01.jasm", EToolArguments.JDIS_G_T, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*const #\\d = Class #\\d; // NestMember01.*"), matchesPattern(".*NestMembers #\\d; // NestMember01.*") )), (Consumer) (text) -> Assertions.assertEquals(6, funcSubStrCount.apply(text, "NestMembers")) ) ), Arguments.of("Test01.g.t.jasm", EToolArguments.JDIS, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*NestMembers NestMember01.*") )), (Consumer) (text) -> Assertions.assertEquals(6, funcSubStrCount.apply(text, "NestMember")) ) ), Arguments.of("Test02.jasm", EToolArguments.JDIS_G_T, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*NestMembers #\\d\\d, // Test02\\$ClassInsideRecord2.*") )), (Consumer) (text) -> Assertions.assertEquals(2, funcSubStrCount.apply(text, "NestMembers")) ) ) ); } private static Stream getJcodParameters() { return Stream.of( Arguments.of("Test01.jcod", EToolArguments.JDEC_G, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*#\\d; // class: org/openjdk/asmtools/attribute/NestMembers/Test01/NestMember01 at.*"), matchesPattern(".*Attr.#\\d, 4. \\{ // NestMembers.*") )), (Consumer) (text) -> Assertions.assertEquals(8, funcSubStrCount.apply(text, "NestMembers")) ) ) ); } @BeforeAll public void init() throws IOException { resourceDir = new File(Objects.requireNonNull(this.getClass().getResource("Test01.jasm")).getFile()).getParentFile(); } @ParameterizedTest @MethodSource("getJasmParameters") public void jasmTest(String resourceName, EToolArguments args, List> tests) { // jasm to class in memory // jasm.setDebug(true); LogAndBinResults binResult = jasm.compile(List.of(resourceDir + File.separator + resourceName)); // class produced correctly Assertions.assertTrue(binResult.log.toString().isEmpty()); Assertions.assertEquals(0, binResult.result); // class to jasm LogAndTextResults textResult = new Jdis().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); String jasmText = textResult.getResultAsString(Function.identity()); String normJasmText = funcNormalizeText.apply(jasmText); for (Consumer testConsumer : tests) { testConsumer.accept(normJasmText); } // jasm to class binResult = jasm.compile(new StringInput(jasmText)); // class produced correctly Assertions.assertEquals(0, binResult.result); Assertions.assertTrue(binResult.log.toString().isEmpty()); // class to jasm textResult = new Jdis().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); jasmText = textResult.getResultAsString(Function.identity()); normJasmText = funcNormalizeText.apply(jasmText); for (Consumer testConsumer : tests) { testConsumer.accept(normJasmText); } // class to jcod textResult = new Jdec().setArgs(EToolArguments.JDEC_G).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); // jcod to class binResult = jcoder.compile(new StringInput(textResult.getResultAsString(Function.identity()))); Assertions.assertEquals(0, binResult.result); } @ParameterizedTest @MethodSource("getJcodParameters") public void jcoderTest(String resourceName, EToolArguments args, List> tests) { // jcod to class in memory LogAndBinResults binResult = jcoder.compile(List.of(resourceDir + File.separator + resourceName)); // class produced correctly Assertions.assertEquals(0, binResult.result); Assertions.assertTrue(binResult.log.toString().isEmpty()); // class to jcod LogAndTextResults textResult = new Jdec().setArgs(args).decode(binResult.getAsByteInput()); String jcoderText = textResult.getResultAsString(funcNormalizeText); Assertions.assertEquals(0, textResult.result); for (Consumer testConsumer : tests) { testConsumer.accept(jcoderText); } // class to jasm twice textResult = new Jdis().setArgs(EToolArguments.JDIS_G_T_LNT_LVT).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); textResult = new Jdis().setArgs(EToolArguments.JDIS_GG_NC_LNT_LVT).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/PermittedSubclasses/000077500000000000000000000000001514323636100313635ustar00rootroot00000000000000PermittedSubclassesTests.java000066400000000000000000000224671514323636100371720ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/PermittedSubclasses/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.attribute.PermittedSubclasses; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.common.inputs.StringInput; import org.openjdk.asmtools.lib.action.*; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.Stream; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.matchesPattern; import static org.hamcrest.core.AllOf.allOf; import static org.openjdk.asmtools.lib.utility.StringUtils.funcNormalizeText; import static org.openjdk.asmtools.lib.utility.StringUtils.funcSubStrCount; @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class PermittedSubclassesTests { private Jasm jasm = new Jasm(); private Jcoder jcoder = new Jcoder(); private File resourceDir; private static Stream getJasmParameters() { return Stream.of( Arguments.of("Test01.jasm", EToolArguments.JDIS_G_T, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*const #\\d\\d = Class #\\d\\d; // SubClass01.*"), matchesPattern(".*const #\\d\\d = Class #\\d\\d; // SubClass02.*"), matchesPattern(".*const #\\d\\d = Class #\\d\\d; // SubClass03.*"), matchesPattern(".*const #\\d\\d = Class #\\d\\d; // SubClass04.*"), matchesPattern(".*const #\\d\\d = Class #\\d\\d; // NestMember01.*"), matchesPattern(".*const #\\d\\d = Class #\\d\\d; // NestMember02.*"), matchesPattern(".*const #\\d\\d = Class #\\d\\d; // NestMember03.*"), matchesPattern(".*const #\\d\\d = Class #\\d\\d; // NestMember04.*"), matchesPattern(".*NestMembers #\\d\\d, // NestMember0\\d.*"), matchesPattern(".*PermittedSubclasses #\\d\\d, // SubClass0\\d.*") )), (Consumer) (text) -> Assertions.assertEquals(2, funcSubStrCount.apply(text, "NestMembers")), (Consumer) (text) -> Assertions.assertEquals(5, funcSubStrCount.apply(text, "PermittedSubclasses")) ) ), Arguments.of("Test01.g.t.jasm", EToolArguments.JDIS, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*NestMembers NestMember0\\d,.*"), matchesPattern(".*PermittedSubclasses SubClass0\\d,.*") )), (Consumer) (text) -> Assertions.assertEquals(12, funcSubStrCount.apply(text, "NestMember0")), (Consumer) (text) -> Assertions.assertEquals(4, funcSubStrCount.apply(text, "SubClass0")) ) ), Arguments.of("Test02.jasm", EToolArguments.JDIS_G_T, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*PermittedSubclasses #\\d\\d, // Test02\\$ClassInsideRecord2.*") )), (Consumer) (text) -> Assertions.assertEquals(2, funcSubStrCount.apply(text, "PermittedSubclasses")) ) ) ); } private static Stream getJcodParameters() { return Stream.of( Arguments.of("Test01.jcod", EToolArguments.JDEC_G, List.of( (Consumer) (text) -> assertThat(text, allOf( matchesPattern(".*#\\d\\d; // subclass: org/openjdk/asmtools/attribute/PermittedSubclasses/atr/SubClass01 at.*"), matchesPattern(".*Attr\\(#\\d\\d, \\d\\) \\{ // PermittedSubclasses at.*") )), (Consumer) (text) -> Assertions.assertEquals(8, funcSubStrCount.apply(text, "PermittedSubclasses")) ) ) ); } @BeforeAll public void init() throws IOException { resourceDir = new File(Objects.requireNonNull(this.getClass().getResource("Test01.jasm")).getFile()).getParentFile(); } @ParameterizedTest @MethodSource("getJasmParameters") public void jasmTest(String resourceName, EToolArguments args, List> tests) { // jasm to class in memory // jasm.setDebug(true); LogAndBinResults binResult = jasm.compile(List.of(resourceDir + File.separator + resourceName)); // class produced correctly Assertions.assertTrue(binResult.log.toString().isEmpty()); Assertions.assertEquals(0, binResult.result); // class to jasm LogAndTextResults textResult = new Jdis().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); String jasmText = textResult.getResultAsString(Function.identity()); String normJasmText = funcNormalizeText.apply(jasmText); for (Consumer testConsumer : tests) { testConsumer.accept(normJasmText); } // jasm to class binResult = jasm.compile(new StringInput(jasmText)); // class produced correctly Assertions.assertEquals(0, binResult.result); Assertions.assertTrue(binResult.log.toString().isEmpty()); // class to jasm textResult = new Jdis().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); jasmText = textResult.getResultAsString(Function.identity()); normJasmText = funcNormalizeText.apply(jasmText); for (Consumer testConsumer : tests) { testConsumer.accept(normJasmText); } // class to jcod textResult = new Jdec().setArgs(EToolArguments.JDEC_G).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); // jcod to class binResult = jcoder.compile(new StringInput(textResult.getResultAsString(Function.identity()))); Assertions.assertEquals(0, binResult.result); } @ParameterizedTest @MethodSource("getJcodParameters") public void jcoderTest(String resourceName, EToolArguments args, List> tests) { // jcod to class in memory LogAndBinResults binResult = jcoder.compile(List.of(resourceDir + File.separator + resourceName)); // class produced correctly Assertions.assertEquals(0, binResult.result); Assertions.assertTrue(binResult.log.toString().isEmpty()); // class to jcod LogAndTextResults textResult = new Jdec().setArgs(args).decode(binResult.getAsByteInput()); String jcoderText = textResult.getResultAsString(funcNormalizeText); Assertions.assertEquals(0, textResult.result); for (Consumer testConsumer : tests) { testConsumer.accept(jcoderText); } // class to jasm twice textResult = new Jdis().setArgs(EToolArguments.JDIS_G_T_LNT_LVT).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); textResult = new Jdis().setArgs(EToolArguments.JDIS_GG_NC_LNT_LVT).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/SourceDebugExtension/000077500000000000000000000000001514323636100315025ustar00rootroot00000000000000SourceDebugExtensionTests.java000066400000000000000000000110551514323636100374170ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/SourceDebugExtension/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.attribute.SourceDebugExtension; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.lib.action.EToolArguments; import org.openjdk.asmtools.lib.script.TestScript; import java.io.IOException; import java.util.List; import java.util.function.Consumer; import java.util.stream.Stream; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.matchesPattern; import static org.hamcrest.core.AllOf.allOf; import static org.openjdk.asmtools.lib.utility.StringUtils.funcSubStrCount; @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class SourceDebugExtensionTests extends TestScript { private static Stream getJasmParameters() { return Stream.of( Arguments.of("SourceDebugExt01.jasm", EToolArguments.JDIS_G, List.of( (Consumer) (text) -> assertThat(text, allOf( containsString("\"SMAP\\nSourceDebugExt01.java\\nJava\\n*S Java\\n*F\\n+ 1 SourceDebugExt01.java\\n\";"), containsString("\"SourceDebugExt01.java\\n*L\\n1#1,5:1\\n*E\";"), matchesPattern(".*const #\\d\\d = Utf8 \"SourceDebugExtension\";.*") )), (Consumer) (text) -> Assertions.assertEquals(2, funcSubStrCount.apply(text, "SourceDebugExtension")) ) ), Arguments.of("SourceDebugExt02.jasm", EToolArguments.JDIS_G_T, List.of( (Consumer) (text) -> assertThat(text, allOf( containsString("SourceDebugExtension { }"), matchesPattern(".*const #\\d\\d = Utf8 \"SourceDebugExtension\";.*") )), (Consumer) (text) -> Assertions.assertEquals(2, funcSubStrCount.apply(text, "SourceDebugExtension")) ) ), Arguments.of("SourceDebugExt03.jasm", EToolArguments.JDIS, List.of( (Consumer) (text) -> assertThat(text, allOf( containsString("SourceDebugExtension { 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x00 0x0B 0x0C; 0x0D 0x0E 0x0F; }") )), (Consumer) (text) -> Assertions.assertEquals(1, funcSubStrCount.apply(text, "SourceDebugExtension")) ) ) ); } @BeforeAll public void init() throws IOException { // initialize resource directory super.init("SourceDebugExt01.jasm"); // enable warnings for Jasm tests super.enableToolsWarnings(); } @ParameterizedTest @MethodSource("getJasmParameters") public void jasmTest(String resourceName, EToolArguments args, List> tests) { super.jasmTest(resourceName, args, tests); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/StackMapTable/000077500000000000000000000000001514323636100300515ustar00rootroot00000000000000StackMapTableTests.java000066400000000000000000000211771514323636100343430ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/StackMapTable/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.attribute.StackMapTable; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.common.inputs.StringInput; import org.openjdk.asmtools.lib.action.*; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Objects; import java.util.function.Function; import java.util.stream.Stream; import static org.openjdk.asmtools.lib.utility.StringUtils.funcSubStrCount; @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class StackMapTableTests { private Jasm jasm = new Jasm(); private Jcoder jcoder = new Jcoder(); private File resourceDir; private static Stream getJasmParameters() { return Stream.of( Arguments.of("StackMapData.g.jasm", EToolArguments.JDIS_G, List.of( (Function) (text) -> funcSubStrCount.apply(text, "early_larval") == 14, (Function) (text) -> funcSubStrCount.apply(text, "unset_fields") == 14, (Function) (text) -> funcSubStrCount.apply(text, "stack_map") == 6) ), Arguments.of("StackMapData.g.t.jasm", EToolArguments.JDIS_G_T, List.of( (Function) (text) -> funcSubStrCount.apply(text, "early_larval") == 14, (Function) (text) -> funcSubStrCount.apply(text, "number_of_entries") == 4, (Function) (text) -> funcSubStrCount.apply(text, "offset_delta") == 15) ), Arguments.of("StackMapData.jasm", EToolArguments.JDIS, List.of( (Function) (text) -> funcSubStrCount.apply(text, "early_larval") == 14, (Function) (text) -> funcSubStrCount.apply(text, "unset_fields;") == 4) ), Arguments.of("StackMapData.t.jasm", EToolArguments.JDIS_T, List.of( (Function) (text) -> funcSubStrCount.apply(text, "early_larval") == 14, (Function) (text) -> funcSubStrCount.apply(text, "frame_type") == 54) ), Arguments.of("StackMapData01.g.jasm", EToolArguments.JDIS_G, List.of( (Function) (text) -> funcSubStrCount.apply(text, "The ConstantPool[15] must be a CONSTANT_NameAndType_info") == 1) ), Arguments.of("StackMapData02.g.jasm", EToolArguments.JDIS_T, List.of( (Function) (text) -> funcSubStrCount.apply(text, "early_larval") == 13, (Function) (text) -> funcSubStrCount.apply(text, "frame_type") == 39) ) ); } private static Stream getJcodParameters() { return Stream.of( Arguments.of("StackMapData.g.jcod", EToolArguments.JDEC, List.of( (Function) (text) -> funcSubStrCount.apply(text, "early_larval_frame") == 14, (Function) (text) -> funcSubStrCount.apply(text, "246b,") == 14 )), Arguments.of("StackMapData.jcod", EToolArguments.JDEC_G, List.of( (Function) (text) -> funcSubStrCount.apply(text, "early_larval_frame") == 14, (Function) (text) -> funcSubStrCount.apply(text, "246b,") == 14, (Function) (text) -> funcSubStrCount.apply(text, "[25]") == 1 )), Arguments.of("StackMapData02.g.jcod", EToolArguments.JDEC_G, List.of( (Function) (text) -> funcSubStrCount.apply(text, "early_larval_frame") == 13, (Function) (text) -> funcSubStrCount.apply(text, "246b,") == 13, (Function) (text) -> funcSubStrCount.apply(text, "[11]") == 1 )) ); } @BeforeAll public void init() throws IOException { resourceDir = new File(Objects.requireNonNull(this.getClass().getResource("StackMapData.g.jasm")).getFile()).getParentFile(); } @ParameterizedTest @MethodSource("getJasmParameters") public void jasmTest(String resourceName, EToolArguments args, List> tests) { // jasm to class in memory LogAndBinResults binResult = jasm.compile(List.of(resourceDir + File.separator + resourceName)); // class produced correctly Assertions.assertTrue(binResult.log.toString().isEmpty()); Assertions.assertEquals(0, binResult.result); // class to jasm LogAndTextResults textResult = new Jdis().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); String jasmText = textResult.getResultAsString(Function.identity()); for (Function testFunction : tests) { Assertions.assertTrue(testFunction.apply(jasmText)); } // jasm to class binResult = jasm.compile(new StringInput(jasmText)); // class produced correctly Assertions.assertTrue(binResult.log.toString().isEmpty()); Assertions.assertEquals(0, binResult.result); // class to jasm textResult = new Jdis().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); jasmText = textResult.getResultAsString(Function.identity()); for (Function testFunction : tests) { Assertions.assertTrue(testFunction.apply(jasmText)); } // class to jcod textResult = new Jdec().setArgs(EToolArguments.JDEC_G).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); // jcod to class binResult = jcoder.compile(new StringInput(textResult.getResultAsString(Function.identity()))); Assertions.assertEquals(0, binResult.result); } @ParameterizedTest @MethodSource("getJcodParameters") public void jcoderTest(String resourceName, EToolArguments args, List> tests) { // jcod to class in memory LogAndBinResults binResult = jcoder.compile(List.of(resourceDir + File.separator + resourceName)); // class produced correctly Assertions.assertEquals(0, binResult.result); Assertions.assertTrue(binResult.log.toString().isEmpty()); // class to jcod LogAndTextResults textResult = new Jdec().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); for (Function testFunction : tests) { Assertions.assertTrue(testFunction.apply(textResult.getResultAsString(Function.identity()))); } // class to jasm twice textResult = new Jdis().setArgs(EToolArguments.JDIS_G_T_LNT_LVT).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); textResult = new Jdis().setArgs(EToolArguments.JDIS_GG_NC_LNT_LVT).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/StackMapTable/data/000077500000000000000000000000001514323636100307625ustar00rootroot00000000000000StackMapData.java000066400000000000000000000136731514323636100340550ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/attribute/StackMapTable/data/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.attribute.StackMapTable.data; import static java.lang.Math.round; public class StackMapData { static final int fldI = 0; static long fldL = 1; protected String fldS = "string"; public final String fldFS = "string"; public void generateFrames(int y) { int x = 0; Object obj = null; try { x = 1 / x; } catch (ArithmeticException e) { obj = new Object(); } finally { obj.toString(); } if (x == 0) { obj = null; } switch (x) { case 1: obj = new Object(); break; case 2: break; } if (y == 0) { System.out.println("frame"); } if (y == 1) { int temp = 42; System.out.println("item_frame" + (int) (temp * round(100))); } if (y == 2) { int a = 0; for (int i = 0; i < 3000; i++) { float temp = 3.14f; a += (int) (temp * round(100)); } System.out.println("item_frame_" + a); } int d = round(10); if (y == 3) { int a = round(110f); long b = round(100d); System.out.println("_frame: " + (a + b) * d); } if (y == 4) { int c = 50 * d; double dd = 99.99 * d; System.out.println("Before chop_frame: " + (c + dd)); } else { System.out.println("chop_frame"); } if (y == 5) { int n = 0; for (int i = 0; i < 2500; i++) { float temp = 3.14f; n += (int) (temp * round(i)); } if (n > 100) { System.out.println("_frame_"); } else if (n < 50) { int c = 50 * d; double dd = 99.99 * d; System.out.println(c + dd); } } if (y == 6) { String str = "n_frame"; char ch = 'F'; int num = 100; System.out.println(str + ": " + ch + num); } int z = 0; Object obj1 = null; try { z = 1 / z; } catch (ArithmeticException e) { obj1 = new Object(); } finally { obj1.toString(); } if (z == 0) { obj1 = null; } switch (x) { case 1: obj1 = new Object(); break; case 2: break; } } public int complexMethod(int x, Object o) { int a = 0; int b = 1; Object c = null; try { if (x > 0) { a = x + 1; if (o instanceof String) { c = (String) o; b = c.hashCode(); return b; // Stack has one item (return value) } b = a * 2; } else if (x == -1) { a = -x; b = a + 3; throw new RuntimeException("Test exception"); // Jumps to catch } else { for (int i = 0; i < 2; i++) { a += i; if (a > 1) { b = a - i; break; // Early exit from loop } } } } catch (RuntimeException e) { c = e; // New local variable (exception) b = a + 5; } return a + b; // Final return } public int generateFullFrame(int x) { int result; Object temp; boolean flag; try { if (x > 0) { // Path 1: Push something onto the stack and set locals temp = "positive"; flag = true; result = temp.hashCode(); // Pushes an int onto the stack } else { // Path 2: Different stack state and locals result = x * 2; // Simple computation, stack briefly has an int throw new RuntimeException("non-positive"); } } catch (RuntimeException e) { // Path 3: Exception path with different locals temp = e; flag = false; result = -x; } // Merge point after try-catch if (flag) { return result + 1; // Stack has one item from Path 1 or 3 } // Simulate a different stack state by adding a method call System.out.println("Computing result"); return result; // Stack is empty after println } public static void main(String[] args) { StackMapData data = new StackMapData(); for (int i = 0; i <= 6; i++) { data.generateFrames(i); } data.complexMethod(fldI, "test"); data.generateFullFrame(fldI + 23); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/common/000077500000000000000000000000001514323636100246635ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/common/InputOutputTests.java000066400000000000000000000144141514323636100310750ustar00rootroot00000000000000package org.openjdk.asmtools.common; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.openjdk.asmtools.common.data.TestedHelloWorld; import org.openjdk.asmtools.common.inputs.ByteInput; import org.openjdk.asmtools.common.inputs.StringInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.ByteOutput; import org.openjdk.asmtools.common.outputs.TextOutput; import org.openjdk.asmtools.common.outputs.log.StringLog; import org.openjdk.asmtools.jdis.Options; import org.openjdk.asmtools.lib.helper.ClassPathClassWork; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.nio.file.Files; import static org.junit.jupiter.api.Assertions.fail; public class InputOutputTests extends ClassPathClassWork { @AfterAll public static void unsetDetailedOutputOptions() { Options.setDefaultOutputOptions(); } public LogAndTextResults jdec(boolean g, byte[]... clazz) { ToolInput[] originalFiles = new ToolInput[clazz.length]; for (int i = 0; i < clazz.length; i++) { originalFiles[i] = new ByteInput(clazz[i]); } TextOutput decodedFiles = new TextOutput(); StringLog decodeLog = new StringLog(); org.openjdk.asmtools.jdec.Main jdec = new org.openjdk.asmtools.jdec.Main(decodedFiles, decodeLog, originalFiles); jdec.setVerboseFlag(true); jdec.setTraceFlag(true); if (g) { jdec.setPrintDetails(true); } else { jdec.setPrintDetails(false); } int r = jdec.decode(); return new LogAndTextResults(decodedFiles, decodeLog, r); } public LogAndBinResults jcod(String... clazz) { ToolInput[] originalFiles = new ToolInput[clazz.length]; for (int i = 0; i < clazz.length; i++) { originalFiles[i] = new StringInput(clazz[i]); } ByteOutput encodedFiles = new ByteOutput(); StringLog encodeLog = new StringLog(); org.openjdk.asmtools.jcoder.Main jcod = new org.openjdk.asmtools.jcoder.Main(encodedFiles, encodeLog, originalFiles); jcod.setVerboseFlag(true); jcod.setTraceFlag(true); int r = jcod.compile(); return new LogAndBinResults(encodedFiles, encodeLog, r); } public LogAndTextResults jdis(boolean g, byte[]... clazz) { ToolInput[] originalFiles = new ToolInput[clazz.length]; for (int i = 0; i < clazz.length; i++) { originalFiles[i] = new ByteInput(clazz[i]); } TextOutput decodedFiles = new TextOutput(); StringLog decodeLog = new StringLog(); org.openjdk.asmtools.jdis.Main jdis = new org.openjdk.asmtools.jdis.Main(decodedFiles, decodeLog, originalFiles); jdis.setVerboseFlag(true); jdis.setTraceFlag(true); if (g) { Options.setDetailedOutputOptions(); } else { Options.setDefaultOutputOptions(); } int r = jdis.disasm(); return new LogAndTextResults(decodedFiles, decodeLog, r); } public LogAndBinResults jasm(String... clazz) { ToolInput[] originalFiles = new ToolInput[clazz.length]; for (int i = 0; i < clazz.length; i++) { originalFiles[i] = new StringInput(clazz[i]); } ByteOutput encodedFiles = new ByteOutput(); StringLog encodeLog = new StringLog(); org.openjdk.asmtools.jasm.Main jasm = new org.openjdk.asmtools.jasm.Main(encodedFiles, encodeLog, originalFiles); jasm.setVerboseFlag(true); jasm.setTraceFlag(true); int r = jasm.compile(); return new LogAndBinResults(encodedFiles, encodeLog, r); } @Test public void inMemoryDecCodDecCod() throws IOException { initTestClassData(TestedHelloWorld.class); byte[] data = Files.readAllBytes(new File(classFile).toPath()); LogAndTextResults o1 = jdec(false, data); LogAndBinResults o2 = jcod(o1.output.getOutputs().get(0).getBody()); LogAndTextResults o3 = jdec(false, o2.output.getOutputs().get(0).getBody()); LogAndBinResults o4 = jcod(o3.output.getOutputs().get(0).getBody()); Assertions.assertArrayEquals(new int[]{0, 0, 0, 0}, new int[]{o1.result, o2.result, o3.result, o4.result}); } @Test public void inMemoryDisasmAsmDisasmAsm() throws IOException { initTestClassData(TestedHelloWorld.class); byte[] data = Files.readAllBytes(new File(classFile).toPath()); LogAndTextResults o1 = jdis(false, data); LogAndBinResults o2 = jasm(o1.output.getOutputs().get(0).getBody()); LogAndTextResults o3 = jdis(false, o2.output.getOutputs().get(0).getBody()); LogAndBinResults o4 = jasm(o3.output.getOutputs().get(0).getBody()); Assertions.assertArrayEquals(new int[]{0, 0, 0, 0}, new int[]{o1.result, o2.result, o3.result, o4.result}); } @Test public void inMemoryDecCodDecCodG() throws IOException { initTestClassData(TestedHelloWorld.class); byte[] data = Files.readAllBytes(new File(classFile).toPath()); LogAndTextResults o1 = jdec(true, data); if ( o1.result != 0 ) { fail("jdec TestedHelloWorld.class failed.\n%s".formatted(o1.log)); } LogAndBinResults o2 = jcod(o1.output.getOutputs().get(0).getBody()); LogAndTextResults o3 = jdec(true, o2.output.getOutputs().get(0).getBody()); LogAndBinResults o4 = jcod(o3.output.getOutputs().get(0).getBody()); Assertions.assertArrayEquals(new int[]{0, 0, 0, 0}, new int[]{o1.result, o2.result, o3.result, o4.result}); } @Test public void inMemoryDisasmAsmDisasmAsmG() throws IOException { initTestClassData(TestedHelloWorld.class); byte[] data = Files.readAllBytes(new File(classFile).toPath()); LogAndTextResults o1 = jdis(true, data); LogAndBinResults o2 = jasm(o1.output.getOutputs().get(0).getBody()); LogAndTextResults o3 = jdis(true, o2.output.getOutputs().get(0).getBody()); LogAndBinResults o4 = jasm(o3.output.getOutputs().get(0).getBody()); Assertions.assertArrayEquals(new int[]{0, 0, 0, 0}, new int[]{o1.result, o2.result, o3.result, o4.result}); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/common/SequenceCallsTests.java000066400000000000000000000276451514323636100313160ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.common; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; import org.openjdk.asmtools.lib.action.Jasm; import org.openjdk.asmtools.lib.action.Jcoder; import org.openjdk.asmtools.lib.ext.CaptureSystemOutput; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.opentest4j.MultipleFailuresError; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Function; import java.util.stream.Collectors; import static org.junit.jupiter.api.Assertions.assertAll; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.openjdk.asmtools.lib.ext.CaptureSystemOutput.Kind.ERROR; @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class SequenceCallsTests { final String TEST_RESOURCE_FOLDER = "sequence" + File.separator; private final List errors = Collections.synchronizedList(new ArrayList<>()); private final List intResults = Collections.synchronizedList(new ArrayList<>()); private final List boolResults = Collections.synchronizedList(new ArrayList<>()); private final Jasm jasmCompiler = new Jasm(); private final Jcoder jcodCompiler = new Jcoder(); private final Function, LogAndBinResults> jasm = files -> jasmCompiler.compile(files); private final Function, LogAndBinResults> jcoder = files -> jcodCompiler.compile(files); private final Function, Boolean> reflectiveJasm = files -> jasmCompiler.reflectiveCompile(files); private final Function, Boolean> reflectiveJcoder = files -> jcodCompiler.reflectiveCompile(files); File resourceDir; HashMap>> cases = new HashMap<>() {{ put("jasm", List.of( List.of("EnclMethTest.jcod"), List.of("ConstantPoolTestDummy.jasm"), List.of("Not_Found_1.jasm"), List.of("nonvoidinit.jasm", "nonvoidinit.jasm"), List.of("Not_Found_2.jasm"), List.of("TestInterface01n01.jasm") ) ); put("jcoder", List.of( List.of("EnclMethTest.jcod"), List.of("ConstantPoolTestDummy.jasm"), List.of("Not_Found_I.jcod"), List.of("module-info.jcod"), List.of("atrcod00402m1n.jcod", "stackmap00601m1n.jcod"), List.of("Not_Found_II.jcod") ) ); }}; @BeforeAll public void init() throws IOException { String resName = TEST_RESOURCE_FOLDER + "EnclMethTest.jcod"; // must exist to get a correct path to files File file = new File(this.getClass().getResource(resName).getFile()); resourceDir = file.getParentFile(); } public class CaseExecutor01 implements Runnable { private AtomicInteger counter = new AtomicInteger(0); public void run() throws MultipleFailuresError { int index = counter.getAndIncrement(); List jasmFiles = cases.get("jasm").get(index).stream(). map(f -> resourceDir + File.separator + f).collect(Collectors.toList()); List jcodFiles = cases.get("jcoder").get(index).stream(). map(f -> resourceDir + File.separator + f).collect(Collectors.toList()); if (index % 2 == 0) { assertAll(() -> { LogAndBinResults l = jasm.apply(jasmFiles); // if( l.result != 0) { // System.out.println("%d] Jasm failed with result: %s".formatted(index, l.log.toString() )); // } intResults.add(l.result); }, () -> { LogAndBinResults l = jcoder.apply(jcodFiles); // if( l.result != 0) { // System.out.println("%d] Jcoder failed with result: %s".formatted(index, l.log.toString() )); // } intResults.add(l.result); } ); } else { assertAll(() -> { LogAndBinResults l = jcoder.apply(jcodFiles); // if( l.result != 0) { // System.out.println("%d] Jcoder failed with result: %s".formatted(index, l.log.toString() )); // } intResults.add(l.result); }, () -> { LogAndBinResults l = jasm.apply(jasmFiles); // if( l.result != 0) { // System.out.println("%d] Jasm failed with result: %s".formatted(index, l.log.toString() )); // } intResults.add(l.result); } ); } } } public class CaseExecutor02 implements Runnable { private AtomicInteger counter = new AtomicInteger(0); public void run() throws MultipleFailuresError { int index = counter.getAndIncrement(); List jasmFiles = cases.get("jasm").get(index).stream(). map(f -> resourceDir + File.separator + f).collect(Collectors.toList()); List jcodFiles = cases.get("jcoder").get(index).stream(). map(f -> resourceDir + File.separator + f).collect(Collectors.toList()); if (index % 2 == 0) { assertAll(() -> { var l = reflectiveJasm.apply(jasmFiles); boolResults.add(l); }, () -> { var l = reflectiveJcoder.apply(jcodFiles); boolResults.add(l); } ); } else { assertAll(() -> { var l = reflectiveJcoder.apply(jcodFiles); boolResults.add(l); }, () -> { var l = reflectiveJasm.apply(jasmFiles); boolResults.add(l); } ); } } } /** * This is the test for CODETOOLS-7903401 (https://bugs.openjdk.org/browse/CODETOOLS-7903401) * jtreg fails if set of jdk tests process jasm,jdis files with defects *

* jib make -- test TEST=test/hotspot/jtreg/runtime * Passed: runtime/classFileParserBug/BadInitMethod.java * nonvoidinit.jasm (29:20) Warning: method cannot be an interface method * public abstract Method "":"()I"; * ^ * Passed: runtime/cds/SharedBaseAddress.java#id1 * Passed: runtime/classFileParserBug/FakeMethodAcc.java * switch from jcoder to jcoder * 1 warning(s) * jcoder- ERROR: (I18NResourceBundle) The warning message 'warn.init.in_int' not found * 1 error(s) * -------------------------------------------------- * TEST: runtime/classFileParserBug/InitInInterface.java * TEST JDK: /Users/lkuskov/dev/openjdk/build/macosx-x64/images/jdk *

* ACTION: compile -- Failed. jasm failed * REASON: User specified action: run compile nonvoidinit.jasm voidinit.jasm * TIME: 0.257 seconds * messages: * command: compile /Users/lkuskov/dev/openjdk/test/hotspot/jtreg/runtime/classFileParserBug/nonvoidinit.jasm * /Users/lkuskov/dev/openjdk/test/hotspot/jtreg/runtime/classFileParserBug/voidinit.jasm * reason: User specified action: run compile nonvoidinit.jasm voidinit.jasm *

* The jtreg uses a single instance of asmtool during a test run that leads to error in switching between jasm * and jcoder environment. I.e. the environment is set to Jcod while jasm is processing sources * and therefore jasm can't find jasm-specific message in Jcoder environment. */ @Test public void testCompilersWithConcurrency01() throws InterruptedException { int numberOfThreads = cases.get("jasm").size(); ExecutorService service = Executors.newFixedThreadPool(numberOfThreads); CountDownLatch latch = new CountDownLatch(numberOfThreads); CaseExecutor01 caseExecutor01 = new CaseExecutor01(); for (int i = 0; i < numberOfThreads; i++) { service.execute(() -> { try { caseExecutor01.run(); } catch (MultipleFailuresError error) { errors.add(error); } latch.countDown(); } ); } latch.await(); // check OK's results //"Expected 4 miss plus 2 wrong format files."); assertEquals(12, intResults.size()); Collections.sort(intResults); assertEquals(0, intResults.get(0)); assertEquals(0, intResults.get(1)); assertEquals(0, intResults.get(2)); assertEquals(0, intResults.get(3)); assertEquals(0, intResults.get(4)); assertEquals(0, intResults.get(5)); assertEquals(1, intResults.get(6)); assertEquals(1, intResults.get(7)); assertEquals(1, intResults.get(8)); assertEquals(2, intResults.get(9)); assertEquals(2, intResults.get(10)); assertEquals(8, intResults.get(11)); } @Test @CaptureSystemOutput(value = ERROR, mute = true) public void testCompilersWithConcurrency02() throws InterruptedException { int numberOfThreads = cases.get("jasm").size(); jasmCompiler.setDestDir(); jcodCompiler.setDestDir(); ExecutorService service = Executors.newFixedThreadPool(numberOfThreads); CountDownLatch latch = new CountDownLatch(numberOfThreads); CaseExecutor02 caseExecutor02 = new CaseExecutor02(); for (int i = 0; i < numberOfThreads; i++) { service.execute(() -> { try { caseExecutor02.run(); } catch (MultipleFailuresError error) { errors.add(error); } latch.countDown(); } ); } latch.await(); assertEquals(12, boolResults.size()); assertEquals(6, boolResults.stream().filter(res -> res).count()); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/common/data/000077500000000000000000000000001514323636100255745ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/common/data/TestedHelloWorld.java000066400000000000000000000013231514323636100316620ustar00rootroot00000000000000package org.openjdk.asmtools.common.data; public class TestedHelloWorld { private static final int SOME_PRIMTIVE_CONSTANT=666; private static int somePrimtiveField = 999; private static final TestedHelloWorld SOME_OBJECT_CONSTANT=new TestedHelloWorld(); private static TestedHelloWorld someObjectField = new TestedHelloWorld(); private String privateMethod() { return "hello1"; } protected String protectedMethod() { return "hello2"; } public String publicMethod() { return "hello3"; } private static String privateUtilityMethod() { return "hello4"; } public static String publicUtilityMethod() { return "hello5"; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/000077500000000000000000000000001514323636100243255ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/MultipleFilesInSingleJasmTest.java000066400000000000000000000066561514323636100330670ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.openjdk.asmtools.common.inputs.ByteInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.ByteOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.common.outputs.log.StderrLog; import org.openjdk.asmtools.lib.ext.CaptureSystemOutput; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; import static org.hamcrest.Matchers.containsString; import static org.openjdk.asmtools.lib.ext.CaptureSystemOutput.Kind.ERROR; public class MultipleFilesInSingleJasmTest { @Test @CaptureSystemOutput(value = ERROR, mute = true) public void clfacc00610m10pTest(CaptureSystemOutput.OutputCapture outputCapture) throws IOException { byte[] jasmFile = getJasmFile("clfacc00610m10p.jasm"); ToolInput file = new ByteInput(jasmFile); ByteOutput output = new ByteOutput(); DualStreamToolOutput log = new StderrLog(); org.openjdk.asmtools.jasm.Main jasm = new org.openjdk.asmtools.jasm.Main(output, log, file, "-v"); int i = jasm.compile(); outputCapture.expect(containsString("Class file version not specified in file or by -cv parameter")); Assertions.assertEquals(0, i); Assertions.assertEquals(2, output.getOutputs().size()); } private byte[] getJasmFile(String s) throws IOException { InputStream is = this.getClass().getResourceAsStream(s); byte[] bytes; try (is) { bytes = is.readAllBytes(); } Assertions.assertNotNull(bytes); String jasm = new String(bytes, StandardCharsets.UTF_8); Assertions.assertNotNull(jasm); return bytes; } @Test public void spinum00101m10pTest() throws IOException { byte[] jasmFile = getJasmFile("spinum00101m10p.jasm"); ToolInput file = new ByteInput(jasmFile); ByteOutput output = new ByteOutput(); DualStreamToolOutput log = new StderrLog(); //todo hide to ToolOutput.StringLog once done org.openjdk.asmtools.jasm.Main jasm = new org.openjdk.asmtools.jasm.Main(output, log, file, "-v", "-nowarn"); int i = jasm.compile(); Assertions.assertEquals(0, i); Assertions.assertEquals(258, output.getOutputs().size()); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7902696/000077500000000000000000000000001514323636100260275ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7902696/Tests.java000066400000000000000000000112211514323636100277710ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm.case7902696; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.lib.action.EToolArguments; import org.openjdk.asmtools.lib.action.Jasm; import org.openjdk.asmtools.lib.action.Jdis; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Objects; import java.util.stream.Stream; import static java.lang.String.format; import static org.openjdk.asmtools.common.Environment.FAILED; import static org.openjdk.asmtools.common.Environment.OK; @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class Tests { private final Jasm jasm = new Jasm(); private File resourceDir; private static Stream getJasmParameters() { return Stream.of( Arguments.of("CondyNestedResolution.g.jasm"), Arguments.of("CondyNestedResolution.g.t.jasm")); } @BeforeAll public void init() throws IOException { resourceDir = new File(Objects.requireNonNull(this.getClass(). getResource("CondyNestedResolution.g.jasm")).getFile()).getParentFile(); } /** * This is the test for the issue: CODETOOLS-7902696 (https://bugs.openjdk.org/browse/CODETOOLS-7902696) * "jdis doesn't catch circular references in bsm args" *

* public static Method bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object; * Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" * stack 19 locals 19 * { * getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; * ldc String "In bsm4arg"; * invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/Object;)V"; * getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; * aload_3; * invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/Object;)V"; * getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; * aload 4; * invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/Object;)V"; * getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; * aload 5; * invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/Object;)V"; * getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; * aload 6; * invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/Object;)V"; * aload_3; * areturn; * } * public static Method test_condy:"()V" * stack 12 locals 12 * { * jdis: fatal error in file: CondyNestedResolution.class */ @ParameterizedTest @MethodSource("getJasmParameters") public void testJdisWarning(String resourceName) { // jasm to class final LogAndBinResults binResult = jasm.compile(List.of(resourceDir + File.separator + resourceName)); Assertions.assertEquals(OK, binResult.result); // class to jasm LogAndTextResults textResult = new Jdis().setArgs(EToolArguments.JDIS).decode(binResult.getAsByteInput()); Assertions.assertEquals(FAILED, textResult.result); List out = textResult.getLogStringsByPrefix("ERROR:"); Assertions.assertEquals(9, out.size()); for (String line : out) { Assertions.assertTrue(line.contains("circular reference to Dynamic #")); } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7902820/000077500000000000000000000000001514323636100260145ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7902820/Tests.java000066400000000000000000000102241514323636100277600ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm.case7902820; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; import org.openjdk.asmtools.lib.action.EToolArguments; import org.openjdk.asmtools.lib.action.Jcoder; import org.openjdk.asmtools.lib.action.Jdec; import org.openjdk.asmtools.lib.action.Jdis; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.util.List; import static org.openjdk.asmtools.common.Environment.FAILED; import static org.openjdk.asmtools.common.Environment.OK; @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class Tests { private final Jcoder jcoder = new Jcoder(); private File resourceDir; private String resName = "InvalidSourceDebugExtension.jcod"; @BeforeAll public void init() throws IOException { File file = new File(this.getClass().getResource(resName).getFile()); resourceDir = file.getParentFile(); } /** * This is the test for the issue: CODETOOLS-7902820 (https://bugs.openjdk.org/browse/CODETOOLS-7902820) * "Asmtools incorrectly uses stdout for output error messages" *

* If InvalidSourceDebugExtension.jcod can't be processed by jcoder due to an error in the jcod then the command * java -jar asmtools.jar jcoder -w . InvalidSourceDebugExtension.jcod * hides the error because the error message is outputted to stdout instead of stderr. */ @Test public void testJdisWarning() { final LogAndBinResults jcodResult = jcoder.compile(List.of(resourceDir + File.separator + resName)); List out = jcodResult.getLogStringsByPrefix("Warning:"); Assertions.assertEquals(OK, jcodResult.result); Assertions.assertEquals(1, out.size()); String msg = out.get(0); // expected substring Assertions.assertTrue( msg.contains(" Expected attribute length \"2,147,483,647\" does not match the actual length \"0\"; expected length written")); // // class to jcod LogAndTextResults textResult = new Jdec().setArgs(EToolArguments.JDEC_G).decode(jcodResult.getAsByteInput()); Assertions.assertEquals(FAILED, textResult.result); out = textResult.getLogStringsByPrefix("ERROR:"); Assertions.assertEquals(1, out.size()); msg = out.get(0); Assertions.assertTrue(msg.contains("Requested array size exceeds VM limit")); // class to jasm twice textResult = new Jdis().setArgs(EToolArguments.JDIS_G_T_LNT_LVT).decode(jcodResult.getAsByteInput()); Assertions.assertEquals(FAILED, textResult.result); out = textResult.getLogStringsByPrefix("ERROR:"); Assertions.assertEquals(1, out.size()); msg = out.get(0); Assertions.assertTrue(msg.contains("Requested array size exceeds VM limit")); textResult = new Jdis().setArgs(EToolArguments.JDIS_GG_NC_LNT_LVT).decode(jcodResult.getAsByteInput()); Assertions.assertEquals(FAILED, textResult.result); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7903031/000077500000000000000000000000001514323636100260075ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7903031/Tests.java000066400000000000000000000073471514323636100277670ustar00rootroot00000000000000/* * Copyright (c) 2023,2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm.case7903031; import org.hamcrest.Matchers; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; import org.openjdk.asmtools.lib.action.EToolArguments; import org.openjdk.asmtools.lib.action.Jasm; import org.openjdk.asmtools.lib.action.Jdis; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.util.List; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.fail; /** * This is the test for the issue CODETOOLS-7903031 (https://bugs.openjdk.org/browse/CODETOOLS-7903031) * "jasm: Asmtools does not support CP table when it's processing modules" * Files module-info.class.g.jasm has Constant Pool. * The test is intended to check that the module-info file with Constant Pool can be compiled without issues. */ @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class Tests { private final String[] jasmFiles = new String[]{"module-info.class.g.jasm", "module-info.class.jasm"}; @BeforeAll public void init() throws IOException { for (int i = 0; i < jasmFiles.length; i++) { String fileName = jasmFiles[i]; File resourceDir = new File(this.getClass().getResource(fileName).getFile()).getParentFile(); jasmFiles[i] = resourceDir + File.separator + fileName; } } @Test public void moduleInfoTest() { for (int i = 0; i < jasmFiles.length; i++) { try { //jasm to class LogAndBinResults binResult = new Jasm().compile(List.of(jasmFiles[i])); // class to jasm LogAndTextResults textResult = new Jdis().setArgs(EToolArguments.JDIS_G).decode(binResult.getAsByteInput()); // Check that it is a module-info.jasm with removed spaces, tabs and new lines String jasmOutput = textResult.getResultAsString(s -> s.replaceAll("[ \t\n]*", "")); assertThat(jasmOutput, Matchers.allOf( Matchers.startsWith("module#6/*java.base*/version65"), Matchers.matchesRegex(".*const#100.*"), Matchers.matchesRegex(".*const.*[Cc]lass.*"), Matchers.matchesRegex(".*const.*Package.*"), Matchers.matchesRegex(".*uses.*java.text.spi.DateFormatSymbolsProvider.*"), Matchers.matchesRegex(".*provides.*java.nio.file.spi.FileSystemProvider.*"))); } catch (Exception ex) { fail("Unexpected exception: " + ex); } } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7903405/000077500000000000000000000000001514323636100260145ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7903405/Tests.java000066400000000000000000000074131514323636100277660ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm.case7903405; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; import org.openjdk.asmtools.lib.action.Jasm; import org.openjdk.asmtools.lib.log.LogAndReturn; import java.io.File; import java.io.IOException; import java.util.List; import static org.openjdk.asmtools.common.Environment.OK; @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class Tests { private final Jasm jasm = new Jasm(); private File resourceDir; private String resName = "ifge_overflow.jasm"; @BeforeAll public void init() throws IOException { File file = new File(this.getClass().getResource(resName).getFile()); resourceDir = file.getParentFile(); } /** * This is the test for the issue: CODETOOLS-7903405 (https://bugs.openjdk.org/browse/CODETOOLS-7903405) * "compiler does not warn about instruction arguments that exceed allowed limits" *

* The attached jasm source has a set of nop instructions between the jfqe instruction and the "SKIP" label that is used by it. * The length of the set is 0x8FFF which exceeds allowed by JVMS - signed 16-bit value 0x8000. * The jasm silently produces a class file that is declined by JVM: *

* >java Test * Error: Unable to initialize main class Test * Caused by: java.lang.VerifyError: (class: Test, method: test_1 signature: ()V) Illegal target of jump or branch *

* Since jasm allows to generate a "defect" binaries, it would be nice if the jasm assembler warns that already, * and not just the class file verifier. *

* Expected warning should be like: *

* jasm - WARN: test_1()V - The argument 0x8000 of the 'ifge' instruction is written. * It is larger than the allowed signed 16-bit value 0x7FFF * 1 warning(s) */ @Test public void testIfgeOverflow_7903405() { final LogAndReturn logAndReturn = jasm.compile(List.of(resourceDir + File.separator + resName)); final List warns = logAndReturn.getLogStringsByPrefix("WARN:"); Assertions.assertEquals(logAndReturn.result, OK); Assertions.assertEquals(warns.size(), 1); String warn = warns.get(0); // expected substrings Assertions.assertTrue(warn.contains("test_1()V"), "Expected method name \'test_1()V\' not found"); Assertions.assertTrue(warn.contains("signed 16-bit value 0x7FFF"), "Expected argument length \'signed 16-bit value 0x7FFF\' not found"); Assertions.assertTrue(warn.contains("0x8000"), "Expected length of written argument \'0x8000\' not found"); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7903558/000077500000000000000000000000001514323636100260255ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7903558/Tests.java000066400000000000000000000114551514323636100300000ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm.case7903558; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.lib.action.Jasm; import org.openjdk.asmtools.lib.action.Jdis; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import java.util.stream.Stream; import static java.lang.String.format; import static org.openjdk.asmtools.common.Environment.OK; /** * This is the test for the issue CODETOOLS-7903558 (https://bugs.openjdk.org/browse/CODETOOLS-7903558) * "jasm: add support this_class, super_class value(s)" *

* asm tool should support the values: * this_class[:] (#ID | IDENT); // CLASSNAME * super_class[:] (#ID | IDENT); // SUPERCLASSNAME *

* Then the command `java -jar asmtools.jar jasm -d . FILE.jasm` where the jasm file is as follows: * class FILENAME.data { * this_class CLASSNAME; * super_class SUPERCLASSNAME; * } * will produce a binary file `FILENAME.data` which, after decompiling (`java -jar asmtools.jar jdis FILENAME.data`), will be: *

* super class CLASSNAME extends SUPERCLASSNAME version 45:0 {} */ @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class Tests { private Jasm jasm = new Jasm(); private Jdis jdis = new Jdis(); private File resourceDir; private Path resultDir; private static Stream getTestParameters() { return Stream.of( // Detailed jasm Arguments.of("JasmFile01.g.jasm", "FileName01.class", "ClassName01 extends java/lang/String"), Arguments.of("JasmFile02.g.jasm", "FileName02.data", "ClassName02 extends java/lang/String"), Arguments.of("JasmFile03.g.jasm", "FileName03.class", "ClassName03 extends package/SuperClassName03"), Arguments.of("JasmFile04.g.jasm", "FileName04.obj", "ClassName04 extends package/SuperClassName04"), // short version Arguments.of("JasmFile01.jasm", "FileName01.class", "ClassName01 extends java/lang/String"), Arguments.of("JasmFile02.jasm", "FileName02.data", "ClassName02 extends java/lang/String"), Arguments.of("JasmFile03.jasm", "FileName03.class", "ClassName03 extends package/SuperClassName03"), Arguments.of("JasmFile04.jasm", "FileName04.obj", "ClassName04 version") ); } @BeforeAll public void init() throws IOException { resultDir = Files.createTempDirectory("JdisJasmWorks"); resultDir.toFile().deleteOnExit(); resourceDir = new File(this.getClass().getResource("JasmFile01.g.jasm").getFile()).getParentFile(); jasm.setDestDir(resultDir); } @ParameterizedTest @MethodSource("getTestParameters") public void moduleInfoTest(String resourceName, String outputFileName, String jasmSubString) { // jasm to class on the disk jasm.compile(List.of(resourceDir + File.separator + resourceName)); Path resultPath = Path.of(resultDir + File.separator + outputFileName); Assertions.assertTrue(Files.exists(resultPath), format("Result file not found: %s%n", resultPath)); // class to jasm LogAndTextResults textResult = jdis.decode(List.of(resultPath.toString())); Assertions.assertEquals(textResult.result, OK); // expected substrings String str = textResult.output.toString().substring(0, 80); Assertions.assertTrue(str.contains(jasmSubString), format("'%s' not found in '%s'%n", jasmSubString, str)); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7903976/000077500000000000000000000000001514323636100260315ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7903976/Tests.java000066400000000000000000000103061514323636100277760ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm.case7903976; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.lib.action.Jasm; import org.openjdk.asmtools.lib.log.LogAndBinResults; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import java.util.stream.Stream; /** * This is the test for the issue CODETOOLS-7903976 (https://bugs.openjdk.org/browse/CODETOOLS-7903976) * "The jasm parser should permit malformed method signatures for JCK tests" *

*/ @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class Tests { private Jasm jasm = new Jasm(); private File resourceDir; private static Stream getTestParameters() { return Stream.of( // Detailed jasm Arguments.of("Test01.jasm", "Warning: Malformed method signature at position 1. \"({JavaTypeSignature})Result\" is missing."), Arguments.of("Test02.jasm", "Warning: Malformed method signature at position 38. \"({JavaTypeSignature})Result\" is missing."), Arguments.of("Test03.jasm", "Warning: Malformed method signature at position 3. Unknown token \"X\" in \"({JavaTypeSignature})Result\""), Arguments.of("Test04.jasm", "Warning: Malformed method signature at position 2. Unknown token \"X\" in \"({JavaTypeSignature})Result\""), Arguments.of("Test05.jasm", "Warning: Malformed method signature at position 38. \"({JavaTypeSignature})Result\" is missing."), Arguments.of("Test06.jasm", "Warning: Malformed method signature at position 1. A \"(\" token is expected in \"({JavaTypeSignature})Result\""), Arguments.of("Test07.jasm", "Warning: Malformed method signature at position 3. Unknown token \"X\" in \"({JavaTypeSignature})Result\""), Arguments.of("Test08.jasm", "Warning: Malformed method signature at position 3. An array type signature is expected: \"[JavaTypeSignature\""), Arguments.of("Test09.jasm", "Warning: Malformed method signature at position 39. \"({JavaTypeSignature})Result\" is missing."), Arguments.of("Test10.jasm", "Warning: Malformed method signature at position 19. ClassTypeSignature is not properly terminated: L{PackageSpecifier/}SimpleClassTypeSignature;") ); } @BeforeAll public void init() throws IOException { resourceDir = new File(this.getClass().getResource("Test01.jasm").getFile()).getParentFile(); } @ParameterizedTest @MethodSource("getTestParameters") public void methodSignatureTest(String resourceName, String jasmSubString) { // jasm to class on the disk LogAndBinResults res = jasm.compile(List.of(resourceDir + File.separator + resourceName)); String log = res.log.toString(); Assertions.assertTrue(log.contains(jasmSubString)); // jasm file was created Assertions.assertEquals(0, res.result); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7903987/000077500000000000000000000000001514323636100260335ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/case7903987/Tests.java000066400000000000000000000074411514323636100300060ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jasm.case7903987; import org.hamcrest.Matchers; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.lib.action.EToolArguments; import org.openjdk.asmtools.lib.action.Jasm; import org.openjdk.asmtools.lib.action.Jdis; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import java.util.stream.Stream; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.matchesRegex; /** * This is the test for the enhancement CODETOOLS-7903987 https://bugs.openjdk.org/browse/CODETOOLS-7903987) * "The jasm parser should allow the use of primitive types in Constant Pool." * const #1=true; * const #2=192837465; * const #3=1l; * const #6=2.1f; * const #8="utf 8 entry"; *

*/ @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class Tests { private Jasm jasm = new Jasm(); private Jdis jdis = new Jdis().setArgs(EToolArguments.JDIS_G); private File resourceDir; private static Stream getTestParameters() { return Stream.of( // Detailed jasm Arguments.of("Test00.jasm", "") ); } @BeforeAll public void init() throws IOException { resourceDir = new File(this.getClass().getResource("Test00.jasm").getFile()).getParentFile(); } @ParameterizedTest @MethodSource("getTestParameters") public void test00(String resourceName, String jasmSubString) { // jasm to class on the disk LogAndBinResults binResults = jasm.compile(List.of(resourceDir + File.separator + resourceName)); // jasm file was created Assertions.assertEquals(0, binResults.result); LogAndTextResults textResults = jdis.decode(binResults.getAsByteInput()); Assertions.assertEquals(0, textResults.result); String buf = textResults.output.toString(); assertThat(buf, matchesRegex("(?s).*const.*#1.*int.*1;.*")); assertThat(buf, matchesRegex("(?s).*const.*#2.*int.*192837465;.*")); assertThat(buf, matchesRegex("(?s).*const.*#3.*long.*1l;.*")); assertThat(buf, matchesRegex("(?s).*const.*#5.*float.*2.1f;.*")); assertThat(buf, matchesRegex("(?s).*const.*#6.*double.*2.2d;.*")); assertThat(buf, matchesRegex("(?s).*const.*#8.*Utf8.*Long utf-8.*")); assertThat(buf, matchesRegex("(?s).*const.*#9.*int.*0;.*")); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jasm/package-info.java000066400000000000000000000021351514323636100275150ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * jasm oriented tests */ package org.openjdk.asmtools.jasm; jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jcoder/000077500000000000000000000000001514323636100246415ustar00rootroot00000000000000MultipleFilesInSingleJcoderTest.java000066400000000000000000000027441514323636100336320ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jcoderpackage org.openjdk.asmtools.jcoder; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.openjdk.asmtools.common.inputs.ByteInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.ByteOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.common.outputs.log.StderrLog; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; public class MultipleFilesInSingleJcoderTest { @Test public void jcod12Test() throws IOException { byte[] jcodFile = getJcodFile("12.jcod"); ToolInput file = new ByteInput(jcodFile); ByteOutput output = new ByteOutput(); DualStreamToolOutput log = new StderrLog(); //todo hide to ToolOutput.StringLog once done org.openjdk.asmtools.jcoder.Main jcod = new org.openjdk.asmtools.jcoder.Main(output, log, file, "-v"); int i = jcod.compile(); Assertions.assertEquals(0, i); Assertions.assertEquals(2, output.getOutputs().size()); } private byte[] getJcodFile(String s) throws IOException { InputStream is = this.getClass().getResourceAsStream(s); byte[] bytes = null; try (is) { bytes = is.readAllBytes(); } Assertions.assertNotNull(bytes); String jasm = new String(bytes, StandardCharsets.UTF_8); Assertions.assertNotNull(jasm); return bytes; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jdec/000077500000000000000000000000001514323636100243005ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jdec/JdecJcod.java000066400000000000000000000060231514323636100266110ustar00rootroot00000000000000package org.openjdk.asmtools.jdec; import org.junit.jupiter.api.Assertions; import org.openjdk.asmtools.lib.helper.BruteForceHelper; import org.openjdk.asmtools.lib.helper.ThreeStringWriters; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Map; class JdecJcod { private final boolean g; private final BruteForceHelper worker; public JdecJcod(boolean g, BruteForceHelper worker) { this.g = g; this.worker = worker; } public void run() throws IOException { BruteForceHelper.AsmToolsExecutable jdec = new BruteForceHelper.AsmToolsExecutable() { @Override public int run(ThreeStringWriters outs, File clazz) throws IOException { Main decoder; if (g) { decoder = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), "-g", clazz.getAbsolutePath()); } else { decoder = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), clazz.getAbsolutePath()); } return decoder.decode(); } @Override public void ensure(List all, Map failures) { String gs = ""; if (g) { gs = "with -g "; } Assertions.assertEquals(0, failures.size(), "from " + all.size() + "(" + worker.getClassesRoot() + ") failed to decode " + gs + failures.size() + ": " + BruteForceHelper.keySetToString(failures, worker.getClassesRoot())); } }; BruteForceHelper.AsmToolsExecutable jasm = new JasmToolExecutable(worker, g); worker.work(jdec, jasm); } private static class JasmToolExecutable implements BruteForceHelper.AsmToolsExecutable { private final BruteForceHelper worker; private final String g; public JasmToolExecutable(BruteForceHelper worker, boolean g) { this.worker = worker; if (g) { this.g = " (from -g decode) "; } else { this.g = ""; } } @Override public int run(ThreeStringWriters outs, File clazz) throws IOException { File savedCode = BruteForceHelper.saveDecompiledCode(worker.getDecompiledClass(clazz), "JdecJcodWorks"); org.openjdk.asmtools.jcoder.Main coder = new org.openjdk.asmtools.jcoder.Main(outs.getLoggers(), savedCode.getAbsolutePath(), "-d", worker.getCompileDir().getAbsolutePath()); BruteForceHelper.createMetadata(outs, clazz, savedCode, worker.getCompileDir(), worker.getClassesRoot()); return coder.compile(); } @Override public void ensure(List all, Map failures) { Assertions.assertEquals(0, failures.size(), "from " + all.size() + " failed to encode " + g + " to (" + worker.getCompileDir() + ") " + failures.size() + ": " + BruteForceHelper.keySetToString(failures, worker.getClassesRoot())); } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jdec/JdecJcodTests.java000066400000000000000000000031221514323636100276310ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdec; import org.junit.jupiter.api.Test; import org.openjdk.asmtools.lib.helper.BruteForceHelper; import java.io.IOException; class JdecJcodTests { @Test public void jdecJcodAllDecompileCompileAndLoad() throws IOException { BruteForceHelper worker = new BruteForceHelper(); new JdecJcod(false, worker).run(); } @Test public void jdecGJcodAllDecompileCompileAndLoad() throws IOException { BruteForceHelper worker = new BruteForceHelper(); new JdecJcod(true, worker).run(); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jdec/MainTest.java000066400000000000000000000112551514323636100266730ustar00rootroot00000000000000package org.openjdk.asmtools.jdec; /* * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.openjdk.asmtools.lib.action.Jcoder; import org.openjdk.asmtools.lib.helper.ClassPathClassWork; import org.openjdk.asmtools.lib.helper.ThreeStringWriters; import org.openjdk.asmtools.lib.log.LogAndBinResults; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.List; class MainTest extends ClassPathClassWork { @BeforeAll public static void prepareClass() { initMainClassData(org.openjdk.asmtools.jdec.Main.class); } @Test public void main3StreamsNoSuchFileError() { ThreeStringWriters outs = new ThreeStringWriters(); String nonExistingFile = "someNonExistingFile"; Main decoder = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), nonExistingFile); int i = decoder.decode(); outs.flush(); Assertions.assertEquals(1, i); Assertions.assertTrue(outs.getToolBos().isEmpty()); Assertions.assertTrue(outs.getLoggerBos().isEmpty()); Assertions.assertTrue(outs.getErrorBos().contains("No such file")); Assertions.assertTrue(outs.getErrorBos().contains(nonExistingFile)); } @Test public void main3StreamsCorruptedFileError() throws IOException { ThreeStringWriters outs = new ThreeStringWriters(); String badJcodFile = getFile("/org/openjdk/asmtools/jcoder/bad.jcod"); // jcod to class LogAndBinResults compileResult = new Jcoder().compile(List.of(badJcodFile)); // class to jcod Main decoder = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), compileResult.getAsByteInput()); int i = decoder.decode(); outs.flush(); Assertions.assertEquals(1, i); Assertions.assertTrue(outs.getErrorBos().contains("jdec - ERROR: Invalid constant type: 0 for element 1")); Assertions.assertTrue(outs.getErrorBos().contains("1 error(s) in the file: bytes/bytes")); Assertions.assertTrue(outs.getToolBos().contains("0xCA 0xFE 0xBA 0x00 0x03 0x00 0x2D 0x00;")); Assertions.assertTrue(outs.getLoggerBos().isEmpty()); } @Test public void main3StreamsFileInCorrectStream() throws IOException { ThreeStringWriters outs = new ThreeStringWriters(); Main decoder = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), classFile); int i = decoder.decode(); outs.flush(); Assertions.assertEquals(0, i); Assertions.assertFalse(outs.getToolBos().isEmpty()); Assertions.assertTrue(outs.getErrorBos().isEmpty()); Assertions.assertTrue(outs.getLoggerBos().isEmpty()); Assertions.assertTrue(outs.getToolBos().contains("0xCAFEBABE;")); } @Test public void main3StreamsStdinCorrectStream() throws IOException { ThreeStringWriters outs = new ThreeStringWriters(); File in = new File(classFile); InputStream is = System.in; try { System.setIn(new FileInputStream(in)); Main decoder = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), org.openjdk.asmtools.Main.STDIN_SWITCH); int i = decoder.decode(); outs.flush(); Assertions.assertEquals(0, i); Assertions.assertFalse(outs.getToolBos().isEmpty()); Assertions.assertTrue(outs.getErrorBos().isEmpty()); Assertions.assertTrue(outs.getLoggerBos().isEmpty()); Assertions.assertTrue(outs.getToolBos().contains("0xCAFEBABE")); } finally { System.setIn(is); } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jdec/case7902055/000077500000000000000000000000001514323636100257675ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jdec/case7902055/Tests.java000066400000000000000000000103311514323636100277320ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdec.case7902055; import org.hamcrest.Matchers; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.lib.action.*; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Objects; import java.util.stream.Stream; import static java.lang.String.format; import static org.hamcrest.MatcherAssert.assertThat; import static org.openjdk.asmtools.common.Environment.OK; /** * This is the test for the issue: CODETOOLS-7902055 (https://bugs.openjdk.org/browse/CODETOOLS-7902055) * "Preserve module name in jdec output" * dec output doesn't preserve the name of the module at the start of the * declaration. * * Example: * ------------------------------- * $ cat module-info.jcod * module foo.bar { * } // end module foo.bar * * $ java -jar asmtools.jar jcoder -d out module-info.jcod * $ java -jar asmtools.jar jdec out/module-info.class > module-info.jcod.after * $ diff module-info.jcod module-info.jcod.after * 1c1 * < module foo.bar { * --- * > module { * ------------------------------- * * Note that the module name in the end comment ("end module XXX") is * preserved. * * The name given at the start of the module doesn't seem to have any effect on the .class output, * but it would be nice to preserve it for readability reasons. */ @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class Tests { private final Jcoder jcoder = new Jcoder(); private File resourceDir; private static Stream getJCodParameters() { return Stream.of( Arguments.of("module-info.g.jcod", "\\s*module\\s+moduleB\\s*\\{"), Arguments.of("module-info.jcod", "\\s*module\\s+moduleB\\s*\\{")); } @BeforeAll public void init() throws IOException { resourceDir = new File(Objects.requireNonNull(this.getClass(). getResource("module-info.jcod")).getFile()).getParentFile(); } // jcod -> .class -> jcod round trip should preserve the module name @ParameterizedTest @MethodSource("getJCodParameters") public void testJCoderJdecRoundTrip(String resourceName, String jcodRegex) { // jcod to class final LogAndBinResults binResult = jcoder.compile(List.of(resourceDir + File.separator + resourceName)); Assertions.assertEquals(OK, binResult.result); // class to jcod for ( EToolArguments arg : List.of(EToolArguments.JDEC, EToolArguments.JDEC_G)) { LogAndTextResults textResult = new Jdec().setArgs(arg).decode(binResult.getAsByteInput()); Assertions.assertEquals(OK, textResult.result); // expected substrings String jcodOutput = textResult.output.toString(); jcodOutput = jcodOutput.substring(0, jcodOutput.indexOf("{")+1); assertThat(jcodOutput, Matchers.matchesRegex(jcodRegex)); } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jdis/000077500000000000000000000000001514323636100243245ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jdis/JdisJasm.java000066400000000000000000000114331514323636100266750ustar00rootroot00000000000000/* * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.junit.jupiter.api.Assertions; import org.openjdk.asmtools.lib.helper.BruteForceHelper; import org.openjdk.asmtools.lib.helper.ThreeStringWriters; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Map; import static org.openjdk.asmtools.common.Environment.OK; import static org.openjdk.asmtools.lib.utility.StringUtils.addTail; class JdisJasm { private final String[] jdisArgs; private String[] jasmArgs = new String[0]; private final BruteForceHelper worker; public JdisJasm(BruteForceHelper worker, String... jdisArgs) { this.jdisArgs = jdisArgs; this.worker = worker; } public JdisJasm setJasmArgs(String... jasmArgs) { this.jasmArgs = jasmArgs; return this; } public void run() throws IOException { BruteForceHelper.AsmToolsExecutable jdis = new BruteForceHelper.AsmToolsExecutable() { @Override public int run(ThreeStringWriters outs, File clazz) throws IOException { Main disassem; if (jdisArgs.length == 0) { disassem = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), clazz.getAbsolutePath()); } else { disassem = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), addTail(jdisArgs, clazz.getAbsolutePath())); } return disassem.disasm(); } @Override public void ensure(List all, Map failures) { String gs = (jdisArgs.length == 0) ? "" : "with %s ".formatted(String.join(",", jdisArgs)); Assertions.assertEquals(0, failures.size(), "from " + all.size() + "(" + worker.getClassesRoot() + ") failed to disassemble " + gs + failures.size() + ": " + BruteForceHelper.keySetToString(failures, worker.getClassesRoot())); } }; BruteForceHelper.AsmToolsExecutable jasm = new JasmToolExecutable(worker, jasmArgs); worker.work(jdis, jasm); } private static class JasmToolExecutable implements BruteForceHelper.AsmToolsExecutable { private final BruteForceHelper worker; private final String[] arguments; public JasmToolExecutable(BruteForceHelper worker, String[] arguments) { this.worker = worker; this.arguments = arguments; } @Override public int run(ThreeStringWriters outs, File clazz) throws IOException { File savedAsm = BruteForceHelper.saveDecompiledCode(worker.getDecompiledClass(clazz), "JdisJasmWorks"); org.openjdk.asmtools.jasm.Main asm = new org.openjdk.asmtools.jasm.Main(outs.getLoggers(), addTail(arguments, savedAsm.getAbsolutePath(), "-d", worker.getCompileDir().getAbsolutePath())); BruteForceHelper.createMetadata(outs, clazz, savedAsm, worker.getCompileDir(), worker.getClassesRoot()); int rc = asm.compile(); if (rc != OK) { outs.getToolOutput().println("Failed to compile %s".formatted(savedAsm)); outs.getToolOutput().flush(); } return rc; } @Override public void ensure(List all, Map failures) { //three classes now fails; they will fail again in an attempt to be loaded on NPE Assertions.assertEquals(0, failures.size(), "from " + all.size() + " failed to assemble " + String.join(",", arguments) + " to (" + worker.getCompileDir() + ") " + failures.size() + ": " + BruteForceHelper.keySetToString(failures, worker.getClassesRoot())); } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jdis/JdisJasmTest.java000066400000000000000000000037731514323636100275450ustar00rootroot00000000000000/* * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.junit.jupiter.api.Test; import org.openjdk.asmtools.lib.helper.BruteForceHelper; import java.io.IOException; class JdisJasmTest { @Test public void jdisJasmAllDecompileCompileAndLoad() throws IOException { BruteForceHelper worker = new BruteForceHelper(); JdisJasm task = new JdisJasm(worker); task.run(); } @Test public void jdisTJasmAllDecompileCompileAndLoad() throws IOException { BruteForceHelper worker = new BruteForceHelper(); new JdisJasm(worker, "-table").run(); } @Test public void jdisGJasmAllDecompileCompileAndLoad() throws IOException { BruteForceHelper worker = new BruteForceHelper(); new JdisJasm(worker, "-g").run(); } @Test public void jdisGTJasmAllDecompileCompileAndLoad() throws IOException { BruteForceHelper worker = new BruteForceHelper(); new JdisJasm(worker, "-g", "-table").run(); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/jdis/MainTest.java000066400000000000000000000203431514323636100267150ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.jdis; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.openjdk.asmtools.lib.helper.ClassPathClassWork; import org.openjdk.asmtools.lib.helper.ThreeStringWriters; import org.openjdk.asmtools.common.outputs.StdoutOutput; import org.openjdk.asmtools.common.outputs.log.StderrLog; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.nio.file.Files; class MainTest extends ClassPathClassWork { @BeforeAll public static void prepareClass() { Options.setDefaultOutputOptions(); initMainClassData(org.openjdk.asmtools.jdis.Main.class); } @Test public void main3StreamsNoSuchFileError() { ThreeStringWriters outs = new ThreeStringWriters(); String nonExisitngFile = "someNonExistingFile"; Main decoder = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), nonExisitngFile); int i = decoder.disasm(); outs.flush(); Assertions.assertEquals(1, i); Assertions.assertTrue(outs.getToolBos().isEmpty()); Assertions.assertTrue(outs.getLoggerBos().isEmpty()); Assertions.assertTrue(outs.getErrorBos().contains("No such file")); Assertions.assertTrue(outs.getErrorBos().contains(nonExisitngFile)); } @Test public void main3StreamsFileInCorrectStream() throws IOException { ThreeStringWriters outs = new ThreeStringWriters(); Main decoder = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), classFile); int i = decoder.disasm(); outs.flush(); Assertions.assertEquals(0, i); Assertions.assertFalse(outs.getToolBos().isEmpty()); Assertions.assertTrue(outs.getErrorBos().isEmpty()); Assertions.assertTrue(outs.getLoggerBos().isEmpty()); Assertions.assertTrue(outs.getToolBos().contains("invoke")); Assertions.assertEquals(1, packageName.matcher(outs.getToolBos()).results().count()); Assertions.assertEquals(1, className.matcher(outs.getToolBos()).results().count()); } @Test public void main3StreamsStdinCorrectStream() throws IOException { ThreeStringWriters outs = new ThreeStringWriters(); File in = new File(classFile); InputStream is = System.in; try { System.setIn(new FileInputStream(in)); Main decoder = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), org.openjdk.asmtools.Main.STDIN_SWITCH); int i = decoder.disasm(); outs.flush(); Assertions.assertEquals(0, i); //pise to do stder:-/ Assertions.assertFalse(outs.getToolBos().isEmpty()); Assertions.assertTrue(outs.getErrorBos().isEmpty()); Assertions.assertTrue(outs.getLoggerBos().isEmpty()); Assertions.assertTrue(outs.getToolBos().contains("invoke")); Assertions.assertEquals(1, packageName.matcher(outs.getToolBos()).results().count()); Assertions.assertEquals(1, className.matcher(outs.getToolBos()).results().count()); } finally { System.setIn(is); } } @Test public void superIsNotOmitted() throws IOException { ThreeStringWriters outs = new ThreeStringWriters(); String testClazz = clazz.getName().replace('.', '/'); String name = testClazz.replaceAll(".*/", ""); Main decoder = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), classFile); int i = decoder.disasm(); outs.flush(); Assertions.assertEquals(0, i); Assertions.assertFalse(outs.getToolBos().isEmpty()); Assertions.assertTrue(outs.getErrorBos().isEmpty()); Assertions.assertTrue(outs.getLoggerBos().isEmpty()); String clazz = outs.getToolBos(); for (String line : clazz.split("\n")) { if (line.contains("class " + name + " extends JdisTool")) { Assertions.assertTrue(line.contains("super"), "class declaration had super omitted - " + line); checkSupperIsOmittedIfNotPresent(clazz, testClazz); return; } } Assertions.assertTrue(false, "class Main was not found in disassembled output"); } private void checkSupperIsOmittedIfNotPresent(String clazzWithSuper, String fqn) throws IOException { String name = fqn.replaceAll(".*/", ""); String classWithoutSuper = clazzWithSuper.replaceFirst(" super ", " "); File sourceWithoutSuper = File.createTempFile("jasmTest", name + ".jasm"); sourceWithoutSuper.deleteOnExit(); Files.write(sourceWithoutSuper.toPath(), classWithoutSuper.getBytes(StandardCharsets.UTF_8)); File dir = File.createTempFile("asmtools-jasmtest", "tmp.dir"); dir.delete(); dir.mkdir(); dir.deleteOnExit(); org.openjdk.asmtools.jasm.Main jasmTool = new org.openjdk.asmtools.jasm.Main( new StdoutOutput(), new StderrLog(), sourceWithoutSuper.getAbsolutePath(), "-d", dir.getAbsolutePath()); int ii = jasmTool.compile(); Assertions.assertEquals(0, ii); ThreeStringWriters outs = new ThreeStringWriters(); Main decoder = new Main( outs.getToolOutputWrapper(), outs.getLoggers(), dir.getAbsolutePath() + "/" + fqn + ".class"); int i = decoder.disasm(); outs.flush(); Assertions.assertEquals(0, i); Assertions.assertFalse(outs.getToolBos().isEmpty()); Assertions.assertTrue(outs.getErrorBos().isEmpty()); Assertions.assertTrue(outs.getLoggerBos().isEmpty()); String clazz = outs.getToolBos(); for (String line : clazz.split("\n")) { if (line.contains("class " + name + " extends JdisTool")) { Assertions.assertFalse(line.contains("super"), "class declaration had NOT super omitted - " + line); return; } } Assertions.assertTrue(false, "class Main was not found in disassembled output"); } @Test public void mainBothFileAndStreamIsRead() throws IOException { ThreeStringWriters outs = new ThreeStringWriters(); File in = new File(classFile); InputStream is = System.in; try { System.setIn(new FileInputStream(in)); Main decoder = new Main(outs.getToolOutputWrapper(), outs.getLoggers(), classFile, org.openjdk.asmtools.Main.STDIN_SWITCH, classFile, org.openjdk.asmtools.Main.STDIN_SWITCH); int i = decoder.disasm(); outs.flush(); Assertions.assertEquals(0, i); Assertions.assertFalse(outs.getToolBos().isEmpty()); Assertions.assertTrue(outs.getErrorBos().isEmpty()); Assertions.assertTrue(outs.getLoggerBos().isEmpty()); Assertions.assertTrue(outs.getToolBos().contains("invoke")); //3, both files, but stream only once, despite two are sets Assertions.assertEquals(3, packageName.matcher(outs.getToolBos()).results().count()); Assertions.assertEquals(3, className.matcher(outs.getToolBos()).results().count()); } finally { System.setIn(is); } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/000077500000000000000000000000001514323636100241415ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/action/000077500000000000000000000000001514323636100254165ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/action/Action.java000066400000000000000000000066141514323636100275050ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.action; import java.io.File; import java.nio.file.Path; import java.util.List; import java.util.function.Supplier; import static org.junit.jupiter.api.Assertions.fail; public class Action { private final EAsmTool tool; protected final String toolName; private FSAction fsAction = new FSAction(); protected EToolArguments currentToolArgs; public Action(EAsmTool tool) { this.tool = tool; toolName = tool.getName(); currentToolArgs = EToolArguments.getArgumentsByPriority(tool, 0); } public Action(EAsmTool tool, Path destDir) { this(tool); this.fsAction = new FSAction().setupDestDir(destDir); } public Action setArgs(EToolArguments args) { if (args.tool != this.tool) { fail("Arguments mismatch for the tool " + args.tool); } currentToolArgs = args; return this; } public final List getListOfToolArgs() { return EToolArguments.ofTool(tool); } /** * Sets up the output directory. * * @param destDir the directory to be used for output * @return the instance */ public Action setDestDir(Path destDir) { fsAction.setupDestDir(destDir); return this; } /** * Sets the type of output, either to the file system or a memory buffer. * * @param value true if the output destination is the file system; otherwise, it is a memory buffer. * @return the instance */ public Action FSOtput(boolean value) { if (value) { fsAction.setupDestDir(null); } else { fsAction.createDestDir(); } return this; } public boolean isFSOutput() { return fsAction.getDestDir() != null; } /** * Sets up the temporary output directory that will be created * * @return the instance */ public Action setDestDir() { fsAction.createDestDir(); return this; } public List getDestDirParams() { return fsAction.getDestDirParams(); } public String getDestDir() { return fsAction.getDestDir().toString(); } public Action setDebug(boolean value) { DebugHelper.setDebug(value); return this; } public void trace(Supplier info) { DebugHelper.trace(info); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/action/CompileActor.java000066400000000000000000000117251514323636100306500ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.action; import org.openjdk.asmtools.common.Compiler; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.common.TriFunction; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.ByteOutput; import org.openjdk.asmtools.common.outputs.log.StringLog; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndReturn; import java.io.PrintStream; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.nio.file.Path; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import static org.junit.jupiter.api.Assertions.fail; import static org.openjdk.asmtools.asmutils.StringUtils.ListToString; public abstract sealed class CompileActor, R extends LogAndReturn> extends Action permits Jasm, Jcoder { protected TriFunction inputsCompiler; protected TriFunction filesCompiler; protected CompileActor(EAsmTool tool) { super(tool); } protected CompileActor(EAsmTool tool, Path destDir) { super(tool, destDir); } /** * Moderator method based on reflection API to call compiler */ public boolean reflectiveCompile(List files) { boolean result = false; if (files.isEmpty()) fail(toolName + ": no files"); ArrayList args = new ArrayList<>(Arrays.asList(currentToolArgs.getArgs())); args.addAll(getDestDirParams()); args.addAll(files); try { String toolClassName = "org.openjdk.asmtools." + toolName + ".Main"; Class toolClass = Class.forName(toolClassName); Constructor constr = toolClass.getConstructor(PrintStream.class, String.class); PrintStream ps = new PrintStream(System.out); Object tool = constr.newInstance(ps, toolName); Method m = toolClass.getMethod("compile", String[].class); Object r = m.invoke(tool, new Object[]{args.toArray(String[]::new)}); if (r instanceof Boolean) { result = (Boolean) r; } else { fail("unexpected result from " + toolName + ": " + r.toString()); } } catch (ClassNotFoundException e) { fail("can't find " + toolName); } catch (ReflectiveOperationException t) { fail("error invoking " + toolName + ": " + t); } return result; } public R compile(List files) { if (files.size() == 0) fail("%s: tool inputs are missing".formatted(toolName)); ArrayList args = new ArrayList<>(Arrays.asList(currentToolArgs.getArgs())); args.addAll(getDestDirParams()); args.addAll(files); super.trace(()->"%s.compile%s".formatted(toolName, ListToString(args))); ByteOutput encodedFiles = new ByteOutput(); StringLog encodeLog = new StringLog(); C compiler = filesCompiler.apply(encodedFiles, encodeLog, args.toArray(String[]::new)); int rc = compiler.compile(); return (R) new LogAndBinResults(encodedFiles, encodeLog, rc); } public R compile(ToolInput... toolInputs) { if (toolInputs.length == 0) fail("%s: tool inputs are missing".formatted(toolName)); ArrayList args = new ArrayList<>(Arrays.asList(currentToolArgs.getArgs())); args.addAll(getDestDirParams()); super.trace(()->"%s.compile%s".formatted(toolName, ListToString(args))); ByteOutput encodedFiles = new ByteOutput(); StringLog encodeLog = new StringLog(); C compiler = inputsCompiler.apply(encodedFiles, encodeLog, toolInputs); int rc = compiler.compile(args.toArray(String[]::new)) ? Environment.OK : Environment.FAILED; return (R) new LogAndBinResults(encodedFiles, encodeLog, rc); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/action/DebugHelper.java000066400000000000000000000027471514323636100304610ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.action; import java.util.function.Supplier; public class DebugHelper { protected static boolean Debug = false; public static void setDebug(boolean debug) { Debug = debug; } public static boolean isDebug() { return Debug; } public static void trace(Supplier info) { if (Debug) { System.out.format("TRACE: %s%n".formatted(info.get())); } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/action/DecodeActor.java000066400000000000000000000115141514323636100304370ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.action; import org.openjdk.asmtools.common.Decoder; import org.openjdk.asmtools.common.Environment; import org.openjdk.asmtools.common.TriFunction; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.StdoutOutput; import org.openjdk.asmtools.common.outputs.TextOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; import org.openjdk.asmtools.common.outputs.log.StringLog; import org.openjdk.asmtools.lib.log.LogAndReturn; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.nio.file.Path; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import static org.junit.jupiter.api.Assertions.fail; import static org.openjdk.asmtools.asmutils.StringUtils.ListToString; import static org.openjdk.asmtools.common.Environment.OK; public abstract sealed class DecodeActor, R extends LogAndReturn> extends Action permits Jdis, Jdec { protected TriFunction inputsDecoder; protected TriFunction filesDecoder; protected DecodeActor(EAsmTool tool) { super(tool); } protected DecodeActor(EAsmTool tool, Path destDir) { super(tool, destDir); } /** * Moderator method based on reflection API to call tools */ public boolean reflectiveCompile(List files) { boolean result = false; if (files.isEmpty()) fail(toolName + ": no files"); ArrayList args = new ArrayList<>(Arrays.asList(currentToolArgs.getArgs())); args.addAll(getDestDirParams()); args.addAll(files); try { String toolClassName = "org.openjdk.asmtools." + toolName + ".Main"; Class toolClass = Class.forName(toolClassName); Constructor constr = toolClass.getConstructor(ToolOutput.class, String[].class); Object tool = constr.newInstance(new StdoutOutput(), args.toArray(String[]::new)); Method m = toolClass.getMethod("decode"); int r = (int) m.invoke(tool); return r == OK; } catch (ClassNotFoundException e) { fail("can't find " + toolName); } catch (ReflectiveOperationException t) { fail("error invoking " + toolName + ": " + t); } return result; } public R decode(List files) { if (files.size() == 0) fail("%s: tool inputs are missing".formatted(toolName)); ArrayList args = new ArrayList<>(Arrays.asList(currentToolArgs.getArgs())); args.addAll(getDestDirParams()); args.addAll(files); super.trace(()->"%s.decode%s".formatted(toolName, ListToString(args))); TextOutput encodedFiles = new TextOutput(); StringLog encodeLog = new StringLog(); D decoder = filesDecoder.apply(encodedFiles, encodeLog, args.toArray(String[]::new)); int rc = decoder.decode(); return (R) new LogAndTextResults(encodedFiles, encodeLog, rc); } public R decode(ToolInput... toolInputs) { if (toolInputs.length == 0) fail("%s: tool inputs are missing".formatted(toolName)); ArrayList args = new ArrayList<>(Arrays.asList(currentToolArgs.getArgs())); args.addAll(getDestDirParams()); super.trace(()->"%s.decode%s".formatted(toolName, ListToString(args))); TextOutput encodedFiles = new TextOutput(); StringLog encodeLog = new StringLog(); D decoder = inputsDecoder.apply(encodedFiles, encodeLog, toolInputs); int rc = decoder.decode(args.toArray(String[]::new)) ? OK : Environment.FAILED; return (R) new LogAndTextResults(encodedFiles, encodeLog, rc); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/action/EAsmTool.java000066400000000000000000000056111514323636100277470ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.action; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.lib.log.LogAndReturn; import java.util.List; import java.util.function.Function; import static org.junit.jupiter.api.Assertions.fail; public enum EAsmTool { UNDEF("", null, null), JASM(".jasm", (files) -> new Jasm().compile(files), (inputs) -> new Jasm().compile(inputs)), JCODER(".jcod", (files) -> new Jcoder().compile(files), (inputs) -> new Jcoder().compile(inputs)), JDEC(".class", (files) -> new Jdec().decode(files), (inputs) -> new Jdec().decode(inputs)), JDIS(".class", (files) -> new Jdis().decode(files), (inputs) -> new Jdis().decode(inputs)); private final String fileExtension; private final Function, LogAndReturn> filesTool; private final Function inputsTool; EAsmTool(String fileExtension, Function, LogAndReturn> filesTool, Function inputsTool) { this.fileExtension = fileExtension; this.filesTool = filesTool; this.inputsTool = inputsTool; } public LogAndReturn call(List files) { return filesTool.apply(files); } public LogAndReturn call(ToolInput[] inputs) { return inputsTool.apply(inputs); } public String getName() { return this.name().toLowerCase(); } public String getFileExtension() { return fileExtension; } public static EAsmTool getToolBy(String toolName) { for (EAsmTool t : values()) { if (toolName.compareToIgnoreCase(t.name()) == 0) return t; } fail("The tool %s isn't yet supported.".formatted(toolName)); return null; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/action/EToolArguments.java000066400000000000000000000057131514323636100311770ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.action; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; public enum EToolArguments { NONE(new String[0], EAsmTool.UNDEF, 0), JDIS(new String[0], EAsmTool.JDIS, 0), JDIS_T(new String[]{"-table"}, EAsmTool.JDIS, 1), JDIS_G(new String[]{"-g"}, EAsmTool.JDIS, 2), JDIS_GG(new String[]{"-gg"}, EAsmTool.JDIS, 3), JDIS_G_T(new String[]{"-g", "-table"}, EAsmTool.JDIS, 4), JDIS_GG_T_NC(new String[]{"-gg", "-table", "-nc"}, EAsmTool.JDIS, 5), JDIS_G_T_LNT_LVT(new String[]{"-g", "-table", "-lnt", "-lvt"}, EAsmTool.JDIS, 6), JDIS_GG_NC_LNT_LVT(new String[]{"-gg", "-table", "-lnt", "-lvt", "-nc"}, EAsmTool.JDIS, 7), JDEC(new String[0], EAsmTool.JDEC, 1), JDEC_G(new String[]{"-g"}, EAsmTool.JDEC, 2), JASM(new String[0], EAsmTool.JASM, 0), JASM_STRICT(new String[]{"-strict"}, EAsmTool.JASM, 1), JASM_NOWARN(new String[]{"-nowarn"}, EAsmTool.JASM, 2); final String[] args; final EAsmTool tool; final int priority; EToolArguments(String[] args, EAsmTool tool, int priority) { this.args = args; this.tool = tool; this.priority = priority; } public String getPostfix() { String str = Arrays.stream(args).map(s -> s.replace("-", "")). collect(Collectors.joining(".")); return (!str.isEmpty()) ? "." + str : ""; } public String[] getArgs() { return args; } public static List ofTool(EAsmTool eAsmTool) { return Arrays.stream(values()). filter(v -> v.tool == eAsmTool). collect(Collectors.toCollection(ArrayList::new)); } public static EToolArguments getArgumentsByPriority(EAsmTool tool, int priority) { return Arrays.stream(values()).filter(v -> v.tool == tool && v.priority == priority). findFirst().orElse(NONE); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/action/FSAction.java000066400000000000000000000111741514323636100277330ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.action; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import java.util.function.Function; import static org.junit.jupiter.api.Assertions.fail; public class FSAction { public static Function getTmpPath = subDir -> Path.of(System.getProperty("user.home"), "tmp", subDir); // -d Specify where to place generated class files, otherwise // -w Specify where to place generated class files, without considering the classpath, otherwise private boolean ignorePackage = false; private Path destDir = null; private boolean deleteOnExit = false; /** * @param destDir * @return this class instance */ public FSAction setupDestDir(Path destDir) { if (destDir != null) { if (this.destDir == null) { this.destDir = createDestDir(destDir); } else if (!this.destDir.equals(destDir)) { if (!deleteOnExit) { delDestDir(); this.destDir = createDestDir(destDir); } else { this.destDir = createDestDir(destDir); this.destDir.toFile().deleteOnExit(); } } } else { // Deletes the previously set destDir and deactivates it. if (this.destDir != null && !deleteOnExit) { delDestDir(); } this.destDir = null; } return this; } public FSAction setupDestDir() { this.destDir = createDestDir(); return this; } public Path createDestDir() { if (this.destDir == null) { try { this.destDir = Files.createTempDirectory("asmtools-tests").toAbsolutePath(); this.destDir.toFile().deleteOnExit(); deleteOnExit = true; } catch (IOException e) { fail("Unable to create temporary directory"); } } return this.destDir; } private Path createDestDir(Path destDir) { if (!Files.exists(destDir)) { try { Files.createDirectories(destDir); } catch (IOException e) { fail("Unable to create destination directory %s".formatted(destDir.toString())); } } return destDir; } private FSAction delDestDir() { if (this.destDir != null && Files.exists(this.destDir)) { // Cleanup: Delete temporary directory and its contents try { Files.walk(this.destDir) .map(Path::toFile) .forEach(file -> { System.out.println("Deleting: " + file); file.delete(); }); } catch (IOException e) { throw new RuntimeException("Can't clean up the dest dir: %s".formatted(destDir)); } } return this; } public FSAction setDeleteOnExit(boolean deleteOnExit) { this.deleteOnExit = deleteOnExit; return this; } public Path getDestDir() { return destDir; } public FSAction setIgnorePackage(boolean value) { this.ignorePackage = value; return this; } public List getDestDirParams() { return (this.destDir == null) ? List.of() : List.of( (this.ignorePackage ? "-w" : "-d"), this.destDir.toString()); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/action/Jasm.java000066400000000000000000000036241514323636100271600ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.action; import org.openjdk.asmtools.jasm.Main; import org.openjdk.asmtools.lib.log.LogAndBinResults; import java.nio.file.Path; import static org.openjdk.asmtools.lib.action.EAsmTool.JASM; public final class Jasm extends CompileActor { public Jasm() { super(JASM); inputsCompiler = (encodedFiles, encodeLog, inputs) -> new Main(encodedFiles, encodeLog, inputs); filesCompiler = (encodedFiles, encodeLog, args) -> new Main(encodedFiles, encodeLog, args); } public Jasm(Path destDir) { super(JASM, destDir); inputsCompiler = (encodedFiles, encodeLog, inputs) -> new Main(encodedFiles, encodeLog, inputs); filesCompiler = (encodedFiles, encodeLog, args) -> new Main(encodedFiles, encodeLog, args); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/action/Jcoder.java000066400000000000000000000036441514323636100274760ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.action; import org.openjdk.asmtools.jcoder.Main; import org.openjdk.asmtools.lib.log.LogAndBinResults; import java.nio.file.Path; import static org.openjdk.asmtools.lib.action.EAsmTool.JCODER; public final class Jcoder extends CompileActor { public Jcoder() { super(JCODER); inputsCompiler = (encodedFiles, encodeLog, inputs) -> new Main(encodedFiles, encodeLog, inputs); filesCompiler = (encodedFiles, encodeLog, args) -> new Main(encodedFiles, encodeLog, args); } public Jcoder(Path destDir) { super(JCODER, destDir); inputsCompiler = (encodedFiles, encodeLog, inputs) -> new Main(encodedFiles, encodeLog, inputs); filesCompiler = (encodedFiles, encodeLog, args) -> new Main(encodedFiles, encodeLog, args); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/action/Jdec.java000066400000000000000000000040761514323636100271350ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.action; import org.openjdk.asmtools.jdec.Main; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.nio.file.Path; import static org.openjdk.asmtools.lib.action.EAsmTool.JDEC; public final class Jdec extends DecodeActor { public Jdec() { super(JDEC); inputsDecoder = (encodedFiles, encodeLog, inputs) -> new Main(encodedFiles, encodeLog, inputs); filesDecoder = (encodedFiles, encodeLog, args) -> new Main(encodedFiles, encodeLog, args); } public Jdec(Path destDir) { super(JDEC, destDir); inputsDecoder = (encodedFiles, encodeLog, inputs) -> new Main(encodedFiles, encodeLog, inputs); filesDecoder = (encodedFiles, encodeLog, args) -> new Main(encodedFiles, encodeLog, args); } @Override public Jdec setArgs(EToolArguments args) { super.setArgs(args); return this; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/action/Jdis.java000066400000000000000000000040601514323636100271520ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.action; import org.openjdk.asmtools.jdis.Main; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.nio.file.Path; import static org.openjdk.asmtools.lib.action.EAsmTool.JDIS; public final class Jdis extends DecodeActor { public Jdis() { super(JDIS); inputsDecoder = (encodedFiles, encodeLog, inputs) -> new Main(encodedFiles, encodeLog, inputs); filesDecoder = (encodedFiles, encodeLog, args) -> new Main(encodedFiles, encodeLog, args); } public Jdis(Path destDir) { super(JDIS, destDir); inputsDecoder = (encodedFiles, encodeLog, inputs) -> new Main(encodedFiles, encodeLog, inputs); filesDecoder = (encodedFiles, encodeLog, args) -> new Main(encodedFiles, encodeLog, args); } public Jdis setArgs(EToolArguments args) { super.setArgs(args); return this; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/attributes/000077500000000000000000000000001514323636100263275ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/attributes/Attribute.java000066400000000000000000000115041514323636100311360ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.attributes; import org.openjdk.asmtools.common.inputs.ByteInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.lib.action.Jasm; import java.io.IOException; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; import java.util.Arrays; import java.util.stream.Collectors; import static org.junit.jupiter.api.Assertions.fail; public class Attribute { static MethodHandles.Lookup lookup = MethodHandles.lookup(); Jasm jasm = null; private final Attribute.Kind kind; private final int expectedRc; private String[] classParams = new String[0]; private String attributeName; private String className; private String resourceName; private String outputFileName; public Attribute(Attribute.Kind kind, String className, int expectedRc) { this.kind = kind; this.className = className; this.resourceName = "/".concat(className.replace('.', '/')).concat(".class"); this.expectedRc = expectedRc; this.attributeName = this.getClass().getSimpleName(); int ind = attributeName.lastIndexOf("Attribute"); if (ind != -1) { attributeName = attributeName.substring(0, ind); } } public String getSimpleClassName() { int ind = className.lastIndexOf("."); return (ind != -1) ? className.substring(ind + 1) : className; } public String getClassName() { return className; } public int getExpectedRc() { return expectedRc; } public ToolInput getContent() { byte[] bytes = null; try { bytes = getClass().getResourceAsStream(resourceName).readAllBytes(); } catch (IOException e) { fail("Can't read the class %s\ndue to %s".formatted(className, e.toString())); } return new ByteInput(bytes); } public int run() { int returnCode = -1; try { Class clazz = Class.forName(className); MethodHandle methodHandle; if (kind == Attribute.Kind.CLASS_MAIN || kind == Attribute.Kind.CLASS_RUN) { methodHandle = Attribute.lookup.findStatic(clazz, kind.methodName, kind.methodType); returnCode = (Integer) methodHandle.invoke(this.classParams); } else { methodHandle = Attribute.lookup.findVirtual(clazz, kind.methodName, kind.methodType); // Create an instance of the class Object instance = clazz.getDeclaredConstructor().newInstance(); // Invoke the method (non-static, so pass the instance) returnCode = (Integer) methodHandle.invoke(instance, this.classParams); } } catch (Throwable e) { fail("Can't run %s::%s\ndue to %s".formatted(className, kind.toString(), e.toString())); } return returnCode; } public enum Kind { CLASS_MAIN("main", MethodType.methodType(int.class, String[].class)), CLASS_RUN("run", MethodType.methodType(int.class, String[].class)), INSTANCE_RUN("run", MethodType.methodType(int.class, String[].class)); final String methodName; final MethodType methodType; Kind(String methodName, MethodType methodType) { this.methodName = methodName; this.methodType = methodType; } @Override public String toString() { return "%s %s(%s)".formatted(methodType.returnType().getCanonicalName(), methodName, Arrays.stream(methodType.parameterArray()). map(clazz -> clazz.getCanonicalName()).collect(Collectors.joining(", "))); } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/ext/000077500000000000000000000000001514323636100247415ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/ext/CaptureSystemOutput.java000066400000000000000000000150241514323636100316370ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.ext; import org.hamcrest.Matcher; import org.junit.jupiter.api.extension.ExtendWith; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; import java.util.*; import java.util.function.Function; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @Target({TYPE, METHOD}) @Retention(RUNTIME) @Documented @ExtendWith(CaptureSystemOutputExtension.class) public @interface CaptureSystemOutput { Kind value() default Kind.OUTPUT; boolean mute() default false; enum Kind {OUTPUT, ERROR, BOTH} class OutputCapture { List> strMatchers = new ArrayList<>(); List>> listMatchers = new ArrayList<>(); Optional> transformer = Optional.empty(); Optional>> listTransformer = Optional.empty(); private CaptureOutputStream captureOut; private CaptureOutputStream captureErr; private OutputStream log; private OutputStream err; CaptureSystemOutput.OutputCapture capture(Kind kind, boolean muted) { if (kind == Kind.OUTPUT || kind == Kind.BOTH) { log = new ByteArrayOutputStream(); this.captureOut = new CaptureOutputStream(System.out, log, muted); System.setOut(new PrintStream(this.captureOut)); } if (kind == Kind.ERROR || kind == Kind.BOTH) { err = new ByteArrayOutputStream(); this.captureErr = new CaptureOutputStream(System.err, err, muted); System.setErr(new PrintStream(this.captureErr)); } return this; } public CaptureSystemOutput.OutputCapture release() { flush(); if (this.captureOut != null) System.setOut(this.captureOut.getOriginalStream()); if (this.captureErr != null) System.setErr(this.captureErr.getOriginalStream()); strMatchers = new ArrayList<>(); try { if (log != null) log.close(); if (err != null) err.close(); } catch (IOException ex) { /* no-op */ } return this; } CaptureSystemOutput.OutputCapture flush() { try { if (this.captureOut != null) this.captureOut.flush(); } catch (IOException ex) { /* no-op */ } try { if (this.captureErr != null) this.captureErr.flush(); } catch (IOException ex) { /* no-op */ } return this; } public OutputCapture expect(Matcher... matchers) { for (Matcher m : matchers) { this.strMatchers.add(m); } return this; } public void expectForList(Matcher> matcher) { this.listMatchers.add(matcher); } public OutputCapture useStringTransformer(Function transformer) { this.transformer = Optional.of(transformer); return this; } public OutputCapture useListTransformer(Function> transformer) { this.listTransformer = Optional.of(transformer); return this; } public String getLogAsString(Kind kind) { return this.transformer.orElse(s -> s).apply(getCapture(kind).toString()); } public List getLogAsList(Kind kind) { return this.listTransformer. orElse(s -> Arrays.stream(s.split(System.lineSeparator())).toList()). apply(getCapture(kind).toString()); } public String[] getLogAsArray(Kind kind) { return getLogAsList(kind).toArray(String[]::new); } private String getCapture(Kind kind) { return switch (kind) { case OUTPUT -> (log != null) ? log.toString() : ""; case ERROR -> (err != null) ? err.toString() : ""; case BOTH -> ((log != null) ? log.toString() : "").concat((err != null) ? err.toString() : ""); }; } private static class CaptureOutputStream extends OutputStream { private final PrintStream originalStream; private final OutputStream log; private final boolean muted; CaptureOutputStream(PrintStream originalStream, OutputStream log, boolean muted) { this.originalStream = originalStream; this.log = log; this.muted = muted; } PrintStream getOriginalStream() { return this.originalStream; } @Override public void write(int b) throws IOException { if (!muted) originalStream.write(b); log.write(b); } @Override public void flush() throws IOException { this.originalStream.flush(); } @Override public void close() { this.originalStream.flush(); } } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/ext/CaptureSystemOutputExtension.java000066400000000000000000000073131514323636100335360ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.ext; import org.junit.jupiter.api.extension.*; import org.junit.jupiter.api.extension.ExtensionContext.Namespace; import org.junit.jupiter.api.extension.ExtensionContext.Store; import org.openjdk.asmtools.lib.ext.CaptureSystemOutput.OutputCapture; import java.lang.reflect.Method; import java.util.List; import java.util.Optional; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.allOf; class CaptureSystemOutputExtension implements BeforeEachCallback, AfterEachCallback, ParameterResolver { private CaptureSystemOutput.Kind kind; @Override public void beforeEach(ExtensionContext context) throws Exception { Optional method = context.getTestMethod(); if (method.isPresent()) { CaptureSystemOutput ann = method.get().getAnnotation(CaptureSystemOutput.class); if (ann != null) { kind = ann.value(); getOutputCapture(context).capture(ann.value(), ann.mute()); } } } @Override public void afterEach(ExtensionContext context) throws Exception { OutputCapture outputCapture = getOutputCapture(context); try { CaptureSystemOutput.Kind k = this.kind == null ? CaptureSystemOutput.Kind.BOTH : this.kind; // expect is used if (!outputCapture.strMatchers.isEmpty()) { String string = outputCapture.getLogAsString(kind); assertThat(string, allOf(outputCapture.strMatchers)); } // array is used if (!outputCapture.listMatchers.isEmpty()) { List list = outputCapture.getLogAsList(kind); assertThat(list, allOf(outputCapture.listMatchers)); } } finally { outputCapture.release(); } } @Override public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { boolean isTestMethodLevel = extensionContext.getTestMethod().isPresent(); boolean isOutputCapture = parameterContext.getParameter().getType() == OutputCapture.class; return isTestMethodLevel && isOutputCapture; } @Override public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { return getOutputCapture(extensionContext); } private OutputCapture getOutputCapture(ExtensionContext context) { return getStore(context).getOrComputeIfAbsent(OutputCapture.class); } private Store getStore(ExtensionContext context) { return context.getStore(Namespace.create(getClass(), context.getRequiredTestMethod())); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/helper/000077500000000000000000000000001514323636100254205ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/helper/BruteForceHelper.java000066400000000000000000000211551514323636100314670ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.helper; import org.junit.jupiter.api.Assertions; import java.io.File; import java.io.IOException; import java.net.URL; import java.net.URLClassLoader; import java.nio.file.FileVisitResult; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.SimpleFileVisitor; import java.nio.file.attribute.BasicFileAttributes; import java.util.*; import java.util.stream.Collectors; public class BruteForceHelper { public static HashSet excludeSet = new HashSet<>() {{ add("SourceDebugExtensionNegative01.class"); add("SourceDebugExtensionNegative02.class"); add("SourceDebugExtensionNegative03.class"); add("LoadableDescriptorsAttributeTest$X.class"); add("InvalidSourceDebugExtension.class"); add("CondyNestedResolution.class"); }}; public static final String FRESHLY_BUILT_ASMTOOLS = "target/classes"; private final ClassProvider classProvider; private final Map failedJdis = new HashMap<>(); private final Map passedJdis = new HashMap<>(); private final Map failedJasm = new HashMap<>(); private final Map passedJasm = new HashMap<>(); private final Map failedLoad = new HashMap<>(); private final Map passedLoad = new HashMap<>(); private final File compileDir; public BruteForceHelper() throws IOException { this(FRESHLY_BUILT_ASMTOOLS); } public BruteForceHelper(String dir) throws IOException { this(new SearchingClassProvider(new File(dir))); } public BruteForceHelper(ClassProvider cp) throws IOException { compileDir = Files.createTempDirectory("JdisJasmWorks").toFile(); compileDir.deleteOnExit(); classProvider = cp; } public void work(AsmToolsExecutable diasm, AsmToolsExecutable asm) throws IOException { List classes = classProvider.getClasses(); tryAll(classes, failedJdis, passedJdis, diasm); diasm.ensure(classes, failedJdis); tryAll(classes, failedJasm, passedJasm, asm); asm.ensure(classes, failedJasm); AsmToolsExecutable loadClass = new AsmToolsExecutable() { @Override public int run(ThreeStringWriters outs, File clazz) throws IOException { try { URL url = compileDir.toURI().toURL(); URL[] urls = new URL[]{url}; URLClassLoader cl = new URLClassLoader(urls); String origFile = clazz.toString(); String fqn = origFile.substring(origFile.indexOf("org/openjdk")). replaceFirst("\\.class$", ""). replaceAll("/", "."); cl.loadClass(fqn); return 0; } catch (Exception e) { e.printStackTrace(outs.getToolOutput()); return 1; } } @Override public void ensure(List all, Map failures) { Assertions.assertEquals(0, failedLoad.size(), "from " + classes.size() + " failed to produce valid bytecode " + failedLoad.size() + ": " + keySetToString(failedLoad, getClassesRoot())); } }; tryAll(classes, failedLoad, passedLoad, loadClass); } public static String keySetToString(Map failedJdis, File classesRoot) { return failedJdis.keySet().stream().map(f -> f.getAbsolutePath().replaceFirst(classesRoot.getAbsolutePath(), "")).collect(Collectors.joining(", ")); } private void tryAll(List classes, Map failed, Map passed, AsmToolsExecutable ex) throws IOException { for (File clazz : classes) { ThreeStringWriters outs = new ThreeStringWriters(); int i = ex.run(outs, clazz); outs.flush(); if (i != 0) { Object o = failed.put(clazz, outs); Assertions.assertNull(o, " duplicated class - " + o); System.out.printf("File %s failed\n", clazz); continue; } Object o = passed.put(clazz, outs); Assertions.assertNull(o, " duplicated class - " + o); } for (Map.Entry failure : failed.entrySet().stream().sorted(new Comparator>() { @Override public int compare(Map.Entry t0, Map.Entry t1) { return t0.getKey().compareTo(t1.getKey()); } }).collect(Collectors.toList())) { System.err.println(failure.getKey()); System.err.println(failure.getValue().getErrorBos()); System.err.println(failure.getValue().getLoggerBos()); System.err.println(failure.getValue().getToolBos()); } } private static List findClasses(File classesRoot) throws IOException { List classes = new ArrayList<>(); Files.walkFileTree(classesRoot.toPath(), new SimpleFileVisitor<>() { @Override public FileVisitResult visitFile(Path path, BasicFileAttributes basicFileAttributes) throws IOException { if (path.toString().endsWith(".class") && !excludeSet.contains(path.toFile().getName())) { classes.add(path.toFile().getAbsoluteFile()); } return FileVisitResult.CONTINUE; } }); Assertions.assertNotEquals(0, classes.size(), "There must be more then 0 class compiled in " + classesRoot + " before running this tests!"); Collections.sort(classes); return classes; } public String getDecompiledClass(File clazz) { return passedJdis.get(clazz).getToolBos(); } public File getCompileDir() { return compileDir; } public File getClassesRoot() { return classProvider.getClassesRoot(); } public static void createMetadata(ThreeStringWriters outs, File clazz, File savedAsm, File compileDir, File classesRoot) { outs.getToolOutput().println("Orig: " + clazz.getAbsolutePath()); outs.getToolOutput().println("To: " + compileDir.getAbsolutePath()); outs.getToolOutput().println("Base: " + classesRoot.getAbsolutePath()); outs.getToolOutput().println("From: " + savedAsm.getAbsolutePath()); } public static File saveDecompiledCode(String body, String tmpPRefix) throws IOException { File savedFresh = File.createTempFile(tmpPRefix, ".java"); Files.writeString(savedFresh.toPath(), body); savedFresh.deleteOnExit(); return savedFresh; } public static class SearchingClassProvider implements ClassProvider { private final File root; public SearchingClassProvider(File root) { this.root = root.getAbsoluteFile(); } @Override public File getClassesRoot() { return root; } @Override public List getClasses() throws IOException { return findClasses(root); } } public interface ClassProvider { File getClassesRoot(); List getClasses() throws IOException; } public interface AsmToolsExecutable { int run(ThreeStringWriters out, File clazz) throws IOException; void ensure(List all, Map failures); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/helper/ClassPathClassWork.java000066400000000000000000000026171514323636100320040ustar00rootroot00000000000000package org.openjdk.asmtools.lib.helper; import org.junit.jupiter.api.Assertions; import java.io.File; import java.nio.file.Paths; import java.util.Objects; import java.util.regex.Pattern; public class ClassPathClassWork { protected static Class clazz; protected static String classFile; protected static Pattern className; protected static Pattern packageName; public static void initMainClassData(Class testsClass) { initGenericClassData(testsClass,"classes"); } public static void initTestClassData(Class testsClass) { initGenericClassData(testsClass,"test-classes"); } private static void initGenericClassData(Class testsClass, String subdir) { clazz = testsClass; classFile = "./target/"+subdir+"/" + clazz.getName().replace('.', '/') + ".class"; Assertions.assertTrue(new File(classFile).exists(), "\"%s\" not found".formatted(Paths.get(classFile).toFile().getAbsolutePath())); className = Pattern.compile("public .*class .*" + clazz.getSimpleName() + " extends .*"); packageName = Pattern.compile("package "+clazz.getPackageName() + ";"); } protected String getFile(String fileResource) { File resourceDir = new File(Objects.requireNonNull(this.getClass().getResource(fileResource)).getFile()).getParentFile(); return resourceDir + File.separator + new File(fileResource).getName(); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/helper/ThreeStringWriters.java000066400000000000000000000032031514323636100320770ustar00rootroot00000000000000package org.openjdk.asmtools.lib.helper; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.common.outputs.PrintWriterOutput; import org.openjdk.asmtools.common.outputs.log.SingleDualOutputStreamOutput; import org.openjdk.asmtools.common.outputs.ToolOutput; import java.io.ByteArrayOutputStream; import java.io.PrintWriter; public class ThreeStringWriters { private final ByteArrayOutputStream toolBos = new ByteArrayOutputStream(); private final ByteArrayOutputStream errorBos = new ByteArrayOutputStream(); private final ByteArrayOutputStream loggerBos = new ByteArrayOutputStream(); private final PrintWriter toolOutput = new PrintWriter(toolBos); private final PrintWriter errorOutput = new PrintWriter(errorBos); private final PrintWriter loggerOutput = new PrintWriter(loggerBos); public void flush(){ toolOutput.flush(); errorOutput.flush(); loggerOutput.flush(); } public ToolOutput getToolOutputWrapper() { return new PrintWriterOutput(toolOutput); } public PrintWriter getToolOutput() { return toolOutput; } public PrintWriter getErrorOutput() { return errorOutput; } public PrintWriter getLoggerOutput() { return loggerOutput; } public String getLoggerBos() { return loggerBos.toString(); } public String getErrorBos() { return errorBos.toString(); } public String getToolBos() { return toolBos.toString(); } public DualStreamToolOutput getLoggers() { return new SingleDualOutputStreamOutput(getErrorOutput()); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/log/000077500000000000000000000000001514323636100247225ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/log/LogAndBinResults.java000066400000000000000000000031601514323636100307440ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.log; import org.openjdk.asmtools.common.inputs.ByteInput; import org.openjdk.asmtools.common.outputs.ByteOutput; import org.openjdk.asmtools.common.outputs.log.StringLog; public class LogAndBinResults extends LogAndReturn { public final ByteOutput output; public ByteInput[] getAsByteInput() { return output.getOutputs().stream().map(out->new ByteInput(out.getBody())).toArray(ByteInput[]::new); } public LogAndBinResults(ByteOutput output, StringLog log, int result) { super(log, result); this.output = output; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/log/LogAndReturn.java000066400000000000000000000030711514323636100301320ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.log; import org.openjdk.asmtools.lib.utility.StringUtils; import org.openjdk.asmtools.common.outputs.log.StringLog; import java.util.List; public class LogAndReturn { public final StringLog log; public final int result; public LogAndReturn(StringLog log, int result) { this.log = log; this.result = result; } public List getLogStringsByPrefix(String prefix) { return StringUtils.substrBetween(log.toString(), prefix, System.lineSeparator()); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/log/LogAndTextResults.java000066400000000000000000000032761514323636100311700ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.log; import org.openjdk.asmtools.common.outputs.TextOutput; import org.openjdk.asmtools.common.outputs.log.StringLog; import java.util.function.Function; import java.util.stream.Collectors; public class LogAndTextResults extends LogAndReturn { public final TextOutput output; public LogAndTextResults(TextOutput output, StringLog log, int result) { super(log, result); this.output = output; } public String getResultAsString(Function stringTransform) { return stringTransform.apply(this.output.getOutputs().stream().map(out->out.getBody()).collect(Collectors.joining())); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/package-info.java000066400000000000000000000022511514323636100273300ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * Helper frameworks, utilities, base classes designed to support JUnit testing of ASM tools. */ package org.openjdk.asmtools.lib; jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/script/000077500000000000000000000000001514323636100254455ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/script/TestScript.java000066400000000000000000000111271514323636100304160ustar00rootroot00000000000000package org.openjdk.asmtools.lib.script; import org.junit.jupiter.api.Assertions; import org.openjdk.asmtools.common.inputs.StringInput; import org.openjdk.asmtools.lib.action.*; import org.openjdk.asmtools.lib.log.LogAndBinResults; import org.openjdk.asmtools.lib.log.LogAndTextResults; import java.io.File; import java.io.IOException; import java.net.URL; import java.util.List; import java.util.function.Consumer; import java.util.function.Function; import static org.junit.jupiter.api.Assertions.fail; import static org.openjdk.asmtools.lib.utility.StringUtils.funcNormalizeText; public class TestScript { protected Jasm jasm = new Jasm(); private Jcoder jcoder = new Jcoder(); protected File resourceDir; protected boolean warningsEnabled = false; public void init(String resource) throws IOException { if (resource == null) { throw new IOException("Resource not declared"); } URL url = this.getClass().getResource(resource); if (url == null) { fail("Resource \"%s\" not found.".formatted(resource)); } this.resourceDir = new File(url.getFile()).getParentFile(); if (!this.resourceDir.exists() || !this.resourceDir.isDirectory()) { fail("Resource directory does not exist or is not a directory: " + this.resourceDir); } else if (DebugHelper.isDebug()) { fail("Resource directory initialized: " + this.resourceDir.getAbsolutePath()); } } public void jasmTest(String resourceName, EToolArguments args, List> tests) { // jasm to class in memory // jasm.setDebug(true); LogAndBinResults binResult = jasm.compile(List.of(resourceDir + File.separator + resourceName)); // class produced correctly if( !warningsEnabled ) Assertions.assertTrue(binResult.log.toString().isEmpty()); Assertions.assertEquals(0, binResult.result); // class to jasm LogAndTextResults textResult = new Jdis().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); String jasmText = textResult.getResultAsString(Function.identity()); String normJasmText = funcNormalizeText.apply(jasmText); for (Consumer testConsumer : tests) { testConsumer.accept(normJasmText); } // jasm to class binResult = jasm.compile(new StringInput(jasmText)); // class produced correctly Assertions.assertEquals(0, binResult.result); if( !warningsEnabled ) Assertions.assertTrue(binResult.log.toString().isEmpty()); // class to jasm textResult = new Jdis().setArgs(args).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); jasmText = textResult.getResultAsString(Function.identity()); normJasmText = funcNormalizeText.apply(jasmText); for (Consumer testConsumer : tests) { testConsumer.accept(normJasmText); } // class to jcod textResult = new Jdec().setArgs(EToolArguments.JDEC_G).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); // jcod to class binResult = jcoder.compile(new StringInput(textResult.getResultAsString(Function.identity()))); Assertions.assertEquals(0, binResult.result); } public void jcoderTest(String resourceName, EToolArguments args, List> tests) { // jcod to class in memory LogAndBinResults binResult = jcoder.compile(List.of(resourceDir + File.separator + resourceName)); // class produced correctly Assertions.assertEquals(0, binResult.result); if( !warningsEnabled ) Assertions.assertTrue(binResult.log.toString().isEmpty()); // class to jcod LogAndTextResults textResult = new Jdec().setArgs(args).decode(binResult.getAsByteInput()); String jcoderText = textResult.getResultAsString(funcNormalizeText); Assertions.assertEquals(0, textResult.result); for (Consumer testConsumer : tests) { testConsumer.accept(jcoderText); } // class to jasm twice textResult = new Jdis().setArgs(EToolArguments.JDIS_G_T_LNT_LVT).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); textResult = new Jdis().setArgs(EToolArguments.JDIS_GG_NC_LNT_LVT).decode(binResult.getAsByteInput()); Assertions.assertEquals(0, textResult.result); } protected void enableToolsWarnings() { this.warningsEnabled = true; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/000077500000000000000000000000001514323636100261545ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/ITestRunner.java000066400000000000000000000021711514323636100312420ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform; public interface ITestRunner { void run(); } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/ResultChecker.java000066400000000000000000000067761514323636100316020ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform; import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.List; import java.util.Optional; import java.util.function.Function; import java.util.stream.Collectors; public class ResultChecker { public static String[] OUT_LINE_PREFIXES_TO_IGNORE = new String[]{ ":TransformerLoader: " }; // Filter to ignore Logged output lines static Function filterOut = s -> Arrays.stream(OUT_LINE_PREFIXES_TO_IGNORE).anyMatch(p -> s.startsWith(p)); Class trClass; public Optional load() { try { Object obj = trClass.getDeclaredConstructor().newInstance(); return Optional.of(obj); } catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { throw new RuntimeException(e); } } public void run() { try { Object obj = trClass.getDeclaredConstructor().newInstance(); //default void run() obj.getClass().getMethod("run").invoke(obj); } catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { throw new RuntimeException(e); } } public ResultChecker setTestRunClass(Class trClass) { this.trClass = trClass; return this; } /** * Filters out all trace/debug lines from str using Function filterOut * * @param str line that will be split into list by System.lineSeparator() * @return list of strings */ protected List getFilteredList(String str) { return Arrays.stream(str.split(System.lineSeparator())).filter(s -> !filterOut.apply(s)).toList(); } /** * Filters out all trace/debug lines from str using Function filterOut * * @param str line that will be split into list by System.lineSeparator() * @return string without lines filtered out */ protected String getFilteredString(String str) { return Arrays.stream(str.split(System.lineSeparator())).filter(s -> !filterOut.apply(s)). collect(Collectors.joining(System.lineSeparator())); } protected String getPurifiedString(String str) { for (String s : OUT_LINE_PREFIXES_TO_IGNORE) { str = str.replaceAll(s, ""); } return str; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/TransformLoader.java000066400000000000000000000434471514323636100321350ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform; import org.junit.jupiter.api.Assertions; import org.openjdk.asmtools.common.inputs.ByteInput; import org.openjdk.asmtools.common.inputs.ToolInput; import org.openjdk.asmtools.common.outputs.ByteOutput; import org.openjdk.asmtools.common.outputs.log.DualStreamToolOutput; import org.openjdk.asmtools.common.outputs.log.StderrLog; import org.openjdk.asmtools.lib.action.EAsmTool; import org.openjdk.asmtools.lib.utility.FileUtils; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; import java.util.function.Function; import static java.nio.file.StandardOpenOption.*; import static org.openjdk.asmtools.lib.action.EAsmTool.*; import static org.openjdk.asmtools.lib.utility.FileUtils.findFile; public class TransformLoader extends ClassLoader { public enum TransformRules { CLASS_LOAD, JASM_TO_CLASS_LOAD, JCOD_TO_CLASS_LOAD, // 2 rules are tightened by the restriction - // a class, jasm and jcov files are placed in the same directory. CLASS_TO_JASM_TO_CLASS_LOAD, CLASS_TO_JCOD_TO_CLASS_LOAD } private static boolean debug; static { registerAsParallelCapable(); // might affect a test result - Must be false once a development is done String str = System.getenv("DEBUG"); str = str == null ? "false" : str; debug = List.of("true", "on", "yes").stream().anyMatch(str::equalsIgnoreCase); } public static void debugOn() { debug = true; } public static void debugOff() { debug = false; } public TransformLoader setToolsOptions(EAsmTool tool, String... options) { if (options != null && options.length > 0) { toolsOptions.putIfAbsent(tool, options); } return this; } public TransformLoader clearOptions() { toolsOptions = new HashMap<>(); return this; } Map toolsOptions = new HashMap<>(); static String MSG_PREFIX = ResultChecker.OUT_LINE_PREFIXES_TO_IGNORE[0]; private TransformRules transformRule = TransformRules.CLASS_LOAD; // List of class names that should be loaded in a general way without transformation private final List excludeList = new ArrayList<>(); // Directory for dumping "problem" files created while transforming private String dumpDir; /** * Specifies whether to delete an interim jcod/jasm file for rules CLASS_TO_JCOD_TO_CLASS_LOAD, * CLASS_TO_JASM_TO_CLASS_LOAD */ boolean deleteInterimFile = false; // Should a class be loaded by a custom-ruled loader ? // Accept a class name and returns true if the class should be dedicated loaded. private Function transformFilter = name -> name.contains("org.openjdk.asmtools.transform.case"); public TransformLoader setTransformFilter(Function transformFilter) { this.transformFilter = transformFilter; return this; } // Fill up the exclude list of class names that should be loaded in a general way without transformation public TransformLoader addToExcludeList(String... fileNames) { Collections.addAll(excludeList, fileNames); return this; } public TransformLoader clearExcludeList() { excludeList.clear(); return this; } public TransformLoader setTransformRule(TransformRules transformRule) { this.transformRule = transformRule; return this; } public TransformLoader setDeleteInterimFile(boolean deleteInterimFile) { this.deleteInterimFile = deleteInterimFile; return this; } // Directory where class files for loading classes are placed private String classDir; // Parent class loader for delegation class loading protected ClassLoader parentCL; public TransformLoader() { super(); parentCL = getSystemClassLoader(); setClassDir(""); } public TransformLoader(ClassLoader cl) { super(cl); parentCL = cl; setClassDir(""); } @Override public Class loadClass(String name, boolean resolve) throws ClassNotFoundException { Class loadedCode; println("Trying to load class: " + name + " using rule " + transformRule); try { // Simple criteria to define what classes should be loaded according to specified transform rule if (transformFilter.apply(name)) { synchronized (getClassLoadingLock(name)) { loadedCode = findLoadedClass(name); if (loadedCode == null) { String fileName = name.replace('.', File.separatorChar); if (excludeList.contains(name)) { loadedCode = loadClassFromClassFile(name, checkFile(fileName + ".class")); } else { loadedCode = switch (transformRule) { case JCOD_TO_CLASS_LOAD -> loadClassFromResourceJcodFile(name); case JASM_TO_CLASS_LOAD -> loadClassFromResourceJasmFile(name); case CLASS_TO_JASM_TO_CLASS_LOAD -> loadClassFromGeneratedJasmFile(name, checkFile(fileName + ".class")); case CLASS_TO_JCOD_TO_CLASS_LOAD -> loadClassFromGeneratedJcodFile(name, checkFile(fileName + ".class")); case CLASS_LOAD -> loadClassFromClassFile(name, checkFile(fileName + ".class")); }; } } else { println("Object of the Class " + name + " found"); } if (resolve) { resolveClass(loadedCode); } } } else { println("[Delegate " + name + " to default parent.]"); loadedCode = parentCL.loadClass(name); } } catch (Exception d) { d.printStackTrace(); throw new ClassNotFoundException(); } if (loadedCode != null) { return loadedCode; } else { throw new ClassNotFoundException(); } } /** * Loads a class from a byte buffer and optionally instantiates it. * * @param name The name of the class. * @param buffer The byte buffer containing the class definition. * @param instantiate Whether to instantiate the class. * @param The type of the class. * @return An Optional containing the class or an instance of the class. */ public Optional loadClassFromBuffer(String name, byte[] buffer, boolean instantiate) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException { if (name == null || buffer == null) { throw new IllegalArgumentException("Name and buffer must not be null"); } try { long byteCount = buffer.length; Class clazz = defineClass(name, buffer); println("[Loaded {%s} from buffer ({%d} bytes)]".formatted(name, byteCount)); if (instantiate) { T instance = (T) clazz.getDeclaredConstructor().newInstance(); return Optional.of(instance); } else { return Optional.of((T) clazz); } } catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) { throw e; } } public TransformLoader setClassDir(String classDir) { this.classDir = Paths.get(classDir).toAbsolutePath().toString(); return this; } public TransformLoader setDumpDir(String dumpDir) { if (TransformLoader.debug) { this.dumpDir = dumpDir; } return this; } /** * Transition: class file -> jcod file -> class file as byte array in memory -> load */ protected Class loadClassFromGeneratedJcodFile(String className, File classFile) throws ClassNotFoundException, IOException { File jcodFile = checkOrCreate(classFile, new File(classFile.toString().concat(JCODER.getFileExtension()))); byte[] jcodFileBuf = FileUtils.getBinaryFile(jcodFile); Class cl = loadJcodBytes(className, jcodFileBuf); if (deleteInterimFile && transformRule == TransformRules.CLASS_TO_JCOD_TO_CLASS_LOAD) { Files.delete(jcodFile.toPath()); } println("[Loaded " + className + " from file " + jcodFile + " (" + jcodFileBuf.length + " bytes)]"); return cl; } /** * Transition: Resources jcod file -> class file as byte array in memory -> load */ private Class loadClassFromResourceJcodFile(String className) throws IOException { String resourceName = String.format("/%s.class%s", className.replaceAll("\\.", "/"), JCODER.getFileExtension()); byte[] jcodFileBuf = FileUtils.getResourceFile(resourceName); Class cl = loadJcodBytes(className, jcodFileBuf); println("[Loaded " + className + " from resource " + resourceName + " (" + jcodFileBuf.length + " bytes)]"); return cl; } /** * Transition: class file -> jasm file -> class file as byte array in memory -> load */ protected Class loadClassFromGeneratedJasmFile(String className, File classFile) throws ClassNotFoundException, IOException { File jasmFile = checkOrCreate(classFile, new File(classFile.toString().concat(JASM.getFileExtension()))); byte[] jasmFileBuf = FileUtils.getBinaryFile(jasmFile); Class cl = loadJasmBytes(className, jasmFileBuf); if (deleteInterimFile && transformRule == TransformRules.CLASS_TO_JASM_TO_CLASS_LOAD) { Files.delete(jasmFile.toPath()); } println("[Loaded " + className + " from file " + jasmFile + " (" + jasmFileBuf.length + " bytes)]"); return cl; } /** * Transition: Resources jasm file -> class file as byte array in memory -> load */ private Class loadClassFromResourceJasmFile(String className) throws IOException { String resourceName = String.format("/%s.class%s", className.replaceAll("\\.", "/"), JASM.getFileExtension()); byte[] jasmFileBuf = FileUtils.getResourceFile(resourceName); Class cl = loadJasmBytes(className, jasmFileBuf); println("[Loaded " + className + " from resource " + resourceName + " (" + jasmFileBuf.length + " bytes)]"); return cl; } private Class loadJcodBytes(String className, byte[] jcodFileBuf) { ToolInput toolInput = new ByteInput(jcodFileBuf); ByteOutput output = new ByteOutput(); DualStreamToolOutput log = new StderrLog(); org.openjdk.asmtools.jcoder.Main jcod = toolsOptions.containsKey(JCODER) ? new org.openjdk.asmtools.jcoder.Main(output, log, toolInput, toolsOptions.get(JCODER)) : new org.openjdk.asmtools.jcoder.Main(output, log, toolInput); int i = jcod.compile(); Assertions.assertEquals(0, i); Assertions.assertEquals(1, output.getOutputs().size()); byte[] buffer = output.getOutputs().get(0).getBody(); Class c = defineClass(className, buffer); return c; } private Class loadJasmBytes(String className, byte[] jasmFileBuf) { ToolInput toolInput = new ByteInput(jasmFileBuf); ByteOutput output = new ByteOutput(); DualStreamToolOutput log = new StderrLog(); org.openjdk.asmtools.jasm.Main jasm = toolsOptions.containsKey(JASM) ? new org.openjdk.asmtools.jasm.Main(output, log, toolInput, toolsOptions.get(JASM)) : new org.openjdk.asmtools.jasm.Main(output, log, toolInput); int i = jasm.compile(); Assertions.assertEquals(0, i); Assertions.assertEquals(1, output.getOutputs().size()); byte[] buffer = output.getOutputs().get(0).getBody(); Class c = defineClass(className, buffer); return c; } private void createJcodFile(File classFile, File jcodFile) throws ClassNotFoundException, IOException { final ToolInput toolInput = new ByteInput(FileUtils.getBinaryFile(classFile)); ByteOutput output = new ByteOutput(); org.openjdk.asmtools.jdec.Main decoder = toolsOptions.containsKey(JDEC) ? new org.openjdk.asmtools.jdec.Main(output, new StderrLog(), toolInput, toolsOptions.get(JDEC)) : new org.openjdk.asmtools.jdec.Main(output, new StderrLog(), toolInput); decoder.decode(); byte[] buffer = output.getOutputs().get(0).getBody(); Files.write(jcodFile.toPath(), buffer, WRITE, CREATE, TRUNCATE_EXISTING); } private void createJasmFile(File classFile, File jasmFile) throws ClassNotFoundException, IOException { final ToolInput toolInput = new ByteInput(FileUtils.getBinaryFile(classFile)); ByteOutput output = new ByteOutput(); org.openjdk.asmtools.jdis.Main compiler = toolsOptions.containsKey(JDIS) ? new org.openjdk.asmtools.jdis.Main(output, new StderrLog(), toolInput, toolsOptions.get(JDIS)) : new org.openjdk.asmtools.jdis.Main(output, new StderrLog(), toolInput); compiler.disasm(); byte[] buffer = output.getOutputs().get(0).getBody(); Files.write(jasmFile.toPath(), buffer, WRITE, CREATE, TRUNCATE_EXISTING); } protected Class loadClassFromClassFile(String name, File file) throws ClassNotFoundException { byte[] buffer = FileUtils.getBinaryFile(file); long byteCount = buffer.length; Class c = defineClass(name, buffer); println("[Loaded " + name + " from " + file + " (" + byteCount + " bytes)]"); return c; } private Class defineClass(String name, byte[] buffer) { Class c; long byteCount = buffer.length; try { c = defineClass(name, buffer, 0, (int) byteCount); } catch (ClassFormatError cfe) { if (TransformLoader.debug) printError("ClassFormatError: " + cfe.getMessage()); throw cfe; } catch (ClassCircularityError e) { printError("ClassCircularityError is caught!"); throw e; } catch (LinkageError e) { println("Linkage error during defining class \"" + name + "\": "); printError(e.getClass().getName() + ": " + e.getMessage()); // dump binaries if (TransformLoader.debug) { int idx = name.lastIndexOf('.'); Path dumpFile = Path.of(dumpDir, name.substring(idx == -1 ? 0 : idx + 1) + ".class.dump"); try { Files.write(dumpFile, buffer, CREATE, WRITE, TRUNCATE_EXISTING); } catch (IOException ex) { printError("Cannot write ato dump file \"" + dumpFile + "\": " + ex.getMessage()); } } throw e; } return c; } private File checkFile(String fileName) throws FileNotFoundException { File file = new File(classDir + File.separator + fileName); if (file.exists()) { return file; } Optional filePath = findFile(classDir, fileName, this::println); if (filePath.isEmpty()) { printError("Can't find file: " + file); throw new java.io.FileNotFoundException(); } return filePath.get().toFile(); } private File checkOrCreate(File classFile, File toolFile) throws ClassNotFoundException, IOException { if (!toolFile.exists() || deleteInterimFile) { if (toolFile.getName().endsWith(JCODER.getFileExtension())) createJcodFile(classFile, toolFile); else if (toolFile.getName().endsWith(JASM.getFileExtension())) createJasmFile(classFile, toolFile); else throw new RuntimeException("A tool is not defined to create the file " + toolFile); } return toolFile; } /** * Print error message with the prefix to filter out while analysing System error log */ private void printError(String s) { System.err.println((TransformLoader.debug ? MSG_PREFIX : "") + s); System.err.flush(); } /** * Print debug message with the prefix to filter out while analysing System output log */ private void println(String s) { if (TransformLoader.debug) { System.out.printf("%s %s: %s%n", MSG_PREFIX, Thread.currentThread().getName(), s); System.out.flush(); } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/pipeline/000077500000000000000000000000001514323636100277615ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/pipeline/AsmtoolsType.java000066400000000000000000000042651514323636100332760ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform.pipeline; public class AsmtoolsType { private final FileType type; private final boolean isFirstInput; private Pipeline.Status status; public AsmtoolsType(Pipeline.Status status, FileType type, boolean isFirstInput) { this.status = status; this.type = type; this.isFirstInput = isFirstInput; } public AsmtoolsType(Pipeline.Status status, FileType type) { this(status, type, false); } public boolean firstInput() { return isFirstInput; } public void setRecord(Pipeline.Status status) { this.status = status; } public Pipeline.Status record() { return status; } @Override public String toString() { return type + "{" + "status=" + status + ", isFirstInput=" + isFirstInput + '}'; } enum FileType { JCOD(".jcod"), JASM(".jasm"), JAVA(".java"), CLAZZ(".class"); private final String ext; FileType(String ext) { this.ext = ext; } public String extension() { return ext; } } } ClassToJasmConverter.java000066400000000000000000000106101514323636100346160ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/pipeline/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform.pipeline; import org.openjdk.asmtools.common.inputs.ByteInput; import org.openjdk.asmtools.common.outputs.ByteOutput; import org.openjdk.asmtools.common.outputs.log.StringLog; import org.openjdk.asmtools.jdis.Main; import org.openjdk.asmtools.lib.utility.FileUtils; import java.io.IOException; import java.nio.file.Path; import java.util.Objects; import java.util.function.Function; import static org.openjdk.asmtools.lib.transform.pipeline.AsmtoolsType.FileType.JASM; import static org.openjdk.asmtools.lib.transform.pipeline.Pipeline.*; public class ClassToJasmConverter extends Converter implements Function { private static final String DEFAULT_STAGE_NAME = "ClassToJasm"; private static final String JDIS_DETAILED_OUTPUT = "-g"; public ClassToJasmConverter(String stageName) { super(Objects.requireNonNullElse(stageName, DEFAULT_STAGE_NAME)); } public ClassToJasmConverter() { this(null); } @Override public Jasm apply(Clazz incoming) { logInfo("Generating: class -> jasm"); Objects.requireNonNull(incoming, "Incoming Clazz cannot be null"); logDebug(stageName(), incoming.firstInput() ? "Received first input: " + incoming : "Received from previous stage: " + incoming); if (!incoming.firstInput() && incoming.record().toolReturn() != SUCCESS) { return handleError("Previous stage failed", incoming, incoming.record().log(), incoming.record().toolReturn()); } if (incoming.record().file() == null) { return handleError("Incoming Clazz file is null", incoming, null, -1); } try { byte[] clazzBytes = FileUtils.readBytesFromFile(incoming.record().file()); ByteOutput output = new ByteOutput(); StringLog log = new StringLog(); Main compiler = new Main(output, log, new ByteInput(clazzBytes), JDIS_DETAILED_OUTPUT); int result = compiler.disasm(); if (result != SUCCESS) { return handleError(stageName() + " failed.", incoming, log, result); } if (output.getOutputs() == null || output.getOutputs().isEmpty() || output.getOutputs().get(0) == null) { return handleError("jdis ToolOutput not available", incoming, null, result); } logDebug(stageName(), "jdis succeeded."); Path classFilePath = FileUtils.writeBytesToFile("temp", JASM.extension(), output.getOutputs().get(0).getBody()); Jasm r = handleOutput(incoming, classFilePath, log, result, output); logDebug(stageName(), "Sending next stage: " + r); return r; } catch (IOException e) { throw new RuntimeException("Failed to convert JASM to CLASS", e); } } protected Jasm handleError(String errorMessage, Clazz type, StringLog log, int result) { logWarn(errorMessage); Pipeline.Status status = new Pipeline.Status(stageName(), type.record().file(), log, result, null); setRecord(status); return new Jasm(status); } protected Jasm handleOutput(Clazz type, Path classFilePath, StringLog log, int result, ByteOutput output) { Pipeline.Status status = new Pipeline.Status(stageName(), classFilePath, log, result, output); setRecord(status); return new Jasm(status); } } ClassToJcodConverter.java000066400000000000000000000103271514323636100346100ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/pipeline/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform.pipeline; import org.openjdk.asmtools.common.inputs.ByteInput; import org.openjdk.asmtools.common.outputs.ByteOutput; import org.openjdk.asmtools.common.outputs.log.StringLog; import org.openjdk.asmtools.jdec.Main; import org.openjdk.asmtools.lib.utility.FileUtils; import java.io.IOException; import java.nio.file.Path; import java.util.Objects; import java.util.function.Function; import static org.openjdk.asmtools.lib.transform.pipeline.AsmtoolsType.FileType.JCOD; import static org.openjdk.asmtools.lib.transform.pipeline.Pipeline.*; public class ClassToJcodConverter extends Converter implements Function { private static final String DEFAULT_STAGE_NAME = "ClassToJcod"; public ClassToJcodConverter(String stageName) { super(Objects.requireNonNullElse(stageName, DEFAULT_STAGE_NAME)); } public ClassToJcodConverter() { this(null); } @Override public Jcod apply(Clazz incoming) { logInfo("Generating: class -> jcod"); Objects.requireNonNull(incoming, "Incoming Jcod cannot be null"); if (incoming.firstInput()) { logDebug(stageName(), "Received first input: " + incoming); } else { logDebug(stageName(), "Received from previous stage: " + incoming); } if (!incoming.firstInput() && incoming.record().toolReturn() != SUCCESS) { logWarn(stageName(), "Previous stage failed. Delegating..."); return handleError("Previous stage failed", incoming, incoming.record().log(), incoming.record().toolReturn()); } if (incoming.record().file() == null) { return handleError("Incoming Clazz file is null", incoming, null, -1); } try { byte[] classBytes = FileUtils.readBytesFromFile(incoming.record().file()); ByteOutput output = new ByteOutput(); StringLog log = new StringLog(); Main compiler = new Main(output, log, new ByteInput(classBytes)); int result = compiler.decode(); if (result != SUCCESS) { return handleError(stageName() + " failed.", incoming, log, result); } if (output.getOutputs() == null || output.getOutputs().isEmpty() || output.getOutputs().get(0) == null) { return handleError("jdec ToolOutput not available", incoming, log, result); } else { logDebug(stageName(), "jdec succeeded."); } Path jcodFilePath = FileUtils.writeBytesToFile("temp", JCOD.extension(), output.getOutputs().get(0).getBody()); Jcod r = new Jcod(new Pipeline.Status(stageName(), jcodFilePath, log, result, output)); logDebug(stageName(), "Sending next stage: " + r); return r; } catch (IOException e) { throw new RuntimeException("Failed to convert CLASS to JCOD", e); } } protected Jcod handleError(String errorMessage, Clazz type, StringLog log, int result) { logWarn(errorMessage); Pipeline.Status status = new Pipeline.Status(stageName(), type.record().file(), log, result, null); setRecord(status); return new Jcod(status); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/pipeline/Clazz.java000066400000000000000000000025121514323636100317070ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform.pipeline; public class Clazz extends AsmtoolsType { public Clazz(Pipeline.Status status) { super(status, FileType.CLAZZ); } public Clazz(Pipeline.Status status, boolean isInput) { super(status, FileType.CLAZZ, isInput); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/pipeline/Converter.java000066400000000000000000000034251514323636100325770ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform.pipeline; import org.openjdk.asmtools.common.outputs.log.StringLog; public class Converter { private Pipeline.Status record; private final String stageName; private StringLog log; public Converter(String stageName) { this.stageName = stageName; this.log = new StringLog(); } public StringLog log() { return log; } public Converter setLog(StringLog log) { this.log = log; return this; } public String stageName() { return stageName; } public Pipeline.Status record() { return record; } public Converter setRecord(Pipeline.Status record) { this.record = record; return this; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/pipeline/Jasm.java000066400000000000000000000025041514323636100315170ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform.pipeline; public class Jasm extends AsmtoolsType { public Jasm(Pipeline.Status status) { super(status, FileType.JASM); } public Jasm(Pipeline.Status status, boolean isInput) { super(status, FileType.JASM, isInput); } } JasmToClassConverter.java000066400000000000000000000104721514323636100346240ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/pipeline/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform.pipeline; import org.openjdk.asmtools.common.inputs.ByteInput; import org.openjdk.asmtools.common.outputs.ByteOutput; import org.openjdk.asmtools.common.outputs.log.StringLog; import org.openjdk.asmtools.jasm.Main; import org.openjdk.asmtools.lib.utility.FileUtils; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.Objects; import java.util.function.Function; import static org.openjdk.asmtools.lib.transform.pipeline.AsmtoolsType.FileType.CLAZZ; import static org.openjdk.asmtools.lib.transform.pipeline.Pipeline.*; public class JasmToClassConverter extends Converter implements Function { private static final String DEFAULT_STAGE_NAME = "JcodToClass"; public JasmToClassConverter(String stageName) { super(Objects.requireNonNullElse(stageName, DEFAULT_STAGE_NAME)); } public JasmToClassConverter() { this(null); } @Override public Clazz apply(Jasm incoming) { logInfo("Compiling: jasm -> class"); Objects.requireNonNull(incoming, "Incoming Jcod cannot be null"); if (incoming.firstInput()) { logDebug(stageName(), "Received first input: " + incoming); } else { logDebug(stageName(), "Received from previous stage: " + incoming); } if (!incoming.firstInput() && incoming.record().toolReturn() != SUCCESS) { logWarn(stageName(), "Previous stage failed. Delegating..."); return handleError("Previous stage failed", incoming, incoming.record().log(), incoming.record().toolReturn()); } if (incoming.record().file() == null || !Files.exists(incoming.record().file()) || !Files.isRegularFile(incoming.record().file())) { return handleError("Incoming Jasm file is null", incoming, null, -1); } try { byte[] jasmBytes = FileUtils.readBytesFromFile(incoming.record().file()); ByteOutput output = new ByteOutput(); StringLog log = new StringLog(); Main compiler = new Main(output, log, new ByteInput(jasmBytes)); int result = compiler.compile(); if (result != SUCCESS) { return handleError(stageName() + " failed.", incoming, log, result); } if (output.getOutputs() == null || output.getOutputs().isEmpty() || output.getOutputs().get(0) == null) { return handleError("jasm ToolOutput not available", incoming, log, result); } logDebug(stageName(), "jasm succeeded."); Path classFilePath = FileUtils.writeBytesToFile("temp", CLAZZ.extension(), output.getOutputs().get(0).getBody()); Clazz r = new Clazz(new Pipeline.Status(stageName(), classFilePath, log, result, output)); logDebug(stageName(), "Sending next stage: " + r); return r; } catch (IOException e) { throw new RuntimeException("Failed to convert JASM to CLASS", e); } } protected Clazz handleError(String errorMessage, Jasm type, StringLog log, int result) { logWarn(errorMessage); Pipeline.Status status = new Pipeline.Status(stageName(), type.record().file(), log, result, null); setRecord(status); return new Clazz(status); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/pipeline/Jcod.java000066400000000000000000000025051514323636100315050ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform.pipeline; public class Jcod extends AsmtoolsType { public Jcod(Pipeline.Status status) { super(status, FileType.JCOD); } public Jcod(Pipeline.Status status, boolean isInput) { super(status, FileType.JCOD, isInput); } } JcodToClassConverter.java000066400000000000000000000102201514323636100346000ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/pipeline/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform.pipeline; import org.openjdk.asmtools.common.inputs.ByteInput; import org.openjdk.asmtools.common.outputs.ByteOutput; import org.openjdk.asmtools.common.outputs.log.StringLog; import org.openjdk.asmtools.jcoder.Main; import org.openjdk.asmtools.lib.utility.FileUtils; import java.io.IOException; import java.nio.file.Path; import java.util.Objects; import java.util.function.Function; import static org.openjdk.asmtools.lib.transform.pipeline.AsmtoolsType.FileType.CLAZZ; import static org.openjdk.asmtools.lib.transform.pipeline.Pipeline.*; public class JcodToClassConverter extends Converter implements Function { private static final String DEFAULT_STAGE_NAME = "JcodToClass"; public JcodToClassConverter(String stageName) { super(Objects.requireNonNullElse(stageName, DEFAULT_STAGE_NAME)); } public JcodToClassConverter() { this(null); } @Override public Clazz apply(Jcod incoming) { logInfo("Compiling: jcod -> class"); Objects.requireNonNull(incoming, "Incoming Jcod cannot be null"); if (incoming.firstInput()) { logDebug(stageName(), "Received first input: " + incoming); } else { logDebug(stageName(), "Received from previous stage: " + incoming); } if (!incoming.firstInput() && incoming.record().toolReturn() != SUCCESS) { logWarn(stageName(), "Previous stage failed. Delegating..."); return handleError("Previous stage failed", incoming, null, -1); } if (incoming.record().file() == null) { return handleError("Incoming JCod file is null", incoming, null, -1); } try { byte[] jcodBytes = FileUtils.readBytesFromFile(incoming.record().file()); ByteOutput output = new ByteOutput(); StringLog log = new StringLog(); Main compiler = new Main(output, log, new ByteInput(jcodBytes)); int result = compiler.compile(); if (result != SUCCESS) { return handleError(stageName() + " failed.", incoming, log, result); } if (output.getOutputs() == null || output.getOutputs().isEmpty() || output.getOutputs().get(0) == null) { return handleError("jcoder ToolOutput not available", incoming, null, result); } logDebug(stageName(), "jcoder succeeded."); Path classFilePath = FileUtils.writeBytesToFile("temp", CLAZZ.extension(), output.getOutputs().get(0).getBody()); Clazz r = new Clazz(new Status(stageName(), classFilePath, log, result, output)); logDebug(stageName(), "Sending next stage: " + r); return r; } catch (IOException e) { throw new RuntimeException("Failed to convert JCOD to CLASS", e); } } protected Clazz handleError(String errorMessage, Jcod type, StringLog log, int result) { logWarn(errorMessage); Pipeline.Status status = new Pipeline.Status(stageName(), type.record().file(), log, result, null); setRecord(status); return new Clazz(status); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/pipeline/Pipeline.java000066400000000000000000000054741514323636100324030ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform.pipeline; import org.openjdk.asmtools.common.outputs.ByteOutput; import org.openjdk.asmtools.common.outputs.log.StringLog; import java.nio.file.Path; import java.util.function.Function; public class Pipeline { static final int SUCCESS = 0; static final int INIT_STAGE = 65_535; static final String CLASS_EXT = ".class"; static final String JASM_EXT = ".jasm"; static final String JCOD_EXT = ".jcod"; static final String JAVA_EXT = ".java"; private static final boolean DEBUG = false; private static final boolean WARN = false; private final Function currentStage; public Pipeline(Function initialStage) { this.currentStage = initialStage; } static void logDebug(String context, String msg) { if (DEBUG) System.out.printf("DEBUG: <%s> [%s]%n", context, msg); } static void logWarn(String context, String msg) { if (WARN) System.out.printf("WARN : <%s> [%s]%n", context, msg); } static void logWarn(String msg) { if (WARN) System.out.printf("WARN : [%s]%n", msg); } static void logInfo(String msg) { if (WARN) System.out.printf("INFO : [%s]%n", msg); } public Pipeline addStage(Function nextStage) { return new Pipeline<>(input -> nextStage.apply(currentStage.apply(input))); } public R execute(T input) { return currentStage.apply(input); } public record Status(String stage, Path file, StringLog log, int toolReturn, ByteOutput byteOutput) { public Status(Path file) { this(null, file, null, -1, null); } public Status(StringLog log) { this(null, null, log, -1, null); } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/transform/pipeline/TestPipeline.java000066400000000000000000000137421514323636100332400ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.transform.pipeline; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.io.File; import java.nio.file.Path; import java.util.Objects; import static org.junit.jupiter.api.Assertions.*; import static org.openjdk.asmtools.lib.transform.pipeline.Pipeline.SUCCESS; import static org.openjdk.asmtools.lib.transform.pipeline.Pipeline.logInfo; /** * Class to play around pipeline implementation */ public class TestPipeline { JcodToClassConverter jcodToClass = new JcodToClassConverter("jcodToClass"); ClassToJasmConverter classToJasm = new ClassToJasmConverter("classToJasm"); JasmToClassConverter jasmToClass = new JasmToClassConverter("jasmToClass"); ClassToJcodConverter classToJcod = new ClassToJcodConverter("classToJcod"); JcodToClassConverter jcodToClass2 = new JcodToClassConverter("jcodToClass_2"); private static String getInputFile(String fileName) { String resourceName = String.format("/jcod-files/%s", fileName); File resourceDir = new File(Objects.requireNonNull(TestPipeline.class.getResource(resourceName)).getFile()).getParentFile(); return resourceDir + File.separator + fileName; } @Test public void testJcodClass01() { Pipeline pipeline = new Pipeline<>(jcodToClass); // Input file String jcodFileName = "atrcvl00101m10p.jcod"; Jcod jcodInput = new Jcod(new Pipeline.Status(Path.of(getInputFile(jcodFileName))), true); // Execute the pipeline Clazz finalOutput = pipeline.execute(jcodInput); // Output the result logInfo("Final output file: " + finalOutput); assertTrue(finalOutput.record().log().toString().isEmpty()); assertEquals(SUCCESS, finalOutput.record().toolReturn()); assertTrue(jcodToClass.log().toString().isEmpty()); } @Test public void testJcodClass02() { Pipeline pipeline = new Pipeline<>(jcodToClass); // Input file String jcodFileName = "atrcvl00101m10p.jcod"; // Execute the pipeline assertThrows(NullPointerException.class, () -> pipeline.execute(null)); } @Test public void testJcodClass03() { JcodToClassConverter j2c = new JcodToClassConverter(); Pipeline pipeline = new Pipeline<>(jcodToClass); // Input file String jcodFileName = "abc.txt"; Jcod jcodInput = new Jcod(new Pipeline.Status(Path.of(getInputFile(jcodFileName))), true); // Execute the pipeline Clazz finalOutput = pipeline.execute(jcodInput); // Output the result assertFalse(finalOutput.record().log().toString().isEmpty()); assertNotEquals(SUCCESS, finalOutput.record().toolReturn()); assertFalse(jcodToClass.record().log().toString().isEmpty()); } @Test public void testJasmClass01() { Pipeline pipeline = new Pipeline<>(jasmToClass); // Input file String jasmFileName = "atrcvl00101m10p.jasm"; // Execute the pipeline Clazz finalOutput = pipeline.execute(new Jasm(new Pipeline.Status(Path.of(getInputFile(jasmFileName))), true)); // Output the result logInfo("Final output file: " + finalOutput.record().file()); assertTrue(jasmToClass.log().toString().isEmpty()); assertEquals(SUCCESS, finalOutput.record().toolReturn()); } @Test public void testJasmClassJcod() { Pipeline pipeline = new Pipeline<>(jasmToClass).addStage(classToJcod); // Input file String jasmFileName = "atrcvl00101m10p.jasm"; jasmFileName = "abc.txt"; Jasm input = new Jasm(new Pipeline.Status(Path.of(getInputFile(jasmFileName)))); // Execute the pipeline Jcod finalOutput = pipeline.execute(input); // Output the result logInfo("Final output file: " + finalOutput); } @Test public void testJcodClassJasmClassJcodClass() { JcodToClassConverter jcodToClass = new JcodToClassConverter(); ClassToJasmConverter classToJasm = new ClassToJasmConverter(); JasmToClassConverter jasmToClass = new JasmToClassConverter(); ClassToJcodConverter classToJcod = new ClassToJcodConverter(); JcodToClassConverter jcodToClass2 = new JcodToClassConverter(); // Define the pipeline Pipeline pipeline = new Pipeline<>(jcodToClass) .addStage(classToJasm) .addStage(jasmToClass) .addStage(classToJcod) .addStage(jcodToClass2); // Input file String jcodFileName = "atrcvl00101m10p.jcod"; Path jcodFilePath = Path.of(getInputFile(jcodFileName)); Jcod jcodInput = new Jcod(new Pipeline.Status(jcodFilePath)); // Execute the pipeline Clazz finalOutput = pipeline.execute(jcodInput); // Output the result logInfo("Final output file: " + finalOutput.record().file()); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/utility/000077500000000000000000000000001514323636100256445ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/utility/FileUtils.java000066400000000000000000000070541514323636100304150ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.utility; import org.junit.jupiter.api.Assertions; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.util.Optional; import java.util.function.Consumer; import java.util.stream.Stream; public class FileUtils { public static byte[] readBytesFromFile(Path filePath) throws IOException { return Files.readAllBytes(filePath); } public static Path writeBytesToFile(String prefix, String suffix, byte[] bytes) throws IOException { Path tempFile = Files.createTempFile(prefix, suffix); Files.write(tempFile, bytes, StandardOpenOption.WRITE); return tempFile; } public static File getResourceFilePath(Class cls, String relativePath) { return new File(cls.getResource(relativePath).getFile()); } public static byte[] getResourceFile(String s) throws IOException { byte[] bytes; try (InputStream is = FileUtils.class.getResourceAsStream(s)) { bytes = is.readAllBytes(); Assertions.assertNotNull(bytes); } catch (Exception ex) { System.err.println("Can't get resource file " + s); throw ex; } return bytes; } public static byte[] getBinaryFile(File file) throws ClassNotFoundException { long byteCount = file.length(); byte[] bytes = new byte[(int) byteCount]; try { FileInputStream f = new FileInputStream(file); f.read(bytes); f.close(); } catch (Exception e) { throw new ClassNotFoundException(); } Assertions.assertNotNull(bytes); return bytes; } public static String getStringFile(File file) throws ClassNotFoundException { byte[] bytes = getBinaryFile(file); String str = new String(bytes, StandardCharsets.UTF_8); Assertions.assertNotNull(str); return str; } public static Optional findFile(String root, String fileName, Consumer printer) { try ( Stream stream = Files.find(Paths.get(root), 20, (path, attr) -> path.toString().endsWith(fileName))) { return stream.findAny(); } catch (IOException e) { printer.accept(e.getMessage()); } return Optional.empty(); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/lib/utility/StringUtils.java000066400000000000000000000062751514323636100310100ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.lib.utility; import org.openjdk.asmtools.lib.action.DebugHelper; import java.util.ArrayList; import java.util.List; import java.util.function.BiFunction; import java.util.function.Function; import java.util.stream.IntStream; public class StringUtils { public static BiFunction funcSubStrCount = (text, subStr) -> { Long count =IntStream.range(0, text.length() - subStr.length() + 1) .filter(i -> text.substring(i, i + subStr.length()).equals(subStr)) .count(); if(DebugHelper.isDebug()) { System.out.println("count(\"%s\") = %d".formatted(subStr, count)); } return count; }; public static Function funcNormalizeText = s -> s.replaceAll("[\\r\\n]+", "") .replaceAll("\\t", " ").replaceAll(" {2,}", " "); public static List substrBetween(final String str, final String startStr, final String endStr) { if (isEmpty(str) || isEmpty(startStr) || isEmpty(endStr)) { return new ArrayList<>(); } final int strLen = str.length(); final int startLen = endStr.length(); final int endLen = startStr.length(); final List list = new ArrayList<>(); int pos = 0; while (pos < strLen - startLen) { int start = str.indexOf(startStr, pos); if (start < 0) break; start += endLen; final int end = str.indexOf(endStr, start); if (end < 0) break; list.add(str.substring(start, end)); pos = end + startLen; } return list; } public static boolean isEmpty(String s) { return s == null || s.isEmpty(); } public static String[] addTail(String[] elements, String... extras) { int length = extras.length; if (length == 0) { return elements; } String[] result = new String[elements.length + length]; System.arraycopy(elements, 0, result, 0, elements.length); System.arraycopy(extras, 0, result, elements.length, length); return result; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/structure/000077500000000000000000000000001514323636100254335ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/structure/ClassFile/000077500000000000000000000000001514323636100273005ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/structure/ClassFile/ClassFileTests.java000066400000000000000000000213361514323636100330400ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.structure.ClassFile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.openjdk.asmtools.common.structure.CFVersion; import org.openjdk.asmtools.lib.action.Jasm; import org.openjdk.asmtools.lib.log.LogAndBinResults; import java.io.File; import java.io.IOException; import java.util.List; import java.util.stream.Stream; import static org.openjdk.asmtools.lib.utility.StringUtils.funcSubStrCount; /** * This is the test for class/interface/field modifiers. */ @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class ClassFileTests { private Jasm jasm = new Jasm(); private File resourceDir; private static Stream getTestParameters() { return Stream.of( // jasm Arguments.of("ClassFile00.jasm", List.of("\"ACC_VALUE, ACC_PUBLIC\": If the ACC_INTERFACE flag is not set a value class must have at least one of its ACC_FINAL, ACC_IDENTITY, or ACC_ABSTRACT flags set", "Class file version 69:0 does not conform to the new kind of objects; expected version")), Arguments.of("ClassFile01.jasm", List.of("Class file version 69:0 does not conform to the new kind of objects; expected version")), Arguments.of("ClassFile02.jasm", List.of("Class file version not specified in file or by -cv parameter. Defaulting to version \"%s\"". formatted(CFVersion.ValueObjectsVersion().asString()))), Arguments.of("ClassFile03.jasm", List.of( "\"ACC_VALUE, ACC_PUBLIC\": If the ACC_INTERFACE flag is not set a value class must have at least one of its ACC_FINAL, ACC_IDENTITY, or ACC_ABSTRACT flags set", "Class file version not specified in file or by -cv parameter. Defaulting to version \"%s\"". formatted(CFVersion.ValueObjectsVersion().asString()))), Arguments.of("ClassFile04.jasm", List.of("Ambiguous use of similar modifiers")), Arguments.of("ClassFile05.jasm", List.of("Ambiguous use of similar modifiers")), Arguments.of("ClassFile06.jasm", List.of( "\"ACC_PUBLIC, ACC_IDENTITY, ACC_INTERFACE, ACC_ENUM\": If the ACC_INTERFACE flag is set, the ACC_ABSTRACT flag must also be set", "\"ACC_PUBLIC, ACC_IDENTITY, ACC_INTERFACE, ACC_ENUM\": If the ACC_INTERFACE flag is set, the ACC_FINAL, ACC_IDENTITY, ACC_ENUM, and ACC_MODULE flags must not be set", "\"ACC_PRIVATE, ACC_STRICT\": Interface field must be ACC_PUBLIC, ACC_STATIC, and ACC_FINAL only and may have ACC_STRICT_INIT or ACC_SYNTHETIC flag set", " method cannot be an interface method" )), Arguments.of("ClassFile07.jasm", List.of( "\"ACC_PUBLIC, ACC_ANNOTATION\": If the ACC_INTERFACE flag is not set ACC_ANNOTATION, and ACC_MODULE flags must not be set." )), Arguments.of("ClassFile08.jasm", List.of( "\"ACC_INTERFACE, ACC_ENUM\": If the ACC_INTERFACE flag is set, the ACC_ABSTRACT flag must also be set", "\"ACC_INTERFACE, ACC_ENUM\": If the ACC_INTERFACE flag is set, the ACC_FINAL, ACC_SUPER, ACC_ENUM, and ACC_MODULE flags must not be set." )), Arguments.of("ClassFile09.jasm", List.of( "\"ACC_VALUE\": If the ACC_INTERFACE flag is not set a value class must have at least one of its ACC_FINAL, ACC_IDENTITY, or ACC_ABSTRACT flags set", "\"ACC_PUBLIC\": Each field of a value class must have at least one of its ACC_STATIC or ACC_STRICT_INIT flags set" )), Arguments.of("ClassFile10.jasm", List.of( "\"ACC_FINAL, ACC_ABSTRACT\": Class cannot be both abstract and final" )), Arguments.of("ClassFile11.jasm", List.of()), Arguments.of("ClassFile12.jasm", List.of()), Arguments.of("ClassFile13.jasm", List.of()), Arguments.of("ClassFile14.jasm", List.of("Warning: Invalid modifier(s) for a field 0x0800")), Arguments.of("ClassFile15.jasm", List.of()), Arguments.of("ClassField00.jasm", List.of( "\"ACC_PUBLIC, ACC_PROTECTED, ACC_STATIC\": Interface field must be ACC_PUBLIC, ACC_STATIC, and ACC_FINAL only and may have ACC_STRICT_INIT or ACC_SYNTHETIC flag set", "\"ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_TRANSIENT\": Interface field must be ACC_PUBLIC, ACC_STATIC, and ACC_FINAL only and may have ACC_STRICT_INIT or ACC_SYNTHETIC flag set" )), Arguments.of("ClassField01.jasm", List.of( "\"ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_VOLATILE\": Each field of a class must not have both its ACC_FINAL and ACC_VOLATILE flags set")), Arguments.of("ClassField02.jasm", List.of( "\"ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC, ACC_ENUM\": Interface field must be ACC_PUBLIC, ACC_STATIC, and ACC_FINAL only and may have ACC_STRICT_INIT or ACC_SYNTHETIC flag set", "\"ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_TRANSIENT\": Interface field must be ACC_PUBLIC, ACC_STATIC, and ACC_FINAL only and may have ACC_STRICT_INIT or ACC_SYNTHETIC flag set", "\"ACC_STATIC, ACC_FINAL, ACC_STRICT\": Interface field must be ACC_PUBLIC, ACC_STATIC, and ACC_FINAL only and may have ACC_STRICT_INIT or ACC_SYNTHETIC flag set")), Arguments.of("ClassField03.jasm", List.of()), Arguments.of("ClassField04.jasm", List.of("\"ACC_PUBLIC, ACC_FINAL\": Each field of a value class must have at least one of its ACC_STATIC or ACC_STRICT_INIT flags set", "\"\": Each field of a value class must have at least one of its ACC_STATIC or ACC_STRICT_INIT flags set")) ); } @BeforeAll public void init() throws IOException { resourceDir = new File(this.getClass().getResource("ClassFile00.jasm").getFile()).getParentFile(); } @ParameterizedTest @MethodSource("getTestParameters") public void methodSignatureTest(String resourceName, List jasmSubStrings) { // jasm to class on the disk LogAndBinResults res = jasm.compile(List.of(resourceDir + File.separator + resourceName)); String log = res.log.toString(); for (String jasmSubString : jasmSubStrings) { Assertions.assertTrue(log.contains(jasmSubString)); } // exact number of warnings Assertions.assertEquals(jasmSubStrings.size(), funcSubStrCount.apply(log, "Warning:")); // jasm file was created Assertions.assertEquals(0, res.result); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/000077500000000000000000000000001514323636100254065ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7902820/000077500000000000000000000000001514323636100270755ustar00rootroot00000000000000TestRunnerNegative.java000066400000000000000000000034061514323636100334600ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7902820/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.transform.case7902820; import org.openjdk.asmtools.lib.transform.ITestRunner; import java.util.List; public class TestRunnerNegative implements ITestRunner { private final List classNames = List.of("SourceDebugExtensionNegative01", "SourceDebugExtensionNegative02"); final String dataPackage = TestRunnerNegative.class.getPackageName() + ".data."; @Override public void run() { for (String name : classNames) { try { this.getClass().getClassLoader().loadClass(dataPackage + name).getDeclaredConstructor().newInstance(); } catch (Throwable ignored) { /* ignore to be able to analyze stderr */ } } } } TestRunnerPositive.java000066400000000000000000000043361514323636100335230ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7902820/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.transform.case7902820; import org.openjdk.asmtools.lib.transform.ITestRunner; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.List; public class TestRunnerPositive implements ITestRunner { private List classNames = List.of(".SourceDebugExtensionPositive01", ".SourceDebugExtensionPositive02"); final String dataPackage = TestRunnerPositive.class.getPackageName() + ".data"; @Override public void run() { for (String name : classNames) { try { Class cl = this.getClass().getClassLoader().loadClass(dataPackage + name); Object obj = cl.getDeclaredConstructor().newInstance(); Method meth = obj.getClass().getMethod("calculate"); // System.out.print("test "); int rc = (int) meth.invoke(obj); System.out.println(" " + rc); } catch (ClassNotFoundException | NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) { throw new RuntimeException(e); } } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7902820/data/000077500000000000000000000000001514323636100300065ustar00rootroot00000000000000SourceDebugExtension_source.java000066400000000000000000000032731514323636100362630ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7902820/data// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // // Java source to generate InvalidSourceDebugExtension.class.jcod & SourceDebugExtension.class.jcod // package org.openjdk.asmtools.transform.case7902820.data; public class SourceDebugExtension_source { public int calculate() { int a1 = 1; int a2 = 1; int a3 = 1; try { for (int i = a1 / (a2 - a3); i < 5; i++) { a1 += 1; } a2 = 2; } catch (ArithmeticException e) { a3 = 2; } if (a1 != 1 || a2 != 1 || a3 != 2) { System.out.print("failed"); return 2; } System.out.print("passed"); return 0; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7902820Tests.java000066400000000000000000000101361514323636100307640ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.transform; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.openjdk.asmtools.lib.ext.CaptureSystemOutput; import org.openjdk.asmtools.lib.transform.ResultChecker; import org.openjdk.asmtools.lib.transform.TransformLoader; import static org.hamcrest.Matchers.containsString; import static org.junit.jupiter.api.Assertions.fail; import static org.openjdk.asmtools.lib.ext.CaptureSystemOutput.Kind.ERROR; import static org.openjdk.asmtools.lib.ext.CaptureSystemOutput.Kind.OUTPUT; import static org.openjdk.asmtools.lib.transform.TransformLoader.TransformRules.JCOD_TO_CLASS_LOAD; /** * Tests stdout for error messages * CODETOOLS-7902820 Asmtools incorrectly uses stdout for output error messages */ public class case7902820Tests extends ResultChecker { private TransformLoader transformLoader; @BeforeEach public void setClassLoader() { transformLoader = new TransformLoader(case7902820Tests.class.getClassLoader()). setTransformFilter(className -> className.contains("org.openjdk.asmtools.transform.case7902820")). addToExcludeList("org.openjdk.asmtools.transform.case7902820.TestRunnerPositive", "org.openjdk.asmtools.transform.case7902820.TestRunnerNegative" ); } @Test @CaptureSystemOutput(value = OUTPUT, mute = true) void systemOutputCheck_JCOD_TO_CLASS_LOAD_Positive(CaptureSystemOutput.OutputCapture outputCapture) { outputCapture.expect(containsString("test SourceDebugExtensionPositive01 passed 0")); outputCapture.expect(containsString("test SourceDebugExtensionPositive02 passed 0")); transformLoader.setTransformRule(JCOD_TO_CLASS_LOAD); try { Class cl = transformLoader.loadClass("org.openjdk.asmtools.transform.case7902820.TestRunnerPositive", true); setTestRunClass(cl); run(); } catch (Exception ex) { String msg = outputCapture.release().useStringTransformer(this::getPurifiedString).getLogAsString(ERROR); System.err.println(msg); fail(ex); } } @Test @CaptureSystemOutput(value = ERROR, mute = true) void systemOutputCheck_JCOD_TO_CLASS_LOAD_Negative(CaptureSystemOutput.OutputCapture errorCapture) { transformLoader.setTransformRule(JCOD_TO_CLASS_LOAD); errorCapture.expect( containsString("Warning: Expected attribute length \"2,147,483,647\" does not match the actual length \"6\"; expected length written")); errorCapture.expect( containsString("Warning: Expected attribute length \"2\" does not match the actual length \"6\"; expected length written")); errorCapture.expect(containsString("1 warning(s)")); try { Class cl = transformLoader. loadClass("org.openjdk.asmtools.transform.case7902820.TestRunnerNegative", true); setTestRunClass(cl); run(); } catch (Exception ignored) { /* ignore to be able to analyze stderr */ } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7903259/000077500000000000000000000000001514323636100271045ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7903259/BuildString.java000066400000000000000000000027031514323636100321770ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.transform.case7903259; /** * The class for producing files ["jasm", "jcoder", "jdec", "jdis"] in resources/org.openjdk.asmtools.transform.case7903259 * used by case7903259Tests::NoExtensionTest() */ public final class BuildString { private final String intialString = "Hello"; public void printDecoratedString() { System.out.println(intialString.concat(" World !")); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7903259Tests.java000066400000000000000000000061021514323636100307710ustar00rootroot00000000000000/* * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.transform; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; import org.openjdk.asmtools.lib.action.EAsmTool; import org.openjdk.asmtools.lib.log.LogAndReturn; import java.io.File; import java.io.IOException; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS; import static org.openjdk.asmtools.lib.utility.FileUtils.getResourceFilePath; /** * Tests tools against files without extension. * CODETOOLS-7903259 jasm: file names without extensions causes a tool crash */ @TestInstance(PER_CLASS) public class case7903259Tests { List assemblers = List.of("jasm", "jcoder"); List disassemblers = List.of("jdec", "jdis"); List files = Stream.concat(assemblers.stream(), disassemblers.stream()).collect(Collectors.toList()); File resourceDir; @BeforeAll public void init() throws IOException { resourceDir = getResourceFilePath(this.getClass(), "case7903259" + File.separator + assemblers.get(0)). getParentFile(); } @Test void NoExtensionTest() { EAsmTool tool; int testedToolsCount = 0; for (String fileName : files) { tool = EAsmTool.getToolBy(fileName); if (tool != null) { LogAndReturn ret = tool.call(List.of(resourceDir + File.separator + appendBin(fileName))); assertTrue(ret.log.toString().isEmpty()); assertEquals(0, ret.result); testedToolsCount++; } } assertEquals(4, testedToolsCount); } private String appendBin(String fileName) { if (disassemblers.contains(fileName)) { return fileName.concat(".bin"); } else { return fileName; } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7903454/000077500000000000000000000000001514323636100271015ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7903454/TestRunner.java000066400000000000000000000042521514323636100320600ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.transform.case7903454; import org.openjdk.asmtools.lib.transform.ITestRunner; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.List; public class TestRunner implements ITestRunner { private List classNames = List.of(".Utf8Code", ".Utf8CodeBroken01"); final String dataPackage = TestRunner.class.getPackageName() + ".data"; @Override public void run() { for (String name : classNames) { try { Class cl = this.getClass().getClassLoader().loadClass(dataPackage + name); Object obj = cl.getDeclaredConstructor().newInstance(); Method meth = obj.getClass().getMethod("calculate"); // System.out.print("test "); int rc = (int) meth.invoke(obj); System.out.println(" " + rc); } catch (ClassNotFoundException | NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) { throw new RuntimeException(e); } } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7903454/data/000077500000000000000000000000001514323636100300125ustar00rootroot00000000000000Utf8Code_source.java000066400000000000000000000062721514323636100336060ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7903454/data// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // // Java source to generate Utf8Code.class.jasm & Utf8Code.class.jcod // package org.openjdk.asmtools.transform.case7903454.data; import java.util.stream.Collectors; public class Utf8Code_source { static String ÄŒeÅ¡tinaAlphabet = "A à B C ÄŒ D ÄŽ E É Äš F G H Ch I à J K L M N Ň O Ó P Q R Ř S Å  T Ť U Ú Å® V W X Y à Z Ž " + "a á b c Ä d Ä e é Ä› f g h ch i í j k l m n ň o ó p q r Å™ s Å¡ t Å¥ u ú ů v w x y ý z ž"; static String ქáƒáƒ áƒ—ულიენáƒAlphabet = "á‚  á‚¡ á‚¢ á‚£ Ⴄ á‚¥ Ⴆ á‚§ Ⴈ á‚© Ⴊ á‚« Ⴌ á‚­ á‚® Ⴏ á‚° Ⴑ Ⴒ Ⴓ á‚´ Ⴕ á‚¶ á‚· Ⴘ Ⴙ Ⴚ á‚» Ⴜ Ⴝ Ⴞ á‚¿ Ⴠ რჂ Ⴣ Ⴤ Ⴥ " + "რბ გ დ ე ვ ზ თ ი კ ლ მ ნ რპ ჟ რ ს ტ უ ფ ქ ღ ყ შ ჩ ც ძ წ ჭ ხ ჯ ჰ ჱ ჲ ჳ ჴ ჵ ჶ ჷ ჸ ჹ ჺ ჻ ჼ ჽ ჾ ჿ"; static String ΕλληνικάAlphabet = "Α α Î’ β Γ γ Δ δ Ε ε Ζ ζ Η η Θ θ Ι ι Κ κ Λ λ Μ μ Πν Ξ ξ Ο ο Π Ï€ Ρ Ï Î£ σ/Ï‚ Τ Ï„ Î¥ Ï… Φ φ Χ χ Ψ ψ Ω ω"; String line; private String Ù†ØªÛŒØ¬Û = ""; private String вычиÑлитьБольшиеБуквы() { return line.codePoints().filter(cp -> Character.isUpperCase(cp)).mapToObj(cp->Character.toString(cp)). collect(Collectors.joining()); } private String вычиÑлитьМаленькиеБуквы() { return line.codePoints().filter(cp -> Character.isLowerCase(cp)).mapToObj(cp->Character.toString(cp)). collect(Collectors.joining()); } public int calculate() { if( نتیجÛ.isEmpty() ) Ù†ØªÛŒØ¬Û = вычиÑлитьБольшиеБуквы().substring(0, 20) + вычиÑлитьМаленькиеБуквы().substring(90); int length = نتیجÛ.length(); System.out.println(length + " " + نتیجÛ); return length; } public Utf8Code_source() { line = ÄŒeÅ¡tinaAlphabet.replaceAll(" ", "") + ქáƒáƒ áƒ—ულიენáƒAlphabet.replaceAll(" ", "") + ΕλληνικάAlphabet.replaceAll(" ", ""); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case7903454Tests.java000066400000000000000000000104101514323636100307630ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.transform; import org.hamcrest.Matchers; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.openjdk.asmtools.lib.ext.CaptureSystemOutput; import org.openjdk.asmtools.lib.transform.ResultChecker; import org.openjdk.asmtools.lib.transform.TransformLoader; import static org.hamcrest.Matchers.*; import static org.junit.jupiter.api.Assertions.fail; import static org.openjdk.asmtools.lib.ext.CaptureSystemOutput.Kind.ERROR; import static org.openjdk.asmtools.lib.ext.CaptureSystemOutput.Kind.OUTPUT; import static org.openjdk.asmtools.lib.transform.TransformLoader.TransformRules.JASM_TO_CLASS_LOAD; import static org.openjdk.asmtools.lib.transform.TransformLoader.TransformRules.JCOD_TO_CLASS_LOAD; /** * Tests UTF-8 support and broken UTF8 content of SourceDebugExtension attribute * CODETOOLS-7903454 Add Utf8 String and SourceDebugExtension attribute support */ public class case7903454Tests extends ResultChecker { private TransformLoader transformLoader; @BeforeEach public void setClassLoader() { transformLoader = new TransformLoader(case7903454Tests.class.getClassLoader()). setTransformFilter(className -> className.contains("org.openjdk.asmtools.transform.case7903454")). addToExcludeList("org.openjdk.asmtools.transform.case7903454.TestRunner" ); } @Test @CaptureSystemOutput(value = OUTPUT, mute = true) void systemOutputCheck_JCOD_TO_CLASS_LOAD_Positive(CaptureSystemOutput.OutputCapture outputCapture) { outputCapture.useStringTransformer(s -> s.replaceAll("[ \t\n]*", "")). expect(Matchers.allOf( containsString("test4"), matchesPattern(".*A.BC.D.E..FGH.*"), matchesPattern(".*test4.*test4.*") )); transformLoader.setTransformRule(JCOD_TO_CLASS_LOAD); try { Class cl = transformLoader.loadClass("org.openjdk.asmtools.transform.case7903454.TestRunner", true); setTestRunClass(cl); run(); } catch (Exception ex) { String msg = outputCapture.release().useStringTransformer(this::getPurifiedString).getLogAsString(ERROR); System.err.println(msg); fail(ex); } } @Test @CaptureSystemOutput(value = OUTPUT, mute = true) void systemOutputCheck_JASM_TO_CLASS_LOAD_Positive(CaptureSystemOutput.OutputCapture outputCapture) { outputCapture.useStringTransformer(s -> s.replaceAll("[ \t\n]*", "")). expect(Matchers.allOf( containsString("test4"), matchesPattern(".*A.BC.D.E..FGH.*"), matchesPattern(".*test4.*test4.*") )); transformLoader.setTransformRule(JASM_TO_CLASS_LOAD); try { Class cl = transformLoader.loadClass("org.openjdk.asmtools.transform.case7903454.TestRunner", true); setTestRunClass(cl); run(); } catch (Exception ex) { String msg = outputCapture.release().useStringTransformer(this::getPurifiedString).getLogAsString(ERROR); System.err.println(msg); fail(ex); } } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case8302260/000077500000000000000000000000001514323636100270665ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case8302260/TestRunner.java000066400000000000000000000114621514323636100320460ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.transform.case8302260; import org.openjdk.asmtools.lib.transform.ITestRunner; import org.openjdk.asmtools.transform.case8302260.data.CTestClass; import java.lang.constant.ClassDesc; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import static java.lang.constant.ConstantDescs.CD_String; import static java.lang.constant.ConstantDescs.CD_long; public class TestRunner implements ITestRunner { final String superPackage = TestRunner.class.getPackageName() + ".data"; @Override public void run() { VarHandle vh; // Chapter 5.4.3.2. Field Resolution Otherwise, field lookup is applied recursively // to the direct superinterfaces of the specified class or interface C. vh = testFieldRef(CTestClass.class, "stringField", String.class); testFieldValue(vh, ClassDesc.of(superPackage, "CTestClass"), "stringField", CD_String); vh = testFieldRef(CTestClass.class, "longField", long.class); testFieldValue(vh, ClassDesc.of(superPackage, "CTestClass"), "longField", CD_long); // Otherwise, if C has a superclass S, field lookup is applied recursively to S. vh = testFieldRef(CTestClass.class, "stringField2", String.class); testFieldValue(vh, ClassDesc.of(superPackage, "CTestClass"), "stringField2", CD_String); vh = testFieldRef(CTestClass.class, "longField2", long.class); testFieldValue(vh, ClassDesc.of(superPackage, "CTestClass"), "longField2", CD_long); // vh = testFieldRef(CTestClass.class, "stringField3", String.class); testFieldValue(vh, ClassDesc.of(superPackage, "CTestClass"), "stringField3", CD_String); vh = testFieldRef(CTestClass.class, "longField3", long.class); testFieldValue(vh, ClassDesc.of(superPackage, "CTestClass"), "longField3", CD_long); } void testFieldValue(VarHandle vh, ClassDesc desc, String name, ClassDesc fdesc) { if (vh != null) { try { System.out.print(" 1: " + vh.get()); } catch (Throwable e) { System.out.println(" 1: failed"); e.printStackTrace(System.err); } } try { VarHandle vh2 = MethodHandles.lookup().findStaticVarHandle((Class) desc.resolveConstantDesc(MethodHandles.lookup()), name, (Class) fdesc.resolveConstantDesc(MethodHandles.lookup())); System.out.print(" 2: " + vh2.get()); } catch (Throwable e) { System.out.println(" 2: failed"); e.printStackTrace(System.err); } if (vh != null) { try { VarHandle.VarHandleDesc vhd = vh.describeConstable().orElseThrow(); VarHandle obj = vhd.resolveConstantDesc(MethodHandles.lookup()); System.out.print(" 3: " + obj.get()); } catch (Throwable e) { System.out.println(" 3: failed"); e.printStackTrace(System.err); } } try { VarHandle.VarHandleDesc vhd = VarHandle.VarHandleDesc.ofStaticField(desc, name, fdesc); VarHandle obj = vhd.resolveConstantDesc(MethodHandles.lookup()); System.out.println(" 4: " + obj.get()); } catch (Throwable t) { System.out.println(" 4: failed"); t.printStackTrace(System.out); } } VarHandle testFieldRef(Class rec, String fname, Class type) { VarHandle vh = null; try { vh = MethodHandles.lookup().findStaticVarHandle(rec, fname, type); System.out.print("0: " + fname); } catch (NoSuchFieldException | IllegalAccessException e) { System.out.println("0: failed"); e.printStackTrace(System.err); } return vh; } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case8302260/data/000077500000000000000000000000001514323636100277775ustar00rootroot00000000000000CTestClass.java000066400000000000000000000025161514323636100325770ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case8302260/data/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.transform.case8302260.data; import org.openjdk.asmtools.transform.case8302260.data.pkg.CTestSuperClass; public class CTestClass extends CTestSuperClass implements ITestInterfaceA { public static String ctestString = "CTestClass"; public static long ctestLong = 1l; } ITestInterfaceA.java000066400000000000000000000024121514323636100335340ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case8302260/data/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.transform.case8302260.data; public interface ITestInterfaceA { String stringField = "ITestInterfaceA"; long longField = 10l; String stringField3 = "ITestInterfaceA3"; long longField3 = 13L; } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case8302260/data/pkg/000077500000000000000000000000001514323636100305605ustar00rootroot00000000000000CTestSuperClass.java000066400000000000000000000025051514323636100343750ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case8302260/data/pkg/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.transform.case8302260.data.pkg; public class CTestSuperClass { public static String stringField = "CTestSuperClass"; public static long longField = 100L; public static String stringField2 = "CTestSuperClass2"; public static long longField2 = 102L; } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/case8302260Tests.java000066400000000000000000000137451514323636100307660ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.asmtools.transform; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.openjdk.asmtools.lib.ext.CaptureSystemOutput; import org.openjdk.asmtools.lib.transform.ResultChecker; import org.openjdk.asmtools.lib.transform.TransformLoader; import java.util.List; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.emptyString; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.fail; import static org.openjdk.asmtools.lib.action.EAsmTool.JDEC; import static org.openjdk.asmtools.lib.action.EAsmTool.JDIS; import static org.openjdk.asmtools.lib.ext.CaptureSystemOutput.Kind.*; import static org.openjdk.asmtools.lib.transform.TransformLoader.TransformRules.*; /** * Tests JDK-8302260 VarHandle.describeConstable() fails to return a nominal descriptor for static public fields */ class case8302260Tests extends ResultChecker { private final List goldList = List.of( "0: stringField 1: ITestInterfaceA 2: ITestInterfaceA 3: ITestInterfaceA 4: ITestInterfaceA", "0: longField 1: 10 2: 10 3: 10 4: 10", "0: stringField2 1: CTestSuperClass2 2: CTestSuperClass2 3: CTestSuperClass2 4: CTestSuperClass2", "0: longField2 1: 102 2: 102 3: 102 4: 102", "0: stringField3 1: ITestInterfaceA3 2: ITestInterfaceA3 3: ITestInterfaceA3 4: ITestInterfaceA3", "0: longField3 1: 13 2: 13 3: 13 4: 13" ); private TransformLoader transformLoader; @BeforeEach public void setClassLoader() { transformLoader = new TransformLoader(case8302260Tests.class.getClassLoader()). setTransformFilter(className -> className.contains("org.openjdk.asmtools.transform.case8302260.")). clearOptions().setDeleteInterimFile(false); } @Test @CaptureSystemOutput(value = BOTH, mute = true) void systemOutputCheck_JCOD_TO_CLASS_LOAD(CaptureSystemOutput.OutputCapture outputCapture) { transformLoader.setTransformRule(JCOD_TO_CLASS_LOAD); commonTestCase(outputCapture, transformLoader); } @Test @CaptureSystemOutput(value = BOTH, mute = true) void systemOutputCheck_JASM_TO_CLASS_LOAD(CaptureSystemOutput.OutputCapture outputCapture) { transformLoader.setTransformRule(JASM_TO_CLASS_LOAD); commonTestCase(outputCapture, transformLoader); } @Test @CaptureSystemOutput(value = BOTH, mute = true) void systemOutputCheck_CLASS_LOAD(CaptureSystemOutput.OutputCapture outputCapture) { transformLoader.setTransformRule(CLASS_LOAD); commonTestCase(outputCapture, transformLoader); } @Test @CaptureSystemOutput(value = BOTH, mute = true) void systemOutputCheck_CLASS_TO_JCOD_TO_CLASS_LOAD(CaptureSystemOutput.OutputCapture outputCapture) { transformLoader.setTransformRule(CLASS_TO_JCOD_TO_CLASS_LOAD); commonTestCase(outputCapture, transformLoader); } @Test @CaptureSystemOutput(value = BOTH, mute = true) void systemOutputCheck_CLASS_TO_JCOD_TO_CLASS_LOAD_DETAILED(CaptureSystemOutput.OutputCapture outputCapture) { transformLoader.setTransformRule(CLASS_TO_JCOD_TO_CLASS_LOAD).setToolsOptions(JDEC, "-g"); commonTestCase(outputCapture, transformLoader); } @Test @CaptureSystemOutput(value = BOTH, mute = true) void systemOutputCheck_CLASS_TO_JCOD_TO_CLASS_LOAD_DETAILED_TABLE(CaptureSystemOutput.OutputCapture outputCapture) { transformLoader.setTransformRule(CLASS_TO_JCOD_TO_CLASS_LOAD).setToolsOptions(JDEC, "-g", "-table"); commonTestCase(outputCapture, transformLoader); } @Test @CaptureSystemOutput(value = BOTH, mute = true) void systemOutputCheck_CLASS_TO_JASM_TO_CLASS_LOAD(CaptureSystemOutput.OutputCapture outputCapture) { transformLoader.setTransformRule(CLASS_TO_JASM_TO_CLASS_LOAD); commonTestCase(outputCapture, transformLoader); } @Test @CaptureSystemOutput(value = BOTH, mute = true) void systemOutputCheck_CLASS_TO_JASM_TO_CLASS_LOAD_DETAILED(CaptureSystemOutput.OutputCapture outputCapture) { transformLoader.setTransformRule(CLASS_TO_JASM_TO_CLASS_LOAD).setToolsOptions(JDIS, "-g"); commonTestCase(outputCapture, transformLoader); } private void commonTestCase(final CaptureSystemOutput.OutputCapture capture, final TransformLoader loader) { try { Class cl = loader.loadClass("org.openjdk.asmtools.transform.case8302260.TestRunner", true); setTestRunClass(cl); run(); } catch (Exception ex) { String msg = capture.release().useStringTransformer(this::getPurifiedString).getLogAsString(ERROR); System.err.println(msg); fail(ex); } assertArrayEquals(goldList.toArray(), capture.useListTransformer(this::getFilteredList).getLogAsArray(OUTPUT)); assertThat(capture.getLogAsString(ERROR), emptyString()); } } jtreg8-8.2.1+1+ds1/asmtools/test/java/org/openjdk/asmtools/transform/package-info.java000066400000000000000000000032031514323636100305730ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * Facilities for behavioral testing of transitions from a binary to jcod/jasm presentation and vice versa. * The stdout/stderr should be equal before and after transition as follows: *

* javac class(output1) -> jasm->class(output2) => output1 == output2 * javac class(output1) -> jcod->class(output2) => output1 == output2 * (expected output): class(output) => expected output == output * (expected output): jasm-> class(output) => expected output == output * (expected output): jcod-> class(output) => expected output == output */ package org.openjdk.asmtools.transform; jtreg8-8.2.1+1+ds1/asmtools/test/resources/000077500000000000000000000000001514323636100204025ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/000077500000000000000000000000001514323636100224215ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/abc.txt000066400000000000000000000000201514323636100236770ustar00rootroot00000000000000some random textjtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcod00101m1n.jcod000066400000000000000000000061521514323636100255400ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcod001/atrcod00101m1/atrcod00101m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #12; // #1 Class #6; // #2 Method #1 #4; // #3 NameAndType #14 #15; // #4 Utf8 "ConstantValue"; // #5 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcod001/atrcod00101m1/atrcod00101m1n"; // #6 Utf8 "Exceptions"; // #7 Utf8 "LineNumberTable"; // #8 Utf8 "SourceFile"; // #9 Utf8 "LocalVariables"; // #10 Utf8 "Code"; // #11 Utf8 "java/lang/Object"; // #12 Utf8 "attr003.jcod"; // #13 Utf8 ""; // #14 Utf8 "()V"; // #15 } 0x0001; // access #2; // this_cpx #1; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #14; // name_index #15; // descriptor_index [] { // Attributes Attr(#11) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x03 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code ; Attr(#11) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x03 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcod00101m1p.jcod000066400000000000000000000060011514323636100255330ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcod001/atrcod00101m1/atrcod00101m1p { 0xCAFEBABE; 3; // minor version 45; // version [16] { // Constant Pool ; // first element is empty Class #12; // #1 at 0x0A Class #6; // #2 at 0x0D Method #1 #4; // #3 at 0x10 NameAndType #14 #15; // #4 at 0x15 Utf8 "ConstantValue"; // #5 at 0x1A Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcod001/atrcod00101m1/atrcod00101m1p"; // #6 at 0x2A Utf8 "Exceptions"; // #7 at 0x76 Utf8 "LineNumberTable"; // #8 at 0x83 Utf8 "SourceFile"; // #9 at 0x95 Utf8 "LocalVariables"; // #10 at 0xA2 Utf8 "Code"; // #11 at 0xB3 Utf8 "java/lang/Object"; // #12 at 0xBA Utf8 "attr003.jcod"; // #13 at 0xCD Utf8 ""; // #14 at 0xDC Utf8 "()V"; // #15 at 0xE5 } // end of Constant Pool 0x0001; // access [ ACC_PUBLIC ] #2; // this_cpx #1; // super_cpx [0] { // Interfaces } // end of Interfaces [0] { // Fields } // end of Fields [1] { // Methods { // method at 0xF7 0x0001; // access #14; // name_index : #15; // descriptor_index : ()V [1] { // Attributes Attr(#11, 17) { // Code at 0xFF 1; // max_stack 1; // max_locals Bytes[5]{ 0x2A 0xB7 0x00 0x03 0xB1; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [0] { // Attributes } // end of Attributes } // end of class javasoft/sqe/tests/vm/classfmt/atr/atrcod001/atrcod00101m1/atrcod00101m1p jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00101m1.jcod000066400000000000000000000327371514323636100254110ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00101m1/atrcvl00101m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "atrcvl00101m10p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00101m1/atrcvl00101m1"; // #12 Utf8 "instantiatePositive"; // #13 Utf8 "(Ljava/lang/String;[Ljava/lang/String;Ljava/io/PrintStream;)I"; // #14 InvokeDynamic 0s #16; // #15 NameAndType #17 #18; // #16 Utf8 "makeConcatWithConstants"; // #17 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #18 Method #20 #21; // #19 Class #22; // #20 NameAndType #23 #24; // #21 Utf8 "java/lang/Class"; // #22 Utf8 "forName"; // #23 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #24 Class #26; // #25 Utf8 "java/lang/ThreadDeath"; // #26 Class #28; // #27 Utf8 "java/lang/Throwable"; // #28 Method #30 #31; // #29 Class #32; // #30 NameAndType #33 #34; // #31 Utf8 "java/lang/String"; // #32 Utf8 "valueOf"; // #33 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #34 InvokeDynamic 1s #16; // #35 Method #37 #38; // #36 Class #39; // #37 NameAndType #40 #41; // #38 Utf8 "java/io/PrintStream"; // #39 Utf8 "println"; // #40 Utf8 "(Ljava/lang/String;)V"; // #41 Method #20 #43; // #42 NameAndType #44 #45; // #43 Utf8 "newInstance"; // #44 Utf8 "()Ljava/lang/Object;"; // #45 InvokeDynamic 2s #16; // #46 Field #48 #49; // #47 Class #50; // #48 NameAndType #51 #52; // #49 Utf8 "java/lang/System"; // #50 Utf8 "out"; // #51 Utf8 "Ljava/io/PrintStream;"; // #52 Method #10 #54; // #53 NameAndType #55 #56; // #54 Utf8 "run"; // #55 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #56 Method #48 #58; // #57 NameAndType #59 #60; // #58 Utf8 "exit"; // #59 Utf8 "(I)V"; // #60 Utf8 "Code"; // #61 Utf8 "LineNumberTable"; // #62 Utf8 "StackMapTable"; // #63 Class #65; // #64 Utf8 "[Ljava/lang/String;"; // #65 Utf8 "main"; // #66 Utf8 "([Ljava/lang/String;)V"; // #67 Utf8 "SourceFile"; // #68 Utf8 "atrcvl00101m1.java"; // #69 Utf8 "BootstrapMethods"; // #70 String #72; // #71 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl001.atrcvl00101m1.\u0001"; // #72 String #74; // #73 Utf8 "Failed with loading exception: \u0001"; // #74 String #76; // #75 Utf8 "Failed with runtime exception: \u0001"; // #76 MethodHandle 6b #78; // #77 Method #79 #80; // #78 Class #81; // #79 NameAndType #17 #82; // #80 Utf8 "java/lang/invoke/StringConcatFactory"; // #81 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #82 Utf8 "InnerClasses"; // #83 Class #85; // #84 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #85 Class #87; // #86 Utf8 "java/lang/invoke/MethodHandles"; // #87 Utf8 "Lookup"; // #88 } 0x0021; // access #10; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#61) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 12; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #55; // name_index #56; // descriptor_index [] { // Attributes Attr(#61) { // Code 3; // max_stack 2; // max_locals Bytes[]{ 0x12 0x07 0x2A 0x2B 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC; 0x03 0xAC; } [] { // Traps } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 16; 10 17; 12 19; } } // end of LineNumberTable ; Attr(#63) { // StackMapTable [] { // 12b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #13; // name_index #14; // descriptor_index [] { // Attributes Attr(#61) { // Code 2; // max_stack 5; // max_locals Bytes[]{ 0x01 0x4E 0x2A 0xBA 0x00 0x0F 0x00 0x00 0xB8 0x00 0x13 0x4E; 0xA7 0x00 0x1A 0x3A 0x04 0x19 0x04 0xBF 0x3A 0x04 0x2C 0x19; 0x04 0xB8 0x00 0x1D 0xBA 0x00 0x23 0x00 0x00 0xB6 0x00 0x24; 0x05 0xAC 0x2D 0xB6 0x00 0x2A 0x3A 0x04 0xA7 0x00 0x1A 0x3A; 0x04 0x19 0x04 0xBF 0x3A 0x04 0x2C 0x19 0x04 0xB8 0x00 0x1D; 0xBA 0x00 0x2E 0x00 0x00 0xB6 0x00 0x24 0x05 0xAC 0x03 0xAC; } [] { // Traps 2 12 15 25; 2 12 20 27; 38 44 47 25; 38 44 52 27; } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 24; 2 26; 12 32; 15 27; 17 28; 20 29; 22 30; 36 31; 38 35; 44 41; 47 36; 49 37; 52 38; 54 39; 68 40; 70 43; } } // end of LineNumberTable ; Attr(#63) { // StackMapTable [] { // 255b, 15, []{O,#30; O,#64; O,#37; O,#20}, []{O,#25}; // full_frame 68b, []z{O,#27}; // same_locals_1_stack_item_frame 17b; // same_frame 72b, []z{O,#25}; // same_locals_1_stack_item_frame 68b, []z{O,#27}; // same_locals_1_stack_item_frame 17b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #66; // name_index #67; // descriptor_index [] { // Attributes Attr(#61) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2F 0xB8 0x00 0x35 0x10 0x5F 0x60 0xB8 0x00; 0x39 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 47; 13 48; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#68) { // SourceFile #69; } // end of SourceFile ; Attr(#70) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #77; // bootstrap_method_ref [] { // bootstrap_arguments #71; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #77; // bootstrap_method_ref [] { // bootstrap_arguments #73; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #77; // bootstrap_method_ref [] { // bootstrap_arguments #75; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#83) { // InnerClasses [] { // classes #84 #86 #88 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00101m10p.jasm000066400000000000000000000013321514323636100256470ustar00rootroot00000000000000/* * Ident: @(#)atrcvl00101m10p.jasm generated from: @(#)atrcvl00101m.jmpp 03/11/19 * * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00101m1; public class atrcvl00101m10p version 45:3 { final Field ifi:"I" = int 200000; public Method "":"()V" throws java/lang/Exception stack 2 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; aload_0; getfield Field ifi:"I"; ifeq OK; new class java/lang/Exception; dup; invokespecial Method java/lang/Exception."":"()V"; athrow; OK: return; } } // end Class atrcvl00101m10p jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00101m10p.jcod000066400000000000000000000074441514323636100256460ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00101m1/atrcvl00101m10p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Method #2 #8; // #1 Class #15; // #2 Field #21 #10; // #3 Method #17 #8; // #4 Utf8 "atrcvl00101m10p.jasm"; // #5 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00101m1/atrcvl00101m10p"; // #6 Utf8 "SourceFile"; // #7 NameAndType #9 #11; // #8 Utf8 ""; // #9 NameAndType #20 #13; // #10 Utf8 "()V"; // #11 Utf8 "ConstantValue"; // #12 Utf8 "I"; // #13 Utf8 "java/lang/Object"; // #14 Utf8 "java/lang/Exception"; // #15 Utf8 "Code"; // #16 Class #14; // #17 Integer 0x00030D40; // #18 Utf8 "Exceptions"; // #19 Utf8 "ifi"; // #20 Class #6; // #21 } 0x0001; // access #21; // this_cpx #17; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0010; // access #20; // name_index #13; // descriptor_index [] { // Attributes Attr(#12) { // ConstantValue #18; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #9; // name_index #11; // descriptor_index [] { // Attributes Attr(#19) { // Exceptions [] { // Exceptions #2; } } // end of Exceptions ; Attr(#16) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0x2A 0xB4 0x00 0x03 0x99 0x00 0x0B 0xBB; 0x00 0x02 0x59 0xB7 0x00 0x01 0xBF 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#7) { // SourceFile #5; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00101m1t.jcod000066400000000000000000000327441514323636100255730ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00101m1t/atrcvl00101m1t { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "atrcvl00101m1t0p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00101m1t/atrcvl00101m1t"; // #12 Utf8 "instantiatePositive"; // #13 Utf8 "(Ljava/lang/String;[Ljava/lang/String;Ljava/io/PrintStream;)I"; // #14 InvokeDynamic 0s #16; // #15 NameAndType #17 #18; // #16 Utf8 "makeConcatWithConstants"; // #17 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #18 Method #20 #21; // #19 Class #22; // #20 NameAndType #23 #24; // #21 Utf8 "java/lang/Class"; // #22 Utf8 "forName"; // #23 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #24 Class #26; // #25 Utf8 "java/lang/ThreadDeath"; // #26 Class #28; // #27 Utf8 "java/lang/Throwable"; // #28 Method #30 #31; // #29 Class #32; // #30 NameAndType #33 #34; // #31 Utf8 "java/lang/String"; // #32 Utf8 "valueOf"; // #33 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #34 InvokeDynamic 1s #16; // #35 Method #37 #38; // #36 Class #39; // #37 NameAndType #40 #41; // #38 Utf8 "java/io/PrintStream"; // #39 Utf8 "println"; // #40 Utf8 "(Ljava/lang/String;)V"; // #41 Method #20 #43; // #42 NameAndType #44 #45; // #43 Utf8 "newInstance"; // #44 Utf8 "()Ljava/lang/Object;"; // #45 InvokeDynamic 2s #16; // #46 Field #48 #49; // #47 Class #50; // #48 NameAndType #51 #52; // #49 Utf8 "java/lang/System"; // #50 Utf8 "out"; // #51 Utf8 "Ljava/io/PrintStream;"; // #52 Method #10 #54; // #53 NameAndType #55 #56; // #54 Utf8 "run"; // #55 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #56 Method #48 #58; // #57 NameAndType #59 #60; // #58 Utf8 "exit"; // #59 Utf8 "(I)V"; // #60 Utf8 "Code"; // #61 Utf8 "LineNumberTable"; // #62 Utf8 "StackMapTable"; // #63 Class #65; // #64 Utf8 "[Ljava/lang/String;"; // #65 Utf8 "main"; // #66 Utf8 "([Ljava/lang/String;)V"; // #67 Utf8 "SourceFile"; // #68 Utf8 "atrcvl00101m1t.java"; // #69 Utf8 "BootstrapMethods"; // #70 String #72; // #71 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl001.atrcvl00101m1t.\u0001"; // #72 String #74; // #73 Utf8 "Failed with loading exception: \u0001"; // #74 String #76; // #75 Utf8 "Failed with runtime exception: \u0001"; // #76 MethodHandle 6b #78; // #77 Method #79 #80; // #78 Class #81; // #79 NameAndType #17 #82; // #80 Utf8 "java/lang/invoke/StringConcatFactory"; // #81 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #82 Utf8 "InnerClasses"; // #83 Class #85; // #84 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #85 Class #87; // #86 Utf8 "java/lang/invoke/MethodHandles"; // #87 Utf8 "Lookup"; // #88 } 0x0021; // access #10; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#61) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 12; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #55; // name_index #56; // descriptor_index [] { // Attributes Attr(#61) { // Code 3; // max_stack 2; // max_locals Bytes[]{ 0x12 0x07 0x2A 0x2B 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC; 0x03 0xAC; } [] { // Traps } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 16; 10 17; 12 19; } } // end of LineNumberTable ; Attr(#63) { // StackMapTable [] { // 12b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #13; // name_index #14; // descriptor_index [] { // Attributes Attr(#61) { // Code 2; // max_stack 5; // max_locals Bytes[]{ 0x01 0x4E 0x2A 0xBA 0x00 0x0F 0x00 0x00 0xB8 0x00 0x13 0x4E; 0xA7 0x00 0x1A 0x3A 0x04 0x19 0x04 0xBF 0x3A 0x04 0x2C 0x19; 0x04 0xB8 0x00 0x1D 0xBA 0x00 0x23 0x00 0x00 0xB6 0x00 0x24; 0x05 0xAC 0x2D 0xB6 0x00 0x2A 0x3A 0x04 0xA7 0x00 0x1A 0x3A; 0x04 0x19 0x04 0xBF 0x3A 0x04 0x2C 0x19 0x04 0xB8 0x00 0x1D; 0xBA 0x00 0x2E 0x00 0x00 0xB6 0x00 0x24 0x05 0xAC 0x03 0xAC; } [] { // Traps 2 12 15 25; 2 12 20 27; 38 44 47 25; 38 44 52 27; } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 24; 2 26; 12 32; 15 27; 17 28; 20 29; 22 30; 36 31; 38 35; 44 41; 47 36; 49 37; 52 38; 54 39; 68 40; 70 43; } } // end of LineNumberTable ; Attr(#63) { // StackMapTable [] { // 255b, 15, []{O,#30; O,#64; O,#37; O,#20}, []{O,#25}; // full_frame 68b, []z{O,#27}; // same_locals_1_stack_item_frame 17b; // same_frame 72b, []z{O,#25}; // same_locals_1_stack_item_frame 68b, []z{O,#27}; // same_locals_1_stack_item_frame 17b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #66; // name_index #67; // descriptor_index [] { // Attributes Attr(#61) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2F 0xB8 0x00 0x35 0x10 0x5F 0x60 0xB8 0x00; 0x39 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 47; 13 48; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#68) { // SourceFile #69; } // end of SourceFile ; Attr(#70) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #77; // bootstrap_method_ref [] { // bootstrap_arguments #71; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #77; // bootstrap_method_ref [] { // bootstrap_arguments #73; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #77; // bootstrap_method_ref [] { // bootstrap_arguments #75; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#83) { // InnerClasses [] { // classes #84 #86 #88 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00101m1t0p.jcod000066400000000000000000000101201514323636100260130ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00101m1t/atrcvl00101m1t0p { 0xCAFEBABE; 0; // minor version 50; // version [] { // Constant Pool ; // first element is empty Field #6 #7; // #1 Class #17; // #2 Method #10 #8; // #3 Method #2 #8; // #4 Utf8 "atrcvl00101m1t0p.jasm"; // #5 Class #22; // #6 NameAndType #21 #14; // #7 NameAndType #11 #12; // #8 Integer 0x00030D40; // #9 Class #16; // #10 Utf8 ""; // #11 Utf8 "()V"; // #12 Utf8 "SourceFile"; // #13 Utf8 "I"; // #14 Utf8 "StackMapTable"; // #15 Utf8 "java/lang/Object"; // #16 Utf8 "java/lang/Exception"; // #17 Utf8 "Code"; // #18 Utf8 "ConstantValue"; // #19 Utf8 "Exceptions"; // #20 Utf8 "ifi"; // #21 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00101m1t/atrcvl00101m1t0p"; // #22 } 0x0001; // access #6; // this_cpx #10; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0010; // access #21; // name_index #14; // descriptor_index [] { // Attributes Attr(#19) { // ConstantValue #9; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #11; // name_index #12; // descriptor_index [] { // Attributes Attr(#20) { // Exceptions [] { // Exceptions #2; } } // end of Exceptions ; Attr(#18) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x03 0x2A 0xB4 0x00 0x01 0x99 0x00 0x0B 0xBB; 0x00 0x02 0x59 0xB7 0x00 0x04 0xBF 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#15) { // StackMapTable [] { // 255b, 19, []{O,#6}, []{}; // full_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#13) { // SourceFile #5; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00102m1.jcod000066400000000000000000000327371514323636100254120ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00102m1/atrcvl00102m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "atrcvl00102m10p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00102m1/atrcvl00102m1"; // #12 Utf8 "instantiatePositive"; // #13 Utf8 "(Ljava/lang/String;[Ljava/lang/String;Ljava/io/PrintStream;)I"; // #14 InvokeDynamic 0s #16; // #15 NameAndType #17 #18; // #16 Utf8 "makeConcatWithConstants"; // #17 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #18 Method #20 #21; // #19 Class #22; // #20 NameAndType #23 #24; // #21 Utf8 "java/lang/Class"; // #22 Utf8 "forName"; // #23 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #24 Class #26; // #25 Utf8 "java/lang/ThreadDeath"; // #26 Class #28; // #27 Utf8 "java/lang/Throwable"; // #28 Method #30 #31; // #29 Class #32; // #30 NameAndType #33 #34; // #31 Utf8 "java/lang/String"; // #32 Utf8 "valueOf"; // #33 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #34 InvokeDynamic 1s #16; // #35 Method #37 #38; // #36 Class #39; // #37 NameAndType #40 #41; // #38 Utf8 "java/io/PrintStream"; // #39 Utf8 "println"; // #40 Utf8 "(Ljava/lang/String;)V"; // #41 Method #20 #43; // #42 NameAndType #44 #45; // #43 Utf8 "newInstance"; // #44 Utf8 "()Ljava/lang/Object;"; // #45 InvokeDynamic 2s #16; // #46 Field #48 #49; // #47 Class #50; // #48 NameAndType #51 #52; // #49 Utf8 "java/lang/System"; // #50 Utf8 "out"; // #51 Utf8 "Ljava/io/PrintStream;"; // #52 Method #10 #54; // #53 NameAndType #55 #56; // #54 Utf8 "run"; // #55 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #56 Method #48 #58; // #57 NameAndType #59 #60; // #58 Utf8 "exit"; // #59 Utf8 "(I)V"; // #60 Utf8 "Code"; // #61 Utf8 "LineNumberTable"; // #62 Utf8 "StackMapTable"; // #63 Class #65; // #64 Utf8 "[Ljava/lang/String;"; // #65 Utf8 "main"; // #66 Utf8 "([Ljava/lang/String;)V"; // #67 Utf8 "SourceFile"; // #68 Utf8 "atrcvl00102m1.java"; // #69 Utf8 "BootstrapMethods"; // #70 String #72; // #71 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl001.atrcvl00102m1.\u0001"; // #72 String #74; // #73 Utf8 "Failed with loading exception: \u0001"; // #74 String #76; // #75 Utf8 "Failed with runtime exception: \u0001"; // #76 MethodHandle 6b #78; // #77 Method #79 #80; // #78 Class #81; // #79 NameAndType #17 #82; // #80 Utf8 "java/lang/invoke/StringConcatFactory"; // #81 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #82 Utf8 "InnerClasses"; // #83 Class #85; // #84 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #85 Class #87; // #86 Utf8 "java/lang/invoke/MethodHandles"; // #87 Utf8 "Lookup"; // #88 } 0x0021; // access #10; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#61) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 12; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #55; // name_index #56; // descriptor_index [] { // Attributes Attr(#61) { // Code 3; // max_stack 2; // max_locals Bytes[]{ 0x12 0x07 0x2A 0x2B 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC; 0x03 0xAC; } [] { // Traps } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 16; 10 17; 12 19; } } // end of LineNumberTable ; Attr(#63) { // StackMapTable [] { // 12b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #13; // name_index #14; // descriptor_index [] { // Attributes Attr(#61) { // Code 2; // max_stack 5; // max_locals Bytes[]{ 0x01 0x4E 0x2A 0xBA 0x00 0x0F 0x00 0x00 0xB8 0x00 0x13 0x4E; 0xA7 0x00 0x1A 0x3A 0x04 0x19 0x04 0xBF 0x3A 0x04 0x2C 0x19; 0x04 0xB8 0x00 0x1D 0xBA 0x00 0x23 0x00 0x00 0xB6 0x00 0x24; 0x05 0xAC 0x2D 0xB6 0x00 0x2A 0x3A 0x04 0xA7 0x00 0x1A 0x3A; 0x04 0x19 0x04 0xBF 0x3A 0x04 0x2C 0x19 0x04 0xB8 0x00 0x1D; 0xBA 0x00 0x2E 0x00 0x00 0xB6 0x00 0x24 0x05 0xAC 0x03 0xAC; } [] { // Traps 2 12 15 25; 2 12 20 27; 38 44 47 25; 38 44 52 27; } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 24; 2 26; 12 32; 15 27; 17 28; 20 29; 22 30; 36 31; 38 35; 44 41; 47 36; 49 37; 52 38; 54 39; 68 40; 70 43; } } // end of LineNumberTable ; Attr(#63) { // StackMapTable [] { // 255b, 15, []{O,#30; O,#64; O,#37; O,#20}, []{O,#25}; // full_frame 68b, []z{O,#27}; // same_locals_1_stack_item_frame 17b; // same_frame 72b, []z{O,#25}; // same_locals_1_stack_item_frame 68b, []z{O,#27}; // same_locals_1_stack_item_frame 17b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #66; // name_index #67; // descriptor_index [] { // Attributes Attr(#61) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2F 0xB8 0x00 0x35 0x10 0x5F 0x60 0xB8 0x00; 0x39 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 47; 13 48; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#68) { // SourceFile #69; } // end of SourceFile ; Attr(#70) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #77; // bootstrap_method_ref [] { // bootstrap_arguments #71; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #77; // bootstrap_method_ref [] { // bootstrap_arguments #73; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #77; // bootstrap_method_ref [] { // bootstrap_arguments #75; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#83) { // InnerClasses [] { // classes #84 #86 #88 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00102m10p.jcod000066400000000000000000000074451514323636100256500ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00102m1/atrcvl00102m10p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Method #18 #16; // #1 Method #3 #16; // #2 Class #12; // #3 Field #9 #17; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 Utf8 "ConstantValue"; // #7 Utf8 "SourceFile"; // #8 Class #20; // #9 Utf8 "I"; // #10 Utf8 "java/lang/Object"; // #11 Utf8 "java/lang/Exception"; // #12 Utf8 "Code"; // #13 Utf8 "Exceptions"; // #14 Utf8 "ifi"; // #15 NameAndType #5 #6; // #16 NameAndType #15 #10; // #17 Class #11; // #18 Integer 0x00030D40; // #19 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00102m1/atrcvl00102m10p"; // #20 Utf8 "atrcvl00102m10p.jasm"; // #21 } 0x0001; // access #9; // this_cpx #18; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0000; // access #15; // name_index #10; // descriptor_index [] { // Attributes Attr(#7) { // ConstantValue #19; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#14) { // Exceptions [] { // Exceptions #3; } } // end of Exceptions ; Attr(#13) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0x2A 0xB4 0x00 0x04 0x99 0x00 0x0B 0xBB; 0x00 0x03 0x59 0xB7 0x00 0x02 0xBF 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#8) { // SourceFile #21; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00102m1t.jcod000066400000000000000000000327441514323636100255740ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00102m1t/atrcvl00102m1t { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "atrcvl00102m1t0p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00102m1t/atrcvl00102m1t"; // #12 Utf8 "instantiatePositive"; // #13 Utf8 "(Ljava/lang/String;[Ljava/lang/String;Ljava/io/PrintStream;)I"; // #14 InvokeDynamic 0s #16; // #15 NameAndType #17 #18; // #16 Utf8 "makeConcatWithConstants"; // #17 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #18 Method #20 #21; // #19 Class #22; // #20 NameAndType #23 #24; // #21 Utf8 "java/lang/Class"; // #22 Utf8 "forName"; // #23 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #24 Class #26; // #25 Utf8 "java/lang/ThreadDeath"; // #26 Class #28; // #27 Utf8 "java/lang/Throwable"; // #28 Method #30 #31; // #29 Class #32; // #30 NameAndType #33 #34; // #31 Utf8 "java/lang/String"; // #32 Utf8 "valueOf"; // #33 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #34 InvokeDynamic 1s #16; // #35 Method #37 #38; // #36 Class #39; // #37 NameAndType #40 #41; // #38 Utf8 "java/io/PrintStream"; // #39 Utf8 "println"; // #40 Utf8 "(Ljava/lang/String;)V"; // #41 Method #20 #43; // #42 NameAndType #44 #45; // #43 Utf8 "newInstance"; // #44 Utf8 "()Ljava/lang/Object;"; // #45 InvokeDynamic 2s #16; // #46 Field #48 #49; // #47 Class #50; // #48 NameAndType #51 #52; // #49 Utf8 "java/lang/System"; // #50 Utf8 "out"; // #51 Utf8 "Ljava/io/PrintStream;"; // #52 Method #10 #54; // #53 NameAndType #55 #56; // #54 Utf8 "run"; // #55 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #56 Method #48 #58; // #57 NameAndType #59 #60; // #58 Utf8 "exit"; // #59 Utf8 "(I)V"; // #60 Utf8 "Code"; // #61 Utf8 "LineNumberTable"; // #62 Utf8 "StackMapTable"; // #63 Class #65; // #64 Utf8 "[Ljava/lang/String;"; // #65 Utf8 "main"; // #66 Utf8 "([Ljava/lang/String;)V"; // #67 Utf8 "SourceFile"; // #68 Utf8 "atrcvl00102m1t.java"; // #69 Utf8 "BootstrapMethods"; // #70 String #72; // #71 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl001.atrcvl00102m1t.\u0001"; // #72 String #74; // #73 Utf8 "Failed with loading exception: \u0001"; // #74 String #76; // #75 Utf8 "Failed with runtime exception: \u0001"; // #76 MethodHandle 6b #78; // #77 Method #79 #80; // #78 Class #81; // #79 NameAndType #17 #82; // #80 Utf8 "java/lang/invoke/StringConcatFactory"; // #81 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #82 Utf8 "InnerClasses"; // #83 Class #85; // #84 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #85 Class #87; // #86 Utf8 "java/lang/invoke/MethodHandles"; // #87 Utf8 "Lookup"; // #88 } 0x0021; // access #10; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#61) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 12; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #55; // name_index #56; // descriptor_index [] { // Attributes Attr(#61) { // Code 3; // max_stack 2; // max_locals Bytes[]{ 0x12 0x07 0x2A 0x2B 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC; 0x03 0xAC; } [] { // Traps } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 16; 10 17; 12 19; } } // end of LineNumberTable ; Attr(#63) { // StackMapTable [] { // 12b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #13; // name_index #14; // descriptor_index [] { // Attributes Attr(#61) { // Code 2; // max_stack 5; // max_locals Bytes[]{ 0x01 0x4E 0x2A 0xBA 0x00 0x0F 0x00 0x00 0xB8 0x00 0x13 0x4E; 0xA7 0x00 0x1A 0x3A 0x04 0x19 0x04 0xBF 0x3A 0x04 0x2C 0x19; 0x04 0xB8 0x00 0x1D 0xBA 0x00 0x23 0x00 0x00 0xB6 0x00 0x24; 0x05 0xAC 0x2D 0xB6 0x00 0x2A 0x3A 0x04 0xA7 0x00 0x1A 0x3A; 0x04 0x19 0x04 0xBF 0x3A 0x04 0x2C 0x19 0x04 0xB8 0x00 0x1D; 0xBA 0x00 0x2E 0x00 0x00 0xB6 0x00 0x24 0x05 0xAC 0x03 0xAC; } [] { // Traps 2 12 15 25; 2 12 20 27; 38 44 47 25; 38 44 52 27; } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 24; 2 26; 12 32; 15 27; 17 28; 20 29; 22 30; 36 31; 38 35; 44 41; 47 36; 49 37; 52 38; 54 39; 68 40; 70 43; } } // end of LineNumberTable ; Attr(#63) { // StackMapTable [] { // 255b, 15, []{O,#30; O,#64; O,#37; O,#20}, []{O,#25}; // full_frame 68b, []z{O,#27}; // same_locals_1_stack_item_frame 17b; // same_frame 72b, []z{O,#25}; // same_locals_1_stack_item_frame 68b, []z{O,#27}; // same_locals_1_stack_item_frame 17b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #66; // name_index #67; // descriptor_index [] { // Attributes Attr(#61) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2F 0xB8 0x00 0x35 0x10 0x5F 0x60 0xB8 0x00; 0x39 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#62) { // LineNumberTable [] { // line_number_table 0 47; 13 48; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#68) { // SourceFile #69; } // end of SourceFile ; Attr(#70) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #77; // bootstrap_method_ref [] { // bootstrap_arguments #71; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #77; // bootstrap_method_ref [] { // bootstrap_arguments #73; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #77; // bootstrap_method_ref [] { // bootstrap_arguments #75; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#83) { // InnerClasses [] { // classes #84 #86 #88 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00102m1t0p.jcod000066400000000000000000000101231514323636100260170ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00102m1t/atrcvl00102m1t0p { 0xCAFEBABE; 0; // minor version 50; // version [] { // Constant Pool ; // first element is empty Class #22; // #1 Method #9 #5; // #2 Field #18 #8; // #3 Method #1 #5; // #4 NameAndType #20 #16; // #5 Utf8 "Code"; // #6 Utf8 "ConstantValue"; // #7 NameAndType #12 #19; // #8 Class #21; // #9 Utf8 "StackMapTable"; // #10 Utf8 "Exceptions"; // #11 Utf8 "ifi"; // #12 Utf8 "atrcvl00102m1t0p.jasm"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl001/atrcvl00102m1t/atrcvl00102m1t0p"; // #14 Integer 0x00030D40; // #15 Utf8 "()V"; // #16 Utf8 "SourceFile"; // #17 Class #14; // #18 Utf8 "I"; // #19 Utf8 ""; // #20 Utf8 "java/lang/Object"; // #21 Utf8 "java/lang/Exception"; // #22 } 0x0001; // access #18; // this_cpx #9; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0000; // access #12; // name_index #19; // descriptor_index [] { // Attributes Attr(#7) { // ConstantValue #15; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #20; // name_index #16; // descriptor_index [] { // Attributes Attr(#11) { // Exceptions [] { // Exceptions #1; } } // end of Exceptions ; Attr(#6) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x02 0x2A 0xB4 0x00 0x03 0x99 0x00 0x0B 0xBB; 0x00 0x01 0x59 0xB7 0x00 0x04 0xBF 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#10) { // StackMapTable [] { // 255b, 19, []{O,#18}, []{}; // full_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#17) { // SourceFile #13; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00301m1.jcod000066400000000000000000000266111514323636100254050ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl003/atrcvl00301m1/atrcvl00301m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl003.atrcvl00301m1.atrcvl00301m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl003.atrcvl00301m1.atrcvl00301m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00301m1 failed to reject bad classfile atrcvl00301m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl003/atrcvl00301m1/atrcvl00301m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00301m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00301m1 failed to load or instantiate good classfile atrcvl00301m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00301m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00301m1n.jcod000066400000000000000000000066421514323636100255650ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl003/atrcvl00301m1/atrcvl00301m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl003/atrcvl00301m1/atrcvl00301m1n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #19; } // end of ConstantValue ; Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00301m1p.jcod000066400000000000000000000064121514323636100255620ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl003/atrcvl00301m1/atrcvl00301m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl003/atrcvl00301m1/atrcvl00301m1p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00401m1.jcod000066400000000000000000000277361514323636100254170ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00401m1/atrcvl00401m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl004.atrcvl00401m1.atrcvl00401m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00401m1/atrcvl00401m1n"; // #20 Class #22; // #21 Utf8 "java/lang/Exception"; // #22 Method #24 #25; // #23 Class #26; // #24 NameAndType #27 #28; // #25 Utf8 "java/lang/String"; // #26 Utf8 "valueOf"; // #27 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #28 InvokeDynamic 0s #30; // #29 NameAndType #31 #32; // #30 Utf8 "makeConcatWithConstants"; // #31 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #32 Method #34 #35; // #33 Class #36; // #34 NameAndType #37 #38; // #35 Utf8 "java/io/PrintStream"; // #36 Utf8 "println"; // #37 Utf8 "(Ljava/lang/String;)V"; // #38 Class #40; // #39 Utf8 "java/lang/Throwable"; // #40 InvokeDynamic 1s #30; // #41 InterfaceMethod #19 #43; // #42 NameAndType #44 #45; // #43 Utf8 "get_i1"; // #44 Utf8 "()I"; // #45 Integer 0x0130BF9D; // #46 String #48; // #47 Utf8 "invalid value i1"; // #48 InterfaceMethod #19 #50; // #49 NameAndType #51 #45; // #50 Utf8 "get_i2"; // #51 Integer 0x0130E6AE; // #52 String #54; // #53 Utf8 "invalid value i2"; // #54 Field #56 #57; // #55 Class #58; // #56 NameAndType #59 #60; // #57 Utf8 "java/lang/System"; // #58 Utf8 "out"; // #59 Utf8 "Ljava/io/PrintStream;"; // #60 Method #62 #63; // #61 Class #64; // #62 NameAndType #65 #66; // #63 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00401m1/atrcvl00401m1"; // #64 Utf8 "run"; // #65 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #66 Method #56 #68; // #67 NameAndType #69 #70; // #68 Utf8 "exit"; // #69 Utf8 "(I)V"; // #70 Utf8 "Code"; // #71 Utf8 "LineNumberTable"; // #72 Utf8 "StackMapTable"; // #73 Utf8 "main"; // #74 Utf8 "([Ljava/lang/String;)V"; // #75 Utf8 "SourceFile"; // #76 Utf8 "atrcvl00401m1.java"; // #77 Utf8 "BootstrapMethods"; // #78 String #80; // #79 Utf8 "failed create an instance of atrcvl00401m1p:\u0001"; // #80 String #82; // #81 Utf8 "failed to load class atrcvl00401m1p:\u0001"; // #82 MethodHandle 6b #84; // #83 Method #85 #86; // #84 Class #87; // #85 NameAndType #31 #88; // #86 Utf8 "java/lang/invoke/StringConcatFactory"; // #87 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #88 Utf8 "InnerClasses"; // #89 Class #91; // #90 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #91 Class #93; // #92 Utf8 "java/lang/invoke/MethodHandles"; // #93 Utf8 "Lookup"; // #94 } 0x0021; // access #62; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#71) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#72) { // LineNumberTable [] { // line_number_table 0 13; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #65; // name_index #66; // descriptor_index [] { // Attributes Attr(#71) { // Code 2; // max_stack 5; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0xC0 0x00; 0x13 0x4E 0xA7 0x00 0x27 0x3A 0x04 0x2B 0x19 0x04 0xB8 0x00; 0x17 0xBA 0x00 0x1D 0x00 0x00 0xB6 0x00 0x21 0x05 0xAC 0x3A; 0x04 0x2B 0x19 0x04 0xB8 0x00 0x17 0xBA 0x00 0x29 0x00 0x00; 0xB6 0x00 0x21 0x05 0xAC 0x2D 0xB9 0x00 0x2A 0x01 0x00 0x12; 0x2E 0x9F 0x00 0x0B 0x2B 0x12 0x2F 0xB6 0x00 0x21 0x05 0xAC; 0x2D 0xB9 0x00 0x31 0x01 0x00 0x12 0x34 0x9F 0x00 0x0B 0x2B; 0x12 0x35 0xB6 0x00 0x21 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 14 17 21; 0 14 35 39; } // end of Traps [] { // Attributes Attr(#72) { // LineNumberTable [] { // line_number_table 0 18; 6 19; 14 26; 17 20; 19 21; 33 22; 35 23; 37 24; 51 25; 53 27; 64 28; 70 29; 72 31; 83 32; 89 33; 91 35; } } // end of LineNumberTable ; Attr(#73) { // StackMapTable [] { // 81b, []z{O,#21}; // same_locals_1_stack_item_frame 81b, []z{O,#39}; // same_locals_1_stack_item_frame 253b, 17, []z{O,#10; O,#19}; // append_frame 2 18b; // same_frame 18b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #74; // name_index #75; // descriptor_index [] { // Attributes Attr(#71) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x37 0xB8 0x00 0x3D 0x10 0x5F 0x60 0xB8 0x00; 0x43 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#72) { // LineNumberTable [] { // line_number_table 0 39; 13 40; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#76) { // SourceFile #77; } // end of SourceFile ; Attr(#78) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #83; // bootstrap_method_ref [] { // bootstrap_arguments #79; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #83; // bootstrap_method_ref [] { // bootstrap_arguments #81; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#89) { // InnerClasses [] { // classes #90 #92 #94 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00401m1n.jcod000066400000000000000000000044101514323636100255550ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00401m1/atrcvl00401m1n { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Class #2; // #1 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00401m1/atrcvl00401m1n"; // #2 Class #4; // #3 Utf8 "java/lang/Object"; // #4 Utf8 "get_i1"; // #5 Utf8 "()I"; // #6 Utf8 "get_i2"; // #7 Utf8 "SourceFile"; // #8 Utf8 "atrcvl00401m1n.java"; // #9 } 0x0600; // access #1; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0401; // access #5; // name_index #6; // descriptor_index [] { // Attributes } // end of Attributes } ; { // method 0x0401; // access #7; // name_index #6; // descriptor_index [] { // Attributes } // end of Attributes } } // end of Methods [] { // Attributes Attr(#8) { // SourceFile #9; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00401m1p.jcod000066400000000000000000000137561514323636100255740ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00401m1/atrcvl00401m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Field #6 #18; // #1 Field #6 #20; // #2 Method #21 #13; // #3 Utf8 "i2"; // #4 Utf8 "atrcvl00401m1p.jasm"; // #5 Class #14; // #6 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00401m1/atrcvl00401m1n"; // #7 Utf8 "get_i1"; // #8 Integer 0x0130BF9D; // #9 Utf8 "get_i2"; // #10 Utf8 "SourceFile"; // #11 Integer 0x0130E6AE; // #12 NameAndType #15 #17; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00401m1/atrcvl00401m1p"; // #14 Utf8 ""; // #15 Class #7; // #16 Utf8 "()V"; // #17 NameAndType #4 #24; // #18 Utf8 "ConstantValue"; // #19 NameAndType #23 #24; // #20 Class #25; // #21 Utf8 "()I"; // #22 Utf8 "i1"; // #23 Utf8 "I"; // #24 Utf8 "java/lang/Object"; // #25 Utf8 "Code"; // #26 } 0x0000; // access #6; // this_cpx #21; // super_cpx [] { // Interfaces #16; } // end of Interfaces [] { // Fields { // field 0x0018; // access #23; // name_index #24; // descriptor_index [] { // Attributes Attr(#19) { // ConstantValue #9; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #4; // name_index #24; // descriptor_index [] { // Attributes Attr(#19) { // ConstantValue #12; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #8; // name_index #22; // descriptor_index [] { // Attributes Attr(#26) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0xB2 0x00 0x02 0xAC; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0001; // access #10; // name_index #22; // descriptor_index [] { // Attributes Attr(#26) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0xB2 0x00 0x01 0xAC; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0001; // access #15; // name_index #17; // descriptor_index [] { // Attributes Attr(#26) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x03 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#11) { // SourceFile #5; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00402m1.jcod000066400000000000000000001022051514323636100254010ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00402m1/atrcvl00402m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00402m1/atrcvl00402m1t"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 Field #8 #9; // #7 Class #10; // #8 NameAndType #11 #12; // #9 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00402m1/atrcvl00402m1"; // #10 Utf8 "sfStringMirror"; // #11 Utf8 "Ljava/lang/String;"; // #12 String #14; // #13 Utf8 "sfString"; // #14 Method #16 #17; // #15 Class #18; // #16 NameAndType #19 #20; // #17 Utf8 "java/lang/String"; // #18 Utf8 "equals"; // #19 Utf8 "(Ljava/lang/Object;)Z"; // #20 InvokeDynamic 0s #22; // #21 NameAndType #23 #24; // #22 Utf8 "makeConcatWithConstants"; // #23 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #24 Method #26 #27; // #25 Class #28; // #26 NameAndType #29 #30; // #27 Utf8 "java/io/PrintStream"; // #28 Utf8 "println"; // #29 Utf8 "(Ljava/lang/String;)V"; // #30 Field #8 #32; // #31 NameAndType #33 #12; // #32 Utf8 "sStringMirror"; // #33 Field #8 #35; // #34 NameAndType #36 #12; // #35 Utf8 "sString"; // #36 InvokeDynamic 1s #38; // #37 NameAndType #23 #39; // #38 Utf8 "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"; // #39 String #36; // #40 InvokeDynamic 2s #22; // #41 Field #8 #43; // #42 NameAndType #44 #45; // #43 Utf8 "sfBooleanMirror"; // #44 Utf8 "Z"; // #45 InvokeDynamic 3s #47; // #46 NameAndType #23 #48; // #47 Utf8 "(Z)Ljava/lang/String;"; // #48 Field #8 #50; // #49 NameAndType #51 #45; // #50 Utf8 "sBooleanMirror"; // #51 Field #8 #53; // #52 NameAndType #54 #45; // #53 Utf8 "sBoolean"; // #54 InvokeDynamic 1s #56; // #55 NameAndType #23 #57; // #56 Utf8 "(ZZ)Ljava/lang/String;"; // #57 InvokeDynamic 4s #47; // #58 Field #8 #60; // #59 NameAndType #61 #62; // #60 Utf8 "sfShortMirror"; // #61 Utf8 "S"; // #62 InvokeDynamic 5s #64; // #63 NameAndType #23 #65; // #64 Utf8 "(S)Ljava/lang/String;"; // #65 Field #8 #67; // #66 NameAndType #68 #62; // #67 Utf8 "sShortMirror"; // #68 Field #8 #70; // #69 NameAndType #71 #62; // #70 Utf8 "sShort"; // #71 InvokeDynamic 1s #73; // #72 NameAndType #23 #74; // #73 Utf8 "(SS)Ljava/lang/String;"; // #74 InvokeDynamic 6s #64; // #75 Field #8 #77; // #76 NameAndType #78 #79; // #77 Utf8 "sfCharMirror"; // #78 Utf8 "C"; // #79 InvokeDynamic 7s #81; // #80 NameAndType #23 #82; // #81 Utf8 "(C)Ljava/lang/String;"; // #82 InvokeDynamic 8s #81; // #83 Field #8 #85; // #84 NameAndType #86 #79; // #85 Utf8 "sCharMirror"; // #86 Field #8 #88; // #87 NameAndType #89 #79; // #88 Utf8 "sChar"; // #89 InvokeDynamic 1s #91; // #90 NameAndType #23 #92; // #91 Utf8 "(CC)Ljava/lang/String;"; // #92 InvokeDynamic 9s #81; // #93 Field #8 #95; // #94 NameAndType #96 #97; // #95 Utf8 "sfByteMirror"; // #96 Utf8 "B"; // #97 InvokeDynamic 10s #99; // #98 NameAndType #23 #100; // #99 Utf8 "(B)Ljava/lang/String;"; // #100 Field #8 #102; // #101 NameAndType #103 #97; // #102 Utf8 "sByteMirror"; // #103 Field #8 #105; // #104 NameAndType #106 #97; // #105 Utf8 "sByte"; // #106 InvokeDynamic 1s #108; // #107 NameAndType #23 #109; // #108 Utf8 "(BB)Ljava/lang/String;"; // #109 InvokeDynamic 11s #99; // #110 Field #8 #112; // #111 NameAndType #113 #114; // #112 Utf8 "sfLongMirror"; // #113 Utf8 "J"; // #114 Long 0x0000000000000005;; // #115 InvokeDynamic 12s #118; // #117 NameAndType #23 #119; // #118 Utf8 "(J)Ljava/lang/String;"; // #119 Field #8 #121; // #120 NameAndType #122 #114; // #121 Utf8 "sLongMirror"; // #122 Field #8 #124; // #123 NameAndType #125 #114; // #124 Utf8 "sLong"; // #125 InvokeDynamic 1s #127; // #126 NameAndType #23 #128; // #127 Utf8 "(JJ)Ljava/lang/String;"; // #128 Long 0x000000000000000F;; // #129 InvokeDynamic 13s #118; // #131 Field #8 #133; // #132 NameAndType #134 #135; // #133 Utf8 "sfFloatMirror"; // #134 Utf8 "F"; // #135 Float 0x40C00000; // #136 InvokeDynamic 14s #138; // #137 NameAndType #23 #139; // #138 Utf8 "(F)Ljava/lang/String;"; // #139 InvokeDynamic 15s #138; // #140 Field #8 #142; // #141 NameAndType #143 #135; // #142 Utf8 "sFloatMirror"; // #143 Field #8 #145; // #144 NameAndType #146 #135; // #145 Utf8 "sFloat"; // #146 InvokeDynamic 1s #148; // #147 NameAndType #23 #149; // #148 Utf8 "(FF)Ljava/lang/String;"; // #149 Float 0x41800000; // #150 InvokeDynamic 16s #138; // #151 Field #8 #153; // #152 NameAndType #154 #155; // #153 Utf8 "sfDoubleMirror"; // #154 Utf8 "D"; // #155 Double 0x401C000000000000;; // #156 InvokeDynamic 17s #159; // #158 NameAndType #23 #160; // #159 Utf8 "(D)Ljava/lang/String;"; // #160 InvokeDynamic 18s #159; // #161 Field #8 #163; // #162 NameAndType #164 #155; // #163 Utf8 "sDoubleMirror"; // #164 Field #8 #166; // #165 NameAndType #167 #155; // #166 Utf8 "sDouble"; // #167 InvokeDynamic 1s #169; // #168 NameAndType #23 #170; // #169 Utf8 "(DD)Ljava/lang/String;"; // #170 Double 0x4031000000000000;; // #171 InvokeDynamic 19s #159; // #173 Field #175 #176; // #174 Class #177; // #175 NameAndType #178 #179; // #176 Utf8 "java/lang/System"; // #177 Utf8 "out"; // #178 Utf8 "Ljava/io/PrintStream;"; // #179 Method #8 #181; // #180 NameAndType #182 #183; // #181 Utf8 "run"; // #182 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #183 Method #175 #185; // #184 NameAndType #186 #187; // #185 Utf8 "exit"; // #186 Utf8 "(I)V"; // #187 Utf8 "Code"; // #188 Utf8 "LineNumberTable"; // #189 Utf8 "StackMapTable"; // #190 Utf8 "main"; // #191 Utf8 "([Ljava/lang/String;)V"; // #192 Utf8 "SourceFile"; // #193 Utf8 "atrcvl00402m1.java"; // #194 Utf8 "BootstrapMethods"; // #195 String #197; // #196 Utf8 "\u0001 != sfString"; // #197 String #199; // #198 Utf8 "\u0001 != \u0001"; // #199 String #201; // #200 Utf8 "\u0001 != sString"; // #201 String #203; // #202 Utf8 "\u0001 != true"; // #203 String #205; // #204 Utf8 "\u0001 != false"; // #205 String #207; // #206 Utf8 "\u0001 != 2"; // #207 String #209; // #208 Utf8 "\u0001 != 12"; // #209 String #211; // #210 Utf8 "\u0001 != \u0002"; // #211 String #213; // #212 Utf8 "\u0001"; // #213 String #215; // #214 Utf8 "\u0001 != 1"; // #215 String #217; // #216 Utf8 "\u0001 != 11"; // #217 String #219; // #218 Utf8 "\u0001 != 4"; // #219 String #221; // #220 Utf8 "\u0001 != 14"; // #221 String #223; // #222 Utf8 "\u0001 != 5"; // #223 String #225; // #224 Utf8 "\u0001 != 15"; // #225 String #227; // #226 Utf8 "\u0001 != 6.0"; // #227 String #229; // #228 Utf8 "\u0001 != 6.0F"; // #229 String #231; // #230 Utf8 "\u0001 != 16.0F"; // #231 String #233; // #232 Utf8 "\u0001 != 7.0"; // #233 String #235; // #234 Utf8 "\u0001 != 7.0D"; // #235 String #237; // #236 Utf8 "\u0001 != 17.0D"; // #237 MethodHandle 6b #239; // #238 Method #240 #241; // #239 Class #242; // #240 NameAndType #23 #243; // #241 Utf8 "java/lang/invoke/StringConcatFactory"; // #242 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #243 Utf8 "InnerClasses"; // #244 Class #246; // #245 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #246 Class #248; // #247 Utf8 "java/lang/invoke/MethodHandles"; // #248 Utf8 "Lookup"; // #249 } 0x0021; // access #8; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#188) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#189) { // LineNumberTable [] { // line_number_table 0 13; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #182; // name_index #183; // descriptor_index [] { // Attributes Attr(#188) { // Code 5; // max_stack 2; // max_locals Bytes[]{ 0xB2 0x00 0x07 0x12 0x0D 0xB6 0x00 0x0F 0x9A 0x00 0x11 0x2B; 0xB2 0x00 0x07 0xBA 0x00 0x15 0x00 0x00 0xB6 0x00 0x19 0x05; 0xAC 0xB2 0x00 0x07 0x12 0x0D 0xB6 0x00 0x0F 0x9A 0x00 0x11; 0x2B 0xB2 0x00 0x07 0xBA 0x00 0x15 0x00 0x00 0xB6 0x00 0x19; 0x05 0xAC 0xB2 0x00 0x1F 0xB2 0x00 0x22 0xB6 0x00 0x0F 0x9A; 0x00 0x14 0x2B 0xB2 0x00 0x1F 0xB2 0x00 0x22 0xBA 0x00 0x25; 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x1F 0x12 0x28; 0xB6 0x00 0x0F 0x9A 0x00 0x11 0x2B 0xB2 0x00 0x1F 0xBA 0x00; 0x29 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x2A 0x04; 0x9F 0x00 0x11 0x2B 0xB2 0x00 0x2A 0xBA 0x00 0x2E 0x00 0x00; 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x2A 0x04 0x9F 0x00 0x11; 0x2B 0xB2 0x00 0x2A 0xBA 0x00 0x2E 0x00 0x00 0xB6 0x00 0x19; 0x05 0xAC 0xB2 0x00 0x31 0xB2 0x00 0x34 0x9F 0x00 0x14 0x2B; 0xB2 0x00 0x31 0xB2 0x00 0x34 0xBA 0x00 0x37 0x00 0x00 0xB6; 0x00 0x19 0x05 0xAC 0xB2 0x00 0x31 0x99 0x00 0x11 0x2B 0xB2; 0x00 0x31 0xBA 0x00 0x3A 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC; 0xB2 0x00 0x3B 0x05 0x9F 0x00 0x11 0x2B 0xB2 0x00 0x3B 0xBA; 0x00 0x3F 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x3B; 0x05 0x9F 0x00 0x11 0x2B 0xB2 0x00 0x3B 0xBA 0x00 0x3F 0x00; 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x42 0xB2 0x00 0x45; 0x9F 0x00 0x14 0x2B 0xB2 0x00 0x42 0xB2 0x00 0x45 0xBA 0x00; 0x48 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x42 0x10; 0x0C 0x9F 0x00 0x11 0x2B 0xB2 0x00 0x42 0xBA 0x00 0x4B 0x00; 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x4C 0x04 0x9F 0x00; 0x11 0x2B 0xB2 0x00 0x4C 0xBA 0x00 0x50 0x00 0x00 0xB6 0x00; 0x19 0x05 0xAC 0xB2 0x00 0x4C 0x04 0x9F 0x00 0x11 0x2B 0xB2; 0x00 0x4C 0xBA 0x00 0x53 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC; 0xB2 0x00 0x54 0xB2 0x00 0x57 0x9F 0x00 0x14 0x2B 0xB2 0x00; 0x54 0xB2 0x00 0x57 0xBA 0x00 0x5A 0x00 0x00 0xB6 0x00 0x19; 0x05 0xAC 0xB2 0x00 0x54 0x10 0x0B 0x9F 0x00 0x11 0x2B 0xB2; 0x00 0x54 0xBA 0x00 0x5D 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC; 0xB2 0x00 0x5E 0x07 0x9F 0x00 0x11 0x2B 0xB2 0x00 0x5E 0xBA; 0x00 0x62 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x5E; 0x07 0x9F 0x00 0x11 0x2B 0xB2 0x00 0x5E 0xBA 0x00 0x62 0x00; 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x65 0xB2 0x00 0x68; 0x9F 0x00 0x14 0x2B 0xB2 0x00 0x65 0xB2 0x00 0x68 0xBA 0x00; 0x6B 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x65 0x10; 0x0E 0x9F 0x00 0x11 0x2B 0xB2 0x00 0x65 0xBA 0x00 0x6E 0x00; 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x6F 0x14 0x00 0x73; 0x94 0x99 0x00 0x11 0x2B 0xB2 0x00 0x6F 0xBA 0x00 0x75 0x00; 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x6F 0x14 0x00 0x73; 0x94 0x99 0x00 0x11 0x2B 0xB2 0x00 0x6F 0xBA 0x00 0x75 0x00; 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x78 0xB2 0x00 0x7B; 0x94 0x99 0x00 0x14 0x2B 0xB2 0x00 0x78 0xB2 0x00 0x7B 0xBA; 0x00 0x7E 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x78; 0x14 0x00 0x81 0x94 0x99 0x00 0x11 0x2B 0xB2 0x00 0x78 0xBA; 0x00 0x83 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x84; 0x12 0x88 0x95 0x99 0x00 0x11 0x2B 0xB2 0x00 0x84 0xBA 0x00; 0x89 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x84 0x12; 0x88 0x95 0x99 0x00 0x11 0x2B 0xB2 0x00 0x84 0xBA 0x00 0x8C; 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x8D 0xB2 0x00; 0x90 0x95 0x99 0x00 0x14 0x2B 0xB2 0x00 0x8D 0xB2 0x00 0x90; 0xBA 0x00 0x93 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00; 0x8D 0x12 0x96 0x95 0x99 0x00 0x11 0x2B 0xB2 0x00 0x8D 0xBA; 0x00 0x97 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x98; 0x14 0x00 0x9C 0x97 0x99 0x00 0x11 0x2B 0xB2 0x00 0x98 0xBA; 0x00 0x9E 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0x98; 0x14 0x00 0x9C 0x97 0x99 0x00 0x11 0x2B 0xB2 0x00 0x98 0xBA; 0x00 0xA1 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC 0xB2 0x00 0xA2; 0xB2 0x00 0xA5 0x97 0x99 0x00 0x14 0x2B 0xB2 0x00 0xA2 0xB2; 0x00 0xA5 0xBA 0x00 0xA8 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC; 0xB2 0x00 0xA2 0x14 0x00 0xAB 0x97 0x99 0x00 0x11 0x2B 0xB2; 0x00 0xA2 0xBA 0x00 0xAD 0x00 0x00 0xB6 0x00 0x19 0x05 0xAC; 0x03 0xAC; } [] { // Traps } // end of Traps [] { // Attributes Attr(#189) { // LineNumberTable [] { // line_number_table 0 17; 11 18; 23 19; 25 21; 36 22; 48 23; 50 27; 62 28; 77 29; 79 31; 90 32; 102 33; 104 37; 111 38; 123 39; 125 41; 132 42; 144 43; 146 47; 155 48; 170 49; 172 51; 178 52; 190 53; 192 57; 199 58; 211 59; 213 61; 220 62; 232 63; 234 67; 243 68; 258 69; 260 71; 268 72; 280 73; 282 77; 289 78; 301 79; 303 81; 310 82; 322 83; 324 87; 333 88; 348 89; 350 91; 358 92; 370 93; 372 97; 379 98; 391 99; 393 101; 400 102; 412 103; 414 107; 423 108; 438 109; 440 111; 448 112; 460 113; 462 117; 472 118; 484 119; 486 121; 496 122; 508 123; 510 127; 520 128; 535 129; 537 131; 547 132; 559 133; 561 137; 570 138; 582 139; 584 141; 593 142; 605 143; 607 147; 617 148; 632 149; 634 151; 643 152; 655 153; 657 157; 667 158; 679 159; 681 161; 691 162; 703 163; 705 167; 715 168; 730 169; 732 171; 742 172; 754 173; 756 176; } } // end of LineNumberTable ; Attr(#190) { // StackMapTable [] { // 25b; // same_frame 24b; // same_frame 28b; // same_frame 24b; // same_frame 20b; // same_frame 20b; // same_frame 25b; // same_frame 19b; // same_frame 20b; // same_frame 20b; // same_frame 25b; // same_frame 21b; // same_frame 20b; // same_frame 20b; // same_frame 25b; // same_frame 21b; // same_frame 20b; // same_frame 20b; // same_frame 25b; // same_frame 21b; // same_frame 23b; // same_frame 23b; // same_frame 26b; // same_frame 23b; // same_frame 22b; // same_frame 22b; // same_frame 26b; // same_frame 22b; // same_frame 23b; // same_frame 23b; // same_frame 26b; // same_frame 23b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #191; // name_index #192; // descriptor_index [] { // Attributes Attr(#188) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0xAE 0xB8 0x00 0xB4 0x10 0x5F 0x60 0xB8 0x00; 0xB8 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#189) { // LineNumberTable [] { // line_number_table 0 180; 13 181; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#193) { // SourceFile #194; } // end of SourceFile ; Attr(#195) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #196; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #198; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #200; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #202; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #204; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #206; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #208; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #210; #212; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #214; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #216; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #218; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #220; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #222; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #224; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #226; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #228; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #230; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #232; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #234; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #238; // bootstrap_method_ref [] { // bootstrap_arguments #236; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#244) { // InnerClasses [] { // classes #245 #247 #249 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00402m1t.jcod000066400000000000000000000564331514323636100256000ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00402m1/atrcvl00402m1t { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Field #112 #54; // #1 Field #112 #56; // #2 Field #112 #109; // #3 Field #112 #38; // #4 Field #112 #50; // #5 Field #112 #89; // #6 Field #112 #105; // #7 Field #112 #61; // #8 Field #112 #47; // #9 Field #112 #74; // #10 Field #112 #110; // #11 Field #112 #136; // #12 Field #112 #77; // #13 Field #112 #101; // #14 Field #112 #113; // #15 Field #112 #76; // #16 Field #112 #124; // #17 Field #112 #85; // #18 Field #112 #96; // #19 Field #112 #57; // #20 Field #112 #60; // #21 Field #112 #95; // #22 Field #112 #42; // #23 Field #112 #43; // #24 Method #46 #106; // #25 Field #112 #98; // #26 Field #112 #68; // #27 Field #112 #119; // #28 Field #112 #102; // #29 Field #112 #111; // #30 Field #112 #84; // #31 Field #112 #127; // #32 Field #112 #37; // #33 Utf8 "sfByteMirror"; // #34 Utf8 "sfChar"; // #35 Utf8 "sLongMirror"; // #36 NameAndType #94 #116; // #37 NameAndType #83 #128; // #38 Utf8 "ConstantValue"; // #39 Utf8 "B"; // #40 Utf8 "sBooleanMirror"; // #41 NameAndType #70 #81; // #42 NameAndType #73 #134; // #43 Utf8 "sfLong"; // #44 Float 0x40C00000; // #45 Class #92; // #46 NameAndType #71 #135; // #47 Integer 0x00000004; // #48 Utf8 "sfString"; // #49 NameAndType #66 #128; // #50 Integer 0x0000000E; // #51 Utf8 "sfBoolean"; // #52 Utf8 "sfDouble"; // #53 NameAndType #93 #81; // #54 Utf8 "sByte"; // #55 NameAndType #41 #125; // #56 NameAndType #107 #135; // #57 Utf8 "sfDoubleMirror"; // #58 Utf8 "J"; // #59 NameAndType #34 #40; // #60 NameAndType #91 #59; // #61 Utf8 "sfFloatMirror"; // #62 Double 0x401C000000000000;; // #63 Integer 0x00000002; // #65 Utf8 "sDoubleMirror"; // #66 Utf8 "Code"; // #67 NameAndType #75 #116; // #68 Utf8 "sFloatMirror"; // #69 Utf8 "sShort"; // #70 Utf8 "sChar"; // #71 Integer 0x0000000C; // #72 Utf8 "sString"; // #73 NameAndType #121 #134; // #74 Utf8 "sFloat"; // #75 NameAndType #117 #125; // #76 NameAndType #49 #134; // #77 Long 0x0000000000000005;; // #78 Integer 0x00000001; // #80 Utf8 "S"; // #81 String #49; // #82 Utf8 "sDouble"; // #83 NameAndType #118 #134; // #84 NameAndType #132 #59; // #85 Long 0x000000000000000F;; // #86 Utf8 "sfShort"; // #88 NameAndType #120 #135; // #89 Integer 0x0000000B; // #90 Utf8 "sLong"; // #91 Utf8 "java/lang/Object"; // #92 Utf8 "sfShortMirror"; // #93 Utf8 "sfFloat"; // #94 NameAndType #126 #81; // #95 NameAndType #133 #40; // #96 Utf8 "()V"; // #97 NameAndType #58 #128; // #98 Integer 0x00000000; // #99 Utf8 ""; // #100 NameAndType #52 #125; // #101 NameAndType #44 #59; // #102 Double 0x4031000000000000;; // #103 NameAndType #62 #116; // #105 NameAndType #108 #97; // #106 Utf8 "sfCharMirror"; // #107 Utf8 ""; // #108 NameAndType #53 #128; // #109 NameAndType #129 #125; // #110 NameAndType #35 #135; // #111 Class #131; // #112 NameAndType #36 #59; // #113 Utf8 "atrcvl00402m1t.jasm"; // #114 Float 0x41800000; // #115 Utf8 "F"; // #116 Utf8 "sBoolean"; // #117 Utf8 "sfStringMirror"; // #118 NameAndType #55 #40; // #119 Utf8 "sCharMirror"; // #120 Utf8 "sStringMirror"; // #121 Utf8 "SourceFile"; // #122 String #73; // #123 NameAndType #88 #81; // #124 Utf8 "Z"; // #125 Utf8 "sShortMirror"; // #126 NameAndType #69 #116; // #127 Utf8 "D"; // #128 Utf8 "sfBooleanMirror"; // #129 Utf8 "sfByte"; // #130 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl004/atrcvl00402m1/atrcvl00402m1t"; // #131 Utf8 "sfLongMirror"; // #132 Utf8 "sByteMirror"; // #133 Utf8 "Ljava/lang/String;"; // #134 Utf8 "C"; // #135 NameAndType #130 #40; // #136 } 0x0000; // access #112; // this_cpx #46; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #49; // name_index #134; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #82; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #118; // name_index #134; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0008; // access #73; // name_index #134; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #123; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #121; // name_index #134; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0018; // access #52; // name_index #125; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #80; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #129; // name_index #125; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0008; // access #117; // name_index #125; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #99; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #41; // name_index #125; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0018; // access #88; // name_index #81; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #65; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #93; // name_index #81; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0008; // access #70; // name_index #81; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #72; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #126; // name_index #81; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0018; // access #35; // name_index #135; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #80; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #107; // name_index #135; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0008; // access #71; // name_index #135; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #90; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #120; // name_index #135; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0018; // access #130; // name_index #40; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #48; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #34; // name_index #40; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0008; // access #55; // name_index #40; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #51; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #133; // name_index #40; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0018; // access #44; // name_index #59; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #78; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #132; // name_index #59; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0008; // access #91; // name_index #59; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #86; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #36; // name_index #59; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0018; // access #94; // name_index #116; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #45; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #62; // name_index #116; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0008; // access #75; // name_index #116; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #115; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #69; // name_index #116; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0018; // access #53; // name_index #128; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #63; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #58; // name_index #128; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0008; // access #83; // name_index #128; // descriptor_index [] { // Attributes Attr(#39) { // ConstantValue #103; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #66; // name_index #128; // descriptor_index [] { // Attributes } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #108; // name_index #97; // descriptor_index [] { // Attributes Attr(#67) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x19 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0008; // access #100; // name_index #97; // descriptor_index [] { // Attributes Attr(#67) { // Code 2; // max_stack 0; // max_locals Bytes[]{ 0xB2 0x00 0x0D 0xB3 0x00 0x1F 0xB2 0x00 0x18 0xB3 0x00 0x0A; 0xB2 0x00 0x0E 0xB3 0x00 0x0B 0xB2 0x00 0x10 0xB3 0x00 0x02; 0xB2 0x00 0x11 0xB3 0x00 0x01 0xB2 0x00 0x17 0xB3 0x00 0x16; 0xB2 0x00 0x1E 0xB3 0x00 0x14 0xB2 0x00 0x09 0xB3 0x00 0x06; 0xB2 0x00 0x0C 0xB3 0x00 0x15 0xB2 0x00 0x1C 0xB3 0x00 0x13; 0xB2 0x00 0x1D 0xB3 0x00 0x12 0xB2 0x00 0x08 0xB3 0x00 0x0F; 0xB2 0x00 0x21 0xB3 0x00 0x07 0xB2 0x00 0x1B 0xB3 0x00 0x20; 0xB2 0x00 0x03 0xB3 0x00 0x1A 0xB2 0x00 0x04 0xB3 0x00 0x05; 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#122) { // SourceFile #114; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00501m1.jcod000066400000000000000000000266111514323636100254070ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl005/atrcvl00501m1/atrcvl00501m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl005.atrcvl00501m1.atrcvl00501m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl005.atrcvl00501m1.atrcvl00501m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00501m1 failed to reject bad classfile atrcvl00501m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl005/atrcvl00501m1/atrcvl00501m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00501m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00501m1 failed to load or instantiate good classfile atrcvl00501m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00501m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00501m1n.jcod000066400000000000000000000063731514323636100255700ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl005/atrcvl00501m1/atrcvl00501m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl005/atrcvl00501m1/atrcvl00501m1n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#0) { // #0 0x00 0x01; } // end of #0 } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00501m1p.jcod000066400000000000000000000064121514323636100255640ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl005/atrcvl00501m1/atrcvl00501m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl005/atrcvl00501m1/atrcvl00501m1p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00502m1.jcod000066400000000000000000000266111514323636100254100ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl005/atrcvl00502m1/atrcvl00502m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl005.atrcvl00502m1.atrcvl00502m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl005.atrcvl00502m1.atrcvl00502m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00502m1 failed to reject bad classfile atrcvl00502m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl005/atrcvl00502m1/atrcvl00502m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00502m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00502m1 failed to load or instantiate good classfile atrcvl00502m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00502m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00502m1n.jcod000066400000000000000000000066121514323636100255650ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl005/atrcvl00502m1/atrcvl00502m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "dummy"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl005/atrcvl00502m1/atrcvl00502m1n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "ConstantValue"; // #20 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes // == Corrupted class file. The bytes do not represent a valid class attribute. == Attr(#21) { // #21 0x00 0x01; } // end of #21 } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00502m1p.jcod000066400000000000000000000064631514323636100255730ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl005/atrcvl00502m1/atrcvl00502m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "dummy"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl005/atrcvl00502m1/atrcvl00502m1p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "ConstantValue"; // #20 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // dummy 0x00 0x01; } // end of dummy } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00601m1.jcod000066400000000000000000000266111514323636100254100ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl006/atrcvl00601m1/atrcvl00601m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl006.atrcvl00601m1.atrcvl00601m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl006.atrcvl00601m1.atrcvl00601m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00601m1 failed to reject bad classfile atrcvl00601m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl006/atrcvl00601m1/atrcvl00601m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00601m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00601m1 failed to load or instantiate good classfile atrcvl00601m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00601m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00601m1n.jcod000066400000000000000000000063731514323636100255710ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl006/atrcvl00601m1/atrcvl00601m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl006/atrcvl00601m1/atrcvl00601m1n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#1) { // #1 0x00 0x01; } // end of #1 } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00601m1p.jcod000066400000000000000000000064121514323636100255650ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl006/atrcvl00601m1/atrcvl00601m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl006/atrcvl00601m1/atrcvl00601m1p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00701m1.jcod000066400000000000000000000415461514323636100254150ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00701m1/atrcvl00701m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "atrcvl00701m10p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00701m1/atrcvl00701m1"; // #12 Utf8 "loadPositive"; // #13 Utf8 "(Ljava/lang/String;[Ljava/lang/String;Ljava/io/PrintStream;)I"; // #14 String #16; // #15 Utf8 "atrcvl00701m11n"; // #16 Class #18; // #17 Utf8 "java/lang/ClassFormatError"; // #18 Method #10 #20; // #19 NameAndType #21 #22; // #20 Utf8 "loadNegative"; // #21 Utf8 "(Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/String;Ljava/io/PrintStream;)I"; // #22 InvokeDynamic 0s #24; // #23 NameAndType #25 #26; // #24 Utf8 "makeConcatWithConstants"; // #25 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #26 Method #28 #29; // #27 Class #30; // #28 NameAndType #31 #32; // #29 Utf8 "java/lang/Class"; // #30 Utf8 "forName"; // #31 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #32 Class #34; // #33 Utf8 "java/lang/ThreadDeath"; // #34 Class #36; // #35 Utf8 "java/lang/Throwable"; // #36 Method #38 #39; // #37 Class #40; // #38 NameAndType #41 #42; // #39 Utf8 "java/lang/String"; // #40 Utf8 "valueOf"; // #41 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #42 InvokeDynamic 1s #24; // #43 Method #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/io/PrintStream"; // #47 Utf8 "println"; // #48 Utf8 "(Ljava/lang/String;)V"; // #49 Method #28 #51; // #50 NameAndType #52 #53; // #51 Utf8 "isInstance"; // #52 Utf8 "(Ljava/lang/Object;)Z"; // #53 InvokeDynamic 2s #24; // #54 InvokeDynamic 3s #24; // #55 InvokeDynamic 4s #24; // #56 Field #58 #59; // #57 Class #60; // #58 NameAndType #61 #62; // #59 Utf8 "java/lang/System"; // #60 Utf8 "out"; // #61 Utf8 "Ljava/io/PrintStream;"; // #62 Method #10 #64; // #63 NameAndType #65 #66; // #64 Utf8 "run"; // #65 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #66 Method #58 #68; // #67 NameAndType #69 #70; // #68 Utf8 "exit"; // #69 Utf8 "(I)V"; // #70 Utf8 "Code"; // #71 Utf8 "LineNumberTable"; // #72 Utf8 "StackMapTable"; // #73 Class #75; // #74 Utf8 "[Ljava/lang/String;"; // #75 Utf8 "main"; // #76 Utf8 "([Ljava/lang/String;)V"; // #77 Utf8 "SourceFile"; // #78 Utf8 "atrcvl00701m1.java"; // #79 Utf8 "BootstrapMethods"; // #80 String #82; // #81 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl007.atrcvl00701m1.\u0001"; // #82 String #84; // #83 Utf8 "Failed with loading exception: \u0001"; // #84 String #86; // #85 Utf8 "Passed with loading exception: \u0001"; // #86 String #88; // #87 Utf8 "Failed with unexpected loading exception: \u0001"; // #88 String #90; // #89 Utf8 "Failed to reject invalid class \u0001"; // #90 MethodHandle 6b #92; // #91 Method #93 #94; // #92 Class #95; // #93 NameAndType #25 #96; // #94 Utf8 "java/lang/invoke/StringConcatFactory"; // #95 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #96 Utf8 "InnerClasses"; // #97 Class #99; // #98 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #99 Class #101; // #100 Utf8 "java/lang/invoke/MethodHandles"; // #101 Utf8 "Lookup"; // #102 } 0x0021; // access #10; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#71) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#72) { // LineNumberTable [] { // line_number_table 0 12; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #65; // name_index #66; // descriptor_index [] { // Attributes Attr(#71) { // Code 4; // max_stack 2; // max_locals Bytes[]{ 0x12 0x07 0x2A 0x2B 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC; 0x12 0x0F 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05; 0x05 0xAC 0x03 0xAC; } [] { // Traps } // end of Traps [] { // Attributes Attr(#72) { // LineNumberTable [] { // line_number_table 0 16; 10 17; 12 18; 24 19; 26 21; } } // end of LineNumberTable ; Attr(#73) { // StackMapTable [] { // 12b; // same_frame 13b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #13; // name_index #14; // descriptor_index [] { // Attributes Attr(#71) { // Code 2; // max_stack 5; // max_locals Bytes[]{ 0x01 0x4E 0x2A 0xBA 0x00 0x17 0x00 0x00 0xB8 0x00 0x1B 0x4E; 0xA7 0x00 0x1A 0x3A 0x04 0x19 0x04 0xBF 0x3A 0x04 0x2C 0x19; 0x04 0xB8 0x00 0x25 0xBA 0x00 0x2B 0x00 0x00 0xB6 0x00 0x2C; 0x05 0xAC 0x03 0xAC } [] { // Traps 2 12 15 33; 2 12 20 35; } // end of Traps [] { // Attributes Attr(#72) { // LineNumberTable [] { // line_number_table 0 26; 2 28; 12 34; 15 29; 17 30; 20 31; 22 32; 36 33; 38 36; } } // end of LineNumberTable ; Attr(#73) { // StackMapTable [] { // 255b, 15, []{O,#38; O,#74; O,#45; O,#28}, []{O,#33}; // full_frame 68b, []z{O,#35}; // same_locals_1_stack_item_frame 17b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #21; // name_index #22; // descriptor_index [] { // Attributes Attr(#71) { // Code 2; // max_stack 6; // max_locals Bytes[]{ 0x01 0x3A 0x04 0x2A 0xBA 0x00 0x17 0x00 0x00 0xB8 0x00 0x1B; 0x3A 0x04 0xA7 0x00 0x33 0x3A 0x05 0x19 0x05 0xBF 0x3A 0x05; 0x2B 0x19 0x05 0xB6 0x00 0x32 0x99 0x00 0x13 0x2D 0x19 0x05; 0xB8 0x00 0x25 0xBA 0x00 0x36 0x00 0x00 0xB6 0x00 0x2C 0x03; 0xAC 0x2D 0x19 0x05 0xB8 0x00 0x25 0xBA 0x00 0x37 0x00 0x00; 0xB6 0x00 0x2C 0x05 0xAC 0x2D 0x2A 0xBA 0x00 0x38 0x00 0x00; 0xB6 0x00 0x2C 0x05 0xAC; } [] { // Traps 3 14 17 33; 3 14 22 35; } // end of Traps [] { // Attributes Attr(#72) { // LineNumberTable [] { // line_number_table 0 41; 3 43; 14 54; 17 44; 19 45; 22 46; 24 47; 33 48; 47 49; 49 51; 63 52; 65 55; 75 56; } } // end of LineNumberTable ; Attr(#73) { // StackMapTable [] { // 255b, 17, []{O,#38; O,#28; O,#74; O,#45; O,#28}, []{O,#33}; // full_frame 68b, []z{O,#35}; // same_locals_1_stack_item_frame 252b, 26, []z{O,#35}; // append_frame 1 250b, 15; // chop_frame 1 } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #76; // name_index #77; // descriptor_index [] { // Attributes Attr(#71) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x39 0xB8 0x00 0x3F 0x10 0x5F 0x60 0xB8 0x00; 0x43 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#72) { // LineNumberTable [] { // line_number_table 0 60; 13 61; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#78) { // SourceFile #79; } // end of SourceFile ; Attr(#80) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #91; // bootstrap_method_ref [] { // bootstrap_arguments #81; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #91; // bootstrap_method_ref [] { // bootstrap_arguments #83; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #91; // bootstrap_method_ref [] { // bootstrap_arguments #85; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #91; // bootstrap_method_ref [] { // bootstrap_arguments #87; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #91; // bootstrap_method_ref [] { // bootstrap_arguments #89; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#97) { // InnerClasses [] { // classes #98 #100 #102 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00701m10p.jcod000066400000000000000000000037371514323636100256550ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00701m1/atrcvl00701m10p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #4; // #1 Class #5; // #2 Field #2 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00701m1/atrcvl00701m10p"; // #5 NameAndType #8 #9; // #6 Utf8 "ConstantValue"; // #7 Utf8 "number"; // #8 Utf8 "I"; // #9 Integer 0x0000007B; // #10 } 0x0001; // access #2; // this_cpx #1; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0009; // access #8; // name_index #9; // descriptor_index [] { // Attributes Attr(#7) { // ConstantValue #10; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00701m11n.jcod000066400000000000000000000041201514323636100256370ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00701m1/atrcvl00701m11n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #4; // #1 Class #5; // #2 Field #2 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00701m1/atrcvl00701m11n"; // #5 NameAndType #8 #9; // #6 Utf8 "ConstantValue"; // #7 Utf8 "number"; // #8 Utf8 "I"; // #9 Integer 0x0000007B; // #10 } 0x0001; // access #2; // this_cpx #1; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0009; // access #8; // name_index #9; // descriptor_index [] { // Attributes Attr(#7) { // ConstantValue // == invalid length of ConstantValue attr: 4 (should be 2) == 0x0000000A; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00702m1.jcod000066400000000000000000000422021514323636100254040ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00702m1/atrcvl00702m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "atrcvl00702m10p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00702m1/atrcvl00702m1"; // #12 Utf8 "loadPositive"; // #13 Utf8 "(Ljava/lang/String;[Ljava/lang/String;Ljava/io/PrintStream;)I"; // #14 String #16; // #15 Utf8 "atrcvl00702m11p"; // #16 String #18; // #17 Utf8 "atrcvl00702m12n"; // #18 Class #20; // #19 Utf8 "java/lang/ClassFormatError"; // #20 Method #10 #22; // #21 NameAndType #23 #24; // #22 Utf8 "loadNegative"; // #23 Utf8 "(Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/String;Ljava/io/PrintStream;)I"; // #24 InvokeDynamic 0s #26; // #25 NameAndType #27 #28; // #26 Utf8 "makeConcatWithConstants"; // #27 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #28 Method #30 #31; // #29 Class #32; // #30 NameAndType #33 #34; // #31 Utf8 "java/lang/Class"; // #32 Utf8 "forName"; // #33 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #34 Class #36; // #35 Utf8 "java/lang/ThreadDeath"; // #36 Class #38; // #37 Utf8 "java/lang/Throwable"; // #38 Method #40 #41; // #39 Class #42; // #40 NameAndType #43 #44; // #41 Utf8 "java/lang/String"; // #42 Utf8 "valueOf"; // #43 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #44 InvokeDynamic 1s #26; // #45 Method #47 #48; // #46 Class #49; // #47 NameAndType #50 #51; // #48 Utf8 "java/io/PrintStream"; // #49 Utf8 "println"; // #50 Utf8 "(Ljava/lang/String;)V"; // #51 Method #30 #53; // #52 NameAndType #54 #55; // #53 Utf8 "isInstance"; // #54 Utf8 "(Ljava/lang/Object;)Z"; // #55 InvokeDynamic 2s #26; // #56 InvokeDynamic 3s #26; // #57 InvokeDynamic 4s #26; // #58 Field #60 #61; // #59 Class #62; // #60 NameAndType #63 #64; // #61 Utf8 "java/lang/System"; // #62 Utf8 "out"; // #63 Utf8 "Ljava/io/PrintStream;"; // #64 Method #10 #66; // #65 NameAndType #67 #68; // #66 Utf8 "run"; // #67 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #68 Method #60 #70; // #69 NameAndType #71 #72; // #70 Utf8 "exit"; // #71 Utf8 "(I)V"; // #72 Utf8 "Code"; // #73 Utf8 "LineNumberTable"; // #74 Utf8 "StackMapTable"; // #75 Class #77; // #76 Utf8 "[Ljava/lang/String;"; // #77 Utf8 "main"; // #78 Utf8 "([Ljava/lang/String;)V"; // #79 Utf8 "SourceFile"; // #80 Utf8 "atrcvl00702m1.java"; // #81 Utf8 "BootstrapMethods"; // #82 String #84; // #83 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl007.atrcvl00702m1.\u0001"; // #84 String #86; // #85 Utf8 "Failed with loading exception: \u0001"; // #86 String #88; // #87 Utf8 "Passed with loading exception: \u0001"; // #88 String #90; // #89 Utf8 "Failed with unexpected loading exception: \u0001"; // #90 String #92; // #91 Utf8 "Failed to reject invalid class \u0001"; // #92 MethodHandle 6b #94; // #93 Method #95 #96; // #94 Class #97; // #95 NameAndType #27 #98; // #96 Utf8 "java/lang/invoke/StringConcatFactory"; // #97 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #98 Utf8 "InnerClasses"; // #99 Class #101; // #100 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #101 Class #103; // #102 Utf8 "java/lang/invoke/MethodHandles"; // #103 Utf8 "Lookup"; // #104 } 0x0021; // access #10; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#73) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#74) { // LineNumberTable [] { // line_number_table 0 12; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #67; // name_index #68; // descriptor_index [] { // Attributes Attr(#73) { // Code 4; // max_stack 2; // max_locals Bytes[]{ 0x12 0x07 0x2A 0x2B 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC; 0x12 0x0F 0x2A 0x2B 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC; 0x12 0x11 0x12 0x13 0x2A 0x2B 0xB8 0x00 0x15 0x99 0x00 0x05; 0x05 0xAC 0x03 0xAC } [] { // Traps } // end of Traps [] { // Attributes Attr(#74) { // LineNumberTable [] { // line_number_table 0 16; 10 17; 12 18; 22 19; 24 20; 36 21; 38 23; } } // end of LineNumberTable ; Attr(#75) { // StackMapTable [] { // 12b; // same_frame 11b; // same_frame 13b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #13; // name_index #14; // descriptor_index [] { // Attributes Attr(#73) { // Code 2; // max_stack 5; // max_locals Bytes[]{ 0x01 0x4E 0x2A 0xBA 0x00 0x19 0x00 0x00 0xB8 0x00 0x1D 0x4E; 0xA7 0x00 0x1A 0x3A 0x04 0x19 0x04 0xBF 0x3A 0x04 0x2C 0x19; 0x04 0xB8 0x00 0x27 0xBA 0x00 0x2D 0x00 0x00 0xB6 0x00 0x2E; 0x05 0xAC 0x03 0xAC } [] { // Traps 2 12 15 35; 2 12 20 37; } // end of Traps [] { // Attributes Attr(#74) { // LineNumberTable [] { // line_number_table 0 28; 2 30; 12 36; 15 31; 17 32; 20 33; 22 34; 36 35; 38 38; } } // end of LineNumberTable ; Attr(#75) { // StackMapTable [] { // 255b, 15, []{O,#40; O,#76; O,#47; O,#30}, []{O,#35}; // full_frame 68b, []z{O,#37}; // same_locals_1_stack_item_frame 17b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #23; // name_index #24; // descriptor_index [] { // Attributes Attr(#73) { // Code 2; // max_stack 6; // max_locals Bytes[]{ 0x01 0x3A 0x04 0x2A 0xBA 0x00 0x19 0x00 0x00 0xB8 0x00 0x1D; 0x3A 0x04 0xA7 0x00 0x33 0x3A 0x05 0x19 0x05 0xBF 0x3A 0x05; 0x2B 0x19 0x05 0xB6 0x00 0x34 0x99 0x00 0x13 0x2D 0x19 0x05; 0xB8 0x00 0x27 0xBA 0x00 0x38 0x00 0x00 0xB6 0x00 0x2E 0x03; 0xAC 0x2D 0x19 0x05 0xB8 0x00 0x27 0xBA 0x00 0x39 0x00 0x00; 0xB6 0x00 0x2E 0x05 0xAC 0x2D 0x2A 0xBA 0x00 0x3A 0x00 0x00; 0xB6 0x00 0x2E 0x05 0xAC; } [] { // Traps 3 14 17 35; 3 14 22 37; } // end of Traps [] { // Attributes Attr(#74) { // LineNumberTable [] { // line_number_table 0 43; 3 45; 14 56; 17 46; 19 47; 22 48; 24 49; 33 50; 47 51; 49 53; 63 54; 65 57; 75 58; } } // end of LineNumberTable ; Attr(#75) { // StackMapTable [] { // 255b, 17, []{O,#40; O,#30; O,#76; O,#47; O,#30}, []{O,#35}; // full_frame 68b, []z{O,#37}; // same_locals_1_stack_item_frame 252b, 26, []z{O,#37}; // append_frame 1 250b, 15; // chop_frame 1 } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #78; // name_index #79; // descriptor_index [] { // Attributes Attr(#73) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x3B 0xB8 0x00 0x41 0x10 0x5F 0x60 0xB8 0x00; 0x45 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#74) { // LineNumberTable [] { // line_number_table 0 62; 13 63; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#80) { // SourceFile #81; } // end of SourceFile ; Attr(#82) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #93; // bootstrap_method_ref [] { // bootstrap_arguments #83; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #93; // bootstrap_method_ref [] { // bootstrap_arguments #85; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #93; // bootstrap_method_ref [] { // bootstrap_arguments #87; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #93; // bootstrap_method_ref [] { // bootstrap_arguments #89; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #93; // bootstrap_method_ref [] { // bootstrap_arguments #91; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#99) { // InnerClasses [] { // classes #100 #102 #104 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00702m10p.jcod000066400000000000000000000037571514323636100256600ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00702m1/atrcvl00702m10p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #4; // #1 Class #5; // #2 Field #2 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00702m1/atrcvl00702m10p"; // #5 NameAndType #8 #9; // #6 Utf8 "constantValue"; // #7 Utf8 "number"; // #8 Utf8 "I"; // #9 Integer 0x0000007B; // #10 } 0x0001; // access #2; // this_cpx #1; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0009; // access #8; // name_index #9; // descriptor_index [] { // Attributes Attr(#7) { // constantValue 0x00 0x00 0x00 0x0A; } // end of constantValue } // end of Attributes } } // end of Fields [] { // Methods } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00702m11p.jcod000066400000000000000000000037611514323636100256540ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00702m1/atrcvl00702m11p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #4; // #1 Class #5; // #2 Field #2 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00702m1/atrcvl00702m11p"; // #5 NameAndType #8 #9; // #6 Utf8 "ConstantValue1"; // #7 Utf8 "number"; // #8 Utf8 "I"; // #9 Integer 0x0000007B; // #10 } 0x0001; // access #2; // this_cpx #1; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0009; // access #8; // name_index #9; // descriptor_index [] { // Attributes Attr(#7) { // ConstantValue1 0x00 0x00 0x00 0x0A; } // end of ConstantValue1 } // end of Attributes } } // end of Fields [] { // Methods } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00702m12n.jcod000066400000000000000000000041201514323636100256410ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00702m1/atrcvl00702m12n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #4; // #1 Class #5; // #2 Field #2 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl007/atrcvl00702m1/atrcvl00702m12n"; // #5 NameAndType #8 #9; // #6 Utf8 "ConstantValue"; // #7 Utf8 "number"; // #8 Utf8 "I"; // #9 Integer 0x0000007B; // #10 } 0x0001; // access #2; // this_cpx #1; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0009; // access #8; // name_index #9; // descriptor_index [] { // Attributes Attr(#7) { // ConstantValue // == invalid length of ConstantValue attr: 4 (should be 2) == 0x0000000A; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00801m1.jcod000066400000000000000000000266111514323636100254120ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl008/atrcvl00801m1/atrcvl00801m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl008.atrcvl00801m1.atrcvl00801m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl008.atrcvl00801m1.atrcvl00801m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00801m1 failed to reject bad classfile atrcvl00801m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl008/atrcvl00801m1/atrcvl00801m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00801m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00801m1 failed to load or instantiate good classfile atrcvl00801m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00801m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00801m1n.jcod000066400000000000000000000064121514323636100255650ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl008/atrcvl00801m1/atrcvl00801m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl008/atrcvl00801m1/atrcvl00801m1n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #0; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00801m1p.jcod000066400000000000000000000064121514323636100255670ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl008/atrcvl00801m1/atrcvl00801m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl008/atrcvl00801m1/atrcvl00801m1p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00802m1.jcod000066400000000000000000000266111514323636100254130ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl008/atrcvl00802m1/atrcvl00802m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl008.atrcvl00802m1.atrcvl00802m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl008.atrcvl00802m1.atrcvl00802m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00802m1 failed to reject bad classfile atrcvl00802m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl008/atrcvl00802m1/atrcvl00802m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00802m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00802m1 failed to load or instantiate good classfile atrcvl00802m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00802m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00802m1n.jcod000066400000000000000000000064131514323636100255670ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl008/atrcvl00802m1/atrcvl00802m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl008/atrcvl00802m1/atrcvl00802m1n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #20; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00802m1p.jcod000066400000000000000000000064121514323636100255700ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl008/atrcvl00802m1/atrcvl00802m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl008/atrcvl00802m1/atrcvl00802m1p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00901m1.jcod000066400000000000000000000266111514323636100254130ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00901m1/atrcvl00901m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00901m1.atrcvl00901m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00901m1.atrcvl00901m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00901m1 failed to reject bad classfile atrcvl00901m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00901m1/atrcvl00901m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00901m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00901m1 failed to load or instantiate good classfile atrcvl00901m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00901m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00901m1n.jcod000066400000000000000000000063301514323636100255650ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00901m1/atrcvl00901m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00901m1/atrcvl00901m1n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #2; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00901m1p.jcod000066400000000000000000000063301514323636100255670ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00901m1/atrcvl00901m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00901m1/atrcvl00901m1p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00902m1.jcod000066400000000000000000000266111514323636100254140ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00902m1/atrcvl00902m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00902m1.atrcvl00902m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00902m1.atrcvl00902m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00902m1 failed to reject bad classfile atrcvl00902m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00902m1/atrcvl00902m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00902m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00902m1 failed to load or instantiate good classfile atrcvl00902m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00902m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00902m1n.jcod000066400000000000000000000067461514323636100256010ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00902m1/atrcvl00902m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00000010; // #1 Class #13; // #2 Class #16; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "I"; // #10 Utf8 "LineNumberTable"; // #11 Utf8 "SourceFile"; // #12 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00902m1/atrcvl00902m1n"; // #13 Utf8 "Test.java"; // #14 Utf8 "i"; // #15 Utf8 "java/lang/Object"; // #16 } 0x0021; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #15; // name_index #10; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #7; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#12) { // SourceFile #14; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00902m1p.jcod000066400000000000000000000067461514323636100256030ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00902m1/atrcvl00902m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00000010; // #1 Class #13; // #2 Class #16; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "I"; // #10 Utf8 "LineNumberTable"; // #11 Utf8 "SourceFile"; // #12 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00902m1/atrcvl00902m1p"; // #13 Utf8 "Test.java"; // #14 Utf8 "i"; // #15 Utf8 "java/lang/Object"; // #16 } 0x0021; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #15; // name_index #10; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#12) { // SourceFile #14; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00903m1.jcod000066400000000000000000000266111514323636100254150ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00903m1/atrcvl00903m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00903m1.atrcvl00903m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00903m1.atrcvl00903m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00903m1 failed to reject bad classfile atrcvl00903m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00903m1/atrcvl00903m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00903m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00903m1 failed to load or instantiate good classfile atrcvl00903m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00903m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00903m1n.jcod000066400000000000000000000067461514323636100256020ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00903m1/atrcvl00903m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00000001; // #1 Class #13; // #2 Class #16; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Z"; // #10 Utf8 "LineNumberTable"; // #11 Utf8 "SourceFile"; // #12 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00903m1/atrcvl00903m1n"; // #13 Utf8 "Test.java"; // #14 Utf8 "i"; // #15 Utf8 "java/lang/Object"; // #16 } 0x0021; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #15; // name_index #10; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #7; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#12) { // SourceFile #14; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00903m1p.jcod000066400000000000000000000067461514323636100256040ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00903m1/atrcvl00903m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00000001; // #1 Class #13; // #2 Class #16; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Z"; // #10 Utf8 "LineNumberTable"; // #11 Utf8 "SourceFile"; // #12 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00903m1/atrcvl00903m1p"; // #13 Utf8 "Test.java"; // #14 Utf8 "i"; // #15 Utf8 "java/lang/Object"; // #16 } 0x0021; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #15; // name_index #10; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#12) { // SourceFile #14; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00904m1.jcod000066400000000000000000000266111514323636100254160ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00904m1/atrcvl00904m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00904m1.atrcvl00904m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00904m1.atrcvl00904m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00904m1 failed to reject bad classfile atrcvl00904m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00904m1/atrcvl00904m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00904m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00904m1 failed to load or instantiate good classfile atrcvl00904m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00904m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00904m1n.jcod000066400000000000000000000067461514323636100256030ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00904m1/atrcvl00904m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00000010; // #1 Class #13; // #2 Class #16; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "S"; // #10 Utf8 "LineNumberTable"; // #11 Utf8 "SourceFile"; // #12 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00904m1/atrcvl00904m1n"; // #13 Utf8 "Test.java"; // #14 Utf8 "i"; // #15 Utf8 "java/lang/Object"; // #16 } 0x0021; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #15; // name_index #10; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #7; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#12) { // SourceFile #14; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00904m1p.jcod000066400000000000000000000067461514323636100256050ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00904m1/atrcvl00904m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00000010; // #1 Class #13; // #2 Class #16; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "S"; // #10 Utf8 "LineNumberTable"; // #11 Utf8 "SourceFile"; // #12 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00904m1/atrcvl00904m1p"; // #13 Utf8 "Test.java"; // #14 Utf8 "i"; // #15 Utf8 "java/lang/Object"; // #16 } 0x0021; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #15; // name_index #10; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#12) { // SourceFile #14; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00905m1.jcod000066400000000000000000000266111514323636100254170ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00905m1/atrcvl00905m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00905m1.atrcvl00905m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00905m1.atrcvl00905m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00905m1 failed to reject bad classfile atrcvl00905m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00905m1/atrcvl00905m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00905m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00905m1 failed to load or instantiate good classfile atrcvl00905m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00905m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00905m1n.jcod000066400000000000000000000067461514323636100256040ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00905m1/atrcvl00905m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Float 0x41200000; // #1 Class #13; // #2 Class #16; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "F"; // #10 Utf8 "LineNumberTable"; // #11 Utf8 "SourceFile"; // #12 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00905m1/atrcvl00905m1n"; // #13 Utf8 "Test.java"; // #14 Utf8 "i"; // #15 Utf8 "java/lang/Object"; // #16 } 0x0021; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #15; // name_index #10; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #7; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#12) { // SourceFile #14; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00905m1p.jcod000066400000000000000000000067461514323636100256060ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00905m1/atrcvl00905m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Float 0x41200000; // #1 Class #13; // #2 Class #16; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "F"; // #10 Utf8 "LineNumberTable"; // #11 Utf8 "SourceFile"; // #12 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00905m1/atrcvl00905m1p"; // #13 Utf8 "Test.java"; // #14 Utf8 "i"; // #15 Utf8 "java/lang/Object"; // #16 } 0x0021; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #15; // name_index #10; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#12) { // SourceFile #14; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00906m1.jcod000066400000000000000000000266111514323636100254200ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00906m1/atrcvl00906m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00906m1.atrcvl00906m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00906m1.atrcvl00906m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00906m1 failed to reject bad classfile atrcvl00906m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00906m1/atrcvl00906m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00906m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00906m1 failed to load or instantiate good classfile atrcvl00906m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00906m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00906m1n.jcod000066400000000000000000000067461514323636100256050ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00906m1/atrcvl00906m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00000010; // #1 Class #13; // #2 Class #16; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "B"; // #10 Utf8 "LineNumberTable"; // #11 Utf8 "SourceFile"; // #12 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00906m1/atrcvl00906m1n"; // #13 Utf8 "Test.java"; // #14 Utf8 "i"; // #15 Utf8 "java/lang/Object"; // #16 } 0x0021; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #15; // name_index #10; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #7; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#12) { // SourceFile #14; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00906m1p.jcod000066400000000000000000000067461514323636100256070ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00906m1/atrcvl00906m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00000010; // #1 Class #13; // #2 Class #16; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "B"; // #10 Utf8 "LineNumberTable"; // #11 Utf8 "SourceFile"; // #12 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00906m1/atrcvl00906m1p"; // #13 Utf8 "Test.java"; // #14 Utf8 "i"; // #15 Utf8 "java/lang/Object"; // #16 } 0x0021; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #15; // name_index #10; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#12) { // SourceFile #14; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00907m1.jcod000066400000000000000000000266111514323636100254210ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00907m1/atrcvl00907m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00907m1.atrcvl00907m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00907m1.atrcvl00907m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00907m1 failed to reject bad classfile atrcvl00907m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00907m1/atrcvl00907m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00907m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00907m1 failed to load or instantiate good classfile atrcvl00907m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00907m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00907m1n.jcod000066400000000000000000000067471514323636100256070ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00907m1/atrcvl00907m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #14; // #1 Class #17; // #2 Method #2 #6; // #3 Long 0x000000000000000A;; // #4 NameAndType #8 #7; // #6 Utf8 "()V"; // #7 Utf8 ""; // #8 Utf8 "Code"; // #9 Utf8 "ConstantValue"; // #10 Utf8 "J"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "SourceFile"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00907m1/atrcvl00907m1n"; // #14 Utf8 "Test.java"; // #15 Utf8 "i"; // #16 Utf8 "java/lang/Object"; // #17 } 0x0021; // access #1; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #16; // name_index #11; // descriptor_index [] { // Attributes Attr(#10) { // ConstantValue #7; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #8; // name_index #7; // descriptor_index [] { // Attributes Attr(#9) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x03 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#12) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#13) { // SourceFile #15; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00907m1p.jcod000066400000000000000000000067471514323636100256110ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00907m1/atrcvl00907m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #14; // #1 Class #17; // #2 Method #2 #6; // #3 Long 0x000000000000000A;; // #4 NameAndType #8 #7; // #6 Utf8 "()V"; // #7 Utf8 ""; // #8 Utf8 "Code"; // #9 Utf8 "ConstantValue"; // #10 Utf8 "J"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "SourceFile"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00907m1/atrcvl00907m1p"; // #14 Utf8 "Test.java"; // #15 Utf8 "i"; // #16 Utf8 "java/lang/Object"; // #17 } 0x0021; // access #1; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #16; // name_index #11; // descriptor_index [] { // Attributes Attr(#10) { // ConstantValue #4; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #8; // name_index #7; // descriptor_index [] { // Attributes Attr(#9) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x03 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#12) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#13) { // SourceFile #15; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00908m1.jcod000066400000000000000000000266111514323636100254220ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00908m1/atrcvl00908m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00908m1.atrcvl00908m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00908m1.atrcvl00908m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00908m1 failed to reject bad classfile atrcvl00908m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00908m1/atrcvl00908m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00908m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00908m1 failed to load or instantiate good classfile atrcvl00908m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00908m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00908m1n.jcod000066400000000000000000000067471514323636100256100ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00908m1/atrcvl00908m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #14; // #1 Class #17; // #2 Method #2 #6; // #3 Double 0x4024000000000000;; // #4 NameAndType #8 #7; // #6 Utf8 "()V"; // #7 Utf8 ""; // #8 Utf8 "Code"; // #9 Utf8 "ConstantValue"; // #10 Utf8 "D"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "SourceFile"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00908m1/atrcvl00908m1n"; // #14 Utf8 "Test.java"; // #15 Utf8 "i"; // #16 Utf8 "java/lang/Object"; // #17 } 0x0021; // access #1; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #16; // name_index #11; // descriptor_index [] { // Attributes Attr(#10) { // ConstantValue #7; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #8; // name_index #7; // descriptor_index [] { // Attributes Attr(#9) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x03 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#12) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#13) { // SourceFile #15; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00908m1p.jcod000066400000000000000000000067471514323636100256120ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00908m1/atrcvl00908m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #14; // #1 Class #17; // #2 Method #2 #6; // #3 Double 0x4024000000000000;; // #4 NameAndType #8 #7; // #6 Utf8 "()V"; // #7 Utf8 ""; // #8 Utf8 "Code"; // #9 Utf8 "ConstantValue"; // #10 Utf8 "D"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "SourceFile"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00908m1/atrcvl00908m1p"; // #14 Utf8 "Test.java"; // #15 Utf8 "i"; // #16 Utf8 "java/lang/Object"; // #17 } 0x0021; // access #1; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #16; // name_index #11; // descriptor_index [] { // Attributes Attr(#10) { // ConstantValue #4; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #8; // name_index #7; // descriptor_index [] { // Attributes Attr(#9) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x03 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#12) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#13) { // SourceFile #15; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00909m1.jcod000066400000000000000000000266111514323636100254230ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00909m1/atrcvl00909m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00909m1.atrcvl00909m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl009.atrcvl00909m1.atrcvl00909m1n"; // #38 String #40; // #39 Utf8 "test atrcvl00909m1 failed to reject bad classfile atrcvl00909m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00909m1/atrcvl00909m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl00909m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl00909m1 failed to load or instantiate good classfile atrcvl00909m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl00909m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00909m1n.jcod000066400000000000000000000113431514323636100255750ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00909m1/atrcvl00909m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #14; // #1 Class #17; // #2 Method #2 #5; // #3 Field #1 #6; // #4 NameAndType #9 #7; // #5 NameAndType #16 #12; // #6 Utf8 "()V"; // #7 Utf8 ""; // #8 Utf8 ""; // #9 Utf8 "Code"; // #10 Utf8 "LineNumberTable"; // #11 Utf8 "Ljava/lang/Object;"; // #12 Utf8 "SourceFile"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00909m1/atrcvl00909m1n"; // #14 Utf8 "Test.java"; // #15 Utf8 "i"; // #16 Utf8 "java/lang/Object"; // #17 Utf8 "ConstantValue"; // #18 } 0x0021; // access #1; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #16; // name_index #12; // descriptor_index [] { // Attributes Attr(#18) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0008; // access #8; // name_index #7; // descriptor_index [] { // Attributes Attr(#10) { // Code 2; // max_stack 0; // max_locals Bytes[]{ 0xBB 0x00 0x02 0x59 0xB7 0x00 0x03 0xB3 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 3; 10 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0001; // access #9; // name_index #7; // descriptor_index [] { // Attributes Attr(#10) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x03 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#13) { // SourceFile #15; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl00909m1p.jcod000066400000000000000000000111261514323636100255760ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00909m1/atrcvl00909m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #14; // #1 Class #17; // #2 Method #2 #5; // #3 Field #1 #6; // #4 NameAndType #9 #7; // #5 NameAndType #16 #12; // #6 Utf8 "()V"; // #7 Utf8 ""; // #8 Utf8 ""; // #9 Utf8 "Code"; // #10 Utf8 "LineNumberTable"; // #11 Utf8 "Ljava/lang/Object;"; // #12 Utf8 "SourceFile"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl009/atrcvl00909m1/atrcvl00909m1p"; // #14 Utf8 "Test.java"; // #15 Utf8 "i"; // #16 Utf8 "java/lang/Object"; // #17 Utf8 "ConstantValue"; // #18 } 0x0021; // access #1; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #16; // name_index #12; // descriptor_index [] { // Attributes } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0008; // access #8; // name_index #7; // descriptor_index [] { // Attributes Attr(#10) { // Code 2; // max_stack 0; // max_locals Bytes[]{ 0xBB 0x00 0x02 0x59 0xB7 0x00 0x03 0xB3 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 3; 10 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0001; // access #9; // name_index #7; // descriptor_index [] { // Attributes Attr(#10) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x03 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#11) { // LineNumberTable [] { // line_number_table 0 2; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#13) { // SourceFile #15; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01001m1.jcod000066400000000000000000000266111514323636100254030ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01001m1/atrcvl01001m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl010.atrcvl01001m1.atrcvl01001m1p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/Class"; // #12 Utf8 "forName"; // #13 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #14 Method #10 #16; // #15 NameAndType #17 #18; // #16 Utf8 "newInstance"; // #17 Utf8 "()Ljava/lang/Object;"; // #18 Class #20; // #19 Utf8 "java/lang/Throwable"; // #20 Method #22 #23; // #21 Class #24; // #22 NameAndType #25 #26; // #23 Utf8 "java/lang/String"; // #24 Utf8 "valueOf"; // #25 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #26 InvokeDynamic 0s #28; // #27 NameAndType #29 #30; // #28 Utf8 "makeConcatWithConstants"; // #29 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #30 Method #32 #33; // #31 Class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/io/PrintStream"; // #34 Utf8 "println"; // #35 Utf8 "(Ljava/lang/String;)V"; // #36 String #38; // #37 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl010.atrcvl01001m1.atrcvl01001m1n"; // #38 String #40; // #39 Utf8 "test atrcvl01001m1 failed to reject bad classfile atrcvl01001m1n"; // #40 Class #42; // #41 Utf8 "java/lang/ClassFormatError"; // #42 InvokeDynamic 1s #28; // #43 Field #45 #46; // #44 Class #47; // #45 NameAndType #48 #49; // #46 Utf8 "java/lang/System"; // #47 Utf8 "out"; // #48 Utf8 "Ljava/io/PrintStream;"; // #49 Method #51 #52; // #50 Class #53; // #51 NameAndType #54 #55; // #52 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01001m1/atrcvl01001m1"; // #53 Utf8 "run"; // #54 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #55 Method #45 #57; // #56 NameAndType #58 #59; // #57 Utf8 "exit"; // #58 Utf8 "(I)V"; // #59 Utf8 "Code"; // #60 Utf8 "LineNumberTable"; // #61 Utf8 "StackMapTable"; // #62 Utf8 "main"; // #63 Utf8 "([Ljava/lang/String;)V"; // #64 Utf8 "SourceFile"; // #65 Utf8 "atrcvl01001m1.java"; // #66 Utf8 "BootstrapMethods"; // #67 String #69; // #68 Utf8 "test atrcvl01001m1 failed to load or instantiate good classfile atrcvl01001m1p: \u0001"; // #69 String #71; // #70 Utf8 "test atrcvl01001m1 failed with unexpected loading exception: \u0001"; // #71 MethodHandle 6b #73; // #72 Method #74 #75; // #73 Class #76; // #74 NameAndType #29 #77; // #75 Utf8 "java/lang/invoke/StringConcatFactory"; // #76 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #77 Utf8 "InnerClasses"; // #78 Class #80; // #79 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #80 Class #82; // #81 Utf8 "java/lang/invoke/MethodHandles"; // #82 Utf8 "Lookup"; // #83 } 0x0021; // access #51; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#60) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 11; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 4; // max_locals Bytes[]{ 0x12 0x07 0xB8 0x00 0x09 0x4D 0x2C 0xB6 0x00 0x0F 0x4E 0xA7; 0x00 0x13 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x1B 0x00; 0x00 0xB6 0x00 0x1F 0x05 0xAC 0x12 0x25 0xB8 0x00 0x09 0x4D; 0x2B 0x12 0x27 0xB6 0x00 0x1F 0x05 0xAC 0x4D 0xA7 0x00 0x13; 0x4D 0x2B 0x2C 0xB8 0x00 0x15 0xBA 0x00 0x2B 0x00 0x00 0xB6; 0x00 0x1F 0x05 0xAC 0x03 0xAC; } [] { // Traps 0 11 14 19; 30 43 44 41; 30 43 48 19; } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 16; 6 17; 11 21; 14 18; 15 19; 28 20; 30 24; 36 25; 42 26; 44 27; 45 32; 48 29; 49 30; 62 31; 64 34; } } // end of LineNumberTable ; Attr(#62) { // StackMapTable [] { // 78b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame 77b, []z{O,#41}; // same_locals_1_stack_item_frame 67b, []z{O,#19}; // same_locals_1_stack_item_frame 15b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #63; // name_index #64; // descriptor_index [] { // Attributes Attr(#60) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0x2C 0xB8 0x00 0x32 0x10 0x5F 0x60 0xB8 0x00; 0x38 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#61) { // LineNumberTable [] { // line_number_table 0 38; 13 39; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#65) { // SourceFile #66; } // end of SourceFile ; Attr(#67) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #68; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #72; // bootstrap_method_ref [] { // bootstrap_arguments #70; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#78) { // InnerClasses [] { // classes #79 #81 #83 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01001m1n.jcod000066400000000000000000000064121514323636100255560ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01001m1/atrcvl01001m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Float 0x40490FD8; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01001m1/atrcvl01001m1n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01001m1p.jcod000066400000000000000000000064121514323636100255600ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01001m1/atrcvl01001m1p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01001m1/atrcvl01001m1p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #1; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m1.jcod000066400000000000000000001037071514323636100254060ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m1 { 0xCAFEBABE; 0; // minor version 67; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "atrcvl01002m10p"; // #8 Method #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m1"; // #12 Utf8 "loadPositive"; // #13 Utf8 "(Ljava/lang/String;[Ljava/lang/String;Ljava/io/PrintStream;)I"; // #14 String #16; // #15 Utf8 "atrcvl01002m11n"; // #16 Class #18; // #17 Utf8 "java/lang/ClassFormatError"; // #18 Method #10 #20; // #19 NameAndType #21 #22; // #20 Utf8 "loadNegative"; // #21 Utf8 "(Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/String;Ljava/io/PrintStream;)I"; // #22 String #24; // #23 Utf8 "atrcvl01002m12n"; // #24 String #26; // #25 Utf8 "atrcvl01002m13n"; // #26 String #28; // #27 Utf8 "atrcvl01002m14n"; // #28 String #30; // #29 Utf8 "atrcvl01002m15p"; // #30 String #32; // #31 Utf8 "atrcvl01002m16n"; // #32 String #34; // #33 Utf8 "atrcvl01002m17n"; // #34 String #36; // #35 Utf8 "atrcvl01002m18n"; // #36 String #38; // #37 Utf8 "atrcvl01002m19n"; // #38 String #40; // #39 Utf8 "atrcvl01002m110p"; // #40 String #42; // #41 Utf8 "atrcvl01002m111n"; // #42 String #44; // #43 Utf8 "atrcvl01002m112n"; // #44 String #46; // #45 Utf8 "atrcvl01002m113n"; // #46 String #48; // #47 Utf8 "atrcvl01002m114n"; // #48 String #50; // #49 Utf8 "atrcvl01002m115p"; // #50 String #52; // #51 Utf8 "atrcvl01002m116n"; // #52 String #54; // #53 Utf8 "atrcvl01002m117n"; // #54 String #56; // #55 Utf8 "atrcvl01002m118n"; // #56 String #58; // #57 Utf8 "atrcvl01002m119n"; // #58 String #60; // #59 Utf8 "atrcvl01002m120p"; // #60 String #62; // #61 Utf8 "atrcvl01002m121n"; // #62 String #64; // #63 Utf8 "atrcvl01002m122n"; // #64 String #66; // #65 Utf8 "atrcvl01002m123n"; // #66 String #68; // #67 Utf8 "atrcvl01002m124n"; // #68 String #70; // #69 Utf8 "atrcvl01002m125n"; // #70 String #72; // #71 Utf8 "atrcvl01002m126n"; // #72 String #74; // #73 Utf8 "atrcvl01002m127n"; // #74 String #76; // #75 Utf8 "atrcvl01002m128n"; // #76 String #78; // #77 Utf8 "atrcvl01002m129n"; // #78 String #80; // #79 Utf8 "atrcvl01002m130p"; // #80 String #82; // #81 Utf8 "atrcvl01002m131n"; // #82 String #84; // #83 Utf8 "atrcvl01002m132n"; // #84 String #86; // #85 Utf8 "atrcvl01002m133n"; // #86 String #88; // #87 Utf8 "atrcvl01002m134n"; // #88 String #90; // #89 Utf8 "atrcvl01002m135n"; // #90 String #92; // #91 Utf8 "atrcvl01002m136n"; // #92 String #94; // #93 Utf8 "atrcvl01002m137n"; // #94 String #96; // #95 Utf8 "atrcvl01002m138n"; // #96 String #98; // #97 Utf8 "atrcvl01002m139n"; // #98 String #100; // #99 Utf8 "atrcvl01002m140p"; // #100 String #102; // #101 Utf8 "atrcvl01002m141n"; // #102 String #104; // #103 Utf8 "atrcvl01002m142n"; // #104 String #106; // #105 Utf8 "atrcvl01002m143n"; // #106 String #108; // #107 Utf8 "atrcvl01002m144n"; // #108 String #110; // #109 Utf8 "atrcvl01002m145n"; // #110 String #112; // #111 Utf8 "atrcvl01002m146n"; // #112 String #114; // #113 Utf8 "atrcvl01002m147n"; // #114 String #116; // #115 Utf8 "atrcvl01002m148n"; // #116 String #118; // #117 Utf8 "atrcvl01002m149n"; // #118 String #120; // #119 Utf8 "atrcvl01002m150p"; // #120 String #122; // #121 Utf8 "atrcvl01002m151n"; // #122 String #124; // #123 Utf8 "atrcvl01002m152n"; // #124 String #126; // #125 Utf8 "atrcvl01002m153n"; // #126 String #128; // #127 Utf8 "atrcvl01002m154n"; // #128 String #130; // #129 Utf8 "atrcvl01002m155n"; // #130 String #132; // #131 Utf8 "atrcvl01002m156n"; // #132 String #134; // #133 Utf8 "atrcvl01002m157n"; // #134 String #136; // #135 Utf8 "atrcvl01002m158n"; // #136 String #138; // #137 Utf8 "atrcvl01002m159n"; // #138 String #140; // #139 Utf8 "atrcvl01002m160p"; // #140 InvokeDynamic 0s #142; // #141 NameAndType #143 #144; // #142 Utf8 "makeConcatWithConstants"; // #143 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #144 Method #146 #147; // #145 Class #148; // #146 NameAndType #149 #150; // #147 Utf8 "java/lang/Class"; // #148 Utf8 "forName"; // #149 Utf8 "(Ljava/lang/String;)Ljava/lang/Class;"; // #150 Class #152; // #151 Utf8 "java/lang/ThreadDeath"; // #152 Class #154; // #153 Utf8 "java/lang/Throwable"; // #154 Method #156 #157; // #155 Class #158; // #156 NameAndType #159 #160; // #157 Utf8 "java/lang/String"; // #158 Utf8 "valueOf"; // #159 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #160 InvokeDynamic 1s #142; // #161 Method #163 #164; // #162 Class #165; // #163 NameAndType #166 #167; // #164 Utf8 "java/io/PrintStream"; // #165 Utf8 "println"; // #166 Utf8 "(Ljava/lang/String;)V"; // #167 Method #146 #169; // #168 NameAndType #170 #171; // #169 Utf8 "isInstance"; // #170 Utf8 "(Ljava/lang/Object;)Z"; // #171 InvokeDynamic 2s #142; // #172 InvokeDynamic 3s #142; // #173 InvokeDynamic 4s #142; // #174 Field #176 #177; // #175 Class #178; // #176 NameAndType #179 #180; // #177 Utf8 "java/lang/System"; // #178 Utf8 "out"; // #179 Utf8 "Ljava/io/PrintStream;"; // #180 Method #10 #182; // #181 NameAndType #183 #184; // #182 Utf8 "run"; // #183 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #184 Method #176 #186; // #185 NameAndType #187 #188; // #186 Utf8 "exit"; // #187 Utf8 "(I)V"; // #188 Utf8 "Code"; // #189 Utf8 "LineNumberTable"; // #190 Utf8 "StackMapTable"; // #191 Class #193; // #192 Utf8 "[Ljava/lang/String;"; // #193 Utf8 "main"; // #194 Utf8 "([Ljava/lang/String;)V"; // #195 Utf8 "SourceFile"; // #196 Utf8 "atrcvl01002m1.java"; // #197 Utf8 "BootstrapMethods"; // #198 String #200; // #199 Utf8 "javasoft.sqe.tests.vm.classfmt.atr.atrcvl010.atrcvl01002m1.\u0001"; // #200 String #202; // #201 Utf8 "Failed with loading exception: \u0001"; // #202 String #204; // #203 Utf8 "Passed with loading exception: \u0001"; // #204 String #206; // #205 Utf8 "Failed with unexpected loading exception: \u0001"; // #206 String #208; // #207 Utf8 "Failed to reject invalid class \u0001"; // #208 MethodHandle 6b #210; // #209 Method #211 #212; // #210 Class #213; // #211 NameAndType #143 #214; // #212 Utf8 "java/lang/invoke/StringConcatFactory"; // #213 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #214 Utf8 "InnerClasses"; // #215 Class #217; // #216 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #217 Class #219; // #218 Utf8 "java/lang/invoke/MethodHandles"; // #219 Utf8 "Lookup"; // #220 } 0x0021; // access #10; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#189) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#190) { // LineNumberTable [] { // line_number_table 0 12; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #183; // name_index #184; // descriptor_index [] { // Attributes Attr(#189) { // Code 4; // max_stack 2; // max_locals Bytes[]{ 0x12 0x07 0x2A 0x2B 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC; 0x12 0x0F 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05; 0x05 0xAC 0x12 0x17 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99; 0x00 0x05 0x05 0xAC 0x12 0x19 0x12 0x11 0x2A 0x2B 0xB8 0x00; 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x1B 0x12 0x11 0x2A 0x2B; 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x1D 0x2A 0x2B; 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC 0x12 0x1F 0x12 0x11; 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x21; 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC; 0x12 0x23 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05; 0x05 0xAC 0x12 0x25 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99; 0x00 0x05 0x05 0xAC 0x12 0x27 0x2A 0x2B 0xB8 0x00 0x09 0x99; 0x00 0x05 0x05 0xAC 0x12 0x29 0x12 0x11 0x2A 0x2B 0xB8 0x00; 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x2B 0x12 0x11 0x2A 0x2B; 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x2D 0x12 0x11; 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x2F; 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC; 0x12 0x31 0x2A 0x2B 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC; 0x12 0x33 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05; 0x05 0xAC 0x12 0x35 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99; 0x00 0x05 0x05 0xAC 0x12 0x37 0x12 0x11 0x2A 0x2B 0xB8 0x00; 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x39 0x12 0x11 0x2A 0x2B; 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x3B 0x2A 0x2B; 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC 0x12 0x3D 0x12 0x11; 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x3F; 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC; 0x12 0x41 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05; 0x05 0xAC 0x12 0x43 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99; 0x00 0x05 0x05 0xAC 0x12 0x45 0x12 0x11 0x2A 0x2B 0xB8 0x00; 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x47 0x12 0x11 0x2A 0x2B; 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x49 0x12 0x11; 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x4B; 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC; 0x12 0x4D 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05; 0x05 0xAC 0x12 0x4F 0x2A 0x2B 0xB8 0x00 0x09 0x99 0x00 0x05; 0x05 0xAC 0x12 0x51 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99; 0x00 0x05 0x05 0xAC 0x12 0x53 0x12 0x11 0x2A 0x2B 0xB8 0x00; 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x55 0x12 0x11 0x2A 0x2B; 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x57 0x12 0x11; 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x59; 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC; 0x12 0x5B 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05; 0x05 0xAC 0x12 0x5D 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99; 0x00 0x05 0x05 0xAC 0x12 0x5F 0x12 0x11 0x2A 0x2B 0xB8 0x00; 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x61 0x12 0x11 0x2A 0x2B; 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x63 0x2A 0x2B; 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC 0x12 0x65 0x12 0x11; 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x67; 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC; 0x12 0x69 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05; 0x05 0xAC 0x12 0x6B 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99; 0x00 0x05 0x05 0xAC 0x12 0x6D 0x12 0x11 0x2A 0x2B 0xB8 0x00; 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x6F 0x12 0x11 0x2A 0x2B; 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x71 0x12 0x11; 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x73; 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC; 0x12 0x75 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05; 0x05 0xAC 0x12 0x77 0x2A 0x2B 0xB8 0x00 0x09 0x99 0x00 0x05; 0x05 0xAC 0x12 0x79 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99; 0x00 0x05 0x05 0xAC 0x12 0x7B 0x12 0x11 0x2A 0x2B 0xB8 0x00; 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x7D 0x12 0x11 0x2A 0x2B; 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x7F 0x12 0x11; 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x81; 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC; 0x12 0x83 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99 0x00 0x05; 0x05 0xAC 0x12 0x85 0x12 0x11 0x2A 0x2B 0xB8 0x00 0x13 0x99; 0x00 0x05 0x05 0xAC 0x12 0x87 0x12 0x11 0x2A 0x2B 0xB8 0x00; 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x89 0x12 0x11 0x2A 0x2B; 0xB8 0x00 0x13 0x99 0x00 0x05 0x05 0xAC 0x12 0x8B 0x2A 0x2B; 0xB8 0x00 0x09 0x99 0x00 0x05 0x05 0xAC 0x03 0xAC; } [] { // Traps } // end of Traps [] { // Attributes Attr(#190) { // LineNumberTable [] { // line_number_table 0 16; 10 17; 12 18; 24 19; 26 20; 38 21; 40 22; 52 23; 54 24; 66 25; 68 26; 78 27; 80 28; 92 29; 94 30; 106 31; 108 32; 120 33; 122 34; 134 35; 136 36; 146 37; 148 38; 160 39; 162 40; 174 41; 176 42; 188 43; 190 44; 202 45; 204 46; 214 47; 216 48; 228 49; 230 50; 242 51; 244 52; 256 53; 258 54; 270 55; 272 56; 282 57; 284 58; 296 59; 298 60; 310 61; 312 62; 324 63; 326 64; 338 65; 340 66; 352 67; 354 68; 366 69; 368 70; 380 71; 382 72; 394 73; 396 74; 408 75; 410 76; 420 77; 422 78; 434 79; 436 80; 448 81; 450 82; 462 83; 464 84; 476 85; 478 86; 490 87; 492 88; 504 89; 506 90; 518 91; 520 92; 532 93; 534 94; 546 95; 548 96; 558 97; 560 98; 572 99; 574 100; 586 101; 588 102; 600 103; 602 104; 614 105; 616 106; 628 107; 630 108; 642 109; 644 110; 656 111; 658 112; 670 113; 672 114; 684 115; 686 116; 696 117; 698 118; 710 119; 712 120; 724 121; 726 122; 738 123; 740 124; 752 125; 754 126; 766 127; 768 128; 780 129; 782 130; 794 131; 796 132; 808 133; 810 134; 822 135; 824 136; 834 137; 836 139; } } // end of LineNumberTable ; Attr(#191) { // StackMapTable [] { // 12b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 11b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 11b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 11b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 11b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 11b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 11b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 11b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 13b; // same_frame 11b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #13; // name_index #14; // descriptor_index [] { // Attributes Attr(#189) { // Code 2; // max_stack 5; // max_locals Bytes[]{ 0x01 0x4E 0x2A 0xBA 0x00 0x8D 0x00 0x00 0xB8 0x00 0x91 0x4E; 0xA7 0x00 0x1A 0x3A 0x04 0x19 0x04 0xBF 0x3A 0x04 0x2C 0x19; 0x04 0xB8 0x00 0x9B 0xBA 0x00 0xA1 0x00 0x00 0xB6 0x00 0xA2; 0x05 0xAC 0x03 0xAC } [] { // Traps 2 12 15 151; 2 12 20 153; } // end of Traps [] { // Attributes Attr(#190) { // LineNumberTable [] { // line_number_table 0 144; 2 146; 12 152; 15 147; 17 148; 20 149; 22 150; 36 151; 38 154; } } // end of LineNumberTable ; Attr(#191) { // StackMapTable [] { // 255b, 15, []{O,#156; O,#192; O,#163; O,#146}, []{O,#151}; // full_frame 68b, []z{O,#153}; // same_locals_1_stack_item_frame 17b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #21; // name_index #22; // descriptor_index [] { // Attributes Attr(#189) { // Code 2; // max_stack 6; // max_locals Bytes[]{ 0x01 0x3A 0x04 0x2A 0xBA 0x00 0x8D 0x00 0x00 0xB8 0x00 0x91; 0x3A 0x04 0xA7 0x00 0x33 0x3A 0x05 0x19 0x05 0xBF 0x3A 0x05; 0x2B 0x19 0x05 0xB6 0x00 0xA8 0x99 0x00 0x13 0x2D 0x19 0x05; 0xB8 0x00 0x9B 0xBA 0x00 0xAC 0x00 0x00 0xB6 0x00 0xA2 0x03; 0xAC 0x2D 0x19 0x05 0xB8 0x00 0x9B 0xBA 0x00 0xAD 0x00 0x00; 0xB6 0x00 0xA2 0x05 0xAC 0x2D 0x2A 0xBA 0x00 0xAE 0x00 0x00; 0xB6 0x00 0xA2 0x05 0xAC; } [] { // Traps 3 14 17 151; 3 14 22 153; } // end of Traps [] { // Attributes Attr(#190) { // LineNumberTable [] { // line_number_table 0 159; 3 161; 14 172; 17 162; 19 163; 22 164; 24 165; 33 166; 47 167; 49 169; 63 170; 65 173; 75 174; } } // end of LineNumberTable ; Attr(#191) { // StackMapTable [] { // 255b, 17, []{O,#156; O,#146; O,#192; O,#163; O,#146}, []{O,#151}; // full_frame 68b, []z{O,#153}; // same_locals_1_stack_item_frame 252b, 26, []z{O,#153}; // append_frame 1 250b, 15; // chop_frame 1 } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #194; // name_index #195; // descriptor_index [] { // Attributes Attr(#189) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB2 0x00 0xAF 0xB8 0x00 0xB5 0x10 0x5F 0x60 0xB8 0x00; 0xB9 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#190) { // LineNumberTable [] { // line_number_table 0 178; 13 179; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#196) { // SourceFile #197; } // end of SourceFile ; Attr(#198) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #209; // bootstrap_method_ref [] { // bootstrap_arguments #199; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #209; // bootstrap_method_ref [] { // bootstrap_arguments #201; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #209; // bootstrap_method_ref [] { // bootstrap_arguments #203; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #209; // bootstrap_method_ref [] { // bootstrap_arguments #205; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #209; // bootstrap_method_ref [] { // bootstrap_arguments #207; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#215) { // InnerClasses [] { // classes #216 #218 #220 25; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m10p.jcod000066400000000000000000000065611514323636100256460ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m10p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m10p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m110p.jcod000066400000000000000000000065631514323636100257310ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m110p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "C"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m110p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m111n.jcod000066400000000000000000000065631514323636100257300ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m111n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "J"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m111n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m112n.jcod000066400000000000000000000065631514323636100257310ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m112n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "F"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m112n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m113n.jcod000066400000000000000000000065631514323636100257320ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m113n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "D"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m113n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m114n.jcod000066400000000000000000000065631514323636100257330ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m114n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Ljava/lang/String;"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m114n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m115p.jcod000066400000000000000000000065631514323636100257360ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m115p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "B"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m115p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000000; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m116n.jcod000066400000000000000000000065631514323636100257350ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m116n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "J"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m116n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000000; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m117n.jcod000066400000000000000000000065631514323636100257360ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m117n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "F"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m117n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000000; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m118n.jcod000066400000000000000000000065631514323636100257370ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m118n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "D"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m118n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000000; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m119n.jcod000066400000000000000000000065631514323636100257400ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m119n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Ljava/lang/String;"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m119n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000000; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m11n.jcod000066400000000000000000000065611514323636100256450ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m11n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "J"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m11n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m120p.jcod000066400000000000000000000065631514323636100257320ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m120p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Z"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m120p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m121n.jcod000066400000000000000000000065631514323636100257310ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m121n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "J"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m121n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m122n.jcod000066400000000000000000000065631514323636100257320ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m122n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "F"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m122n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m123n.jcod000066400000000000000000000065631514323636100257330ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m123n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "D"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m123n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m124n.jcod000066400000000000000000000065631514323636100257340ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m124n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Ljava/lang/String;"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m124n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m125n.jcod000066400000000000000000000065631514323636100257350ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m125n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m125n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Long 0x0000000000000005;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m126n.jcod000066400000000000000000000065631514323636100257360ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m126n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "S"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m126n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Long 0x0000000000000005;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m127n.jcod000066400000000000000000000065631514323636100257370ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m127n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "C"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m127n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Long 0x0000000000000005;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m128n.jcod000066400000000000000000000065631514323636100257400ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m128n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "B"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m128n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Long 0x0000000000000005;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m129n.jcod000066400000000000000000000065631514323636100257410ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m129n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Z"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m129n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Long 0x0000000000000005;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m12n.jcod000066400000000000000000000065611514323636100256460ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m12n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "F"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m12n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m130p.jcod000066400000000000000000000065631514323636100257330ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m130p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "J"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m130p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Long 0x0000000000000005;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m131n.jcod000066400000000000000000000065631514323636100257320ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m131n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "F"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m131n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Long 0x0000000000000005;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m132n.jcod000066400000000000000000000065631514323636100257330ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m132n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "D"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m132n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Long 0x0000000000000005;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m133n.jcod000066400000000000000000000065631514323636100257340ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m133n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Ljava/lang/String;"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m133n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Long 0x0000000000000005;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m134n.jcod000066400000000000000000000065631514323636100257350ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m134n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m134n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Float 0x00000006; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m135n.jcod000066400000000000000000000065631514323636100257360ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m135n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "S"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m135n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Float 0x00000006; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m136n.jcod000066400000000000000000000065631514323636100257370ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m136n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "C"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m136n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Float 0x00000006; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m137n.jcod000066400000000000000000000065631514323636100257400ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m137n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "B"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m137n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Float 0x00000006; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m138n.jcod000066400000000000000000000065631514323636100257410ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m138n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Z"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m138n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Float 0x00000006; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m139n.jcod000066400000000000000000000065631514323636100257420ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m139n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "J"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m139n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Float 0x00000006; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m13n.jcod000066400000000000000000000065611514323636100256470ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m13n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "D"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m13n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m140p.jcod000066400000000000000000000065631514323636100257340ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m140p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "F"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m140p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Float 0x00000006; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m141n.jcod000066400000000000000000000065631514323636100257330ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m141n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "D"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m141n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Float 0x00000006; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m142n.jcod000066400000000000000000000065631514323636100257340ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m142n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Ljava/lang/String;"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m142n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Float 0x00000006; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m143n.jcod000066400000000000000000000065631514323636100257350ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m143n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m143n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Double 0x0000000000000007;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m144n.jcod000066400000000000000000000065631514323636100257360ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m144n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "S"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m144n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Double 0x0000000000000007;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m145n.jcod000066400000000000000000000065631514323636100257370ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m145n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "C"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m145n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Double 0x0000000000000007;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m146n.jcod000066400000000000000000000065631514323636100257400ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m146n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "B"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m146n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Double 0x0000000000000007;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m147n.jcod000066400000000000000000000065631514323636100257410ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m147n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Z"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m147n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Double 0x0000000000000007;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m148n.jcod000066400000000000000000000065631514323636100257420ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m148n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "J"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m148n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Double 0x0000000000000007;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m149n.jcod000066400000000000000000000065631514323636100257430ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m149n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "F"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m149n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Double 0x0000000000000007;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m14n.jcod000066400000000000000000000065611514323636100256500ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m14n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Ljava/lang/String;"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m14n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000001; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m150p.jcod000066400000000000000000000065631514323636100257350ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m150p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "D"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m150p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Double 0x0000000000000007;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m151n.jcod000066400000000000000000000065631514323636100257340ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m151n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Ljava/lang/String;"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m151n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Double 0x0000000000000007;; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m152n.jcod000066400000000000000000000065631514323636100257350ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m152n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "I"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m152n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 String #20; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m153n.jcod000066400000000000000000000065631514323636100257360ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m153n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "S"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m153n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 String #20; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m154n.jcod000066400000000000000000000065631514323636100257370ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m154n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "C"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m154n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 String #20; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m155n.jcod000066400000000000000000000065631514323636100257400ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m155n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "B"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m155n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 String #20; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m156n.jcod000066400000000000000000000065631514323636100257410ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m156n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Z"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m156n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 String #20; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m157n.jcod000066400000000000000000000065631514323636100257420ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m157n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "J"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m157n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 String #20; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m158n.jcod000066400000000000000000000065631514323636100257430ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m158n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "F"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m158n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 String #20; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m159n.jcod000066400000000000000000000065631514323636100257440ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m159n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "D"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m159n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 String #20; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m15p.jcod000066400000000000000000000065611514323636100256530ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m15p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "S"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m15p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000000; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m160p.jcod000066400000000000000000000065631514323636100257360ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m160p { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Ljava/lang/String;"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m160p"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 String #20; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m16n.jcod000066400000000000000000000065611514323636100256520ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m16n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "J"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m16n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000000; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m17n.jcod000066400000000000000000000065611514323636100256530ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m17n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "F"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m17n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000000; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m18n.jcod000066400000000000000000000065611514323636100256540ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m18n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "D"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m18n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000000; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/jcod-files/atrcvl01002m19n.jcod000066400000000000000000000065611514323636100256550ustar00rootroot00000000000000class javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m19n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Integer 0x00030D40; // #1 Class #14; // #2 Class #18; // #3 Method #3 #5; // #4 NameAndType #7 #6; // #5 Utf8 "()V"; // #6 Utf8 ""; // #7 Utf8 "Code"; // #8 Utf8 "ConstantValue"; // #9 Utf8 "Exceptions"; // #10 Utf8 "Ljava/lang/String;"; // #11 Utf8 "LineNumberTable"; // #12 Utf8 "LocalVariables"; // #13 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcvl010/atrcvl01002m1/atrcvl01002m19n"; // #14 Utf8 "SourceFile"; // #15 Utf8 "f.java"; // #16 Utf8 "i"; // #17 Utf8 "java/lang/Object"; // #18 Integer 0x00000D40; // #19 Utf8 "Hello, World!"; // #20 Integer 0x00000000; // #21 } 0x0020; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #17; // name_index #11; // descriptor_index [] { // Attributes Attr(#9) { // ConstantValue #21; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #7; // name_index #6; // descriptor_index [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x04 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/000077500000000000000000000000001514323636100211715ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/000077500000000000000000000000001514323636100226235ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/000077500000000000000000000000001514323636100244645ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/000077500000000000000000000000001514323636100264675ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/BootstrapMethods/000077500000000000000000000000001514323636100317705ustar00rootroot00000000000000BSMCase7903791.g.jasm000066400000000000000000000213711514323636100350170ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/BootstrapMethods/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javasoft/sqe/tests/package; public super class #6 /* BSMCase7903791 */ version 50:0 { const #1 = Method #13.#14; // java/lang/Object."":"()V" const #2 = Field #6.#15; // BSMCase7903791.field:"I" const #3 = InvokeDynamic 0:#28; // #0:_:"()Ljava/lang/String;" const #4 = InvokeDynamic 1:#35; // #1:_:"()[I" const #5 = Utf8 "javasoft/sqe/tests/package/BSMCase7903791"; const #6 = class #5; // BSMCase7903791 const #7 = Utf8 "field"; const #8 = Utf8 "I"; const #9 = Utf8 ""; const #10 = Utf8 "()V"; const #11 = Utf8 "Code"; const #12 = Utf8 "java/lang/Object"; const #13 = class #12; // java/lang/Object const #14 = NameAndType #9:#10; // "":"()V" const #15 = NameAndType #7:#8; // field:"I" const #16 = Utf8 "StackMapTable"; const #17 = Utf8 "constantFilled2I"; const #18 = Utf8 "()[I"; const #19 = Utf8 "java/lang/runtime/ArrayCreation"; const #20 = class #19; // java/lang/runtime/ArrayCreation const #21 = Utf8 "constantFilled01"; const #22 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;"; const #23 = NameAndType #21:#22; // constantFilled01:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;" const #24 = Method #20.#23; // java/lang/runtime/ArrayCreation.constantFilled01:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;" const #25 = MethodHandle 6:#24; // REF_invokeStatic:java/lang/runtime/ArrayCreation.constantFilled01:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;" const #26 = Utf8 "_"; const #27 = Utf8 "()Ljava/lang/String;"; const #28 = NameAndType #26:#27; // _:"()Ljava/lang/String;" const #29 = Utf8 "BootstrapMethods"; const #30 = Utf8 "constantFilled3I"; const #31 = Utf8 "constantFilled"; const #32 = NameAndType #31:#22; // constantFilled:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;" const #33 = Method #20.#32; // java/lang/runtime/ArrayCreation.constantFilled:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;" const #34 = MethodHandle 6:#33; // REF_invokeStatic:java/lang/runtime/ArrayCreation.constantFilled:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;" const #35 = NameAndType #26:#18; // _:"()[I" const #36 = Utf8 "java/lang/invoke/ConstantBootstraps"; const #37 = class #36; // java/lang/invoke/ConstantBootstraps const #38 = Utf8 "primitiveClass"; const #39 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;"; const #40 = NameAndType #38:#39; // primitiveClass:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;" const #41 = Method #37.#40; // java/lang/invoke/ConstantBootstraps.primitiveClass:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;" const #42 = MethodHandle 6:#41; // REF_invokeStatic:java/lang/invoke/ConstantBootstraps.primitiveClass:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;" const #43 = Utf8 "Ljava/lang/Class;"; const #44 = NameAndType #8:#43; // I:"Ljava/lang/Class;" const #45 = Dynamic 2:#44; // #2:I:"Ljava/lang/Class;" const #46 = int 0; const #47 = int 3; const #48 = int -3; const #49 = Utf8 "SourceFile"; const #50 = Utf8 "BSMCase7903791.jasm"; private Field #7:#8; // field:I Method #9:#10 // "":"()V" stack 4 locals 1 { 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: return; 5: stack_frame_type full; // frame_type 255 locals_map; stack_map #6, 2; // class BSMCase7903791, float; putfield #2; // Field field:"I" 8: return; } public static Method #17:#18 // constantFilled2I:"()[I" stack 1 locals 0 { 0: invokedynamic #3; // InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ArrayCreation.constantFilled01: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;": // _:"()Ljava/lang/String;"{} 5: areturn; } public static Method #30:#18 // constantFilled3I:"()[I" stack 1 locals 0 { 0: invokedynamic #4; // InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ArrayCreation.constantFilled: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;": // _:"()[I" { // Dynamic REF_invokeStatic:Method java/lang/invoke/ConstantBootstraps.primitiveClass:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;": // I:"Ljava/lang/Class;"{}, // int 0, // int 3, // int -3 // } 5: areturn; } SourceFile #50; // BSMCase7903791.jasm BootstrapMethod #25; // REF_invokeStatic:java/lang/runtime/ArrayCreation.constantFilled01: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;"; { } BootstrapMethod #34; // REF_invokeStatic:java/lang/runtime/ArrayCreation.constantFilled: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;"; { #45, // Dynamic REF_invokeStatic:java/lang/invoke/ConstantBootstraps.primitiveClass: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;": // I:"Ljava/lang/Class;"{} #46, // int 0 #47, // int 3 #48 // int -3 } BootstrapMethod #42; // REF_invokeStatic:java/lang/invoke/ConstantBootstraps.primitiveClass: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;"; { } } // end Class javasoft/sqe/tests/package/BSMCase7903791 compiled from "BSMCase7903791.jasm" BSMCase7903791.g.jcod000066400000000000000000000227441514323636100350110ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/BootstrapMethods/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ class javasoft/sqe/tests/package/BSMCase7903791 { 0xCAFEBABE; 0; // minor version 50; // version [51] { // Constant Pool ; // first element is empty Method #13 #14; // #1 at 0x0A Field #6 #15; // #2 at 0x0F InvokeDynamic 0s #28; // #3 at 0x14 InvokeDynamic 1s #35; // #4 at 0x19 Utf8 "javasoft/sqe/tests/package/BSMCase7903791"; // #5 at 0x1E Class #5; // #6 at 0x4A Utf8 "field"; // #7 at 0x4D Utf8 "I"; // #8 at 0x55 Utf8 ""; // #9 at 0x59 Utf8 "()V"; // #10 at 0x62 Utf8 "Code"; // #11 at 0x68 Utf8 "java/lang/Object"; // #12 at 0x6F Class #12; // #13 at 0x82 NameAndType #9 #10; // #14 at 0x85 NameAndType #7 #8; // #15 at 0x8A Utf8 "StackMapTable"; // #16 at 0x8F Utf8 "constantFilled2I"; // #17 at 0x9F Utf8 "()[I"; // #18 at 0xB2 Utf8 "java/lang/runtime/ArrayCreation"; // #19 at 0xB9 Class #19; // #20 at 0xDB Utf8 "constantFilled01"; // #21 at 0xDE Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #22 at 0xF1 NameAndType #21 #22; // #23 at 0x019A Method #20 #23; // #24 at 0x019F MethodHandle 6b #24; // #25 at 0x01A4 Utf8 "_"; // #26 at 0x01A8 Utf8 "()Ljava/lang/String;"; // #27 at 0x01AC NameAndType #26 #27; // #28 at 0x01C3 Utf8 "BootstrapMethods"; // #29 at 0x01C8 Utf8 "constantFilled3I"; // #30 at 0x01DB Utf8 "constantFilled"; // #31 at 0x01EE NameAndType #31 #22; // #32 at 0x01FF Method #20 #32; // #33 at 0x0204 MethodHandle 6b #33; // #34 at 0x0209 NameAndType #26 #18; // #35 at 0x020D Utf8 "java/lang/invoke/ConstantBootstraps"; // #36 at 0x0212 Class #36; // #37 at 0x0238 Utf8 "primitiveClass"; // #38 at 0x023B Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;"; // #39 at 0x024C NameAndType #38 #39; // #40 at 0x02AC Method #37 #40; // #41 at 0x02B1 MethodHandle 6b #41; // #42 at 0x02B6 Utf8 "Ljava/lang/Class;"; // #43 at 0x02BA NameAndType #8 #43; // #44 at 0x02CE Dynamic 2s #44; // #45 at 0x02D3 Integer 0x00000000; // #46 at 0x02D8 Integer 0x00000003; // #47 at 0x02DD Integer 0xFFFFFFFD; // #48 at 0x02E2 Utf8 "SourceFile"; // #49 at 0x02E7 Utf8 "BSMCase7903791.jasm"; // #50 at 0x02F4 } // end of Constant Pool 0x0021; // access [ ACC_PUBLIC, ACC_SUPER ] #6; // this_cpx #13; // super_cpx [0] { // Interfaces } // end of Interfaces [1] { // Fields { // field at 0x0314 0x0002; // access #7; // name_index : field #8; // descriptor_index : I [0] { // Attributes } // end of Attributes } } // end of Fields [3] { // Methods { // method at 0x031E 0x0000; // access #9; // name_index : #10; // descriptor_index : ()V [1] { // Attributes Attr(#11, 40) { // Code at 0x0326 4; // max_stack 1; // max_locals Bytes[9]{ 0x2A 0xB7 0x00 0x01 0xB1 0xB5 0x00 0x02 0xB1; } [0] { // Traps } // end of Traps [1] { // Attributes Attr(#16, 13) { // StackMapTable at 0x0341 [1] { // 255b, 5, [0]{}, [2]{7b,#6; 2b}; // full_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0354 0x0009; // access #17; // name_index : constantFilled2I #18; // descriptor_index : ()[I [1] { // Attributes Attr(#11, 18) { // Code at 0x035C 1; // max_stack 0; // max_locals Bytes[6]{ 0xBA 0x00 0x03 0x00 0x00 0xB0; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0374 0x0009; // access #30; // name_index : constantFilled3I #18; // descriptor_index : ()[I [1] { // Attributes Attr(#11, 18) { // Code at 0x037C 1; // max_stack 0; // max_locals Bytes[6]{ 0xBA 0x00 0x04 0x00 0x00 0xB0; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [2] { // Attributes Attr(#49, 2) { // SourceFile at 0x0396 #50; } // end of SourceFile ; Attr(#29, 22) { // BootstrapMethods at 0x039E [3] { // bootstrap_methods { // bootstrap_method #25; // bootstrap_method_ref [0] { // bootstrap_arguments } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #34; // bootstrap_method_ref [4] { // bootstrap_arguments #45; // at 0x03B0 #46; // at 0x03B2 #47; // at 0x03B4 #48; // at 0x03B6 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #42; // bootstrap_method_ref [0] { // bootstrap_arguments } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods } // end of Attributes } // end of class javasoft/sqe/tests/package/BSMCase7903791 BSMCase7903791.g.t.jasm000066400000000000000000000213741514323636100352640ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/BootstrapMethods/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javasoft/sqe/tests/package; public super class #6 /* BSMCase7903791 */ version 50:0 { const #1 = Methodref #13.#14; // java/lang/Object."":"()V" const #2 = Fieldref #6.#15; // BSMCase7903791.field:"I" const #3 = InvokeDynamic 0:#28; // #0:_:"()Ljava/lang/String;" const #4 = InvokeDynamic 1:#35; // #1:_:"()[I" const #5 = Utf8 "javasoft/sqe/tests/package/BSMCase7903791"; const #6 = Class #5; // BSMCase7903791 const #7 = Utf8 "field"; const #8 = Utf8 "I"; const #9 = Utf8 ""; const #10 = Utf8 "()V"; const #11 = Utf8 "Code"; const #12 = Utf8 "java/lang/Object"; const #13 = Class #12; // java/lang/Object const #14 = NameAndType #9:#10; // "":"()V" const #15 = NameAndType #7:#8; // field:"I" const #16 = Utf8 "StackMapTable"; const #17 = Utf8 "constantFilled2I"; const #18 = Utf8 "()[I"; const #19 = Utf8 "java/lang/runtime/ArrayCreation"; const #20 = Class #19; // java/lang/runtime/ArrayCreation const #21 = Utf8 "constantFilled01"; const #22 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;"; const #23 = NameAndType #21:#22; // constantFilled01:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;" const #24 = Methodref #20.#23; // java/lang/runtime/ArrayCreation.constantFilled01:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;" const #25 = MethodHandle 6:#24; // REF_invokeStatic:java/lang/runtime/ArrayCreation.constantFilled01:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;" const #26 = Utf8 "_"; const #27 = Utf8 "()Ljava/lang/String;"; const #28 = NameAndType #26:#27; // _:"()Ljava/lang/String;" const #29 = Utf8 "BootstrapMethods"; const #30 = Utf8 "constantFilled3I"; const #31 = Utf8 "constantFilled"; const #32 = NameAndType #31:#22; // constantFilled:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;" const #33 = Methodref #20.#32; // java/lang/runtime/ArrayCreation.constantFilled:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;" const #34 = MethodHandle 6:#33; // REF_invokeStatic:java/lang/runtime/ArrayCreation.constantFilled:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;" const #35 = NameAndType #26:#18; // _:"()[I" const #36 = Utf8 "java/lang/invoke/ConstantBootstraps"; const #37 = Class #36; // java/lang/invoke/ConstantBootstraps const #38 = Utf8 "primitiveClass"; const #39 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;"; const #40 = NameAndType #38:#39; // primitiveClass:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;" const #41 = Methodref #37.#40; // java/lang/invoke/ConstantBootstraps.primitiveClass:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;" const #42 = MethodHandle 6:#41; // REF_invokeStatic:java/lang/invoke/ConstantBootstraps.primitiveClass:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;" const #43 = Utf8 "Ljava/lang/Class;"; const #44 = NameAndType #8:#43; // I:"Ljava/lang/Class;" const #45 = Dynamic 2:#44; // #2:I:"Ljava/lang/Class;" const #46 = Integer 0; const #47 = Integer 3; const #48 = Integer -3; const #49 = Utf8 "SourceFile"; const #50 = Utf8 "BSMCase7903791.jasm"; private Field #7:#8; // field:I Method #9:#10 // "":"()V" stack 4 locals 1 { 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: return; 5: putfield #2; // Field field:"I" 8: return; StackMapTable: number_of_entries = 1 frame_type = 255 // full offset_delta = 5 locals_map = [] // stack_map = [ #6, 2; ] // class BSMCase7903791, float; } public static Method #17:#18 // constantFilled2I:"()[I" stack 1 locals 0 { 0: invokedynamic #3; // InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ArrayCreation.constantFilled01: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;": // _:"()Ljava/lang/String;"{} 5: areturn; } public static Method #30:#18 // constantFilled3I:"()[I" stack 1 locals 0 { 0: invokedynamic #4; // InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ArrayCreation.constantFilled: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;": // _:"()[I" { // Dynamic REF_invokeStatic:Method java/lang/invoke/ConstantBootstraps.primitiveClass:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;": // I:"Ljava/lang/Class;"{}, // int 0, // int 3, // int -3 // } 5: areturn; } SourceFile #50; // BSMCase7903791.jasm BootstrapMethods { 0: #25; // REF_invokeStatic:java/lang/runtime/ArrayCreation.constantFilled01: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;"; 1: #34; // REF_invokeStatic:java/lang/runtime/ArrayCreation.constantFilled: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: #45, // Dynamic REF_invokeStatic:java/lang/invoke/ConstantBootstraps.primitiveClass: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;": // I:"Ljava/lang/Class;"{} #46, // int 0 #47, // int 3 #48; // int -3 2: #42; // REF_invokeStatic:java/lang/invoke/ConstantBootstraps.primitiveClass: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;"; } } // end Class javasoft/sqe/tests/package/BSMCase7903791 compiled from "BSMCase7903791.jasm" BSMCase7903791.jasm000066400000000000000000000040011514323636100345610ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/BootstrapMethods/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javasoft/sqe/tests/package; public super class BSMCase7903791 version 50:0 { private Field field:I; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_frame_type full; locals_map; stack_map class BSMCase7903791, float; putfield Field field:"I"; return; } public static Method constantFilled2I:"()[I" stack 1 locals 0 { invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ArrayCreation.constantFilled01: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;": _:"()Ljava/lang/String;"{}; areturn; } public static Method constantFilled3I:"()[I" stack 1 locals 0 { invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ArrayCreation.constantFilled: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/reflect/RuntimeType;IILjava/lang/Object;)Ljava/lang/invoke/CallSite;": _:"()[I" { Dynamic REF_invokeStatic:Method java/lang/invoke/ConstantBootstraps.primitiveClass:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Class;": I:"Ljava/lang/Class;"{}, int 0, int 3, int -3 }; areturn; } SourceFile "BSMCase7903791.jasm"; } // end Class javasoft/sqe/tests/package/BSMCase7903791 compiled from "BSMCase7903791.jasm" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/LoadableDescriptors/000077500000000000000000000000001514323636100324145ustar00rootroot00000000000000LoadableDescriptorsAttributeTest$X.g.jasm000066400000000000000000000224751514323636100423150ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/LoadableDescriptors/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ final class #2 /* LoadableDescriptorsAttributeTest$X */ version 69:65535 { const #1 = Field #2.#3; // LoadableDescriptorsAttributeTest$X.v1:"[LLoadableDescriptorsAttributeTest$V1;" const #2 = class #4; // LoadableDescriptorsAttributeTest$X const #3 = NameAndType #5:#6; // v1:"[LLoadableDescriptorsAttributeTest$V1;" const #4 = Utf8 "LoadableDescriptorsAttributeTest$X"; const #5 = Utf8 "v1"; const #6 = Utf8 "[LLoadableDescriptorsAttributeTest$V1;"; const #7 = Field #2.#8; // LoadableDescriptorsAttributeTest$X.v7:"LLoadableDescriptorsAttributeTest$V7;" const #8 = NameAndType #9:#10; // v7:"LLoadableDescriptorsAttributeTest$V7;" const #9 = Utf8 "v7"; const #10 = Utf8 "LLoadableDescriptorsAttributeTest$V7;"; const #11 = Field #2.#12; // LoadableDescriptorsAttributeTest$X.v10:"LLoadableDescriptorsAttributeTest$V10;" const #12 = NameAndType #13:#14; // v10:"LLoadableDescriptorsAttributeTest$V10;" const #13 = Utf8 "v10"; const #14 = Utf8 "LLoadableDescriptorsAttributeTest$V10;"; const #15 = Method #16.#17; // java/lang/Object."":"()V" const #16 = class #18; // java/lang/Object const #17 = NameAndType #19:#20; // "":"()V" const #18 = Utf8 "java/lang/Object"; const #19 = Utf8 ""; const #20 = Utf8 "()V"; const #21 = Utf8 "Code"; const #22 = Utf8 "LineNumberTable"; const #23 = Utf8 "foo"; const #24 = Utf8 "()LLoadableDescriptorsAttributeTest$V2;"; const #25 = Utf8 "(LLoadableDescriptorsAttributeTest$V3;)V"; const #26 = Utf8 "(I)V"; const #27 = Utf8 "goo"; const #28 = Utf8 "([LLoadableDescriptorsAttributeTest$V6;)V"; const #29 = Utf8 "StackMapTable"; const #30 = class #31; // LoadableDescriptorsAttributeTest$V5 const #31 = Utf8 "LoadableDescriptorsAttributeTest$V5"; const #32 = Utf8 "([LLoadableDescriptorsAttributeTest$V9;)[LLoadableDescriptorsAttributeTest$V8;"; const #33 = Utf8 "SourceFile"; const #34 = Utf8 "LoadableDescriptorsAttributeTest.java"; const #35 = Utf8 "NestHost"; const #36 = class #37; // LoadableDescriptorsAttributeTest const #37 = Utf8 "LoadableDescriptorsAttributeTest"; const #38 = Utf8 "InnerClasses"; const #39 = Utf8 "X"; const #40 = class #41; // LoadableDescriptorsAttributeTest$V1 const #41 = Utf8 "LoadableDescriptorsAttributeTest$V1"; const #42 = Utf8 "V1"; const #43 = class #44; // LoadableDescriptorsAttributeTest$V7 const #44 = Utf8 "LoadableDescriptorsAttributeTest$V7"; const #45 = Utf8 "V7"; const #46 = class #47; // LoadableDescriptorsAttributeTest$V10 const #47 = Utf8 "LoadableDescriptorsAttributeTest$V10"; const #48 = Utf8 "V10"; const #49 = class #50; // LoadableDescriptorsAttributeTest$V2 const #50 = Utf8 "LoadableDescriptorsAttributeTest$V2"; const #51 = Utf8 "V2"; const #52 = class #53; // LoadableDescriptorsAttributeTest$V3 const #53 = Utf8 "LoadableDescriptorsAttributeTest$V3"; const #54 = Utf8 "V3"; const #55 = class #56; // LoadableDescriptorsAttributeTest$V6 const #56 = Utf8 "LoadableDescriptorsAttributeTest$V6"; const #57 = Utf8 "V6"; const #58 = Utf8 "V5"; const #59 = class #60; // LoadableDescriptorsAttributeTest$V9 const #60 = Utf8 "LoadableDescriptorsAttributeTest$V9"; const #61 = Utf8 "V9"; const #62 = class #63; // LoadableDescriptorsAttributeTest$V8 const #63 = Utf8 "LoadableDescriptorsAttributeTest$V8"; const #64 = Utf8 "V8"; const #65 = Utf8 "LoadableDescriptors"; const #66 = Utf8 "LLoadableDescriptorsAttributeTest$V3;"; const #67 = Utf8 "LLoadableDescriptorsAttributeTest$V2;"; final strict Field #5:#6; // v1:"[LLoadableDescriptorsAttributeTest$V1;" final strict Field #9:#10; // v7:"LLoadableDescriptorsAttributeTest$V7;" final strict Field #13:#14; // v10:"LLoadableDescriptorsAttributeTest$V10;" Method #19:#20 // "":"()V" stack 2 locals 1 { 0: aload_0; 1: aconst_null; 2: putfield #1; // Field v1:"[LLoadableDescriptorsAttributeTest$V1;" 5: aload_0; 6: aconst_null; 7: putfield #7; // Field v7:"LLoadableDescriptorsAttributeTest$V7;" 10: aload_0; 11: aconst_null; 12: putfield #11; // Field v10:"LLoadableDescriptorsAttributeTest$V10;" 15: aload_0; 16: invokespecial #15; // Method java/lang/Object."":"()V" 19: return; } Method #23:#24 // foo:"()LLoadableDescriptorsAttributeTest$V2;" stack 1 locals 1 { 0: aconst_null; 1: areturn; } Method #23:#25 // foo:"(LLoadableDescriptorsAttributeTest$V3;)V" stack 0 locals 2 { 0: return; } Method #23:#26 // foo:"(I)V" stack 1 locals 3 { 0: aconst_null; 1: astore_2; 2: return; } Method #27:#28 // goo:"([LLoadableDescriptorsAttributeTest$V6;)V" stack 1 locals 4 { 0: aconst_null; 1: astore_2; 2: aload_2; 3: ifnonnull 9; 6: goto 11; 9: stack_frame_type append; // frame_type 252 locals_map #30; // class LoadableDescriptorsAttributeTest$V5; aconst_null; 10: astore_3; 11: stack_frame_type same; // frame_type 1 return; } Method #27:#32 // goo:"([LLoadableDescriptorsAttributeTest$V9;)[LLoadableDescriptorsAttributeTest$V8;" stack 1 locals 2 { 0: aconst_null; 1: areturn; } SourceFile #34; // LoadableDescriptorsAttributeTest.java NestHost #36; // LoadableDescriptorsAttributeTest InnerClass static final #39 = #2 of #36; // X = class LoadableDescriptorsAttributeTest$X of class LoadableDescriptorsAttributeTest InnerClass final #42 = #40 of #36; // V1 = class LoadableDescriptorsAttributeTest$V1 of class LoadableDescriptorsAttributeTest InnerClass final #45 = #43 of #36; // V7 = class LoadableDescriptorsAttributeTest$V7 of class LoadableDescriptorsAttributeTest InnerClass abstract #48 = #46 of #36; // V10 = class LoadableDescriptorsAttributeTest$V10 of class LoadableDescriptorsAttributeTest InnerClass final #51 = #49 of #36; // V2 = class LoadableDescriptorsAttributeTest$V2 of class LoadableDescriptorsAttributeTest InnerClass final #54 = #52 of #36; // V3 = class LoadableDescriptorsAttributeTest$V3 of class LoadableDescriptorsAttributeTest InnerClass final #57 = #55 of #36; // V6 = class LoadableDescriptorsAttributeTest$V6 of class LoadableDescriptorsAttributeTest InnerClass final #58 = #30 of #36; // V5 = class LoadableDescriptorsAttributeTest$V5 of class LoadableDescriptorsAttributeTest InnerClass final #61 = #59 of #36; // V9 = class LoadableDescriptorsAttributeTest$V9 of class LoadableDescriptorsAttributeTest InnerClass final #64 = #62 of #36; // V8 = class LoadableDescriptorsAttributeTest$V8 of class LoadableDescriptorsAttributeTest LoadableDescriptors #66, #10, #67; // "LLoadableDescriptorsAttributeTest$V3;", "LLoadableDescriptorsAttributeTest$V7;", "LLoadableDescriptorsAttributeTest$V2;" } // end Class LoadableDescriptorsAttributeTest$X compiled from "LoadableDescriptorsAttributeTest.java" LoadableDescriptorsAttributeTest$X.g.jcod000066400000000000000000000427101514323636100422740ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/LoadableDescriptors/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ class LoadableDescriptorsAttributeTest$X { 0xCAFEBABE; 65535; // minor version 69; // version [68] { // Constant Pool ; // first element is empty Field #2 #3; // #1 at 0x0A Class #4; // #2 at 0x0F NameAndType #5 #6; // #3 at 0x12 Utf8 "LoadableDescriptorsAttributeTest$X"; // #4 at 0x17 Utf8 "v1"; // #5 at 0x3C Utf8 "[LLoadableDescriptorsAttributeTest$V1;"; // #6 at 0x41 Field #2 #8; // #7 at 0x6A NameAndType #9 #10; // #8 at 0x6F Utf8 "v7"; // #9 at 0x74 Utf8 "LLoadableDescriptorsAttributeTest$V7;"; // #10 at 0x79 Field #2 #12; // #11 at 0xA1 NameAndType #13 #14; // #12 at 0xA6 Utf8 "v10"; // #13 at 0xAB Utf8 "LLoadableDescriptorsAttributeTest$V10;"; // #14 at 0xB1 Method #16 #17; // #15 at 0xDA Class #18; // #16 at 0xDF NameAndType #19 #20; // #17 at 0xE2 Utf8 "java/lang/Object"; // #18 at 0xE7 Utf8 ""; // #19 at 0xFA Utf8 "()V"; // #20 at 0x0103 Utf8 "Code"; // #21 at 0x0109 Utf8 "LineNumberTable"; // #22 at 0x0110 Utf8 "foo"; // #23 at 0x0122 Utf8 "()LLoadableDescriptorsAttributeTest$V2;"; // #24 at 0x0128 Utf8 "(LLoadableDescriptorsAttributeTest$V3;)V"; // #25 at 0x0152 Utf8 "(I)V"; // #26 at 0x017D Utf8 "goo"; // #27 at 0x0184 Utf8 "([LLoadableDescriptorsAttributeTest$V6;)V"; // #28 at 0x018A Utf8 "StackMapTable"; // #29 at 0x01B6 Class #31; // #30 at 0x01C6 Utf8 "LoadableDescriptorsAttributeTest$V5"; // #31 at 0x01C9 Utf8 "([LLoadableDescriptorsAttributeTest$V9;)[LLoadableDescriptorsAttributeTest$V8;"; // #32 at 0x01EF Utf8 "SourceFile"; // #33 at 0x0240 Utf8 "LoadableDescriptorsAttributeTest.java"; // #34 at 0x024D Utf8 "NestHost"; // #35 at 0x0275 Class #37; // #36 at 0x0280 Utf8 "LoadableDescriptorsAttributeTest"; // #37 at 0x0283 Utf8 "InnerClasses"; // #38 at 0x02A6 Utf8 "X"; // #39 at 0x02B5 Class #41; // #40 at 0x02B9 Utf8 "LoadableDescriptorsAttributeTest$V1"; // #41 at 0x02BC Utf8 "V1"; // #42 at 0x02E2 Class #44; // #43 at 0x02E7 Utf8 "LoadableDescriptorsAttributeTest$V7"; // #44 at 0x02EA Utf8 "V7"; // #45 at 0x0310 Class #47; // #46 at 0x0315 Utf8 "LoadableDescriptorsAttributeTest$V10"; // #47 at 0x0318 Utf8 "V10"; // #48 at 0x033F Class #50; // #49 at 0x0345 Utf8 "LoadableDescriptorsAttributeTest$V2"; // #50 at 0x0348 Utf8 "V2"; // #51 at 0x036E Class #53; // #52 at 0x0373 Utf8 "LoadableDescriptorsAttributeTest$V3"; // #53 at 0x0376 Utf8 "V3"; // #54 at 0x039C Class #56; // #55 at 0x03A1 Utf8 "LoadableDescriptorsAttributeTest$V6"; // #56 at 0x03A4 Utf8 "V6"; // #57 at 0x03CA Utf8 "V5"; // #58 at 0x03CF Class #60; // #59 at 0x03D4 Utf8 "LoadableDescriptorsAttributeTest$V9"; // #60 at 0x03D7 Utf8 "V9"; // #61 at 0x03FD Class #63; // #62 at 0x0402 Utf8 "LoadableDescriptorsAttributeTest$V8"; // #63 at 0x0405 Utf8 "V8"; // #64 at 0x042B Utf8 "LoadableDescriptors"; // #65 at 0x0430 Utf8 "LLoadableDescriptorsAttributeTest$V3;"; // #66 at 0x0446 Utf8 "LLoadableDescriptorsAttributeTest$V2;"; // #67 at 0x046E } // end of Constant Pool 0x0010; // access [ ACC_FINAL ] #2; // this_cpx #16; // super_cpx [0] { // Interfaces } // end of Interfaces [3] { // Fields { // field at 0x04A0 0x0810; // access #5; // name_index : v1 #6; // descriptor_index : [LLoadableDescriptorsAttributeTest$V1; [0] { // Attributes } // end of Attributes } ; { // field at 0x04A8 0x0810; // access #9; // name_index : v7 #10; // descriptor_index : LLoadableDescriptorsAttributeTest$V7; [0] { // Attributes } // end of Attributes } ; { // field at 0x04B0 0x0810; // access #13; // name_index : v10 #14; // descriptor_index : LLoadableDescriptorsAttributeTest$V10; [0] { // Attributes } // end of Attributes } } // end of Fields [6] { // Methods { // method at 0x04BA 0x0000; // access #19; // name_index : #20; // descriptor_index : ()V [1] { // Attributes Attr(#21, 60) { // Code at 0x04C2 2; // max_stack 1; // max_locals Bytes[20]{ 0x2A 0x01 0xB5 0x00 0x01 0x2A 0x01 0xB5 0x00 0x07 0x2A 0x01; 0xB5 0x00 0x0B 0x2A 0xB7 0x00 0x0F 0xB1; } [0] { // Traps } // end of Traps [1] { // Attributes Attr(#22, 22) { // LineNumberTable at 0x04E8 [5] { // line_number_table 0 50; // at 0x04F4 5 67; // at 0x04F8 10 71; // at 0x04FC 15 49; // at 0x0500 19 71; // at 0x0504 } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0504 0x0000; // access #23; // name_index : foo #24; // descriptor_index : ()LLoadableDescriptorsAttributeTest$V2; [1] { // Attributes Attr(#21, 26) { // Code at 0x050C 1; // max_stack 1; // max_locals Bytes[2]{ 0x01 0xB0; } [0] { // Traps } // end of Traps [1] { // Attributes Attr(#22, 6) { // LineNumberTable at 0x0520 [1] { // line_number_table 0 52; // at 0x052C } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x052C 0x0000; // access #23; // name_index : foo #25; // descriptor_index : (LLoadableDescriptorsAttributeTest$V3;)V [1] { // Attributes Attr(#21, 25) { // Code at 0x0534 0; // max_stack 2; // max_locals Bytes[1]{ 0xB1; } [0] { // Traps } // end of Traps [1] { // Attributes Attr(#22, 6) { // LineNumberTable at 0x0547 [1] { // line_number_table 0 55; // at 0x0553 } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0553 0x0000; // access #23; // name_index : foo #26; // descriptor_index : (I)V [1] { // Attributes Attr(#21, 31) { // Code at 0x055B 1; // max_stack 3; // max_locals Bytes[3]{ 0x01 0x4D 0xB1; } [0] { // Traps } // end of Traps [1] { // Attributes Attr(#22, 10) { // LineNumberTable at 0x0570 [2] { // line_number_table 0 57; // at 0x057C 2 58; // at 0x0580 } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0580 0x0000; // access #27; // name_index : goo #28; // descriptor_index : ([LLoadableDescriptorsAttributeTest$V6;)V [1] { // Attributes Attr(#21, 63) { // Code at 0x0588 1; // max_stack 4; // max_locals Bytes[12]{ 0x01 0x4D 0x2C 0xC7 0x00 0x06 0xA7 0x00 0x05 0x01 0x4E 0xB1; ; } [0] { // Traps } // end of Traps [2] { // Attributes Attr(#22, 18) { // LineNumberTable at 0x05A6 [4] { // line_number_table 0 60; // at 0x05B2 2 61; // at 0x05B6 9 64; // at 0x05BA 11 66; // at 0x05BE } } // end of LineNumberTable ; Attr(#29, 9) { // StackMapTable at 0x05BE [2] { // 252b, 9, [1]z{7b,#30}; // append_frame 1 1b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x05CD 0x0000; // access #27; // name_index : goo #32; // descriptor_index : ([LLoadableDescriptorsAttributeTest$V9;)[LLoadableDescriptorsAttributeTest$V8; [1] { // Attributes Attr(#21, 26) { // Code at 0x05D5 1; // max_stack 2; // max_locals Bytes[2]{ 0x01 0xB0; } [0] { // Traps } // end of Traps [1] { // Attributes Attr(#22, 6) { // LineNumberTable at 0x05E9 [1] { // line_number_table 0 69; // at 0x05F5 } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [4] { // Attributes Attr(#33, 2) { // SourceFile at 0x05F7 #34; } // end of SourceFile ; Attr(#35, 2) { // NestHost at 0x05FF #36; // class: LoadableDescriptorsAttributeTest at 0x0607 } // end of NestHost ; Attr(#38, 82) { // InnerClasses at 0x0607 [10] { // classes #2 #36 #39 24; // access [ ACC_STATIC, ACC_FINAL ] #40 #36 #42 16; // access [ ACC_FINAL ] #43 #36 #45 16; // access [ ACC_FINAL ] #46 #36 #48 1024; // access [ ACC_ABSTRACT ] #49 #36 #51 16; // access [ ACC_FINAL ] #52 #36 #54 16; // access [ ACC_FINAL ] #55 #36 #57 16; // access [ ACC_FINAL ] #30 #36 #58 16; // access [ ACC_FINAL ] #59 #36 #61 16; // access [ ACC_FINAL ] #62 #36 #64 16; // access [ ACC_FINAL ] } } // end of InnerClasses ; Attr(#65, 8) { // LoadableDescriptors at 0x065F [3] { // Utf8 #66; // descriptor: LLoadableDescriptorsAttributeTest$V3; at 0x0669 #10; // descriptor: LLoadableDescriptorsAttributeTest$V7; at 0x066B #67; // descriptor: LLoadableDescriptorsAttributeTest$V2; at 0x066D } } // end of LoadableDescriptors } // end of Attributes } // end of class LoadableDescriptorsAttributeTest$X LoadableDescriptorsAttributeTest$X.g.t.jasm000066400000000000000000000224211514323636100425460ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/LoadableDescriptors/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ final class #2 /* LoadableDescriptorsAttributeTest$X */ version 69:65535 { const #1 = Fieldref #2.#3; // LoadableDescriptorsAttributeTest$X.v1:"[LLoadableDescriptorsAttributeTest$V1;" const #2 = Class #4; // LoadableDescriptorsAttributeTest$X const #3 = NameAndType #5:#6; // v1:"[LLoadableDescriptorsAttributeTest$V1;" const #4 = Utf8 "LoadableDescriptorsAttributeTest$X"; const #5 = Utf8 "v1"; const #6 = Utf8 "[LLoadableDescriptorsAttributeTest$V1;"; const #7 = Fieldref #2.#8; // LoadableDescriptorsAttributeTest$X.v7:"LLoadableDescriptorsAttributeTest$V7;" const #8 = NameAndType #9:#10; // v7:"LLoadableDescriptorsAttributeTest$V7;" const #9 = Utf8 "v7"; const #10 = Utf8 "LLoadableDescriptorsAttributeTest$V7;"; const #11 = Fieldref #2.#12; // LoadableDescriptorsAttributeTest$X.v10:"LLoadableDescriptorsAttributeTest$V10;" const #12 = NameAndType #13:#14; // v10:"LLoadableDescriptorsAttributeTest$V10;" const #13 = Utf8 "v10"; const #14 = Utf8 "LLoadableDescriptorsAttributeTest$V10;"; const #15 = Methodref #16.#17; // java/lang/Object."":"()V" const #16 = Class #18; // java/lang/Object const #17 = NameAndType #19:#20; // "":"()V" const #18 = Utf8 "java/lang/Object"; const #19 = Utf8 ""; const #20 = Utf8 "()V"; const #21 = Utf8 "Code"; const #22 = Utf8 "LineNumberTable"; const #23 = Utf8 "foo"; const #24 = Utf8 "()LLoadableDescriptorsAttributeTest$V2;"; const #25 = Utf8 "(LLoadableDescriptorsAttributeTest$V3;)V"; const #26 = Utf8 "(I)V"; const #27 = Utf8 "goo"; const #28 = Utf8 "([LLoadableDescriptorsAttributeTest$V6;)V"; const #29 = Utf8 "StackMapTable"; const #30 = Class #31; // LoadableDescriptorsAttributeTest$V5 const #31 = Utf8 "LoadableDescriptorsAttributeTest$V5"; const #32 = Utf8 "([LLoadableDescriptorsAttributeTest$V9;)[LLoadableDescriptorsAttributeTest$V8;"; const #33 = Utf8 "SourceFile"; const #34 = Utf8 "LoadableDescriptorsAttributeTest.java"; const #35 = Utf8 "NestHost"; const #36 = Class #37; // LoadableDescriptorsAttributeTest const #37 = Utf8 "LoadableDescriptorsAttributeTest"; const #38 = Utf8 "InnerClasses"; const #39 = Utf8 "X"; const #40 = Class #41; // LoadableDescriptorsAttributeTest$V1 const #41 = Utf8 "LoadableDescriptorsAttributeTest$V1"; const #42 = Utf8 "V1"; const #43 = Class #44; // LoadableDescriptorsAttributeTest$V7 const #44 = Utf8 "LoadableDescriptorsAttributeTest$V7"; const #45 = Utf8 "V7"; const #46 = Class #47; // LoadableDescriptorsAttributeTest$V10 const #47 = Utf8 "LoadableDescriptorsAttributeTest$V10"; const #48 = Utf8 "V10"; const #49 = Class #50; // LoadableDescriptorsAttributeTest$V2 const #50 = Utf8 "LoadableDescriptorsAttributeTest$V2"; const #51 = Utf8 "V2"; const #52 = Class #53; // LoadableDescriptorsAttributeTest$V3 const #53 = Utf8 "LoadableDescriptorsAttributeTest$V3"; const #54 = Utf8 "V3"; const #55 = Class #56; // LoadableDescriptorsAttributeTest$V6 const #56 = Utf8 "LoadableDescriptorsAttributeTest$V6"; const #57 = Utf8 "V6"; const #58 = Utf8 "V5"; const #59 = Class #60; // LoadableDescriptorsAttributeTest$V9 const #60 = Utf8 "LoadableDescriptorsAttributeTest$V9"; const #61 = Utf8 "V9"; const #62 = Class #63; // LoadableDescriptorsAttributeTest$V8 const #63 = Utf8 "LoadableDescriptorsAttributeTest$V8"; const #64 = Utf8 "V8"; const #65 = Utf8 "LoadableDescriptors"; const #66 = Utf8 "LLoadableDescriptorsAttributeTest$V3;"; const #67 = Utf8 "LLoadableDescriptorsAttributeTest$V2;"; final strict Field #5:#6; // v1:"[LLoadableDescriptorsAttributeTest$V1;" final strict Field #9:#10; // v7:"LLoadableDescriptorsAttributeTest$V7;" final strict Field #13:#14; // v10:"LLoadableDescriptorsAttributeTest$V10;" Method #19:#20 // "":"()V" stack 2 locals 1 { 0: aload_0; 1: aconst_null; 2: putfield #1; // Field v1:"[LLoadableDescriptorsAttributeTest$V1;" 5: aload_0; 6: aconst_null; 7: putfield #7; // Field v7:"LLoadableDescriptorsAttributeTest$V7;" 10: aload_0; 11: aconst_null; 12: putfield #11; // Field v10:"LLoadableDescriptorsAttributeTest$V10;" 15: aload_0; 16: invokespecial #15; // Method java/lang/Object."":"()V" 19: return; } Method #23:#24 // foo:"()LLoadableDescriptorsAttributeTest$V2;" stack 1 locals 1 { 0: aconst_null; 1: areturn; } Method #23:#25 // foo:"(LLoadableDescriptorsAttributeTest$V3;)V" stack 0 locals 2 { 0: return; } Method #23:#26 // foo:"(I)V" stack 1 locals 3 { 0: aconst_null; 1: astore_2; 2: return; } Method #27:#28 // goo:"([LLoadableDescriptorsAttributeTest$V6;)V" stack 1 locals 4 { 0: aconst_null; 1: astore_2; 2: aload_2; 3: ifnonnull 9; 6: goto 11; 9: aconst_null; 10: astore_3; 11: return; StackMapTable: number_of_entries = 2 frame_type = 252 // append offset_delta = 9 locals_map = [ #30; ] // class LoadableDescriptorsAttributeTest$V5; frame_type = 1 // same } Method #27:#32 // goo:"([LLoadableDescriptorsAttributeTest$V9;)[LLoadableDescriptorsAttributeTest$V8;" stack 1 locals 2 { 0: aconst_null; 1: areturn; } SourceFile #34; // LoadableDescriptorsAttributeTest.java NestHost #36; // LoadableDescriptorsAttributeTest InnerClasses { static final #39 = #2 of #36; // X = class LoadableDescriptorsAttributeTest$X of class LoadableDescriptorsAttributeTest final #42 = #40 of #36; // V1 = class LoadableDescriptorsAttributeTest$V1 of class LoadableDescriptorsAttributeTest final #45 = #43 of #36; // V7 = class LoadableDescriptorsAttributeTest$V7 of class LoadableDescriptorsAttributeTest abstract #48 = #46 of #36; // V10 = class LoadableDescriptorsAttributeTest$V10 of class LoadableDescriptorsAttributeTest final #51 = #49 of #36; // V2 = class LoadableDescriptorsAttributeTest$V2 of class LoadableDescriptorsAttributeTest final #54 = #52 of #36; // V3 = class LoadableDescriptorsAttributeTest$V3 of class LoadableDescriptorsAttributeTest final #57 = #55 of #36; // V6 = class LoadableDescriptorsAttributeTest$V6 of class LoadableDescriptorsAttributeTest final #58 = #30 of #36; // V5 = class LoadableDescriptorsAttributeTest$V5 of class LoadableDescriptorsAttributeTest final #61 = #59 of #36; // V9 = class LoadableDescriptorsAttributeTest$V9 of class LoadableDescriptorsAttributeTest final #64 = #62 of #36; // V8 = class LoadableDescriptorsAttributeTest$V8 of class LoadableDescriptorsAttributeTest } LoadableDescriptors #66, #10, #67; // "LLoadableDescriptorsAttributeTest$V3;", "LLoadableDescriptorsAttributeTest$V7;", "LLoadableDescriptorsAttributeTest$V2;" } // end Class LoadableDescriptorsAttributeTest$X compiled from "LoadableDescriptorsAttributeTest.java" LoadableDescriptorsAttributeTest$X.jasm000066400000000000000000000105471514323636100420650ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/LoadableDescriptors/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ final class LoadableDescriptorsAttributeTest$X version 69:65535 { final strict Field v1:"[LLoadableDescriptorsAttributeTest$V1;"; final strict Field v7:"LLoadableDescriptorsAttributeTest$V7;"; final strict Field v10:"LLoadableDescriptorsAttributeTest$V10;"; Method "":"()V" stack 2 locals 1 { aload_0; aconst_null; putfield Field v1:"[LLoadableDescriptorsAttributeTest$V1;"; aload_0; aconst_null; putfield Field v7:"LLoadableDescriptorsAttributeTest$V7;"; aload_0; aconst_null; putfield Field v10:"LLoadableDescriptorsAttributeTest$V10;"; aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method foo:"()LLoadableDescriptorsAttributeTest$V2;" stack 1 locals 1 { aconst_null; areturn; } Method foo:"(LLoadableDescriptorsAttributeTest$V3;)V" stack 0 locals 2 { return; } Method foo:"(I)V" stack 1 locals 3 { aconst_null; astore_2; return; } Method goo:"([LLoadableDescriptorsAttributeTest$V6;)V" stack 1 locals 4 { aconst_null; astore_2; aload_2; ifnonnull L9; goto L11; L9: stack_frame_type append; locals_map class LoadableDescriptorsAttributeTest$V5; aconst_null; astore_3; L11: stack_frame_type same; return; } Method goo:"([LLoadableDescriptorsAttributeTest$V9;)[LLoadableDescriptorsAttributeTest$V8;" stack 1 locals 2 { aconst_null; areturn; } SourceFile "LoadableDescriptorsAttributeTest.java"; NestHost "LoadableDescriptorsAttributeTest"; InnerClass static final X = class LoadableDescriptorsAttributeTest$X of class LoadableDescriptorsAttributeTest; InnerClass final V1 = class LoadableDescriptorsAttributeTest$V1 of class LoadableDescriptorsAttributeTest; InnerClass final V7 = class LoadableDescriptorsAttributeTest$V7 of class LoadableDescriptorsAttributeTest; InnerClass abstract V10 = class LoadableDescriptorsAttributeTest$V10 of class LoadableDescriptorsAttributeTest; InnerClass final V2 = class LoadableDescriptorsAttributeTest$V2 of class LoadableDescriptorsAttributeTest; InnerClass final V3 = class LoadableDescriptorsAttributeTest$V3 of class LoadableDescriptorsAttributeTest; InnerClass final V6 = class LoadableDescriptorsAttributeTest$V6 of class LoadableDescriptorsAttributeTest; InnerClass final V5 = class LoadableDescriptorsAttributeTest$V5 of class LoadableDescriptorsAttributeTest; InnerClass final V9 = class LoadableDescriptorsAttributeTest$V9 of class LoadableDescriptorsAttributeTest; InnerClass final V8 = class LoadableDescriptorsAttributeTest$V8 of class LoadableDescriptorsAttributeTest; LoadableDescriptors "LLoadableDescriptorsAttributeTest$V3;", "LLoadableDescriptorsAttributeTest$V7;", "LLoadableDescriptorsAttributeTest$V2;"; } // end Class LoadableDescriptorsAttributeTest$X compiled from "LoadableDescriptorsAttributeTest.java" LoadableDescriptorsAttributeTest$X.jcod000066400000000000000000000351211514323636100420450ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/LoadableDescriptors/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ class LoadableDescriptorsAttributeTest$X { 0xCAFEBABE; 65535; // minor version 69; // version [] { // Constant Pool ; // first element is empty Field #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "LoadableDescriptorsAttributeTest$X"; // #4 Utf8 "v1"; // #5 Utf8 "[LLoadableDescriptorsAttributeTest$V1;"; // #6 Field #2 #8; // #7 NameAndType #9 #10; // #8 Utf8 "v7"; // #9 Utf8 "LLoadableDescriptorsAttributeTest$V7;"; // #10 Field #2 #12; // #11 NameAndType #13 #14; // #12 Utf8 "v10"; // #13 Utf8 "LLoadableDescriptorsAttributeTest$V10;"; // #14 Method #16 #17; // #15 Class #18; // #16 NameAndType #19 #20; // #17 Utf8 "java/lang/Object"; // #18 Utf8 ""; // #19 Utf8 "()V"; // #20 Utf8 "Code"; // #21 Utf8 "LineNumberTable"; // #22 Utf8 "foo"; // #23 Utf8 "()LLoadableDescriptorsAttributeTest$V2;"; // #24 Utf8 "(LLoadableDescriptorsAttributeTest$V3;)V"; // #25 Utf8 "(I)V"; // #26 Utf8 "goo"; // #27 Utf8 "([LLoadableDescriptorsAttributeTest$V6;)V"; // #28 Utf8 "StackMapTable"; // #29 Class #31; // #30 Utf8 "LoadableDescriptorsAttributeTest$V5"; // #31 Utf8 "([LLoadableDescriptorsAttributeTest$V9;)[LLoadableDescriptorsAttributeTest$V8;"; // #32 Utf8 "SourceFile"; // #33 Utf8 "LoadableDescriptorsAttributeTest.java"; // #34 Utf8 "NestHost"; // #35 Class #37; // #36 Utf8 "LoadableDescriptorsAttributeTest"; // #37 Utf8 "InnerClasses"; // #38 Utf8 "X"; // #39 Class #41; // #40 Utf8 "LoadableDescriptorsAttributeTest$V1"; // #41 Utf8 "V1"; // #42 Class #44; // #43 Utf8 "LoadableDescriptorsAttributeTest$V7"; // #44 Utf8 "V7"; // #45 Class #47; // #46 Utf8 "LoadableDescriptorsAttributeTest$V10"; // #47 Utf8 "V10"; // #48 Class #50; // #49 Utf8 "LoadableDescriptorsAttributeTest$V2"; // #50 Utf8 "V2"; // #51 Class #53; // #52 Utf8 "LoadableDescriptorsAttributeTest$V3"; // #53 Utf8 "V3"; // #54 Class #56; // #55 Utf8 "LoadableDescriptorsAttributeTest$V6"; // #56 Utf8 "V6"; // #57 Utf8 "V5"; // #58 Class #60; // #59 Utf8 "LoadableDescriptorsAttributeTest$V9"; // #60 Utf8 "V9"; // #61 Class #63; // #62 Utf8 "LoadableDescriptorsAttributeTest$V8"; // #63 Utf8 "V8"; // #64 Utf8 "LoadableDescriptors"; // #65 Utf8 "LLoadableDescriptorsAttributeTest$V3;"; // #66 Utf8 "LLoadableDescriptorsAttributeTest$V2;"; // #67 } 0x0010; // access #2; // this_cpx #16; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0810; // access #5; // name_index #6; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0810; // access #9; // name_index #10; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0810; // access #13; // name_index #14; // descriptor_index [] { // Attributes } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0000; // access #19; // name_index #20; // descriptor_index [] { // Attributes Attr(#21) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0x01 0xB5 0x00 0x01 0x2A 0x01 0xB5 0x00 0x07 0x2A 0x01; 0xB5 0x00 0x0B 0x2A 0xB7 0x00 0x0F 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#22) { // LineNumberTable [] { // line_number_table 0 50; 5 67; 10 71; 15 49; 19 71; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0000; // access #23; // name_index #24; // descriptor_index [] { // Attributes Attr(#21) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x01 0xB0; } [] { // Traps } // end of Traps [] { // Attributes Attr(#22) { // LineNumberTable [] { // line_number_table 0 52; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0000; // access #23; // name_index #25; // descriptor_index [] { // Attributes Attr(#21) { // Code 0; // max_stack 2; // max_locals Bytes[]{ 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#22) { // LineNumberTable [] { // line_number_table 0 55; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0000; // access #23; // name_index #26; // descriptor_index [] { // Attributes Attr(#21) { // Code 1; // max_stack 3; // max_locals Bytes[]{ 0x01 0x4D 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#22) { // LineNumberTable [] { // line_number_table 0 57; 2 58; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0000; // access #27; // name_index #28; // descriptor_index [] { // Attributes Attr(#21) { // Code 1; // max_stack 4; // max_locals Bytes[]{ 0x01 0x4D 0x2C 0xC7 0x00 0x06 0xA7 0x00 0x05 0x01 0x4E 0xB1; ; } [] { // Traps } // end of Traps [] { // Attributes Attr(#22) { // LineNumberTable [] { // line_number_table 0 60; 2 61; 9 64; 11 66; } } // end of LineNumberTable ; Attr(#29) { // StackMapTable [] { // 252b, 9, []z{O,#30}; // append_frame 1 1b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0000; // access #27; // name_index #32; // descriptor_index [] { // Attributes Attr(#21) { // Code 1; // max_stack 2; // max_locals Bytes[]{ 0x01 0xB0; } [] { // Traps } // end of Traps [] { // Attributes Attr(#22) { // LineNumberTable [] { // line_number_table 0 69; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#33) { // SourceFile #34; } // end of SourceFile ; Attr(#35) { // NestHost #36; } // end of NestHost ; Attr(#38) { // InnerClasses [] { // classes #2 #36 #39 24; #40 #36 #42 16; #43 #36 #45 16; #46 #36 #48 1024; #49 #36 #51 16; #52 #36 #54 16; #55 #36 #57 16; #30 #36 #58 16; #59 #36 #61 16; #62 #36 #64 16; } } // end of InnerClasses ; Attr(#65) { // LoadableDescriptors [] { // Utf8 #66; #10; #67; } } // end of LoadableDescriptors } // end of Attributes } Test01.jasm000066400000000000000000000007221514323636100342720ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/LoadableDescriptors/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package org/openjdk/asmtools/attribute/LoadableDescriptors; public class Test01 version 55:0 { LoadableDescriptors "LLoadableDescriptors01;", "LLoadableDescriptors02;"; InnerClass public Test01 = class Test01 of class OuterClass; } // end Class org/openjdk/asmtools/attribute/NestHost/Test01 jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/NestHost/000077500000000000000000000000001514323636100302365ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/NestHost/Test01.g.jasm000066400000000000000000000023521514323636100324210ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package org/openjdk/asmtools/attribute/NestHost; public class #2 /* Test01 */ version 55:0 { const #1 = Utf8 "org/openjdk/asmtools/attribute/NestHost/Test01"; const #2 = Class #1; // Test01 const #3 = Utf8 "org/openjdk/asmtools/attribute/NestHost/NestHost01"; const #4 = Utf8 "NestHost"; const #5 = Class #3; // NestHost01 const #6 = Utf8 "Test01"; const #7 = Utf8 "org/openjdk/asmtools/attribute/NestHost/OuterClass"; const #8 = Class #7; // OuterClass const #9 = Utf8 "InnerClasses"; const #10 = Utf8 "Test01.jasm"; const #11 = Utf8 "SourceFile"; const #12 = Utf8 "java/lang/Object"; const #13 = Class #12; // java/lang/Object SourceFile #10; // Test01.jasm NestHost #5; // org/openjdk/asmtools/attribute/NestHost/NestHost01 InnerClasses { public #6 = #2 of #8; // Test01 = class Test01 of class OuterClass } } // end Class org/openjdk/asmtools/attribute/NestHost/Test01 compiled from "Test01.jasm" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/NestHost/Test01.jasm000066400000000000000000000006401514323636100321720ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package org/openjdk/asmtools/attribute/NestHost; public class Test01 version 55:0 { NestHost "NestHost01"; InnerClass public Test01 = class Test01 of class OuterClass; } // end Class org/openjdk/asmtools/attribute/NestHost/Test01 jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/NestHost/Test01.jcod000066400000000000000000000053611514323636100321640ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */ class org/openjdk/asmtools/attribute/NestHost/Test01 { 0xCAFEBABE; 0; // minor version 55; // version [14] { // Constant Pool ; // first element is empty Utf8 "org/openjdk/asmtools/attribute/NestHost/Test01"; // #1 at 0x0A Class #1; // #2 at 0x36 Utf8 "org/openjdk/asmtools/attribute/NestHost/NestHost01"; // #3 at 0x39 Utf8 "NestHost"; // #4 at 0x69 Class #3; // #5 at 0x74 Utf8 "Test01"; // #6 at 0x77 Utf8 "org/openjdk/asmtools/attribute/NestHost/OuterClass"; // #7 at 0x80 Class #7; // #8 at 0xB0 Utf8 "InnerClasses"; // #9 at 0xB3 Utf8 "Test01.jasm"; // #10 at 0xC2 Utf8 "SourceFile"; // #11 at 0xD0 Utf8 "java/lang/Object"; // #12 at 0xDD Class #12; // #13 at 0xF0 } // end of Constant Pool 0x0001; // access [ ACC_PUBLIC ] #2; // this_cpx #13; // super_cpx [0] { // Interfaces } // end of Interfaces [0] { // Fields } // end of Fields [0] { // Methods } // end of Methods [3] { // Attributes Attr(#11, 2) { // SourceFile at 0x0101 #10; } // end of SourceFile ; Attr(#9, 10) { // InnerClasses at 0x0109 [1] { // classes #2 #8 #6 1; // access [ ACC_PUBLIC ] } } // end of InnerClasses ; Attr(#4, 2) { // NestHost at 0x0119 #5; // class: org/openjdk/asmtools/attribute/NestHost/NestHost01 at 0x0121 } // end of NestHost } // end of Attributes } // end of class org/openjdk/asmtools/attribute/NestHost/Test01 jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/NestHost/Test02.jasm000066400000000000000000000010151514323636100321700ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package org/openjdk/asmtools/attribute/NestHost; public class Test02 version 55:0 { SourceFile "Test02.jasm"; NestHost org/openjdk/asmtools/attribute/NestHost/NestHost02; InnerClass public Test02 = class Test02 of class OuterClass; } // end Class org/openjdk/asmtools/attribute/NestHost/Test02 compiled from "Test02.jasm" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/NestMembers/000077500000000000000000000000001514323636100307135ustar00rootroot00000000000000Test01.g.t.jasm000066400000000000000000000021771514323636100332660ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/NestMembers/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package org/openjdk/asmtools/attribute/NestMembers/Test01; public class #2 /* Test01 */ version 55:0 { const #1 = Utf8 "org/openjdk/asmtools/attribute/NestMembers/Test01/Test01"; const #2 = Class #1; // Test01 const #3 = Utf8 "NestMember01"; const #4 = Utf8 "org/openjdk/asmtools/attribute/NestMembers/Test01/NestMember01"; const #5 = Class #4; // NestMember01 const #6 = Utf8 "InnerClasses"; const #7 = Utf8 "NestMembers"; const #8 = Utf8 "Test01.jasm"; const #9 = Utf8 "SourceFile"; const #10 = Utf8 "java/lang/Object"; const #11 = Class #10; // java/lang/Object SourceFile #8; // Test01.jasm InnerClasses { public #3 = #5 of #2; // NestMember01 = class NestMember01 of class Test01 } NestMembers #5; // NestMember01 } // end Class org/openjdk/asmtools/attribute/NestMembers/Test01/Test01 compiled from "Test01.jasm" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/NestMembers/Test01.jasm000066400000000000000000000006651514323636100326560ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package org/openjdk/asmtools/attribute/NestMembers/Test01; public class Test01 version 55:0 { InnerClass public NestMember01 = class NestMember01 of class Test01; NestMembers NestMember01; } // end Class org/openjdk/asmtools/attribute/NestMembers/Test01 jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/NestMembers/Test01.jcod000066400000000000000000000053021514323636100326340ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ class org/openjdk/asmtools/attribute/NestMembers/Test01 { 0xCAFEBABE; 0; // minor version 55; // version [12] { // Constant Pool ; // first element is empty Utf8 "org/openjdk/asmtools/attribute/NestMembers/Test01"; // #1 at 0x0A Class #1; // #2 at 0x3D Utf8 "NestMember01"; // #3 at 0x40 Utf8 "org/openjdk/asmtools/attribute/NestMembers/Test01/NestMember01"; // #4 at 0x4F Class #4; // #5 at 0x88 Utf8 "InnerClasses"; // #6 at 0x8B Utf8 "NestMembers"; // #7 at 0x9A Utf8 "Test01.jasm"; // #8 at 0xA8 Utf8 "SourceFile"; // #9 at 0xB6 Utf8 "java/lang/Object"; // #10 at 0xC3 Class #10; // #11 at 0xD6 } // end of Constant Pool 0x0001; // access [ ACC_PUBLIC ] #2; // this_cpx #11; // super_cpx [0] { // Interfaces } // end of Interfaces [0] { // Fields } // end of Fields [0] { // Methods } // end of Methods [3] { // Attributes Attr(#9, 2) { // SourceFile at 0xE7 #8; } // end of SourceFile ; Attr(#6, 10) { // InnerClasses at 0xEF [1] { // classes #5 #2 #3 1; // access [ ACC_PUBLIC ] } } // end of InnerClasses ; Attr(#7, 4) { // NestMembers at 0xFF [1] { // classes #5; // class: org/openjdk/asmtools/attribute/NestMembers/Test01/NestMember01 at 0x0109 } } // end of NestMembers } // end of Attributes } // end of class org/openjdk/asmtools/attribute/NestMembers/Test01 jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/NestMembers/Test02.jasm000066400000000000000000000125161514323636100326550ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javasoft/sqe/tests/api/java/lang/reflect/RecordComponent; public final super class Test02 extends java/lang/Record version 69:0 { private final Field cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02$ClassInsideRecord;"; public Method "":"(Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02$ClassInsideRecord;)V" stack 2 locals 2 { aload_0; invokespecial Method java/lang/Record."":"()V"; aload_0; aload_1; putfield Field cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02$ClassInsideRecord;"; return; } public final Method toString:"()Ljava/lang/String;" stack 1 locals 1 { aload_0; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ObjectMethods.bootstrap: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;": toString:"(Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02;)Ljava/lang/String;" { class Test02, String "cir", MethodHandle REF_getField:Test02.cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02$ClassInsideRecord;" }; areturn; } public final Method hashCode:"()I" stack 1 locals 1 { aload_0; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ObjectMethods.bootstrap: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;": hashCode:"(Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02;)I" { class Test02, String "cir", MethodHandle REF_getField:Test02.cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02$ClassInsideRecord;" }; ireturn; } public final Method equals:"(Ljava/lang/Object;)Z" stack 2 locals 2 { aload_0; aload_1; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ObjectMethods.bootstrap: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;": equals:"(Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02;Ljava/lang/Object;)Z" { class Test02, String "cir", MethodHandle REF_getField:Test02.cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02$ClassInsideRecord;" }; ireturn; } public Method cir:"()Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02$ClassInsideRecord;" stack 1 locals 1 { aload_0; getfield Field cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02$ClassInsideRecord;"; areturn; } SourceFile "Test02.java"; Record { Component cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02$ClassInsideRecord;"; } InnerClass ClassInsideRecord = class Test02$ClassInsideRecord of class Test02; InnerClass static ClassInsideRecord2 = class Test02$ClassInsideRecord2 of class Test02; InnerClass static final InnerRecord = class Test02$InnerRecord of class Test02; InnerClass static abstract InnerInteface = class Test02$ClassInsideRecord2$InnerInteface of class Test02$ClassInsideRecord2; InnerClass static final InnerInnerRecord = class Test02$InnerRecord$InnerInnerRecord of class Test02$InnerRecord; InnerClass public static final Lookup = class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles; NestMembers Test02$ClassInsideRecord2, Test02$ClassInsideRecord2$InnerInteface, Test02$ClassInsideRecord, Test02$InnerRecord, Test02$InnerRecord$InnerInnerRecord; BootstrapMethod REF_invokeStatic:java/lang/runtime/ObjectMethods.bootstrap: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;"; { class Test02, String "cir", MethodHandle REF_getField:Test02.cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02$ClassInsideRecord;" } } // end Class javasoft/sqe/tests/api/java/lang/reflect/RecordComponent/Test02 compiled from "Test02.java" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/PermittedSubclasses/000077500000000000000000000000001514323636100324545ustar00rootroot00000000000000Test01.g.t.jasm000066400000000000000000000063431514323636100350260ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/PermittedSubclasses/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package org/openjdk/asmtools/attribute/PermittedSubclasses; public super class #3 /* Test01 */ version 62:0 { const #1 = Methodref #9.#10; // java/lang/Object."":"()V" const #2 = Utf8 "org/openjdk/asmtools/attribute/PermittedSubclasses/Test01"; const #3 = Class #2; // Test01 const #4 = Utf8 ""; const #5 = Utf8 "()V"; const #6 = Utf8 "Code"; const #7 = Utf8 "LineNumberTable"; const #8 = Utf8 "java/lang/Object"; const #9 = Class #8; // java/lang/Object const #10 = NameAndType #4:#5; // "":"()V" const #11 = Utf8 "NestMember01"; const #12 = Class #11; // NestMember01 const #13 = Utf8 "Test01"; const #14 = Class #13; // Test01 const #15 = Utf8 "InnerClasses"; const #16 = Utf8 "NestMember02"; const #17 = Class #16; // NestMember02 const #18 = Utf8 "NestMember03"; const #19 = Class #18; // NestMember03 const #20 = Utf8 "NestMember04"; const #21 = Class #20; // NestMember04 const #22 = Utf8 "SubClass01"; const #23 = Utf8 "SubClass02"; const #24 = Utf8 "SubClass03"; const #25 = Utf8 "SubClass04"; const #26 = Utf8 "PermittedSubclasses"; const #27 = Class #22; // SubClass01 const #28 = Class #23; // SubClass02 const #29 = Class #24; // SubClass03 const #30 = Class #25; // SubClass04 const #31 = Utf8 "NestMembers"; const #32 = Utf8 "Test01.jasm"; const #33 = Utf8 "SourceFile"; public Method #4:#5 // "":"()V" stack 1 locals 1 { 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: return; } SourceFile #32; // Test01.jasm InnerClasses { public #11 = #12 of #14; // NestMember01 = class NestMember01 of class Test01 public #16 = #17 of #14; // NestMember02 = class NestMember02 of class Test01 public #18 = #19 of #14; // NestMember03 = class NestMember03 of class Test01 public #20 = #21 of #14; // NestMember04 = class NestMember04 of class Test01 } NestMembers #12, // NestMember01 #17, // NestMember02 #19, // NestMember03 #21; // NestMember04 PermittedSubclasses #27, // SubClass01 #28, // SubClass02 #29, // SubClass03 #30; // SubClass04 } // end Class org/openjdk/asmtools/attribute/PermittedSubclasses/Test01 compiled from "Test01.jasm" Test01.jasm000066400000000000000000000016761514323636100343430ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/PermittedSubclasses/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ super public class org/openjdk/asmtools/attribute/PermittedSubclasses/Test01 version 62:0 { public Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } InnerClass public NestMember01 = class NestMember01 of class Test01; InnerClass public NestMember02 = class NestMember02 of class Test01; InnerClass public NestMember03 = class NestMember03 of class Test01; InnerClass public NestMember04 = class NestMember04 of class Test01; PermittedSubclasses SubClass01, SubClass02, SubClass03, SubClass04; NestMembers NestMember01, NestMember02, NestMember03, NestMember04; } // end Class Test01 Test01.jcod000066400000000000000000000071031514323636100343170ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/PermittedSubclasses/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ class org/openjdk/asmtools/attribute/PermittedSubclasses/Test01 { 0xCAFEBABE; 0; // minor version 62; // version [15] { // Constant Pool ; // first element is empty Method #8 #9; // #1 at 0x0A Utf8 "org/openjdk/asmtools/attribute/PermittedSubclasses/Test01"; // #2 at 0x0F Class #2; // #3 at 0x37 Utf8 ""; // #4 at 0x3A Utf8 "()V"; // #5 at 0x43 Utf8 "Code"; // #6 at 0x49 Utf8 "java/lang/Object"; // #7 at 0x50 Class #7; // #8 at 0x63 NameAndType #4 #5; // #9 at 0x66 Utf8 "org/openjdk/asmtools/attribute/PermittedSubclasses/atr/SubClass01"; // #10 at 0x6B Utf8 "PermittedSubclasses"; // #11 at 0x9B Class #10; // #12 at 0xB1 Utf8 "Test01.jasm"; // #13 at 0xB4 Utf8 "SourceFile"; // #14 at 0xC2 } // end of Constant Pool 0x0021; // access [ ACC_PUBLIC, ACC_SUPER ] #3; // this_cpx #8; // super_cpx [0] { // Interfaces } // end of Interfaces [0] { // Fields } // end of Fields [1] { // Methods { // method at 0xDB 0x0001; // access #4; // name_index : #5; // descriptor_index : ()V [1] { // Attributes Attr(#6, 17) { // Code at 0xE3 1; // max_stack 1; // max_locals Bytes[5]{ 0x2A 0xB7 0x00 0x01 0xB1; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [2] { // Attributes Attr(#14, 2) { // SourceFile at 0xFC #13; } // end of SourceFile ; Attr(#11, 4) { // PermittedSubclasses at 0x0104 [1] { // subclasses #12; // subclass: org/openjdk/asmtools/attribute/PermittedSubclasses/atr/SubClass01 at 0x010E } } // end of PermittedSubclasses } // end of Attributes } // end of class org/openjdk/asmtools/attribute/PermittedSubclasses/Test01 Test02.jasm000066400000000000000000000125541514323636100343410ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/PermittedSubclasses/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javasoft/sqe/tests/api/java/lang/reflect/RecordComponent02; public final super class Test02 extends java/lang/Record version 69:0 { private final Field cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02$ClassInsideRecord;"; public Method "":"(Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02$ClassInsideRecord;)V" stack 2 locals 2 { aload_0; invokespecial Method java/lang/Record."":"()V"; aload_0; aload_1; putfield Field cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02$ClassInsideRecord;"; return; } public final Method toString:"()Ljava/lang/String;" stack 1 locals 1 { aload_0; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ObjectMethods.bootstrap: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;": toString:"(Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02;)Ljava/lang/String;" { class Test02, String "cir", MethodHandle REF_getField:Test02.cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02$ClassInsideRecord;" }; areturn; } public final Method hashCode:"()I" stack 1 locals 1 { aload_0; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ObjectMethods.bootstrap: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;": hashCode:"(Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02;)I" { class Test02, String "cir", MethodHandle REF_getField:Test02.cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02$ClassInsideRecord;" }; ireturn; } public final Method equals:"(Ljava/lang/Object;)Z" stack 2 locals 2 { aload_0; aload_1; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ObjectMethods.bootstrap: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;": equals:"(Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02;Ljava/lang/Object;)Z" { class Test02, String "cir", MethodHandle REF_getField:Test02.cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02$ClassInsideRecord;" }; ireturn; } public Method cir:"()Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02$ClassInsideRecord;" stack 1 locals 1 { aload_0; getfield Field cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02$ClassInsideRecord;"; areturn; } SourceFile "Test02.java"; Record { Component cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02$ClassInsideRecord;"; } InnerClass ClassInsideRecord = class Test02$ClassInsideRecord of class Test02; InnerClass static ClassInsideRecord2 = class Test02$ClassInsideRecord2 of class Test02; InnerClass static final InnerRecord = class Test02$InnerRecord of class Test02; InnerClass static abstract InnerInteface = class Test02$ClassInsideRecord2$InnerInteface of class Test02$ClassInsideRecord2; InnerClass static final InnerInnerRecord = class Test02$InnerRecord$InnerInnerRecord of class Test02$InnerRecord; InnerClass public static final Lookup = class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles; PermittedSubclasses Test02$ClassInsideRecord2, Test02$ClassInsideRecord2$InnerInteface, Test02$ClassInsideRecord, Test02$InnerRecord, Test02$InnerRecord$InnerInnerRecord; BootstrapMethod REF_invokeStatic:java/lang/runtime/ObjectMethods.bootstrap: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;"; { class Test02, String "cir", MethodHandle REF_getField:Test02.cir:"Ljavasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02$ClassInsideRecord;" } } // end Class javasoft/sqe/tests/api/java/lang/reflect/RecordComponent02/Test02 compiled from "Test02.java" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/SourceDebugExtension/000077500000000000000000000000001514323636100325735ustar00rootroot00000000000000SourceDebugExt01.jasm000066400000000000000000000011241514323636100364170ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/SourceDebugExtension/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. */ package javasoft/sqe/tests/api/java/lang/classfile/resources/jasm/atr; public super class SourceDebugExt01 version 66:0 { public Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } SourceDebugExtension { "SMAP\nSourceDebugExt01.java\nJava\n*S Java\n*F\n+ 1 SourceDebugExt01.java\nSou"; "rceDebugExt01.java\n*L\n1#1,5:1\n*E"; } } // end Class SourceDebugExt01 compiled from "SourceDebugExt01.java" SourceDebugExt02.jasm000066400000000000000000000007331514323636100364250ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/SourceDebugExtension/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. */ package javasoft/sqe/tests/api/java/lang/classfile/resources/jasm/atr; public super class SourceDebugExt02 version 66:0 { public Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } SourceDebugExtension { ""; } } // end Class SourceDebugExt02 compiled from "SourceDebugExt02.java" SourceDebugExt03.jasm000066400000000000000000000010671514323636100364270ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/SourceDebugExtension/* * Copyright (c) 2025; Oracle and/or its affiliates. All rights reserved. */ package javasoft/sqe/tests/api/java/lang/classfile/resources/jasm/atr; public super class SourceDebugExt03 version 66:0 { public Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } SourceDebugExtension { 0x01; 0x02; 0x03; 0x04; 0x05; 0x06; 0x07; 0x08; 0x09; 0x0A; 0x00; 0x0B; 0x0C; 0x0D; 0x0E; 0x0F; } } // end Class SourceDebugExt03 compiled from "SourceDebugExt03.java" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/StackMapTable/000077500000000000000000000000001514323636100311425ustar00rootroot00000000000000StackMapData.g.jasm000066400000000000000000001170371514323636100344720ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/StackMapTablepackage org/openjdk/asmtools/attribute/StackMapTable/data; public super class #10 /* StackMapData */ version 69:0 { const #1 = Method #2.#3; // java/lang/Object."":"()V" const #2 = class #4; // java/lang/Object const #3 = NameAndType #5:#6; // "":"()V" const #4 = Utf8 "java/lang/Object"; const #5 = Utf8 ""; const #6 = Utf8 "()V"; const #7 = String #8; // "string" const #8 = Utf8 "string"; const #9 = Field #10.#11; // StackMapData.fldS:"Ljava/lang/String;" const #10 = class #12; // StackMapData const #11 = NameAndType #13:#14; // fldS:"Ljava/lang/String;" const #12 = Utf8 "org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData"; const #13 = Utf8 "fldS"; const #14 = Utf8 "Ljava/lang/String;"; const #15 = Field #10.#16; // StackMapData.fldFS:"Ljava/lang/String;" const #16 = NameAndType #17:#14; // fldFS:"Ljava/lang/String;" const #17 = Utf8 "fldFS"; const #18 = Method #2.#19; // java/lang/Object.toString:"()Ljava/lang/String;" const #19 = NameAndType #20:#21; // toString:"()Ljava/lang/String;" const #20 = Utf8 "toString"; const #21 = Utf8 "()Ljava/lang/String;"; const #22 = class #23; // java/lang/ArithmeticException const #23 = Utf8 "java/lang/ArithmeticException"; const #24 = Field #25.#26; // java/lang/System.out:"Ljava/io/PrintStream;" const #25 = class #27; // java/lang/System const #26 = NameAndType #28:#29; // out:"Ljava/io/PrintStream;" const #27 = Utf8 "java/lang/System"; const #28 = Utf8 "out"; const #29 = Utf8 "Ljava/io/PrintStream;"; const #30 = String #31; // "frame" const #31 = Utf8 "frame"; const #32 = Method #33.#34; // java/io/PrintStream.println:"(Ljava/lang/String;)V" const #33 = class #35; // java/io/PrintStream const #34 = NameAndType #36:#37; // println:"(Ljava/lang/String;)V" const #35 = Utf8 "java/io/PrintStream"; const #36 = Utf8 "println"; const #37 = Utf8 "(Ljava/lang/String;)V"; const #38 = float 100.0f; const #39 = Method #40.#41; // java/lang/Math.round:"(F)I" const #40 = class #42; // java/lang/Math const #41 = NameAndType #43:#44; // round:"(F)I" const #42 = Utf8 "java/lang/Math"; const #43 = Utf8 "round"; const #44 = Utf8 "(F)I"; const #45 = InvokeDynamic 0:#46; // #0:makeConcatWithConstants:"(I)Ljava/lang/String;" const #46 = NameAndType #47:#48; // makeConcatWithConstants:"(I)Ljava/lang/String;" const #47 = Utf8 "makeConcatWithConstants"; const #48 = Utf8 "(I)Ljava/lang/String;"; const #49 = float 3.14f; const #50 = InvokeDynamic 1:#46; // #1:makeConcatWithConstants:"(I)Ljava/lang/String;" const #51 = float 10.0f; const #52 = float 110.0f; const #53 = double 100.0d; const #55 = Method #40.#56; // java/lang/Math.round:"(D)J" const #56 = NameAndType #43:#57; // round:"(D)J" const #57 = Utf8 "(D)J"; const #58 = InvokeDynamic 2:#59; // #2:makeConcatWithConstants:"(J)Ljava/lang/String;" const #59 = NameAndType #47:#60; // makeConcatWithConstants:"(J)Ljava/lang/String;" const #60 = Utf8 "(J)Ljava/lang/String;"; const #61 = double 99.99d; const #63 = InvokeDynamic 3:#64; // #3:makeConcatWithConstants:"(D)Ljava/lang/String;" const #64 = NameAndType #47:#65; // makeConcatWithConstants:"(D)Ljava/lang/String;" const #65 = Utf8 "(D)Ljava/lang/String;"; const #66 = String #67; // "chop_frame" const #67 = Utf8 "chop_frame"; const #68 = String #69; // "_frame_" const #69 = Utf8 "_frame_"; const #70 = Method #33.#71; // java/io/PrintStream.println:"(D)V" const #71 = NameAndType #36:#72; // println:"(D)V" const #72 = Utf8 "(D)V"; const #73 = String #74; // "n_frame" const #74 = Utf8 "n_frame"; const #75 = InvokeDynamic 4:#76; // #4:makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" const #76 = NameAndType #47:#77; // makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" const #77 = Utf8 "(Ljava/lang/String;CI)Ljava/lang/String;"; const #78 = class #79; // java/lang/String const #79 = Utf8 "java/lang/String"; const #80 = Method #2.#81; // java/lang/Object.hashCode:"()I" const #81 = NameAndType #82:#83; // hashCode:"()I" const #82 = Utf8 "hashCode"; const #83 = Utf8 "()I"; const #84 = class #85; // java/lang/RuntimeException const #85 = Utf8 "java/lang/RuntimeException"; const #86 = String #87; // "Test exception" const #87 = Utf8 "Test exception"; const #88 = Method #84.#89; // java/lang/RuntimeException."":"(Ljava/lang/String;)V" const #89 = NameAndType #5:#37; // "":"(Ljava/lang/String;)V" const #90 = String #91; // "positive" const #91 = Utf8 "positive"; const #92 = String #93; // "non-positive" const #93 = Utf8 "non-positive"; const #94 = String #95; // "Computing result" const #95 = Utf8 "Computing result"; const #96 = Method #10.#3; // StackMapData."":"()V" const #97 = Method #10.#98; // StackMapData.generateFrames:"(I)V" const #98 = NameAndType #99:#100; // generateFrames:"(I)V" const #99 = Utf8 "generateFrames"; const #100 = Utf8 "(I)V"; const #101 = String #102; // "test" const #102 = Utf8 "test"; const #103 = Method #10.#104; // StackMapData.complexMethod:"(ILjava/lang/Object;)I" const #104 = NameAndType #105:#106; // complexMethod:"(ILjava/lang/Object;)I" const #105 = Utf8 "complexMethod"; const #106 = Utf8 "(ILjava/lang/Object;)I"; const #107 = Method #10.#108; // StackMapData.generateFullFrame:"(I)I" const #108 = NameAndType #109:#110; // generateFullFrame:"(I)I" const #109 = Utf8 "generateFullFrame"; const #110 = Utf8 "(I)I"; const #111 = Field #10.#112; // StackMapData.fldL:"J" const #112 = NameAndType #113:#114; // fldL:"J" const #113 = Utf8 "fldL"; const #114 = Utf8 "J"; const #115 = Utf8 "fldI"; const #116 = Utf8 "I"; const #117 = Utf8 "ConstantValue"; const #118 = int 0; const #119 = Utf8 "Code"; const #120 = Utf8 "StackMapTable"; const #121 = class #122; // java/lang/Throwable const #122 = Utf8 "java/lang/Throwable"; const #123 = Utf8 "main"; const #124 = Utf8 "([Ljava/lang/String;)V"; const #125 = Utf8 ""; const #126 = Utf8 "BootstrapMethods"; const #127 = String #128; // "item_frame\u0001" const #128 = Utf8 "item_frame\u0001"; const #129 = String #130; // "item_frame_\u0001" const #130 = Utf8 "item_frame_\u0001"; const #131 = String #132; // "_frame: \u0001" const #132 = Utf8 "_frame: \u0001"; const #133 = String #134; // "Before chop_frame: \u0001" const #134 = Utf8 "Before chop_frame: \u0001"; const #135 = String #136; // "\u0001: \u0001\u0001" const #136 = Utf8 "\u0001: \u0001\u0001"; const #137 = MethodHandle 6:#138; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #138 = Method #139.#140; // java/lang/invoke/StringConcatFactory.makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #139 = class #141; // java/lang/invoke/StringConcatFactory const #140 = NameAndType #47:#142; // makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #141 = Utf8 "java/lang/invoke/StringConcatFactory"; const #142 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; const #143 = Utf8 "InnerClasses"; const #144 = class #145; // java/lang/invoke/MethodHandles$Lookup const #145 = Utf8 "java/lang/invoke/MethodHandles$Lookup"; const #146 = class #147; // java/lang/invoke/MethodHandles const #147 = Utf8 "java/lang/invoke/MethodHandles"; const #148 = Utf8 "Lookup"; static final Field #115:#116 = #118; // fldI:I = int 0 static Field #113:#114; // fldL:J protected Field #13:#14; // fldS:"Ljava/lang/String;" public final Field #17:#14 = #7; // fldFS:"Ljava/lang/String;" = String "string" public Method #5:#6 // "":"()V" stack 2 locals 1 { 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: aload_0; 5: ldc #7; // String "string" 7: putfield #9; // Field fldS:"Ljava/lang/String;" 10: aload_0; 11: ldc #7; // String "string" 13: putfield #15; // Field fldFS:"Ljava/lang/String;" 16: return; } public Method #99:#100 // generateFrames:"(I)V" stack 5 locals 10 { 0: iconst_0; 1: istore_2; 2: aconst_null; 3: astore_3; try T0, T1; 4: iconst_1; 5: iload_2; 6: idiv; 7: istore_2; endtry T0,T1; 8: aload_3; 9: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 12: pop; 13: goto 44; catch T0 #22; // java/lang/ArithmeticException try T2; 16: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16; // fldFS:"Ljava/lang/String;"; frame_type full; // frame_type 255 locals_map #10, 1, 1, #2; // class StackMapData, int, int, class java/lang/Object; stack_map #22; // class java/lang/ArithmeticException; astore 4; 18: new #2; // class java/lang/Object 21: dup; 22: invokespecial #1; // Method java/lang/Object."":"()V" 25: astore_3; endtry T2; 26: aload_3; 27: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 30: pop; 31: goto 44; catch T1 #0; // any catch T2 #0; // any catch T3 #0; // any try T3; 34: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16; // fldFS:"Ljava/lang/String;"; frame_type stack1; // frame_type 81 stack_map #121; // class java/lang/Throwable; astore 5; endtry T3; 36: aload_3; 37: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 40: pop; 41: aload 5; 43: athrow; 44: stack_frame_type early_larval; // frame_type 246 unset_fields #26, // out:"Ljava/io/PrintStream;", #16; // fldFS:"Ljava/lang/String;"; frame_type same; // frame_type 9 iload_2; 45: ifne 50; 48: aconst_null; 49: astore_3; 50: stack_frame_type same; // frame_type 5 iload_2; 51: lookupswitch { // 2 1: 76; 2: 87; default: 87 }; 76: stack_frame_type same; // frame_type 25 new #2; // class java/lang/Object 79: dup; 80: invokespecial #1; // Method java/lang/Object."":"()V" 83: astore_3; 84: goto 87; 87: stack_frame_type same; // frame_type 10 iload_1; 88: ifne 99; 91: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 94: ldc #30; // String "frame" 96: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 99: stack_frame_type same; // frame_type 11 iload_1; 100: iconst_1; 101: if_icmpne 127; 104: bipush 42; 106: istore 4; 108: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 111: iload 4; 113: ldc #38; // float 100.0f 115: invokestatic #39; // Method java/lang/Math.round:"(F)I" 118: imul; 119: invokedynamic #45; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(I)Ljava/lang/String;" { // String "item_frame\u0001" // } 124: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 127: stack_frame_type same; // frame_type 27 iload_1; 128: iconst_2; 129: if_icmpne 184; 132: iconst_0; 133: istore 4; 135: iconst_0; 136: istore 5; 138: stack_frame_type early_larval; // frame_type 246 unset_fields; frame_type append; // frame_type 253 locals_map 1, 1; // int, int; iload 5; 140: sipush 3000; 143: if_icmpge 171; 146: ldc #49; // float 3.14f 148: fstore 6; 150: iload 4; 152: fload 6; 154: ldc #38; // float 100.0f 156: invokestatic #39; // Method java/lang/Math.round:"(F)I" 159: i2f; 160: fmul; 161: f2i; 162: iadd; 163: istore 4; 165: iinc 5, 1; 168: goto 138; 171: stack_frame_type chop1; // frame_type 250 getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 174: iload 4; 176: invokedynamic #50; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(I)Ljava/lang/String;" { // String "item_frame_\u0001" // } 181: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 184: stack_frame_type chop1; // frame_type 250 ldc #51; // float 10.0f 186: invokestatic #39; // Method java/lang/Math.round:"(F)I" 189: istore 4; 191: iload_1; 192: iconst_3; 193: if_icmpne 232; 196: ldc #52; // float 110.0f 198: invokestatic #39; // Method java/lang/Math.round:"(F)I" 201: istore 5; 203: ldc2_w #53; // double 100.0d 206: invokestatic #55; // Method java/lang/Math.round:"(D)J" 209: lstore 6; 211: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 214: iload 5; 216: i2l; 217: lload 6; 219: ladd; 220: iload 4; 222: i2l; 223: lmul; 224: invokedynamic #58; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(J)Ljava/lang/String;" { // String "_frame: \u0001" // } 229: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 232: stack_frame_type append; // frame_type 252 locals_map 1; // int; iload_1; 233: iconst_4; 234: if_icmpne 273; 237: bipush 50; 239: iload 4; 241: imul; 242: istore 5; 244: ldc2_w #61; // double 99.99d 247: iload 4; 249: i2d; 250: dmul; 251: dstore 6; 253: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 256: iload 5; 258: i2d; 259: dload 6; 261: dadd; 262: invokedynamic #63; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(D)Ljava/lang/String;" { // String "Before chop_frame: \u0001" // } 267: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 270: goto 281; 273: stack_frame_type same; // frame_type 40 getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 276: ldc #66; // String "chop_frame" 278: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 281: stack_frame_type same; // frame_type 7 iload_1; 282: iconst_5; 283: if_icmpne 379; 286: iconst_0; 287: istore 5; 289: iconst_0; 290: istore 6; 292: stack_frame_type append; // frame_type 253 locals_map 1, 1; // int, int; iload 6; 294: sipush 2500; 297: if_icmpge 326; 300: ldc #49; // float 3.14f 302: fstore 7; 304: iload 5; 306: fload 7; 308: iload 6; 310: i2f; 311: invokestatic #39; // Method java/lang/Math.round:"(F)I" 314: i2f; 315: fmul; 316: f2i; 317: iadd; 318: istore 5; 320: iinc 6, 1; 323: goto 292; 326: stack_frame_type early_larval; // frame_type 246 unset_fields; frame_type chop1; // frame_type 250 iload 5; 328: bipush 100; 330: if_icmple 344; 333: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 336: ldc #68; // String "_frame_" 338: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 341: goto 379; 344: stack_frame_type same; // frame_type 17 iload 5; 346: bipush 50; 348: if_icmpge 379; 351: bipush 50; 353: iload 4; 355: imul; 356: istore 6; 358: ldc2_w #61; // double 99.99d 361: iload 4; 363: i2d; 364: dmul; 365: dstore 7; 367: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 370: iload 6; 372: i2d; 373: dload 7; 375: dadd; 376: invokevirtual #70; // Method java/io/PrintStream.println:"(D)V" 379: stack_frame_type chop1; // frame_type 250 iload_1; 380: bipush 6; 382: if_icmpne 414; 385: ldc #73; // String "n_frame" 387: astore 5; 389: bipush 70; 391: istore 6; 393: bipush 100; 395: istore 7; 397: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 400: aload 5; 402: iload 6; 404: iload 7; 406: invokedynamic #75; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" { // String "\u0001: \u0001\u0001" // } 411: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 414: stack_frame_type same; // frame_type 34 iconst_0; 415: istore 5; 417: aconst_null; 418: astore 6; try T4, T5; 420: iconst_1; 421: iload 5; 423: idiv; 424: istore 5; endtry T4,T5; 426: aload 6; 428: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 431: pop; 432: goto 466; catch T4 #22; // java/lang/ArithmeticException try T6; 435: stack_frame_type full; // frame_type 255 locals_map #10, 1, 1, #2, 1, 1, #2; // class StackMapData, int, int, class java/lang/Object, int, int, class java/lang/Object; stack_map #22; // class java/lang/ArithmeticException; astore 7; 437: new #2; // class java/lang/Object 440: dup; 441: invokespecial #1; // Method java/lang/Object."":"()V" 444: astore 6; endtry T6; 446: aload 6; 448: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 451: pop; 452: goto 466; catch T5 #0; // any catch T6 #0; // any catch T7 #0; // any try T7; 455: stack_frame_type stack1; // frame_type 83 stack_map #121; // class java/lang/Throwable; astore 9; endtry T7; 457: aload 6; 459: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 462: pop; 463: aload 9; 465: athrow; 466: stack_frame_type same; // frame_type 10 iload 5; 468: ifne 474; 471: aconst_null; 472: astore 6; 474: stack_frame_type same; // frame_type 7 iload_2; 475: lookupswitch { // 2 1: 500; 2: 512; default: 512 }; 500: stack_frame_type same; // frame_type 25 new #2; // class java/lang/Object 503: dup; 504: invokespecial #1; // Method java/lang/Object."":"()V" 507: astore 6; 509: goto 512; 512: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16, // fldFS:"Ljava/lang/String;", #26, // out:"Ljava/io/PrintStream;", #112; // fldL:"J"; frame_type same; // frame_type 11 return; } public Method #105:#106 // complexMethod:"(ILjava/lang/Object;)I" stack 3 locals 7 { 0: iconst_0; 1: istore_3; 2: iconst_1; 3: istore 4; 5: aconst_null; 6: astore 5; try T0; 8: iload_1; 9: ifle 47; 12: iload_1; 13: iconst_1; 14: iadd; 15: istore_3; 16: aload_2; 17: instanceof #78; // class java/lang/String 20: ifeq 39; 23: aload_2; 24: checkcast #78; // class java/lang/String 27: astore 5; 29: aload 5; 31: invokevirtual #80; // Method java/lang/Object.hashCode:"()I" 34: istore 4; 36: iload 4; endtry T0; 38: ireturn; try T1; 39: stack_frame_type append; // frame_type 254 locals_map 1, 1, #2; // int, int, class java/lang/Object; iload_3; 40: iconst_2; 41: imul; 42: istore 4; 44: goto 104; 47: stack_frame_type same; // frame_type 7 iload_1; 48: iconst_m1; 49: if_icmpne 70; 52: iload_1; 53: ineg; 54: istore_3; 55: iload_3; 56: iconst_3; 57: iadd; 58: istore 4; 60: new #84; // class java/lang/RuntimeException 63: dup; 64: ldc #86; // String "Test exception" 66: invokespecial #88; // Method java/lang/RuntimeException."":"(Ljava/lang/String;)V" 69: athrow; 70: stack_frame_type same; // frame_type 22 iconst_0; 71: istore 6; 73: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16, // fldFS:"Ljava/lang/String;", #26, // out:"Ljava/io/PrintStream;", #112; // fldL:"J"; frame_type append; // frame_type 252 locals_map 1; // int; iload 6; 75: iconst_2; 76: if_icmpge 104; 79: iload_3; 80: iload 6; 82: iadd; 83: istore_3; 84: iload_3; 85: iconst_1; 86: if_icmple 98; 89: iload_3; 90: iload 6; 92: isub; 93: istore 4; 95: goto 104; 98: stack_frame_type same; // frame_type 24 iinc 6, 1; 101: goto 73; endtry T1; 104: stack_frame_type chop1; // frame_type 250 goto 118; catch T0 #84; // java/lang/RuntimeException catch T1 #84; // java/lang/RuntimeException 107: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16, // fldFS:"Ljava/lang/String;", #26, // out:"Ljava/io/PrintStream;", #112; // fldL:"J"; frame_type stack1; // frame_type 66 stack_map #84; // class java/lang/RuntimeException; astore 6; 109: aload 6; 111: astore 5; 113: iload_3; 114: iconst_5; 115: iadd; 116: istore 4; 118: stack_frame_type same; // frame_type 10 iload_3; 119: iload 4; 121: iadd; 122: ireturn; } public Method #109:#110 // generateFullFrame:"(I)I" stack 3 locals 6 { 0: iconst_0; 1: istore_2; 2: aconst_null; 3: astore_3; 4: iconst_0; 5: istore 4; try T0; 7: iload_1; 8: ifle 25; 11: ldc #90; // String "positive" 13: astore_3; 14: iconst_1; 15: istore 4; 17: aload_3; 18: invokevirtual #80; // Method java/lang/Object.hashCode:"()I" 21: istore_2; 22: goto 39; 25: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16, // fldFS:"Ljava/lang/String;", #26, // out:"Ljava/io/PrintStream;", #112; // fldL:"J"; frame_type append; // frame_type 254 locals_map 1, #2, 1; // int, class java/lang/Object, int; iload_1; 26: iconst_2; 27: imul; 28: istore_2; 29: new #84; // class java/lang/RuntimeException 32: dup; 33: ldc #92; // String "non-positive" 35: invokespecial #88; // Method java/lang/RuntimeException."":"(Ljava/lang/String;)V" 38: athrow; endtry T0; 39: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16, // fldFS:"Ljava/lang/String;", #26; // out:"Ljava/io/PrintStream;"; frame_type same; // frame_type 13 goto 53; catch T0 #84; // java/lang/RuntimeException 42: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16; // fldFS:"Ljava/lang/String;"; frame_type stack1; // frame_type 66 stack_map #84; // class java/lang/RuntimeException; astore 5; 44: aload 5; 46: astore_3; 47: iconst_0; 48: istore 4; 50: iload_1; 51: ineg; 52: istore_2; 53: stack_frame_type early_larval; // frame_type 246 unset_fields #11; // fldS:"Ljava/lang/String;"; frame_type same; // frame_type 10 iload 4; 55: ifeq 62; 58: iload_2; 59: iconst_1; 60: iadd; 61: ireturn; 62: stack_frame_type early_larval; // frame_type 246 unset_fields; frame_type same; // frame_type 8 getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 65: ldc #94; // String "Computing result" 67: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 70: iload_2; 71: ireturn; } public static Method #123:#124 // main:"([Ljava/lang/String;)V" stack 3 locals 3 { 0: new #10; // class StackMapData 3: dup; 4: invokespecial #96; // Method "":"()V" 7: astore_1; 8: iconst_0; 9: istore_2; 10: stack_frame_type early_larval; // frame_type 246 unset_fields; frame_type append; // frame_type 253 locals_map #10, 1; // class StackMapData, int; iload_2; 11: bipush 6; 13: if_icmpgt 27; 16: aload_1; 17: iload_2; 18: invokevirtual #97; // Method generateFrames:"(I)V" 21: iinc 2, 1; 24: goto 10; 27: stack_frame_type chop1; // frame_type 250 aload_1; 28: iconst_0; 29: ldc #101; // String "test" 31: invokevirtual #103; // Method complexMethod:"(ILjava/lang/Object;)I" 34: pop; 35: aload_1; 36: bipush 23; 38: invokevirtual #107; // Method generateFullFrame:"(I)I" 41: pop; 42: return; } static Method #125:#6 // "":"()V" stack 2 locals 0 { 0: lconst_1; 1: putstatic #111; // Field fldL:"J" 4: return; } InnerClass public static final #148 = #144 of #146; // Lookup = class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles BootstrapMethod #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { #127 // String "item_frame\u0001" } BootstrapMethod #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { #129 // String "item_frame_\u0001" } BootstrapMethod #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { #131 // String "_frame: \u0001" } BootstrapMethod #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { #133 // String "Before chop_frame: \u0001" } BootstrapMethod #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { #135 // String "\u0001: \u0001\u0001" } } // end Class org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData StackMapData.g.jcod000066400000000000000000000730641514323636100344600ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/StackMapTableclass org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData { 0xCAFEBABE; 0; // minor version 69; // version [149] { // Constant Pool ; // first element is empty Method #2 #3; // #1 at 0x0A Class #4; // #2 at 0x0F NameAndType #5 #6; // #3 at 0x12 Utf8 "java/lang/Object"; // #4 at 0x17 Utf8 ""; // #5 at 0x2A Utf8 "()V"; // #6 at 0x33 String #8; // #7 at 0x39 Utf8 "string"; // #8 at 0x3C Field #10 #11; // #9 at 0x45 Class #12; // #10 at 0x4A NameAndType #13 #14; // #11 at 0x4D Utf8 "org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData"; // #12 at 0x52 Utf8 "fldS"; // #13 at 0x93 Utf8 "Ljava/lang/String;"; // #14 at 0x9A Field #10 #16; // #15 at 0xAF NameAndType #17 #14; // #16 at 0xB4 Utf8 "fldFS"; // #17 at 0xB9 Method #2 #19; // #18 at 0xC1 NameAndType #20 #21; // #19 at 0xC6 Utf8 "toString"; // #20 at 0xCB Utf8 "()Ljava/lang/String;"; // #21 at 0xD6 Class #23; // #22 at 0xED Utf8 "java/lang/ArithmeticException"; // #23 at 0xF0 Field #25 #26; // #24 at 0x0110 Class #27; // #25 at 0x0115 NameAndType #28 #29; // #26 at 0x0118 Utf8 "java/lang/System"; // #27 at 0x011D Utf8 "out"; // #28 at 0x0130 Utf8 "Ljava/io/PrintStream;"; // #29 at 0x0136 String #31; // #30 at 0x014E Utf8 "frame"; // #31 at 0x0151 Method #33 #34; // #32 at 0x0159 Class #35; // #33 at 0x015E NameAndType #36 #37; // #34 at 0x0161 Utf8 "java/io/PrintStream"; // #35 at 0x0166 Utf8 "println"; // #36 at 0x017C Utf8 "(Ljava/lang/String;)V"; // #37 at 0x0186 Float 0x42C80000; // #38 at 0x019E Method #40 #41; // #39 at 0x01A3 Class #42; // #40 at 0x01A8 NameAndType #43 #44; // #41 at 0x01AB Utf8 "java/lang/Math"; // #42 at 0x01B0 Utf8 "round"; // #43 at 0x01C1 Utf8 "(F)I"; // #44 at 0x01C9 InvokeDynamic 0s #46; // #45 at 0x01D0 NameAndType #47 #48; // #46 at 0x01D5 Utf8 "makeConcatWithConstants"; // #47 at 0x01DA Utf8 "(I)Ljava/lang/String;"; // #48 at 0x01F4 Float 0x4048F5C3; // #49 at 0x020C InvokeDynamic 1s #46; // #50 at 0x0211 Float 0x41200000; // #51 at 0x0216 Float 0x42DC0000; // #52 at 0x021B Double 0x4059000000000000;; // #53 at 0x0220 Method #40 #56; // #55 at 0x0229 NameAndType #43 #57; // #56 at 0x022E Utf8 "(D)J"; // #57 at 0x0233 InvokeDynamic 2s #59; // #58 at 0x023A NameAndType #47 #60; // #59 at 0x023F Utf8 "(J)Ljava/lang/String;"; // #60 at 0x0244 Double 0x4058FF5C28F5C28F;; // #61 at 0x025C InvokeDynamic 3s #64; // #63 at 0x0265 NameAndType #47 #65; // #64 at 0x026A Utf8 "(D)Ljava/lang/String;"; // #65 at 0x026F String #67; // #66 at 0x0287 Utf8 "chop_frame"; // #67 at 0x028A String #69; // #68 at 0x0297 Utf8 "_frame_"; // #69 at 0x029A Method #33 #71; // #70 at 0x02A4 NameAndType #36 #72; // #71 at 0x02A9 Utf8 "(D)V"; // #72 at 0x02AE String #74; // #73 at 0x02B5 Utf8 "n_frame"; // #74 at 0x02B8 InvokeDynamic 4s #76; // #75 at 0x02C2 NameAndType #47 #77; // #76 at 0x02C7 Utf8 "(Ljava/lang/String;CI)Ljava/lang/String;"; // #77 at 0x02CC Class #79; // #78 at 0x02F7 Utf8 "java/lang/String"; // #79 at 0x02FA Method #2 #81; // #80 at 0x030D NameAndType #82 #83; // #81 at 0x0312 Utf8 "hashCode"; // #82 at 0x0317 Utf8 "()I"; // #83 at 0x0322 Class #85; // #84 at 0x0328 Utf8 "java/lang/RuntimeException"; // #85 at 0x032B String #87; // #86 at 0x0348 Utf8 "Test exception"; // #87 at 0x034B Method #84 #89; // #88 at 0x035C NameAndType #5 #37; // #89 at 0x0361 String #91; // #90 at 0x0366 Utf8 "positive"; // #91 at 0x0369 String #93; // #92 at 0x0374 Utf8 "non-positive"; // #93 at 0x0377 String #95; // #94 at 0x0386 Utf8 "Computing result"; // #95 at 0x0389 Method #10 #3; // #96 at 0x039C Method #10 #98; // #97 at 0x03A1 NameAndType #99 #100; // #98 at 0x03A6 Utf8 "generateFrames"; // #99 at 0x03AB Utf8 "(I)V"; // #100 at 0x03BC String #102; // #101 at 0x03C3 Utf8 "test"; // #102 at 0x03C6 Method #10 #104; // #103 at 0x03CD NameAndType #105 #106; // #104 at 0x03D2 Utf8 "complexMethod"; // #105 at 0x03D7 Utf8 "(ILjava/lang/Object;)I"; // #106 at 0x03E7 Method #10 #108; // #107 at 0x0400 NameAndType #109 #110; // #108 at 0x0405 Utf8 "generateFullFrame"; // #109 at 0x040A Utf8 "(I)I"; // #110 at 0x041E Field #10 #112; // #111 at 0x0425 NameAndType #113 #114; // #112 at 0x042A Utf8 "fldL"; // #113 at 0x042F Utf8 "J"; // #114 at 0x0436 Utf8 "fldI"; // #115 at 0x043A Utf8 "I"; // #116 at 0x0441 Utf8 "ConstantValue"; // #117 at 0x0445 Integer 0x00000000; // #118 at 0x0455 Utf8 "Code"; // #119 at 0x045A Utf8 "StackMapTable"; // #120 at 0x0461 Class #122; // #121 at 0x0471 Utf8 "java/lang/Throwable"; // #122 at 0x0474 Utf8 "main"; // #123 at 0x048A Utf8 "([Ljava/lang/String;)V"; // #124 at 0x0491 Utf8 ""; // #125 at 0x04AA Utf8 "BootstrapMethods"; // #126 at 0x04B5 String #128; // #127 at 0x04C8 Utf8 "item_frame\u0001"; // #128 at 0x04CB String #130; // #129 at 0x04D9 Utf8 "item_frame_\u0001"; // #130 at 0x04DC String #132; // #131 at 0x04EB Utf8 "_frame: \u0001"; // #132 at 0x04EE String #134; // #133 at 0x04FA Utf8 "Before chop_frame: \u0001"; // #134 at 0x04FD String #136; // #135 at 0x0514 Utf8 "\u0001: \u0001\u0001"; // #136 at 0x0517 MethodHandle 6b #138; // #137 at 0x051F Method #139 #140; // #138 at 0x0523 Class #141; // #139 at 0x0528 NameAndType #47 #142; // #140 at 0x052B Utf8 "java/lang/invoke/StringConcatFactory"; // #141 at 0x0530 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #142 at 0x0557 Utf8 "InnerClasses"; // #143 at 0x05F2 Class #145; // #144 at 0x0601 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #145 at 0x0604 Class #147; // #146 at 0x062C Utf8 "java/lang/invoke/MethodHandles"; // #147 at 0x062F Utf8 "Lookup"; // #148 at 0x0650 } // end of Constant Pool 0x0021; // access [ ACC_PUBLIC, ACC_SUPER ] #10; // this_cpx #2; // super_cpx [0] { // Interfaces } // end of Interfaces [4] { // Fields { // field at 0x0663 0x0018; // access #115; // name_index : fldI #116; // descriptor_index : I [1] { // Attributes Attr(#117, 2) { // ConstantValue at 0x066B #118; } // end of ConstantValue } // end of Attributes } ; { // field at 0x0673 0x0008; // access #113; // name_index : fldL #114; // descriptor_index : J [0] { // Attributes } // end of Attributes } ; { // field at 0x067B 0x0004; // access #13; // name_index : fldS #14; // descriptor_index : Ljava/lang/String; [0] { // Attributes } // end of Attributes } ; { // field at 0x0683 0x0011; // access #17; // name_index : fldFS #14; // descriptor_index : Ljava/lang/String; [1] { // Attributes Attr(#117, 2) { // ConstantValue at 0x068B #7; } // end of ConstantValue } // end of Attributes } } // end of Fields [6] { // Methods { // method at 0x0695 0x0001; // access #5; // name_index : #6; // descriptor_index : ()V [1] { // Attributes Attr(#119, 29) { // Code at 0x069D 2; // max_stack 1; // max_locals Bytes[17]{ 0x2A 0xB7 0x00 0x01 0x2A 0x12 0x07 0xB5 0x00 0x09 0x2A 0x12; 0x07 0xB5 0x00 0x0F 0xB1; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x06C0 0x0001; // access #99; // name_index : generateFrames #100; // descriptor_index : (I)V [1] { // Attributes Attr(#119, 724) { // Code at 0x06C8 5; // max_stack 10; // max_locals Bytes[513]{ 0x03 0x3D 0x01 0x4E 0x04 0x1C 0x6C 0x3D 0x2D 0xB6 0x00 0x12; 0x57 0xA7 0x00 0x1F 0x3A 0x04 0xBB 0x00 0x02 0x59 0xB7 0x00; 0x01 0x4E 0x2D 0xB6 0x00 0x12 0x57 0xA7 0x00 0x0D 0x3A 0x05; 0x2D 0xB6 0x00 0x12 0x57 0x19 0x05 0xBF 0x1C 0x9A 0x00 0x05; 0x01 0x4E 0x1C 0xAB 0x00 0x00 0x00 0x24 0x00 0x00 0x00 0x02; 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x19 0x00 0x00 0x00 0x02; 0x00 0x00 0x00 0x24 0xBB 0x00 0x02 0x59 0xB7 0x00 0x01 0x4E; 0xA7 0x00 0x03 0x1B 0x9A 0x00 0x0B 0xB2 0x00 0x18 0x12 0x1E; 0xB6 0x00 0x20 0x1B 0x04 0xA0 0x00 0x1A 0x10 0x2A 0x36 0x04; 0xB2 0x00 0x18 0x15 0x04 0x12 0x26 0xB8 0x00 0x27 0x68 0xBA; 0x00 0x2D 0x00 0x00 0xB6 0x00 0x20 0x1B 0x05 0xA0 0x00 0x37; 0x03 0x36 0x04 0x03 0x36 0x05 0x15 0x05 0x11 0x0B 0xB8 0xA2; 0x00 0x1C 0x12 0x31 0x38 0x06 0x15 0x04 0x17 0x06 0x12 0x26; 0xB8 0x00 0x27 0x86 0x6A 0x8B 0x60 0x36 0x04 0x84 0x05 0x01; 0xA7 0xFF 0xE2 0xB2 0x00 0x18 0x15 0x04 0xBA 0x00 0x32 0x00; 0x00 0xB6 0x00 0x20 0x12 0x33 0xB8 0x00 0x27 0x36 0x04 0x1B; 0x06 0xA0 0x00 0x27 0x12 0x34 0xB8 0x00 0x27 0x36 0x05 0x14; 0x00 0x35 0xB8 0x00 0x37 0x37 0x06 0xB2 0x00 0x18 0x15 0x05; 0x85 0x16 0x06 0x61 0x15 0x04 0x85 0x69 0xBA 0x00 0x3A 0x00; 0x00 0xB6 0x00 0x20 0x1B 0x07 0xA0 0x00 0x27 0x10 0x32 0x15; 0x04 0x68 0x36 0x05 0x14 0x00 0x3D 0x15 0x04 0x87 0x6B 0x39; 0x06 0xB2 0x00 0x18 0x15 0x05 0x87 0x18 0x06 0x63 0xBA 0x00; 0x3F 0x00 0x00 0xB6 0x00 0x20 0xA7 0x00 0x0B 0xB2 0x00 0x18; 0x12 0x42 0xB6 0x00 0x20 0x1B 0x08 0xA0 0x00 0x60 0x03 0x36; 0x05 0x03 0x36 0x06 0x15 0x06 0x11 0x09 0xC4 0xA2 0x00 0x1D; 0x12 0x31 0x38 0x07 0x15 0x05 0x17 0x07 0x15 0x06 0x86 0xB8; 0x00 0x27 0x86 0x6A 0x8B 0x60 0x36 0x05 0x84 0x06 0x01 0xA7; 0xFF 0xE1 0x15 0x05 0x10 0x64 0xA4 0x00 0x0E 0xB2 0x00 0x18; 0x12 0x44 0xB6 0x00 0x20 0xA7 0x00 0x26 0x15 0x05 0x10 0x32; 0xA2 0x00 0x1F 0x10 0x32 0x15 0x04 0x68 0x36 0x06 0x14 0x00; 0x3D 0x15 0x04 0x87 0x6B 0x39 0x07 0xB2 0x00 0x18 0x15 0x06; 0x87 0x18 0x07 0x63 0xB6 0x00 0x46 0x1B 0x10 0x06 0xA0 0x00; 0x20 0x12 0x49 0x3A 0x05 0x10 0x46 0x36 0x06 0x10 0x64 0x36; 0x07 0xB2 0x00 0x18 0x19 0x05 0x15 0x06 0x15 0x07 0xBA 0x00; 0x4B 0x00 0x00 0xB6 0x00 0x20 0x03 0x36 0x05 0x01 0x3A 0x06; 0x04 0x15 0x05 0x6C 0x36 0x05 0x19 0x06 0xB6 0x00 0x12 0x57; 0xA7 0x00 0x22 0x3A 0x07 0xBB 0x00 0x02 0x59 0xB7 0x00 0x01; 0x3A 0x06 0x19 0x06 0xB6 0x00 0x12 0x57 0xA7 0x00 0x0E 0x3A; 0x09 0x19 0x06 0xB6 0x00 0x12 0x57 0x19 0x09 0xBF 0x15 0x05; 0x9A 0x00 0x06 0x01 0x3A 0x06 0x1C 0xAB 0x00 0x00 0x00 0x25; 0x00 0x00 0x00 0x02 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x19; 0x00 0x00 0x00 0x02 0x00 0x00 0x00 0x25 0xBB 0x00 0x02 0x59; 0xB7 0x00 0x01 0x3A 0x06 0xA7 0x00 0x03 0xB1; } [8] { // Traps 4 8 16 22; // at 0x08E1 4 8 34 0; // at 0x08E9 16 26 34 0; // at 0x08F1 34 36 34 0; // at 0x08F9 420 426 435 22; // at 0x0901 420 426 455 0; // at 0x0909 435 446 455 0; // at 0x0911 455 457 455 0; // at 0x0919 } // end of Traps [1] { // Attributes Attr(#120, 129) { // StackMapTable at 0x091B [25] { // 246b, [2]{#11; #16}, { // early_larval_frame 255b, 16, [4]{7b,#10; 1b; 1b; 7b,#2}, [1]{7b,#22}; // full_frame }; 246b, [2]{#11; #16}, { // early_larval_frame 81b, [1]z{7b,#121}; // same_locals_1_stack_item_frame }; 246b, [2]{#26; #16}, { // early_larval_frame 9b; // same_frame }; 5b; // same_frame 25b; // same_frame 10b; // same_frame 11b; // same_frame 27b; // same_frame 246b, [0]{}, { // early_larval_frame 253b, 10, [2]z{1b; 1b}; // append_frame 2 }; 250b, 32; // chop_frame 1 250b, 12; // chop_frame 1 252b, 47, [1]z{1b}; // append_frame 1 40b; // same_frame 7b; // same_frame 253b, 10, [2]z{1b; 1b}; // append_frame 2 246b, [0]{}, { // early_larval_frame 250b, 33; // chop_frame 1 }; 17b; // same_frame 250b, 34; // chop_frame 1 34b; // same_frame 255b, 20, [7]{7b,#10; 1b; 1b; 7b,#2; 1b; 1b; 7b,#2}, [1]{7b,#22}; // full_frame 83b, [1]z{7b,#121}; // same_locals_1_stack_item_frame 10b; // same_frame 7b; // same_frame 25b; // same_frame 246b, [4]{#11; #16; #26; #112}, { // early_larval_frame 11b; // same_frame }; } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x09A2 0x0001; // access #105; // name_index : complexMethod #106; // descriptor_index : (ILjava/lang/Object;)I [1] { // Attributes Attr(#119, 204) { // Code at 0x09AA 3; // max_stack 7; // max_locals Bytes[123]{ 0x03 0x3E 0x04 0x36 0x04 0x01 0x3A 0x05 0x1B 0x9E 0x00 0x26; 0x1B 0x04 0x60 0x3E 0x2C 0xC1 0x00 0x4E 0x99 0x00 0x13 0x2C; 0xC0 0x00 0x4E 0x3A 0x05 0x19 0x05 0xB6 0x00 0x50 0x36 0x04; 0x15 0x04 0xAC 0x1D 0x05 0x68 0x36 0x04 0xA7 0x00 0x3C 0x1B; 0x02 0xA0 0x00 0x15 0x1B 0x74 0x3E 0x1D 0x06 0x60 0x36 0x04; 0xBB 0x00 0x54 0x59 0x12 0x56 0xB7 0x00 0x58 0xBF 0x03 0x36; 0x06 0x15 0x06 0x05 0xA2 0x00 0x1C 0x1D 0x15 0x06 0x60 0x3E; 0x1D 0x04 0xA4 0x00 0x0C 0x1D 0x15 0x06 0x64 0x36 0x04 0xA7; 0x00 0x09 0x84 0x06 0x01 0xA7 0xFF 0xE4 0xA7 0x00 0x0E 0x3A; 0x06 0x19 0x06 0x3A 0x05 0x1D 0x08 0x60 0x36 0x04 0x1D 0x15; 0x04 0x60 0xAC; } [2] { // Traps 8 38 107 84; // at 0x0A3D 39 104 107 84; // at 0x0A45 } // end of Traps [1] { // Attributes Attr(#120, 47) { // StackMapTable at 0x0A47 [8] { // 254b, 39, [3]z{1b; 1b; 7b,#2}; // append_frame 3 7b; // same_frame 22b; // same_frame 246b, [4]{#11; #16; #26; #112}, { // early_larval_frame 252b, 2, [1]z{1b}; // append_frame 1 }; 24b; // same_frame 250b, 5; // chop_frame 1 246b, [4]{#11; #16; #26; #112}, { // early_larval_frame 66b, [1]z{7b,#84}; // same_locals_1_stack_item_frame }; 10b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0A7C 0x0001; // access #109; // name_index : generateFullFrame #110; // descriptor_index : (I)I [1] { // Attributes Attr(#119, 150) { // Code at 0x0A84 3; // max_stack 6; // max_locals Bytes[72]{ 0x03 0x3D 0x01 0x4E 0x03 0x36 0x04 0x1B 0x9E 0x00 0x11 0x12; 0x5A 0x4E 0x04 0x36 0x04 0x2D 0xB6 0x00 0x50 0x3D 0xA7 0x00; 0x11 0x1B 0x05 0x68 0x3D 0xBB 0x00 0x54 0x59 0x12 0x5C 0xB7; 0x00 0x58 0xBF 0xA7 0x00 0x0E 0x3A 0x05 0x19 0x05 0x4E 0x03; 0x36 0x04 0x1B 0x74 0x3D 0x15 0x04 0x99 0x00 0x07 0x1C 0x04; 0x60 0xAC 0xB2 0x00 0x18 0x12 0x5E 0xB6 0x00 0x20 0x1C 0xAC; } [1] { // Traps 7 39 42 84; // at 0x0AE4 } // end of Traps [1] { // Attributes Attr(#120, 52) { // StackMapTable at 0x0AE6 [5] { // 246b, [4]{#11; #16; #26; #112}, { // early_larval_frame 254b, 25, [3]z{1b; 7b,#2; 1b}; // append_frame 3 }; 246b, [3]{#11; #16; #26}, { // early_larval_frame 13b; // same_frame }; 246b, [2]{#11; #16}, { // early_larval_frame 66b, [1]z{7b,#84}; // same_locals_1_stack_item_frame }; 246b, [1]{#11}, { // early_larval_frame 10b; // same_frame }; 246b, [0]{}, { // early_larval_frame 8b; // same_frame }; } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0B20 0x0009; // access #123; // name_index : main #124; // descriptor_index : ([Ljava/lang/String;)V [1] { // Attributes Attr(#119, 76) { // Code at 0x0B28 3; // max_stack 3; // max_locals Bytes[43]{ 0xBB 0x00 0x0A 0x59 0xB7 0x00 0x60 0x4C 0x03 0x3D 0x1C 0x10; 0x06 0xA3 0x00 0x0E 0x2B 0x1C 0xB6 0x00 0x61 0x84 0x02 0x01; 0xA7 0xFF 0xF2 0x2B 0x03 0x12 0x65 0xB6 0x00 0x67 0x57 0x2B; 0x10 0x17 0xB6 0x00 0x6B 0x57 0xB1; } [0] { // Traps } // end of Traps [1] { // Attributes Attr(#120, 15) { // StackMapTable at 0x0B65 [2] { // 246b, [0]{}, { // early_larval_frame 253b, 10, [2]z{7b,#10; 1b}; // append_frame 2 }; 250b, 16; // chop_frame 1 } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0B7A 0x0008; // access #125; // name_index : #6; // descriptor_index : ()V [1] { // Attributes Attr(#119, 17) { // Code at 0x0B82 2; // max_stack 0; // max_locals Bytes[5]{ 0x0A 0xB3 0x00 0x6F 0xB1; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [2] { // Attributes Attr(#126, 32) { // BootstrapMethods at 0x0B9B [5] { // bootstrap_methods { // bootstrap_method #137; // bootstrap_method_ref [1] { // bootstrap_arguments #127; // at 0x0BA9 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #137; // bootstrap_method_ref [1] { // bootstrap_arguments #129; // at 0x0BAF } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #137; // bootstrap_method_ref [1] { // bootstrap_arguments #131; // at 0x0BB5 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #137; // bootstrap_method_ref [1] { // bootstrap_arguments #133; // at 0x0BBB } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #137; // bootstrap_method_ref [1] { // bootstrap_arguments #135; // at 0x0BC1 } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#143, 10) { // InnerClasses at 0x0BC1 [1] { // classes #144 #146 #148 25; // access [ ACC_PUBLIC, ACC_STATIC, ACC_FINAL ] } } // end of InnerClasses } // end of Attributes } // end of class org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData StackMapData.g.t.jasm000066400000000000000000001176641514323636100347420ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/StackMapTablepackage org/openjdk/asmtools/attribute/StackMapTable/data; public super class #10 /* StackMapData */ version 69:0 { const #1 = Methodref #2.#3; // java/lang/Object."":"()V" const #2 = Class #4; // java/lang/Object const #3 = NameAndType #5:#6; // "":"()V" const #4 = Utf8 "java/lang/Object"; const #5 = Utf8 ""; const #6 = Utf8 "()V"; const #7 = String #8; // "string" const #8 = Utf8 "string"; const #9 = Fieldref #10.#11; // StackMapData.fldS:"Ljava/lang/String;" const #10 = Class #12; // StackMapData const #11 = NameAndType #13:#14; // fldS:"Ljava/lang/String;" const #12 = Utf8 "org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData"; const #13 = Utf8 "fldS"; const #14 = Utf8 "Ljava/lang/String;"; const #15 = Fieldref #10.#16; // StackMapData.fldFS:"Ljava/lang/String;" const #16 = NameAndType #17:#14; // fldFS:"Ljava/lang/String;" const #17 = Utf8 "fldFS"; const #18 = Methodref #2.#19; // java/lang/Object.toString:"()Ljava/lang/String;" const #19 = NameAndType #20:#21; // toString:"()Ljava/lang/String;" const #20 = Utf8 "toString"; const #21 = Utf8 "()Ljava/lang/String;"; const #22 = Class #23; // java/lang/ArithmeticException const #23 = Utf8 "java/lang/ArithmeticException"; const #24 = Fieldref #25.#26; // java/lang/System.out:"Ljava/io/PrintStream;" const #25 = Class #27; // java/lang/System const #26 = NameAndType #28:#29; // out:"Ljava/io/PrintStream;" const #27 = Utf8 "java/lang/System"; const #28 = Utf8 "out"; const #29 = Utf8 "Ljava/io/PrintStream;"; const #30 = String #31; // "frame" const #31 = Utf8 "frame"; const #32 = Methodref #33.#34; // java/io/PrintStream.println:"(Ljava/lang/String;)V" const #33 = Class #35; // java/io/PrintStream const #34 = NameAndType #36:#37; // println:"(Ljava/lang/String;)V" const #35 = Utf8 "java/io/PrintStream"; const #36 = Utf8 "println"; const #37 = Utf8 "(Ljava/lang/String;)V"; const #38 = Float 100.0f; const #39 = Methodref #40.#41; // java/lang/Math.round:"(F)I" const #40 = Class #42; // java/lang/Math const #41 = NameAndType #43:#44; // round:"(F)I" const #42 = Utf8 "java/lang/Math"; const #43 = Utf8 "round"; const #44 = Utf8 "(F)I"; const #45 = InvokeDynamic 0:#46; // #0:makeConcatWithConstants:"(I)Ljava/lang/String;" const #46 = NameAndType #47:#48; // makeConcatWithConstants:"(I)Ljava/lang/String;" const #47 = Utf8 "makeConcatWithConstants"; const #48 = Utf8 "(I)Ljava/lang/String;"; const #49 = Float 3.14f; const #50 = InvokeDynamic 1:#46; // #1:makeConcatWithConstants:"(I)Ljava/lang/String;" const #51 = Float 10.0f; const #52 = Float 110.0f; const #53 = Double 100.0d; const #55 = Methodref #40.#56; // java/lang/Math.round:"(D)J" const #56 = NameAndType #43:#57; // round:"(D)J" const #57 = Utf8 "(D)J"; const #58 = InvokeDynamic 2:#59; // #2:makeConcatWithConstants:"(J)Ljava/lang/String;" const #59 = NameAndType #47:#60; // makeConcatWithConstants:"(J)Ljava/lang/String;" const #60 = Utf8 "(J)Ljava/lang/String;"; const #61 = Double 99.99d; const #63 = InvokeDynamic 3:#64; // #3:makeConcatWithConstants:"(D)Ljava/lang/String;" const #64 = NameAndType #47:#65; // makeConcatWithConstants:"(D)Ljava/lang/String;" const #65 = Utf8 "(D)Ljava/lang/String;"; const #66 = String #67; // "chop_frame" const #67 = Utf8 "chop_frame"; const #68 = String #69; // "_frame_" const #69 = Utf8 "_frame_"; const #70 = Methodref #33.#71; // java/io/PrintStream.println:"(D)V" const #71 = NameAndType #36:#72; // println:"(D)V" const #72 = Utf8 "(D)V"; const #73 = String #74; // "n_frame" const #74 = Utf8 "n_frame"; const #75 = InvokeDynamic 4:#76; // #4:makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" const #76 = NameAndType #47:#77; // makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" const #77 = Utf8 "(Ljava/lang/String;CI)Ljava/lang/String;"; const #78 = Class #79; // java/lang/String const #79 = Utf8 "java/lang/String"; const #80 = Methodref #2.#81; // java/lang/Object.hashCode:"()I" const #81 = NameAndType #82:#83; // hashCode:"()I" const #82 = Utf8 "hashCode"; const #83 = Utf8 "()I"; const #84 = Class #85; // java/lang/RuntimeException const #85 = Utf8 "java/lang/RuntimeException"; const #86 = String #87; // "Test exception" const #87 = Utf8 "Test exception"; const #88 = Methodref #84.#89; // java/lang/RuntimeException."":"(Ljava/lang/String;)V" const #89 = NameAndType #5:#37; // "":"(Ljava/lang/String;)V" const #90 = String #91; // "positive" const #91 = Utf8 "positive"; const #92 = String #93; // "non-positive" const #93 = Utf8 "non-positive"; const #94 = String #95; // "Computing result" const #95 = Utf8 "Computing result"; const #96 = Methodref #10.#3; // StackMapData."":"()V" const #97 = Methodref #10.#98; // StackMapData.generateFrames:"(I)V" const #98 = NameAndType #99:#100; // generateFrames:"(I)V" const #99 = Utf8 "generateFrames"; const #100 = Utf8 "(I)V"; const #101 = String #102; // "test" const #102 = Utf8 "test"; const #103 = Methodref #10.#104; // StackMapData.complexMethod:"(ILjava/lang/Object;)I" const #104 = NameAndType #105:#106; // complexMethod:"(ILjava/lang/Object;)I" const #105 = Utf8 "complexMethod"; const #106 = Utf8 "(ILjava/lang/Object;)I"; const #107 = Methodref #10.#108; // StackMapData.generateFullFrame:"(I)I" const #108 = NameAndType #109:#110; // generateFullFrame:"(I)I" const #109 = Utf8 "generateFullFrame"; const #110 = Utf8 "(I)I"; const #111 = Fieldref #10.#112; // StackMapData.fldL:"J" const #112 = NameAndType #113:#114; // fldL:"J" const #113 = Utf8 "fldL"; const #114 = Utf8 "J"; const #115 = Utf8 "fldI"; const #116 = Utf8 "I"; const #117 = Utf8 "ConstantValue"; const #118 = Integer 0; const #119 = Utf8 "Code"; const #120 = Utf8 "StackMapTable"; const #121 = Class #122; // java/lang/Throwable const #122 = Utf8 "java/lang/Throwable"; const #123 = Utf8 "main"; const #124 = Utf8 "([Ljava/lang/String;)V"; const #125 = Utf8 ""; const #126 = Utf8 "BootstrapMethods"; const #127 = String #128; // "item_frame\u0001" const #128 = Utf8 "item_frame\u0001"; const #129 = String #130; // "item_frame_\u0001" const #130 = Utf8 "item_frame_\u0001"; const #131 = String #132; // "_frame: \u0001" const #132 = Utf8 "_frame: \u0001"; const #133 = String #134; // "Before chop_frame: \u0001" const #134 = Utf8 "Before chop_frame: \u0001"; const #135 = String #136; // "\u0001: \u0001\u0001" const #136 = Utf8 "\u0001: \u0001\u0001"; const #137 = MethodHandle 6:#138; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #138 = Methodref #139.#140; // java/lang/invoke/StringConcatFactory.makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #139 = Class #141; // java/lang/invoke/StringConcatFactory const #140 = NameAndType #47:#142; // makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #141 = Utf8 "java/lang/invoke/StringConcatFactory"; const #142 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; const #143 = Utf8 "InnerClasses"; const #144 = Class #145; // java/lang/invoke/MethodHandles$Lookup const #145 = Utf8 "java/lang/invoke/MethodHandles$Lookup"; const #146 = Class #147; // java/lang/invoke/MethodHandles const #147 = Utf8 "java/lang/invoke/MethodHandles"; const #148 = Utf8 "Lookup"; static final Field #115:#116 = #118; // fldI:I = int 0 static Field #113:#114; // fldL:J protected Field #13:#14; // fldS:"Ljava/lang/String;" public final Field #17:#14 = #7; // fldFS:"Ljava/lang/String;" = String "string" public Method #5:#6 // "":"()V" stack 2 locals 1 { 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: aload_0; 5: ldc #7; // String "string" 7: putfield #9; // Field fldS:"Ljava/lang/String;" 10: aload_0; 11: ldc #7; // String "string" 13: putfield #15; // Field fldFS:"Ljava/lang/String;" 16: return; } public Method #99:#100 // generateFrames:"(I)V" stack 5 locals 10 { 0: iconst_0; 1: istore_2; 2: aconst_null; 3: astore_3; try T0, T1; 4: iconst_1; 5: iload_2; 6: idiv; 7: istore_2; endtry T0,T1; 8: aload_3; 9: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 12: pop; 13: goto 44; catch T0 #22; // java/lang/ArithmeticException try T2; 16: astore 4; 18: new #2; // class java/lang/Object 21: dup; 22: invokespecial #1; // Method java/lang/Object."":"()V" 25: astore_3; endtry T2; 26: aload_3; 27: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 30: pop; 31: goto 44; catch T1 #0; // any catch T2 #0; // any catch T3 #0; // any try T3; 34: astore 5; endtry T3; 36: aload_3; 37: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 40: pop; 41: aload 5; 43: athrow; 44: iload_2; 45: ifne 50; 48: aconst_null; 49: astore_3; 50: iload_2; 51: lookupswitch { // 2 1: 76; 2: 87; default: 87 }; 76: new #2; // class java/lang/Object 79: dup; 80: invokespecial #1; // Method java/lang/Object."":"()V" 83: astore_3; 84: goto 87; 87: iload_1; 88: ifne 99; 91: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 94: ldc #30; // String "frame" 96: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 99: iload_1; 100: iconst_1; 101: if_icmpne 127; 104: bipush 42; 106: istore 4; 108: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 111: iload 4; 113: ldc #38; // float 100.0f 115: invokestatic #39; // Method java/lang/Math.round:"(F)I" 118: imul; 119: invokedynamic #45; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(I)Ljava/lang/String;" { // String "item_frame\u0001" // } 124: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 127: iload_1; 128: iconst_2; 129: if_icmpne 184; 132: iconst_0; 133: istore 4; 135: iconst_0; 136: istore 5; 138: iload 5; 140: sipush 3000; 143: if_icmpge 171; 146: ldc #49; // float 3.14f 148: fstore 6; 150: iload 4; 152: fload 6; 154: ldc #38; // float 100.0f 156: invokestatic #39; // Method java/lang/Math.round:"(F)I" 159: i2f; 160: fmul; 161: f2i; 162: iadd; 163: istore 4; 165: iinc 5, 1; 168: goto 138; 171: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 174: iload 4; 176: invokedynamic #50; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(I)Ljava/lang/String;" { // String "item_frame_\u0001" // } 181: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 184: ldc #51; // float 10.0f 186: invokestatic #39; // Method java/lang/Math.round:"(F)I" 189: istore 4; 191: iload_1; 192: iconst_3; 193: if_icmpne 232; 196: ldc #52; // float 110.0f 198: invokestatic #39; // Method java/lang/Math.round:"(F)I" 201: istore 5; 203: ldc2_w #53; // double 100.0d 206: invokestatic #55; // Method java/lang/Math.round:"(D)J" 209: lstore 6; 211: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 214: iload 5; 216: i2l; 217: lload 6; 219: ladd; 220: iload 4; 222: i2l; 223: lmul; 224: invokedynamic #58; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(J)Ljava/lang/String;" { // String "_frame: \u0001" // } 229: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 232: iload_1; 233: iconst_4; 234: if_icmpne 273; 237: bipush 50; 239: iload 4; 241: imul; 242: istore 5; 244: ldc2_w #61; // double 99.99d 247: iload 4; 249: i2d; 250: dmul; 251: dstore 6; 253: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 256: iload 5; 258: i2d; 259: dload 6; 261: dadd; 262: invokedynamic #63; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(D)Ljava/lang/String;" { // String "Before chop_frame: \u0001" // } 267: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 270: goto 281; 273: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 276: ldc #66; // String "chop_frame" 278: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 281: iload_1; 282: iconst_5; 283: if_icmpne 379; 286: iconst_0; 287: istore 5; 289: iconst_0; 290: istore 6; 292: iload 6; 294: sipush 2500; 297: if_icmpge 326; 300: ldc #49; // float 3.14f 302: fstore 7; 304: iload 5; 306: fload 7; 308: iload 6; 310: i2f; 311: invokestatic #39; // Method java/lang/Math.round:"(F)I" 314: i2f; 315: fmul; 316: f2i; 317: iadd; 318: istore 5; 320: iinc 6, 1; 323: goto 292; 326: iload 5; 328: bipush 100; 330: if_icmple 344; 333: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 336: ldc #68; // String "_frame_" 338: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 341: goto 379; 344: iload 5; 346: bipush 50; 348: if_icmpge 379; 351: bipush 50; 353: iload 4; 355: imul; 356: istore 6; 358: ldc2_w #61; // double 99.99d 361: iload 4; 363: i2d; 364: dmul; 365: dstore 7; 367: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 370: iload 6; 372: i2d; 373: dload 7; 375: dadd; 376: invokevirtual #70; // Method java/io/PrintStream.println:"(D)V" 379: iload_1; 380: bipush 6; 382: if_icmpne 414; 385: ldc #73; // String "n_frame" 387: astore 5; 389: bipush 70; 391: istore 6; 393: bipush 100; 395: istore 7; 397: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 400: aload 5; 402: iload 6; 404: iload 7; 406: invokedynamic #75; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" { // String "\u0001: \u0001\u0001" // } 411: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 414: iconst_0; 415: istore 5; 417: aconst_null; 418: astore 6; try T4, T5; 420: iconst_1; 421: iload 5; 423: idiv; 424: istore 5; endtry T4,T5; 426: aload 6; 428: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 431: pop; 432: goto 466; catch T4 #22; // java/lang/ArithmeticException try T6; 435: astore 7; 437: new #2; // class java/lang/Object 440: dup; 441: invokespecial #1; // Method java/lang/Object."":"()V" 444: astore 6; endtry T6; 446: aload 6; 448: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 451: pop; 452: goto 466; catch T5 #0; // any catch T6 #0; // any catch T7 #0; // any try T7; 455: astore 9; endtry T7; 457: aload 6; 459: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 462: pop; 463: aload 9; 465: athrow; 466: iload 5; 468: ifne 474; 471: aconst_null; 472: astore 6; 474: iload_2; 475: lookupswitch { // 2 1: 500; 2: 512; default: 512 }; 500: new #2; // class java/lang/Object 503: dup; 504: invokespecial #1; // Method java/lang/Object."":"()V" 507: astore 6; 509: goto 512; 512: return; StackMapTable: number_of_entries = 25 frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16; ] { // fldFS:"Ljava/lang/String;" frame_type = 255 // full offset_delta = 16 stack_map = [ #22; ] // class java/lang/ArithmeticException; locals_map = [ #10, 1, 1, #2; ] // class StackMapData, int, int, class java/lang/Object; } frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16; ] { // fldFS:"Ljava/lang/String;" frame_type = 81 // same_locals_1_stack_item stack_map = [ #121; ] // class java/lang/Throwable; } frame_type = 246 // early_larval unset_fields = [ #26, // out:"Ljava/io/PrintStream;" #16; ] { // fldFS:"Ljava/lang/String;" frame_type = 9 // same } frame_type = 5 // same frame_type = 25 // same frame_type = 10 // same frame_type = 11 // same frame_type = 27 // same frame_type = 246 // early_larval unset_fields = [ ] { frame_type = 253 // append offset_delta = 10 locals_map = [ 1, 1; ] // int, int; } frame_type = 250 // chop1 offset_delta = 32 frame_type = 250 // chop1 offset_delta = 12 frame_type = 252 // append offset_delta = 47 locals_map = [ 1; ] // int; frame_type = 40 // same frame_type = 7 // same frame_type = 253 // append offset_delta = 10 locals_map = [ 1, 1; ] // int, int; frame_type = 246 // early_larval unset_fields = [ ] { frame_type = 250 // chop1 offset_delta = 33 } frame_type = 17 // same frame_type = 250 // chop1 offset_delta = 34 frame_type = 34 // same frame_type = 255 // full offset_delta = 20 stack_map = [ #22; ] // class java/lang/ArithmeticException; locals_map = [ #10, 1, 1, #2, 1, 1, #2; ] // class StackMapData, int, int, class java/lang/Object, int, int, class java/lang/Object; frame_type = 83 // same_locals_1_stack_item stack_map = [ #121; ] // class java/lang/Throwable; frame_type = 10 // same frame_type = 7 // same frame_type = 25 // same frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16, // fldFS:"Ljava/lang/String;" #26, // out:"Ljava/io/PrintStream;" #112; ] { // fldL:"J" frame_type = 11 // same } } public Method #105:#106 // complexMethod:"(ILjava/lang/Object;)I" stack 3 locals 7 { 0: iconst_0; 1: istore_3; 2: iconst_1; 3: istore 4; 5: aconst_null; 6: astore 5; try T0; 8: iload_1; 9: ifle 47; 12: iload_1; 13: iconst_1; 14: iadd; 15: istore_3; 16: aload_2; 17: instanceof #78; // class java/lang/String 20: ifeq 39; 23: aload_2; 24: checkcast #78; // class java/lang/String 27: astore 5; 29: aload 5; 31: invokevirtual #80; // Method java/lang/Object.hashCode:"()I" 34: istore 4; 36: iload 4; endtry T0; 38: ireturn; try T1; 39: iload_3; 40: iconst_2; 41: imul; 42: istore 4; 44: goto 104; 47: iload_1; 48: iconst_m1; 49: if_icmpne 70; 52: iload_1; 53: ineg; 54: istore_3; 55: iload_3; 56: iconst_3; 57: iadd; 58: istore 4; 60: new #84; // class java/lang/RuntimeException 63: dup; 64: ldc #86; // String "Test exception" 66: invokespecial #88; // Method java/lang/RuntimeException."":"(Ljava/lang/String;)V" 69: athrow; 70: iconst_0; 71: istore 6; 73: iload 6; 75: iconst_2; 76: if_icmpge 104; 79: iload_3; 80: iload 6; 82: iadd; 83: istore_3; 84: iload_3; 85: iconst_1; 86: if_icmple 98; 89: iload_3; 90: iload 6; 92: isub; 93: istore 4; 95: goto 104; 98: iinc 6, 1; 101: goto 73; endtry T1; 104: goto 118; catch T0 #84; // java/lang/RuntimeException catch T1 #84; // java/lang/RuntimeException 107: astore 6; 109: aload 6; 111: astore 5; 113: iload_3; 114: iconst_5; 115: iadd; 116: istore 4; 118: iload_3; 119: iload 4; 121: iadd; 122: ireturn; StackMapTable: number_of_entries = 8 frame_type = 254 // append offset_delta = 39 locals_map = [ 1, 1, #2; ] // int, int, class java/lang/Object; frame_type = 7 // same frame_type = 22 // same frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16, // fldFS:"Ljava/lang/String;" #26, // out:"Ljava/io/PrintStream;" #112; ] { // fldL:"J" frame_type = 252 // append offset_delta = 2 locals_map = [ 1; ] // int; } frame_type = 24 // same frame_type = 250 // chop1 offset_delta = 5 frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16, // fldFS:"Ljava/lang/String;" #26, // out:"Ljava/io/PrintStream;" #112; ] { // fldL:"J" frame_type = 66 // same_locals_1_stack_item stack_map = [ #84; ] // class java/lang/RuntimeException; } frame_type = 10 // same } public Method #109:#110 // generateFullFrame:"(I)I" stack 3 locals 6 { 0: iconst_0; 1: istore_2; 2: aconst_null; 3: astore_3; 4: iconst_0; 5: istore 4; try T0; 7: iload_1; 8: ifle 25; 11: ldc #90; // String "positive" 13: astore_3; 14: iconst_1; 15: istore 4; 17: aload_3; 18: invokevirtual #80; // Method java/lang/Object.hashCode:"()I" 21: istore_2; 22: goto 39; 25: iload_1; 26: iconst_2; 27: imul; 28: istore_2; 29: new #84; // class java/lang/RuntimeException 32: dup; 33: ldc #92; // String "non-positive" 35: invokespecial #88; // Method java/lang/RuntimeException."":"(Ljava/lang/String;)V" 38: athrow; endtry T0; 39: goto 53; catch T0 #84; // java/lang/RuntimeException 42: astore 5; 44: aload 5; 46: astore_3; 47: iconst_0; 48: istore 4; 50: iload_1; 51: ineg; 52: istore_2; 53: iload 4; 55: ifeq 62; 58: iload_2; 59: iconst_1; 60: iadd; 61: ireturn; 62: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 65: ldc #94; // String "Computing result" 67: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 70: iload_2; 71: ireturn; StackMapTable: number_of_entries = 5 frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16, // fldFS:"Ljava/lang/String;" #26, // out:"Ljava/io/PrintStream;" #112; ] { // fldL:"J" frame_type = 254 // append offset_delta = 25 locals_map = [ 1, #2, 1; ] // int, class java/lang/Object, int; } frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16, // fldFS:"Ljava/lang/String;" #26; ] { // out:"Ljava/io/PrintStream;" frame_type = 13 // same } frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16; ] { // fldFS:"Ljava/lang/String;" frame_type = 66 // same_locals_1_stack_item stack_map = [ #84; ] // class java/lang/RuntimeException; } frame_type = 246 // early_larval unset_fields = [ #11; ] { //fldS:"Ljava/lang/String;"; frame_type = 10 // same } frame_type = 246 // early_larval unset_fields = [ ] { frame_type = 8 // same } } public static Method #123:#124 // main:"([Ljava/lang/String;)V" stack 3 locals 3 { 0: new #10; // class StackMapData 3: dup; 4: invokespecial #96; // Method "":"()V" 7: astore_1; 8: iconst_0; 9: istore_2; 10: iload_2; 11: bipush 6; 13: if_icmpgt 27; 16: aload_1; 17: iload_2; 18: invokevirtual #97; // Method generateFrames:"(I)V" 21: iinc 2, 1; 24: goto 10; 27: aload_1; 28: iconst_0; 29: ldc #101; // String "test" 31: invokevirtual #103; // Method complexMethod:"(ILjava/lang/Object;)I" 34: pop; 35: aload_1; 36: bipush 23; 38: invokevirtual #107; // Method generateFullFrame:"(I)I" 41: pop; 42: return; StackMapTable: number_of_entries = 2 frame_type = 246 // early_larval unset_fields = [ ] { frame_type = 253 // append offset_delta = 10 locals_map = [ #10, 1; ] // class StackMapData, int; } frame_type = 250 // chop1 offset_delta = 16 } static Method #125:#6 // "":"()V" stack 2 locals 0 { 0: lconst_1; 1: putstatic #111; // Field fldL:"J" 4: return; } InnerClasses { public static final #148 = #144 of #146; // Lookup = class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles } BootstrapMethods { 0: #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: #127; // String "item_frame\u0001" 1: #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: #129; // String "item_frame_\u0001" 2: #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: #131; // String "_frame: \u0001" 3: #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: #133; // String "Before chop_frame: \u0001" 4: #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: #135; // String "\u0001: \u0001\u0001" } } // end Class org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData StackMapData.jasm000066400000000000000000000550241514323636100342420ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/StackMapTablepackage org/openjdk/asmtools/attribute/StackMapTable/data; public super class StackMapData version 69:0 { static final Field fldI:I = int 0; static Field fldL:J; protected Field fldS:"Ljava/lang/String;"; public final Field fldFS:"Ljava/lang/String;" = String "string"; public Method "":"()V" stack 2 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; aload_0; ldc String "string"; putfield Field fldS:"Ljava/lang/String;"; aload_0; ldc String "string"; putfield Field fldFS:"Ljava/lang/String;"; return; } public Method generateFrames:"(I)V" stack 5 locals 10 { iconst_0; istore_2; aconst_null; astore_3; try T0, T1; iconst_1; iload_2; idiv; istore_2; endtry T0,T1; aload_3; invokevirtual Method java/lang/Object.toString:"()Ljava/lang/String;"; pop; goto L44; catch T0 java/lang/ArithmeticException; try T2; stack_frame_type early_larval; unset_fields fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;"; frame_type full; locals_map class StackMapData, int, int, class java/lang/Object; stack_map class java/lang/ArithmeticException; astore 4; new class java/lang/Object; dup; invokespecial Method java/lang/Object."":"()V"; astore_3; endtry T2; aload_3; invokevirtual Method java/lang/Object.toString:"()Ljava/lang/String;"; pop; goto L44; catch T1 #0; catch T2 #0; catch T3 #0; try T3; stack_frame_type early_larval; unset_fields fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;"; frame_type stack1; stack_map class java/lang/Throwable; astore 5; endtry T3; aload_3; invokevirtual Method java/lang/Object.toString:"()Ljava/lang/String;"; pop; aload 5; athrow; L44: stack_frame_type early_larval; unset_fields out:"Ljava/io/PrintStream;", fldFS:"Ljava/lang/String;"; frame_type same; iload_2; ifne L50; aconst_null; astore_3; L50: stack_frame_type same; iload_2; lookupswitch { 1: L76; 2: L87; default: L87 }; L76: stack_frame_type same; new class java/lang/Object; dup; invokespecial Method java/lang/Object."":"()V"; astore_3; goto L87; L87: stack_frame_type same; iload_1; ifne L99; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; ldc String "frame"; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; L99: stack_frame_type same; iload_1; iconst_1; if_icmpne L127; bipush 42; istore 4; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; iload 4; ldc float 100.0f; invokestatic Method java/lang/Math.round:"(F)I"; imul; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(I)Ljava/lang/String;" { String "item_frame\u0001" }; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; L127: stack_frame_type same; iload_1; iconst_2; if_icmpne L184; iconst_0; istore 4; iconst_0; istore 5; L138: stack_frame_type early_larval; unset_fields; frame_type append; locals_map int, int; iload 5; sipush 3000; if_icmpge L171; ldc float 3.14f; fstore 6; iload 4; fload 6; ldc float 100.0f; invokestatic Method java/lang/Math.round:"(F)I"; i2f; fmul; f2i; iadd; istore 4; iinc 5, 1; goto L138; L171: stack_frame_type chop1; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; iload 4; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(I)Ljava/lang/String;" { String "item_frame_\u0001" }; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; L184: stack_frame_type chop1; ldc float 10.0f; invokestatic Method java/lang/Math.round:"(F)I"; istore 4; iload_1; iconst_3; if_icmpne L232; ldc float 110.0f; invokestatic Method java/lang/Math.round:"(F)I"; istore 5; ldc2_w double 100.0d; invokestatic Method java/lang/Math.round:"(D)J"; lstore 6; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; iload 5; i2l; lload 6; ladd; iload 4; i2l; lmul; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(J)Ljava/lang/String;" { String "_frame: \u0001" }; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; L232: stack_frame_type append; locals_map int; iload_1; iconst_4; if_icmpne L273; bipush 50; iload 4; imul; istore 5; ldc2_w double 99.99d; iload 4; i2d; dmul; dstore 6; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; iload 5; i2d; dload 6; dadd; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(D)Ljava/lang/String;" { String "Before chop_frame: \u0001" }; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; goto L281; L273: stack_frame_type same; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; ldc String "chop_frame"; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; L281: stack_frame_type same; iload_1; iconst_5; if_icmpne L379; iconst_0; istore 5; iconst_0; istore 6; L292: stack_frame_type append; locals_map int, int; iload 6; sipush 2500; if_icmpge L326; ldc float 3.14f; fstore 7; iload 5; fload 7; iload 6; i2f; invokestatic Method java/lang/Math.round:"(F)I"; i2f; fmul; f2i; iadd; istore 5; iinc 6, 1; goto L292; L326: stack_frame_type early_larval; unset_fields; frame_type chop1; iload 5; bipush 100; if_icmple L344; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; ldc String "_frame_"; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; goto L379; L344: stack_frame_type same; iload 5; bipush 50; if_icmpge L379; bipush 50; iload 4; imul; istore 6; ldc2_w double 99.99d; iload 4; i2d; dmul; dstore 7; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; iload 6; i2d; dload 7; dadd; invokevirtual Method java/io/PrintStream.println:"(D)V"; L379: stack_frame_type chop1; iload_1; bipush 6; if_icmpne L414; ldc String "n_frame"; astore 5; bipush 70; istore 6; bipush 100; istore 7; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; aload 5; iload 6; iload 7; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" { String "\u0001: \u0001\u0001" }; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; L414: stack_frame_type same; iconst_0; istore 5; aconst_null; astore 6; try T4, T5; iconst_1; iload 5; idiv; istore 5; endtry T4,T5; aload 6; invokevirtual Method java/lang/Object.toString:"()Ljava/lang/String;"; pop; goto L466; catch T4 java/lang/ArithmeticException; try T6; stack_frame_type full; locals_map class StackMapData, int, int, class java/lang/Object, int, int, class java/lang/Object; stack_map class java/lang/ArithmeticException; astore 7; new class java/lang/Object; dup; invokespecial Method java/lang/Object."":"()V"; astore 6; endtry T6; aload 6; invokevirtual Method java/lang/Object.toString:"()Ljava/lang/String;"; pop; goto L466; catch T5 #0; catch T6 #0; catch T7 #0; try T7; stack_frame_type stack1; stack_map class java/lang/Throwable; astore 9; endtry T7; aload 6; invokevirtual Method java/lang/Object.toString:"()Ljava/lang/String;"; pop; aload 9; athrow; L466: stack_frame_type same; iload 5; ifne L474; aconst_null; astore 6; L474: stack_frame_type same; iload_2; lookupswitch { 1: L500; 2: L512; default: L512 }; L500: stack_frame_type same; new class java/lang/Object; dup; invokespecial Method java/lang/Object."":"()V"; astore 6; goto L512; L512: stack_frame_type early_larval; unset_fields fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;", out:"Ljava/io/PrintStream;", fldL:"J"; frame_type same; return; } public Method complexMethod:"(ILjava/lang/Object;)I" stack 3 locals 7 { iconst_0; istore_3; iconst_1; istore 4; aconst_null; astore 5; try T0; iload_1; ifle L47; iload_1; iconst_1; iadd; istore_3; aload_2; instanceof class java/lang/String; ifeq L39; aload_2; checkcast class java/lang/String; astore 5; aload 5; invokevirtual Method java/lang/Object.hashCode:"()I"; istore 4; iload 4; endtry T0; ireturn; try T1; L39: stack_frame_type append; locals_map int, int, class java/lang/Object; iload_3; iconst_2; imul; istore 4; goto L104; L47: stack_frame_type same; iload_1; iconst_m1; if_icmpne L70; iload_1; ineg; istore_3; iload_3; iconst_3; iadd; istore 4; new class java/lang/RuntimeException; dup; ldc String "Test exception"; invokespecial Method java/lang/RuntimeException."":"(Ljava/lang/String;)V"; athrow; L70: stack_frame_type same; iconst_0; istore 6; L73: stack_frame_type early_larval; unset_fields fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;", out:"Ljava/io/PrintStream;", fldL:"J"; frame_type append; locals_map int; iload 6; iconst_2; if_icmpge L104; iload_3; iload 6; iadd; istore_3; iload_3; iconst_1; if_icmple L98; iload_3; iload 6; isub; istore 4; goto L104; L98: stack_frame_type same; iinc 6, 1; goto L73; endtry T1; L104: stack_frame_type chop1; goto L118; catch T0 java/lang/RuntimeException; catch T1 java/lang/RuntimeException; stack_frame_type early_larval; unset_fields fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;", out:"Ljava/io/PrintStream;", fldL:"J"; frame_type stack1; stack_map class java/lang/RuntimeException; astore 6; aload 6; astore 5; iload_3; iconst_5; iadd; istore 4; L118: stack_frame_type same; iload_3; iload 4; iadd; ireturn; } public Method generateFullFrame:"(I)I" stack 3 locals 6 { iconst_0; istore_2; aconst_null; astore_3; iconst_0; istore 4; try T0; iload_1; ifle L25; ldc String "positive"; astore_3; iconst_1; istore 4; aload_3; invokevirtual Method java/lang/Object.hashCode:"()I"; istore_2; goto L39; L25: stack_frame_type early_larval; unset_fields fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;", out:"Ljava/io/PrintStream;", fldL:"J"; frame_type append; locals_map int, class java/lang/Object, int; iload_1; iconst_2; imul; istore_2; new class java/lang/RuntimeException; dup; ldc String "non-positive"; invokespecial Method java/lang/RuntimeException."":"(Ljava/lang/String;)V"; athrow; endtry T0; L39: stack_frame_type early_larval; unset_fields fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;", out:"Ljava/io/PrintStream;"; frame_type same; goto L53; catch T0 java/lang/RuntimeException; stack_frame_type early_larval; unset_fields fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;"; frame_type stack1; stack_map class java/lang/RuntimeException; astore 5; aload 5; astore_3; iconst_0; istore 4; iload_1; ineg; istore_2; L53: stack_frame_type early_larval; unset_fields fldS:"Ljava/lang/String;"; frame_type same; iload 4; ifeq L62; iload_2; iconst_1; iadd; ireturn; L62: stack_frame_type early_larval; unset_fields; frame_type same; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; ldc String "Computing result"; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; iload_2; ireturn; } public static Method main:"([Ljava/lang/String;)V" stack 3 locals 3 { new class StackMapData; dup; invokespecial Method "":"()V"; astore_1; iconst_0; istore_2; L10: stack_frame_type early_larval; unset_fields; frame_type append; locals_map class StackMapData, int; iload_2; bipush 6; if_icmpgt L27; aload_1; iload_2; invokevirtual Method generateFrames:"(I)V"; iinc 2, 1; goto L10; L27: stack_frame_type chop1; aload_1; iconst_0; ldc String "test"; invokevirtual Method complexMethod:"(ILjava/lang/Object;)I"; pop; aload_1; bipush 23; invokevirtual Method generateFullFrame:"(I)I"; pop; return; } static Method "":"()V" stack 2 locals 0 { lconst_1; putstatic Field fldL:"J"; return; } InnerClass public static final Lookup = class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles; BootstrapMethod REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { String "item_frame\u0001" } BootstrapMethod REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { String "item_frame_\u0001" } BootstrapMethod REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { String "_frame: \u0001" } BootstrapMethod REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { String "Before chop_frame: \u0001" } BootstrapMethod REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { String "\u0001: \u0001\u0001" } } // end Class org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData StackMapData.jcod000066400000000000000000000645141514323636100342330ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/StackMapTableclass org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData { 0xCAFEBABE; 0; // minor version 69; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 Class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "string"; // #8 Field #10 #11; // #9 Class #12; // #10 NameAndType #13 #14; // #11 Utf8 "org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData"; // #12 Utf8 "fldS"; // #13 Utf8 "Ljava/lang/String;"; // #14 Field #10 #16; // #15 NameAndType #17 #14; // #16 Utf8 "fldFS"; // #17 Method #2 #19; // #18 NameAndType #20 #21; // #19 Utf8 "toString"; // #20 Utf8 "()Ljava/lang/String;"; // #21 Class #23; // #22 Utf8 "java/lang/ArithmeticException"; // #23 Field #25 #26; // #24 Class #27; // #25 NameAndType #28 #29; // #26 Utf8 "java/lang/System"; // #27 Utf8 "out"; // #28 Utf8 "Ljava/io/PrintStream;"; // #29 String #31; // #30 Utf8 "frame"; // #31 Method #33 #34; // #32 Class #35; // #33 NameAndType #36 #37; // #34 Utf8 "java/io/PrintStream"; // #35 Utf8 "println"; // #36 Utf8 "(Ljava/lang/String;)V"; // #37 Float 0x42C80000; // #38 Method #40 #41; // #39 Class #42; // #40 NameAndType #43 #44; // #41 Utf8 "java/lang/Math"; // #42 Utf8 "round"; // #43 Utf8 "(F)I"; // #44 InvokeDynamic 0s #46; // #45 NameAndType #47 #48; // #46 Utf8 "makeConcatWithConstants"; // #47 Utf8 "(I)Ljava/lang/String;"; // #48 Float 0x4048F5C3; // #49 InvokeDynamic 1s #46; // #50 Float 0x41200000; // #51 Float 0x42DC0000; // #52 Double 0x4059000000000000;; // #53 Method #40 #56; // #55 NameAndType #43 #57; // #56 Utf8 "(D)J"; // #57 InvokeDynamic 2s #59; // #58 NameAndType #47 #60; // #59 Utf8 "(J)Ljava/lang/String;"; // #60 Double 0x4058FF5C28F5C28F;; // #61 InvokeDynamic 3s #64; // #63 NameAndType #47 #65; // #64 Utf8 "(D)Ljava/lang/String;"; // #65 String #67; // #66 Utf8 "chop_frame"; // #67 String #69; // #68 Utf8 "_frame_"; // #69 Method #33 #71; // #70 NameAndType #36 #72; // #71 Utf8 "(D)V"; // #72 String #74; // #73 Utf8 "n_frame"; // #74 InvokeDynamic 4s #76; // #75 NameAndType #47 #77; // #76 Utf8 "(Ljava/lang/String;CI)Ljava/lang/String;"; // #77 Class #79; // #78 Utf8 "java/lang/String"; // #79 Method #2 #81; // #80 NameAndType #82 #83; // #81 Utf8 "hashCode"; // #82 Utf8 "()I"; // #83 Class #85; // #84 Utf8 "java/lang/RuntimeException"; // #85 String #87; // #86 Utf8 "Test exception"; // #87 Method #84 #89; // #88 NameAndType #5 #37; // #89 String #91; // #90 Utf8 "positive"; // #91 String #93; // #92 Utf8 "non-positive"; // #93 String #95; // #94 Utf8 "Computing result"; // #95 Method #10 #3; // #96 Method #10 #98; // #97 NameAndType #99 #100; // #98 Utf8 "generateFrames"; // #99 Utf8 "(I)V"; // #100 String #102; // #101 Utf8 "test"; // #102 Method #10 #104; // #103 NameAndType #105 #106; // #104 Utf8 "complexMethod"; // #105 Utf8 "(ILjava/lang/Object;)I"; // #106 Method #10 #108; // #107 NameAndType #109 #110; // #108 Utf8 "generateFullFrame"; // #109 Utf8 "(I)I"; // #110 Field #10 #112; // #111 NameAndType #113 #114; // #112 Utf8 "fldL"; // #113 Utf8 "J"; // #114 Utf8 "fldI"; // #115 Utf8 "I"; // #116 Utf8 "ConstantValue"; // #117 Integer 0x00000000; // #118 Utf8 "Code"; // #119 Utf8 "StackMapTable"; // #120 Class #122; // #121 Utf8 "java/lang/Throwable"; // #122 Utf8 "main"; // #123 Utf8 "([Ljava/lang/String;)V"; // #124 Utf8 ""; // #125 Utf8 "BootstrapMethods"; // #126 String #128; // #127 Utf8 "item_frame\u0001"; // #128 String #130; // #129 Utf8 "item_frame_\u0001"; // #130 String #132; // #131 Utf8 "_frame: \u0001"; // #132 String #134; // #133 Utf8 "Before chop_frame: \u0001"; // #134 String #136; // #135 Utf8 "\u0001: \u0001\u0001"; // #136 MethodHandle 6b #138; // #137 Method #139 #140; // #138 Class #141; // #139 NameAndType #47 #142; // #140 Utf8 "java/lang/invoke/StringConcatFactory"; // #141 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #142 Utf8 "InnerClasses"; // #143 Class #145; // #144 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #145 Class #147; // #146 Utf8 "java/lang/invoke/MethodHandles"; // #147 Utf8 "Lookup"; // #148 } 0x0021; // access #10; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0018; // access #115; // name_index #116; // descriptor_index [] { // Attributes Attr(#117) { // ConstantValue #118; } // end of ConstantValue } // end of Attributes } ; { // field 0x0008; // access #113; // name_index #114; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0004; // access #13; // name_index #14; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0011; // access #17; // name_index #14; // descriptor_index [] { // Attributes Attr(#117) { // ConstantValue #7; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#119) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x01 0x2A 0x12 0x07 0xB5 0x00 0x09 0x2A 0x12; 0x07 0xB5 0x00 0x0F 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0001; // access #99; // name_index #100; // descriptor_index [] { // Attributes Attr(#119) { // Code 5; // max_stack 10; // max_locals Bytes[]{ 0x03 0x3D 0x01 0x4E 0x04 0x1C 0x6C 0x3D 0x2D 0xB6 0x00 0x12; 0x57 0xA7 0x00 0x1F 0x3A 0x04 0xBB 0x00 0x02 0x59 0xB7 0x00; 0x01 0x4E 0x2D 0xB6 0x00 0x12 0x57 0xA7 0x00 0x0D 0x3A 0x05; 0x2D 0xB6 0x00 0x12 0x57 0x19 0x05 0xBF 0x1C 0x9A 0x00 0x05; 0x01 0x4E 0x1C 0xAB 0x00 0x00 0x00 0x24 0x00 0x00 0x00 0x02; 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x19 0x00 0x00 0x00 0x02; 0x00 0x00 0x00 0x24 0xBB 0x00 0x02 0x59 0xB7 0x00 0x01 0x4E; 0xA7 0x00 0x03 0x1B 0x9A 0x00 0x0B 0xB2 0x00 0x18 0x12 0x1E; 0xB6 0x00 0x20 0x1B 0x04 0xA0 0x00 0x1A 0x10 0x2A 0x36 0x04; 0xB2 0x00 0x18 0x15 0x04 0x12 0x26 0xB8 0x00 0x27 0x68 0xBA; 0x00 0x2D 0x00 0x00 0xB6 0x00 0x20 0x1B 0x05 0xA0 0x00 0x37; 0x03 0x36 0x04 0x03 0x36 0x05 0x15 0x05 0x11 0x0B 0xB8 0xA2; 0x00 0x1C 0x12 0x31 0x38 0x06 0x15 0x04 0x17 0x06 0x12 0x26; 0xB8 0x00 0x27 0x86 0x6A 0x8B 0x60 0x36 0x04 0x84 0x05 0x01; 0xA7 0xFF 0xE2 0xB2 0x00 0x18 0x15 0x04 0xBA 0x00 0x32 0x00; 0x00 0xB6 0x00 0x20 0x12 0x33 0xB8 0x00 0x27 0x36 0x04 0x1B; 0x06 0xA0 0x00 0x27 0x12 0x34 0xB8 0x00 0x27 0x36 0x05 0x14; 0x00 0x35 0xB8 0x00 0x37 0x37 0x06 0xB2 0x00 0x18 0x15 0x05; 0x85 0x16 0x06 0x61 0x15 0x04 0x85 0x69 0xBA 0x00 0x3A 0x00; 0x00 0xB6 0x00 0x20 0x1B 0x07 0xA0 0x00 0x27 0x10 0x32 0x15; 0x04 0x68 0x36 0x05 0x14 0x00 0x3D 0x15 0x04 0x87 0x6B 0x39; 0x06 0xB2 0x00 0x18 0x15 0x05 0x87 0x18 0x06 0x63 0xBA 0x00; 0x3F 0x00 0x00 0xB6 0x00 0x20 0xA7 0x00 0x0B 0xB2 0x00 0x18; 0x12 0x42 0xB6 0x00 0x20 0x1B 0x08 0xA0 0x00 0x60 0x03 0x36; 0x05 0x03 0x36 0x06 0x15 0x06 0x11 0x09 0xC4 0xA2 0x00 0x1D; 0x12 0x31 0x38 0x07 0x15 0x05 0x17 0x07 0x15 0x06 0x86 0xB8; 0x00 0x27 0x86 0x6A 0x8B 0x60 0x36 0x05 0x84 0x06 0x01 0xA7; 0xFF 0xE1 0x15 0x05 0x10 0x64 0xA4 0x00 0x0E 0xB2 0x00 0x18; 0x12 0x44 0xB6 0x00 0x20 0xA7 0x00 0x26 0x15 0x05 0x10 0x32; 0xA2 0x00 0x1F 0x10 0x32 0x15 0x04 0x68 0x36 0x06 0x14 0x00; 0x3D 0x15 0x04 0x87 0x6B 0x39 0x07 0xB2 0x00 0x18 0x15 0x06; 0x87 0x18 0x07 0x63 0xB6 0x00 0x46 0x1B 0x10 0x06 0xA0 0x00; 0x20 0x12 0x49 0x3A 0x05 0x10 0x46 0x36 0x06 0x10 0x64 0x36; 0x07 0xB2 0x00 0x18 0x19 0x05 0x15 0x06 0x15 0x07 0xBA 0x00; 0x4B 0x00 0x00 0xB6 0x00 0x20 0x03 0x36 0x05 0x01 0x3A 0x06; 0x04 0x15 0x05 0x6C 0x36 0x05 0x19 0x06 0xB6 0x00 0x12 0x57; 0xA7 0x00 0x22 0x3A 0x07 0xBB 0x00 0x02 0x59 0xB7 0x00 0x01; 0x3A 0x06 0x19 0x06 0xB6 0x00 0x12 0x57 0xA7 0x00 0x0E 0x3A; 0x09 0x19 0x06 0xB6 0x00 0x12 0x57 0x19 0x09 0xBF 0x15 0x05; 0x9A 0x00 0x06 0x01 0x3A 0x06 0x1C 0xAB 0x00 0x00 0x00 0x25; 0x00 0x00 0x00 0x02 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x19; 0x00 0x00 0x00 0x02 0x00 0x00 0x00 0x25 0xBB 0x00 0x02 0x59; 0xB7 0x00 0x01 0x3A 0x06 0xA7 0x00 0x03 0xB1; } [] { // Traps 4 8 16 22; 4 8 34 0; 16 26 34 0; 34 36 34 0; 420 426 435 22; 420 426 455 0; 435 446 455 0; 455 457 455 0; } // end of Traps [] { // Attributes Attr(#120) { // StackMapTable [] { // 246b, []{#11; #16}, { // early_larval_frame 255b, 16, []{O,#10; I; I; O,#2}, []{O,#22}; // full_frame }; 246b, []{#11; #16}, { // early_larval_frame 81b, []z{O,#121}; // same_locals_1_stack_item_frame }; 246b, []{#26; #16}, { // early_larval_frame 9b; // same_frame }; 5b; // same_frame 25b; // same_frame 10b; // same_frame 11b; // same_frame 27b; // same_frame 246b, []{}, { // early_larval_frame 253b, 10, []z{I; I}; // append_frame 2 }; 250b, 32; // chop_frame 1 250b, 12; // chop_frame 1 252b, 47, []z{I}; // append_frame 1 40b; // same_frame 7b; // same_frame 253b, 10, []z{I; I}; // append_frame 2 246b, []{}, { // early_larval_frame 250b, 33; // chop_frame 1 }; 17b; // same_frame 250b, 34; // chop_frame 1 34b; // same_frame 255b, 20, []{O,#10; I; I; O,#2; I; I; O,#2}, []{O,#22}; // full_frame 83b, []z{O,#121}; // same_locals_1_stack_item_frame 10b; // same_frame 7b; // same_frame 25b; // same_frame 246b, []{#11; #16; #26; #112}, { // early_larval_frame 11b; // same_frame }; } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0001; // access #105; // name_index #106; // descriptor_index [] { // Attributes Attr(#119) { // Code 3; // max_stack 7; // max_locals Bytes[]{ 0x03 0x3E 0x04 0x36 0x04 0x01 0x3A 0x05 0x1B 0x9E 0x00 0x26; 0x1B 0x04 0x60 0x3E 0x2C 0xC1 0x00 0x4E 0x99 0x00 0x13 0x2C; 0xC0 0x00 0x4E 0x3A 0x05 0x19 0x05 0xB6 0x00 0x50 0x36 0x04; 0x15 0x04 0xAC 0x1D 0x05 0x68 0x36 0x04 0xA7 0x00 0x3C 0x1B; 0x02 0xA0 0x00 0x15 0x1B 0x74 0x3E 0x1D 0x06 0x60 0x36 0x04; 0xBB 0x00 0x54 0x59 0x12 0x56 0xB7 0x00 0x58 0xBF 0x03 0x36; 0x06 0x15 0x06 0x05 0xA2 0x00 0x1C 0x1D 0x15 0x06 0x60 0x3E; 0x1D 0x04 0xA4 0x00 0x0C 0x1D 0x15 0x06 0x64 0x36 0x04 0xA7; 0x00 0x09 0x84 0x06 0x01 0xA7 0xFF 0xE4 0xA7 0x00 0x0E 0x3A; 0x06 0x19 0x06 0x3A 0x05 0x1D 0x08 0x60 0x36 0x04 0x1D 0x15; 0x04 0x60 0xAC; } [] { // Traps 8 38 107 84; 39 104 107 84; } // end of Traps [] { // Attributes Attr(#120) { // StackMapTable [] { // 254b, 39, []z{I; I; O,#2}; // append_frame 3 7b; // same_frame 22b; // same_frame 246b, []{#11; #16; #26; #112}, { // early_larval_frame 252b, 2, []z{I}; // append_frame 1 }; 24b; // same_frame 250b, 5; // chop_frame 1 246b, []{#11; #16; #26; #112}, { // early_larval_frame 66b, []z{O,#84}; // same_locals_1_stack_item_frame }; 10b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0001; // access #109; // name_index #110; // descriptor_index [] { // Attributes Attr(#119) { // Code 3; // max_stack 6; // max_locals Bytes[]{ 0x03 0x3D 0x01 0x4E 0x03 0x36 0x04 0x1B 0x9E 0x00 0x11 0x12; 0x5A 0x4E 0x04 0x36 0x04 0x2D 0xB6 0x00 0x50 0x3D 0xA7 0x00; 0x11 0x1B 0x05 0x68 0x3D 0xBB 0x00 0x54 0x59 0x12 0x5C 0xB7; 0x00 0x58 0xBF 0xA7 0x00 0x0E 0x3A 0x05 0x19 0x05 0x4E 0x03; 0x36 0x04 0x1B 0x74 0x3D 0x15 0x04 0x99 0x00 0x07 0x1C 0x04; 0x60 0xAC 0xB2 0x00 0x18 0x12 0x5E 0xB6 0x00 0x20 0x1C 0xAC; } [] { // Traps 7 39 42 84; } // end of Traps [] { // Attributes Attr(#120) { // StackMapTable [] { // 246b, []{#11; #16; #26; #112}, { // early_larval_frame 254b, 25, []z{I; O,#2; I}; // append_frame 3 }; 246b, []{#11; #16; #26}, { // early_larval_frame 13b; // same_frame }; 246b, []{#11; #16}, { // early_larval_frame 66b, []z{O,#84}; // same_locals_1_stack_item_frame }; 246b, []{#11}, { // early_larval_frame 10b; // same_frame }; 246b, []{}, { // early_larval_frame 8b; // same_frame }; } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0009; // access #123; // name_index #124; // descriptor_index [] { // Attributes Attr(#119) { // Code 3; // max_stack 3; // max_locals Bytes[]{ 0xBB 0x00 0x0A 0x59 0xB7 0x00 0x60 0x4C 0x03 0x3D 0x1C 0x10; 0x06 0xA3 0x00 0x0E 0x2B 0x1C 0xB6 0x00 0x61 0x84 0x02 0x01; 0xA7 0xFF 0xF2 0x2B 0x03 0x12 0x65 0xB6 0x00 0x67 0x57 0x2B; 0x10 0x17 0xB6 0x00 0x6B 0x57 0xB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#120) { // StackMapTable [] { // 246b, []{}, { // early_larval_frame 253b, 10, []z{O,#10; I}; // append_frame 2 }; 250b, 16; // chop_frame 1 } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0008; // access #125; // name_index #6; // descriptor_index [] { // Attributes Attr(#119) { // Code 2; // max_stack 0; // max_locals Bytes[]{ 0x0A 0xB3 0x00 0x6F 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#126) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #137; // bootstrap_method_ref [] { // bootstrap_arguments #127; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #137; // bootstrap_method_ref [] { // bootstrap_arguments #129; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #137; // bootstrap_method_ref [] { // bootstrap_arguments #131; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #137; // bootstrap_method_ref [] { // bootstrap_arguments #133; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #137; // bootstrap_method_ref [] { // bootstrap_arguments #135; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#143) { // InnerClasses [] { // classes #144 #146 #148 25; } } // end of InnerClasses } // end of Attributes } StackMapData.t.jasm000066400000000000000000000562711514323636100345110ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/StackMapTablepackage org/openjdk/asmtools/attribute/StackMapTable/data; public super class StackMapData version 69:0 { static final Field fldI:I = int 0; static Field fldL:J; protected Field fldS:"Ljava/lang/String;"; public final Field fldFS:"Ljava/lang/String;" = String "string"; public Method "":"()V" stack 2 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; aload_0; ldc String "string"; putfield Field fldS:"Ljava/lang/String;"; aload_0; ldc String "string"; putfield Field fldFS:"Ljava/lang/String;"; return; } public Method generateFrames:"(I)V" stack 5 locals 10 { iconst_0; istore_2; aconst_null; astore_3; try T0, T1; iconst_1; iload_2; idiv; istore_2; endtry T0,T1; aload_3; invokevirtual Method java/lang/Object.toString:"()Ljava/lang/String;"; pop; goto L44; catch T0 java/lang/ArithmeticException; try T2; astore 4; new class java/lang/Object; dup; invokespecial Method java/lang/Object."":"()V"; astore_3; endtry T2; aload_3; invokevirtual Method java/lang/Object.toString:"()Ljava/lang/String;"; pop; goto L44; catch T1 #0; catch T2 #0; catch T3 #0; try T3; astore 5; endtry T3; aload_3; invokevirtual Method java/lang/Object.toString:"()Ljava/lang/String;"; pop; aload 5; athrow; L44: iload_2; ifne L50; aconst_null; astore_3; L50: iload_2; lookupswitch { 1: L76; 2: L87; default: L87 }; L76: new class java/lang/Object; dup; invokespecial Method java/lang/Object."":"()V"; astore_3; goto L87; L87: iload_1; ifne L99; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; ldc String "frame"; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; L99: iload_1; iconst_1; if_icmpne L127; bipush 42; istore 4; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; iload 4; ldc float 100.0f; invokestatic Method java/lang/Math.round:"(F)I"; imul; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(I)Ljava/lang/String;" { String "item_frame\u0001" }; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; L127: iload_1; iconst_2; if_icmpne L184; iconst_0; istore 4; iconst_0; istore 5; L138: iload 5; sipush 3000; if_icmpge L171; ldc float 3.14f; fstore 6; iload 4; fload 6; ldc float 100.0f; invokestatic Method java/lang/Math.round:"(F)I"; i2f; fmul; f2i; iadd; istore 4; iinc 5, 1; goto L138; L171: getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; iload 4; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(I)Ljava/lang/String;" { String "item_frame_\u0001" }; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; L184: ldc float 10.0f; invokestatic Method java/lang/Math.round:"(F)I"; istore 4; iload_1; iconst_3; if_icmpne L232; ldc float 110.0f; invokestatic Method java/lang/Math.round:"(F)I"; istore 5; ldc2_w double 100.0d; invokestatic Method java/lang/Math.round:"(D)J"; lstore 6; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; iload 5; i2l; lload 6; ladd; iload 4; i2l; lmul; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(J)Ljava/lang/String;" { String "_frame: \u0001" }; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; L232: iload_1; iconst_4; if_icmpne L273; bipush 50; iload 4; imul; istore 5; ldc2_w double 99.99d; iload 4; i2d; dmul; dstore 6; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; iload 5; i2d; dload 6; dadd; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(D)Ljava/lang/String;" { String "Before chop_frame: \u0001" }; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; goto L281; L273: getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; ldc String "chop_frame"; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; L281: iload_1; iconst_5; if_icmpne L379; iconst_0; istore 5; iconst_0; istore 6; L292: iload 6; sipush 2500; if_icmpge L326; ldc float 3.14f; fstore 7; iload 5; fload 7; iload 6; i2f; invokestatic Method java/lang/Math.round:"(F)I"; i2f; fmul; f2i; iadd; istore 5; iinc 6, 1; goto L292; L326: iload 5; bipush 100; if_icmple L344; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; ldc String "_frame_"; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; goto L379; L344: iload 5; bipush 50; if_icmpge L379; bipush 50; iload 4; imul; istore 6; ldc2_w double 99.99d; iload 4; i2d; dmul; dstore 7; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; iload 6; i2d; dload 7; dadd; invokevirtual Method java/io/PrintStream.println:"(D)V"; L379: iload_1; bipush 6; if_icmpne L414; ldc String "n_frame"; astore 5; bipush 70; istore 6; bipush 100; istore 7; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; aload 5; iload 6; iload 7; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" { String "\u0001: \u0001\u0001" }; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; L414: iconst_0; istore 5; aconst_null; astore 6; try T4, T5; iconst_1; iload 5; idiv; istore 5; endtry T4,T5; aload 6; invokevirtual Method java/lang/Object.toString:"()Ljava/lang/String;"; pop; goto L466; catch T4 java/lang/ArithmeticException; try T6; astore 7; new class java/lang/Object; dup; invokespecial Method java/lang/Object."":"()V"; astore 6; endtry T6; aload 6; invokevirtual Method java/lang/Object.toString:"()Ljava/lang/String;"; pop; goto L466; catch T5 #0; catch T6 #0; catch T7 #0; try T7; astore 9; endtry T7; aload 6; invokevirtual Method java/lang/Object.toString:"()Ljava/lang/String;"; pop; aload 9; athrow; L466: iload 5; ifne L474; aconst_null; astore 6; L474: iload_2; lookupswitch { 1: L500; 2: L512; default: L512 }; L500: new class java/lang/Object; dup; invokespecial Method java/lang/Object."":"()V"; astore 6; goto L512; L512: return; StackMapTable: number_of_entries = 25 frame_type = 246 // early_larval unset_fields = [ fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;"; ] { frame_type = 255 // full offset_delta = 16 stack_map = [ class java/lang/ArithmeticException; ] locals_map = [ class StackMapData, int, int, class java/lang/Object; ] } frame_type = 246 // early_larval unset_fields = [ fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;"; ] { frame_type = 81 // same_locals_1_stack_item stack_map = [ class java/lang/Throwable; ] } frame_type = 246 // early_larval unset_fields = [ out:"Ljava/io/PrintStream;", fldFS:"Ljava/lang/String;"; ] { frame_type = 9 // same } frame_type = 5 // same frame_type = 25 // same frame_type = 10 // same frame_type = 11 // same frame_type = 27 // same frame_type = 246 // early_larval unset_fields = [ ] { frame_type = 253 // append offset_delta = 10 locals_map = [ int, int; ] } frame_type = 250 // chop1 offset_delta = 32 frame_type = 250 // chop1 offset_delta = 12 frame_type = 252 // append offset_delta = 47 locals_map = [ int; ] frame_type = 40 // same frame_type = 7 // same frame_type = 253 // append offset_delta = 10 locals_map = [ int, int; ] frame_type = 246 // early_larval unset_fields = [ ] { frame_type = 250 // chop1 offset_delta = 33 } frame_type = 17 // same frame_type = 250 // chop1 offset_delta = 34 frame_type = 34 // same frame_type = 255 // full offset_delta = 20 stack_map = [ class java/lang/ArithmeticException; ] locals_map = [ class StackMapData, int, int, class java/lang/Object, int, int, class java/lang/Object; ] frame_type = 83 // same_locals_1_stack_item stack_map = [ class java/lang/Throwable; ] frame_type = 10 // same frame_type = 7 // same frame_type = 25 // same frame_type = 246 // early_larval unset_fields = [ fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;", out:"Ljava/io/PrintStream;", fldL:"J"; ] { frame_type = 11 // same } } public Method complexMethod:"(ILjava/lang/Object;)I" stack 3 locals 7 { iconst_0; istore_3; iconst_1; istore 4; aconst_null; astore 5; try T0; iload_1; ifle L47; iload_1; iconst_1; iadd; istore_3; aload_2; instanceof class java/lang/String; ifeq L39; aload_2; checkcast class java/lang/String; astore 5; aload 5; invokevirtual Method java/lang/Object.hashCode:"()I"; istore 4; iload 4; endtry T0; ireturn; try T1; L39: iload_3; iconst_2; imul; istore 4; goto L104; L47: iload_1; iconst_m1; if_icmpne L70; iload_1; ineg; istore_3; iload_3; iconst_3; iadd; istore 4; new class java/lang/RuntimeException; dup; ldc String "Test exception"; invokespecial Method java/lang/RuntimeException."":"(Ljava/lang/String;)V"; athrow; L70: iconst_0; istore 6; L73: iload 6; iconst_2; if_icmpge L104; iload_3; iload 6; iadd; istore_3; iload_3; iconst_1; if_icmple L98; iload_3; iload 6; isub; istore 4; goto L104; L98: iinc 6, 1; goto L73; endtry T1; L104: goto L118; catch T0 java/lang/RuntimeException; catch T1 java/lang/RuntimeException; astore 6; aload 6; astore 5; iload_3; iconst_5; iadd; istore 4; L118: iload_3; iload 4; iadd; ireturn; StackMapTable: number_of_entries = 8 frame_type = 254 // append offset_delta = 39 locals_map = [ int, int, class java/lang/Object; ] frame_type = 7 // same frame_type = 22 // same frame_type = 246 // early_larval unset_fields = [ fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;", out:"Ljava/io/PrintStream;", fldL:"J"; ] { frame_type = 252 // append offset_delta = 2 locals_map = [ int; ] } frame_type = 24 // same frame_type = 250 // chop1 offset_delta = 5 frame_type = 246 // early_larval unset_fields = [ fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;", out:"Ljava/io/PrintStream;", fldL:"J"; ] { frame_type = 66 // same_locals_1_stack_item stack_map = [ class java/lang/RuntimeException; ] } frame_type = 10 // same } public Method generateFullFrame:"(I)I" stack 3 locals 6 { iconst_0; istore_2; aconst_null; astore_3; iconst_0; istore 4; try T0; iload_1; ifle L25; ldc String "positive"; astore_3; iconst_1; istore 4; aload_3; invokevirtual Method java/lang/Object.hashCode:"()I"; istore_2; goto L39; L25: iload_1; iconst_2; imul; istore_2; new class java/lang/RuntimeException; dup; ldc String "non-positive"; invokespecial Method java/lang/RuntimeException."":"(Ljava/lang/String;)V"; athrow; endtry T0; L39: goto L53; catch T0 java/lang/RuntimeException; astore 5; aload 5; astore_3; iconst_0; istore 4; iload_1; ineg; istore_2; L53: iload 4; ifeq L62; iload_2; iconst_1; iadd; ireturn; L62: getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; ldc String "Computing result"; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; iload_2; ireturn; StackMapTable: number_of_entries = 5 frame_type = 246 // early_larval unset_fields = [ fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;", out:"Ljava/io/PrintStream;", fldL:"J"; ] { frame_type = 254 // append offset_delta = 25 locals_map = [ int, class java/lang/Object, int; ] } frame_type = 246 // early_larval unset_fields = [ fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;", out:"Ljava/io/PrintStream;"; ] { frame_type = 13 // same } frame_type = 246 // early_larval unset_fields = [ fldS:"Ljava/lang/String;", fldFS:"Ljava/lang/String;"; ] { frame_type = 66 // same_locals_1_stack_item stack_map = [ class java/lang/RuntimeException; ] } frame_type = 246 // early_larval unset_fields = [ fldS:"Ljava/lang/String;"; ] { frame_type = 10 // same } frame_type = 246 // early_larval unset_fields = [ ] { frame_type = 8 // same } } public static Method main:"([Ljava/lang/String;)V" stack 3 locals 3 { new class StackMapData; dup; invokespecial Method "":"()V"; astore_1; iconst_0; istore_2; L10: iload_2; bipush 6; if_icmpgt L27; aload_1; iload_2; invokevirtual Method generateFrames:"(I)V"; iinc 2, 1; goto L10; L27: aload_1; iconst_0; ldc String "test"; invokevirtual Method complexMethod:"(ILjava/lang/Object;)I"; pop; aload_1; bipush 23; invokevirtual Method generateFullFrame:"(I)I"; pop; return; StackMapTable: number_of_entries = 2 frame_type = 246 // early_larval unset_fields = [ ] { frame_type = 253 // append offset_delta = 10 locals_map = [ class StackMapData, int; ] } frame_type = 250 // chop1 offset_delta = 16 } static Method "":"()V" stack 2 locals 0 { lconst_1; putstatic Field fldL:"J"; return; } InnerClasses { public static final Lookup = class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles; } BootstrapMethods { 0: REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: String "item_frame\u0001"; 1: REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: String "item_frame_\u0001"; 2: REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: String "_frame: \u0001"; 3: REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: String "Before chop_frame: \u0001"; 4: REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: String "\u0001: \u0001\u0001"; } } // end Class org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData StackMapData01.g.jasm000066400000000000000000001170531514323636100346310ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/StackMapTablepackage org/openjdk/asmtools/attribute/StackMapTable/data; public super class #10 /* StackMapData01 */ version 69:0 { const #1 = Method #2.#3; // java/lang/Object."":"()V" const #2 = class #4; // java/lang/Object const #3 = NameAndType #5:#6; // "":"()V" const #4 = Utf8 "java/lang/Object"; const #5 = Utf8 ""; const #6 = Utf8 "()V"; const #7 = String #8; // "string" const #8 = Utf8 "string"; const #9 = Field #10.#11; // StackMapData01.fldS:"Ljava/lang/String;" const #10 = class #12; // StackMapData01 const #11 = NameAndType #13:#14; // fldS:"Ljava/lang/String;" const #12 = Utf8 "org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData01"; const #13 = Utf8 "fldS"; const #14 = Utf8 "Ljava/lang/String;"; const #15 = Field #10.#16; // StackMapData01.fldFS:"Ljava/lang/String;" const #16 = NameAndType #17:#14; // fldFS:"Ljava/lang/String;" const #17 = Utf8 "fldFS"; const #18 = Method #2.#19; // java/lang/Object.toString:"()Ljava/lang/String;" const #19 = NameAndType #20:#21; // toString:"()Ljava/lang/String;" const #20 = Utf8 "toString"; const #21 = Utf8 "()Ljava/lang/String;"; const #22 = class #23; // java/lang/ArithmeticException const #23 = Utf8 "java/lang/ArithmeticException"; const #24 = Field #25.#26; // java/lang/System.out:"Ljava/io/PrintStream;" const #25 = class #27; // java/lang/System const #26 = NameAndType #28:#29; // out:"Ljava/io/PrintStream;" const #27 = Utf8 "java/lang/System"; const #28 = Utf8 "out"; const #29 = Utf8 "Ljava/io/PrintStream;"; const #30 = String #31; // "frame" const #31 = Utf8 "frame"; const #32 = Method #33.#34; // java/io/PrintStream.println:"(Ljava/lang/String;)V" const #33 = class #35; // java/io/PrintStream const #34 = NameAndType #36:#37; // println:"(Ljava/lang/String;)V" const #35 = Utf8 "java/io/PrintStream"; const #36 = Utf8 "println"; const #37 = Utf8 "(Ljava/lang/String;)V"; const #38 = float 100.0f; const #39 = Method #40.#41; // java/lang/Math.round:"(F)I" const #40 = class #42; // java/lang/Math const #41 = NameAndType #43:#44; // round:"(F)I" const #42 = Utf8 "java/lang/Math"; const #43 = Utf8 "round"; const #44 = Utf8 "(F)I"; const #45 = InvokeDynamic 0:#46; // #0:makeConcatWithConstants:"(I)Ljava/lang/String;" const #46 = NameAndType #47:#48; // makeConcatWithConstants:"(I)Ljava/lang/String;" const #47 = Utf8 "makeConcatWithConstants"; const #48 = Utf8 "(I)Ljava/lang/String;"; const #49 = float 3.14f; const #50 = InvokeDynamic 1:#46; // #1:makeConcatWithConstants:"(I)Ljava/lang/String;" const #51 = float 10.0f; const #52 = float 110.0f; const #53 = double 100.0d; const #55 = Method #40.#56; // java/lang/Math.round:"(D)J" const #56 = NameAndType #43:#57; // round:"(D)J" const #57 = Utf8 "(D)J"; const #58 = InvokeDynamic 2:#59; // #2:makeConcatWithConstants:"(J)Ljava/lang/String;" const #59 = NameAndType #47:#60; // makeConcatWithConstants:"(J)Ljava/lang/String;" const #60 = Utf8 "(J)Ljava/lang/String;"; const #61 = double 99.99d; const #63 = InvokeDynamic 3:#64; // #3:makeConcatWithConstants:"(D)Ljava/lang/String;" const #64 = NameAndType #47:#65; // makeConcatWithConstants:"(D)Ljava/lang/String;" const #65 = Utf8 "(D)Ljava/lang/String;"; const #66 = String #67; // "chop_frame" const #67 = Utf8 "chop_frame"; const #68 = String #69; // "_frame_" const #69 = Utf8 "_frame_"; const #70 = Method #33.#71; // java/io/PrintStream.println:"(D)V" const #71 = NameAndType #36:#72; // println:"(D)V" const #72 = Utf8 "(D)V"; const #73 = String #74; // "n_frame" const #74 = Utf8 "n_frame"; const #75 = InvokeDynamic 4:#76; // #4:makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" const #76 = NameAndType #47:#77; // makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" const #77 = Utf8 "(Ljava/lang/String;CI)Ljava/lang/String;"; const #78 = class #79; // java/lang/String const #79 = Utf8 "java/lang/String"; const #80 = Method #2.#81; // java/lang/Object.hashCode:"()I" const #81 = NameAndType #82:#83; // hashCode:"()I" const #82 = Utf8 "hashCode"; const #83 = Utf8 "()I"; const #84 = class #85; // java/lang/RuntimeException const #85 = Utf8 "java/lang/RuntimeException"; const #86 = String #87; // "Test exception" const #87 = Utf8 "Test exception"; const #88 = Method #84.#89; // java/lang/RuntimeException."":"(Ljava/lang/String;)V" const #89 = NameAndType #5:#37; // "":"(Ljava/lang/String;)V" const #90 = String #91; // "positive" const #91 = Utf8 "positive"; const #92 = String #93; // "non-positive" const #93 = Utf8 "non-positive"; const #94 = String #95; // "Computing result" const #95 = Utf8 "Computing result"; const #96 = Method #10.#3; // StackMapData01."":"()V" const #97 = Method #10.#98; // StackMapData01.generateFrames:"(I)V" const #98 = NameAndType #99:#100; // generateFrames:"(I)V" const #99 = Utf8 "generateFrames"; const #100 = Utf8 "(I)V"; const #101 = String #102; // "test" const #102 = Utf8 "test"; const #103 = Method #10.#104; // StackMapData01.complexMethod:"(ILjava/lang/Object;)I" const #104 = NameAndType #105:#106; // complexMethod:"(ILjava/lang/Object;)I" const #105 = Utf8 "complexMethod"; const #106 = Utf8 "(ILjava/lang/Object;)I"; const #107 = Method #10.#108; // StackMapData01.generateFullFrame:"(I)I" const #108 = NameAndType #109:#110; // generateFullFrame:"(I)I" const #109 = Utf8 "generateFullFrame"; const #110 = Utf8 "(I)I"; const #111 = Field #10.#112; // StackMapData01.fldL:"J" const #112 = NameAndType #113:#114; // fldL:"J" const #113 = Utf8 "fldL"; const #114 = Utf8 "J"; const #115 = Utf8 "fldI"; const #116 = Utf8 "I"; const #117 = Utf8 "ConstantValue"; const #118 = int 0; const #119 = Utf8 "Code"; const #120 = Utf8 "StackMapTable"; const #121 = class #122; // java/lang/Throwable const #122 = Utf8 "java/lang/Throwable"; const #123 = Utf8 "main"; const #124 = Utf8 "([Ljava/lang/String;)V"; const #125 = Utf8 ""; const #126 = Utf8 "BootstrapMethods"; const #127 = String #128; // "item_frame\u0001" const #128 = Utf8 "item_frame\u0001"; const #129 = String #130; // "item_frame_\u0001" const #130 = Utf8 "item_frame_\u0001"; const #131 = String #132; // "_frame: \u0001" const #132 = Utf8 "_frame: \u0001"; const #133 = String #134; // "Before chop_frame: \u0001" const #134 = Utf8 "Before chop_frame: \u0001"; const #135 = String #136; // "\u0001: \u0001\u0001" const #136 = Utf8 "\u0001: \u0001\u0001"; const #137 = MethodHandle 6:#138; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #138 = Method #139.#140; // java/lang/invoke/StringConcatFactory.makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #139 = class #141; // java/lang/invoke/StringConcatFactory const #140 = NameAndType #47:#142; // makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #141 = Utf8 "java/lang/invoke/StringConcatFactory"; const #142 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; const #143 = Utf8 "InnerClasses"; const #144 = class #145; // java/lang/invoke/MethodHandles$Lookup const #145 = Utf8 "java/lang/invoke/MethodHandles$Lookup"; const #146 = class #147; // java/lang/invoke/MethodHandles const #147 = Utf8 "java/lang/invoke/MethodHandles"; const #148 = Utf8 "Lookup"; static final Field #115:#116 = #118; // fldI:I = int 0 static Field #113:#114; // fldL:J protected Field #13:#14; // fldS:"Ljava/lang/String;" public final Field #17:#14 = #7; // fldFS:"Ljava/lang/String;" = String "string" public Method #5:#6 // "":"()V" stack 2 locals 1 { 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: aload_0; 5: ldc #7; // String "string" 7: putfield #9; // Field fldS:"Ljava/lang/String;" 10: aload_0; 11: ldc #7; // String "string" 13: putfield #15; // Field fldFS:"Ljava/lang/String;" 16: return; } public Method #99:#100 // generateFrames:"(I)V" stack 5 locals 10 { 0: iconst_0; 1: istore_2; 2: aconst_null; 3: astore_3; try T0, T1; 4: iconst_1; 5: iload_2; 6: idiv; 7: istore_2; endtry T0,T1; 8: aload_3; 9: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 12: pop; 13: goto 44; catch T0 #22; // java/lang/ArithmeticException try T2; 16: stack_frame_type early_larval; // frame_type 246 unset_fields #15, // Field #10.#16, #16; // fldFS:"Ljava/lang/String;"; frame_type full; // frame_type 255 locals_map #10, 1, 1, #2; // class StackMapData01, int, int, class java/lang/Object; stack_map #22; // class java/lang/ArithmeticException; astore 4; 18: new #2; // class java/lang/Object 21: dup; 22: invokespecial #1; // Method java/lang/Object."":"()V" 25: astore_3; endtry T2; 26: aload_3; 27: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 30: pop; 31: goto 44; catch T1 #0; // any catch T2 #0; // any catch T3 #0; // any try T3; 34: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16; // fldFS:"Ljava/lang/String;"; frame_type stack1; // frame_type 81 stack_map #121; // class java/lang/Throwable; astore 5; endtry T3; 36: aload_3; 37: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 40: pop; 41: aload 5; 43: athrow; 44: stack_frame_type early_larval; // frame_type 246 unset_fields #26, // out:"Ljava/io/PrintStream;", #16; // fldFS:"Ljava/lang/String;"; frame_type same; // frame_type 9 iload_2; 45: ifne 50; 48: aconst_null; 49: astore_3; 50: stack_frame_type same; // frame_type 5 iload_2; 51: lookupswitch { // 2 1: 76; 2: 87; default: 87 }; 76: stack_frame_type same; // frame_type 25 new #2; // class java/lang/Object 79: dup; 80: invokespecial #1; // Method java/lang/Object."":"()V" 83: astore_3; 84: goto 87; 87: stack_frame_type same; // frame_type 10 iload_1; 88: ifne 99; 91: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 94: ldc #30; // String "frame" 96: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 99: stack_frame_type same; // frame_type 11 iload_1; 100: iconst_1; 101: if_icmpne 127; 104: bipush 42; 106: istore 4; 108: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 111: iload 4; 113: ldc #38; // float 100.0f 115: invokestatic #39; // Method java/lang/Math.round:"(F)I" 118: imul; 119: invokedynamic #45; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(I)Ljava/lang/String;" { // String "item_frame\u0001" // } 124: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 127: stack_frame_type same; // frame_type 27 iload_1; 128: iconst_2; 129: if_icmpne 184; 132: iconst_0; 133: istore 4; 135: iconst_0; 136: istore 5; 138: stack_frame_type early_larval; // frame_type 246 unset_fields; frame_type append; // frame_type 253 locals_map 1, 1; // int, int; iload 5; 140: sipush 3000; 143: if_icmpge 171; 146: ldc #49; // float 3.14f 148: fstore 6; 150: iload 4; 152: fload 6; 154: ldc #38; // float 100.0f 156: invokestatic #39; // Method java/lang/Math.round:"(F)I" 159: i2f; 160: fmul; 161: f2i; 162: iadd; 163: istore 4; 165: iinc 5, 1; 168: goto 138; 171: stack_frame_type chop1; // frame_type 250 getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 174: iload 4; 176: invokedynamic #50; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(I)Ljava/lang/String;" { // String "item_frame_\u0001" // } 181: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 184: stack_frame_type chop1; // frame_type 250 ldc #51; // float 10.0f 186: invokestatic #39; // Method java/lang/Math.round:"(F)I" 189: istore 4; 191: iload_1; 192: iconst_3; 193: if_icmpne 232; 196: ldc #52; // float 110.0f 198: invokestatic #39; // Method java/lang/Math.round:"(F)I" 201: istore 5; 203: ldc2_w #53; // double 100.0d 206: invokestatic #55; // Method java/lang/Math.round:"(D)J" 209: lstore 6; 211: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 214: iload 5; 216: i2l; 217: lload 6; 219: ladd; 220: iload 4; 222: i2l; 223: lmul; 224: invokedynamic #58; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(J)Ljava/lang/String;" { // String "_frame: \u0001" // } 229: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 232: stack_frame_type append; // frame_type 252 locals_map 1; // int; iload_1; 233: iconst_4; 234: if_icmpne 273; 237: bipush 50; 239: iload 4; 241: imul; 242: istore 5; 244: ldc2_w #61; // double 99.99d 247: iload 4; 249: i2d; 250: dmul; 251: dstore 6; 253: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 256: iload 5; 258: i2d; 259: dload 6; 261: dadd; 262: invokedynamic #63; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(D)Ljava/lang/String;" { // String "Before chop_frame: \u0001" // } 267: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 270: goto 281; 273: stack_frame_type same; // frame_type 40 getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 276: ldc #66; // String "chop_frame" 278: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 281: stack_frame_type same; // frame_type 7 iload_1; 282: iconst_5; 283: if_icmpne 379; 286: iconst_0; 287: istore 5; 289: iconst_0; 290: istore 6; 292: stack_frame_type append; // frame_type 253 locals_map 1, 1; // int, int; iload 6; 294: sipush 2500; 297: if_icmpge 326; 300: ldc #49; // float 3.14f 302: fstore 7; 304: iload 5; 306: fload 7; 308: iload 6; 310: i2f; 311: invokestatic #39; // Method java/lang/Math.round:"(F)I" 314: i2f; 315: fmul; 316: f2i; 317: iadd; 318: istore 5; 320: iinc 6, 1; 323: goto 292; 326: stack_frame_type early_larval; // frame_type 246 unset_fields; frame_type chop1; // frame_type 250 iload 5; 328: bipush 100; 330: if_icmple 344; 333: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 336: ldc #68; // String "_frame_" 338: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 341: goto 379; 344: stack_frame_type same; // frame_type 17 iload 5; 346: bipush 50; 348: if_icmpge 379; 351: bipush 50; 353: iload 4; 355: imul; 356: istore 6; 358: ldc2_w #61; // double 99.99d 361: iload 4; 363: i2d; 364: dmul; 365: dstore 7; 367: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 370: iload 6; 372: i2d; 373: dload 7; 375: dadd; 376: invokevirtual #70; // Method java/io/PrintStream.println:"(D)V" 379: stack_frame_type chop1; // frame_type 250 iload_1; 380: bipush 6; 382: if_icmpne 414; 385: ldc #73; // String "n_frame" 387: astore 5; 389: bipush 70; 391: istore 6; 393: bipush 100; 395: istore 7; 397: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 400: aload 5; 402: iload 6; 404: iload 7; 406: invokedynamic #75; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" { // String "\u0001: \u0001\u0001" // } 411: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 414: stack_frame_type same; // frame_type 34 iconst_0; 415: istore 5; 417: aconst_null; 418: astore 6; try T4, T5; 420: iconst_1; 421: iload 5; 423: idiv; 424: istore 5; endtry T4,T5; 426: aload 6; 428: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 431: pop; 432: goto 466; catch T4 #22; // java/lang/ArithmeticException try T6; 435: stack_frame_type full; // frame_type 255 locals_map #10, 1, 1, #2, 1, 1, #2; // class StackMapData01, int, int, class java/lang/Object, int, int, class java/lang/Object; stack_map #22; // class java/lang/ArithmeticException; astore 7; 437: new #2; // class java/lang/Object 440: dup; 441: invokespecial #1; // Method java/lang/Object."":"()V" 444: astore 6; endtry T6; 446: aload 6; 448: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 451: pop; 452: goto 466; catch T5 #0; // any catch T6 #0; // any catch T7 #0; // any try T7; 455: stack_frame_type stack1; // frame_type 83 stack_map #121; // class java/lang/Throwable; astore 9; endtry T7; 457: aload 6; 459: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 462: pop; 463: aload 9; 465: athrow; 466: stack_frame_type same; // frame_type 10 iload 5; 468: ifne 474; 471: aconst_null; 472: astore 6; 474: stack_frame_type same; // frame_type 7 iload_2; 475: lookupswitch { // 2 1: 500; 2: 512; default: 512 }; 500: stack_frame_type same; // frame_type 25 new #2; // class java/lang/Object 503: dup; 504: invokespecial #1; // Method java/lang/Object."":"()V" 507: astore 6; 509: goto 512; 512: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16, // fldFS:"Ljava/lang/String;", #26, // out:"Ljava/io/PrintStream;", #112; // fldL:"J"; frame_type same; // frame_type 11 return; } public Method #105:#106 // complexMethod:"(ILjava/lang/Object;)I" stack 3 locals 7 { 0: iconst_0; 1: istore_3; 2: iconst_1; 3: istore 4; 5: aconst_null; 6: astore 5; try T0; 8: iload_1; 9: ifle 47; 12: iload_1; 13: iconst_1; 14: iadd; 15: istore_3; 16: aload_2; 17: instanceof #78; // class java/lang/String 20: ifeq 39; 23: aload_2; 24: checkcast #78; // class java/lang/String 27: astore 5; 29: aload 5; 31: invokevirtual #80; // Method java/lang/Object.hashCode:"()I" 34: istore 4; 36: iload 4; endtry T0; 38: ireturn; try T1; 39: stack_frame_type append; // frame_type 254 locals_map 1, 1, #2; // int, int, class java/lang/Object; iload_3; 40: iconst_2; 41: imul; 42: istore 4; 44: goto 104; 47: stack_frame_type same; // frame_type 7 iload_1; 48: iconst_m1; 49: if_icmpne 70; 52: iload_1; 53: ineg; 54: istore_3; 55: iload_3; 56: iconst_3; 57: iadd; 58: istore 4; 60: new #84; // class java/lang/RuntimeException 63: dup; 64: ldc #86; // String "Test exception" 66: invokespecial #88; // Method java/lang/RuntimeException."":"(Ljava/lang/String;)V" 69: athrow; 70: stack_frame_type same; // frame_type 22 iconst_0; 71: istore 6; 73: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16, // fldFS:"Ljava/lang/String;", #26, // out:"Ljava/io/PrintStream;", #112; // fldL:"J"; frame_type append; // frame_type 252 locals_map 1; // int; iload 6; 75: iconst_2; 76: if_icmpge 104; 79: iload_3; 80: iload 6; 82: iadd; 83: istore_3; 84: iload_3; 85: iconst_1; 86: if_icmple 98; 89: iload_3; 90: iload 6; 92: isub; 93: istore 4; 95: goto 104; 98: stack_frame_type same; // frame_type 24 iinc 6, 1; 101: goto 73; endtry T1; 104: stack_frame_type chop1; // frame_type 250 goto 118; catch T0 #84; // java/lang/RuntimeException catch T1 #84; // java/lang/RuntimeException 107: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16, // fldFS:"Ljava/lang/String;", #26, // out:"Ljava/io/PrintStream;", #112; // fldL:"J"; frame_type stack1; // frame_type 66 stack_map #84; // class java/lang/RuntimeException; astore 6; 109: aload 6; 111: astore 5; 113: iload_3; 114: iconst_5; 115: iadd; 116: istore 4; 118: stack_frame_type same; // frame_type 10 iload_3; 119: iload 4; 121: iadd; 122: ireturn; } public Method #109:#110 // generateFullFrame:"(I)I" stack 3 locals 6 { 0: iconst_0; 1: istore_2; 2: aconst_null; 3: astore_3; 4: iconst_0; 5: istore 4; try T0; 7: iload_1; 8: ifle 25; 11: ldc #90; // String "positive" 13: astore_3; 14: iconst_1; 15: istore 4; 17: aload_3; 18: invokevirtual #80; // Method java/lang/Object.hashCode:"()I" 21: istore_2; 22: goto 39; 25: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16, // fldFS:"Ljava/lang/String;", #26, // out:"Ljava/io/PrintStream;", #112; // fldL:"J"; frame_type append; // frame_type 254 locals_map 1, #2, 1; // int, class java/lang/Object, int; iload_1; 26: iconst_2; 27: imul; 28: istore_2; 29: new #84; // class java/lang/RuntimeException 32: dup; 33: ldc #92; // String "non-positive" 35: invokespecial #88; // Method java/lang/RuntimeException."":"(Ljava/lang/String;)V" 38: athrow; endtry T0; 39: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16, // fldFS:"Ljava/lang/String;", #26; // out:"Ljava/io/PrintStream;"; frame_type same; // frame_type 13 goto 53; catch T0 #84; // java/lang/RuntimeException 42: stack_frame_type early_larval; // frame_type 246 unset_fields #11, // fldS:"Ljava/lang/String;", #16; // fldFS:"Ljava/lang/String;"; frame_type stack1; // frame_type 66 stack_map #84; // class java/lang/RuntimeException; astore 5; 44: aload 5; 46: astore_3; 47: iconst_0; 48: istore 4; 50: iload_1; 51: ineg; 52: istore_2; 53: stack_frame_type early_larval; // frame_type 246 unset_fields #11; // fldS:"Ljava/lang/String;"; frame_type same; // frame_type 10 iload 4; 55: ifeq 62; 58: iload_2; 59: iconst_1; 60: iadd; 61: ireturn; 62: stack_frame_type early_larval; // frame_type 246 unset_fields; frame_type same; // frame_type 8 getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 65: ldc #94; // String "Computing result" 67: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 70: iload_2; 71: ireturn; } public static Method #123:#124 // main:"([Ljava/lang/String;)V" stack 3 locals 3 { 0: new #10; // class StackMapData01 3: dup; 4: invokespecial #96; // Method "":"()V" 7: astore_1; 8: iconst_0; 9: istore_2; 10: stack_frame_type early_larval; // frame_type 246 unset_fields; frame_type append; // frame_type 253 locals_map #10, 1; // class StackMapData01, int; iload_2; 11: bipush 6; 13: if_icmpgt 27; 16: aload_1; 17: iload_2; 18: invokevirtual #97; // Method generateFrames:"(I)V" 21: iinc 2, 1; 24: goto 10; 27: stack_frame_type chop1; // frame_type 250 aload_1; 28: iconst_0; 29: ldc #101; // String "test" 31: invokevirtual #103; // Method complexMethod:"(ILjava/lang/Object;)I" 34: pop; 35: aload_1; 36: bipush 23; 38: invokevirtual #107; // Method generateFullFrame:"(I)I" 41: pop; 42: return; } static Method #125:#6 // "":"()V" stack 2 locals 0 { 0: lconst_1; 1: putstatic #111; // Field fldL:"J" 4: return; } InnerClass public static final #148 = #144 of #146; // Lookup = class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles BootstrapMethod #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { #127 // String "item_frame\u0001" } BootstrapMethod #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { #129 // String "item_frame_\u0001" } BootstrapMethod #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { #131 // String "_frame: \u0001" } BootstrapMethod #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { #133 // String "Before chop_frame: \u0001" } BootstrapMethod #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; { #135 // String "\u0001: \u0001\u0001" } } // end Class org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData01 StackMapData02.g.jasm000066400000000000000000001154161514323636100346330ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/StackMapTablepackage org/openjdk/asmtools/attribute/StackMapTable/data; public super class #10 /* StackMapData02 */ version 69:0 { const #1 = Methodref #2.#3; // java/lang/Object."":"()V" const #2 = Class #4; // java/lang/Object const #3 = NameAndType #5:#6; // "":"()V" const #4 = Utf8 "java/lang/Object"; const #5 = Utf8 ""; const #6 = Utf8 "()V"; const #7 = String #8; // "string" const #8 = Utf8 "string"; const #9 = Fieldref #10.#11; // StackMapData02.fldS:"Ljava/lang/String;" const #10 = Class #12; // StackMapData02 const #11 = NameAndType #13:#14; // fldS:"Ljava/lang/String;" const #12 = Utf8 "org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData02"; const #13 = Utf8 "fldS"; const #14 = Utf8 "Ljava/lang/String;"; const #15 = Fieldref #10.#16; // StackMapData02.fldFS:"Ljava/lang/String;" const #16 = NameAndType #17:#14; // fldFS:"Ljava/lang/String;" const #17 = Utf8 "fldFS"; const #18 = Methodref #2.#19; // java/lang/Object.toString:"()Ljava/lang/String;" const #19 = NameAndType #20:#21; // toString:"()Ljava/lang/String;" const #20 = Utf8 "toString"; const #21 = Utf8 "()Ljava/lang/String;"; const #22 = Class #23; // java/lang/ArithmeticException const #23 = Utf8 "java/lang/ArithmeticException"; const #24 = Fieldref #25.#26; // java/lang/System.out:"Ljava/io/PrintStream;" const #25 = Class #27; // java/lang/System const #26 = NameAndType #28:#29; // out:"Ljava/io/PrintStream;" const #27 = Utf8 "java/lang/System"; const #28 = Utf8 "out"; const #29 = Utf8 "Ljava/io/PrintStream;"; const #30 = String #31; // "frame" const #31 = Utf8 "frame"; const #32 = Methodref #33.#34; // java/io/PrintStream.println:"(Ljava/lang/String;)V" const #33 = Class #35; // java/io/PrintStream const #34 = NameAndType #36:#37; // println:"(Ljava/lang/String;)V" const #35 = Utf8 "java/io/PrintStream"; const #36 = Utf8 "println"; const #37 = Utf8 "(Ljava/lang/String;)V"; const #38 = Float 100.0f; const #39 = Methodref #40.#41; // java/lang/Math.round:"(F)I" const #40 = Class #42; // java/lang/Math const #41 = NameAndType #43:#44; // round:"(F)I" const #42 = Utf8 "java/lang/Math"; const #43 = Utf8 "round"; const #44 = Utf8 "(F)I"; const #45 = InvokeDynamic 0:#46; // #0:makeConcatWithConstants:"(I)Ljava/lang/String;" const #46 = NameAndType #47:#48; // makeConcatWithConstants:"(I)Ljava/lang/String;" const #47 = Utf8 "makeConcatWithConstants"; const #48 = Utf8 "(I)Ljava/lang/String;"; const #49 = Float 3.14f; const #50 = InvokeDynamic 1:#46; // #1:makeConcatWithConstants:"(I)Ljava/lang/String;" const #51 = Float 10.0f; const #52 = Float 110.0f; const #53 = Double 100.0d; const #55 = Methodref #40.#56; // java/lang/Math.round:"(D)J" const #56 = NameAndType #43:#57; // round:"(D)J" const #57 = Utf8 "(D)J"; const #58 = InvokeDynamic 2:#59; // #2:makeConcatWithConstants:"(J)Ljava/lang/String;" const #59 = NameAndType #47:#60; // makeConcatWithConstants:"(J)Ljava/lang/String;" const #60 = Utf8 "(J)Ljava/lang/String;"; const #61 = Double 99.99d; const #63 = InvokeDynamic 3:#64; // #3:makeConcatWithConstants:"(D)Ljava/lang/String;" const #64 = NameAndType #47:#65; // makeConcatWithConstants:"(D)Ljava/lang/String;" const #65 = Utf8 "(D)Ljava/lang/String;"; const #66 = String #67; // "chop_frame" const #67 = Utf8 "chop_frame"; const #68 = String #69; // "_frame_" const #69 = Utf8 "_frame_"; const #70 = Methodref #33.#71; // java/io/PrintStream.println:"(D)V" const #71 = NameAndType #36:#72; // println:"(D)V" const #72 = Utf8 "(D)V"; const #73 = String #74; // "n_frame" const #74 = Utf8 "n_frame"; const #75 = InvokeDynamic 4:#76; // #4:makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" const #76 = NameAndType #47:#77; // makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" const #77 = Utf8 "(Ljava/lang/String;CI)Ljava/lang/String;"; const #78 = Class #79; // java/lang/String const #79 = Utf8 "java/lang/String"; const #80 = Methodref #2.#81; // java/lang/Object.hashCode:"()I" const #81 = NameAndType #82:#83; // hashCode:"()I" const #82 = Utf8 "hashCode"; const #83 = Utf8 "()I"; const #84 = Class #85; // java/lang/RuntimeException const #85 = Utf8 "java/lang/RuntimeException"; const #86 = String #87; // "Test exception" const #87 = Utf8 "Test exception"; const #88 = Methodref #84.#89; // java/lang/RuntimeException."":"(Ljava/lang/String;)V" const #89 = NameAndType #5:#37; // "":"(Ljava/lang/String;)V" const #90 = String #91; // "positive" const #91 = Utf8 "positive"; const #92 = String #93; // "non-positive" const #93 = Utf8 "non-positive"; const #94 = String #95; // "Computing result" const #95 = Utf8 "Computing result"; const #96 = Methodref #10.#3; // StackMapData02."":"()V" const #97 = Methodref #10.#98; // StackMapData02.generateFrames:"(I)V" const #98 = NameAndType #99:#100; // generateFrames:"(I)V" const #99 = Utf8 "generateFrames"; const #100 = Utf8 "(I)V"; const #101 = String #102; // "test" const #102 = Utf8 "test"; const #103 = Methodref #10.#104; // StackMapData02.complexMethod:"(ILjava/lang/Object;)I" const #104 = NameAndType #105:#106; // complexMethod:"(ILjava/lang/Object;)I" const #105 = Utf8 "complexMethod"; const #106 = Utf8 "(ILjava/lang/Object;)I"; const #107 = Methodref #10.#108; // StackMapData02.generateFullFrame:"(I)I" const #108 = NameAndType #109:#110; // generateFullFrame:"(I)I" const #109 = Utf8 "generateFullFrame"; const #110 = Utf8 "(I)I"; const #111 = Fieldref #10.#112; // StackMapData02.fldL:"J" const #112 = NameAndType #113:#114; // fldL:"J" const #113 = Utf8 "fldL"; const #114 = Utf8 "J"; const #115 = Utf8 "fldI"; const #116 = Utf8 "I"; const #117 = Utf8 "ConstantValue"; const #118 = Integer 0; const #119 = Utf8 "Code"; const #120 = Utf8 "StackMapTable"; const #121 = Class #122; // java/lang/Throwable const #122 = Utf8 "java/lang/Throwable"; const #123 = Utf8 "main"; const #124 = Utf8 "([Ljava/lang/String;)V"; const #125 = Utf8 ""; const #126 = Utf8 "BootstrapMethods"; const #127 = String #128; // "item_frame\u0001" const #128 = Utf8 "item_frame\u0001"; const #129 = String #130; // "item_frame_\u0001" const #130 = Utf8 "item_frame_\u0001"; const #131 = String #132; // "_frame: \u0001" const #132 = Utf8 "_frame: \u0001"; const #133 = String #134; // "Before chop_frame: \u0001" const #134 = Utf8 "Before chop_frame: \u0001"; const #135 = String #136; // "\u0001: \u0001\u0001" const #136 = Utf8 "\u0001: \u0001\u0001"; const #137 = MethodHandle 6:#138; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #138 = Methodref #139.#140; // java/lang/invoke/StringConcatFactory.makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #139 = Class #141; // java/lang/invoke/StringConcatFactory const #140 = NameAndType #47:#142; // makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #141 = Utf8 "java/lang/invoke/StringConcatFactory"; const #142 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; const #143 = Utf8 "InnerClasses"; const #144 = Class #145; // java/lang/invoke/MethodHandles$Lookup const #145 = Utf8 "java/lang/invoke/MethodHandles$Lookup"; const #146 = Class #147; // java/lang/invoke/MethodHandles const #147 = Utf8 "java/lang/invoke/MethodHandles"; const #148 = Utf8 "Lookup"; const #149 = Utf8 "SourceFile"; const #150 = Utf8 "StackMapData02.g.t.jasm"; static final Field #115:#116 = #118; // fldI:I = int 0 static Field #113:#114; // fldL:J protected Field #13:#14; // fldS:"Ljava/lang/String;" public final Field #17:#14 = #7; // fldFS:"Ljava/lang/String;" = String "string" public Method #5:#6 // "":"()V" stack 2 locals 1 { 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: aload_0; 5: ldc #7; // String "string" 7: putfield #9; // Field fldS:"Ljava/lang/String;" 10: aload_0; 11: ldc #7; // String "string" 13: putfield #15; // Field fldFS:"Ljava/lang/String;" 16: return; } public Method #99:#100 // generateFrames:"(I)V" stack 5 locals 10 { 0: iconst_0; 1: istore_2; 2: aconst_null; 3: astore_3; try T0, T1; 4: iconst_1; 5: iload_2; 6: idiv; 7: istore_2; endtry T0,T1; 8: aload_3; 9: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 12: pop; 13: goto 44; catch T0 #22; // java/lang/ArithmeticException try T2; 16: astore 4; 18: new #2; // class java/lang/Object 21: dup; 22: invokespecial #1; // Method java/lang/Object."":"()V" 25: astore_3; endtry T2; 26: aload_3; 27: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 30: pop; 31: goto 44; catch T1 #0; // any catch T2 #0; // any catch T3 #0; // any try T3; 34: astore 5; endtry T3; 36: aload_3; 37: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 40: pop; 41: aload 5; 43: athrow; 44: iload_2; 45: ifne 50; 48: aconst_null; 49: astore_3; 50: iload_2; 51: lookupswitch { // 2 1: 76; 2: 87; default: 87 }; 76: new #2; // class java/lang/Object 79: dup; 80: invokespecial #1; // Method java/lang/Object."":"()V" 83: astore_3; 84: goto 87; 87: iload_1; 88: ifne 99; 91: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 94: ldc #30; // String "frame" 96: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 99: iload_1; 100: iconst_1; 101: if_icmpne 127; 104: bipush 42; 106: istore 4; 108: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 111: iload 4; 113: ldc #38; // float 100.0f 115: invokestatic #39; // Method java/lang/Math.round:"(F)I" 118: imul; 119: invokedynamic #45; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(I)Ljava/lang/String;" { // String "\u0001: \u0001\u0001" // } 124: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 127: iload_1; 128: iconst_2; 129: if_icmpne 184; 132: iconst_0; 133: istore 4; 135: iconst_0; 136: istore 5; 138: iload 5; 140: sipush 3000; 143: if_icmpge 171; 146: ldc #49; // float 3.14f 148: fstore 6; 150: iload 4; 152: fload 6; 154: ldc #38; // float 100.0f 156: invokestatic #39; // Method java/lang/Math.round:"(F)I" 159: i2f; 160: fmul; 161: f2i; 162: iadd; 163: istore 4; 165: iinc 5, 1; 168: goto 138; 171: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 174: iload 4; 176: invokedynamic #50; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(I)Ljava/lang/String;" { // String "\u0001: \u0001\u0001" // } 181: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 184: ldc #51; // float 10.0f 186: invokestatic #39; // Method java/lang/Math.round:"(F)I" 189: istore 4; 191: iload_1; 192: iconst_3; 193: if_icmpne 232; 196: ldc #52; // float 110.0f 198: invokestatic #39; // Method java/lang/Math.round:"(F)I" 201: istore 5; 203: ldc2_w #53; // double 100.0d 206: invokestatic #55; // Method java/lang/Math.round:"(D)J" 209: lstore 6; 211: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 214: iload 5; 216: i2l; 217: lload 6; 219: ladd; 220: iload 4; 222: i2l; 223: lmul; 224: invokedynamic #58; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(J)Ljava/lang/String;" { // String "\u0001: \u0001\u0001" // } 229: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 232: iload_1; 233: iconst_4; 234: if_icmpne 273; 237: bipush 50; 239: iload 4; 241: imul; 242: istore 5; 244: ldc2_w #61; // double 99.99d 247: iload 4; 249: i2d; 250: dmul; 251: dstore 6; 253: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 256: iload 5; 258: i2d; 259: dload 6; 261: dadd; 262: invokedynamic #63; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(D)Ljava/lang/String;" { // String "\u0001: \u0001\u0001" // } 267: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 270: goto 281; 273: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 276: ldc #66; // String "chop_frame" 278: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 281: iload_1; 282: iconst_5; 283: if_icmpne 379; 286: iconst_0; 287: istore 5; 289: iconst_0; 290: istore 6; 292: iload 6; 294: sipush 2500; 297: if_icmpge 326; 300: ldc #49; // float 3.14f 302: fstore 7; 304: iload 5; 306: fload 7; 308: iload 6; 310: i2f; 311: invokestatic #39; // Method java/lang/Math.round:"(F)I" 314: i2f; 315: fmul; 316: f2i; 317: iadd; 318: istore 5; 320: iinc 6, 1; 323: goto 292; 326: iload 5; 328: bipush 100; 330: if_icmple 344; 333: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 336: ldc #68; // String "_frame_" 338: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 341: goto 379; 344: iload 5; 346: bipush 50; 348: if_icmpge 379; 351: bipush 50; 353: iload 4; 355: imul; 356: istore 6; 358: ldc2_w #61; // double 99.99d 361: iload 4; 363: i2d; 364: dmul; 365: dstore 7; 367: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 370: iload 6; 372: i2d; 373: dload 7; 375: dadd; 376: invokevirtual #70; // Method java/io/PrintStream.println:"(D)V" 379: iload_1; 380: bipush 6; 382: if_icmpne 414; 385: ldc #73; // String "n_frame" 387: astore 5; 389: bipush 70; 391: istore 6; 393: bipush 100; 395: istore 7; 397: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 400: aload 5; 402: iload 6; 404: iload 7; 406: invokedynamic #75; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(Ljava/lang/String;CI)Ljava/lang/String;" { // String "\u0001: \u0001\u0001" // } 411: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 414: iconst_0; 415: istore 5; 417: aconst_null; 418: astore 6; try T4, T5; 420: iconst_1; 421: iload 5; 423: idiv; 424: istore 5; endtry T4,T5; 426: aload 6; 428: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 431: pop; 432: goto 466; catch T4 #22; // java/lang/ArithmeticException try T6; 435: astore 7; 437: new #2; // class java/lang/Object 440: dup; 441: invokespecial #1; // Method java/lang/Object."":"()V" 444: astore 6; endtry T6; 446: aload 6; 448: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 451: pop; 452: goto 466; catch T5 #0; // any catch T6 #0; // any catch T7 #0; // any try T7; 455: astore 9; endtry T7; 457: aload 6; 459: invokevirtual #18; // Method java/lang/Object.toString:"()Ljava/lang/String;" 462: pop; 463: aload 9; 465: athrow; 466: iload 5; 468: ifne 474; 471: aconst_null; 472: astore 6; 474: iload_2; 475: lookupswitch { // 2 1: 500; 2: 512; default: 512 }; 500: new #2; // class java/lang/Object 503: dup; 504: invokespecial #1; // Method java/lang/Object."":"()V" 507: astore 6; 509: goto 512; 512: return; StackMapTable: number_of_entries = 11 frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16; ] { // fldFS:"Ljava/lang/String;" frame_type = 255 // full offset_delta = 16 stack_map = [ #22; ] // class java/lang/ArithmeticException; locals_map = [ #10, 1, 1, #2; ] // class StackMapData02, int, int, class java/lang/Object; } frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16; ] { // fldFS:"Ljava/lang/String;" frame_type = 81 // same_locals_1_stack_item stack_map = [ #121; ] // class java/lang/Throwable; } frame_type = 246 // early_larval unset_fields = [ #26, // out:"Ljava/io/PrintStream;" #16; ] { // fldFS:"Ljava/lang/String;" frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16; ] { // fldFS:"Ljava/lang/String;" frame_type = 246 // early_larval unset_fields = [ #11; ] { // fldS:"Ljava/lang/String;"; frame_type = 255 // full offset_delta = 16 stack_map = [ #22; ] // class java/lang/ArithmeticException; locals_map = [ #10, 1, 1, #2; ] // class StackMapData02, int, int, class java/lang/Object; } } } frame_type = 36 // same frame_type = 11 // same frame_type = 27 // same frame_type = 252 // append offset_delta = 104 locals_map = [ 1; ] // int; frame_type = 48 // same frame_type = 250 // chop1 offset_delta = 97 frame_type = 34 // same frame_type = 59 // same } public Method #105:#106 // complexMethod:"(ILjava/lang/Object;)I" stack 3 locals 7 { 0: iconst_0; 1: istore_3; 2: iconst_1; 3: istore 4; 5: aconst_null; 6: astore 5; try T0; 8: iload_1; 9: ifle 47; 12: iload_1; 13: iconst_1; 14: iadd; 15: istore_3; 16: aload_2; 17: instanceof #78; // class java/lang/String 20: ifeq 39; 23: aload_2; 24: checkcast #78; // class java/lang/String 27: astore 5; 29: aload 5; 31: invokevirtual #80; // Method java/lang/Object.hashCode:"()I" 34: istore 4; 36: iload 4; endtry T0; 38: ireturn; try T1; 39: iload_3; 40: iconst_2; 41: imul; 42: istore 4; 44: goto 104; 47: iload_1; 48: iconst_m1; 49: if_icmpne 70; 52: iload_1; 53: ineg; 54: istore_3; 55: iload_3; 56: iconst_3; 57: iadd; 58: istore 4; 60: new #84; // class java/lang/RuntimeException 63: dup; 64: ldc #86; // String "Test exception" 66: invokespecial #88; // Method java/lang/RuntimeException."":"(Ljava/lang/String;)V" 69: athrow; 70: iconst_0; 71: istore 6; 73: iload 6; 75: iconst_2; 76: if_icmpge 104; 79: iload_3; 80: iload 6; 82: iadd; 83: istore_3; 84: iload_3; 85: iconst_1; 86: if_icmple 98; 89: iload_3; 90: iload 6; 92: isub; 93: istore 4; 95: goto 104; 98: iinc 6, 1; 101: goto 73; endtry T1; 104: goto 118; catch T0 #84; // java/lang/RuntimeException catch T1 #84; // java/lang/RuntimeException 107: astore 6; 109: aload 6; 111: astore 5; 113: iload_3; 114: iconst_5; 115: iadd; 116: istore 4; 118: iload_3; 119: iload 4; 121: iadd; 122: ireturn; StackMapTable: number_of_entries = 8 frame_type = 254 // append offset_delta = 39 locals_map = [ 1, 1, #2; ] // int, int, class java/lang/Object; frame_type = 7 // same frame_type = 22 // same frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16, // fldFS:"Ljava/lang/String;" #26, // out:"Ljava/io/PrintStream;" #112; ] { // fldL:"J" frame_type = 252 // append offset_delta = 2 locals_map = [ 1; ] // int; } frame_type = 24 // same frame_type = 250 // chop1 offset_delta = 5 frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16, // fldFS:"Ljava/lang/String;" #26, // out:"Ljava/io/PrintStream;" #112; ] { // fldL:"J" frame_type = 66 // same_locals_1_stack_item stack_map = [ #84; ] // class java/lang/RuntimeException; } frame_type = 10 // same } public Method #109:#110 // generateFullFrame:"(I)I" stack 3 locals 6 { 0: iconst_0; 1: istore_2; 2: aconst_null; 3: astore_3; 4: iconst_0; 5: istore 4; try T0; 7: iload_1; 8: ifle 25; 11: ldc #90; // String "positive" 13: astore_3; 14: iconst_1; 15: istore 4; 17: aload_3; 18: invokevirtual #80; // Method java/lang/Object.hashCode:"()I" 21: istore_2; 22: goto 39; 25: iload_1; 26: iconst_2; 27: imul; 28: istore_2; 29: new #84; // class java/lang/RuntimeException 32: dup; 33: ldc #92; // String "non-positive" 35: invokespecial #88; // Method java/lang/RuntimeException."":"(Ljava/lang/String;)V" 38: athrow; endtry T0; 39: goto 53; catch T0 #84; // java/lang/RuntimeException 42: astore 5; 44: aload 5; 46: astore_3; 47: iconst_0; 48: istore 4; 50: iload_1; 51: ineg; 52: istore_2; 53: iload 4; 55: ifeq 62; 58: iload_2; 59: iconst_1; 60: iadd; 61: ireturn; 62: getstatic #24; // Field java/lang/System.out:"Ljava/io/PrintStream;" 65: ldc #94; // String "Computing result" 67: invokevirtual #32; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 70: iload_2; 71: ireturn; StackMapTable: number_of_entries = 5 frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16, // fldFS:"Ljava/lang/String;" #26, // out:"Ljava/io/PrintStream;" #112; ] { // fldL:"J" frame_type = 254 // append offset_delta = 25 locals_map = [ 1, #2, 1; ] // int, class java/lang/Object, int; } frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16, // fldFS:"Ljava/lang/String;" #26; ] { // out:"Ljava/io/PrintStream;" frame_type = 13 // same } frame_type = 246 // early_larval unset_fields = [ #11, // fldS:"Ljava/lang/String;" #16; ] { // fldFS:"Ljava/lang/String;" frame_type = 66 // same_locals_1_stack_item stack_map = [ #84; ] // class java/lang/RuntimeException; } frame_type = 246 // early_larval unset_fields = [ #11; ] { // fldS:"Ljava/lang/String;"; frame_type = 10 // same } frame_type = 246 // early_larval unset_fields = [ ] { frame_type = 8 // same } } public static Method #123:#124 // main:"([Ljava/lang/String;)V" stack 3 locals 3 { 0: new #10; // class StackMapData02 3: dup; 4: invokespecial #96; // Method "":"()V" 7: astore_1; 8: iconst_0; 9: istore_2; 10: iload_2; 11: bipush 6; 13: if_icmpgt 27; 16: aload_1; 17: iload_2; 18: invokevirtual #97; // Method generateFrames:"(I)V" 21: iinc 2, 1; 24: goto 10; 27: aload_1; 28: iconst_0; 29: ldc #101; // String "test" 31: invokevirtual #103; // Method complexMethod:"(ILjava/lang/Object;)I" 34: pop; 35: aload_1; 36: bipush 23; 38: invokevirtual #107; // Method generateFullFrame:"(I)I" 41: pop; 42: return; StackMapTable: number_of_entries = 2 frame_type = 246 // early_larval unset_fields = [ ] { frame_type = 253 // append offset_delta = 10 locals_map = [ #10, 1; ] // class StackMapData02, int; } frame_type = 250 // chop1 offset_delta = 16 } static Method #125:#6 // "":"()V" stack 2 locals 0 { 0: lconst_1; 1: putstatic #111; // Field fldL:"J" 4: return; } SourceFile #150; // StackMapData02.g.t.jasm InnerClasses { public static final #148 = #144 of #146; // Lookup = class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles } BootstrapMethods { 0: #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: #135; // String "\u0001: \u0001\u0001" 1: #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: #135; // String "\u0001: \u0001\u0001" 2: #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: #135; // String "\u0001: \u0001\u0001" 3: #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: #135; // String "\u0001: \u0001\u0001" 4: #137; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; Arguments: #135; // String "\u0001: \u0001\u0001" } } // end Class org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData02 compiled from "StackMapData02.g.t.jasm" StackMapData02.g.jcod000066400000000000000000000716541514323636100346250ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/attribute/StackMapTableclass org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData02 { 0xCAFEBABE; 0; // minor version 69; // version [151] { // Constant Pool ; // first element is empty Method #2 #3; // #1 at 0x0A Class #4; // #2 at 0x0F NameAndType #5 #6; // #3 at 0x12 Utf8 "java/lang/Object"; // #4 at 0x17 Utf8 ""; // #5 at 0x2A Utf8 "()V"; // #6 at 0x33 String #8; // #7 at 0x39 Utf8 "string"; // #8 at 0x3C Field #10 #11; // #9 at 0x45 Class #12; // #10 at 0x4A NameAndType #13 #14; // #11 at 0x4D Utf8 "org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData02"; // #12 at 0x52 Utf8 "fldS"; // #13 at 0x95 Utf8 "Ljava/lang/String;"; // #14 at 0x9C Field #10 #16; // #15 at 0xB1 NameAndType #17 #14; // #16 at 0xB6 Utf8 "fldFS"; // #17 at 0xBB Method #2 #19; // #18 at 0xC3 NameAndType #20 #21; // #19 at 0xC8 Utf8 "toString"; // #20 at 0xCD Utf8 "()Ljava/lang/String;"; // #21 at 0xD8 Class #23; // #22 at 0xEF Utf8 "java/lang/ArithmeticException"; // #23 at 0xF2 Field #25 #26; // #24 at 0x0112 Class #27; // #25 at 0x0117 NameAndType #28 #29; // #26 at 0x011A Utf8 "java/lang/System"; // #27 at 0x011F Utf8 "out"; // #28 at 0x0132 Utf8 "Ljava/io/PrintStream;"; // #29 at 0x0138 String #31; // #30 at 0x0150 Utf8 "frame"; // #31 at 0x0153 Method #33 #34; // #32 at 0x015B Class #35; // #33 at 0x0160 NameAndType #36 #37; // #34 at 0x0163 Utf8 "java/io/PrintStream"; // #35 at 0x0168 Utf8 "println"; // #36 at 0x017E Utf8 "(Ljava/lang/String;)V"; // #37 at 0x0188 Float 0x42C80000; // #38 at 0x01A0 Method #40 #41; // #39 at 0x01A5 Class #42; // #40 at 0x01AA NameAndType #43 #44; // #41 at 0x01AD Utf8 "java/lang/Math"; // #42 at 0x01B2 Utf8 "round"; // #43 at 0x01C3 Utf8 "(F)I"; // #44 at 0x01CB InvokeDynamic 0s #46; // #45 at 0x01D2 NameAndType #47 #48; // #46 at 0x01D7 Utf8 "makeConcatWithConstants"; // #47 at 0x01DC Utf8 "(I)Ljava/lang/String;"; // #48 at 0x01F6 Float 0x4048F5C3; // #49 at 0x020E InvokeDynamic 1s #46; // #50 at 0x0213 Float 0x41200000; // #51 at 0x0218 Float 0x42DC0000; // #52 at 0x021D Double 0x4059000000000000;; // #53 at 0x0222 Method #40 #56; // #55 at 0x022B NameAndType #43 #57; // #56 at 0x0230 Utf8 "(D)J"; // #57 at 0x0235 InvokeDynamic 2s #59; // #58 at 0x023C NameAndType #47 #60; // #59 at 0x0241 Utf8 "(J)Ljava/lang/String;"; // #60 at 0x0246 Double 0x4058FF5C28F5C28F;; // #61 at 0x025E InvokeDynamic 3s #64; // #63 at 0x0267 NameAndType #47 #65; // #64 at 0x026C Utf8 "(D)Ljava/lang/String;"; // #65 at 0x0271 String #67; // #66 at 0x0289 Utf8 "chop_frame"; // #67 at 0x028C String #69; // #68 at 0x0299 Utf8 "_frame_"; // #69 at 0x029C Method #33 #71; // #70 at 0x02A6 NameAndType #36 #72; // #71 at 0x02AB Utf8 "(D)V"; // #72 at 0x02B0 String #74; // #73 at 0x02B7 Utf8 "n_frame"; // #74 at 0x02BA InvokeDynamic 4s #76; // #75 at 0x02C4 NameAndType #47 #77; // #76 at 0x02C9 Utf8 "(Ljava/lang/String;CI)Ljava/lang/String;"; // #77 at 0x02CE Class #79; // #78 at 0x02F9 Utf8 "java/lang/String"; // #79 at 0x02FC Method #2 #81; // #80 at 0x030F NameAndType #82 #83; // #81 at 0x0314 Utf8 "hashCode"; // #82 at 0x0319 Utf8 "()I"; // #83 at 0x0324 Class #85; // #84 at 0x032A Utf8 "java/lang/RuntimeException"; // #85 at 0x032D String #87; // #86 at 0x034A Utf8 "Test exception"; // #87 at 0x034D Method #84 #89; // #88 at 0x035E NameAndType #5 #37; // #89 at 0x0363 String #91; // #90 at 0x0368 Utf8 "positive"; // #91 at 0x036B String #93; // #92 at 0x0376 Utf8 "non-positive"; // #93 at 0x0379 String #95; // #94 at 0x0388 Utf8 "Computing result"; // #95 at 0x038B Method #10 #3; // #96 at 0x039E Method #10 #98; // #97 at 0x03A3 NameAndType #99 #100; // #98 at 0x03A8 Utf8 "generateFrames"; // #99 at 0x03AD Utf8 "(I)V"; // #100 at 0x03BE String #102; // #101 at 0x03C5 Utf8 "test"; // #102 at 0x03C8 Method #10 #104; // #103 at 0x03CF NameAndType #105 #106; // #104 at 0x03D4 Utf8 "complexMethod"; // #105 at 0x03D9 Utf8 "(ILjava/lang/Object;)I"; // #106 at 0x03E9 Method #10 #108; // #107 at 0x0402 NameAndType #109 #110; // #108 at 0x0407 Utf8 "generateFullFrame"; // #109 at 0x040C Utf8 "(I)I"; // #110 at 0x0420 Field #10 #112; // #111 at 0x0427 NameAndType #113 #114; // #112 at 0x042C Utf8 "fldL"; // #113 at 0x0431 Utf8 "J"; // #114 at 0x0438 Utf8 "fldI"; // #115 at 0x043C Utf8 "I"; // #116 at 0x0443 Utf8 "ConstantValue"; // #117 at 0x0447 Integer 0x00000000; // #118 at 0x0457 Utf8 "Code"; // #119 at 0x045C Utf8 "StackMapTable"; // #120 at 0x0463 Class #122; // #121 at 0x0473 Utf8 "java/lang/Throwable"; // #122 at 0x0476 Utf8 "main"; // #123 at 0x048C Utf8 "([Ljava/lang/String;)V"; // #124 at 0x0493 Utf8 ""; // #125 at 0x04AC Utf8 "BootstrapMethods"; // #126 at 0x04B7 String #128; // #127 at 0x04CA Utf8 "item_frame\u0001"; // #128 at 0x04CD String #130; // #129 at 0x04DB Utf8 "item_frame_\u0001"; // #130 at 0x04DE String #132; // #131 at 0x04ED Utf8 "_frame: \u0001"; // #132 at 0x04F0 String #134; // #133 at 0x04FC Utf8 "Before chop_frame: \u0001"; // #134 at 0x04FF String #136; // #135 at 0x0516 Utf8 "\u0001: \u0001\u0001"; // #136 at 0x0519 MethodHandle 6b #138; // #137 at 0x0521 Method #139 #140; // #138 at 0x0525 Class #141; // #139 at 0x052A NameAndType #47 #142; // #140 at 0x052D Utf8 "java/lang/invoke/StringConcatFactory"; // #141 at 0x0532 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #142 at 0x0559 Utf8 "InnerClasses"; // #143 at 0x05F4 Class #145; // #144 at 0x0603 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #145 at 0x0606 Class #147; // #146 at 0x062E Utf8 "java/lang/invoke/MethodHandles"; // #147 at 0x0631 Utf8 "Lookup"; // #148 at 0x0652 Utf8 "SourceFile"; // #149 at 0x065B Utf8 "StackMapData02.g.t.jasm"; // #150 at 0x0668 } // end of Constant Pool 0x0021; // access [ ACC_PUBLIC, ACC_SUPER ] #10; // this_cpx #2; // super_cpx [0] { // Interfaces } // end of Interfaces [4] { // Fields { // field at 0x068C 0x0018; // access #115; // name_index : fldI #116; // descriptor_index : I [1] { // Attributes Attr(#117, 2) { // ConstantValue at 0x0694 #118; } // end of ConstantValue } // end of Attributes } ; { // field at 0x069C 0x0008; // access #113; // name_index : fldL #114; // descriptor_index : J [0] { // Attributes } // end of Attributes } ; { // field at 0x06A4 0x0004; // access #13; // name_index : fldS #14; // descriptor_index : Ljava/lang/String; [0] { // Attributes } // end of Attributes } ; { // field at 0x06AC 0x0011; // access #17; // name_index : fldFS #14; // descriptor_index : Ljava/lang/String; [1] { // Attributes Attr(#117, 2) { // ConstantValue at 0x06B4 #7; } // end of ConstantValue } // end of Attributes } } // end of Fields [6] { // Methods { // method at 0x06BE 0x0001; // access #5; // name_index : #6; // descriptor_index : ()V [1] { // Attributes Attr(#119, 29) { // Code at 0x06C6 2; // max_stack 1; // max_locals Bytes[17]{ 0x2A 0xB7 0x00 0x01 0x2A 0x12 0x07 0xB5 0x00 0x09 0x2A 0x12; 0x07 0xB5 0x00 0x0F 0xB1; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x06E9 0x0001; // access #99; // name_index : generateFrames #100; // descriptor_index : (I)V [1] { // Attributes Attr(#119, 683) { // Code at 0x06F1 5; // max_stack 10; // max_locals Bytes[513]{ 0x03 0x3D 0x01 0x4E 0x04 0x1C 0x6C 0x3D 0x2D 0xB6 0x00 0x12; 0x57 0xA7 0x00 0x1F 0x3A 0x04 0xBB 0x00 0x02 0x59 0xB7 0x00; 0x01 0x4E 0x2D 0xB6 0x00 0x12 0x57 0xA7 0x00 0x0D 0x3A 0x05; 0x2D 0xB6 0x00 0x12 0x57 0x19 0x05 0xBF 0x1C 0x9A 0x00 0x05; 0x01 0x4E 0x1C 0xAB 0x00 0x00 0x00 0x24 0x00 0x00 0x00 0x02; 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x19 0x00 0x00 0x00 0x02; 0x00 0x00 0x00 0x24 0xBB 0x00 0x02 0x59 0xB7 0x00 0x01 0x4E; 0xA7 0x00 0x03 0x1B 0x9A 0x00 0x0B 0xB2 0x00 0x18 0x12 0x1E; 0xB6 0x00 0x20 0x1B 0x04 0xA0 0x00 0x1A 0x10 0x2A 0x36 0x04; 0xB2 0x00 0x18 0x15 0x04 0x12 0x26 0xB8 0x00 0x27 0x68 0xBA; 0x00 0x2D 0x00 0x00 0xB6 0x00 0x20 0x1B 0x05 0xA0 0x00 0x37; 0x03 0x36 0x04 0x03 0x36 0x05 0x15 0x05 0x11 0x0B 0xB8 0xA2; 0x00 0x1C 0x12 0x31 0x38 0x06 0x15 0x04 0x17 0x06 0x12 0x26; 0xB8 0x00 0x27 0x86 0x6A 0x8B 0x60 0x36 0x04 0x84 0x05 0x01; 0xA7 0xFF 0xE2 0xB2 0x00 0x18 0x15 0x04 0xBA 0x00 0x32 0x00; 0x00 0xB6 0x00 0x20 0x12 0x33 0xB8 0x00 0x27 0x36 0x04 0x1B; 0x06 0xA0 0x00 0x27 0x12 0x34 0xB8 0x00 0x27 0x36 0x05 0x14; 0x00 0x35 0xB8 0x00 0x37 0x37 0x06 0xB2 0x00 0x18 0x15 0x05; 0x85 0x16 0x06 0x61 0x15 0x04 0x85 0x69 0xBA 0x00 0x3A 0x00; 0x00 0xB6 0x00 0x20 0x1B 0x07 0xA0 0x00 0x27 0x10 0x32 0x15; 0x04 0x68 0x36 0x05 0x14 0x00 0x3D 0x15 0x04 0x87 0x6B 0x39; 0x06 0xB2 0x00 0x18 0x15 0x05 0x87 0x18 0x06 0x63 0xBA 0x00; 0x3F 0x00 0x00 0xB6 0x00 0x20 0xA7 0x00 0x0B 0xB2 0x00 0x18; 0x12 0x42 0xB6 0x00 0x20 0x1B 0x08 0xA0 0x00 0x60 0x03 0x36; 0x05 0x03 0x36 0x06 0x15 0x06 0x11 0x09 0xC4 0xA2 0x00 0x1D; 0x12 0x31 0x38 0x07 0x15 0x05 0x17 0x07 0x15 0x06 0x86 0xB8; 0x00 0x27 0x86 0x6A 0x8B 0x60 0x36 0x05 0x84 0x06 0x01 0xA7; 0xFF 0xE1 0x15 0x05 0x10 0x64 0xA4 0x00 0x0E 0xB2 0x00 0x18; 0x12 0x44 0xB6 0x00 0x20 0xA7 0x00 0x26 0x15 0x05 0x10 0x32; 0xA2 0x00 0x1F 0x10 0x32 0x15 0x04 0x68 0x36 0x06 0x14 0x00; 0x3D 0x15 0x04 0x87 0x6B 0x39 0x07 0xB2 0x00 0x18 0x15 0x06; 0x87 0x18 0x07 0x63 0xB6 0x00 0x46 0x1B 0x10 0x06 0xA0 0x00; 0x20 0x12 0x49 0x3A 0x05 0x10 0x46 0x36 0x06 0x10 0x64 0x36; 0x07 0xB2 0x00 0x18 0x19 0x05 0x15 0x06 0x15 0x07 0xBA 0x00; 0x4B 0x00 0x00 0xB6 0x00 0x20 0x03 0x36 0x05 0x01 0x3A 0x06; 0x04 0x15 0x05 0x6C 0x36 0x05 0x19 0x06 0xB6 0x00 0x12 0x57; 0xA7 0x00 0x22 0x3A 0x07 0xBB 0x00 0x02 0x59 0xB7 0x00 0x01; 0x3A 0x06 0x19 0x06 0xB6 0x00 0x12 0x57 0xA7 0x00 0x0E 0x3A; 0x09 0x19 0x06 0xB6 0x00 0x12 0x57 0x19 0x09 0xBF 0x15 0x05; 0x9A 0x00 0x06 0x01 0x3A 0x06 0x1C 0xAB 0x00 0x00 0x00 0x25; 0x00 0x00 0x00 0x02 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x19; 0x00 0x00 0x00 0x02 0x00 0x00 0x00 0x25 0xBB 0x00 0x02 0x59; 0xB7 0x00 0x01 0x3A 0x06 0xA7 0x00 0x03 0xB1; } [8] { // Traps 4 8 16 22; // at 0x090A 4 8 34 0; // at 0x0912 16 26 34 0; // at 0x091A 34 36 34 0; // at 0x0922 420 426 435 22; // at 0x092A 420 426 455 0; // at 0x0932 435 446 455 0; // at 0x093A 455 457 455 0; // at 0x0942 } // end of Traps [1] { // Attributes Attr(#120, 88) { // StackMapTable at 0x0944 [11] { // 246b, [2]{#11; #16}, { // early_larval_frame 255b, 16, [4]{7b,#10; 1b; 1b; 7b,#2}, [1]{7b,#22}; // full_frame }; 246b, [2]{#11; #16}, { // early_larval_frame 81b, [1]z{7b,#121}; // same_locals_1_stack_item_frame }; 246b, [2]{#26; #16}, { // early_larval_frame 246b, [2]{#11; #16}, { // early_larval_frame 246b, [1]{#11}, { // early_larval_frame 255b, 16, [4]{7b,#10; 1b; 1b; 7b,#2}, [1]{7b,#22}; // full_frame }; }; }; 36b; // same_frame 11b; // same_frame 27b; // same_frame 252b, 104, [1]z{1b}; // append_frame 1 48b; // same_frame 250b, 97; // chop_frame 1 34b; // same_frame 59b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x09A2 0x0001; // access #105; // name_index : complexMethod #106; // descriptor_index : (ILjava/lang/Object;)I [1] { // Attributes Attr(#119, 204) { // Code at 0x09AA 3; // max_stack 7; // max_locals Bytes[123]{ 0x03 0x3E 0x04 0x36 0x04 0x01 0x3A 0x05 0x1B 0x9E 0x00 0x26; 0x1B 0x04 0x60 0x3E 0x2C 0xC1 0x00 0x4E 0x99 0x00 0x13 0x2C; 0xC0 0x00 0x4E 0x3A 0x05 0x19 0x05 0xB6 0x00 0x50 0x36 0x04; 0x15 0x04 0xAC 0x1D 0x05 0x68 0x36 0x04 0xA7 0x00 0x3C 0x1B; 0x02 0xA0 0x00 0x15 0x1B 0x74 0x3E 0x1D 0x06 0x60 0x36 0x04; 0xBB 0x00 0x54 0x59 0x12 0x56 0xB7 0x00 0x58 0xBF 0x03 0x36; 0x06 0x15 0x06 0x05 0xA2 0x00 0x1C 0x1D 0x15 0x06 0x60 0x3E; 0x1D 0x04 0xA4 0x00 0x0C 0x1D 0x15 0x06 0x64 0x36 0x04 0xA7; 0x00 0x09 0x84 0x06 0x01 0xA7 0xFF 0xE4 0xA7 0x00 0x0E 0x3A; 0x06 0x19 0x06 0x3A 0x05 0x1D 0x08 0x60 0x36 0x04 0x1D 0x15; 0x04 0x60 0xAC; } [2] { // Traps 8 38 107 84; // at 0x0A3D 39 104 107 84; // at 0x0A45 } // end of Traps [1] { // Attributes Attr(#120, 47) { // StackMapTable at 0x0A47 [8] { // 254b, 39, [3]z{1b; 1b; 7b,#2}; // append_frame 3 7b; // same_frame 22b; // same_frame 246b, [4]{#11; #16; #26; #112}, { // early_larval_frame 252b, 2, [1]z{1b}; // append_frame 1 }; 24b; // same_frame 250b, 5; // chop_frame 1 246b, [4]{#11; #16; #26; #112}, { // early_larval_frame 66b, [1]z{7b,#84}; // same_locals_1_stack_item_frame }; 10b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0A7C 0x0001; // access #109; // name_index : generateFullFrame #110; // descriptor_index : (I)I [1] { // Attributes Attr(#119, 150) { // Code at 0x0A84 3; // max_stack 6; // max_locals Bytes[72]{ 0x03 0x3D 0x01 0x4E 0x03 0x36 0x04 0x1B 0x9E 0x00 0x11 0x12; 0x5A 0x4E 0x04 0x36 0x04 0x2D 0xB6 0x00 0x50 0x3D 0xA7 0x00; 0x11 0x1B 0x05 0x68 0x3D 0xBB 0x00 0x54 0x59 0x12 0x5C 0xB7; 0x00 0x58 0xBF 0xA7 0x00 0x0E 0x3A 0x05 0x19 0x05 0x4E 0x03; 0x36 0x04 0x1B 0x74 0x3D 0x15 0x04 0x99 0x00 0x07 0x1C 0x04; 0x60 0xAC 0xB2 0x00 0x18 0x12 0x5E 0xB6 0x00 0x20 0x1C 0xAC; } [1] { // Traps 7 39 42 84; // at 0x0AE4 } // end of Traps [1] { // Attributes Attr(#120, 52) { // StackMapTable at 0x0AE6 [5] { // 246b, [4]{#11; #16; #26; #112}, { // early_larval_frame 254b, 25, [3]z{1b; 7b,#2; 1b}; // append_frame 3 }; 246b, [3]{#11; #16; #26}, { // early_larval_frame 13b; // same_frame }; 246b, [2]{#11; #16}, { // early_larval_frame 66b, [1]z{7b,#84}; // same_locals_1_stack_item_frame }; 246b, [1]{#11}, { // early_larval_frame 10b; // same_frame }; 246b, [0]{}, { // early_larval_frame 8b; // same_frame }; } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0B20 0x0009; // access #123; // name_index : main #124; // descriptor_index : ([Ljava/lang/String;)V [1] { // Attributes Attr(#119, 76) { // Code at 0x0B28 3; // max_stack 3; // max_locals Bytes[43]{ 0xBB 0x00 0x0A 0x59 0xB7 0x00 0x60 0x4C 0x03 0x3D 0x1C 0x10; 0x06 0xA3 0x00 0x0E 0x2B 0x1C 0xB6 0x00 0x61 0x84 0x02 0x01; 0xA7 0xFF 0xF2 0x2B 0x03 0x12 0x65 0xB6 0x00 0x67 0x57 0x2B; 0x10 0x17 0xB6 0x00 0x6B 0x57 0xB1; } [0] { // Traps } // end of Traps [1] { // Attributes Attr(#120, 15) { // StackMapTable at 0x0B65 [2] { // 246b, [0]{}, { // early_larval_frame 253b, 10, [2]z{7b,#10; 1b}; // append_frame 2 }; 250b, 16; // chop_frame 1 } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0B7A 0x0008; // access #125; // name_index : #6; // descriptor_index : ()V [1] { // Attributes Attr(#119, 17) { // Code at 0x0B82 2; // max_stack 0; // max_locals Bytes[5]{ 0x0A 0xB3 0x00 0x6F 0xB1; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [3] { // Attributes Attr(#149, 2) { // SourceFile at 0x0B9B #150; } // end of SourceFile ; Attr(#143, 10) { // InnerClasses at 0x0BA3 [1] { // classes #144 #146 #148 25; // access [ ACC_PUBLIC, ACC_STATIC, ACC_FINAL ] } } // end of InnerClasses ; Attr(#126, 32) { // BootstrapMethods at 0x0BB3 [5] { // bootstrap_methods { // bootstrap_method #137; // bootstrap_method_ref [1] { // bootstrap_arguments #135; // at 0x0BC1 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #137; // bootstrap_method_ref [1] { // bootstrap_arguments #135; // at 0x0BC7 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #137; // bootstrap_method_ref [1] { // bootstrap_arguments #135; // at 0x0BCD } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #137; // bootstrap_method_ref [1] { // bootstrap_arguments #135; // at 0x0BD3 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #137; // bootstrap_method_ref [1] { // bootstrap_arguments #135; // at 0x0BD9 } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods } // end of Attributes } // end of class org/openjdk/asmtools/attribute/StackMapTable/data/StackMapData02 jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/common/000077500000000000000000000000001514323636100257545ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/common/sequence/000077500000000000000000000000001514323636100275645ustar00rootroot00000000000000ConstantPoolTestDummy.jasm000066400000000000000000000126741514323636100346720ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/common/sequence/* * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package jdk/internal/reflect/constantPool; super public #2; //class ConstantPoolTestDummy version 52:0 { // Actually, only first 13 constant pool entries are actually used by the class // and its methods. All the rest are added just for the testing of getTagAt method // and getNameAndTypeRefIndexAt method. const #1 = Method #3.#10; // java/lang/Object."":"()V" const #2 = class #11; // ConstantPoolTestDummy const #3 = class #12; // java/lang/Object const #4 = Asciz ""; const #5 = Asciz "()V"; const #6 = Asciz "Code"; const #7 = Asciz "LineNumberTable"; const #8 = Asciz "SourceFile"; const #9 = Asciz "ConstantPoolTestDummy.java"; const #10 = NameAndType #4:#5; // "":"()V" const #11 = Asciz "jdk/internal/reflect/constantPool/ConstantPoolTestDummy"; const #12 = Asciz "java/lang/Object"; const #13 = long 6l; const #15 = int 1; const #16 = InterfaceMethod #17.#18; // java/lang/Runnable.run:"()V" const #17 = class #19; // java/lang/Runnable const #18 = NameAndType #20:#5; // run:"()V" const #19 = Asciz "java/lang/Runnable"; const #20 = Asciz "run"; const #21 = double 1.45d; const #23 = String #24; // "Hello" const #24 = Asciz "Hello"; const #25 = InvokeDynamic 0:#26; // REF_invokeStatic:java/lang/invoke/LambdaMetafactory.metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;":accept:"()Ljava/util/function/Consumer;" MethodType "(Ljava/lang/Object;)V", MethodHandle REF_invokeVirtual:java/lang/Object.toString:"()Ljava/lang/String;", MethodType "(Ljava/lang/Object;)V" const #26 = NameAndType #27:#28; // accept:"()Ljava/util/function/Consumer;" const #27 = Asciz "accept"; const #28 = Asciz "()Ljava/util/function/Consumer;"; const #29 = MethodHandle 6:#32; // REF_invokeStatic:java/lang/invoke/LambdaMetafactory.metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;" const #30 = MethodType #33; // "(Ljava/lang/Object;)V" const #31 = MethodHandle 5:#34; // REF_invokeVirtual:java/lang/Object.toString:"()Ljava/lang/String;" const #32 = Method #35.#36; // java/lang/invoke/LambdaMetafactory.metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;" const #33 = Asciz "(Ljava/lang/Object;)V"; const #34 = Method #3.#37; // java/lang/Object.toString:"()Ljava/lang/String;" const #35 = class #38; // java/lang/invoke/LambdaMetafactory const #36 = NameAndType #39:#40; // metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;" const #37 = NameAndType #41:#42; // toString:"()Ljava/lang/String;" const #38 = Asciz "java/lang/invoke/LambdaMetafactory"; const #39 = Asciz "metafactory"; const #40 = Asciz "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; const #41 = Asciz "toString"; const #42 = Asciz "()Ljava/lang/String;"; const #43 = class #46; // java/lang/invoke/MethodHandles$Lookup const #44 = Asciz "Lookup"; const #45 = class #47; // java/lang/invoke/MethodHandles const #46 = Asciz "java/lang/invoke/MethodHandles$Lookup"; const #47 = Asciz "java/lang/invoke/MethodHandles"; const #48 = Field #2.#49; // jdk/internal/reflect/constantPool/ConstantPoolTestDummy.myField:"I" const #49 = NameAndType #50:#51; // myField:"I" const #50 = Asciz "myField"; const #51 = Asciz "I"; const #52 = float 1.34f; public Method #4:#5 // "":"()V" stack 1 locals 1 { 3 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V"; 4: return; } public static final InnerClass #44= #43 of #45; //Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles BootstrapMethod #29 #30 #31 #30; } // end Class ConstantPoolTestDummy jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/common/sequence/EnclMethTest.jcod000066400000000000000000000067001514323636100327670ustar00rootroot00000000000000/* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * This test has a EnclosingMethod attribute with an illegal * attribute_length field value of 6. This should cause a * java.lang.ClassFormatError exception to be thrown. */ class EnclMethTest { 0xCAFEBABE; 0; // minor version 52; // version [22] { // Constant Pool ; // first element is empty Field #3 #14; // #1 at 0x0A Method #4 #15; // #2 at 0x0F class #16; // #3 at 0x14 class #19; // #4 at 0x17 Utf8 "this$0"; // #5 at 0x1A Utf8 "La;"; // #6 at 0x23 Utf8 "Synthetic"; // #7 at 0x29 Utf8 ""; // #8 at 0x35 Utf8 "(Ljava/lang/Object;)V"; // #9 at 0x3E Utf8 "Code"; // #10 at 0x56 Utf8 "LineNumberTable"; // #11 at 0x5D Utf8 "SourceFile"; // #12 at 0x6F Utf8 "a.java"; // #13 at 0x7C NameAndType #5 #6; // #14 at 0x85 NameAndType #8 #20; // #15 at 0x8A Utf8 "EnclMethTest"; // #16 at 0x8F Utf8 "Loc"; // #17 at 0x9E Utf8 "InnerClasses"; // #18 at 0xA4 Utf8 "java/lang/Object"; // #19 at 0xB3 Utf8 "()V"; // #20 at 0xC6 Utf8 "EnclosingMethod"; // #21 at 0xCC } // Constant Pool 0x0000; // access #3;// this_cpx #4;// super_cpx [0] { // Interfaces } // Interfaces [1] { // fields { // Member at 0xE8 0x0000; // access #5; // name_cpx #6; // sig_cpx [1] { // Attributes Attr(#7, 0) { // Synthetic at 0xF0 } // end Synthetic } // Attributes } // Member } // fields [1] { // methods { // Member at 0xF8 0x0001; // access #8; // name_cpx #20; // sig_cpx [1] { // Attributes Attr(#10, 17) { // Code at 0x0100 2; // max_stack 2; // max_locals Bytes[5]{ 0x2AB70002B1; }; [0] { // Traps } // end Traps [0] { // Attributes } // Attributes } // end Code } // Attributes } // Member } // methods [3] { // Attributes Attr(#12, 2) { // SourceFile at 0x0119 #13; } // end SourceFile ; Attr(#18, 10) { // InnerClasses at 0x0121 [1] { // InnerClasses #3 #0 #17 0; // at 0x0131 } } // end InnerClasses ; Attr(#21, 6) { // EnclosingMethod at 0x0131 // invalid length of EnclosingMethod attr: 6 (should be 4) !! 0x0004000F; } // end EnclosingMethod } // Attributes } // end class EnclMethTest TestInterface01n01.jasm000066400000000000000000000007511514323636100336040ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/common/sequence/* * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. */ package javasoft/sqe/tests/api/java/lang/invoke/MethodHandles/Lookup; interface TestInterface01n01 version 51:0 { public static final Field iField:I = int 255; public abstract Method getTestResult:"()I"; public Method xAA:"()I" stack 1 locals 1 { sipush 170; ireturn; } public static Method xBB:"()I" stack 1 locals 0 { sipush 187; ireturn; } } // end Class TestInterface01n01 jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/common/sequence/atrcod00402m1n.jcod000066400000000000000000000031411514323636100327020ustar00rootroot00000000000000/* * Ident: @(#)atrcod00402m1n.jcod generated from: @(#)atrcod00402m.jmpp 1.8 99/10/07 * * Copyright 1999 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ class javasoft/sqe/tests/vm/classfmt/atr/atrcod004/atrcod00402m1/atrcod00402m1n { 0xCAFEBABE; 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty class #12; // #1 class #6; // #2 Method #1 #4; // #3 NameAndType #14 #15; // #4 Utf8 "ConstantValue"; // #5 Utf8 "javasoft/sqe/tests/vm/classfmt/atr/atrcod004/atrcod00402m1/atrcod00402m1n"; // Utf8 "Exceptions"; // #7 Utf8 "LineNumberTable"; // #8 Utf8 "SourceFile"; // #9 Utf8 "LocalVariables"; // #10 Utf8 "Code"; // #11 at 0x92 Utf8 "java/lang/Object"; // #12 Utf8 "attr003.jcod"; // #13 Utf8 ""; // #14 Utf8 "()V"; // #15 } // Constant Pool 0x0001; // access #2;// this_cpx #1;// super_cpx [] { // Interfaces } // Interfaces [] { // fields } // fields [] { // methods { // Member at 0xD4 0x0001; // access #14; // name_cpx #15; // sig_cpx [] { // Attributes Attr(#11) { // Code 1; // max_stack 1; // max_locals /* right: Bytes[5] { end right */ // wrong: Bytes[10] { // end wrong 0x2AB70003B1; }; [] { // Traps } // end Traps [] { // Attributes } // Attributes } // end Code } // Attributes } // Member } // methods [] { // Attributes } // Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/common/sequence/module-info.jcod000066400000000000000000000035351514323636100326510ustar00rootroot00000000000000/* * Ident: @(#)module-info.jcod generated from:%W% %E% * * Copyright (c) 1996, 2018 Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ module module-info { 0xCAFEBABE;// magic 0;// minor class version 53;// major class version []s{ { };// first element is empty Utf8 "javasoft/sqe/jck/tests/vm/atrmmc00101m012/Main0012";// #1 class #1;// #2 Utf8 "module-info";// #3 class #3;// #4 Utf8 "Module";// #5 Utf8 "module012";// #6 Module #6;// #7 Utf8 "java.base";// #8 Module #8;// #9 Utf8 "javasoft/sqe/jck/tests/vm/atrmmc00101m012";// #10 Package #10;// #11 Utf8 "ModuleMainClass";// #12 Utf8 "UNUSED_DUMMY_ATTRIBUTE";// #13 String #13;// #14 }; 0x8000;// module #4;// this_class{"module-info"} #0;// super_class#0 // interfaces []s{ }; // fields []s{ }; // methods []s{ }; // class attributes []s{ // attribute "Module" Attr(#5) { #7;// module_name_index {"module012"} 0x0000; #0;// module_version_index #0 // requires []s{ { #9 0x0020 #0 }; }; // exports []s{ { #11 0x0000 []s{} }; }; // opens []s{ { #11 0x0000 []s{} }; }; // uses [0]s{ }; // provides [0]s{ }; }; //test attribute "ModuleMainClass" //attribute_length, 1 less Attr(#12, 1) { #2;// {"javasoft/sqe/jck/tests/vm/atrmmc00101m012/Main0012"} }; }; } // end of module-info jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/common/sequence/nonvoidinit.jasm000066400000000000000000000023521514323636100330020ustar00rootroot00000000000000/* * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. * */ package org/openjdk/asmtools/sequence; // Interface containing non-void method. public interface nonvoidinit version 50:0 { public abstract Method "":"()I"; } // end Class nonvoidinit stackmap00601m1n.jcod000066400000000000000000000035631514323636100331630ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/common/sequence/* * Ident: @(#)stackmap00601m1n.jcod generated from: @(#)stackmap00601m.jmpp 1.9 06/06/06 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ class javasoft/sqe/tests/vm/cldc/classfmt/stackmap006/stackmap00601m1/stackmap00601m1n { 0xCAFEBABE; 0; 50; [] { // Constant Pool ; // first element is empty Method #3 #5; // #1 Utf8 "StackMapTable"; // #2 class #4; // #3 Utf8 "java/lang/Object"; // #4 NameAndType #10 #7; // #5 Utf8 "SourceFile"; // #6 Utf8 "()V"; // #7 Utf8 "Code"; // #8 Utf8 "a.jasm"; // #9 Utf8 ""; // #10 class #12; // #11 Utf8 "javasoft/sqe/tests/vm/cldc/classfmt/stackmap006/stackmap00601m1/stackmap00601m1n"; // #12 } // Constant Pool 0x0000; // access #11;// this_cpx #3;// super_cpx [] { // Interfaces } // Interfaces [] { // fields } // fields [] { // methods { // Member 0x0001; // access #10; // name_cpx #7; // sig_cpx [] { // Attributes Attr(#8) { // Code 1; // max_stack 1; // max_stack_items Bytes[]{ 0x2AB70001B1000000; 0x0000000000B1; }; [] { // Traps } // end Traps [] { // Attributes Attr(#2) { // StackMap [] { // /* right: 255b, 5, []{}, []{B}; end right */ // wrong: 255b, 5, []{}, [0]{B}; // end wrong } } // end StackMap } // Attributes } // end Code } // Attributes } // Member } // methods [] { // Attributes Attr(#6) { // SourceFile #9; } // end SourceFile } // Attributes } // end class javasoft/sqe/tests/vm/cldc/classfmt/stackmap006/stackmap00601m1/stackmap00601m1n jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/common/sequence/voidinit.jasm000066400000000000000000000023371514323636100322720ustar00rootroot00000000000000/* * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. * */ package org/openjdk/asmtools/sequence; // Interface containing void method. public interface voidinit version 50:0 { public abstract Method "":"()V"; } // end Class voidinit jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/000077500000000000000000000000001514323636100254165ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7902696/000077500000000000000000000000001514323636100271205ustar00rootroot00000000000000CondyNestedResolution.g.jasm000066400000000000000000001145761514323636100344630ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7902696/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ class #84 /* CondyNestedResolution */ version 55:0 { const #1 = String #22; // "In bsm2arg" const #2 = String #61; // "In bsm4arg" const #3 = String #11; // "In bsm1arg" const #4 = Dynamic 8:#12; // #8:name:"Ljava/lang/String;" const #5 = Method #51.#10; // java/lang/Object."":"()V" const #6 = Method #13.#39; // java/io/PrintStream.println:"(Ljava/lang/Object;)V" const #7 = Field #50.#81; // java/lang/System.out:"Ljava/io/PrintStream;" const #8 = Method #84.#45; // CondyNestedResolution.test_condy:"()V" const #9 = Utf8 "java/io/PrintStream"; const #10 = NameAndType #71:#47; // "":"()V" const #11 = Utf8 "In bsm1arg"; const #12 = NameAndType #18:#17; // name:"Ljava/lang/String;" const #13 = class #9; // java/io/PrintStream const #14 = Utf8 "SourceFile"; const #15 = Utf8 "bsm3arg"; const #16 = Utf8 "CondyNestedResolution.jasm"; const #17 = Utf8 "Ljava/lang/String;"; const #18 = Utf8 "name"; const #19 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; const #20 = Utf8 "test_condy"; const #21 = NameAndType #15:#19; // bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #22 = Utf8 "In bsm2arg"; const #23 = Utf8 "Code"; const #24 = Utf8 "([Ljava/lang/String;)V"; const #25 = Utf8 "bsm4arg"; const #26 = Utf8 "out"; const #27 = NameAndType #69:#55; // bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #28 = Utf8 "BootstrapMethods"; const #29 = MethodHandle 6:#44; // REF_invokeStatic:CondyNestedResolution.bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #30 = Method #84.#63; // CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #31 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; const #32 = Method #84.#27; // CondyNestedResolution.bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #33 = MethodHandle 6:#30; // REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #34 = MethodHandle 6:#30; // REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #35 = MethodHandle 6:#30; // REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #36 = MethodHandle 6:#30; // REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #37 = MethodHandle 6:#30; // REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #38 = MethodHandle 6:#30; // REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #39 = NameAndType #40:#41; // println:"(Ljava/lang/Object;)V" const #40 = Utf8 "println"; const #41 = Utf8 "(Ljava/lang/Object;)V"; const #42 = Utf8 "java/lang/Object"; const #43 = Utf8 "java/lang/System"; const #44 = Method #84.#21; // CondyNestedResolution.bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #45 = NameAndType #20:#47; // test_condy:"()V" const #46 = MethodHandle 6:#82; // REF_invokeStatic:CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #47 = Utf8 "()V"; const #48 = String #62; // "hello6" const #49 = String #64; // "hello5" const #50 = class #43; // java/lang/System const #51 = class #42; // java/lang/Object const #52 = String #65; // "hello4" const #53 = String #66; // "hello3" const #54 = String #67; // "hello2" const #55 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; const #56 = Utf8 "main"; const #57 = String #68; // "hello1" const #58 = MethodHandle 6:#32; // REF_invokeStatic:CondyNestedResolution.bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #59 = Utf8 "bsm1arg"; const #60 = NameAndType #25:#83; // bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #61 = Utf8 "In bsm4arg"; const #62 = Utf8 "hello6"; const #63 = NameAndType #59:#31; // bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #64 = Utf8 "hello5"; const #65 = Utf8 "hello4"; const #66 = Utf8 "hello3"; const #67 = Utf8 "hello2"; const #68 = Utf8 "hello1"; const #69 = Utf8 "bsm2arg"; const #70 = Utf8 "Ljava/io/PrintStream;"; const #71 = Utf8 ""; const #72 = Utf8 "CondyNestedResolution"; const #73 = Dynamic 7:#12; // #7:name:"Ljava/lang/String;" const #74 = Dynamic 6:#12; // #6:name:"Ljava/lang/String;" const #75 = Dynamic 5:#12; // #5:name:"Ljava/lang/String;" const #76 = Dynamic 4:#12; // #4:name:"Ljava/lang/String;" const #77 = Dynamic 3:#12; // #3:name:"Ljava/lang/String;" const #78 = Dynamic 0:#12; // #0:name:"Ljava/lang/String;" const #79 = Dynamic 1:#12; // #1:name:"Ljava/lang/String;" const #80 = Dynamic 2:#12; // #2:name:"Ljava/lang/String;" const #81 = NameAndType #26:#70; // out:"Ljava/io/PrintStream;" const #82 = Method #84.#60; // CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #83 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; const #84 = class #72; // CondyNestedResolution public Method #71:#47 // "":"()V" stack 1 locals 1 { 0: aload_0; 1: invokespecial #5; // Method java/lang/Object."":"()V" 4: return; } public static Method #59:#31 // bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" stack 4 locals 4 { 0: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 3: ldc #3; // String "In bsm1arg" 5: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 8: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 11: aload_3; 12: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 15: aload_3; 16: areturn; } public static Method #69:#55 // bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" stack 8 locals 8 { 0: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 3: ldc #1; // String "In bsm2arg" 5: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 8: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 11: aload_3; 12: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 15: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 18: aload 4; 20: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 23: aload_3; 24: areturn; } public static Method #15:#19 // bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" stack 19 locals 19 { 0: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 3: ldc #2; // String "In bsm4arg" 5: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 8: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 11: aload_3; 12: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 15: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 18: aload 4; 20: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 23: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 26: aload 5; 28: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 31: aload_3; 32: areturn; } public static Method #25:#83 // bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" stack 19 locals 19 { 0: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 3: ldc #2; // String "In bsm4arg" 5: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 8: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 11: aload_3; 12: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 15: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 18: aload 4; 20: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 23: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 26: aload 5; 28: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 31: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 34: aload 6; 36: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 39: aload_3; 40: areturn; } public static Method #20:#47 // test_condy:"()V" stack 12 locals 12 { 0: ldc #4; // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello1" // }, // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello2" // }, // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello4" // }, // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello6" // }, // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // Dynamic 0:#12; , // Dynamic 1:#12; , // Dynamic 6:#12; , // Dynamic 7:#12; // } // }, // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello5" // } // }, // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello3" // } // } 2: return; } public static Method #56:#24 // main:"([Ljava/lang/String;)V" stack 2 locals 2 { 0: invokestatic #8; // Method test_condy:"()V" 3: return; } SourceFile #16; // CondyNestedResolution.jasm BootstrapMethod #36; // REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; { #57 // String "hello1" } BootstrapMethod #37; // REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; { #54 // String "hello2" } BootstrapMethod #38; // REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; { #52 // String "hello4" } BootstrapMethod #35; // REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; { #48 // String "hello6" } BootstrapMethod #58; // REF_invokeStatic:CondyNestedResolution.bsm2arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; { #77, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello6" // } #4 // Dynamic REF_invokeStatic:CondyNestedResolution.bsm4arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello1" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello2" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello4" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello6" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // Dynamic 0:#12; , // Dynamic 1:#12; , // Dynamic 6:#12; , // Dynamic 7:#12; // } // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello5" // } // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello3" // } // } } BootstrapMethod #34; // REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; { #49 // String "hello5" } BootstrapMethod #29; // REF_invokeStatic:CondyNestedResolution.bsm3arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; { #80, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello4" // } #76, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm2arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello6" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello1" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello2" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello4" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // Dynamic 3:#12; , // Dynamic 8:#12; // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello5" // } // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello3" // } // } // } #75 // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello5" // } } BootstrapMethod #33; // REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; { #53 // String "hello3" } BootstrapMethod #46; // REF_invokeStatic:CondyNestedResolution.bsm4arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; { #78, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello1" // } #79, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello2" // } #74, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm3arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello4" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello6" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello1" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello2" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // Dynamic 2:#12; , // Dynamic 4:#12; , // Dynamic 5:#12; // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello3" // } // } // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello5" // } // } #73 // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello3" // } } } // end Class CondyNestedResolution compiled from "CondyNestedResolution.jasm" CondyNestedResolution.g.t.jasm000066400000000000000000001137711514323636100347210ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7902696/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ class #84 /* CondyNestedResolution */ version 55:0 { const #1 = String #22; // "In bsm2arg" const #2 = String #61; // "In bsm4arg" const #3 = String #11; // "In bsm1arg" const #4 = Dynamic 8:#12; // #8:name:"Ljava/lang/String;" const #5 = Methodref #51.#10; // java/lang/Object."":"()V" const #6 = Methodref #13.#39; // java/io/PrintStream.println:"(Ljava/lang/Object;)V" const #7 = Fieldref #50.#81; // java/lang/System.out:"Ljava/io/PrintStream;" const #8 = Methodref #84.#45; // CondyNestedResolution.test_condy:"()V" const #9 = Utf8 "java/io/PrintStream"; const #10 = NameAndType #71:#47; // "":"()V" const #11 = Utf8 "In bsm1arg"; const #12 = NameAndType #18:#17; // name:"Ljava/lang/String;" const #13 = Class #9; // java/io/PrintStream const #14 = Utf8 "SourceFile"; const #15 = Utf8 "bsm3arg"; const #16 = Utf8 "CondyNestedResolution.jasm"; const #17 = Utf8 "Ljava/lang/String;"; const #18 = Utf8 "name"; const #19 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; const #20 = Utf8 "test_condy"; const #21 = NameAndType #15:#19; // bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #22 = Utf8 "In bsm2arg"; const #23 = Utf8 "Code"; const #24 = Utf8 "([Ljava/lang/String;)V"; const #25 = Utf8 "bsm4arg"; const #26 = Utf8 "out"; const #27 = NameAndType #69:#55; // bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #28 = Utf8 "BootstrapMethods"; const #29 = MethodHandle 6:#44; // REF_invokeStatic:CondyNestedResolution.bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #30 = Methodref #84.#63; // CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #31 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; const #32 = Methodref #84.#27; // CondyNestedResolution.bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #33 = MethodHandle 6:#30; // REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #34 = MethodHandle 6:#30; // REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #35 = MethodHandle 6:#30; // REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #36 = MethodHandle 6:#30; // REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #37 = MethodHandle 6:#30; // REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #38 = MethodHandle 6:#30; // REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #39 = NameAndType #40:#41; // println:"(Ljava/lang/Object;)V" const #40 = Utf8 "println"; const #41 = Utf8 "(Ljava/lang/Object;)V"; const #42 = Utf8 "java/lang/Object"; const #43 = Utf8 "java/lang/System"; const #44 = Methodref #84.#21; // CondyNestedResolution.bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #45 = NameAndType #20:#47; // test_condy:"()V" const #46 = MethodHandle 6:#82; // REF_invokeStatic:CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #47 = Utf8 "()V"; const #48 = String #62; // "hello6" const #49 = String #64; // "hello5" const #50 = Class #43; // java/lang/System const #51 = Class #42; // java/lang/Object const #52 = String #65; // "hello4" const #53 = String #66; // "hello3" const #54 = String #67; // "hello2" const #55 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; const #56 = Utf8 "main"; const #57 = String #68; // "hello1" const #58 = MethodHandle 6:#32; // REF_invokeStatic:CondyNestedResolution.bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #59 = Utf8 "bsm1arg"; const #60 = NameAndType #25:#83; // bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #61 = Utf8 "In bsm4arg"; const #62 = Utf8 "hello6"; const #63 = NameAndType #59:#31; // bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #64 = Utf8 "hello5"; const #65 = Utf8 "hello4"; const #66 = Utf8 "hello3"; const #67 = Utf8 "hello2"; const #68 = Utf8 "hello1"; const #69 = Utf8 "bsm2arg"; const #70 = Utf8 "Ljava/io/PrintStream;"; const #71 = Utf8 ""; const #72 = Utf8 "CondyNestedResolution"; const #73 = Dynamic 7:#12; // #7:name:"Ljava/lang/String;" const #74 = Dynamic 6:#12; // #6:name:"Ljava/lang/String;" const #75 = Dynamic 5:#12; // #5:name:"Ljava/lang/String;" const #76 = Dynamic 4:#12; // #4:name:"Ljava/lang/String;" const #77 = Dynamic 3:#12; // #3:name:"Ljava/lang/String;" const #78 = Dynamic 0:#12; // #0:name:"Ljava/lang/String;" const #79 = Dynamic 1:#12; // #1:name:"Ljava/lang/String;" const #80 = Dynamic 2:#12; // #2:name:"Ljava/lang/String;" const #81 = NameAndType #26:#70; // out:"Ljava/io/PrintStream;" const #82 = Methodref #84.#60; // CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" const #83 = Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; const #84 = Class #72; // CondyNestedResolution public Method #71:#47 // "":"()V" stack 1 locals 1 { 0: aload_0; 1: invokespecial #5; // Method java/lang/Object."":"()V" 4: return; } public static Method #59:#31 // bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" stack 4 locals 4 { 0: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 3: ldc #3; // String "In bsm1arg" 5: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 8: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 11: aload_3; 12: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 15: aload_3; 16: areturn; } public static Method #69:#55 // bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" stack 8 locals 8 { 0: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 3: ldc #1; // String "In bsm2arg" 5: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 8: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 11: aload_3; 12: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 15: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 18: aload 4; 20: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 23: aload_3; 24: areturn; } public static Method #15:#19 // bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" stack 19 locals 19 { 0: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 3: ldc #2; // String "In bsm4arg" 5: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 8: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 11: aload_3; 12: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 15: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 18: aload 4; 20: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 23: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 26: aload 5; 28: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 31: aload_3; 32: areturn; } public static Method #25:#83 // bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" stack 19 locals 19 { 0: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 3: ldc #2; // String "In bsm4arg" 5: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 8: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 11: aload_3; 12: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 15: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 18: aload 4; 20: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 23: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 26: aload 5; 28: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 31: getstatic #7; // Field java/lang/System.out:"Ljava/io/PrintStream;" 34: aload 6; 36: invokevirtual #6; // Method java/io/PrintStream.println:"(Ljava/lang/Object;)V" 39: aload_3; 40: areturn; } public static Method #20:#47 // test_condy:"()V" stack 12 locals 12 { 0: ldc #4; // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello1" // }, // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello2" // }, // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello4" // }, // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello6" // }, // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // Dynamic 0:#12; , // Dynamic 1:#12; , // Dynamic 6:#12; , // Dynamic 7:#12; // } // }, // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello5" // } // }, // Dynamic REF_invokeStatic:Method CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello3" // } // } 2: return; } public static Method #56:#24 // main:"([Ljava/lang/String;)V" stack 2 locals 2 { 0: invokestatic #8; // Method test_condy:"()V" 3: return; } SourceFile #16; // CondyNestedResolution.jasm BootstrapMethods { 0: #36; // REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; Arguments: #57; // String "hello1" 1: #37; // REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; Arguments: #54; // String "hello2" 2: #38; // REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; Arguments: #52; // String "hello4" 3: #35; // REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; Arguments: #48; // String "hello6" 4: #58; // REF_invokeStatic:CondyNestedResolution.bsm2arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; Arguments: #77, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello6" // } #4; // Dynamic REF_invokeStatic:CondyNestedResolution.bsm4arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello1" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello2" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello4" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello6" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // Dynamic 0:#12; , // Dynamic 1:#12; , // Dynamic 6:#12; , // Dynamic 7:#12; // } // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello5" // } // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello3" // } // } 5: #34; // REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; Arguments: #49; // String "hello5" 6: #29; // REF_invokeStatic:CondyNestedResolution.bsm3arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; Arguments: #80, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello4" // } #76, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm2arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello6" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello1" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello2" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello4" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // Dynamic 3:#12; , // Dynamic 8:#12; // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello5" // } // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello3" // } // } // } #75; // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello5" // } 7: #33; // REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; Arguments: #53; // String "hello3" 8: #46; // REF_invokeStatic:CondyNestedResolution.bsm4arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"; Arguments: #78, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello1" // } #79, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello2" // } #74, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm3arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello4" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm2arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello6" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm4arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello1" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello2" // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm3arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // Dynamic 2:#12; , // Dynamic 4:#12; , // Dynamic 5:#12; // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;":name:"Ljava/lang/String;" { // String "hello3" // } // } // }, // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello5" // } // } #73; // Dynamic REF_invokeStatic:CondyNestedResolution.bsm1arg: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;": // name:"Ljava/lang/String;" { // String "hello3" // } } } // end Class CondyNestedResolution compiled from "CondyNestedResolution.jasm" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7902820/000077500000000000000000000000001514323636100271055ustar00rootroot00000000000000InvalidSourceDebugExtension.jcod000066400000000000000000000110301514323636100352750ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7902820/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ class invalid/InvalidSourceDebugExtension { 0xCAFEBABE; 0; // minor version 55; // version [15] { // Constant Pool ; // first element is empty Utf8 "invalid/InvalidSourceDebugExtension"; // #1 at 0x0A Class #1; // #2 at 0x30 Utf8 "java/lang/Object"; // #3 at 0x33 Class #3; // #4 at 0x46 Utf8 "InvalidSourceDebugExtension.java"; // #5 at 0x49 Utf8 ""; // #6 at 0x6C Utf8 "()V"; // #7 at 0x75 NameAndType #6 #7; // #8 at 0x7B Method #4 #8; // #9 at 0x80 Utf8 "file"; // #10 at 0x85 Utf8 "Code"; // #11 at 0x8C Utf8 "LineNumberTable"; // #12 at 0x93 Utf8 "SourceFile"; // #13 at 0xA5 Utf8 "SourceDebugExtension"; // #14 at 0xB2 } // end of Constant Pool 0x0021; // access [ ACC_PUBLIC, ACC_SUPER ] #2; // this_cpx #4; // super_cpx [0] { // Interfaces } // end of Interfaces [0] { // Fields } // end of Fields [1] { // Methods { // method at 0xD5 0x0001; // access #6; // name_index : #7; // descriptor_index : ()V [1] { // Attributes Attr(#11, 29) { // Code at 0xDD 1; // max_stack 1; // max_locals Bytes[5]{ 0x2A 0xB7 0x00 0x09 0xB1; } [0] { // Traps } // end of Traps [1] { // Attributes Attr(#12, 6) { // LineNumberTable at 0xF4 [1] { // line_number_table 0 30; // at 0x0100 } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [2] { // Attributes Attr(#13, 2) { // SourceFile at 0x0102 #10; } // end of SourceFile ; Attr(#14, 2147483647) { // SourceDebugExtension at 0x010A // == The attribute array started at at 0x010A has 2147483647 bytes more than expected. == } // end of SourceDebugExtension } // end of Attributes } // end of class invalid/InvalidSourceDebugExtension jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903031/000077500000000000000000000000001514323636100271005ustar00rootroot00000000000000module-info.class.g.jasm000066400000000000000000001345171514323636100334570ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903031/* * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ module #6 /* java.base */ version 65:0 { const #1 = class #2; // module-info const #2 = Utf8 "module-info"; const #3 = Utf8 "SourceFile"; const #4 = Utf8 "module-info.java"; const #5 = Utf8 "Module"; const #6 = Module #7; // java.base const #7 = Utf8 "java.base"; const #8 = Package #9; // java/io const #9 = Utf8 "java/io"; const #10 = Package #11; // java/lang const #11 = Utf8 "java/lang"; const #12 = Package #13; // java/lang/annotation const #13 = Utf8 "java/lang/annotation"; const #14 = Package #15; // java/lang/constant const #15 = Utf8 "java/lang/constant"; const #16 = Package #17; // java/lang/foreign const #17 = Utf8 "java/lang/foreign"; const #18 = Package #19; // java/lang/invoke const #19 = Utf8 "java/lang/invoke"; const #20 = Package #21; // java/lang/module const #21 = Utf8 "java/lang/module"; const #22 = Package #23; // java/lang/ref const #23 = Utf8 "java/lang/ref"; const #24 = Package #25; // java/lang/reflect const #25 = Utf8 "java/lang/reflect"; const #26 = Package #27; // java/lang/runtime const #27 = Utf8 "java/lang/runtime"; const #28 = Package #29; // java/math const #29 = Utf8 "java/math"; const #30 = Package #31; // java/net const #31 = Utf8 "java/net"; const #32 = Package #33; // java/net/spi const #33 = Utf8 "java/net/spi"; const #34 = Package #35; // java/nio const #35 = Utf8 "java/nio"; const #36 = Package #37; // java/nio/channels const #37 = Utf8 "java/nio/channels"; const #38 = Package #39; // java/nio/channels/spi const #39 = Utf8 "java/nio/channels/spi"; const #40 = Package #41; // java/nio/charset const #41 = Utf8 "java/nio/charset"; const #42 = Package #43; // java/nio/charset/spi const #43 = Utf8 "java/nio/charset/spi"; const #44 = Package #45; // java/nio/file const #45 = Utf8 "java/nio/file"; const #46 = Package #47; // java/nio/file/attribute const #47 = Utf8 "java/nio/file/attribute"; const #48 = Package #49; // java/nio/file/spi const #49 = Utf8 "java/nio/file/spi"; const #50 = Package #51; // java/security const #51 = Utf8 "java/security"; const #52 = Package #53; // java/security/cert const #53 = Utf8 "java/security/cert"; const #54 = Package #55; // java/security/interfaces const #55 = Utf8 "java/security/interfaces"; const #56 = Package #57; // java/security/spec const #57 = Utf8 "java/security/spec"; const #58 = Package #59; // java/text const #59 = Utf8 "java/text"; const #60 = Package #61; // java/text/spi const #61 = Utf8 "java/text/spi"; const #62 = Package #63; // java/time const #63 = Utf8 "java/time"; const #64 = Package #65; // java/time/chrono const #65 = Utf8 "java/time/chrono"; const #66 = Package #67; // java/time/format const #67 = Utf8 "java/time/format"; const #68 = Package #69; // java/time/temporal const #69 = Utf8 "java/time/temporal"; const #70 = Package #71; // java/time/zone const #71 = Utf8 "java/time/zone"; const #72 = Package #73; // java/util const #73 = Utf8 "java/util"; const #74 = Package #75; // java/util/concurrent const #75 = Utf8 "java/util/concurrent"; const #76 = Package #77; // java/util/concurrent/atomic const #77 = Utf8 "java/util/concurrent/atomic"; const #78 = Package #79; // java/util/concurrent/locks const #79 = Utf8 "java/util/concurrent/locks"; const #80 = Package #81; // java/util/function const #81 = Utf8 "java/util/function"; const #82 = Package #83; // java/util/jar const #83 = Utf8 "java/util/jar"; const #84 = Package #85; // java/util/random const #85 = Utf8 "java/util/random"; const #86 = Package #87; // java/util/regex const #87 = Utf8 "java/util/regex"; const #88 = Package #89; // java/util/spi const #89 = Utf8 "java/util/spi"; const #90 = Package #91; // java/util/stream const #91 = Utf8 "java/util/stream"; const #92 = Package #93; // java/util/zip const #93 = Utf8 "java/util/zip"; const #94 = Package #95; // javax/crypto const #95 = Utf8 "javax/crypto"; const #96 = Package #97; // javax/crypto/interfaces const #97 = Utf8 "javax/crypto/interfaces"; const #98 = Package #99; // javax/crypto/spec const #99 = Utf8 "javax/crypto/spec"; const #100 = Package #101; // javax/net const #101 = Utf8 "javax/net"; const #102 = Package #103; // javax/net/ssl const #103 = Utf8 "javax/net/ssl"; const #104 = Package #105; // javax/security/auth const #105 = Utf8 "javax/security/auth"; const #106 = Package #107; // javax/security/auth/callback const #107 = Utf8 "javax/security/auth/callback"; const #108 = Package #109; // javax/security/auth/login const #109 = Utf8 "javax/security/auth/login"; const #110 = Package #111; // javax/security/auth/spi const #111 = Utf8 "javax/security/auth/spi"; const #112 = Package #113; // javax/security/auth/x500 const #113 = Utf8 "javax/security/auth/x500"; const #114 = Package #115; // javax/security/cert const #115 = Utf8 "javax/security/cert"; const #116 = Package #117; // com/sun/crypto/provider const #117 = Utf8 "com/sun/crypto/provider"; const #118 = Module #119; // jdk.crypto.cryptoki const #119 = Utf8 "jdk.crypto.cryptoki"; const #120 = Package #121; // com/sun/security/ntlm const #121 = Utf8 "com/sun/security/ntlm"; const #122 = Module #123; // java.security.sasl const #123 = Utf8 "java.security.sasl"; const #124 = Package #125; // jdk/internal/access const #125 = Utf8 "jdk/internal/access"; const #126 = Module #127; // java.desktop const #127 = Utf8 "java.desktop"; const #128 = Module #129; // java.logging const #129 = Utf8 "java.logging"; const #130 = Module #131; // java.management const #131 = Utf8 "java.management"; const #132 = Module #133; // java.naming const #133 = Utf8 "java.naming"; const #134 = Module #135; // java.rmi const #135 = Utf8 "java.rmi"; const #136 = Module #137; // jdk.charsets const #137 = Utf8 "jdk.charsets"; const #138 = Module #139; // jdk.incubator.concurrent const #139 = Utf8 "jdk.incubator.concurrent"; const #140 = Module #141; // jdk.jartool const #141 = Utf8 "jdk.jartool"; const #142 = Module #143; // jdk.jfr const #143 = Utf8 "jdk.jfr"; const #144 = Module #145; // jdk.jlink const #145 = Utf8 "jdk.jlink"; const #146 = Module #147; // jdk.net const #147 = Utf8 "jdk.net"; const #148 = Module #149; // jdk.sctp const #149 = Utf8 "jdk.sctp"; const #150 = Package #151; // jdk/internal/classfile const #151 = Utf8 "jdk/internal/classfile"; const #152 = Module #153; // jdk.jshell const #153 = Utf8 "jdk.jshell"; const #154 = Package #155; // jdk/internal/classfile/attribute const #155 = Utf8 "jdk/internal/classfile/attribute"; const #156 = Package #157; // jdk/internal/classfile/constantpool const #157 = Utf8 "jdk/internal/classfile/constantpool"; const #158 = Package #159; // jdk/internal/classfile/instruction const #159 = Utf8 "jdk/internal/classfile/instruction"; const #160 = Package #161; // jdk/internal/event const #161 = Utf8 "jdk/internal/event"; const #162 = Package #163; // jdk/internal/foreign const #163 = Utf8 "jdk/internal/foreign"; const #164 = Module #165; // jdk.incubator.vector const #165 = Utf8 "jdk.incubator.vector"; const #166 = Package #167; // jdk/internal/io const #167 = Utf8 "jdk/internal/io"; const #168 = Module #169; // jdk.internal.le const #169 = Utf8 "jdk.internal.le"; const #170 = Package #171; // jdk/internal/javac const #171 = Utf8 "jdk/internal/javac"; const #172 = Module #173; // java.compiler const #173 = Utf8 "java.compiler"; const #174 = Module #175; // jdk.compiler const #175 = Utf8 "jdk.compiler"; const #176 = Module #177; // jdk.jdi const #177 = Utf8 "jdk.jdi"; const #178 = Module #179; // jdk.management const #179 = Utf8 "jdk.management"; const #180 = Package #181; // jdk/internal/jimage const #181 = Utf8 "jdk/internal/jimage"; const #182 = Package #183; // jdk/internal/jimage/decompressor const #183 = Utf8 "jdk/internal/jimage/decompressor"; const #184 = Package #185; // jdk/internal/jmod const #185 = Utf8 "jdk/internal/jmod"; const #186 = Package #187; // jdk/internal/loader const #187 = Utf8 "jdk/internal/loader"; const #188 = Module #189; // java.instrument const #189 = Utf8 "java.instrument"; const #190 = Package #191; // jdk/internal/logger const #191 = Utf8 "jdk/internal/logger"; const #192 = Package #193; // jdk/internal/misc const #193 = Utf8 "jdk/internal/misc"; const #194 = Module #195; // java.net.http const #195 = Utf8 "java.net.http"; const #196 = Module #197; // java.security.jgss const #197 = Utf8 "java.security.jgss"; const #198 = Module #199; // jdk.attach const #199 = Utf8 "jdk.attach"; const #200 = Module #201; // jdk.internal.vm.ci const #201 = Utf8 "jdk.internal.vm.ci"; const #202 = Module #203; // jdk.nio.mapmode const #203 = Utf8 "jdk.nio.mapmode"; const #204 = Module #205; // jdk.unsupported const #205 = Utf8 "jdk.unsupported"; const #206 = Package #207; // jdk/internal/module const #207 = Utf8 "jdk/internal/module"; const #208 = Module #209; // java.management.rmi const #209 = Utf8 "java.management.rmi"; const #210 = Module #211; // jdk.jpackage const #211 = Utf8 "jdk.jpackage"; const #212 = Package #213; // jdk/internal/org/objectweb/asm const #213 = Utf8 "jdk/internal/org/objectweb/asm"; const #214 = Package #215; // jdk/internal/org/objectweb/asm/commons const #215 = Utf8 "jdk/internal/org/objectweb/asm/commons"; const #216 = Package #217; // jdk/internal/org/objectweb/asm/tree const #217 = Utf8 "jdk/internal/org/objectweb/asm/tree"; const #218 = Package #219; // jdk/internal/org/objectweb/asm/util const #219 = Utf8 "jdk/internal/org/objectweb/asm/util"; const #220 = Package #221; // jdk/internal/org/xml/sax const #221 = Utf8 "jdk/internal/org/xml/sax"; const #222 = Package #223; // jdk/internal/org/xml/sax/helpers const #223 = Utf8 "jdk/internal/org/xml/sax/helpers"; const #224 = Package #225; // jdk/internal/perf const #225 = Utf8 "jdk/internal/perf"; const #226 = Module #227; // jdk.internal.jvmstat const #227 = Utf8 "jdk.internal.jvmstat"; const #228 = Module #229; // jdk.management.agent const #229 = Utf8 "jdk.management.agent"; const #230 = Package #231; // jdk/internal/platform const #231 = Utf8 "jdk/internal/platform"; const #232 = Package #233; // jdk/internal/ref const #233 = Utf8 "jdk/internal/ref"; const #234 = Package #235; // jdk/internal/reflect const #235 = Utf8 "jdk/internal/reflect"; const #236 = Module #237; // java.sql const #237 = Utf8 "java.sql"; const #238 = Module #239; // java.sql.rowset const #239 = Utf8 "java.sql.rowset"; const #240 = Module #241; // jdk.dynalink const #241 = Utf8 "jdk.dynalink"; const #242 = Package #243; // jdk/internal/util const #243 = Utf8 "jdk/internal/util"; const #244 = Package #245; // jdk/internal/util/jar const #245 = Utf8 "jdk/internal/util/jar"; const #246 = Package #247; // jdk/internal/util/random const #247 = Utf8 "jdk/internal/util/random"; const #248 = Module #249; // jdk.random const #249 = Utf8 "jdk.random"; const #250 = Package #251; // jdk/internal/util/xml const #251 = Utf8 "jdk/internal/util/xml"; const #252 = Package #253; // jdk/internal/util/xml/impl const #253 = Utf8 "jdk/internal/util/xml/impl"; const #254 = Package #255; // jdk/internal/vm const #255 = Utf8 "jdk/internal/vm"; const #256 = Package #257; // jdk/internal/vm/annotation const #257 = Utf8 "jdk/internal/vm/annotation"; const #258 = Package #259; // jdk/internal/vm/vector const #259 = Utf8 "jdk/internal/vm/vector"; const #260 = Package #261; // sun/invoke/util const #261 = Utf8 "sun/invoke/util"; const #262 = Package #263; // sun/net const #263 = Utf8 "sun/net"; const #264 = Module #265; // jdk.naming.dns const #265 = Utf8 "jdk.naming.dns"; const #266 = Package #267; // sun/net/dns const #267 = Utf8 "sun/net/dns"; const #268 = Package #269; // sun/net/ext const #269 = Utf8 "sun/net/ext"; const #270 = Package #271; // sun/net/util const #271 = Utf8 "sun/net/util"; const #272 = Module #273; // jdk.jconsole const #273 = Utf8 "jdk.jconsole"; const #274 = Package #275; // sun/net/www const #275 = Utf8 "sun/net/www"; const #276 = Package #277; // sun/net/www/protocol/http const #277 = Utf8 "sun/net/www/protocol/http"; const #278 = Package #279; // sun/nio/ch const #279 = Utf8 "sun/nio/ch"; const #280 = Package #281; // sun/nio/cs const #281 = Utf8 "sun/nio/cs"; const #282 = Package #283; // sun/nio/fs const #283 = Utf8 "sun/nio/fs"; const #284 = Package #285; // sun/reflect/annotation const #285 = Utf8 "sun/reflect/annotation"; const #286 = Package #287; // sun/reflect/generics/reflectiveObjects const #287 = Utf8 "sun/reflect/generics/reflectiveObjects"; const #288 = Package #289; // sun/reflect/misc const #289 = Utf8 "sun/reflect/misc"; const #290 = Module #291; // java.datatransfer const #291 = Utf8 "java.datatransfer"; const #292 = Package #293; // sun/security/action const #293 = Utf8 "sun/security/action"; const #294 = Module #295; // jdk.crypto.ec const #295 = Utf8 "jdk.crypto.ec"; const #296 = Package #297; // sun/security/internal/interfaces const #297 = Utf8 "sun/security/internal/interfaces"; const #298 = Package #299; // sun/security/internal/spec const #299 = Utf8 "sun/security/internal/spec"; const #300 = Package #301; // sun/security/jca const #301 = Utf8 "sun/security/jca"; const #302 = Module #303; // java.smartcardio const #303 = Utf8 "java.smartcardio"; const #304 = Package #305; // sun/security/pkcs const #305 = Utf8 "sun/security/pkcs"; const #306 = Package #307; // sun/security/provider const #307 = Utf8 "sun/security/provider"; const #308 = Module #309; // jdk.security.auth const #309 = Utf8 "jdk.security.auth"; const #310 = Package #311; // sun/security/provider/certpath const #311 = Utf8 "sun/security/provider/certpath"; const #312 = Package #313; // sun/security/rsa const #313 = Utf8 "sun/security/rsa"; const #314 = Package #315; // sun/security/timestamp const #315 = Utf8 "sun/security/timestamp"; const #316 = Package #317; // sun/security/tools const #317 = Utf8 "sun/security/tools"; const #318 = Package #319; // sun/security/util const #319 = Utf8 "sun/security/util"; const #320 = Module #321; // java.xml.crypto const #321 = Utf8 "java.xml.crypto"; const #322 = Module #323; // jdk.security.jgss const #323 = Utf8 "jdk.security.jgss"; const #324 = Package #325; // sun/security/util/math const #325 = Utf8 "sun/security/util/math"; const #326 = Package #327; // sun/security/util/math/intpoly const #327 = Utf8 "sun/security/util/math/intpoly"; const #328 = Package #329; // sun/security/validator const #329 = Utf8 "sun/security/validator"; const #330 = Package #331; // sun/security/x509 const #331 = Utf8 "sun/security/x509"; const #332 = Package #333; // sun/util/cldr const #333 = Utf8 "sun/util/cldr"; const #334 = Package #335; // sun/util/locale/provider const #335 = Utf8 "sun/util/locale/provider"; const #336 = Module #337; // jdk.localedata const #337 = Utf8 "jdk.localedata"; const #338 = Package #339; // sun/util/logging const #339 = Utf8 "sun/util/logging"; const #340 = Module #341; // java.prefs const #341 = Utf8 "java.prefs"; const #342 = Package #343; // sun/util/resources const #343 = Utf8 "sun/util/resources"; const #344 = class #345; // java/lang/System$LoggerFinder const #345 = Utf8 "java/lang/System$LoggerFinder"; const #346 = class #347; // java/net/ContentHandlerFactory const #347 = Utf8 "java/net/ContentHandlerFactory"; const #348 = class #349; // java/net/spi/InetAddressResolverProvider const #349 = Utf8 "java/net/spi/InetAddressResolverProvider"; const #350 = class #351; // java/net/spi/URLStreamHandlerProvider const #351 = Utf8 "java/net/spi/URLStreamHandlerProvider"; const #352 = class #353; // java/nio/channels/spi/AsynchronousChannelProvider const #353 = Utf8 "java/nio/channels/spi/AsynchronousChannelProvider"; const #354 = class #355; // java/nio/channels/spi/SelectorProvider const #355 = Utf8 "java/nio/channels/spi/SelectorProvider"; const #356 = class #357; // java/nio/charset/spi/CharsetProvider const #357 = Utf8 "java/nio/charset/spi/CharsetProvider"; const #358 = class #359; // java/nio/file/spi/FileSystemProvider const #359 = Utf8 "java/nio/file/spi/FileSystemProvider"; const #360 = class #361; // java/nio/file/spi/FileTypeDetector const #361 = Utf8 "java/nio/file/spi/FileTypeDetector"; const #362 = class #363; // java/security/Provider const #363 = Utf8 "java/security/Provider"; const #364 = class #365; // java/text/spi/BreakIteratorProvider const #365 = Utf8 "java/text/spi/BreakIteratorProvider"; const #366 = class #367; // java/text/spi/CollatorProvider const #367 = Utf8 "java/text/spi/CollatorProvider"; const #368 = class #369; // java/text/spi/DateFormatProvider const #369 = Utf8 "java/text/spi/DateFormatProvider"; const #370 = class #371; // java/text/spi/DateFormatSymbolsProvider const #371 = Utf8 "java/text/spi/DateFormatSymbolsProvider"; const #372 = class #373; // java/text/spi/DecimalFormatSymbolsProvider const #373 = Utf8 "java/text/spi/DecimalFormatSymbolsProvider"; const #374 = class #375; // java/text/spi/NumberFormatProvider const #375 = Utf8 "java/text/spi/NumberFormatProvider"; const #376 = class #377; // java/time/chrono/AbstractChronology const #377 = Utf8 "java/time/chrono/AbstractChronology"; const #378 = class #379; // java/time/chrono/Chronology const #379 = Utf8 "java/time/chrono/Chronology"; const #380 = class #381; // java/time/zone/ZoneRulesProvider const #381 = Utf8 "java/time/zone/ZoneRulesProvider"; const #382 = class #383; // java/util/random/RandomGenerator const #383 = Utf8 "java/util/random/RandomGenerator"; const #384 = class #385; // java/util/spi/CalendarDataProvider const #385 = Utf8 "java/util/spi/CalendarDataProvider"; const #386 = class #387; // java/util/spi/CalendarNameProvider const #387 = Utf8 "java/util/spi/CalendarNameProvider"; const #388 = class #389; // java/util/spi/CurrencyNameProvider const #389 = Utf8 "java/util/spi/CurrencyNameProvider"; const #390 = class #391; // java/util/spi/LocaleNameProvider const #391 = Utf8 "java/util/spi/LocaleNameProvider"; const #392 = class #393; // java/util/spi/ResourceBundleControlProvider const #393 = Utf8 "java/util/spi/ResourceBundleControlProvider"; const #394 = class #395; // java/util/spi/ResourceBundleProvider const #395 = Utf8 "java/util/spi/ResourceBundleProvider"; const #396 = class #397; // java/util/spi/TimeZoneNameProvider const #397 = Utf8 "java/util/spi/TimeZoneNameProvider"; const #398 = class #399; // java/util/spi/ToolProvider const #399 = Utf8 "java/util/spi/ToolProvider"; const #400 = class #401; // javax/security/auth/spi/LoginModule const #401 = Utf8 "javax/security/auth/spi/LoginModule"; const #402 = class #403; // jdk/internal/io/JdkConsoleProvider const #403 = Utf8 "jdk/internal/io/JdkConsoleProvider"; const #404 = class #405; // jdk/internal/logger/DefaultLoggerFinder const #405 = Utf8 "jdk/internal/logger/DefaultLoggerFinder"; const #406 = class #407; // sun/text/spi/JavaTimeDateTimePatternProvider const #407 = Utf8 "sun/text/spi/JavaTimeDateTimePatternProvider"; const #408 = class #409; // sun/util/locale/provider/LocaleDataMetaInfo const #409 = Utf8 "sun/util/locale/provider/LocaleDataMetaInfo"; const #410 = class #411; // sun/util/resources/LocaleData$CommonResourceBundleProvider const #411 = Utf8 "sun/util/resources/LocaleData$CommonResourceBundleProvider"; const #412 = class #413; // sun/util/resources/LocaleData$SupplementaryResourceBundleProvider const #413 = Utf8 "sun/util/resources/LocaleData$SupplementaryResourceBundleProvider"; const #414 = class #415; // sun/util/spi/CalendarProvider const #415 = Utf8 "sun/util/spi/CalendarProvider"; const #416 = class #417; // jdk/internal/jrtfs/JrtFileSystemProvider const #417 = Utf8 "jdk/internal/jrtfs/JrtFileSystemProvider"; const #418 = class #419; // java/security/SecureRandom const #419 = Utf8 "java/security/SecureRandom"; const #420 = class #421; // java/util/Random const #421 = Utf8 "java/util/Random"; const #422 = class #423; // java/util/SplittableRandom const #423 = Utf8 "java/util/SplittableRandom"; const #424 = Utf8 "InnerClasses"; const #425 = class #426; // java/lang/System const #426 = Utf8 "java/lang/System"; const #427 = Utf8 "LoggerFinder"; const #428 = class #429; // sun/util/resources/LocaleData const #429 = Utf8 "sun/util/resources/LocaleData"; const #430 = Utf8 "CommonResourceBundleProvider"; const #431 = Utf8 "SupplementaryResourceBundleProvider"; const #432 = Utf8 "ModulePackages"; const #433 = Utf8 "apple/security"; const #434 = Package #433; // apple/security const #435 = Utf8 "jdk/internal"; const #436 = Package #435; // jdk/internal const #437 = Utf8 "jdk/internal/access/foreign"; const #438 = Package #437; // jdk/internal/access/foreign const #439 = Utf8 "jdk/internal/classfile/components"; const #440 = Package #439; // jdk/internal/classfile/components const #441 = Utf8 "jdk/internal/classfile/impl"; const #442 = Package #441; // jdk/internal/classfile/impl const #443 = Utf8 "jdk/internal/classfile/impl/verifier"; const #444 = Package #443; // jdk/internal/classfile/impl/verifier const #445 = Utf8 "jdk/internal/classfile/java/lang/constant"; const #446 = Package #445; // jdk/internal/classfile/java/lang/constant const #447 = Utf8 "jdk/internal/foreign/abi"; const #448 = Package #447; // jdk/internal/foreign/abi const #449 = Utf8 "jdk/internal/foreign/abi/aarch64"; const #450 = Package #449; // jdk/internal/foreign/abi/aarch64 const #451 = Utf8 "jdk/internal/foreign/abi/aarch64/linux"; const #452 = Package #451; // jdk/internal/foreign/abi/aarch64/linux const #453 = Utf8 "jdk/internal/foreign/abi/aarch64/macos"; const #454 = Package #453; // jdk/internal/foreign/abi/aarch64/macos const #455 = Utf8 "jdk/internal/foreign/abi/aarch64/windows"; const #456 = Package #455; // jdk/internal/foreign/abi/aarch64/windows const #457 = Utf8 "jdk/internal/foreign/abi/fallback"; const #458 = Package #457; // jdk/internal/foreign/abi/fallback const #459 = Utf8 "jdk/internal/foreign/abi/riscv64"; const #460 = Package #459; // jdk/internal/foreign/abi/riscv64 const #461 = Utf8 "jdk/internal/foreign/abi/riscv64/linux"; const #462 = Package #461; // jdk/internal/foreign/abi/riscv64/linux const #463 = Utf8 "jdk/internal/foreign/abi/x64"; const #464 = Package #463; // jdk/internal/foreign/abi/x64 const #465 = Utf8 "jdk/internal/foreign/abi/x64/sysv"; const #466 = Package #465; // jdk/internal/foreign/abi/x64/sysv const #467 = Utf8 "jdk/internal/foreign/abi/x64/windows"; const #468 = Package #467; // jdk/internal/foreign/abi/x64/windows const #469 = Utf8 "jdk/internal/foreign/layout"; const #470 = Package #469; // jdk/internal/foreign/layout const #471 = Utf8 "jdk/internal/icu/impl"; const #472 = Package #471; // jdk/internal/icu/impl const #473 = Utf8 "jdk/internal/icu/impl/data/icudt72b"; const #474 = Package #473; // jdk/internal/icu/impl/data/icudt72b const #475 = Utf8 "jdk/internal/icu/lang"; const #476 = Package #475; // jdk/internal/icu/lang const #477 = Utf8 "jdk/internal/icu/text"; const #478 = Package #477; // jdk/internal/icu/text const #479 = Utf8 "jdk/internal/icu/util"; const #480 = Package #479; // jdk/internal/icu/util const #481 = Utf8 "jdk/internal/jrtfs"; const #482 = Package #481; // jdk/internal/jrtfs const #483 = Utf8 "jdk/internal/math"; const #484 = Package #483; // jdk/internal/math const #485 = Utf8 "jdk/internal/org/objectweb/asm/signature"; const #486 = Package #485; // jdk/internal/org/objectweb/asm/signature const #487 = Utf8 "jdk/internal/org/objectweb/asm/tree/analysis"; const #488 = Package #487; // jdk/internal/org/objectweb/asm/tree/analysis const #489 = Utf8 "jdk/internal/util/regex"; const #490 = Package #489; // jdk/internal/util/regex const #491 = Utf8 "sun/invoke"; const #492 = Package #491; // sun/invoke const #493 = Utf8 "sun/invoke/empty"; const #494 = Package #493; // sun/invoke/empty const #495 = Utf8 "sun/launcher"; const #496 = Package #495; // sun/launcher const #497 = Utf8 "sun/launcher/resources"; const #498 = Package #497; // sun/launcher/resources const #499 = Utf8 "sun/net/ftp"; const #500 = Package #499; // sun/net/ftp const #501 = Utf8 "sun/net/ftp/impl"; const #502 = Package #501; // sun/net/ftp/impl const #503 = Utf8 "sun/net/idn"; const #504 = Package #503; // sun/net/idn const #505 = Utf8 "sun/net/sdp"; const #506 = Package #505; // sun/net/sdp const #507 = Utf8 "sun/net/smtp"; const #508 = Package #507; // sun/net/smtp const #509 = Utf8 "sun/net/spi"; const #510 = Package #509; // sun/net/spi const #511 = Utf8 "sun/net/www/content/text"; const #512 = Package #511; // sun/net/www/content/text const #513 = Utf8 "sun/net/www/http"; const #514 = Package #513; // sun/net/www/http const #515 = Utf8 "sun/net/www/protocol/file"; const #516 = Package #515; // sun/net/www/protocol/file const #517 = Utf8 "sun/net/www/protocol/ftp"; const #518 = Package #517; // sun/net/www/protocol/ftp const #519 = Utf8 "sun/net/www/protocol/http/ntlm"; const #520 = Package #519; // sun/net/www/protocol/http/ntlm const #521 = Utf8 "sun/net/www/protocol/https"; const #522 = Package #521; // sun/net/www/protocol/https const #523 = Utf8 "sun/net/www/protocol/jar"; const #524 = Package #523; // sun/net/www/protocol/jar const #525 = Utf8 "sun/net/www/protocol/jmod"; const #526 = Package #525; // sun/net/www/protocol/jmod const #527 = Utf8 "sun/net/www/protocol/jrt"; const #528 = Package #527; // sun/net/www/protocol/jrt const #529 = Utf8 "sun/net/www/protocol/mailto"; const #530 = Package #529; // sun/net/www/protocol/mailto const #531 = Utf8 "sun/nio"; const #532 = Package #531; // sun/nio const #533 = Utf8 "sun/reflect/generics/factory"; const #534 = Package #533; // sun/reflect/generics/factory const #535 = Utf8 "sun/reflect/generics/parser"; const #536 = Package #535; // sun/reflect/generics/parser const #537 = Utf8 "sun/reflect/generics/repository"; const #538 = Package #537; // sun/reflect/generics/repository const #539 = Utf8 "sun/reflect/generics/scope"; const #540 = Package #539; // sun/reflect/generics/scope const #541 = Utf8 "sun/reflect/generics/tree"; const #542 = Package #541; // sun/reflect/generics/tree const #543 = Utf8 "sun/reflect/generics/visitor"; const #544 = Package #543; // sun/reflect/generics/visitor const #545 = Utf8 "sun/security/pkcs10"; const #546 = Package #545; // sun/security/pkcs10 const #547 = Utf8 "sun/security/pkcs12"; const #548 = Package #547; // sun/security/pkcs12 const #549 = Utf8 "sun/security/provider/certpath/ssl"; const #550 = Package #549; // sun/security/provider/certpath/ssl const #551 = Utf8 "sun/security/ssl"; const #552 = Package #551; // sun/security/ssl const #553 = Utf8 "sun/security/tools/keytool"; const #554 = Package #553; // sun/security/tools/keytool const #555 = Utf8 "sun/text"; const #556 = Package #555; // sun/text const #557 = Utf8 "sun/text/resources"; const #558 = Package #557; // sun/text/resources const #559 = Utf8 "sun/text/resources/cldr"; const #560 = Package #559; // sun/text/resources/cldr const #561 = Utf8 "sun/text/spi"; const #562 = Package #561; // sun/text/spi const #563 = Utf8 "sun/util"; const #564 = Package #563; // sun/util const #565 = Utf8 "sun/util/calendar"; const #566 = Package #565; // sun/util/calendar const #567 = Utf8 "sun/util/locale"; const #568 = Package #567; // sun/util/locale const #569 = Utf8 "sun/util/resources/cldr"; const #570 = Package #569; // sun/util/resources/cldr const #571 = Utf8 "sun/util/spi"; const #572 = Package #571; // sun/util/spi exports #88 /* java/util/spi */; exports #104 /* javax/security/auth */; exports #72 /* java/util */; exports #22 /* java/lang/ref */; exports #48 /* java/nio/file/spi */; exports #102 /* javax/net/ssl */; exports #50 /* java/security */; exports #20 /* java/lang/module */; exports #98 /* javax/crypto/spec */; exports #82 /* java/util/jar */; exports #112 /* javax/security/auth/x500 */; exports #68 /* java/time/temporal */; exports #38 /* java/nio/channels/spi */; exports #110 /* javax/security/auth/spi */; exports #60 /* java/text/spi */; exports #54 /* java/security/interfaces */; exports #90 /* java/util/stream */; exports #46 /* java/nio/file/attribute */; exports #24 /* java/lang/reflect */; exports #100 /* javax/net */; exports #94 /* javax/crypto */; exports #96 /* javax/crypto/interfaces */; exports #74 /* java/util/concurrent */; exports #34 /* java/nio */; exports #32 /* java/net/spi */; exports #108 /* javax/security/auth/login */; exports #16 /* java/lang/foreign */; exports #66 /* java/time/format */; exports #40 /* java/nio/charset */; exports #56 /* java/security/spec */; exports #76 /* java/util/concurrent/atomic */; exports #114 /* javax/security/cert */; exports #26 /* java/lang/runtime */; exports #28 /* java/math */; exports #80 /* java/util/function */; exports #62 /* java/time */; exports #78 /* java/util/concurrent/locks */; exports #52 /* java/security/cert */; exports #106 /* javax/security/auth/callback */; exports #44 /* java/nio/file */; exports #18 /* java/lang/invoke */; exports #42 /* java/nio/charset/spi */; exports #70 /* java/time/zone */; exports #12 /* java/lang/annotation */; exports #14 /* java/lang/constant */; exports #84 /* java/util/random */; exports #58 /* java/text */; exports #10 /* java/lang */; exports #30 /* java/net */; exports #92 /* java/util/zip */; exports #86 /* java/util/regex */; exports #8 /* java/io */; exports #36 /* java/nio/channels */; exports #64 /* java/time/chrono */; exports #310 /* sun/security/provider/certpath */ to #140 /* jdk.jartool */, #132 /* java.naming */; exports #326 /* sun/security/util/math/intpoly */ to #294 /* jdk.crypto.ec */; exports #316 /* sun/security/tools */ to #140 /* jdk.jartool */; exports #218 /* jdk/internal/org/objectweb/asm/util */ to #142 /* jdk.jfr */; exports #270 /* sun/net/util */ to #126 /* java.desktop */, #194 /* java.net.http */, #148 /* jdk.sctp */, #272 /* jdk.jconsole */; exports #246 /* jdk/internal/util/random */ to #248 /* jdk.random */; exports #280 /* sun/nio/cs */ to #126 /* java.desktop */, #136 /* jdk.charsets */; exports #282 /* sun/nio/fs */ to #146 /* jdk.net */; exports #328 /* sun/security/validator */ to #140 /* jdk.jartool */; exports #244 /* jdk/internal/util/jar */ to #140 /* jdk.jartool */; exports #156 /* jdk/internal/classfile/constantpool */ to #140 /* jdk.jartool */, #144 /* jdk.jlink */; exports #158 /* jdk/internal/classfile/instruction */ to #144 /* jdk.jlink */, #152 /* jdk.jshell */; exports #220 /* jdk/internal/org/xml/sax */ to #142 /* jdk.jfr */; exports #212 /* jdk/internal/org/objectweb/asm */ to #142 /* jdk.jfr */; exports #296 /* sun/security/internal/interfaces */ to #118 /* jdk.crypto.cryptoki */; exports #338 /* sun/util/logging */ to #126 /* java.desktop */, #128 /* java.logging */, #340 /* java.prefs */; exports #182 /* jdk/internal/jimage/decompressor */ to #144 /* jdk.jlink */; exports #162 /* jdk/internal/foreign */ to #164 /* jdk.incubator.vector */; exports #242 /* jdk/internal/util */ to #126 /* java.desktop */; exports #266 /* sun/net/dns */ to #264 /* jdk.naming.dns */, #196 /* java.security.jgss */; exports #306 /* sun/security/provider */ to #294 /* jdk.crypto.ec */, #134 /* java.rmi */, #196 /* java.security.jgss */, #118 /* jdk.crypto.cryptoki */, #308 /* jdk.security.auth */; exports #334 /* sun/util/locale/provider */ to #126 /* java.desktop */, #336 /* jdk.localedata */, #144 /* jdk.jlink */; exports #300 /* sun/security/jca */ to #294 /* jdk.crypto.ec */, #264 /* jdk.naming.dns */, #302 /* java.smartcardio */, #118 /* jdk.crypto.cryptoki */; exports #214 /* jdk/internal/org/objectweb/asm/commons */ to #142 /* jdk.jfr */; exports #154 /* jdk/internal/classfile/attribute */ to #140 /* jdk.jartool */, #144 /* jdk.jlink */; exports #288 /* sun/reflect/misc */ to #290 /* java.datatransfer */, #126 /* java.desktop */, #238 /* java.sql.rowset */, #134 /* java.rmi */, #208 /* java.management.rmi */, #130 /* java.management */; exports #216 /* jdk/internal/org/objectweb/asm/tree */ to #142 /* jdk.jfr */; exports #252 /* jdk/internal/util/xml/impl */ to #142 /* jdk.jfr */; exports #298 /* sun/security/internal/spec */ to #118 /* jdk.crypto.cryptoki */; exports #232 /* jdk/internal/ref */ to #126 /* java.desktop */, #194 /* java.net.http */; exports #234 /* jdk/internal/reflect */ to #238 /* java.sql.rowset */, #240 /* jdk.dynalink */, #200 /* jdk.internal.vm.ci */, #236 /* java.sql */, #128 /* java.logging */, #204 /* jdk.unsupported */; exports #254 /* jdk/internal/vm */ to #228 /* jdk.management.agent */, #226 /* jdk.internal.jvmstat */, #138 /* jdk.incubator.concurrent */, #178 /* jdk.management */, #130 /* java.management */; exports #184 /* jdk/internal/jmod */ to #174 /* jdk.compiler */, #144 /* jdk.jlink */; exports #206 /* jdk/internal/module */ to #140 /* jdk.jartool */, #142 /* jdk.jfr */, #188 /* java.instrument */, #144 /* jdk.jlink */, #208 /* java.management.rmi */, #210 /* jdk.jpackage */; exports #120 /* com/sun/security/ntlm */ to #122 /* java.security.sasl */; exports #314 /* sun/security/timestamp */ to #140 /* jdk.jartool */; exports #304 /* sun/security/pkcs */ to #140 /* jdk.jartool */, #294 /* jdk.crypto.ec */; exports #276 /* sun/net/www/protocol/http */ to #196 /* java.security.jgss */; exports #274 /* sun/net/www */ to #140 /* jdk.jartool */, #194 /* java.net.http */; exports #150 /* jdk/internal/classfile */ to #140 /* jdk.jartool */, #144 /* jdk.jlink */, #152 /* jdk.jshell */; exports #318 /* sun/security/util */ to #122 /* java.security.sasl */, #140 /* jdk.jartool */, #126 /* java.desktop */, #320 /* java.xml.crypto */, #294 /* jdk.crypto.ec */, #134 /* java.rmi */, #196 /* java.security.jgss */, #302 /* java.smartcardio */, #132 /* java.naming */, #118 /* jdk.crypto.cryptoki */, #322 /* jdk.security.jgss */, #308 /* jdk.security.auth */; exports #256 /* jdk/internal/vm/annotation */ to #200 /* jdk.internal.vm.ci */, #142 /* jdk.jfr */, #188 /* java.instrument */, #138 /* jdk.incubator.concurrent */, #164 /* jdk.incubator.vector */, #204 /* jdk.unsupported */; exports #332 /* sun/util/cldr */ to #144 /* jdk.jlink */; exports #278 /* sun/nio/ch */ to #148 /* jdk.sctp */, #146 /* jdk.net */, #130 /* java.management */, #118 /* jdk.crypto.cryptoki */; exports #262 /* sun/net */ to #194 /* java.net.http */, #264 /* jdk.naming.dns */; exports #222 /* jdk/internal/org/xml/sax/helpers */ to #142 /* jdk.jfr */; exports #284 /* sun/reflect/annotation */ to #174 /* jdk.compiler */; exports #190 /* jdk/internal/logger */ to #128 /* java.logging */; exports #312 /* sun/security/rsa */ to #118 /* jdk.crypto.cryptoki */; exports #186 /* jdk/internal/loader */ to #188 /* java.instrument */, #132 /* java.naming */, #128 /* java.logging */; exports #160 /* jdk/internal/event */ to #142 /* jdk.jfr */; exports #124 /* jdk/internal/access */ to #126 /* java.desktop */, #146 /* jdk.net */, #134 /* java.rmi */, #144 /* jdk.jlink */, #132 /* java.naming */, #130 /* java.management */, #140 /* jdk.jartool */, #148 /* jdk.sctp */, #142 /* jdk.jfr */, #138 /* jdk.incubator.concurrent */, #128 /* java.logging */, #136 /* jdk.charsets */, #118 /* jdk.crypto.cryptoki */; exports #170 /* jdk/internal/javac */ to #176 /* jdk.jdi */, #140 /* jdk.jartool */, #174 /* jdk.compiler */, #142 /* jdk.jfr */, #138 /* jdk.incubator.concurrent */, #172 /* java.compiler */, #164 /* jdk.incubator.vector */, #178 /* jdk.management */, #152 /* jdk.jshell */, #130 /* java.management */; exports #230 /* jdk/internal/platform */ to #142 /* jdk.jfr */, #178 /* jdk.management */; exports #192 /* jdk/internal/misc */ to #202 /* jdk.nio.mapmode */, #126 /* java.desktop */, #194 /* java.net.http */, #174 /* jdk.compiler */, #200 /* jdk.internal.vm.ci */, #134 /* java.rmi */, #196 /* java.security.jgss */, #198 /* jdk.attach */, #132 /* java.naming */, #164 /* jdk.incubator.vector */, #152 /* jdk.jshell */, #130 /* java.management */, #142 /* jdk.jfr */, #138 /* jdk.incubator.concurrent */, #128 /* java.logging */, #136 /* jdk.charsets */, #204 /* jdk.unsupported */, #118 /* jdk.crypto.cryptoki */; exports #250 /* jdk/internal/util/xml */ to #142 /* jdk.jfr */; exports #330 /* sun/security/x509 */ to #140 /* jdk.jartool */, #294 /* jdk.crypto.ec */, #118 /* jdk.crypto.cryptoki */; exports #286 /* sun/reflect/generics/reflectiveObjects */ to #126 /* java.desktop */; exports #116 /* com/sun/crypto/provider */ to #118 /* jdk.crypto.cryptoki */; exports #258 /* jdk/internal/vm/vector */ to #164 /* jdk.incubator.vector */; exports #292 /* sun/security/action */ to #126 /* java.desktop */, #294 /* jdk.crypto.ec */, #196 /* java.security.jgss */, #138 /* jdk.incubator.concurrent */; exports #224 /* jdk/internal/perf */ to #228 /* jdk.management.agent */, #226 /* jdk.internal.jvmstat */, #130 /* java.management */; exports #180 /* jdk/internal/jimage */ to #144 /* jdk.jlink */; exports #260 /* sun/invoke/util */ to #174 /* jdk.compiler */; exports #166 /* jdk/internal/io */ to #168 /* jdk.internal.le */, #152 /* jdk.jshell */; exports #268 /* sun/net/ext */ to #146 /* jdk.net */; exports #324 /* sun/security/util/math */ to #294 /* jdk.crypto.ec */; exports #342 /* sun/util/resources */ to #336 /* jdk.localedata */; uses #346 /* java/net/ContentHandlerFactory */; uses #372 /* java/text/spi/DecimalFormatSymbolsProvider */; uses #392 /* java/util/spi/ResourceBundleControlProvider */; uses #410 /* sun/util/resources/LocaleData$CommonResourceBundleProvider */; uses #362 /* java/security/Provider */; uses #396 /* java/util/spi/TimeZoneNameProvider */; uses #344 /* java/lang/System$LoggerFinder */; uses #350 /* java/net/spi/URLStreamHandlerProvider */; uses #414 /* sun/util/spi/CalendarProvider */; uses #364 /* java/text/spi/BreakIteratorProvider */; uses #358 /* java/nio/file/spi/FileSystemProvider */; uses #394 /* java/util/spi/ResourceBundleProvider */; uses #370 /* java/text/spi/DateFormatSymbolsProvider */; uses #400 /* javax/security/auth/spi/LoginModule */; uses #360 /* java/nio/file/spi/FileTypeDetector */; uses #374 /* java/text/spi/NumberFormatProvider */; uses #412 /* sun/util/resources/LocaleData$SupplementaryResourceBundleProvider */; uses #352 /* java/nio/channels/spi/AsynchronousChannelProvider */; uses #402 /* jdk/internal/io/JdkConsoleProvider */; uses #354 /* java/nio/channels/spi/SelectorProvider */; uses #386 /* java/util/spi/CalendarNameProvider */; uses #368 /* java/text/spi/DateFormatProvider */; uses #366 /* java/text/spi/CollatorProvider */; uses #380 /* java/time/zone/ZoneRulesProvider */; uses #408 /* sun/util/locale/provider/LocaleDataMetaInfo */; uses #348 /* java/net/spi/InetAddressResolverProvider */; uses #376 /* java/time/chrono/AbstractChronology */; uses #390 /* java/util/spi/LocaleNameProvider */; uses #398 /* java/util/spi/ToolProvider */; uses #406 /* sun/text/spi/JavaTimeDateTimePatternProvider */; uses #378 /* java/time/chrono/Chronology */; uses #388 /* java/util/spi/CurrencyNameProvider */; uses #404 /* jdk/internal/logger/DefaultLoggerFinder */; uses #382 /* java/util/random/RandomGenerator */; uses #384 /* java/util/spi/CalendarDataProvider */; uses #356 /* java/nio/charset/spi/CharsetProvider */; provides #358 /* java/nio/file/spi/FileSystemProvider */ with #416 /* jdk/internal/jrtfs/JrtFileSystemProvider */; provides #382 /* java/util/random/RandomGenerator */ with #418 /* java/security/SecureRandom */, #422 /* java/util/SplittableRandom */, #420 /* java/util/Random */; } // end of module java.base module-info.class.jasm000066400000000000000000000261501514323636100332230ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903031/* * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ // Partial ConstantPool module #6 /* java.base */ version 65:0 { const #1 = class #2; // module-info const #2 = Utf8 "module-info"; const #3 = Utf8 "SourceFile"; const #4 = Utf8 "module-info.java"; const #5 = Utf8 "Module"; const #6 = Module #7; // java.base const #7 = Utf8 "java.base"; exports java/util/spi; exports javax/security/auth; exports java/util; exports java/lang/ref; exports java/nio/file/spi; exports javax/net/ssl; exports java/security; exports java/lang/module; exports javax/crypto/spec; exports java/util/jar; exports javax/security/auth/x500; exports java/time/temporal; exports java/nio/channels/spi; exports javax/security/auth/spi; exports java/text/spi; exports java/security/interfaces; exports java/util/stream; exports java/nio/file/attribute; exports java/lang/reflect; exports javax/net; exports javax/crypto; exports javax/crypto/interfaces; exports java/util/concurrent; exports java/nio; exports java/net/spi; exports javax/security/auth/login; exports java/lang/foreign; exports java/time/format; exports java/nio/charset; exports java/security/spec; exports java/util/concurrent/atomic; exports javax/security/cert; exports java/lang/runtime; exports java/math; exports java/util/function; exports java/time; exports java/util/concurrent/locks; exports java/security/cert; exports javax/security/auth/callback; exports java/nio/file; exports java/lang/invoke; exports java/nio/charset/spi; exports java/time/zone; exports java/lang/annotation; exports java/lang/constant; exports java/util/random; exports java/text; exports java/lang; exports java/net; exports java/util/zip; exports java/util/regex; exports java/io; exports java/nio/channels; exports java/time/chrono; exports sun/security/provider/certpath to jdk.jartool, java.naming; exports sun/security/util/math/intpoly to jdk.crypto.ec; exports sun/security/tools to jdk.jartool; exports jdk/internal/org/objectweb/asm/util to jdk.jfr; exports sun/net/util to java.desktop, java.net.http, jdk.sctp, jdk.jconsole; exports jdk/internal/util/random to jdk.random; exports sun/nio/cs to java.desktop, jdk.charsets; exports sun/nio/fs to jdk.net; exports sun/security/validator to jdk.jartool; exports jdk/internal/util/jar to jdk.jartool; exports jdk/internal/classfile/constantpool to jdk.jartool, jdk.jlink; exports jdk/internal/classfile/instruction to jdk.jlink, jdk.jshell; exports jdk/internal/org/xml/sax to jdk.jfr; exports jdk/internal/org/objectweb/asm to jdk.jfr; exports sun/security/internal/interfaces to jdk.crypto.cryptoki; exports sun/util/logging to java.desktop, java.logging, java.prefs; exports jdk/internal/jimage/decompressor to jdk.jlink; exports jdk/internal/foreign to jdk.incubator.vector; exports jdk/internal/util to java.desktop; exports sun/net/dns to jdk.naming.dns, java.security.jgss; exports sun/security/provider to jdk.crypto.ec, java.rmi, java.security.jgss, jdk.crypto.cryptoki, jdk.security.auth; exports sun/util/locale/provider to java.desktop, jdk.localedata, jdk.jlink; exports sun/security/jca to jdk.crypto.ec, jdk.naming.dns, java.smartcardio, jdk.crypto.cryptoki; exports jdk/internal/org/objectweb/asm/commons to jdk.jfr; exports jdk/internal/classfile/attribute to jdk.jartool, jdk.jlink; exports sun/reflect/misc to java.datatransfer, java.desktop, java.sql.rowset, java.rmi, java.management.rmi, java.management; exports jdk/internal/org/objectweb/asm/tree to jdk.jfr; exports jdk/internal/util/xml/impl to jdk.jfr; exports sun/security/internal/spec to jdk.crypto.cryptoki; exports jdk/internal/ref to java.desktop, java.net.http; exports jdk/internal/reflect to java.sql.rowset, jdk.dynalink, jdk.internal.vm.ci, java.sql, java.logging, jdk.unsupported; exports jdk/internal/vm to jdk.management.agent, jdk.internal.jvmstat, jdk.incubator.concurrent, jdk.management, java.management; exports jdk/internal/jmod to jdk.compiler, jdk.jlink; exports jdk/internal/module to jdk.jartool, jdk.jfr, java.instrument, jdk.jlink, java.management.rmi, jdk.jpackage; exports com/sun/security/ntlm to java.security.sasl; exports sun/security/timestamp to jdk.jartool; exports sun/security/pkcs to jdk.jartool, jdk.crypto.ec; exports sun/net/www/protocol/http to java.security.jgss; exports sun/net/www to jdk.jartool, java.net.http; exports jdk/internal/classfile to jdk.jartool, jdk.jlink, jdk.jshell; exports sun/security/util to java.security.sasl, jdk.jartool, java.desktop, java.xml.crypto, jdk.crypto.ec, java.rmi, java.security.jgss, java.smartcardio, java.naming, jdk.crypto.cryptoki, jdk.security.jgss, jdk.security.auth; exports jdk/internal/vm/annotation to jdk.internal.vm.ci, jdk.jfr, java.instrument, jdk.incubator.concurrent, jdk.incubator.vector, jdk.unsupported; exports sun/util/cldr to jdk.jlink; exports sun/nio/ch to jdk.sctp, jdk.net, java.management, jdk.crypto.cryptoki; exports sun/net to java.net.http, jdk.naming.dns; exports jdk/internal/org/xml/sax/helpers to jdk.jfr; exports sun/reflect/annotation to jdk.compiler; exports jdk/internal/logger to java.logging; exports sun/security/rsa to jdk.crypto.cryptoki; exports jdk/internal/loader to java.instrument, java.naming, java.logging; exports jdk/internal/event to jdk.jfr; exports jdk/internal/access to java.desktop, jdk.net, java.rmi, jdk.jlink, java.naming, java.management, jdk.jartool, jdk.sctp, jdk.jfr, jdk.incubator.concurrent, java.logging, jdk.charsets, jdk.crypto.cryptoki; exports jdk/internal/javac to jdk.jdi, jdk.jartool, jdk.compiler, jdk.jfr, jdk.incubator.concurrent, java.compiler, jdk.incubator.vector, jdk.management, jdk.jshell, java.management; exports jdk/internal/platform to jdk.jfr, jdk.management; exports jdk/internal/misc to jdk.nio.mapmode, java.desktop, java.net.http, jdk.compiler, jdk.internal.vm.ci, java.rmi, java.security.jgss, jdk.attach, java.naming, jdk.incubator.vector, jdk.jshell, java.management, jdk.jfr, jdk.incubator.concurrent, java.logging, jdk.charsets, jdk.unsupported, jdk.crypto.cryptoki; exports jdk/internal/util/xml to jdk.jfr; exports sun/security/x509 to jdk.jartool, jdk.crypto.ec, jdk.crypto.cryptoki; exports sun/reflect/generics/reflectiveObjects to java.desktop; exports com/sun/crypto/provider to jdk.crypto.cryptoki; exports jdk/internal/vm/vector to jdk.incubator.vector; exports sun/security/action to java.desktop, jdk.crypto.ec, java.security.jgss, jdk.incubator.concurrent; exports jdk/internal/perf to jdk.management.agent, jdk.internal.jvmstat, java.management; exports jdk/internal/jimage to jdk.jlink; exports sun/invoke/util to jdk.compiler; exports jdk/internal/io to jdk.internal.le, jdk.jshell; exports sun/net/ext to jdk.net; exports sun/security/util/math to jdk.crypto.ec; exports sun/util/resources to jdk.localedata; uses java/net/ContentHandlerFactory; uses java/text/spi/DecimalFormatSymbolsProvider; uses java/util/spi/ResourceBundleControlProvider; uses sun/util/resources/LocaleData$CommonResourceBundleProvider; uses java/security/Provider; uses java/util/spi/TimeZoneNameProvider; uses java/lang/System$LoggerFinder; uses java/net/spi/URLStreamHandlerProvider; uses sun/util/spi/CalendarProvider; uses java/text/spi/BreakIteratorProvider; uses java/nio/file/spi/FileSystemProvider; uses java/util/spi/ResourceBundleProvider; uses java/text/spi/DateFormatSymbolsProvider; uses javax/security/auth/spi/LoginModule; uses java/nio/file/spi/FileTypeDetector; uses java/text/spi/NumberFormatProvider; uses sun/util/resources/LocaleData$SupplementaryResourceBundleProvider; uses java/nio/channels/spi/AsynchronousChannelProvider; uses jdk/internal/io/JdkConsoleProvider; uses java/nio/channels/spi/SelectorProvider; uses java/util/spi/CalendarNameProvider; uses java/text/spi/DateFormatProvider; uses java/text/spi/CollatorProvider; uses java/time/zone/ZoneRulesProvider; uses sun/util/locale/provider/LocaleDataMetaInfo; uses java/net/spi/InetAddressResolverProvider; uses java/time/chrono/AbstractChronology; uses java/util/spi/LocaleNameProvider; uses java/util/spi/ToolProvider; uses sun/text/spi/JavaTimeDateTimePatternProvider; uses java/time/chrono/Chronology; uses java/util/spi/CurrencyNameProvider; uses jdk/internal/logger/DefaultLoggerFinder; uses java/util/random/RandomGenerator; uses java/util/spi/CalendarDataProvider; uses java/nio/charset/spi/CharsetProvider; provides java/nio/file/spi/FileSystemProvider with jdk/internal/jrtfs/JrtFileSystemProvider; provides java/util/random/RandomGenerator with java/security/SecureRandom, java/util/SplittableRandom, java/util/Random; } // end of module java.base jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903405/000077500000000000000000000000001514323636100271055ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903405/ifge_overflow.jasm000066400000000000000000005305121514323636100326240ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ super public class ifge_overflow { public Method "":"()V" stack 2 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } public static Method test_1:"()V" stack 200 locals 200 { iconst_0; ifge SKIP; nop; // remove and everything is fine nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; SKIP: return; } public static Method main:"([Ljava/lang/String;)V" stack 100 locals 100 { invokestatic Method test_1:"()V"; return; } } // class ifge_overflow jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903558/000077500000000000000000000000001514323636100271165ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903558/JasmFile01.g.jasm000066400000000000000000000023711514323636100320550ustar00rootroot00000000000000public super class FileName01.class version 66:0 { const #1 = Method #2.#3; // java/lang/Object."":"()V" const #2 = class #4; // java/lang/Object const #3 = NameAndType #5:#6; // "":"()V" const #4 = Utf8 "java/lang/Object"; const #5 = Utf8 ""; const #6 = Utf8 "()V"; const #7 = class #10; // ClassName const #8 = Utf8 "java/lang/String"; const #9 = class #8; // java/lang/String const #10 = Utf8 "ClassName01"; const #11 = Utf8 "Code"; const #12 = Utf8 "LineNumberTable"; const #13 = Utf8 "m"; const #14 = Utf8 "JasmFile.g.jasm"; const #15 = Utf8 "SourceFile"; this_class: #7; // ClassName01 super_class #9; // java/lang/String public Method #5:#6 // "":"()V" stack 1 locals 1 { 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: return; } private static Method #13:#6 // m:"()V" stack 0 locals 0 { 0: return; } SourceFile #14; // JasmFile01.g.jasm } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903558/JasmFile01.jasm000066400000000000000000000007171514323636100316320ustar00rootroot00000000000000public super class FileName01.class version 66:0 { this_class ClassName01; super_class java/lang/String; public Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } private static Method m:"()V" stack 0 locals 0 { return; } SourceFile "JasmFile.g.jasm"; } // end Class ClassName01 compiled from "JasmFile.g.jasm" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903558/JasmFile02.g.jasm000066400000000000000000000023461514323636100320600ustar00rootroot00000000000000public super class FileName02.data version 66:0 { const #1 = Method #2.#3; // java/lang/Object."":"()V" const #2 = class #4; // java/lang/Object const #3 = NameAndType #5:#6; // "":"()V" const #4 = Utf8 "java/lang/Object"; const #5 = Utf8 ""; const #6 = Utf8 "()V"; const #7 = class #10; // ClassName is not used const #8 = Utf8 "java/lang/String"; const #9 = class #8; // java/lang/String const #10 = Utf8 "ClassName"; const #11 = Utf8 "Code"; const #12 = Utf8 "LineNumberTable"; const #13 = Utf8 "m"; const #14 = Utf8 "JasmFile.g.jasm"; const #15 = Utf8 "SourceFile"; this_class: ClassName02; super_class #9; // java/lang/String public Method #5:#6 // "":"()V" stack 1 locals 1 { 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: return; } private static Method #13:#6 // m:"()V" stack 0 locals 0 { 0: return; } SourceFile #14; // JasmFile02.g.jasm } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903558/JasmFile02.jasm000066400000000000000000000007471514323636100316360ustar00rootroot00000000000000public super class FileName02.data extends java/lang/String version 66:0 { this_class ClassName02; super_class java/lang/String; public Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } private static Method m:"()V" stack 0 locals 0 { return; } SourceFile "JasmFile.g.jasm"; } // end Class ClassName01 compiled from "JasmFile.g.jasm" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903558/JasmFile03.g.jasm000066400000000000000000000024471514323636100320630ustar00rootroot00000000000000public super class FileName03 extends package/ClassName version 66:0 { const #1 = Method #2.#3; // java/lang/Object."":"()V" const #2 = class #4; // java/lang/Object const #3 = NameAndType #5:#6; // "":"()V" const #4 = Utf8 "java/lang/Object"; const #5 = Utf8 ""; const #6 = Utf8 "()V"; const #7 = class #10; // ClassName03 const #8 = Utf8 "package/SuperClassName03"; const #9 = class #8; // package/SuperClassName03 const #10 = Utf8 "ClassName03"; const #11 = Utf8 "Code"; const #12 = Utf8 "LineNumberTable"; const #13 = Utf8 "m"; const #14 = Utf8 "JasmFile.g.jasm"; const #15 = Utf8 "SourceFile"; this_class: #7; // ClassName03 super_class #9; // package/SuperClassName03 public Method #5:#6 // "":"()V" stack 1 locals 1 { 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: return; } private static Method #13:#6 // m:"()V" stack 0 locals 0 { 0: return; } SourceFile #14; // JasmFile03.g.jasm } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903558/JasmFile03.jasm000066400000000000000000000007601514323636100316320ustar00rootroot00000000000000public super class FileName03.class extends java/lang/String version 66:0 { this_class ClassName03; super_class package/SuperClassName03; public Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } private static Method m:"()V" stack 0 locals 0 { return; } SourceFile "JasmFile.g.jasm"; } // end Class ClassName01 compiled from "JasmFile.g.jasm" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903558/JasmFile04.g.jasm000066400000000000000000000024111514323636100320530ustar00rootroot00000000000000public super class FileName04.obj extends #2 version 66:0 { const #1 = Method #2.#3; // java/lang/Object."":"()V" const #2 = class #4; // java/lang/Object const #3 = NameAndType #5:#6; // "":"()V" const #4 = Utf8 "java/lang/Object"; const #5 = Utf8 ""; const #6 = Utf8 "()V"; const #7 = class #10; // ClassName03 -- ignored const #8 = Utf8 "package/SuperClassName03"; const #9 = class #8; // package/SuperClassName03 -- ignored const #10 = Utf8 "ClassName03"; const #11 = Utf8 "Code"; const #12 = Utf8 "LineNumberTable"; const #13 = Utf8 "m"; const #14 = Utf8 "JasmFile.g.jasm"; const #15 = Utf8 "SourceFile"; this_class: ClassName04; super_class package/SuperClassName04; public Method #5:#6 // "":"()V" stack 1 locals 1 { 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: return; } private static Method #13:#6 // m:"()V" stack 0 locals 0 { 0: return; } SourceFile #14; // JasmFile03.g.jasm } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903558/JasmFile04.jasm000066400000000000000000000007611514323636100316340ustar00rootroot00000000000000public super class FileName04.obj extends package/SuperClassName04 version 66:0 { this_class: ClassName04; super_class: java/lang/Object; public Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } private static Method m:"()V" stack 0 locals 0 { return; } SourceFile "JasmFile.g.jasm"; } // end Class ClassName04 compiled from "JasmFile.g.jasm" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903976/000077500000000000000000000000001514323636100271225ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903976/Test00.jasm000066400000000000000000000005121514323636100310530ustar00rootroot00000000000000identity class Test00 version 69:0 { Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method m:"(Ljava/lang/String;)Ljava/lang/String;" stack 1 locals 2 { aconst_null; areturn; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903976/Test01.jasm000066400000000000000000000004441514323636100310600ustar00rootroot00000000000000identity class Test00 version 69:0 { Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method m:"" stack 1 locals 2 { aconst_null; areturn; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903976/Test02.jasm000066400000000000000000000005111514323636100310540ustar00rootroot00000000000000identity class Test00 version 69:0 { Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method m:"(Ljava/lang/String)Ljava/lang/String;" stack 1 locals 2 { aconst_null; areturn; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903976/Test03.jasm000066400000000000000000000004471514323636100310650ustar00rootroot00000000000000identity class Test00 version 69:0 { Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method m:"([X" stack 1 locals 2 { aconst_null; areturn; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903976/Test04.jasm000066400000000000000000000004711514323636100310630ustar00rootroot00000000000000identity class Test00 version 69:0 { Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method m:"(X)Ljava/lang/String;" stack 1 locals 2 { aconst_null; areturn; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903976/Test05.jasm000066400000000000000000000005111514323636100310570ustar00rootroot00000000000000identity class Test00 version 69:0 { Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method m:"(Ljava/lang/String)Ljava/lang/String;" stack 1 locals 2 { aconst_null; areturn; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903976/Test06.jasm000066400000000000000000000005111514323636100310600ustar00rootroot00000000000000identity class Test00 version 69:0 { Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method m:"Ljava/lang/String;)Ljava/lang/String;" stack 1 locals 2 { aconst_null; areturn; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903976/Test07.jasm000066400000000000000000000004721514323636100310670ustar00rootroot00000000000000identity class Test00 version 69:0 { Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method m:"([X)Ljava/lang/String;" stack 1 locals 2 { aconst_null; areturn; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903976/Test08.jasm000066400000000000000000000004711514323636100310670ustar00rootroot00000000000000identity class Test00 version 69:0 { Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method m:"([)Ljava/lang/String;" stack 1 locals 2 { aconst_null; areturn; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903976/Test09.jasm000066400000000000000000000005121514323636100310640ustar00rootroot00000000000000identity class Test00 version 69:0 { Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method m:"(Ljava/lang/String[)Ljava/lang/String;" stack 1 locals 2 { aconst_null; areturn; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903976/Test10.jasm000066400000000000000000000004661514323636100310640ustar00rootroot00000000000000identity class Test00 version 69:0 { Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method m:"(Ljava/lang/String" stack 1 locals 2 { aconst_null; areturn; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903987/000077500000000000000000000000001514323636100271245ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/case7903987/Test00.jasm000066400000000000000000000030051514323636100310550ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle, Red Hat and/or theirs affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ identity class Test00 version 69:0 { const #1=true; const #2=192837465; const #3=1l; const #5=2.1f; const #6=2.2d; const #8="Long utf-8"; const #9=false; Field v1:I; Method "":"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; } Method m:"(Ljava/lang/String;)Ljava/lang/String;" stack 1 locals 2 { aconst_null; areturn; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/clfacc00610m10p.jasm000066400000000000000000000011321514323636100305670ustar00rootroot00000000000000/* * Copyright (c) 1996, 2018 Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javasoft/sqe/tests/vm/classfmt/clf/clfacc006/clfacc00610m1; public class clfacc00610m10p { public Method :"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object.:"()V"; iconst_1; anewarray class clfacc00610m10p_; pop; return; } } private class clfacc00610m10p_ { public Method :"()V" stack 1 locals 1 { aload_0; invokespecial Method java/lang/Object.:"()V"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jasm/spinum00101m10p.jasm000066400000000000000000000451051514323636100306720ustar00rootroot00000000000000/* * Ident: @(#)spinum00101m10p.jasm generated from:%Z%%M% %I% %E% * * Copyright (c) 1996, 2018 Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javasoft/sqe/tests/vm/classfmt/lmt/spinum001/spinum00101m1; interface spinum00101m1_0I { } // end interface interface spinum00101m1_1I { } // end interface interface spinum00101m1_2I { } // end interface interface spinum00101m1_3I { } // end interface interface spinum00101m1_4I { } // end interface interface spinum00101m1_5I { } // end interface interface spinum00101m1_6I { } // end interface interface spinum00101m1_7I { } // end interface interface spinum00101m1_8I { } // end interface interface spinum00101m1_9I { } // end interface interface spinum00101m1_10I { } // end interface interface spinum00101m1_11I { } // end interface interface spinum00101m1_12I { } // end interface interface spinum00101m1_13I { } // end interface interface spinum00101m1_14I { } // end interface interface spinum00101m1_15I { } // end interface interface spinum00101m1_16I { } // end interface interface spinum00101m1_17I { } // end interface interface spinum00101m1_18I { } // end interface interface spinum00101m1_19I { } // end interface interface spinum00101m1_20I { } // end interface interface spinum00101m1_21I { } // end interface interface spinum00101m1_22I { } // end interface interface spinum00101m1_23I { } // end interface interface spinum00101m1_24I { } // end interface interface spinum00101m1_25I { } // end interface interface spinum00101m1_26I { } // end interface interface spinum00101m1_27I { } // end interface interface spinum00101m1_28I { } // end interface interface spinum00101m1_29I { } // end interface interface spinum00101m1_30I { } // end interface interface spinum00101m1_31I { } // end interface interface spinum00101m1_32I { } // end interface interface spinum00101m1_33I { } // end interface interface spinum00101m1_34I { } // end interface interface spinum00101m1_35I { } // end interface interface spinum00101m1_36I { } // end interface interface spinum00101m1_37I { } // end interface interface spinum00101m1_38I { } // end interface interface spinum00101m1_39I { } // end interface interface spinum00101m1_40I { } // end interface interface spinum00101m1_41I { } // end interface interface spinum00101m1_42I { } // end interface interface spinum00101m1_43I { } // end interface interface spinum00101m1_44I { } // end interface interface spinum00101m1_45I { } // end interface interface spinum00101m1_46I { } // end interface interface spinum00101m1_47I { } // end interface interface spinum00101m1_48I { } // end interface interface spinum00101m1_49I { } // end interface interface spinum00101m1_50I { } // end interface interface spinum00101m1_51I { } // end interface interface spinum00101m1_52I { } // end interface interface spinum00101m1_53I { } // end interface interface spinum00101m1_54I { } // end interface interface spinum00101m1_55I { } // end interface interface spinum00101m1_56I { } // end interface interface spinum00101m1_57I { } // end interface interface spinum00101m1_58I { } // end interface interface spinum00101m1_59I { } // end interface interface spinum00101m1_60I { } // end interface interface spinum00101m1_61I { } // end interface interface spinum00101m1_62I { } // end interface interface spinum00101m1_63I { } // end interface interface spinum00101m1_64I { } // end interface interface spinum00101m1_65I { } // end interface interface spinum00101m1_66I { } // end interface interface spinum00101m1_67I { } // end interface interface spinum00101m1_68I { } // end interface interface spinum00101m1_69I { } // end interface interface spinum00101m1_70I { } // end interface interface spinum00101m1_71I { } // end interface interface spinum00101m1_72I { } // end interface interface spinum00101m1_73I { } // end interface interface spinum00101m1_74I { } // end interface interface spinum00101m1_75I { } // end interface interface spinum00101m1_76I { } // end interface interface spinum00101m1_77I { } // end interface interface spinum00101m1_78I { } // end interface interface spinum00101m1_79I { } // end interface interface spinum00101m1_80I { } // end interface interface spinum00101m1_81I { } // end interface interface spinum00101m1_82I { } // end interface interface spinum00101m1_83I { } // end interface interface spinum00101m1_84I { } // end interface interface spinum00101m1_85I { } // end interface interface spinum00101m1_86I { } // end interface interface spinum00101m1_87I { } // end interface interface spinum00101m1_88I { } // end interface interface spinum00101m1_89I { } // end interface interface spinum00101m1_90I { } // end interface interface spinum00101m1_91I { } // end interface interface spinum00101m1_92I { } // end interface interface spinum00101m1_93I { } // end interface interface spinum00101m1_94I { } // end interface interface spinum00101m1_95I { } // end interface interface spinum00101m1_96I { } // end interface interface spinum00101m1_97I { } // end interface interface spinum00101m1_98I { } // end interface interface spinum00101m1_99I { } // end interface interface spinum00101m1_100I { } // end interface interface spinum00101m1_101I { } // end interface interface spinum00101m1_102I { } // end interface interface spinum00101m1_103I { } // end interface interface spinum00101m1_104I { } // end interface interface spinum00101m1_105I { } // end interface interface spinum00101m1_106I { } // end interface interface spinum00101m1_107I { } // end interface interface spinum00101m1_108I { } // end interface interface spinum00101m1_109I { } // end interface interface spinum00101m1_110I { } // end interface interface spinum00101m1_111I { } // end interface interface spinum00101m1_112I { } // end interface interface spinum00101m1_113I { } // end interface interface spinum00101m1_114I { } // end interface interface spinum00101m1_115I { } // end interface interface spinum00101m1_116I { } // end interface interface spinum00101m1_117I { } // end interface interface spinum00101m1_118I { } // end interface interface spinum00101m1_119I { } // end interface interface spinum00101m1_120I { } // end interface interface spinum00101m1_121I { } // end interface interface spinum00101m1_122I { } // end interface interface spinum00101m1_123I { } // end interface interface spinum00101m1_124I { } // end interface interface spinum00101m1_125I { } // end interface interface spinum00101m1_126I { } // end interface interface spinum00101m1_127I { } // end interface interface spinum00101m1_128I { } // end interface interface spinum00101m1_129I { } // end interface interface spinum00101m1_130I { } // end interface interface spinum00101m1_131I { } // end interface interface spinum00101m1_132I { } // end interface interface spinum00101m1_133I { } // end interface interface spinum00101m1_134I { } // end interface interface spinum00101m1_135I { } // end interface interface spinum00101m1_136I { } // end interface interface spinum00101m1_137I { } // end interface interface spinum00101m1_138I { } // end interface interface spinum00101m1_139I { } // end interface interface spinum00101m1_140I { } // end interface interface spinum00101m1_141I { } // end interface interface spinum00101m1_142I { } // end interface interface spinum00101m1_143I { } // end interface interface spinum00101m1_144I { } // end interface interface spinum00101m1_145I { } // end interface interface spinum00101m1_146I { } // end interface interface spinum00101m1_147I { } // end interface interface spinum00101m1_148I { } // end interface interface spinum00101m1_149I { } // end interface interface spinum00101m1_150I { } // end interface interface spinum00101m1_151I { } // end interface interface spinum00101m1_152I { } // end interface interface spinum00101m1_153I { } // end interface interface spinum00101m1_154I { } // end interface interface spinum00101m1_155I { } // end interface interface spinum00101m1_156I { } // end interface interface spinum00101m1_157I { } // end interface interface spinum00101m1_158I { } // end interface interface spinum00101m1_159I { } // end interface interface spinum00101m1_160I { } // end interface interface spinum00101m1_161I { } // end interface interface spinum00101m1_162I { } // end interface interface spinum00101m1_163I { } // end interface interface spinum00101m1_164I { } // end interface interface spinum00101m1_165I { } // end interface interface spinum00101m1_166I { } // end interface interface spinum00101m1_167I { } // end interface interface spinum00101m1_168I { } // end interface interface spinum00101m1_169I { } // end interface interface spinum00101m1_170I { } // end interface interface spinum00101m1_171I { } // end interface interface spinum00101m1_172I { } // end interface interface spinum00101m1_173I { } // end interface interface spinum00101m1_174I { } // end interface interface spinum00101m1_175I { } // end interface interface spinum00101m1_176I { } // end interface interface spinum00101m1_177I { } // end interface interface spinum00101m1_178I { } // end interface interface spinum00101m1_179I { } // end interface interface spinum00101m1_180I { } // end interface interface spinum00101m1_181I { } // end interface interface spinum00101m1_182I { } // end interface interface spinum00101m1_183I { } // end interface interface spinum00101m1_184I { } // end interface interface spinum00101m1_185I { } // end interface interface spinum00101m1_186I { } // end interface interface spinum00101m1_187I { } // end interface interface spinum00101m1_188I { } // end interface interface spinum00101m1_189I { } // end interface interface spinum00101m1_190I { } // end interface interface spinum00101m1_191I { } // end interface interface spinum00101m1_192I { } // end interface interface spinum00101m1_193I { } // end interface interface spinum00101m1_194I { } // end interface interface spinum00101m1_195I { } // end interface interface spinum00101m1_196I { } // end interface interface spinum00101m1_197I { } // end interface interface spinum00101m1_198I { } // end interface interface spinum00101m1_199I { } // end interface interface spinum00101m1_200I { } // end interface interface spinum00101m1_201I { } // end interface interface spinum00101m1_202I { } // end interface interface spinum00101m1_203I { } // end interface interface spinum00101m1_204I { } // end interface interface spinum00101m1_205I { } // end interface interface spinum00101m1_206I { } // end interface interface spinum00101m1_207I { } // end interface interface spinum00101m1_208I { } // end interface interface spinum00101m1_209I { } // end interface interface spinum00101m1_210I { } // end interface interface spinum00101m1_211I { } // end interface interface spinum00101m1_212I { } // end interface interface spinum00101m1_213I { } // end interface interface spinum00101m1_214I { } // end interface interface spinum00101m1_215I { } // end interface interface spinum00101m1_216I { } // end interface interface spinum00101m1_217I { } // end interface interface spinum00101m1_218I { } // end interface interface spinum00101m1_219I { } // end interface interface spinum00101m1_220I { } // end interface interface spinum00101m1_221I { } // end interface interface spinum00101m1_222I { } // end interface interface spinum00101m1_223I { } // end interface interface spinum00101m1_224I { } // end interface interface spinum00101m1_225I { } // end interface interface spinum00101m1_226I { } // end interface interface spinum00101m1_227I { } // end interface interface spinum00101m1_228I { } // end interface interface spinum00101m1_229I { } // end interface interface spinum00101m1_230I { } // end interface interface spinum00101m1_231I { } // end interface interface spinum00101m1_232I { } // end interface interface spinum00101m1_233I { } // end interface interface spinum00101m1_234I { } // end interface interface spinum00101m1_235I { } // end interface interface spinum00101m1_236I { } // end interface interface spinum00101m1_237I { } // end interface interface spinum00101m1_238I { } // end interface interface spinum00101m1_239I { } // end interface interface spinum00101m1_240I { } // end interface interface spinum00101m1_241I { } // end interface interface spinum00101m1_242I { } // end interface interface spinum00101m1_243I { } // end interface interface spinum00101m1_244I { } // end interface interface spinum00101m1_245I { } // end interface interface spinum00101m1_246I { } // end interface interface spinum00101m1_247I { } // end interface interface spinum00101m1_248I { } // end interface interface spinum00101m1_249I { } // end interface interface spinum00101m1_250I { } // end interface interface spinum00101m1_251I { } // end interface interface spinum00101m1_252I { } // end interface interface spinum00101m1_253I { } // end interface interface spinum00101m1_254I { } // end interface interface spinum00101m1_255I { } // end interface interface spinum00101m1_256I { } // end interface public class spinum00101m10p implements spinum00101m1_0I, spinum00101m1_1I, spinum00101m1_2I, spinum00101m1_3I, spinum00101m1_4I, spinum00101m1_5I, spinum00101m1_6I, spinum00101m1_7I, spinum00101m1_8I, spinum00101m1_9I, spinum00101m1_10I, spinum00101m1_11I, spinum00101m1_12I, spinum00101m1_13I, spinum00101m1_14I, spinum00101m1_15I, spinum00101m1_16I, spinum00101m1_17I, spinum00101m1_18I, spinum00101m1_19I, spinum00101m1_20I, spinum00101m1_21I, spinum00101m1_22I, spinum00101m1_23I, spinum00101m1_24I, spinum00101m1_25I, spinum00101m1_26I, spinum00101m1_27I, spinum00101m1_28I, spinum00101m1_29I, spinum00101m1_30I, spinum00101m1_31I, spinum00101m1_32I, spinum00101m1_33I, spinum00101m1_34I, spinum00101m1_35I, spinum00101m1_36I, spinum00101m1_37I, spinum00101m1_38I, spinum00101m1_39I, spinum00101m1_40I, spinum00101m1_41I, spinum00101m1_42I, spinum00101m1_43I, spinum00101m1_44I, spinum00101m1_45I, spinum00101m1_46I, spinum00101m1_47I, spinum00101m1_48I, spinum00101m1_49I, spinum00101m1_50I, spinum00101m1_51I, spinum00101m1_52I, spinum00101m1_53I, spinum00101m1_54I, spinum00101m1_55I, spinum00101m1_56I, spinum00101m1_57I, spinum00101m1_58I, spinum00101m1_59I, spinum00101m1_60I, spinum00101m1_61I, spinum00101m1_62I, spinum00101m1_63I, spinum00101m1_64I, spinum00101m1_65I, spinum00101m1_66I, spinum00101m1_67I, spinum00101m1_68I, spinum00101m1_69I, spinum00101m1_70I, spinum00101m1_71I, spinum00101m1_72I, spinum00101m1_73I, spinum00101m1_74I, spinum00101m1_75I, spinum00101m1_76I, spinum00101m1_77I, spinum00101m1_78I, spinum00101m1_79I, spinum00101m1_80I, spinum00101m1_81I, spinum00101m1_82I, spinum00101m1_83I, spinum00101m1_84I, spinum00101m1_85I, spinum00101m1_86I, spinum00101m1_87I, spinum00101m1_88I, spinum00101m1_89I, spinum00101m1_90I, spinum00101m1_91I, spinum00101m1_92I, spinum00101m1_93I, spinum00101m1_94I, spinum00101m1_95I, spinum00101m1_96I, spinum00101m1_97I, spinum00101m1_98I, spinum00101m1_99I, spinum00101m1_100I, spinum00101m1_101I, spinum00101m1_102I, spinum00101m1_103I, spinum00101m1_104I, spinum00101m1_105I, spinum00101m1_106I, spinum00101m1_107I, spinum00101m1_108I, spinum00101m1_109I, spinum00101m1_110I, spinum00101m1_111I, spinum00101m1_112I, spinum00101m1_113I, spinum00101m1_114I, spinum00101m1_115I, spinum00101m1_116I, spinum00101m1_117I, spinum00101m1_118I, spinum00101m1_119I, spinum00101m1_120I, spinum00101m1_121I, spinum00101m1_122I, spinum00101m1_123I, spinum00101m1_124I, spinum00101m1_125I, spinum00101m1_126I, spinum00101m1_127I, spinum00101m1_128I, spinum00101m1_129I, spinum00101m1_130I, spinum00101m1_131I, spinum00101m1_132I, spinum00101m1_133I, spinum00101m1_134I, spinum00101m1_135I, spinum00101m1_136I, spinum00101m1_137I, spinum00101m1_138I, spinum00101m1_139I, spinum00101m1_140I, spinum00101m1_141I, spinum00101m1_142I, spinum00101m1_143I, spinum00101m1_144I, spinum00101m1_145I, spinum00101m1_146I, spinum00101m1_147I, spinum00101m1_148I, spinum00101m1_149I, spinum00101m1_150I, spinum00101m1_151I, spinum00101m1_152I, spinum00101m1_153I, spinum00101m1_154I, spinum00101m1_155I, spinum00101m1_156I, spinum00101m1_157I, spinum00101m1_158I, spinum00101m1_159I, spinum00101m1_160I, spinum00101m1_161I, spinum00101m1_162I, spinum00101m1_163I, spinum00101m1_164I, spinum00101m1_165I, spinum00101m1_166I, spinum00101m1_167I, spinum00101m1_168I, spinum00101m1_169I, spinum00101m1_170I, spinum00101m1_171I, spinum00101m1_172I, spinum00101m1_173I, spinum00101m1_174I, spinum00101m1_175I, spinum00101m1_176I, spinum00101m1_177I, spinum00101m1_178I, spinum00101m1_179I, spinum00101m1_180I, spinum00101m1_181I, spinum00101m1_182I, spinum00101m1_183I, spinum00101m1_184I, spinum00101m1_185I, spinum00101m1_186I, spinum00101m1_187I, spinum00101m1_188I, spinum00101m1_189I, spinum00101m1_190I, spinum00101m1_191I, spinum00101m1_192I, spinum00101m1_193I, spinum00101m1_194I, spinum00101m1_195I, spinum00101m1_196I, spinum00101m1_197I, spinum00101m1_198I, spinum00101m1_199I, spinum00101m1_200I, spinum00101m1_201I, spinum00101m1_202I, spinum00101m1_203I, spinum00101m1_204I, spinum00101m1_205I, spinum00101m1_206I, spinum00101m1_207I, spinum00101m1_208I, spinum00101m1_209I, spinum00101m1_210I, spinum00101m1_211I, spinum00101m1_212I, spinum00101m1_213I, spinum00101m1_214I, spinum00101m1_215I, spinum00101m1_216I, spinum00101m1_217I, spinum00101m1_218I, spinum00101m1_219I, spinum00101m1_220I, spinum00101m1_221I, spinum00101m1_222I, spinum00101m1_223I, spinum00101m1_224I, spinum00101m1_225I, spinum00101m1_226I, spinum00101m1_227I, spinum00101m1_228I, spinum00101m1_229I, spinum00101m1_230I, spinum00101m1_231I, spinum00101m1_232I, spinum00101m1_233I, spinum00101m1_234I, spinum00101m1_235I, spinum00101m1_236I, spinum00101m1_237I, spinum00101m1_238I, spinum00101m1_239I, spinum00101m1_240I, spinum00101m1_241I, spinum00101m1_242I, spinum00101m1_243I, spinum00101m1_244I, spinum00101m1_245I, spinum00101m1_246I, spinum00101m1_247I, spinum00101m1_248I, spinum00101m1_249I, spinum00101m1_250I, spinum00101m1_251I, spinum00101m1_252I, spinum00101m1_253I, spinum00101m1_254I, spinum00101m1_255I, spinum00101m1_256I { public Method :"()V" stack 1 { aload_0; invokespecial java/lang/Object.:"()V"; return; } } // end Class spinum00101m10p jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jcoder/000077500000000000000000000000001514323636100257325ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jcoder/12.jcod000066400000000000000000000105621514323636100270210ustar00rootroot00000000000000class IntAndClass$IntAndClassImp { 0xCAFEBABE; 0; // minor version 55; // version [] { // Constant Pool ; // first element is empty Method #3 #12; // #1 class #13; // #2 class #16; // #3 class #17; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 Utf8 "Code"; // #7 Utf8 "LineNumberTable"; // #8 Utf8 "SourceFile"; // #9 Utf8 "IntAndClass.java"; // #10 Utf8 "NestHost"; // #11 NameAndType #5 #6; // #12 Utf8 "IntAndClass$IntAndClassImp"; // #13 Utf8 "IntAndClassImp"; // #14 Utf8 "InnerClasses"; // #15 Utf8 "java/lang/Object"; // #16 Utf8 "IntAndClass"; // #17 } 0x0021; // access #2; // this_cpx #3; // super_cpx [] { // Interfaces #4; } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#7) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2AB70001B1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#8) { // LineNumberTable [] { // line_number_table 0 3; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#9) { // SourceFile #10; } // end of SourceFile ; Attr(#11) { // NestHost #4; } // end of NestHost ; Attr(#15) { // InnerClasses [] { // classes #2 #4 #14 9; } } // end of InnerClasses } // end of Attributes } class IntAndClass { 0xCAFEBABE; 0; // minor version 55; // version [] { // Constant Pool ; // first element is empty class #9; // #1 class #10; // #2 class #11; // #3 Utf8 "IntAndClassImp"; // #4 Utf8 "InnerClasses"; // #5 Utf8 "SourceFile"; // #6 Utf8 "IntAndClass.java"; // #7 Utf8 "NestMembers"; // #8 Utf8 "IntAndClass"; // #9 Utf8 "java/lang/Object"; // #10 Utf8 "IntAndClass$IntAndClassImp"; // #11 } 0x0601; // access #1; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods } // end of Methods [] { // Attributes Attr(#6) { // SourceFile #7; } // end of SourceFile ; Attr(#8) { // NestMembers [] { // classes #3; } } // end of NestMembers ; Attr(#5) { // InnerClasses [] { // classes #3 #1 #4 9; } } // end of InnerClasses } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jcoder/bad.jcod000066400000000000000000000060571514323636100273310ustar00rootroot00000000000000class negative/bad { 0xCAFEBA; // -- 0xCAFEBABE 3; // minor version 45; // version [] { // Constant Pool ; // first element is empty Class #12; // #1 Class #6; // #2 Method #1 #4; // #3 NameAndType #14 #15; // #4 Utf8 "ConstantValue"; // #5 Utf8 "negative/bad"; // #6 Utf8 "Exceptions"; // #7 Utf8 "LineNumberTable"; // #8 Utf8 "SourceFile"; // #9 Utf8 "LocalVariables"; // #10 Utf8 "Code"; // #11 Utf8 "java/lang/Object"; // #12 Utf8 "attr003.jcod"; // #13 Utf8 ""; // #14 Utf8 "()V"; // #15 } 0x0001; // access #2; // this_cpx #1; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #14; // name_index #15; // descriptor_index [] { // Attributes Attr(#11) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x03 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code ; Attr(#11) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2A 0xB7 0x00 0x03 0xB1; } [] { // Traps } // end of Traps [] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jdec/000077500000000000000000000000001514323636100253715ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jdec/case7902055/000077500000000000000000000000001514323636100270605ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jdec/case7902055/module-info.g.jcod000066400000000000000000000064761514323636100324010ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* Jasm source of the test resource may look like this: module moduleB@1.2.3 version 62:0 { requires mandated java.base@jck-22; exports packB; } */ module moduleB { 0xCAFEBABE; 0; // minor version 62; // version [15] { // Constant Pool ; // first element is empty Class #2; // #1 at 0x0A Utf8 "module-info"; // #2 at 0x0D Utf8 "SourceFile"; // #3 at 0x1B Utf8 "module-info.jcod"; // #4 at 0x28 Utf8 "Module"; // #5 at 0x3B Module #7; // #6 at 0x44 Utf8 "moduleB"; // #7 at 0x47 Module #9; // #8 at 0x51 Utf8 "java.base"; // #9 at 0x54 Utf8 "jdk4jck_22"; // #10 at 0x60 Package #12; // #11 at 0x6D Utf8 "packB"; // #12 at 0x70 Utf8 "1.2.3"; // #13 at 0x78 Utf8 "ModulePackages"; // #14 at 0x80 } // end of Constant Pool 0x8000; // access [ ACC_MODULE, 0xFFFF0000 ] #1; // this_cpx #0; // super_cpx [0] { // Interfaces } // end of Interfaces [0] { // Fields } // end of Fields [0] { // Methods } // end of Methods [2] { // Attributes Attr(#3, 2) { // SourceFile at 0x9F #4; } // end of SourceFile ; Attr(#5, 28) { // Module at 0xA7 #6; // name_index 0x0000; // flags #13; // version [1] { // requires #8 0x8000 #10; // ACC_MANDATED } // end of requires [1] { // exports #11 0x0000 // [ ] [0] { }; } // of exports [0] { // opens } // of opens [0] { // uses } // end of uses [0] { // provides } // end of provides } // end of Module } // end of Attributes } // end of module moduleB jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/jdec/case7902055/module-info.jcod000066400000000000000000000056351514323636100321500ustar00rootroot00000000000000/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* Jasm source of the test resource may look like this: module moduleB@1.2.3 version 62:0 { requires mandated java.base@jck-22; exports packB; } */ module { 0xCAFEBABE; 0; // minor version 62; // version [] { // Constant Pool ; // first element is empty Class #2; // #1 Utf8 "module-info"; // #2 Utf8 "SourceFile"; // #3 Utf8 "module-info.jcod"; // #4 Utf8 "Module"; // #5 Module #7; // #6 Utf8 "moduleB"; // #7 Module #9; // #8 Utf8 "java.base"; // #9 Utf8 "jdk4jck_22"; // #10 Package #12; // #11 Utf8 "packB"; // #12 Utf8 "1.2.3"; // #13 Utf8 "ModulePackages"; // #14 } 0x8000; // access #1; // this_cpx #0; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods } // end of Methods [] { // Attributes Attr(#3) { // SourceFile #4; } // end of SourceFile ; Attr(#5) { // Module #6; // name_index 0x0000; // flags #13; // version [] { // requires #8 0x8000 #10; } // end of requires [] { // exports #11 0x0000 [] { }; } // of exports [] { // opens } // of opens [] { // uses } // end of uses [] { // provides } // end of provides } // end of Module } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/000077500000000000000000000000001514323636100265245ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/000077500000000000000000000000001514323636100303715ustar00rootroot00000000000000ClassField00.jasm000066400000000000000000000027121514323636100333410ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; abstract interface class ClassField00 version 69:0 { static public protected Field field0:"I"; static public final transient Field field1:"I"; Method "init":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassField00, float; putfield Field field:"I"; return; } } ClassField01.jasm000066400000000000000000000027271514323636100333500ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; value abstract class ClassField01 version 69:65535 { static public final volatile Field field0:"I"; static public final strict transient Field field1:"I"; Method "init":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassField01, float; putfield Field field:"I"; return; } } ClassField02.jasm000066400000000000000000000052771514323636100333540ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; // Fields of interfaces must have their ACC_PUBLIC, ACC_STATIC, and ACC_FINAL flags set; // they may have their ACC_STRICT_INIT or ACC_SYNTHETIC flag set, // and must not have any of the other flags in Table 4.5-A set (JLS §9.3): // ACC_PUBLIC 0x0001 Declared public; may be accessed from outside its package. // ACC_PRIVATE 0x0002 Declared private; accessible only within the defining class and other classes belonging to the same nest (5.4.4). // ACC_PROTECTED 0x0004 Declared protected; may be accessed within subclasses. // ACC_STATIC 0x0008 Declared static. // ACC_FINAL 0x0010 Declared final; never directly assigned to after object construction (JLS §17.5). // ACC_VOLATILE 0x0040 Declared volatile; cannot be cached. // ACC_TRANSIENT 0x0080 Declared transient; not written or read by a persistent object manager. // ACC_STRICT_INIT 0x0800 A strictly-initialized field; must be initialized before it can be read. // ACC_SYNTHETIC 0x1000 Declared synthetic; not present in the source code. // ACC_ENUM 0x4000 Declared as an element of an enum class. abstract interface class ClassField04 version 69:65535 { // OK static public final strict Field field0:"I"; static public final synthetic Field field1:"I"; // negative static public final synthetic enum Field field2:"I"; static public final transient Field field3:"I"; static final strict Field field4:"I"; Method "init":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassField04, float; putfield Field field:"I"; return; } } ClassField03.jasm000066400000000000000000000027041514323636100333450ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; abstract interface class ClassField03 version 69:0 { static public final Field field0:"I"; static public final strict Field field1:"I"; Method "init":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassField03, float; putfield Field field:"I"; return; } } ClassField04.jasm000066400000000000000000000033651514323636100333520ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; // Each field of a value class must have at least one of its ACC_STATIC or ACC_STRICT_INIT flags set. value final class ClassField04 version 69:65535 { // OK static public final strict Field field0:"I"; public strict synthetic Field field1:"I"; public static enum Field field2:"I"; // negative public final Field field3:"I"; Field field4:"I"; Method "init":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassField04, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile00.jasm000066400000000000000000000026061514323636100332560ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; public value class ClassFile00 version 69:0 { strict private Field field:"I"; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile00, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile01.jasm000066400000000000000000000026111514323636100332530ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; public identity class ClassFile01 version 69:0 { strict private Field field:"I"; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile01, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile02.jasm000066400000000000000000000025741514323636100332640ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; public identity class ClassFile02 { strict private Field field:"I"; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile02, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile03.jasm000066400000000000000000000025721514323636100332630ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; public value class ClassFile03 { strict private Field field:"I"; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile03, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile04.jasm000066400000000000000000000026231514323636100332610ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; public identity value class ClassFile04 version 69:65535 { strict private Field field:"I"; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile04, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile05.jasm000066400000000000000000000026251514323636100332640ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; private public identity class ClassFile05 version 69:65535 { strict private Field field:"I"; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile05, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile06.jasm000066400000000000000000000026341514323636100332650ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; public identity enum interface class ClassFile06 version 69:65535 { strict private Field field:"I"; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile06, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile07.jasm000066400000000000000000000027401514323636100332640ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; // If the ACC_ANNOTATION flag is set, the ACC_INTERFACE flag must also be set. public annotation class ClassFile06 version 69:65535 { strict private Field field:"I"; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile07, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile08.jasm000066400000000000000000000030641514323636100332650ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; // If the ACC_INTERFACE flag is set, the ACC_ABSTRACT flag must also be set, // and the ACC_FINAL, ACC_SUPER ACC_IDENTITY, ACC_ENUM, and ACC_MODULE flags set must not be set. interface enum class ClassFile08 version 69:65535 { public Field field:"I"; Method "init":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile08, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile09.jasm000066400000000000000000000032761514323636100332730ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; // If the ACC_INTERFACE flag is not set, any of the other flags in Table 4.1-B may be set except ACC_ANNOTATION and ACC_MODULE. // However, such a class file must have at least one of its ACC_FINAL, ACC_IDENTITY, or ACC_ABSTRACT flags set, // and must not have both its ACC_FINAL and ACC_ABSTRACT flags set (JLS §8.1.1.2). value class ClassFile09 version 69:65535 { public Field field:"I"; Method "init":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile09, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile10.jasm000066400000000000000000000033241514323636100332550ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; // If the ACC_INTERFACE flag is not set, any of the other flags in Table 4.1-B may be set except ACC_ANNOTATION and ACC_MODULE. // However, such a class file must have at least one of its ACC_FINAL, ACC_IDENTITY, or ACC_ABSTRACT flags set, // and must not have both its ACC_FINAL and ACC_ABSTRACT flags set (JLS §8.1.1.2). value abstract final class ClassFile10 version 69:65535 { static public Field field:"I"; Method "init":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile10, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile11.jasm000066400000000000000000000026111514323636100332540ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; final value class ClassFile11 version 69:65535 { strict private Field field:"I"; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile11, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile12.jasm000066400000000000000000000026061514323636100332610ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; identity class ClassFile12 version 69:65535 { strict private Field field:"I"; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile12, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile13.jasm000066400000000000000000000026211514323636100332570ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; value interface ClassFile13 version 69:65535 { strict public static final Field field:"I"; Method "init":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile13, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile14.jasm000066400000000000000000000026461514323636100332670ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; public super class ClassFile14 version 69:0 { strict private Field field00:"I"; private Field field01:"I"; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile00, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/structure/ClassFile/ClassFile15.jasm000066400000000000000000000026521514323636100332650ustar00rootroot00000000000000/* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package javasoft/sqe/tests; public super class ClassFile15 version 69:65535 { strict private Field field00:"I"; private Field field01:"I"; Method "":"()V" stack 4 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; return; stack_map class ClassFile00, float; putfield Field field:"I"; return; } } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/000077500000000000000000000000001514323636100264775ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7902820/000077500000000000000000000000001514323636100301665ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7902820/data/000077500000000000000000000000001514323636100310775ustar00rootroot00000000000000SourceDebugExtensionNegative01.class.jcod000066400000000000000000000166771514323636100407360ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7902820/data// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // class org/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionNegative01 { 0xCAFEBABE; 0; // minor version 58; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 class #8; // #7 Utf8 "java/lang/ArithmeticException"; // #8 Field #10 #11; // #9 class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/System"; // #12 Utf8 "out"; // #13 Utf8 "Ljava/io/PrintStream;"; // #14 String #16; // #15 Utf8 "failed"; // #16 Method #18 #19; // #17 class #20; // #18 NameAndType #21 #22; // #19 Utf8 "java/io/PrintStream"; // #20 Utf8 "print"; // #21 Utf8 "(Ljava/lang/String;)V"; // #22 String #24; // #23 Utf8 "passed"; // #24 class #26; // #25 Utf8 "org/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionNegative01"; // #26 Utf8 "Code"; // #27 Utf8 "LineNumberTable"; // #28 Utf8 "LocalVariableTable"; // #29 Utf8 "this"; // #30 Utf8 "Lorg/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionNegative01;"; // #31 Utf8 "calculate"; // #32 Utf8 "()I"; // #33 Utf8 "i"; // #34 Utf8 "I"; // #35 Utf8 "e"; // #36 Utf8 "Ljava/lang/ArithmeticException;"; // #37 Utf8 "a1"; // #38 Utf8 "a2"; // #39 Utf8 "a3"; // #40 Utf8 "StackMapTable"; // #41 Utf8 "SourceFile"; // #42 Utf8 "InvalidSourceDebugExtension.java"; // #43 Utf8 "SourceDebugExtension"; // #44 } 0x0021; // access #25; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#27) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2AB70001B1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#28) { // LineNumberTable [] { // line_number_table 0 25; } } // end of LineNumberTable ; Attr(#29) { // LocalVariableTable [] { // LocalVariableTable 0 5 30 31 0; } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0001; // access #32; // name_index #33; // descriptor_index [] { // Attributes Attr(#27) { // Code 3; // max_stack 5; // max_locals Bytes[]{ 0x043C043D043E1B1C; 0x1D646C3604150408; 0xA2000C8401018404; 0x01A7FFF4053DA700; 0x073A04053E1B04A0; 0x000D1C04A000081D; 0x059F000DB2000912; 0x0FB6001105ACB200; 0x091217B6001103AC; } [] { // Traps 6 30 33 7; } // end of Traps [] { // Attributes Attr(#28) { // LineNumberTable [] { // line_number_table 0 28; 2 29; 4 30; 6 32; 19 33; 22 32; 28 35; 30 38; 33 36; 35 37; 37 39; 52 40; 60 41; 62 43; 70 44; } } // end of LineNumberTable ; Attr(#29) { // LocalVariableTable [] { // LocalVariableTable 13 15 34 35 4; 35 2 36 37 4; 0 72 30 31 0; 2 70 38 35 1; 4 68 39 35 2; 6 66 40 35 3; } } // end of LocalVariableTable ; Attr(#41) { // StackMapTable [] { // 255b, 13, []{O,25; I; I; I; I}, []{}; // full_frame 250b, 14; // chop_frame 1 68b, []z{O,7}; // same_locals_1_stack_item_frame 3b; // same_frame 14b; // same_frame 9b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#42) { // SourceFile #43; } // end of SourceFile Attr(#44, 2147483647) { // SourceDebugExtension 0x00; 0x11; 0x22; 0x33; 0x44; 0x55; } } // end of Attributes } SourceDebugExtensionNegative02.class.jcod000066400000000000000000000166771514323636100407370ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7902820/data// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // class org/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionNegative02 { 0xCAFEBABE; 0; // minor version 58; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 class #8; // #7 Utf8 "java/lang/ArithmeticException"; // #8 Field #10 #11; // #9 class #12; // #10 NameAndType #13 #14; // #11 Utf8 "java/lang/System"; // #12 Utf8 "out"; // #13 Utf8 "Ljava/io/PrintStream;"; // #14 String #16; // #15 Utf8 "failed"; // #16 Method #18 #19; // #17 class #20; // #18 NameAndType #21 #22; // #19 Utf8 "java/io/PrintStream"; // #20 Utf8 "print"; // #21 Utf8 "(Ljava/lang/String;)V"; // #22 String #24; // #23 Utf8 "passed"; // #24 class #26; // #25 Utf8 "org/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionNegative02"; // #26 Utf8 "Code"; // #27 Utf8 "LineNumberTable"; // #28 Utf8 "LocalVariableTable"; // #29 Utf8 "this"; // #30 Utf8 "Lorg/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionNegative02;"; // #31 Utf8 "calculate"; // #32 Utf8 "()I"; // #33 Utf8 "i"; // #34 Utf8 "I"; // #35 Utf8 "e"; // #36 Utf8 "Ljava/lang/ArithmeticException;"; // #37 Utf8 "a1"; // #38 Utf8 "a2"; // #39 Utf8 "a3"; // #40 Utf8 "StackMapTable"; // #41 Utf8 "SourceFile"; // #42 Utf8 "InvalidSourceDebugExtension.java"; // #43 Utf8 "SourceDebugExtension"; // #44 } 0x0021; // access #25; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#27) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x2AB70001B1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#28) { // LineNumberTable [] { // line_number_table 0 25; } } // end of LineNumberTable ; Attr(#29) { // LocalVariableTable [] { // LocalVariableTable 0 5 30 31 0; } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0001; // access #32; // name_index #33; // descriptor_index [] { // Attributes Attr(#27) { // Code 3; // max_stack 5; // max_locals Bytes[]{ 0x043C043D043E1B1C; 0x1D646C3604150408; 0xA2000C8401018404; 0x01A7FFF4053DA700; 0x073A04053E1B04A0; 0x000D1C04A000081D; 0x059F000DB2000912; 0x0FB6001105ACB200; 0x091217B6001103AC; } [] { // Traps 6 30 33 7; } // end of Traps [] { // Attributes Attr(#28) { // LineNumberTable [] { // line_number_table 0 28; 2 29; 4 30; 6 32; 19 33; 22 32; 28 35; 30 38; 33 36; 35 37; 37 39; 52 40; 60 41; 62 43; 70 44; } } // end of LineNumberTable ; Attr(#29) { // LocalVariableTable [] { // LocalVariableTable 13 15 34 35 4; 35 2 36 37 4; 0 72 30 31 0; 2 70 38 35 1; 4 68 39 35 2; 6 66 40 35 3; } } // end of LocalVariableTable ; Attr(#41) { // StackMapTable [] { // 255b, 13, []{O,25; I; I; I; I}, []{}; // full_frame 250b, 14; // chop_frame 1 68b, []z{O,7}; // same_locals_1_stack_item_frame 3b; // same_frame 14b; // same_frame 9b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#42) { // SourceFile #43; } // end of SourceFile Attr(#44, 2) { // SourceDebugExtension 0x00; 0x11; 0x22; 0x33; 0x44; 0x55; } } // end of Attributes } SourceDebugExtensionPositive01.class.jcod000066400000000000000000000233031514323636100407560ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7902820/data// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // class org/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionPositive01 { 0xCAFEBABE; 0; // minor version 58; // version [45] { // Constant Pool ; // first element is empty Method #2 #3; // #1 at 0x0A class #4; // #2 at 0x0F NameAndType #5 #6; // #3 at 0x12 Utf8 "java/lang/Object"; // #4 at 0x17 Utf8 ""; // #5 at 0x2A Utf8 "()V"; // #6 at 0x33 class #8; // #7 at 0x39 Utf8 "java/lang/ArithmeticException"; // #8 at 0x3C Field #10 #11; // #9 at 0x5C class #12; // #10 at 0x61 NameAndType #13 #14; // #11 at 0x64 Utf8 "java/lang/System"; // #12 at 0x69 Utf8 "out"; // #13 at 0x7C Utf8 "Ljava/io/PrintStream;"; // #14 at 0x82 String #16; // #15 at 0x9A Utf8 "failed"; // #16 at 0x9D Method #18 #19; // #17 at 0xA6 class #20; // #18 at 0xAB NameAndType #21 #22; // #19 at 0xAE Utf8 "java/io/PrintStream"; // #20 at 0xB3 Utf8 "print"; // #21 at 0xC9 Utf8 "(Ljava/lang/String;)V"; // #22 at 0xD1 String #24; // #23 at 0xE9 Utf8 "SourceDebugExtensionPositive01 passed"; // #24 at 0xEC class #26; // #25 at 0xF5 Utf8 "org/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionPositive01"; // #26 at 0xF8 Utf8 "Code"; // #27 at 0x0149 Utf8 "LineNumberTable"; // #28 at 0x0150 Utf8 "LocalVariableTable"; // #29 at 0x0162 Utf8 "this"; // #30 at 0x0177 Utf8 "Lorg/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionPositive01;"; // #31 at 0x017E Utf8 "calculate"; // #32 at 0x01D1 Utf8 "()I"; // #33 at 0x01DD Utf8 "i"; // #34 at 0x01E3 Utf8 "I"; // #35 at 0x01E7 Utf8 "e"; // #36 at 0x01EB Utf8 "Ljava/lang/ArithmeticException;"; // #37 at 0x01EF Utf8 "a1"; // #38 at 0x0211 Utf8 "a2"; // #39 at 0x0216 Utf8 "a3"; // #40 at 0x021B Utf8 "StackMapTable"; // #41 at 0x0220 Utf8 "SourceDebugExtension"; // #42 at 0x0230 Utf8 "SourceFile"; // #43 at 0x0247 Utf8 "SourceDebugExtension.java"; // #44 at 0x0254 } // end of Constant Pool 0x0021; // access [ ACC_PUBLIC, ACC_SUPER ] #25; // this_cpx #2; // super_cpx [0] { // Interfaces } // end of Interfaces [0] { // Fields } // end of Fields [2] { // Methods { // method at 0x027C 0x0001; // access #5; // name_index : #6; // descriptor_index : ()V [1] { // Attributes Attr(#27, 47) { // Code at 0x0284 1; // max_stack 1; // max_locals Bytes[5]{ 0x2AB70001B1; } [0] { // Traps } // end of Traps [2] { // Attributes Attr(#28, 6) { // LineNumberTable at 0x029B [1] { // line_number_table 0 25; // at 0x02A7 } } // end of LineNumberTable ; Attr(#29, 12) { // LocalVariableTable at 0x02A7 [1] { // LocalVariableTable 0 5 30 31 0; // at 0x02B9 } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x02B9 0x0001; // access #32; // name_index : calculate #33; // descriptor_index : ()I [1] { // Attributes Attr(#27, 260) { // Code at 0x02C1 3; // max_stack 5; // max_locals Bytes[72]{ 0x043C043D043E1B1C; 0x1D646C3604150408; 0xA2000C8401018404; 0x01A7FFF4053DA700; 0x073A04053E1B04A0; 0x000D1C04A000081D; 0x059F000DB2000912; 0x0FB6001105ACB200; 0x091217B6001103AC; } [1] { // Traps 6 30 33 7; // at 0x0321 } // end of Traps [3] { // Attributes Attr(#28, 62) { // LineNumberTable at 0x0323 [15] { // line_number_table 0 28; // at 0x032F 2 29; // at 0x0333 4 30; // at 0x0337 6 32; // at 0x033B 19 33; // at 0x033F 22 32; // at 0x0343 28 35; // at 0x0347 30 38; // at 0x034B 33 36; // at 0x034F 35 37; // at 0x0353 37 39; // at 0x0357 52 40; // at 0x035B 60 41; // at 0x035F 62 43; // at 0x0363 70 44; // at 0x0367 } } // end of LineNumberTable ; Attr(#29, 62) { // LocalVariableTable at 0x0367 [6] { // LocalVariableTable 13 15 34 35 4; // at 0x0379 35 2 36 37 4; // at 0x0383 0 72 30 31 0; // at 0x038D 2 70 38 35 1; // at 0x0397 4 68 39 35 2; // at 0x03A1 6 66 40 35 3; // at 0x03AB } } // end of LocalVariableTable ; Attr(#41, 26) { // StackMapTable at 0x03AB [6] { // 255b, 13, [5]{7b,25; 1b; 1b; 1b; 1b}, [0]{}; // full_frame 250b, 14; // chop_frame 1 68b, [1]z{7b,7}; // same_locals_1_stack_item_frame 3b; // same_frame 14b; // same_frame 9b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [2] { // Attributes Attr(#43, 2) { // SourceFile at 0x03CD #44; } // end of SourceFile ; Attr(#42) { // SourceDebugExtension at 0x03D5 "\tThe Memory Model determines what values can be read at every point in the program.\n"; "The actions of each thread in isolation must behave as governed by the semantics of "; "that thread, with the exception that the values seen by each read are determined by "; "the memory model.\nWhen we refer to this, we say that the program obeys intra-thread "; "semantics.\n\tIntra-thread semantics are the semantics for single-threaded programs, "; "and allow the complete prediction of the behavior of a thread based on the values "; "seen by read actions within the thread.\n\tTo determine if the actions of thread \'t\' in "; "an execution are legal, we simply evaluate the implementation of thread \"t\" as it would "; "be performed in a single-threaded context, as defined in the rest of this specification."; } // end of SourceDebugExtension } // end of Attributes } // end of class org/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionPositive01 SourceDebugExtensionPositive02.class.jcod000066400000000000000000012245761514323636100407770ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7902820/data// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // class org/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionPositive02 { 0xCAFEBABE; 0; // minor version 58; // version [45] { // Constant Pool ; // first element is empty Method #2 #3; // #1 at 0x0A class #4; // #2 at 0x0F NameAndType #5 #6; // #3 at 0x12 Utf8 "java/lang/Object"; // #4 at 0x17 Utf8 ""; // #5 at 0x2A Utf8 "()V"; // #6 at 0x33 class #8; // #7 at 0x39 Utf8 "java/lang/ArithmeticException"; // #8 at 0x3C Field #10 #11; // #9 at 0x5C class #12; // #10 at 0x61 NameAndType #13 #14; // #11 at 0x64 Utf8 "java/lang/System"; // #12 at 0x69 Utf8 "out"; // #13 at 0x7C Utf8 "Ljava/io/PrintStream;"; // #14 at 0x82 String #16; // #15 at 0x9A Utf8 "failed"; // #16 at 0x9D Method #18 #19; // #17 at 0xA6 class #20; // #18 at 0xAB NameAndType #21 #22; // #19 at 0xAE Utf8 "java/io/PrintStream"; // #20 at 0xB3 Utf8 "print"; // #21 at 0xC9 Utf8 "(Ljava/lang/String;)V"; // #22 at 0xD1 String #24; // #23 at 0xE9 Utf8 "SourceDebugExtensionPositive02 passed"; // #24 at 0xEC class #26; // #25 at 0xF5 Utf8 "org/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionPositive02"; // #26 at 0xF8 Utf8 "Code"; // #27 at 0x0149 Utf8 "LineNumberTable"; // #28 at 0x0150 Utf8 "LocalVariableTable"; // #29 at 0x0162 Utf8 "this"; // #30 at 0x0177 Utf8 "Lorg/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionPositive02;"; // #31 at 0x017E Utf8 "calculate"; // #32 at 0x01D1 Utf8 "()I"; // #33 at 0x01DD Utf8 "i"; // #34 at 0x01E3 Utf8 "I"; // #35 at 0x01E7 Utf8 "e"; // #36 at 0x01EB Utf8 "Ljava/lang/ArithmeticException;"; // #37 at 0x01EF Utf8 "a1"; // #38 at 0x0211 Utf8 "a2"; // #39 at 0x0216 Utf8 "a3"; // #40 at 0x021B Utf8 "StackMapTable"; // #41 at 0x0220 Utf8 "SourceDebugExtension"; // #42 at 0x0230 Utf8 "SourceFile"; // #43 at 0x0247 Utf8 "SourceDebugExtension.java"; // #44 at 0x0254 } // end of Constant Pool 0x0021; // access [ ACC_PUBLIC, ACC_SUPER ] #25; // this_cpx #2; // super_cpx [0] { // Interfaces } // end of Interfaces [0] { // Fields } // end of Fields [2] { // Methods { // method at 0x027C 0x0001; // access #5; // name_index : #6; // descriptor_index : ()V [1] { // Attributes Attr(#27, 47) { // Code at 0x0284 1; // max_stack 1; // max_locals Bytes[5]{ 0x2AB70001B1; } [0] { // Traps } // end of Traps [2] { // Attributes Attr(#28, 6) { // LineNumberTable at 0x029B [1] { // line_number_table 0 25; // at 0x02A7 } } // end of LineNumberTable ; Attr(#29, 12) { // LocalVariableTable at 0x02A7 [1] { // LocalVariableTable 0 5 30 31 0; // at 0x02B9 } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x02B9 0x0001; // access #32; // name_index : calculate #33; // descriptor_index : ()I [1] { // Attributes Attr(#27, 260) { // Code at 0x02C1 3; // max_stack 5; // max_locals Bytes[72]{ 0x043C043D043E1B1C; 0x1D646C3604150408; 0xA2000C8401018404; 0x01A7FFF4053DA700; 0x073A04053E1B04A0; 0x000D1C04A000081D; 0x059F000DB2000912; 0x0FB6001105ACB200; 0x091217B6001103AC; } [1] { // Traps 6 30 33 7; // at 0x0321 } // end of Traps [3] { // Attributes Attr(#28, 62) { // LineNumberTable at 0x0323 [15] { // line_number_table 0 28; // at 0x032F 2 29; // at 0x0333 4 30; // at 0x0337 6 32; // at 0x033B 19 33; // at 0x033F 22 32; // at 0x0343 28 35; // at 0x0347 30 38; // at 0x034B 33 36; // at 0x034F 35 37; // at 0x0353 37 39; // at 0x0357 52 40; // at 0x035B 60 41; // at 0x035F 62 43; // at 0x0363 70 44; // at 0x0367 } } // end of LineNumberTable ; Attr(#29, 62) { // LocalVariableTable at 0x0367 [6] { // LocalVariableTable 13 15 34 35 4; // at 0x0379 35 2 36 37 4; // at 0x0383 0 72 30 31 0; // at 0x038D 2 70 38 35 1; // at 0x0397 4 68 39 35 2; // at 0x03A1 6 66 40 35 3; // at 0x03AB } } // end of LocalVariableTable ; Attr(#41, 26) { // StackMapTable at 0x03AB [6] { // 255b, 13, [5]{7b,25; 1b; 1b; 1b; 1b}, [0]{}; // full_frame 250b, 14; // chop_frame 1 68b, [1]z{7b,7}; // same_locals_1_stack_item_frame 3b; // same_frame 14b; // same_frame 9b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [2] { // Attributes Attr(#43, 2) { // SourceFile at 0x03CD #44; } // end of SourceFile ; Attr(#42, 65540) { // SourceDebugExtension at 0x03D5 0x11 0x22 0x33 0x44; 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2A 0x2B 0x2C 0x2D 0x2E 0x2F 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4A 0x4B 0x4C 0x4D 0x4E 0x4F 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5A 0x5B 0x5C 0x5D 0x5E 0x5F 0x60 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6A 0x6B 0x6C 0x6D 0x6E 0x6F 0x70 0x71 0x72 0x73 0x74 0x75 0x76 0x77 0x78 0x79 0x7A 0x7B 0x7C 0x7D 0x7E 0x7F 0x80 0x81 0x82 0x83 0x84 0x85 0x86 0x87 0x88 0x89 0x8A 0x8B 0x8C 0x8D 0x8E 0x8F 0x90 0x91 0x92 0x93 0x94 0x95 0x96 0x97 0x98 0x99 0x9A 0x9B 0x9C 0x9D 0x9E 0x9F 0xA0 0xA1 0xA2 0xA3 0xA4 0xA5 0xA6 0xA7 0xA8 0xA9 0xAA 0xAB 0xAC 0xAD 0xAE 0xAF 0xB0 0xB1 0xB2 0xB3 0xB4 0xB5 0xB6 0xB7 0xB8 0xB9 0xBA 0xBB 0xBC 0xBD 0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DD 0xDE 0xDF 0xE0 0xE1 0xE2 0xE3 0xE4 0xE5 0xE6 0xE7 0xE8 0xE9 0xEA 0xEB 0xEC 0xED 0xEE 0xEF 0xF0 0xF1 0xF2 0xF3 0xF4 0xF5 0xF6 0xF7 0xF8 0xF9 0xFA 0xFB 0xFC 0xFD 0xFE 0xFF; } // end of SourceDebugExtension } // end of Attributes } // end of class org/openjdk/asmtools/transform/case7902820/data/SourceDebugExtensionPositive02 jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7903259/000077500000000000000000000000001514323636100301755ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7903259/jasm000066400000000000000000000116601514323636100310560ustar00rootroot00000000000000// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // package org/openjdk/asmtools/transform/case7903259/data; public final super class #10 /* BuildString */ version 60:0 { const #1 = Method #2.#3; // java/lang/Object."":"()V" const #2 = class #4; // java/lang/Object const #3 = NameAndType #5:#6; // "":"()V" const #4 = Asciz "java/lang/Object"; const #5 = Asciz ""; const #6 = Asciz "()V"; const #7 = String #8; // "Hello" const #8 = Asciz "Hello"; const #9 = Field #10.#11; // BuildString.intialString:"Ljava/lang/String;" const #10 = class #12; // BuildString const #11 = NameAndType #13:#14; // intialString:"Ljava/lang/String;" const #12 = Asciz "org/openjdk/asmtools/transform/case7903259/data/BuildString"; const #13 = Asciz "intialString"; const #14 = Asciz "Ljava/lang/String;"; const #15 = Field #16.#17; // java/lang/System.out:"Ljava/io/PrintStream;" const #16 = class #18; // java/lang/System const #17 = NameAndType #19:#20; // out:"Ljava/io/PrintStream;" const #18 = Asciz "java/lang/System"; const #19 = Asciz "out"; const #20 = Asciz "Ljava/io/PrintStream;"; const #21 = String #22; // " World !" const #22 = Asciz " World !"; const #23 = Method #24.#25; // java/lang/String.concat:"(Ljava/lang/String;)Ljava/lang/String;" const #24 = class #26; // java/lang/String const #25 = NameAndType #27:#28; // concat:"(Ljava/lang/String;)Ljava/lang/String;" const #26 = Asciz "java/lang/String"; const #27 = Asciz "concat"; const #28 = Asciz "(Ljava/lang/String;)Ljava/lang/String;"; const #29 = Method #30.#31; // java/io/PrintStream.println:"(Ljava/lang/String;)V" const #30 = class #32; // java/io/PrintStream const #31 = NameAndType #33:#34; // println:"(Ljava/lang/String;)V" const #32 = Asciz "java/io/PrintStream"; const #33 = Asciz "println"; const #34 = Asciz "(Ljava/lang/String;)V"; const #35 = Asciz "ConstantValue"; const #36 = Asciz "Code"; const #37 = Asciz "LineNumberTable"; const #38 = Asciz "LocalVariableTable"; const #39 = Asciz "this"; const #40 = Asciz "Lorg/openjdk/asmtools/transform/case7903259/data/BuildString;"; const #41 = Asciz "printDecoratedString"; const #42 = Asciz "SourceFile"; const #43 = Asciz "BuildString.java"; private final Field #13:#14 = #7; // intialString:"Ljava/lang/String;" = String "Hello" public Method #5:#6 // "":"()V" stack 2 locals 1 { var 0 #39:#40; // this:"Lorg/openjdk/asmtools/transform/case7903259/data/BuildString;" 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: aload_0; 5: ldc #7; // String "Hello" 7: putfield #9; // Field intialString:"Ljava/lang/String;" 10: return; endvar 0; } public Method #41:#6 // printDecoratedString:"()V" stack 3 locals 1 { var 0 #39:#40; // this:"Lorg/openjdk/asmtools/transform/case7903259/data/BuildString;" 0: getstatic #15; // Field java/lang/System.out:"Ljava/io/PrintStream;" 3: ldc #7; // String "Hello" 5: ldc #21; // String " World !" 7: invokevirtual #23; // Method java/lang/String.concat:"(Ljava/lang/String;)Ljava/lang/String;" 10: invokevirtual #29; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 13: return; endvar 0; } } // end Class BuildString compiled from "BuildString.java" jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7903259/jcoder000066400000000000000000000147551514323636100314020ustar00rootroot00000000000000// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // class org/openjdk/asmtools/transform/case7903259/data/BuildString { 0xCAFEBABE; 0; // minor version 60; // version [] { // Constant Pool ; // first element is empty Method #2 #3; // #1 class #4; // #2 NameAndType #5 #6; // #3 Utf8 "java/lang/Object"; // #4 Utf8 ""; // #5 Utf8 "()V"; // #6 String #8; // #7 Utf8 "Hello"; // #8 Field #10 #11; // #9 class #12; // #10 NameAndType #13 #14; // #11 Utf8 "org/openjdk/asmtools/transform/case7903259/data/BuildString"; // #12 Utf8 "intialString"; // #13 Utf8 "Ljava/lang/String;"; // #14 Field #16 #17; // #15 class #18; // #16 NameAndType #19 #20; // #17 Utf8 "java/lang/System"; // #18 Utf8 "out"; // #19 Utf8 "Ljava/io/PrintStream;"; // #20 String #22; // #21 Utf8 " World !"; // #22 Method #24 #25; // #23 class #26; // #24 NameAndType #27 #28; // #25 Utf8 "java/lang/String"; // #26 Utf8 "concat"; // #27 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #28 Method #30 #31; // #29 class #32; // #30 NameAndType #33 #34; // #31 Utf8 "java/io/PrintStream"; // #32 Utf8 "println"; // #33 Utf8 "(Ljava/lang/String;)V"; // #34 Utf8 "ConstantValue"; // #35 Utf8 "Code"; // #36 Utf8 "LineNumberTable"; // #37 Utf8 "LocalVariableTable"; // #38 Utf8 "this"; // #39 Utf8 "Lorg/openjdk/asmtools/transform/case7903259/data/BuildString;"; // #40 Utf8 "printDecoratedString"; // #41 Utf8 "SourceFile"; // #42 Utf8 "BuildString.java"; // #43 } 0x0031; // access #10; // this_cpx #2; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0012; // access #13; // name_index #14; // descriptor_index [] { // Attributes Attr(#35) { // ConstantValue #7; } // end of ConstantValue } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0001; // access #5; // name_index #6; // descriptor_index [] { // Attributes Attr(#36) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2AB700012A1207B5; 0x0009B1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#37) { // LineNumberTable [] { // line_number_table 0 3; 4 4; } } // end of LineNumberTable ; Attr(#38) { // LocalVariableTable [] { // LocalVariableTable 0 11 39 40 0; } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0001; // access #41; // name_index #6; // descriptor_index [] { // Attributes Attr(#36) { // Code 3; // max_stack 1; // max_locals Bytes[]{ 0xB2000F12071215B6; 0x0017B6001DB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#37) { // LineNumberTable [] { // line_number_table 0 6; 13 7; } } // end of LineNumberTable ; Attr(#38) { // LocalVariableTable [] { // LocalVariableTable 0 14 39 40 0; } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#42) { // SourceFile #43; } // end of SourceFile } // end of Attributes } jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7903259/jdec.bin000066400000000000000000000014111514323636100315710ustar00rootroot00000000000000Êþº¾<,  java/lang/Object()VHello  ;org/openjdk/asmtools/transform/case7903259/data/BuildString intialStringLjava/lang/String;  java/lang/SystemoutLjava/io/PrintStream; World !  java/lang/Stringconcat&(Ljava/lang/String;)Ljava/lang/String;  !"java/io/PrintStreamprintln(Ljava/lang/String;)V ConstantValueCodeLineNumberTableLocalVariableTablethis=Lorg/openjdk/asmtools/transform/case7903259/data/BuildString;printDecoratedString SourceFileBuildString.java1  #$9 *·*µ ±% &  '()$<²¶¶±%  & '(*+jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7903259/jdis.bin000066400000000000000000000014111514323636100316150ustar00rootroot00000000000000Êþº¾<,  java/lang/Object()VHello  ;org/openjdk/asmtools/transform/case7903259/data/BuildString intialStringLjava/lang/String;  java/lang/SystemoutLjava/io/PrintStream; World !  java/lang/Stringconcat&(Ljava/lang/String;)Ljava/lang/String;  !"java/io/PrintStreamprintln(Ljava/lang/String;)V ConstantValueCodeLineNumberTableLocalVariableTablethis=Lorg/openjdk/asmtools/transform/case7903259/data/BuildString;printDecoratedString SourceFileBuildString.java1  #$9 *·*µ ±% &  '()$<²¶¶±%  & '(*+jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7903454/000077500000000000000000000000001514323636100301725ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7903454/data/000077500000000000000000000000001514323636100311035ustar00rootroot00000000000000Utf8Code.class.jasm000066400000000000000000000324501514323636100344310ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7903454/data/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org/openjdk/asmtools/transform/case7903454/data; public super class Utf8Code version 61:0 { static Field ÄŒeÅ¡tinaAlphabet:"Ljava/lang/String;"; static Field ქáƒáƒ áƒ—ულიენáƒAlphabet:"Ljava/lang/String;"; static Field ΕλληνικάAlphabet:"Ljava/lang/String;"; Field line:"Ljava/lang/String;"; private Field نتیجÛ:"Ljava/lang/String;"; private Method вычиÑлитьБольшиеБуквы:"()Ljava/lang/String;" stack 2 locals 1 { aload_0; getfield Field line:"Ljava/lang/String;"; invokevirtual Method java/lang/String.codePoints:"()Ljava/util/stream/IntStream;"; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/LambdaMetafactory.metafactory: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;": test:"()Ljava/util/function/IntPredicate;" { MethodType "(I)Z", MethodHandle REF_invokeStatic:Method Utf8Code.lambda$вычиÑлитьБольшиеБуквы$0:"(I)Z", MethodType "(I)Z" }; invokeinterface InterfaceMethod java/util/stream/IntStream.filter:"(Ljava/util/function/IntPredicate;)Ljava/util/stream/IntStream;", 2; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/LambdaMetafactory.metafactory: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;": apply:"()Ljava/util/function/IntFunction;" { MethodType "(I)Ljava/lang/Object;", MethodHandle REF_invokeStatic:Method Utf8Code.lambda$вычиÑлитьБольшиеБуквы$1:"(I)Ljava/lang/String;", MethodType "(I)Ljava/lang/String;" }; invokeinterface InterfaceMethod java/util/stream/IntStream.mapToObj:"(Ljava/util/function/IntFunction;)Ljava/util/stream/Stream;", 2; invokestatic Method java/util/stream/Collectors.joining:"()Ljava/util/stream/Collector;"; invokeinterface InterfaceMethod java/util/stream/Stream.collect:"(Ljava/util/stream/Collector;)Ljava/lang/Object;", 2; checkcast class java/lang/String; areturn; } private Method вычиÑлитьМаленькиеБуквы:"()Ljava/lang/String;" stack 2 locals 1 { aload_0; getfield Field line:"Ljava/lang/String;"; invokevirtual Method java/lang/String.codePoints:"()Ljava/util/stream/IntStream;"; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/LambdaMetafactory.metafactory: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;": test:"()Ljava/util/function/IntPredicate;" { MethodType "(I)Z", MethodHandle REF_invokeStatic:Method Utf8Code.lambda$вычиÑлитьМаленькиеБуквы$2:"(I)Z", MethodType "(I)Z" }; invokeinterface InterfaceMethod java/util/stream/IntStream.filter:"(Ljava/util/function/IntPredicate;)Ljava/util/stream/IntStream;", 2; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/LambdaMetafactory.metafactory: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;": apply:"()Ljava/util/function/IntFunction;" { MethodType "(I)Ljava/lang/Object;", MethodHandle REF_invokeStatic:Method Utf8Code.lambda$вычиÑлитьМаленькиеБуквы$3:"(I)Ljava/lang/String;", MethodType "(I)Ljava/lang/String;" }; invokeinterface InterfaceMethod java/util/stream/IntStream.mapToObj:"(Ljava/util/function/IntFunction;)Ljava/util/stream/Stream;", 2; invokestatic Method java/util/stream/Collectors.joining:"()Ljava/util/stream/Collector;"; invokeinterface InterfaceMethod java/util/stream/Stream.collect:"(Ljava/util/stream/Collector;)Ljava/lang/Object;", 2; checkcast class java/lang/String; areturn; } public Method calculate:"()I" stack 4 locals 2 { aload_0; getfield Field نتیجÛ:"Ljava/lang/String;"; invokevirtual Method java/lang/String.isEmpty:"()Z"; ifeq L38; aload_0; aload_0; invokevirtual Method вычиÑлитьБольшиеБуквы:"()Ljava/lang/String;"; iconst_0; bipush 20; invokevirtual Method java/lang/String.substring:"(II)Ljava/lang/String;"; aload_0; invokevirtual Method вычиÑлитьМаленькиеБуквы:"()Ljava/lang/String;"; bipush 90; invokevirtual Method java/lang/String.substring:"(I)Ljava/lang/String;"; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" { String "\u0001\u0001" }; putfield Field نتیجÛ:"Ljava/lang/String;"; L38: stack_frame_type same; aload_0; getfield Field نتیجÛ:"Ljava/lang/String;"; invokevirtual Method java/lang/String.length:"()I"; istore_1; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; iload_1; aload_0; getfield Field نتیجÛ:"Ljava/lang/String;"; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(ILjava/lang/String;)Ljava/lang/String;" { String "\u0001 \u0001" }; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; iload_1; ireturn; } public Method "":"()V" stack 6 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; aload_0; ldc String ""; putfield Field نتیجÛ:"Ljava/lang/String;"; aload_0; getstatic Field ÄŒeÅ¡tinaAlphabet:"Ljava/lang/String;"; ldc String " "; ldc String ""; invokevirtual Method java/lang/String.replaceAll:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"; getstatic Field ქáƒáƒ áƒ—ულიენáƒAlphabet:"Ljava/lang/String;"; ldc String " "; ldc String ""; invokevirtual Method java/lang/String.replaceAll:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"; getstatic Field ΕλληνικάAlphabet:"Ljava/lang/String;"; ldc String " "; ldc String ""; invokevirtual Method java/lang/String.replaceAll:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" { String "\u0001\u0001\u0001" }; putfield Field line:"Ljava/lang/String;"; return; } private static synthetic Method lambda$вычиÑлитьМаленькиеБуквы$3:"(I)Ljava/lang/String;" stack 1 locals 1 { iload_0; invokestatic Method java/lang/Character.toString:"(I)Ljava/lang/String;"; areturn; } private static synthetic Method lambda$вычиÑлитьМаленькиеБуквы$2:"(I)Z" stack 1 locals 1 { iload_0; invokestatic Method java/lang/Character.isLowerCase:"(I)Z"; ireturn; } private static synthetic Method lambda$вычиÑлитьБольшиеБуквы$1:"(I)Ljava/lang/String;" stack 1 locals 1 { iload_0; invokestatic Method java/lang/Character.toString:"(I)Ljava/lang/String;"; areturn; } private static synthetic Method lambda$вычиÑлитьБольшиеБуквы$0:"(I)Z" stack 1 locals 1 { iload_0; invokestatic Method java/lang/Character.isUpperCase:"(I)Z"; ireturn; } static Method "":"()V" stack 1 locals 0 { ldc String "A à B C ÄŒ D ÄŽ E É Äš F G H Ch I à J K L M N Ň O Ó P Q R Ř S Å  T Ť U Ú Å® V W X Y à Z Ž a á b c Ä d Ä e é Ä› f g h ch i í j k l m n ň o ó p q r Å™ s Å¡ t Å¥ u ú ů v w x y ý z ž"; putstatic Field ÄŒeÅ¡tinaAlphabet:"Ljava/lang/String;"; ldc String "á‚  á‚¡ á‚¢ á‚£ Ⴄ á‚¥ Ⴆ á‚§ Ⴈ á‚© Ⴊ á‚« Ⴌ á‚­ á‚® Ⴏ á‚° Ⴑ Ⴒ Ⴓ á‚´ Ⴕ á‚¶ á‚· Ⴘ Ⴙ Ⴚ á‚» Ⴜ Ⴝ Ⴞ á‚¿ Ⴠ რჂ Ⴣ Ⴤ Ⴥ რბ გ დ ე ვ ზ თ ი კ ლ მ ნ რპ ჟ რ ს ტ უ ფ ქ ღ ყ შ ჩ ც ძ წ ჭ ხ ჯ ჰ ჱ ჲ ჳ ჴ ჵ ჶ ჷ ჸ ჹ ჺ ჻ ჼ ჽ ჾ ჿ"; putstatic Field ქáƒáƒ áƒ—ულიენáƒAlphabet:"Ljava/lang/String;"; ldc String "Α α Î’ β Γ γ Δ δ Ε ε Ζ ζ Η η Θ θ Ι ι Κ κ Λ λ Μ μ Πν Ξ ξ Ο ο Π Ï€ Ρ Ï Î£ σ/Ï‚ Τ Ï„ Î¥ Ï… Φ φ Χ χ Ψ ψ Ω ω"; putstatic Field ΕλληνικάAlphabet:"Ljava/lang/String;"; return; } SourceFile "Utf8Code.java"; SourceDebugExtension { "\tThe Memory Model determines what values can be read at every point in th"; "e program.\nThe actions of each thread in isolation must behave as governe"; "d by the semantics of that thread, with the exception that the values seen"; " by each read are determined by the memory model.\nWhen we refer to this, "; "we say that the program obeys intra-thread semantics.\n\tIntra-thread sema"; "ntics are the semantics for single-threaded programs, and allow the comple"; "te prediction of the behavior of a thread based on the values seen by read"; " actions within the thread.\n\tTo determine if the actions of thread \'t\'"; " in an execution are legal, we simply evaluate the implementation of threa"; "d \"t\" as it would be performed in a single-threaded context, as defined "; "in the rest of this specification."; } public static final InnerClass Lookup = class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles; BootstrapMethod #149 #156 #157 #156; BootstrapMethod #149 #160 #162 #165; BootstrapMethod #149 #156 #166 #156; BootstrapMethod #149 #160 #169 #165; BootstrapMethod #172 #178; BootstrapMethod #172 #180; BootstrapMethod #172 #182; } // end Class Utf8Code compiled from "Utf8Code.java" Utf8Code.class.jcod000066400000000000000000000665201514323636100344230ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7903454/data/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ class org/openjdk/asmtools/transform/case7903454/data/Utf8Code { 0xCAFEBABE; 0; // minor version 61; // version [] { // Constant Pool ; // first element is empty Field #2 #3; // #1 class #4; // #2 NameAndType #5 #6; // #3 Utf8 "org/openjdk/asmtools/transform/case7903454/data/Utf8Code"; // #4 Utf8 "line"; // #5 Utf8 "Ljava/lang/String;"; // #6 Method #8 #9; // #7 class #10; // #8 NameAndType #11 #12; // #9 Utf8 "java/lang/String"; // #10 Utf8 "codePoints"; // #11 Utf8 "()Ljava/util/stream/IntStream;"; // #12 InvokeDynamic 0s #14; // #13 NameAndType #15 #16; // #14 Utf8 "test"; // #15 Utf8 "()Ljava/util/function/IntPredicate;"; // #16 InterfaceMethod #18 #19; // #17 class #20; // #18 NameAndType #21 #22; // #19 Utf8 "java/util/stream/IntStream"; // #20 Utf8 "filter"; // #21 Utf8 "(Ljava/util/function/IntPredicate;)Ljava/util/stream/IntStream;"; // #22 InvokeDynamic 1s #24; // #23 NameAndType #25 #26; // #24 Utf8 "apply"; // #25 Utf8 "()Ljava/util/function/IntFunction;"; // #26 InterfaceMethod #18 #28; // #27 NameAndType #29 #30; // #28 Utf8 "mapToObj"; // #29 Utf8 "(Ljava/util/function/IntFunction;)Ljava/util/stream/Stream;"; // #30 Method #32 #33; // #31 class #34; // #32 NameAndType #35 #36; // #33 Utf8 "java/util/stream/Collectors"; // #34 Utf8 "joining"; // #35 Utf8 "()Ljava/util/stream/Collector;"; // #36 InterfaceMethod #38 #39; // #37 class #40; // #38 NameAndType #41 #42; // #39 Utf8 "java/util/stream/Stream"; // #40 Utf8 "collect"; // #41 Utf8 "(Ljava/util/stream/Collector;)Ljava/lang/Object;"; // #42 InvokeDynamic 2s #14; // #43 InvokeDynamic 3s #24; // #44 Field #2 #46; // #45 NameAndType #47 #6; // #46 Utf8 "نتیجÛ"; // #47 Method #8 #49; // #48 NameAndType #50 #51; // #49 Utf8 "isEmpty"; // #50 Utf8 "()Z"; // #51 Method #2 #53; // #52 NameAndType #54 #55; // #53 Utf8 "вычиÑлитьБольшиеБуквы"; // #54 Utf8 "()Ljava/lang/String;"; // #55 Method #8 #57; // #56 NameAndType #58 #59; // #57 Utf8 "substring"; // #58 Utf8 "(II)Ljava/lang/String;"; // #59 Method #2 #61; // #60 NameAndType #62 #55; // #61 Utf8 "вычиÑлитьМаленькиеБуквы"; // #62 Method #8 #64; // #63 NameAndType #58 #65; // #64 Utf8 "(I)Ljava/lang/String;"; // #65 InvokeDynamic 4s #67; // #66 NameAndType #68 #69; // #67 Utf8 "makeConcatWithConstants"; // #68 Utf8 "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"; // #69 Method #8 #71; // #70 NameAndType #72 #73; // #71 Utf8 "length"; // #72 Utf8 "()I"; // #73 Field #75 #76; // #74 class #77; // #75 NameAndType #78 #79; // #76 Utf8 "java/lang/System"; // #77 Utf8 "out"; // #78 Utf8 "Ljava/io/PrintStream;"; // #79 InvokeDynamic 5s #81; // #80 NameAndType #68 #82; // #81 Utf8 "(ILjava/lang/String;)Ljava/lang/String;"; // #82 Method #84 #85; // #83 class #86; // #84 NameAndType #87 #88; // #85 Utf8 "java/io/PrintStream"; // #86 Utf8 "println"; // #87 Utf8 "(Ljava/lang/String;)V"; // #88 Method #90 #91; // #89 class #92; // #90 NameAndType #93 #94; // #91 Utf8 "java/lang/Object"; // #92 Utf8 ""; // #93 Utf8 "()V"; // #94 String #96; // #95 Utf8 ""; // #96 Field #2 #98; // #97 NameAndType #99 #6; // #98 Utf8 "ÄŒeÅ¡tinaAlphabet"; // #99 String #101; // #100 Utf8 " "; // #101 Method #8 #103; // #102 NameAndType #104 #69; // #103 Utf8 "replaceAll"; // #104 Field #2 #106; // #105 NameAndType #107 #6; // #106 Utf8 "ქáƒáƒ áƒ—ულიენáƒAlphabet"; // #107 Field #2 #109; // #108 NameAndType #110 #6; // #109 Utf8 "ΕλληνικάAlphabet"; // #110 InvokeDynamic 6s #112; // #111 NameAndType #68 #113; // #112 Utf8 "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"; // #113 Method #115 #116; // #114 class #117; // #115 NameAndType #118 #65; // #116 Utf8 "java/lang/Character"; // #117 Utf8 "toString"; // #118 Method #115 #120; // #119 NameAndType #121 #122; // #120 Utf8 "isLowerCase"; // #121 Utf8 "(I)Z"; // #122 Method #115 #124; // #123 NameAndType #125 #122; // #124 Utf8 "isUpperCase"; // #125 String #127; // #126 Utf8 "A à B C ÄŒ D ÄŽ E É Äš F G H Ch I à J K L M N Ň O Ó P Q R Ř S Å  T Ť U Ú Å® V W X Y à Z Ž a á b c Ä d Ä e é Ä› f g h ch i í j k l m n ň o ó p q r Å™ s Å¡ t Å¥ u ú ů v w x y ý z ž"; // #127 String #129; // #128 Utf8 "á‚  á‚¡ á‚¢ á‚£ Ⴄ á‚¥ Ⴆ á‚§ Ⴈ á‚© Ⴊ á‚« Ⴌ á‚­ á‚® Ⴏ á‚° Ⴑ Ⴒ Ⴓ á‚´ Ⴕ á‚¶ á‚· Ⴘ Ⴙ Ⴚ á‚» Ⴜ Ⴝ Ⴞ á‚¿ Ⴠ რჂ Ⴣ Ⴤ Ⴥ რბ გ დ ე ვ ზ თ ი კ ლ მ ნ რპ ჟ რ ს ტ უ ფ ქ ღ ყ შ ჩ ც ძ წ ჭ ხ ჯ ჰ ჱ ჲ ჳ ჴ ჵ ჶ ჷ ჸ ჹ ჺ ჻ ჼ ჽ ჾ ჿ"; // #129 String #131; // #130 Utf8 "Α α Î’ β Γ γ Δ δ Ε ε Ζ ζ Η η Θ θ Ι ι Κ κ Λ λ Μ μ Πν Ξ ξ Ο ο Π Ï€ Ρ Ï Î£ σ/Ï‚ Τ Ï„ Î¥ Ï… Φ φ Χ χ Ψ ψ Ω ω"; // #131 Utf8 "Code"; // #132 Utf8 "LineNumberTable"; // #133 Utf8 "LocalVariableTable"; // #134 Utf8 "this"; // #135 Utf8 "Lorg/openjdk/asmtools/transform/case7903454/data/Utf8Code;"; // #136 Utf8 "calculate"; // #137 Utf8 "I"; // #138 Utf8 "StackMapTable"; // #139 Utf8 "lambda$вычиÑлитьМаленькиеБуквы$3"; // #140 Utf8 "cp"; // #141 Utf8 "lambda$вычиÑлитьМаленькиеБуквы$2"; // #142 Utf8 "lambda$вычиÑлитьБольшиеБуквы$1"; // #143 Utf8 "lambda$вычиÑлитьБольшиеБуквы$0"; // #144 Utf8 ""; // #145 Utf8 "SourceFile"; // #146 Utf8 "Utf8Code.java"; // #147 Utf8 "BootstrapMethods"; // #148 MethodHandle 6b #150; // #149 Method #151 #152; // #150 class #153; // #151 NameAndType #154 #155; // #152 Utf8 "java/lang/invoke/LambdaMetafactory"; // #153 Utf8 "metafactory"; // #154 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; // #155 MethodType #122; // #156 MethodHandle 6b #158; // #157 Method #2 #159; // #158 NameAndType #144 #122; // #159 MethodType #161; // #160 Utf8 "(I)Ljava/lang/Object;"; // #161 MethodHandle 6b #163; // #162 Method #2 #164; // #163 NameAndType #143 #65; // #164 MethodType #65; // #165 MethodHandle 6b #167; // #166 Method #2 #168; // #167 NameAndType #142 #122; // #168 MethodHandle 6b #170; // #169 Method #2 #171; // #170 NameAndType #140 #65; // #171 MethodHandle 6b #173; // #172 Method #174 #175; // #173 class #176; // #174 NameAndType #68 #177; // #175 Utf8 "java/lang/invoke/StringConcatFactory"; // #176 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #177 String #179; // #178 Utf8 "\u0001\u0001"; // #179 String #181; // #180 Utf8 "\u0001 \u0001"; // #181 String #183; // #182 Utf8 "\u0001\u0001\u0001"; // #183 Utf8 "InnerClasses"; // #184 class #186; // #185 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #186 class #188; // #187 Utf8 "java/lang/invoke/MethodHandles"; // #188 Utf8 "Lookup"; // #189 Utf8 "SourceDebugExtension"; // #190 } 0x0021; // access #2; // this_cpx #90; // super_cpx [] { // Interfaces } // end of Interfaces [] { // Fields { // field 0x0008; // access #99; // name_index #6; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0008; // access #107; // name_index #6; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0008; // access #110; // name_index #6; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0000; // access #5; // name_index #6; // descriptor_index [] { // Attributes } // end of Attributes } ; { // field 0x0002; // access #47; // name_index #6; // descriptor_index [] { // Attributes } // end of Attributes } } // end of Fields [] { // Methods { // method 0x0002; // access #54; // name_index #55; // descriptor_index [] { // Attributes Attr(#132) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2AB40001B60007BA; 0x000D0000B9001102; 0x00BA00170000B900; 0x1B0200B8001FB900; 0x250200C00008B0; } [] { // Traps } // end of Traps [] { // Attributes Attr(#133) { // LineNumberTable [] { // line_number_table 0 21; 27 22; 38 21; } } // end of LineNumberTable ; Attr(#134) { // LocalVariableTable [] { // LocalVariableTable 0 39 135 136 0; } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0002; // access #62; // name_index #55; // descriptor_index [] { // Attributes Attr(#132) { // Code 2; // max_stack 1; // max_locals Bytes[]{ 0x2AB40001B60007BA; 0x002B0000B9001102; 0x00BA002C0000B900; 0x1B0200B8001FB900; 0x250200C00008B0; } [] { // Traps } // end of Traps [] { // Attributes Attr(#133) { // LineNumberTable [] { // line_number_table 0 26; 27 27; 38 26; } } // end of LineNumberTable ; Attr(#134) { // LocalVariableTable [] { // LocalVariableTable 0 39 135 136 0; } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0001; // access #137; // name_index #73; // descriptor_index [] { // Attributes Attr(#132) { // Code 4; // max_stack 2; // max_locals Bytes[]{ 0x2AB4002DB6003099; 0x001F2A2AB6003403; 0x1014B600382AB600; 0x3C105AB6003FBA00; 0x420000B5002D2AB4; 0x002DB600463CB200; 0x4A1B2AB4002DBA00; 0x500000B600531BAC; } [] { // Traps } // end of Traps [] { // Attributes Attr(#133) { // LineNumberTable [] { // line_number_table 0 31; 10 32; 38 33; 46 34; 62 35; } } // end of LineNumberTable ; Attr(#134) { // LocalVariableTable [] { // LocalVariableTable 0 64 135 136 0; 46 18 72 138 1; } } // end of LocalVariableTable ; Attr(#139) { // StackMapTable [] { // 38b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0001; // access #93; // name_index #94; // descriptor_index [] { // Attributes Attr(#132) { // Code 6; // max_stack 1; // max_locals Bytes[]{ 0x2AB700592A125FB5; 0x002D2AB200611264; 0x125FB60066B20069; 0x1264125FB60066B2; 0x006C1264125FB600; 0x66BA006F0000B500; 0x01B1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#133) { // LineNumberTable [] { // line_number_table 0 38; 4 18; 10 39; 28 40; 38 41; 49 42; } } // end of LineNumberTable ; Attr(#134) { // LocalVariableTable [] { // LocalVariableTable 0 50 135 136 0; } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x100A; // access #140; // name_index #65; // descriptor_index [] { // Attributes Attr(#132) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x1AB80072B0; } [] { // Traps } // end of Traps [] { // Attributes Attr(#133) { // LineNumberTable [] { // line_number_table 0 26; } } // end of LineNumberTable ; Attr(#134) { // LocalVariableTable [] { // LocalVariableTable 0 5 141 138 0; } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x100A; // access #142; // name_index #122; // descriptor_index [] { // Attributes Attr(#132) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x1AB80077AC; } [] { // Traps } // end of Traps [] { // Attributes Attr(#133) { // LineNumberTable [] { // line_number_table 0 26; } } // end of LineNumberTable ; Attr(#134) { // LocalVariableTable [] { // LocalVariableTable 0 5 141 138 0; } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x100A; // access #143; // name_index #65; // descriptor_index [] { // Attributes Attr(#132) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x1AB80072B0; } [] { // Traps } // end of Traps [] { // Attributes Attr(#133) { // LineNumberTable [] { // line_number_table 0 21; } } // end of LineNumberTable ; Attr(#134) { // LocalVariableTable [] { // LocalVariableTable 0 5 141 138 0; } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x100A; // access #144; // name_index #122; // descriptor_index [] { // Attributes Attr(#132) { // Code 1; // max_stack 1; // max_locals Bytes[]{ 0x1AB8007BAC; } [] { // Traps } // end of Traps [] { // Attributes Attr(#133) { // LineNumberTable [] { // line_number_table 0 21; } } // end of LineNumberTable ; Attr(#134) { // LocalVariableTable [] { // LocalVariableTable 0 5 141 138 0; } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method 0x0008; // access #145; // name_index #94; // descriptor_index [] { // Attributes Attr(#132) { // Code 1; // max_stack 0; // max_locals Bytes[]{ 0x127EB300611280B3; 0x00691282B3006CB1; } [] { // Traps } // end of Traps [] { // Attributes Attr(#133) { // LineNumberTable [] { // line_number_table 0 6; 5 10; 10 14; } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [] { // Attributes Attr(#146) { // SourceFile #147; } // end of SourceFile ; Attr(#148) { // BootstrapMethods [] { // bootstrap_methods { // bootstrap_method #149; // bootstrap_method_ref [] { // bootstrap_arguments #156; #157; #156; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #149; // bootstrap_method_ref [] { // bootstrap_arguments #160; #162; #165; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #149; // bootstrap_method_ref [] { // bootstrap_arguments #156; #166; #156; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #149; // bootstrap_method_ref [] { // bootstrap_arguments #160; #169; #165; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #172; // bootstrap_method_ref [] { // bootstrap_arguments #178; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #172; // bootstrap_method_ref [] { // bootstrap_arguments #180; } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #172; // bootstrap_method_ref [] { // bootstrap_arguments #182; } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#184) { // InnerClasses [] { // classes #185 #187 #189 25; } } // end of InnerClasses ; Attr(#190) { // SourceDebugExtension "\u0000\tThe Memory Model determines what values can be read at every point in the program.\n"; "The actions of each thread in isolation must behave as governed by the semantics of "; "that thread, with the exception that the values seen by each read are determined by "; "the memory model.\nWhen we refer to this, we say that the program obeys intra-thread "; "semantics.\n\tIntra-thread semantics are the semantics for single-threaded programs, "; "and allow the complete prediction of the behavior of a thread based on the values "; "seen by read actions within the thread.\n\tTo determine if the actions of thread \'t\' in "; "an execution are legal, we simply evaluate the implementation of thread \"t\" as it would "; "be performed in a single-threaded context, as defined in the rest of this specification."; } // end of SourceDebugExtension } // end of Attributes } Utf8CodeBroken01.class.jasm000066400000000000000000000313101514323636100357250ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7903454/data/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // SourceDebugExtension has broken Utf 8 string. package org/openjdk/asmtools/transform/case7903454/data; public super class Utf8CodeBroken01 version 61:0 { static Field ÄŒeÅ¡tinaAlphabet:"Ljava/lang/String;"; static Field ქáƒáƒ áƒ—ულიენáƒAlphabet:"Ljava/lang/String;"; static Field ΕλληνικάAlphabet:"Ljava/lang/String;"; Field line:"Ljava/lang/String;"; private Field نتیجÛ:"Ljava/lang/String;"; private Method вычиÑлитьБольшиеБуквы:"()Ljava/lang/String;" stack 2 locals 1 { aload_0; getfield Field line:"Ljava/lang/String;"; invokevirtual Method java/lang/String.codePoints:"()Ljava/util/stream/IntStream;"; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/LambdaMetafactory.metafactory: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;": test:"()Ljava/util/function/IntPredicate;" { MethodType "(I)Z", MethodHandle REF_invokeStatic:Method Utf8CodeBroken01.lambda$вычиÑлитьБольшиеБуквы$0:"(I)Z", MethodType "(I)Z" }; invokeinterface InterfaceMethod java/util/stream/IntStream.filter:"(Ljava/util/function/IntPredicate;)Ljava/util/stream/IntStream;", 2; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/LambdaMetafactory.metafactory: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;": apply:"()Ljava/util/function/IntFunction;" { MethodType "(I)Ljava/lang/Object;", MethodHandle REF_invokeStatic:Method Utf8CodeBroken01.lambda$вычиÑлитьБольшиеБуквы$1:"(I)Ljava/lang/String;", MethodType "(I)Ljava/lang/String;" }; invokeinterface InterfaceMethod java/util/stream/IntStream.mapToObj:"(Ljava/util/function/IntFunction;)Ljava/util/stream/Stream;", 2; invokestatic Method java/util/stream/Collectors.joining:"()Ljava/util/stream/Collector;"; invokeinterface InterfaceMethod java/util/stream/Stream.collect:"(Ljava/util/stream/Collector;)Ljava/lang/Object;", 2; checkcast class java/lang/String; areturn; } private Method вычиÑлитьМаленькиеБуквы:"()Ljava/lang/String;" stack 2 locals 1 { aload_0; getfield Field line:"Ljava/lang/String;"; invokevirtual Method java/lang/String.codePoints:"()Ljava/util/stream/IntStream;"; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/LambdaMetafactory.metafactory: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;": test:"()Ljava/util/function/IntPredicate;" { MethodType "(I)Z", MethodHandle REF_invokeStatic:Method Utf8CodeBroken01.lambda$вычиÑлитьМаленькиеБуквы$2:"(I)Z", MethodType "(I)Z" }; invokeinterface InterfaceMethod java/util/stream/IntStream.filter:"(Ljava/util/function/IntPredicate;)Ljava/util/stream/IntStream;", 2; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/LambdaMetafactory.metafactory: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;": apply:"()Ljava/util/function/IntFunction;" { MethodType "(I)Ljava/lang/Object;", MethodHandle REF_invokeStatic:Method Utf8CodeBroken01.lambda$вычиÑлитьМаленькиеБуквы$3:"(I)Ljava/lang/String;", MethodType "(I)Ljava/lang/String;" }; invokeinterface InterfaceMethod java/util/stream/IntStream.mapToObj:"(Ljava/util/function/IntFunction;)Ljava/util/stream/Stream;", 2; invokestatic Method java/util/stream/Collectors.joining:"()Ljava/util/stream/Collector;"; invokeinterface InterfaceMethod java/util/stream/Stream.collect:"(Ljava/util/stream/Collector;)Ljava/lang/Object;", 2; checkcast class java/lang/String; areturn; } public Method calculate:"()I" stack 4 locals 2 { aload_0; getfield Field نتیجÛ:"Ljava/lang/String;"; invokevirtual Method java/lang/String.isEmpty:"()Z"; ifeq L38; aload_0; aload_0; invokevirtual Method вычиÑлитьБольшиеБуквы:"()Ljava/lang/String;"; iconst_0; bipush 20; invokevirtual Method java/lang/String.substring:"(II)Ljava/lang/String;"; aload_0; invokevirtual Method вычиÑлитьМаленькиеБуквы:"()Ljava/lang/String;"; bipush 90; invokevirtual Method java/lang/String.substring:"(I)Ljava/lang/String;"; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" { String "\u0001\u0001" }; putfield Field نتیجÛ:"Ljava/lang/String;"; L38: stack_frame_type same; aload_0; getfield Field نتیجÛ:"Ljava/lang/String;"; invokevirtual Method java/lang/String.length:"()I"; istore_1; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; iload_1; aload_0; getfield Field نتیجÛ:"Ljava/lang/String;"; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(ILjava/lang/String;)Ljava/lang/String;" { String "\u0001 \u0001" }; invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V"; iload_1; ireturn; } public Method "":"()V" stack 6 locals 1 { aload_0; invokespecial Method java/lang/Object."":"()V"; aload_0; ldc String ""; putfield Field نتیجÛ:"Ljava/lang/String;"; aload_0; getstatic Field ÄŒeÅ¡tinaAlphabet:"Ljava/lang/String;"; ldc String " "; ldc String ""; invokevirtual Method java/lang/String.replaceAll:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"; getstatic Field ქáƒáƒ áƒ—ულიენáƒAlphabet:"Ljava/lang/String;"; ldc String " "; ldc String ""; invokevirtual Method java/lang/String.replaceAll:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"; getstatic Field ΕλληνικάAlphabet:"Ljava/lang/String;"; ldc String " "; ldc String ""; invokevirtual Method java/lang/String.replaceAll:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"; invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": makeConcatWithConstants:"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" { String "\u0001\u0001\u0001" }; putfield Field line:"Ljava/lang/String;"; return; } private static synthetic Method lambda$вычиÑлитьМаленькиеБуквы$3:"(I)Ljava/lang/String;" stack 1 locals 1 { iload_0; invokestatic Method java/lang/Character.toString:"(I)Ljava/lang/String;"; areturn; } private static synthetic Method lambda$вычиÑлитьМаленькиеБуквы$2:"(I)Z" stack 1 locals 1 { iload_0; invokestatic Method java/lang/Character.isLowerCase:"(I)Z"; ireturn; } private static synthetic Method lambda$вычиÑлитьБольшиеБуквы$1:"(I)Ljava/lang/String;" stack 1 locals 1 { iload_0; invokestatic Method java/lang/Character.toString:"(I)Ljava/lang/String;"; areturn; } private static synthetic Method lambda$вычиÑлитьБольшиеБуквы$0:"(I)Z" stack 1 locals 1 { iload_0; invokestatic Method java/lang/Character.isUpperCase:"(I)Z"; ireturn; } static Method "":"()V" stack 1 locals 0 { ldc String "A à B C ÄŒ D ÄŽ E É Äš F G H Ch I à J K L M N Ň O Ó P Q R Ř S Å  T Ť U Ú Å® V W X Y à Z Ž a á b c Ä d Ä e é Ä› f g h ch i í j k l m n ň o ó p q r Å™ s Å¡ t Å¥ u ú ů v w x y ý z ž"; putstatic Field ÄŒeÅ¡tinaAlphabet:"Ljava/lang/String;"; ldc String "á‚  á‚¡ á‚¢ á‚£ Ⴄ á‚¥ Ⴆ á‚§ Ⴈ á‚© Ⴊ á‚« Ⴌ á‚­ á‚® Ⴏ á‚° Ⴑ Ⴒ Ⴓ á‚´ Ⴕ á‚¶ á‚· Ⴘ Ⴙ Ⴚ á‚» Ⴜ Ⴝ Ⴞ á‚¿ Ⴠ რჂ Ⴣ Ⴤ Ⴥ რბ გ დ ე ვ ზ თ ი კ ლ მ ნ რპ ჟ რ ს ტ უ ფ ქ ღ ყ შ ჩ ც ძ წ ჭ ხ ჯ ჰ ჱ ჲ ჳ ჴ ჵ ჶ ჷ ჸ ჹ ჺ ჻ ჼ ჽ ჾ ჿ"; putstatic Field ქáƒáƒ áƒ—ულიენáƒAlphabet:"Ljava/lang/String;"; ldc String "Α α Î’ β Γ γ Δ δ Ε ε Ζ ζ Η η Θ θ Ι ι Κ κ Λ λ Μ μ Πν Ξ ξ Ο ο Π Ï€ Ρ Ï Î£ σ/Ï‚ Τ Ï„ Î¥ Ï… Φ φ Χ χ Ψ ψ Ω ω"; putstatic Field ΕλληνικάAlphabet:"Ljava/lang/String;"; return; } SourceFile "Utf8CodeBroken01.java"; public static final InnerClass Lookup = class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles; BootstrapMethod #89 #86; BootstrapMethod #89 #56; BootstrapMethod #54 #55 #73 #55; BootstrapMethod #54 #78 #152 #94; BootstrapMethod #54 #78 #50 #94; BootstrapMethod #54 #55 #142 #55; BootstrapMethod #89 #69; SourceDebugExtension { // == The bytes do not represent a valid modified UTF-8 encoding of a Unicode string. == 0x00 0x0A 0x21 0xD0 0xA6 0xD0 0xB8 0xD1 0x82 0xD0 0xB0 0xD1 0x82; 0xD0 0xB0 0x21; } } // end Class Utf8CodeBroken01 compiled from "Utf8CodeBroken01.java" Utf8CodeBroken01.class.jcod000066400000000000000000000650041514323636100357210ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case7903454/data/* * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // SourceDebugExtension has broken Utf 8 string. class org/openjdk/asmtools/transform/case7903454/data/Utf8CodeBroken01 { 0xCAFEBABE; 0; // minor version 61; // version [185] { // Constant Pool ; // first element is empty String #80; // #1 at 0x0A String #137; // #2 at 0x0D String #159; // #3 at 0x10 String #163; // #4 at 0x13 String #115; // #5 at 0x16 Field #109 #81; // #6 at 0x19 InvokeDynamic 0s #164; // #7 at 0x1E InterfaceMethod #119 #101; // #8 at 0x23 Field #109 #68; // #9 at 0x28 Field #109 #116; // #10 at 0x2D Method #87 #158; // #11 at 0x32 Method #109 #75; // #12 at 0x37 Method #31 #44; // #13 at 0x3C Method #87 #61; // #14 at 0x41 Method #109 #134; // #15 at 0x46 Method #87 #123; // #16 at 0x4B Field #109 #139; // #17 at 0x50 Method #165 #57; // #18 at 0x55 InvokeDynamic 1s #125; // #19 at 0x5A InvokeDynamic 2s #179; // #20 at 0x5F InvokeDynamic 3s #88; // #21 at 0x64 Method #31 #130; // #22 at 0x69 InterfaceMethod #47 #93; // #23 at 0x6E InvokeDynamic 4s #88; // #24 at 0x73 Field #176 #171; // #25 at 0x78 Method #74 #95; // #26 at 0x7D InvokeDynamic 5s #179; // #27 at 0x82 InterfaceMethod #119 #118; // #28 at 0x87 Method #31 #107; // #29 at 0x8C Method #31 #177; // #30 at 0x91 class #117; // #31 at 0x96 Method #31 #71; // #32 at 0x99 InvokeDynamic 6s #150; // #33 at 0x9E Method #31 #132; // #34 at 0xA3 Method #128 #133; // #35 at 0xA8 Field #109 #96; // #36 at 0xAD Utf8 "java/lang/Object"; // #37 at 0xB2 Utf8 "makeConcatWithConstants"; // #38 at 0xC5 NameAndType #49 #135; // #39 at 0xDF NameAndType #59 #72; // #40 at 0xE4 Utf8 "()V"; // #41 at 0xE9 Utf8 "InnerClasses"; // #42 at 0xEF Utf8 "(Ljava/util/function/IntPredicate;)Ljava/util/stream/IntStream;"; // #43 at 0xFE NameAndType #183 #67; // #44 at 0x0140 Utf8 ""; // #45 at 0x0145 class #161; // #46 at 0x0150 class #172; // #47 at 0x0153 Utf8 "toString"; // #48 at 0x0156 Utf8 "lambda$вычиÑлитьМаленькиеБуквы$3"; // #49 at 0x0161 MethodHandle 6b #90; // #50 at 0x019B Utf8 "()Ljava/lang/String;"; // #51 at 0x019F Utf8 ""; // #52 at 0x01B6 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; // #53 at 0x01BF MethodHandle 6b #120; // #54 at 0x028E MethodType #72; // #55 at 0x0292 String #160; // #56 at 0x0295 NameAndType #52 #41; // #57 at 0x0298 Utf8 "org/openjdk/asmtools/transform/case7903454/data/Utf8CodeBroken01"; // #58 at 0x029D Utf8 "lambda$вычиÑлитьМаленькиеБуквы$2"; // #59 at 0x02D8 Utf8 "ქáƒáƒ áƒ—ულიენáƒAlphabet"; // #60 at 0x0312 NameAndType #48 #135; // #61 at 0x033B Utf8 "(I)Ljava/lang/Object;"; // #62 at 0x0340 Utf8 "ΕλληνικάAlphabet"; // #63 at 0x0358 Utf8 "(Ljava/lang/String;)V"; // #64 at 0x0373 class #156; // #65 at 0x038B Utf8 "نتیجÛ"; // #66 at 0x038E Utf8 "()I"; // #67 at 0x039B NameAndType #180 #97; // #68 at 0x03A1 String #144; // #69 at 0x03A6 Utf8 "collect"; // #70 at 0x03A9 NameAndType #146 #162; // #71 at 0x03B3 Utf8 "(I)Z"; // #72 at 0x03B8 MethodHandle 6b #102; // #73 at 0x03BF class #110; // #74 at 0x03C3 NameAndType #106 #51; // #75 at 0x03C6 Utf8 "metafactory"; // #76 at 0x03CB Utf8 "SourceFile"; // #77 at 0x03D9 MethodType #62; // #78 at 0x03E6 Utf8 "apply"; // #79 at 0x03E9 Utf8 "Α α Î’ β Γ γ Δ δ Ε ε Ζ ζ Η η Θ θ Ι ι Κ κ Λ λ Μ μ Πν Ξ ξ Ο ο Π Ï€ Ρ Ï Î£ σ/Ï‚ Τ Ï„ Î¥ Ï… Φ φ Χ χ Ψ ψ Ω ω"; // #80 at 0x03F1 NameAndType #60 #97; // #81 at 0x0486 Utf8 "mapToObj"; // #82 at 0x048B class #108; // #83 at 0x0496 Utf8 "(Ljava/util/stream/Collector;)Ljava/lang/Object;"; // #84 at 0x0499 NameAndType #38 #126; // #85 at 0x04CC String #124; // #86 at 0x04D1 class #145; // #87 at 0x04D4 NameAndType #79 #153; // #88 at 0x04D7 MethodHandle 6b #147; // #89 at 0x04DC Method #109 #98; // #90 at 0x04E0 Utf8 "(II)Ljava/lang/String;"; // #91 at 0x04E5 NameAndType #76 #53; // #92 at 0x04FE NameAndType #70 #84; // #93 at 0x0503 MethodType #135; // #94 at 0x0508 NameAndType #184 #151; // #95 at 0x050B NameAndType #66 #97; // #96 at 0x0510 Utf8 "Ljava/lang/String;"; // #97 at 0x0515 NameAndType #143 #135; // #98 at 0x052A NameAndType #154 #72; // #99 at 0x052F Utf8 "out"; // #100 at 0x0534 NameAndType #82 #121; // #101 at 0x053A Method #109 #99; // #102 at 0x053F Utf8 "java/lang/System"; // #103 at 0x0544 Utf8 "test"; // #104 at 0x0557 Method #109 #39; // #105 at 0x055E Utf8 "вычиÑлитьБольшиеБуквы"; // #106 at 0x0563 NameAndType #181 #135; // #107 at 0x0590 Utf8 "java/lang/invoke/StringConcatFactory"; // #108 at 0x0595 class #58; // #109 at 0x05BC Utf8 "java/util/stream/Collectors"; // #110 at 0x05BF Utf8 "isUpperCase"; // #111 at 0x05DD Utf8 "()Ljava/util/function/IntPredicate;"; // #112 at 0x05EB Utf8 "вычиÑлитьМаленькиеБуквы"; // #113 at 0x0611 Utf8 "calculate"; // #114 at 0x0642 Utf8 "A à B C ÄŒ D ÄŽ E É Äš F G H Ch I à J K L M N Ň O Ó P Q R Ř S Å  T Ť U Ú Å® V W X Y à Z Ž a á b c Ä d Ä e é Ä› f g h ch i í j k l m n ň o ó p q r Å™ s Å¡ t Å¥ u ú ů v w x y ý z ž"; // #115 at 0x064E NameAndType #63 #97; // #116 at 0x0718 Utf8 "java/lang/String"; // #117 at 0x071D NameAndType #173 #43; // #118 at 0x0730 class #178; // #119 at 0x0735 Method #65 #92; // #120 at 0x0738 Utf8 "(Ljava/util/function/IntFunction;)Ljava/util/stream/Stream;"; // #121 at 0x073D Method #109 #40; // #122 at 0x077B NameAndType #149 #72; // #123 at 0x0780 Utf8 "\u0001 \u0001"; // #124 at 0x0785 NameAndType #38 #162; // #125 at 0x078B Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #126 at 0x0790 class #140; // #127 at 0x082B class #131; // #128 at 0x082E Utf8 "ÄŒeÅ¡tinaAlphabet"; // #129 at 0x0831 NameAndType #136 #138; // #130 at 0x0845 Utf8 "java/io/PrintStream"; // #131 at 0x084A NameAndType #181 #91; // #132 at 0x0860 NameAndType #167 #64; // #133 at 0x0865 NameAndType #113 #51; // #134 at 0x086A Utf8 "(I)Ljava/lang/String;"; // #135 at 0x086F Utf8 "isEmpty"; // #136 at 0x0887 Utf8 "á‚  á‚¡ á‚¢ á‚£ Ⴄ á‚¥ Ⴆ á‚§ Ⴈ á‚© Ⴊ á‚« Ⴌ á‚­ á‚® Ⴏ á‚° Ⴑ Ⴒ Ⴓ á‚´ Ⴕ á‚¶ á‚· Ⴘ Ⴙ Ⴚ á‚» Ⴜ Ⴝ Ⴞ á‚¿ Ⴠ რჂ Ⴣ Ⴤ Ⴥ რბ გ დ ე ვ ზ თ ი კ ლ მ ნ რპ ჟ რ ს ტ უ ფ ქ ღ ყ შ ჩ ც ძ წ ჭ ხ ჯ ჰ ჱ ჲ ჳ ჴ ჵ ჶ ჷ ჸ ჹ ჺ ჻ ჼ ჽ ჾ ჿ"; // #137 at 0x0891 Utf8 "()Z"; // #138 at 0x09EB NameAndType #129 #97; // #139 at 0x09F1 Utf8 "java/lang/invoke/MethodHandles"; // #140 at 0x09F6 Utf8 "StackMapTable"; // #141 at 0x0A17 MethodHandle 6b #122; // #142 at 0x0A27 Utf8 "lambda$вычиÑлитьБольшиеБуквы$1"; // #143 at 0x0A2B Utf8 "\u0001\u0001\u0001"; // #144 at 0x0A61 Utf8 "java/lang/Character"; // #145 at 0x0A67 Utf8 "replaceAll"; // #146 at 0x0A7D Method #83 #85; // #147 at 0x0A8A Utf8 "()Ljava/util/stream/IntStream;"; // #148 at 0x0A8F Utf8 "isLowerCase"; // #149 at 0x0AB0 NameAndType #38 #169; // #150 at 0x0ABE Utf8 "()Ljava/util/stream/Collector;"; // #151 at 0x0AC3 MethodHandle 6b #105; // #152 at 0x0AE4 Utf8 "()Ljava/util/function/IntFunction;"; // #153 at 0x0AE8 Utf8 "lambda$вычиÑлитьБольшиеБуквы$0"; // #154 at 0x0B0D Utf8 "codePoints"; // #155 at 0x0B43 Utf8 "java/lang/invoke/LambdaMetafactory"; // #156 at 0x0B50 Utf8 "Utf8CodeBroken01.java"; // #157 at 0x0B75 NameAndType #111 #72; // #158 at 0x0B85 Utf8 " "; // #159 at 0x0B8A Utf8 "\u0001\u0001"; // #160 at 0x0B8E Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #161 at 0x0B93 Utf8 "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"; // #162 at 0x0BBB Utf8 ""; // #163 at 0x0BF6 NameAndType #38 #166; // #164 at 0x0BF9 class #37; // #165 at 0x0BFE Utf8 "(ILjava/lang/String;)Ljava/lang/String;"; // #166 at 0x0C01 Utf8 "println"; // #167 at 0x0C2B Utf8 "SourceDebugExtension"; // #168 at 0x0C35 Utf8 "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"; // #169 at 0x0C4C Utf8 "Code"; // #170 at 0x0C99 NameAndType #100 #175; // #171 at 0x0CA0 Utf8 "java/util/stream/Stream"; // #172 at 0x0CA5 Utf8 "filter"; // #173 at 0x0CBF Utf8 "Lookup"; // #174 at 0x0CC8 Utf8 "Ljava/io/PrintStream;"; // #175 at 0x0CD1 class #103; // #176 at 0x0CE9 NameAndType #155 #148; // #177 at 0x0CEC Utf8 "java/util/stream/IntStream"; // #178 at 0x0CF1 NameAndType #104 #112; // #179 at 0x0D0E Utf8 "line"; // #180 at 0x0D13 Utf8 "substring"; // #181 at 0x0D1A Utf8 "BootstrapMethods"; // #182 at 0x0D26 Utf8 "length"; // #183 at 0x0D39 Utf8 "joining"; // #184 at 0x0D42 } // end of Constant Pool 0x0021; // access [ ACC_PUBLIC, ACC_SUPER ] #109; // this_cpx #165; // super_cpx [0] { // Interfaces } // end of Interfaces [5] { // Fields { // field at 0x0D56 0x0008; // access #129; // name_index : ÄŒeÅ¡tinaAlphabet #97; // descriptor_index : Ljava/lang/String; [0] { // Attributes } // end of Attributes } ; { // field at 0x0D5E 0x0008; // access #60; // name_index : ქáƒáƒ áƒ—ულიენáƒAlphabet #97; // descriptor_index : Ljava/lang/String; [0] { // Attributes } // end of Attributes } ; { // field at 0x0D66 0x0008; // access #63; // name_index : ΕλληνικάAlphabet #97; // descriptor_index : Ljava/lang/String; [0] { // Attributes } // end of Attributes } ; { // field at 0x0D6E 0x0000; // access #180; // name_index : line #97; // descriptor_index : Ljava/lang/String; [0] { // Attributes } // end of Attributes } ; { // field at 0x0D76 0x0002; // access #66; // name_index : Ù†ØªÛŒØ¬Û #97; // descriptor_index : Ljava/lang/String; [0] { // Attributes } // end of Attributes } } // end of Fields [9] { // Methods { // method at 0x0D80 0x0002; // access #106; // name_index : вычиÑлитьБольшиеБуквы #51; // descriptor_index : ()Ljava/lang/String; [1] { // Attributes Attr(#170, 51) { // Code at 0x0D88 2; // max_stack 1; // max_locals Bytes[39]{ 0x2AB40009B6001EBA; 0x00140000B9001C02; 0x00BA00180000B900; 0x080200B8001AB900; 0x170200C0001FB0; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0DC1 0x0002; // access #113; // name_index : вычиÑлитьМаленькиеБуквы #51; // descriptor_index : ()Ljava/lang/String; [1] { // Attributes Attr(#170, 51) { // Code at 0x0DC9 2; // max_stack 1; // max_locals Bytes[39]{ 0x2AB40009B6001EBA; 0x001B0000B9001C02; 0x00BA00150000B900; 0x080200B8001AB900; 0x170200C0001FB0; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0E02 0x0001; // access #114; // name_index : calculate #67; // descriptor_index : ()I [1] { // Attributes Attr(#170, 85) { // Code at 0x0E0A 4; // max_stack 2; // max_locals Bytes[64]{ 0x2AB40024B6001699; 0x001F2A2AB6000C03; 0x1014B600222AB600; 0x0F105AB6001DBA00; 0x130000B500242AB4; 0x0024B6000D3CB200; 0x191B2AB40024BA00; 0x070000B600231BAC; } [0] { // Traps } // end of Traps [1] { // Attributes Attr(#141, 3) { // StackMapTable at 0x0E5C [1] { // 38b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0E65 0x0001; // access #52; // name_index : #41; // descriptor_index : ()V [1] { // Attributes Attr(#170, 62) { // Code at 0x0E6D 6; // max_stack 1; // max_locals Bytes[50]{ 0x2AB700122A1204B5; 0x00242AB200111203; 0x1204B60020B20006; 0x12031204B60020B2; 0x000A12031204B600; 0x20BA00210000B500; 0x09B1; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0EB1 0x100A; // access #49; // name_index : lambda$вычиÑлитьМаленькиеБуквы$3 #135; // descriptor_index : (I)Ljava/lang/String; [1] { // Attributes Attr(#170, 17) { // Code at 0x0EB9 1; // max_stack 1; // max_locals Bytes[5]{ 0x1AB8000EB0; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0ED0 0x100A; // access #59; // name_index : lambda$вычиÑлитьМаленькиеБуквы$2 #72; // descriptor_index : (I)Z [1] { // Attributes Attr(#170, 17) { // Code at 0x0ED8 1; // max_stack 1; // max_locals Bytes[5]{ 0x1AB80010AC; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0EEF 0x100A; // access #143; // name_index : lambda$вычиÑлитьБольшиеБуквы$1 #135; // descriptor_index : (I)Ljava/lang/String; [1] { // Attributes Attr(#170, 17) { // Code at 0x0EF7 1; // max_stack 1; // max_locals Bytes[5]{ 0x1AB8000EB0; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0F0E 0x100A; // access #154; // name_index : lambda$вычиÑлитьБольшиеБуквы$0 #72; // descriptor_index : (I)Z [1] { // Attributes Attr(#170, 17) { // Code at 0x0F16 1; // max_stack 1; // max_locals Bytes[5]{ 0x1AB8000BAC; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0F2D 0x0008; // access #45; // name_index : #41; // descriptor_index : ()V [1] { // Attributes Attr(#170, 28) { // Code at 0x0F35 1; // max_stack 0; // max_locals Bytes[16]{ 0x1205B300111202B3; 0x00061201B3000AB1; } [0] { // Traps } // end of Traps [0] { // Attributes } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [4] { // Attributes Attr(#77, 2) { // SourceFile at 0x0F59 #157; } // end of SourceFile ; Attr(#168, 16) { // SourceDebugExtension at 0x0F61 // == The bytes do not represent a valid modified UTF-8 encoding of a Unicode string. == 0x00 0x0A 0x21 0xD0 0xA6 0xD0 0xB8 0xD1 0x82 0xD0 0xB0 0xD1 0x82 0xD0; 0xB0 0x21; } // end of SourceDebugExtension ; Attr(#42, 10) { // InnerClasses at 0x0F77 [1] { // classes #46 #127 #174 25; // at 0x0F87 } } // end of InnerClasses ; Attr(#182, 60) { // BootstrapMethods at 0x0F87 [7] { // bootstrap_methods { // bootstrap_method #89; // bootstrap_method_ref [1] { // bootstrap_arguments #86; // at 0x0F95 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #89; // bootstrap_method_ref [1] { // bootstrap_arguments #56; // at 0x0F9B } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #54; // bootstrap_method_ref [3] { // bootstrap_arguments #55; // at 0x0FA1 #73; // at 0x0FA3 #55; // at 0x0FA5 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #54; // bootstrap_method_ref [3] { // bootstrap_arguments #78; // at 0x0FAB #152; // at 0x0FAD #94; // at 0x0FAF } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #54; // bootstrap_method_ref [3] { // bootstrap_arguments #78; // at 0x0FB5 #50; // at 0x0FB7 #94; // at 0x0FB9 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #54; // bootstrap_method_ref [3] { // bootstrap_arguments #55; // at 0x0FBF #142; // at 0x0FC1 #55; // at 0x0FC3 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #89; // bootstrap_method_ref [1] { // bootstrap_arguments #69; // at 0x0FC9 } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods } // end of Attributes } // end of class org/openjdk/asmtools/transform/case7903454/data/Utf8CodeBroken01 jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case8302260/000077500000000000000000000000001514323636100301575ustar00rootroot00000000000000TestRunner.class.jasm000066400000000000000000001226201514323636100341740ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case8302260// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // package org/openjdk/asmtools/transform/case8302260; public super class #7 /* TestRunner */ implements #157 /* org/openjdk/asmtools/lib/transform/ITestRunner */ version 60:0 { const #1 = Method #2.#3; // java/lang/Object."":"()V" const #2 = class #4; // java/lang/Object const #3 = NameAndType #5:#6; // "":"()V" const #4 = Asciz "java/lang/Object"; const #5 = Asciz ""; const #6 = Asciz "()V"; const #7 = class #8; // TestRunner const #8 = Asciz "org/openjdk/asmtools/transform/case8302260/TestRunner"; const #9 = Method #10.#11; // java/lang/Class.getPackageName:"()Ljava/lang/String;" const #10 = class #12; // java/lang/Class const #11 = NameAndType #13:#14; // getPackageName:"()Ljava/lang/String;" const #12 = Asciz "java/lang/Class"; const #13 = Asciz "getPackageName"; const #14 = Asciz "()Ljava/lang/String;"; const #15 = InvokeDynamic 0:#16; // #0:makeConcatWithConstants:"(Ljava/lang/String;)Ljava/lang/String;" const #16 = NameAndType #17:#18; // makeConcatWithConstants:"(Ljava/lang/String;)Ljava/lang/String;" const #17 = Asciz "makeConcatWithConstants"; const #18 = Asciz "(Ljava/lang/String;)Ljava/lang/String;"; const #19 = Field #7.#20; // TestRunner.superPackage:"Ljava/lang/String;" const #20 = NameAndType #21:#22; // superPackage:"Ljava/lang/String;" const #21 = Asciz "superPackage"; const #22 = Asciz "Ljava/lang/String;"; const #23 = class #24; // org/openjdk/asmtools/transform/case8302260/data/CTestClass const #24 = Asciz "org/openjdk/asmtools/transform/case8302260/data/CTestClass"; const #25 = String #26; // "stringField" const #26 = Asciz "stringField"; const #27 = class #28; // java/lang/String const #28 = Asciz "java/lang/String"; const #29 = Method #7.#30; // TestRunner.testFieldRef:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" const #30 = NameAndType #31:#32; // testFieldRef:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" const #31 = Asciz "testFieldRef"; const #32 = Asciz "(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;"; const #33 = String #34; // "CTestClass" const #34 = Asciz "CTestClass"; const #35 = InterfaceMethod #36.#37; // java/lang/constant/ClassDesc.of:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/constant/ClassDesc;" const #36 = class #38; // java/lang/constant/ClassDesc const #37 = NameAndType #39:#40; // of:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/constant/ClassDesc;" const #38 = Asciz "java/lang/constant/ClassDesc"; const #39 = Asciz "of"; const #40 = Asciz "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/constant/ClassDesc;"; const #41 = Field #42.#43; // java/lang/constant/ConstantDescs.CD_String:"Ljava/lang/constant/ClassDesc;" const #42 = class #44; // java/lang/constant/ConstantDescs const #43 = NameAndType #45:#46; // CD_String:"Ljava/lang/constant/ClassDesc;" const #44 = Asciz "java/lang/constant/ConstantDescs"; const #45 = Asciz "CD_String"; const #46 = Asciz "Ljava/lang/constant/ClassDesc;"; const #47 = Method #7.#48; // TestRunner.testFieldValue:"(Ljava/lang/invoke/VarHandle;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)V" const #48 = NameAndType #49:#50; // testFieldValue:"(Ljava/lang/invoke/VarHandle;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)V" const #49 = Asciz "testFieldValue"; const #50 = Asciz "(Ljava/lang/invoke/VarHandle;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)V"; const #51 = String #52; // "longField" const #52 = Asciz "longField"; const #53 = Field #54.#55; // java/lang/Long.TYPE:"Ljava/lang/Class;" const #54 = class #56; // java/lang/Long const #55 = NameAndType #57:#58; // TYPE:"Ljava/lang/Class;" const #56 = Asciz "java/lang/Long"; const #57 = Asciz "TYPE"; const #58 = Asciz "Ljava/lang/Class;"; const #59 = Field #42.#60; // java/lang/constant/ConstantDescs.CD_long:"Ljava/lang/constant/ClassDesc;" const #60 = NameAndType #61:#46; // CD_long:"Ljava/lang/constant/ClassDesc;" const #61 = Asciz "CD_long"; const #62 = String #63; // "stringField2" const #63 = Asciz "stringField2"; const #64 = String #65; // "longField2" const #65 = Asciz "longField2"; const #66 = String #67; // "stringField3" const #67 = Asciz "stringField3"; const #68 = String #69; // "longField3" const #69 = Asciz "longField3"; const #70 = Field #71.#72; // java/lang/System.out:"Ljava/io/PrintStream;" const #71 = class #73; // java/lang/System const #72 = NameAndType #74:#75; // out:"Ljava/io/PrintStream;" const #73 = Asciz "java/lang/System"; const #74 = Asciz "out"; const #75 = Asciz "Ljava/io/PrintStream;"; const #76 = Method #77.#78; // java/lang/invoke/VarHandle.get:"()Ljava/lang/Object;" const #77 = class #79; // java/lang/invoke/VarHandle const #78 = NameAndType #80:#81; // get:"()Ljava/lang/Object;" const #79 = Asciz "java/lang/invoke/VarHandle"; const #80 = Asciz "get"; const #81 = Asciz "()Ljava/lang/Object;"; const #82 = InvokeDynamic 1:#83; // #1:makeConcatWithConstants:"(Ljava/lang/Object;)Ljava/lang/String;" const #83 = NameAndType #17:#84; // makeConcatWithConstants:"(Ljava/lang/Object;)Ljava/lang/String;" const #84 = Asciz "(Ljava/lang/Object;)Ljava/lang/String;"; const #85 = Method #86.#87; // java/io/PrintStream.print:"(Ljava/lang/String;)V" const #86 = class #88; // java/io/PrintStream const #87 = NameAndType #89:#90; // print:"(Ljava/lang/String;)V" const #88 = Asciz "java/io/PrintStream"; const #89 = Asciz "print"; const #90 = Asciz "(Ljava/lang/String;)V"; const #91 = class #92; // java/lang/Throwable const #92 = Asciz "java/lang/Throwable"; const #93 = String #94; // " 1: failed" const #94 = Asciz " 1: failed"; const #95 = Method #86.#96; // java/io/PrintStream.println:"(Ljava/lang/String;)V" const #96 = NameAndType #97:#90; // println:"(Ljava/lang/String;)V" const #97 = Asciz "println"; const #98 = Field #71.#99; // java/lang/System.err:"Ljava/io/PrintStream;" const #99 = NameAndType #100:#75; // err:"Ljava/io/PrintStream;" const #100 = Asciz "err"; const #101 = Method #91.#102; // java/lang/Throwable.printStackTrace:"(Ljava/io/PrintStream;)V" const #102 = NameAndType #103:#104; // printStackTrace:"(Ljava/io/PrintStream;)V" const #103 = Asciz "printStackTrace"; const #104 = Asciz "(Ljava/io/PrintStream;)V"; const #105 = Method #106.#107; // java/lang/invoke/MethodHandles.lookup:"()Ljava/lang/invoke/MethodHandles$Lookup;" const #106 = class #108; // java/lang/invoke/MethodHandles const #107 = NameAndType #109:#110; // lookup:"()Ljava/lang/invoke/MethodHandles$Lookup;" const #108 = Asciz "java/lang/invoke/MethodHandles"; const #109 = Asciz "lookup"; const #110 = Asciz "()Ljava/lang/invoke/MethodHandles$Lookup;"; const #111 = InterfaceMethod #36.#112; // java/lang/constant/ClassDesc.resolveConstantDesc:"(Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object;" const #112 = NameAndType #113:#114; // resolveConstantDesc:"(Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object;" const #113 = Asciz "resolveConstantDesc"; const #114 = Asciz "(Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object;"; const #115 = Method #116.#117; // java/lang/invoke/MethodHandles$Lookup.findStaticVarHandle:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" const #116 = class #118; // java/lang/invoke/MethodHandles$Lookup const #117 = NameAndType #119:#32; // findStaticVarHandle:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" const #118 = Asciz "java/lang/invoke/MethodHandles$Lookup"; const #119 = Asciz "findStaticVarHandle"; const #120 = InvokeDynamic 2:#83; // #2:makeConcatWithConstants:"(Ljava/lang/Object;)Ljava/lang/String;" const #121 = String #122; // " 2: failed" const #122 = Asciz " 2: failed"; const #123 = Method #77.#124; // java/lang/invoke/VarHandle.describeConstable:"()Ljava/util/Optional;" const #124 = NameAndType #125:#126; // describeConstable:"()Ljava/util/Optional;" const #125 = Asciz "describeConstable"; const #126 = Asciz "()Ljava/util/Optional;"; const #127 = Method #128.#129; // java/util/Optional.orElseThrow:"()Ljava/lang/Object;" const #128 = class #130; // java/util/Optional const #129 = NameAndType #131:#81; // orElseThrow:"()Ljava/lang/Object;" const #130 = Asciz "java/util/Optional"; const #131 = Asciz "orElseThrow"; const #132 = class #133; // java/lang/invoke/VarHandle$VarHandleDesc const #133 = Asciz "java/lang/invoke/VarHandle$VarHandleDesc"; const #134 = Method #132.#135; // java/lang/invoke/VarHandle$VarHandleDesc.resolveConstantDesc:"(Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/invoke/VarHandle;" const #135 = NameAndType #113:#136; // resolveConstantDesc:"(Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/invoke/VarHandle;" const #136 = Asciz "(Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/invoke/VarHandle;"; const #137 = InvokeDynamic 3:#83; // #3:makeConcatWithConstants:"(Ljava/lang/Object;)Ljava/lang/String;" const #138 = String #139; // " 3: failed" const #139 = Asciz " 3: failed"; const #140 = Method #132.#141; // java/lang/invoke/VarHandle$VarHandleDesc.ofStaticField:"(Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)Ljava/lang/invoke/VarHandle$VarHandleDesc;" const #141 = NameAndType #142:#143; // ofStaticField:"(Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)Ljava/lang/invoke/VarHandle$VarHandleDesc;" const #142 = Asciz "ofStaticField"; const #143 = Asciz "(Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)Ljava/lang/invoke/VarHandle$VarHandleDesc;"; const #144 = InvokeDynamic 4:#83; // #4:makeConcatWithConstants:"(Ljava/lang/Object;)Ljava/lang/String;" const #145 = String #146; // " 4: failed" const #146 = Asciz " 4: failed"; const #147 = InvokeDynamic 5:#16; // #5:makeConcatWithConstants:"(Ljava/lang/String;)Ljava/lang/String;" const #148 = class #149; // java/lang/NoSuchFieldException const #149 = Asciz "java/lang/NoSuchFieldException"; const #150 = class #151; // java/lang/IllegalAccessException const #151 = Asciz "java/lang/IllegalAccessException"; const #152 = String #153; // "0: failed" const #153 = Asciz "0: failed"; const #154 = Method #155.#102; // java/lang/ReflectiveOperationException.printStackTrace:"(Ljava/io/PrintStream;)V" const #155 = class #156; // java/lang/ReflectiveOperationException const #156 = Asciz "java/lang/ReflectiveOperationException"; const #157 = class #158; // org/openjdk/asmtools/lib/transform/ITestRunner const #158 = Asciz "org/openjdk/asmtools/lib/transform/ITestRunner"; const #159 = Asciz "Code"; const #160 = Asciz "LineNumberTable"; const #161 = Asciz "LocalVariableTable"; const #162 = Asciz "this"; const #163 = Asciz "Lorg/openjdk/asmtools/transform/case8302260/TestRunner;"; const #164 = Asciz "run"; const #165 = Asciz "vh"; const #166 = Asciz "Ljava/lang/invoke/VarHandle;"; const #167 = Asciz "e"; const #168 = Asciz "Ljava/lang/Throwable;"; const #169 = Asciz "vh2"; const #170 = Asciz "vhd"; const #171 = Asciz "Ljava/lang/invoke/VarHandle$VarHandleDesc;"; const #172 = Asciz "obj"; const #173 = Asciz "t"; const #174 = Asciz "desc"; const #175 = Asciz "name"; const #176 = Asciz "fdesc"; const #177 = Asciz "StackMapTable"; const #178 = Asciz "Ljava/lang/ReflectiveOperationException;"; const #179 = Asciz "rec"; const #180 = Asciz "fname"; const #181 = Asciz "type"; const #182 = Asciz "LocalVariableTypeTable"; const #183 = Asciz "Ljava/lang/Class<*>;"; const #184 = Asciz "Signature"; const #185 = Asciz "(Ljava/lang/Class<*>;Ljava/lang/String;Ljava/lang/Class<*>;)Ljava/lang/invoke/VarHandle;"; const #186 = Asciz "SourceFile"; const #187 = Asciz "TestRunner.java"; const #188 = Asciz "BootstrapMethods"; const #189 = MethodHandle 6:#190; // REF_invokeStatic:java/lang/invoke/StringConcatFactory.makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #190 = Method #191.#192; // java/lang/invoke/StringConcatFactory.makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #191 = class #193; // java/lang/invoke/StringConcatFactory const #192 = NameAndType #17:#194; // makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;" const #193 = Asciz "java/lang/invoke/StringConcatFactory"; const #194 = Asciz "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; const #195 = String #196; // ".data" const #196 = Asciz ".data"; const #197 = String #198; // " 1: " const #198 = Asciz " 1: "; const #199 = String #200; // " 2: " const #200 = Asciz " 2: "; const #201 = String #202; // " 3: " const #202 = Asciz " 3: "; const #203 = String #204; // " 4: " const #204 = Asciz " 4: "; const #205 = String #206; // "0: " const #206 = Asciz "0: "; const #207 = Asciz "InnerClasses"; const #208 = Asciz "Lookup"; const #209 = Asciz "VarHandleDesc"; final Field #21:#22; // superPackage:"Ljava/lang/String;" public Method #5:#6 // "":"()V" stack 2 locals 1 { var 0 #162:#163; // this:"Lorg/openjdk/asmtools/transform/case8302260/TestRunner;" 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: aload_0; 5: ldc #7; // class TestRunner 7: invokevirtual #9; // Method java/lang/Class.getPackageName:"()Ljava/lang/String;" 10: invokedynamic #15; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(Ljava/lang/String;)Ljava/lang/String;" { // String ".data" // } 15: putfield #19; // Field superPackage:"Ljava/lang/String;" 18: return; endvar 0; } public Method #164:#6 // run:"()V" stack 5 locals 2 { var 0 #162:#163; // this:"Lorg/openjdk/asmtools/transform/case8302260/TestRunner;" 0: aload_0; 1: ldc #23; // class org/openjdk/asmtools/transform/case8302260/data/CTestClass 3: ldc #25; // String "stringField" 5: ldc #27; // class java/lang/String 7: invokevirtual #29; // Method testFieldRef:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" 10: astore_1; var 1 #165:#166; // vh:"Ljava/lang/invoke/VarHandle;" 11: aload_0; 12: aload_1; 13: aload_0; 14: getfield #19; // Field superPackage:"Ljava/lang/String;" 17: ldc #33; // String "CTestClass" 19: invokestatic #35; // InterfaceMethod java/lang/constant/ClassDesc.of:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/constant/ClassDesc;" 22: ldc #25; // String "stringField" 24: getstatic #41; // Field java/lang/constant/ConstantDescs.CD_String:"Ljava/lang/constant/ClassDesc;" 27: invokevirtual #47; // Method testFieldValue:"(Ljava/lang/invoke/VarHandle;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)V" 30: aload_0; 31: ldc #23; // class org/openjdk/asmtools/transform/case8302260/data/CTestClass 33: ldc #51; // String "longField" 35: getstatic #53; // Field java/lang/Long.TYPE:"Ljava/lang/Class;" 38: invokevirtual #29; // Method testFieldRef:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" 41: astore_1; 42: aload_0; 43: aload_1; 44: aload_0; 45: getfield #19; // Field superPackage:"Ljava/lang/String;" 48: ldc #33; // String "CTestClass" 50: invokestatic #35; // InterfaceMethod java/lang/constant/ClassDesc.of:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/constant/ClassDesc;" 53: ldc #51; // String "longField" 55: getstatic #59; // Field java/lang/constant/ConstantDescs.CD_long:"Ljava/lang/constant/ClassDesc;" 58: invokevirtual #47; // Method testFieldValue:"(Ljava/lang/invoke/VarHandle;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)V" 61: aload_0; 62: ldc #23; // class org/openjdk/asmtools/transform/case8302260/data/CTestClass 64: ldc #62; // String "stringField2" 66: ldc #27; // class java/lang/String 68: invokevirtual #29; // Method testFieldRef:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" 71: astore_1; 72: aload_0; 73: aload_1; 74: aload_0; 75: getfield #19; // Field superPackage:"Ljava/lang/String;" 78: ldc #33; // String "CTestClass" 80: invokestatic #35; // InterfaceMethod java/lang/constant/ClassDesc.of:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/constant/ClassDesc;" 83: ldc #62; // String "stringField2" 85: getstatic #41; // Field java/lang/constant/ConstantDescs.CD_String:"Ljava/lang/constant/ClassDesc;" 88: invokevirtual #47; // Method testFieldValue:"(Ljava/lang/invoke/VarHandle;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)V" 91: aload_0; 92: ldc #23; // class org/openjdk/asmtools/transform/case8302260/data/CTestClass 94: ldc #64; // String "longField2" 96: getstatic #53; // Field java/lang/Long.TYPE:"Ljava/lang/Class;" 99: invokevirtual #29; // Method testFieldRef:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" 102: astore_1; 103: aload_0; 104: aload_1; 105: aload_0; 106: getfield #19; // Field superPackage:"Ljava/lang/String;" 109: ldc #33; // String "CTestClass" 111: invokestatic #35; // InterfaceMethod java/lang/constant/ClassDesc.of:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/constant/ClassDesc;" 114: ldc #64; // String "longField2" 116: getstatic #59; // Field java/lang/constant/ConstantDescs.CD_long:"Ljava/lang/constant/ClassDesc;" 119: invokevirtual #47; // Method testFieldValue:"(Ljava/lang/invoke/VarHandle;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)V" 122: aload_0; 123: ldc #23; // class org/openjdk/asmtools/transform/case8302260/data/CTestClass 125: ldc #66; // String "stringField3" 127: ldc #27; // class java/lang/String 129: invokevirtual #29; // Method testFieldRef:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" 132: astore_1; 133: aload_0; 134: aload_1; 135: aload_0; 136: getfield #19; // Field superPackage:"Ljava/lang/String;" 139: ldc #33; // String "CTestClass" 141: invokestatic #35; // InterfaceMethod java/lang/constant/ClassDesc.of:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/constant/ClassDesc;" 144: ldc #66; // String "stringField3" 146: getstatic #41; // Field java/lang/constant/ConstantDescs.CD_String:"Ljava/lang/constant/ClassDesc;" 149: invokevirtual #47; // Method testFieldValue:"(Ljava/lang/invoke/VarHandle;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)V" 152: aload_0; 153: ldc #23; // class org/openjdk/asmtools/transform/case8302260/data/CTestClass 155: ldc #68; // String "longField3" 157: getstatic #53; // Field java/lang/Long.TYPE:"Ljava/lang/Class;" 160: invokevirtual #29; // Method testFieldRef:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" 163: astore_1; 164: aload_0; 165: aload_1; 166: aload_0; 167: getfield #19; // Field superPackage:"Ljava/lang/String;" 170: ldc #33; // String "CTestClass" 172: invokestatic #35; // InterfaceMethod java/lang/constant/ClassDesc.of:"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/constant/ClassDesc;" 175: ldc #68; // String "longField3" 177: getstatic #59; // Field java/lang/constant/ConstantDescs.CD_long:"Ljava/lang/constant/ClassDesc;" 180: invokevirtual #47; // Method testFieldValue:"(Ljava/lang/invoke/VarHandle;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)V" 183: return; endvar 0,1; } Method #49:#50 // testFieldValue:"(Ljava/lang/invoke/VarHandle;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)V" stack 5 locals 7 { var 0 #162:#163; // this:"Lorg/openjdk/asmtools/transform/case8302260/TestRunner;" var 1 #165:#166; // vh:"Ljava/lang/invoke/VarHandle;" var 2 #174:#46; // desc:"Ljava/lang/constant/ClassDesc;" var 3 #175:#22; // name:"Ljava/lang/String;" var 4 #176:#46; // fdesc:"Ljava/lang/constant/ClassDesc;" 0: aload_1; 1: ifnull 40; try T0; 4: getstatic #70; // Field java/lang/System.out:"Ljava/io/PrintStream;" 7: aload_1; 8: invokevirtual #76; // Method java/lang/invoke/VarHandle.get:"()Ljava/lang/Object;" 11: invokedynamic #82; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(Ljava/lang/Object;)Ljava/lang/String;" { // String " 1: " // } 16: invokevirtual #85; // Method java/io/PrintStream.print:"(Ljava/lang/String;)V" endtry T0; 19: goto 40; catch T0 #91; // java/lang/Throwable 22: stack_frame_type stack1; stack_map #91; // class java/lang/Throwable; astore 5; var 5 #167:#168; // e:"Ljava/lang/Throwable;" 24: getstatic #70; // Field java/lang/System.out:"Ljava/io/PrintStream;" 27: ldc #93; // String " 1: failed" 29: invokevirtual #95; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 32: aload 5; 34: getstatic #98; // Field java/lang/System.err:"Ljava/io/PrintStream;" 37: invokevirtual #101; // Method java/lang/Throwable.printStackTrace:"(Ljava/io/PrintStream;)V" endvar 5; try T1; 40: stack_frame_type same; invokestatic #105; // Method java/lang/invoke/MethodHandles.lookup:"()Ljava/lang/invoke/MethodHandles$Lookup;" 43: aload_2; 44: invokestatic #105; // Method java/lang/invoke/MethodHandles.lookup:"()Ljava/lang/invoke/MethodHandles$Lookup;" 47: invokeinterface #111, 2; // InterfaceMethod java/lang/constant/ClassDesc.resolveConstantDesc:"(Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object;" 52: checkcast #10; // class java/lang/Class 55: aload_3; 56: aload 4; 58: invokestatic #105; // Method java/lang/invoke/MethodHandles.lookup:"()Ljava/lang/invoke/MethodHandles$Lookup;" 61: invokeinterface #111, 2; // InterfaceMethod java/lang/constant/ClassDesc.resolveConstantDesc:"(Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object;" 66: checkcast #10; // class java/lang/Class 69: invokevirtual #115; // Method java/lang/invoke/MethodHandles$Lookup.findStaticVarHandle:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" 72: astore 5; var 5 #169:#166; // vh2:"Ljava/lang/invoke/VarHandle;" 74: getstatic #70; // Field java/lang/System.out:"Ljava/io/PrintStream;" 77: aload 5; 79: invokevirtual #76; // Method java/lang/invoke/VarHandle.get:"()Ljava/lang/Object;" 82: invokedynamic #120; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(Ljava/lang/Object;)Ljava/lang/String;" { // String " 2: " // } 87: invokevirtual #85; // Method java/io/PrintStream.print:"(Ljava/lang/String;)V" endvar 5; endtry T1; 90: goto 111; catch T1 #91; // java/lang/Throwable 93: stack_frame_type stack1; stack_map #91; // class java/lang/Throwable; astore 5; var 5 #167:#168; // e:"Ljava/lang/Throwable;" 95: getstatic #70; // Field java/lang/System.out:"Ljava/io/PrintStream;" 98: ldc #121; // String " 2: failed" 100: invokevirtual #95; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 103: aload 5; 105: getstatic #98; // Field java/lang/System.err:"Ljava/io/PrintStream;" 108: invokevirtual #101; // Method java/lang/Throwable.printStackTrace:"(Ljava/io/PrintStream;)V" endvar 5; 111: stack_frame_type same; aload_1; 112: ifnull 174; try T2; 115: aload_1; 116: invokevirtual #123; // Method java/lang/invoke/VarHandle.describeConstable:"()Ljava/util/Optional;" 119: invokevirtual #127; // Method java/util/Optional.orElseThrow:"()Ljava/lang/Object;" 122: checkcast #132; // class java/lang/invoke/VarHandle$VarHandleDesc 125: astore 5; var 5 #170:#171; // vhd:"Ljava/lang/invoke/VarHandle$VarHandleDesc;" 127: aload 5; 129: invokestatic #105; // Method java/lang/invoke/MethodHandles.lookup:"()Ljava/lang/invoke/MethodHandles$Lookup;" 132: invokevirtual #134; // Method java/lang/invoke/VarHandle$VarHandleDesc.resolveConstantDesc:"(Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/invoke/VarHandle;" 135: astore 6; var 6 #172:#166; // obj:"Ljava/lang/invoke/VarHandle;" 137: getstatic #70; // Field java/lang/System.out:"Ljava/io/PrintStream;" 140: aload 6; 142: invokevirtual #76; // Method java/lang/invoke/VarHandle.get:"()Ljava/lang/Object;" 145: invokedynamic #137; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(Ljava/lang/Object;)Ljava/lang/String;" { // String " 3: " // } 150: invokevirtual #85; // Method java/io/PrintStream.print:"(Ljava/lang/String;)V" endvar 5,6; endtry T2; 153: goto 174; catch T2 #91; // java/lang/Throwable 156: stack_frame_type stack1; stack_map #91; // class java/lang/Throwable; astore 5; var 5 #167:#168; // e:"Ljava/lang/Throwable;" 158: getstatic #70; // Field java/lang/System.out:"Ljava/io/PrintStream;" 161: ldc #138; // String " 3: failed" 163: invokevirtual #95; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 166: aload 5; 168: getstatic #98; // Field java/lang/System.err:"Ljava/io/PrintStream;" 171: invokevirtual #101; // Method java/lang/Throwable.printStackTrace:"(Ljava/io/PrintStream;)V" endvar 5; try T3; 174: stack_frame_type same; aload_2; 175: aload_3; 176: aload 4; 178: invokestatic #140; // Method java/lang/invoke/VarHandle$VarHandleDesc.ofStaticField:"(Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)Ljava/lang/invoke/VarHandle$VarHandleDesc;" 181: astore 5; var 5 #170:#171; // vhd:"Ljava/lang/invoke/VarHandle$VarHandleDesc;" 183: aload 5; 185: invokestatic #105; // Method java/lang/invoke/MethodHandles.lookup:"()Ljava/lang/invoke/MethodHandles$Lookup;" 188: invokevirtual #134; // Method java/lang/invoke/VarHandle$VarHandleDesc.resolveConstantDesc:"(Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/invoke/VarHandle;" 191: astore 6; var 6 #172:#166; // obj:"Ljava/lang/invoke/VarHandle;" 193: getstatic #70; // Field java/lang/System.out:"Ljava/io/PrintStream;" 196: aload 6; 198: invokevirtual #76; // Method java/lang/invoke/VarHandle.get:"()Ljava/lang/Object;" 201: invokedynamic #144; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(Ljava/lang/Object;)Ljava/lang/String;" { // String " 4: " // } 206: invokevirtual #95; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" endvar 5,6; endtry T3; 209: goto 230; catch T3 #91; // java/lang/Throwable 212: stack_frame_type stack1; stack_map #91; // class java/lang/Throwable; astore 5; var 5 #173:#168; // t:"Ljava/lang/Throwable;" 214: getstatic #70; // Field java/lang/System.out:"Ljava/io/PrintStream;" 217: ldc #145; // String " 4: failed" 219: invokevirtual #95; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 222: aload 5; 224: getstatic #70; // Field java/lang/System.out:"Ljava/io/PrintStream;" 227: invokevirtual #101; // Method java/lang/Throwable.printStackTrace:"(Ljava/io/PrintStream;)V" endvar 5; 230: stack_frame_type same; return; endvar 0,1,2,3,4; } Method #31:#32:#185 // testFieldRef:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;":"(Ljava/lang/Class<*>;Ljava/lang/String;Ljava/lang/Class<*>;)Ljava/lang/invoke/VarHandle;" stack 4 locals 6 { var 0 #162:#163; // this:"Lorg/openjdk/asmtools/transform/case8302260/TestRunner;" var 1 #179:#58; // rec:"Ljava/lang/Class;" var 2 #180:#22; // fname:"Ljava/lang/String;" var 3 #181:#58; // type:"Ljava/lang/Class;" 0: aconst_null; 1: astore 4; try T0, T1; var 4 #165:#166; // vh:"Ljava/lang/invoke/VarHandle;" 3: invokestatic #105; // Method java/lang/invoke/MethodHandles.lookup:"()Ljava/lang/invoke/MethodHandles$Lookup;" 6: aload_1; 7: aload_2; 8: aload_3; 9: invokevirtual #115; // Method java/lang/invoke/MethodHandles$Lookup.findStaticVarHandle:"(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" 12: astore 4; 14: getstatic #70; // Field java/lang/System.out:"Ljava/io/PrintStream;" 17: aload_2; 18: invokedynamic #147; // InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants: // "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;": // makeConcatWithConstants:"(Ljava/lang/String;)Ljava/lang/String;" { // String "0: " // } 23: invokevirtual #85; // Method java/io/PrintStream.print:"(Ljava/lang/String;)V" endtry T0,T1; 26: goto 47; catch T0 #148; // java/lang/NoSuchFieldException catch T1 #150; // java/lang/IllegalAccessException 29: stack_frame_type full; locals_map #7, #10, #27, #10, #77; // class TestRunner, class java/lang/Class, class java/lang/String, class java/lang/Class, class java/lang/invoke/VarHandle; stack_map #155; // class java/lang/ReflectiveOperationException; astore 5; var 5 #167:#178; // e:"Ljava/lang/ReflectiveOperationException;" 31: getstatic #70; // Field java/lang/System.out:"Ljava/io/PrintStream;" 34: ldc #152; // String "0: failed" 36: invokevirtual #95; // Method java/io/PrintStream.println:"(Ljava/lang/String;)V" 39: aload 5; 41: getstatic #98; // Field java/lang/System.err:"Ljava/io/PrintStream;" 44: invokevirtual #154; // Method java/lang/ReflectiveOperationException.printStackTrace:"(Ljava/io/PrintStream;)V" endvar 5; 47: stack_frame_type same; aload 4; 49: areturn; endvar 0,1,2,3,4; } public static final InnerClass #208 = #116 of #106; // Lookup = class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles public static final InnerClass #209 = #132 of #77; // VarHandleDesc = class java/lang/invoke/VarHandle$VarHandleDesc of class java/lang/invoke/VarHandle BootstrapMethod #189 #195; BootstrapMethod #189 #197; BootstrapMethod #189 #199; BootstrapMethod #189 #201; BootstrapMethod #189 #203; BootstrapMethod #189 #205; } // end Class TestRunner compiled from "TestRunner.java" TestRunner.class.jcod000066400000000000000000000712071514323636100341650ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case8302260// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // class org/openjdk/asmtools/transform/case8302260/TestRunner { 0xCAFEBABE; 0; // minor version 60; // version [210] { // Constant Pool ; // first element is empty Method #2 #3; // #1 at 0x0A class #4; // #2 at 0x0F NameAndType #5 #6; // #3 at 0x12 Utf8 "java/lang/Object"; // #4 at 0x17 Utf8 ""; // #5 at 0x2A Utf8 "()V"; // #6 at 0x33 class #8; // #7 at 0x39 Utf8 "org/openjdk/asmtools/transform/case8302260/TestRunner"; // #8 at 0x3C Method #10 #11; // #9 at 0x74 class #12; // #10 at 0x79 NameAndType #13 #14; // #11 at 0x7C Utf8 "java/lang/Class"; // #12 at 0x81 Utf8 "getPackageName"; // #13 at 0x93 Utf8 "()Ljava/lang/String;"; // #14 at 0xA4 InvokeDynamic 0s #16; // #15 at 0xBB NameAndType #17 #18; // #16 at 0xC0 Utf8 "makeConcatWithConstants"; // #17 at 0xC5 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #18 at 0xDF Field #7 #20; // #19 at 0x0108 NameAndType #21 #22; // #20 at 0x010D Utf8 "superPackage"; // #21 at 0x0112 Utf8 "Ljava/lang/String;"; // #22 at 0x0121 class #24; // #23 at 0x0136 Utf8 "org/openjdk/asmtools/transform/case8302260/data/CTestClass"; // #24 at 0x0139 String #26; // #25 at 0x0176 Utf8 "stringField"; // #26 at 0x0179 class #28; // #27 at 0x0187 Utf8 "java/lang/String"; // #28 at 0x018A Method #7 #30; // #29 at 0x019D NameAndType #31 #32; // #30 at 0x01A2 Utf8 "testFieldRef"; // #31 at 0x01A7 Utf8 "(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;"; // #32 at 0x01B6 String #34; // #33 at 0x020B Utf8 "CTestClass"; // #34 at 0x020E InterfaceMethod #36 #37; // #35 at 0x021B class #38; // #36 at 0x0220 NameAndType #39 #40; // #37 at 0x0223 Utf8 "java/lang/constant/ClassDesc"; // #38 at 0x0228 Utf8 "of"; // #39 at 0x0247 Utf8 "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/constant/ClassDesc;"; // #40 at 0x024C Field #42 #43; // #41 at 0x0293 class #44; // #42 at 0x0298 NameAndType #45 #46; // #43 at 0x029B Utf8 "java/lang/constant/ConstantDescs"; // #44 at 0x02A0 Utf8 "CD_String"; // #45 at 0x02C3 Utf8 "Ljava/lang/constant/ClassDesc;"; // #46 at 0x02CF Method #7 #48; // #47 at 0x02F0 NameAndType #49 #50; // #48 at 0x02F5 Utf8 "testFieldValue"; // #49 at 0x02FA Utf8 "(Ljava/lang/invoke/VarHandle;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)V"; // #50 at 0x030B String #52; // #51 at 0x037B Utf8 "longField"; // #52 at 0x037E Field #54 #55; // #53 at 0x038A class #56; // #54 at 0x038F NameAndType #57 #58; // #55 at 0x0392 Utf8 "java/lang/Long"; // #56 at 0x0397 Utf8 "TYPE"; // #57 at 0x03A8 Utf8 "Ljava/lang/Class;"; // #58 at 0x03AF Field #42 #60; // #59 at 0x03C3 NameAndType #61 #46; // #60 at 0x03C8 Utf8 "CD_long"; // #61 at 0x03CD String #63; // #62 at 0x03D7 Utf8 "stringField2"; // #63 at 0x03DA String #65; // #64 at 0x03E9 Utf8 "longField2"; // #65 at 0x03EC String #67; // #66 at 0x03F9 Utf8 "stringField3"; // #67 at 0x03FC String #69; // #68 at 0x040B Utf8 "longField3"; // #69 at 0x040E Field #71 #72; // #70 at 0x041B class #73; // #71 at 0x0420 NameAndType #74 #75; // #72 at 0x0423 Utf8 "java/lang/System"; // #73 at 0x0428 Utf8 "out"; // #74 at 0x043B Utf8 "Ljava/io/PrintStream;"; // #75 at 0x0441 Method #77 #78; // #76 at 0x0459 class #79; // #77 at 0x045E NameAndType #80 #81; // #78 at 0x0461 Utf8 "java/lang/invoke/VarHandle"; // #79 at 0x0466 Utf8 "get"; // #80 at 0x0483 Utf8 "()Ljava/lang/Object;"; // #81 at 0x0489 InvokeDynamic 1s #83; // #82 at 0x04A0 NameAndType #17 #84; // #83 at 0x04A5 Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #84 at 0x04AA Method #86 #87; // #85 at 0x04D3 class #88; // #86 at 0x04D8 NameAndType #89 #90; // #87 at 0x04DB Utf8 "java/io/PrintStream"; // #88 at 0x04E0 Utf8 "print"; // #89 at 0x04F6 Utf8 "(Ljava/lang/String;)V"; // #90 at 0x04FE class #92; // #91 at 0x0516 Utf8 "java/lang/Throwable"; // #92 at 0x0519 String #94; // #93 at 0x052F Utf8 " 1: failed"; // #94 at 0x0532 Method #86 #96; // #95 at 0x053F NameAndType #97 #90; // #96 at 0x0544 Utf8 "println"; // #97 at 0x0549 Field #71 #99; // #98 at 0x0553 NameAndType #100 #75; // #99 at 0x0558 Utf8 "err"; // #100 at 0x055D Method #91 #102; // #101 at 0x0563 NameAndType #103 #104; // #102 at 0x0568 Utf8 "printStackTrace"; // #103 at 0x056D Utf8 "(Ljava/io/PrintStream;)V"; // #104 at 0x057F Method #106 #107; // #105 at 0x059A class #108; // #106 at 0x059F NameAndType #109 #110; // #107 at 0x05A2 Utf8 "java/lang/invoke/MethodHandles"; // #108 at 0x05A7 Utf8 "lookup"; // #109 at 0x05C8 Utf8 "()Ljava/lang/invoke/MethodHandles$Lookup;"; // #110 at 0x05D1 InterfaceMethod #36 #112; // #111 at 0x05FD NameAndType #113 #114; // #112 at 0x0602 Utf8 "resolveConstantDesc"; // #113 at 0x0607 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/Object;"; // #114 at 0x061D Method #116 #117; // #115 at 0x065B class #118; // #116 at 0x0660 NameAndType #119 #32; // #117 at 0x0663 Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #118 at 0x0668 Utf8 "findStaticVarHandle"; // #119 at 0x0690 InvokeDynamic 2s #83; // #120 at 0x06A6 String #122; // #121 at 0x06AB Utf8 " 2: failed"; // #122 at 0x06AE Method #77 #124; // #123 at 0x06BB NameAndType #125 #126; // #124 at 0x06C0 Utf8 "describeConstable"; // #125 at 0x06C5 Utf8 "()Ljava/util/Optional;"; // #126 at 0x06D9 Method #128 #129; // #127 at 0x06F2 class #130; // #128 at 0x06F7 NameAndType #131 #81; // #129 at 0x06FA Utf8 "java/util/Optional"; // #130 at 0x06FF Utf8 "orElseThrow"; // #131 at 0x0714 class #133; // #132 at 0x0722 Utf8 "java/lang/invoke/VarHandle$VarHandleDesc"; // #133 at 0x0725 Method #132 #135; // #134 at 0x0750 NameAndType #113 #136; // #135 at 0x0755 Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;)Ljava/lang/invoke/VarHandle;"; // #136 at 0x075A InvokeDynamic 3s #83; // #137 at 0x07A2 String #139; // #138 at 0x07A7 Utf8 " 3: failed"; // #139 at 0x07AA Method #132 #141; // #140 at 0x07B7 NameAndType #142 #143; // #141 at 0x07BC Utf8 "ofStaticField"; // #142 at 0x07C1 Utf8 "(Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)Ljava/lang/invoke/VarHandle$VarHandleDesc;"; // #143 at 0x07D1 InvokeDynamic 4s #83; // #144 at 0x084E String #146; // #145 at 0x0853 Utf8 " 4: failed"; // #146 at 0x0856 InvokeDynamic 5s #16; // #147 at 0x0863 class #149; // #148 at 0x0868 Utf8 "java/lang/NoSuchFieldException"; // #149 at 0x086B class #151; // #150 at 0x088C Utf8 "java/lang/IllegalAccessException"; // #151 at 0x088F String #153; // #152 at 0x08B2 Utf8 "0: failed"; // #153 at 0x08B5 Method #155 #102; // #154 at 0x08C1 class #156; // #155 at 0x08C6 Utf8 "java/lang/ReflectiveOperationException"; // #156 at 0x08C9 class #158; // #157 at 0x08F2 Utf8 "org/openjdk/asmtools/lib/transform/ITestRunner"; // #158 at 0x08F5 Utf8 "Code"; // #159 at 0x0926 Utf8 "LineNumberTable"; // #160 at 0x092D Utf8 "LocalVariableTable"; // #161 at 0x093F Utf8 "this"; // #162 at 0x0954 Utf8 "Lorg/openjdk/asmtools/transform/case8302260/TestRunner;"; // #163 at 0x095B Utf8 "run"; // #164 at 0x0995 Utf8 "vh"; // #165 at 0x099B Utf8 "Ljava/lang/invoke/VarHandle;"; // #166 at 0x09A0 Utf8 "e"; // #167 at 0x09BF Utf8 "Ljava/lang/Throwable;"; // #168 at 0x09C3 Utf8 "vh2"; // #169 at 0x09DB Utf8 "vhd"; // #170 at 0x09E1 Utf8 "Ljava/lang/invoke/VarHandle$VarHandleDesc;"; // #171 at 0x09E7 Utf8 "obj"; // #172 at 0x0A14 Utf8 "t"; // #173 at 0x0A1A Utf8 "desc"; // #174 at 0x0A1E Utf8 "name"; // #175 at 0x0A25 Utf8 "fdesc"; // #176 at 0x0A2C Utf8 "StackMapTable"; // #177 at 0x0A34 Utf8 "Ljava/lang/ReflectiveOperationException;"; // #178 at 0x0A44 Utf8 "rec"; // #179 at 0x0A6F Utf8 "fname"; // #180 at 0x0A75 Utf8 "type"; // #181 at 0x0A7D Utf8 "LocalVariableTypeTable"; // #182 at 0x0A84 Utf8 "Ljava/lang/Class<*>;"; // #183 at 0x0A9D Utf8 "Signature"; // #184 at 0x0AB4 Utf8 "(Ljava/lang/Class<*>;Ljava/lang/String;Ljava/lang/Class<*>;)Ljava/lang/invoke/VarHandle;"; // #185 at 0x0AC0 Utf8 "SourceFile"; // #186 at 0x0B1B Utf8 "TestRunner.java"; // #187 at 0x0B28 Utf8 "BootstrapMethods"; // #188 at 0x0B3A MethodHandle 6b #190; // #189 at 0x0B4D Method #191 #192; // #190 at 0x0B51 class #193; // #191 at 0x0B56 NameAndType #17 #194; // #192 at 0x0B59 Utf8 "java/lang/invoke/StringConcatFactory"; // #193 at 0x0B5E Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"; // #194 at 0x0B85 String #196; // #195 at 0x0C20 Utf8 ".data"; // #196 at 0x0C23 String #198; // #197 at 0x0C2C Utf8 " 1: "; // #198 at 0x0C2F String #200; // #199 at 0x0C37 Utf8 " 2: "; // #200 at 0x0C3A String #202; // #201 at 0x0C42 Utf8 " 3: "; // #202 at 0x0C45 String #204; // #203 at 0x0C4D Utf8 " 4: "; // #204 at 0x0C50 String #206; // #205 at 0x0C58 Utf8 "0: "; // #206 at 0x0C5B Utf8 "InnerClasses"; // #207 at 0x0C62 Utf8 "Lookup"; // #208 at 0x0C71 Utf8 "VarHandleDesc"; // #209 at 0x0C7A } // end of Constant Pool 0x0021; // access [ ACC_PUBLIC, ACC_SUPER ] #7; // this_cpx #2; // super_cpx [1] { // Interfaces #157; // org/openjdk/asmtools/lib/transform/ITestRunner at 0x0C94 } // end of Interfaces [1] { // Fields { // field at 0x0C96 0x0010; // access #21; // name_index : superPackage #22; // descriptor_index : Ljava/lang/String; [0] { // Attributes } // end of Attributes } } // end of Fields [4] { // Methods { // method at 0x0CA0 0x0001; // access #5; // name_index : #6; // descriptor_index : ()V [1] { // Attributes Attr(#159, 65) { // Code at 0x0CA8 2; // max_stack 1; // max_locals Bytes[19]{ 0x2AB700012A1207B6; 0x0009BA000F0000B5; 0x0013B1; } [0] { // Traps } // end of Traps [2] { // Attributes Attr(#160, 10) { // LineNumberTable at 0x0CCD [2] { // line_number_table 0 35; // at 0x0CD9 4 37; // at 0x0CDD } } // end of LineNumberTable ; Attr(#161, 12) { // LocalVariableTable at 0x0CDD [1] { // LocalVariableTable 0 19 162 163 0; // at 0x0CEF } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0CEF 0x0001; // access #164; // name_index : run #6; // descriptor_index : ()V [1] { // Attributes Attr(#159, 284) { // Code at 0x0CF7 5; // max_stack 2; // max_locals Bytes[184]{ 0x2A12171219121BB6; 0x001D4C2A2B2AB400; 0x131221B800231219; 0xB20029B6002F2A12; 0x171233B20035B600; 0x1D4C2A2B2AB40013; 0x1221B800231233B2; 0x003BB6002F2A1217; 0x123E121BB6001D4C; 0x2A2B2AB400131221; 0xB80023123EB20029; 0xB6002F2A12171240; 0xB20035B6001D4C2A; 0x2B2AB400131221B8; 0x00231240B2003BB6; 0x002F2A1217124212; 0x1BB6001D4C2A2B2A; 0xB400131221B80023; 0x1242B20029B6002F; 0x2A12171244B20035; 0xB6001D4C2A2B2AB4; 0x00131221B8002312; 0x44B2003BB6002FB1; } [0] { // Traps } // end of Traps [2] { // Attributes Attr(#160, 54) { // LineNumberTable at 0x0DC1 [13] { // line_number_table 0 44; // at 0x0DCD 11 45; // at 0x0DD1 30 46; // at 0x0DD5 42 47; // at 0x0DD9 61 49; // at 0x0DDD 72 50; // at 0x0DE1 91 51; // at 0x0DE5 103 52; // at 0x0DE9 122 54; // at 0x0DED 133 55; // at 0x0DF1 152 56; // at 0x0DF5 164 57; // at 0x0DF9 183 58; // at 0x0DFD } } // end of LineNumberTable ; Attr(#161, 22) { // LocalVariableTable at 0x0DFD [2] { // LocalVariableTable 0 184 162 163 0; // at 0x0E0F 11 173 165 166 1; // at 0x0E19 } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0E19 0x0000; // access #49; // name_index : testFieldValue #50; // descriptor_index : (Ljava/lang/invoke/VarHandle;Ljava/lang/constant/ClassDesc;Ljava/lang/String;Ljava/lang/constant/ClassDesc;)V [1] { // Attributes Attr(#159, 579) { // Code at 0x0E21 5; // max_stack 7; // max_locals Bytes[231]{ 0x2BC60027B200462B; 0xB6004CBA00520000; 0xB60055A700153A05; 0xB20046125DB6005F; 0x1905B20062B60065; 0xB800692CB80069B9; 0x006F0200C0000A2D; 0x1904B80069B9006F; 0x0200C0000AB60073; 0x3A05B200461905B6; 0x004CBA00780000B6; 0x0055A700153A05B2; 0x00461279B6005F19; 0x05B20062B600652B; 0xC6003E2BB6007BB6; 0x007FC000843A0519; 0x05B80069B600863A; 0x06B200461906B600; 0x4CBA00890000B600; 0x55A700153A05B200; 0x46128AB6005F1905; 0xB20062B600652C2D; 0x1904B8008C3A0519; 0x05B80069B600863A; 0x06B200461906B600; 0x4CBA00900000B600; 0x5FA700153A05B200; 0x461291B6005F1905; 0xB20046B60065B1; } [4] { // Traps 4 19 22 91; // at 0x0F20 40 90 93 91; // at 0x0F28 115 153 156 91; // at 0x0F30 174 209 212 91; // at 0x0F38 } // end of Traps [3] { // Attributes Attr(#160, 122) { // LineNumberTable at 0x0F3A [30] { // line_number_table 0 61; // at 0x0F46 4 63; // at 0x0F4A 19 67; // at 0x0F4E 22 64; // at 0x0F52 24 65; // at 0x0F56 32 66; // at 0x0F5A 40 70; // at 0x0F5E 58 71; // at 0x0F62 69 70; // at 0x0F66 74 72; // at 0x0F6A 90 76; // at 0x0F6E 93 73; // at 0x0F72 95 74; // at 0x0F76 103 75; // at 0x0F7A 111 77; // at 0x0F7E 115 79; // at 0x0F82 127 80; // at 0x0F86 137 81; // at 0x0F8A 153 85; // at 0x0F8E 156 82; // at 0x0F92 158 83; // at 0x0F96 166 84; // at 0x0F9A 174 88; // at 0x0F9E 183 89; // at 0x0FA2 193 90; // at 0x0FA6 209 94; // at 0x0FAA 212 91; // at 0x0FAE 214 92; // at 0x0FB2 222 93; // at 0x0FB6 230 95; // at 0x0FBA } } // end of LineNumberTable ; Attr(#161, 142) { // LocalVariableTable at 0x0FBA [14] { // LocalVariableTable 24 16 167 168 5; // at 0x0FCC 74 16 169 166 5; // at 0x0FD6 95 16 167 168 5; // at 0x0FE0 127 26 170 171 5; // at 0x0FEA 137 16 172 166 6; // at 0x0FF4 158 16 167 168 5; // at 0x0FFE 183 26 170 171 5; // at 0x1008 193 16 172 166 6; // at 0x1012 214 16 173 168 5; // at 0x101C 0 231 162 163 0; // at 0x1026 0 231 165 166 1; // at 0x1030 0 231 174 46 2; // at 0x103A 0 231 175 22 3; // at 0x1044 0 231 176 46 4; // at 0x104E } } // end of LocalVariableTable ; Attr(#177, 22) { // StackMapTable at 0x104E [8] { // 86b, [1]z{7b,91}; // same_locals_1_stack_item_frame 17b; // same_frame 116b, [1]z{7b,91}; // same_locals_1_stack_item_frame 17b; // same_frame 108b, [1]z{7b,91}; // same_locals_1_stack_item_frame 17b; // same_frame 101b, [1]z{7b,91}; // same_locals_1_stack_item_frame 17b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x106A 0x0000; // access #31; // name_index : testFieldRef #32; // descriptor_index : (Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle; [2] { // Attributes Attr(#159, 248) { // Code at 0x1072 4; // max_stack 6; // max_locals Bytes[50]{ 0x013A04B800692B2C; 0x2DB600733A04B200; 0x462CBA00930000B6; 0x0055A700153A05B2; 0x00461298B6005F19; 0x05B20062B6009A19; 0x04B0; } [2] { // Traps 3 26 29 148; // at 0x10BC 3 26 29 150; // at 0x10C4 } // end of Traps [4] { // Attributes Attr(#160, 34) { // LineNumberTable at 0x10C6 [8] { // line_number_table 0 98; // at 0x10D2 3 100; // at 0x10D6 14 101; // at 0x10DA 26 105; // at 0x10DE 29 102; // at 0x10E2 31 103; // at 0x10E6 39 104; // at 0x10EA 47 106; // at 0x10EE } } // end of LineNumberTable ; Attr(#161, 62) { // LocalVariableTable at 0x10EE [6] { // LocalVariableTable 31 16 167 178 5; // at 0x1100 0 50 162 163 0; // at 0x110A 0 50 179 58 1; // at 0x1114 0 50 180 22 2; // at 0x111E 0 50 181 58 3; // at 0x1128 3 47 165 166 4; // at 0x1132 } } // end of LocalVariableTable ; Attr(#182, 22) { // LocalVariableTypeTable at 0x1132 [2] { // LocalVariableTypeTable 0 50 179 183 1; // at 0x1144 0 50 181 183 3; // at 0x114E } } // end of LocalVariableTypeTable ; Attr(#177, 28) { // StackMapTable at 0x114E [2] { // 255b, 29, [5]{7b,7; 7b,10; 7b,27; 7b,10; 7b,77}, [1]{7b,155}; // full_frame 17b; // same_frame } } // end of StackMapTable } // end of Attributes } // end of Code ; Attr(#184, 2) { // Signature at 0x1170 #185; } // end of Signature } // end of Attributes } } // end of Methods [3] { // Attributes Attr(#186, 2) { // SourceFile at 0x117A #187; } // end of SourceFile ; Attr(#188, 38) { // BootstrapMethods at 0x1182 [6] { // bootstrap_methods { // bootstrap_method #189; // bootstrap_method_ref [1] { // bootstrap_arguments #195; // at 0x1190 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #189; // bootstrap_method_ref [1] { // bootstrap_arguments #197; // at 0x1196 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #189; // bootstrap_method_ref [1] { // bootstrap_arguments #199; // at 0x119C } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #189; // bootstrap_method_ref [1] { // bootstrap_arguments #201; // at 0x11A2 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #189; // bootstrap_method_ref [1] { // bootstrap_arguments #203; // at 0x11A8 } // bootstrap_arguments } // bootstrap_method ; { // bootstrap_method #189; // bootstrap_method_ref [1] { // bootstrap_arguments #205; // at 0x11AE } // bootstrap_arguments } // bootstrap_method } } // end of BootstrapMethods ; Attr(#207, 18) { // InnerClasses at 0x11AE [2] { // classes #116 #106 #208 25; // at 0x11BE #132 #77 #209 25; // at 0x11C6 } } // end of InnerClasses } // end of Attributes } // end of class org/openjdk/asmtools/transform/case8302260/TestRunner jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case8302260/data/000077500000000000000000000000001514323636100310705ustar00rootroot00000000000000CTestClass.class.jasm000066400000000000000000000075311514323636100350070ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case8302260/data// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // package org/openjdk/asmtools/transform/case8302260/data; public super class #10 /* CTestClass */ extends #2 /* org/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass */ implements #19 /* ITestInterfaceA */ version 60:0 { const #1 = Method #2.#3; // org/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass."":"()V" const #2 = class #4; // org/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass const #3 = NameAndType #5:#6; // "":"()V" const #4 = Asciz "org/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass"; const #5 = Asciz ""; const #6 = Asciz "()V"; const #7 = String #8; // "CTestClass" const #8 = Asciz "CTestClass"; const #9 = Field #10.#11; // CTestClass.ctestString:"Ljava/lang/String;" const #10 = class #12; // CTestClass const #11 = NameAndType #13:#14; // ctestString:"Ljava/lang/String;" const #12 = Asciz "org/openjdk/asmtools/transform/case8302260/data/CTestClass"; const #13 = Asciz "ctestString"; const #14 = Asciz "Ljava/lang/String;"; const #15 = Field #10.#16; // CTestClass.ctestLong:"J" const #16 = NameAndType #17:#18; // ctestLong:"J" const #17 = Asciz "ctestLong"; const #18 = Asciz "J"; const #19 = class #20; // ITestInterfaceA const #20 = Asciz "org/openjdk/asmtools/transform/case8302260/data/ITestInterfaceA"; const #21 = Asciz "Code"; const #22 = Asciz "LineNumberTable"; const #23 = Asciz "LocalVariableTable"; const #24 = Asciz "this"; const #25 = Asciz "Lorg/openjdk/asmtools/transform/case8302260/data/CTestClass;"; const #26 = Asciz ""; const #27 = Asciz "SourceFile"; const #28 = Asciz "CTestClass.java"; public static Field #13:#14; // ctestString:"Ljava/lang/String;" public static Field #17:#18; // ctestLong:J public Method #5:#6 // "":"()V" stack 1 locals 1 { var 0 #24:#25; // this:"Lorg/openjdk/asmtools/transform/case8302260/data/CTestClass;" 0: aload_0; 1: invokespecial #1; // Method org/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass."":"()V" 4: return; endvar 0; } static Method #26:#6 // "":"()V" stack 2 locals 0 { 0: ldc #7; // String "CTestClass" 2: putstatic #9; // Field ctestString:"Ljava/lang/String;" 5: lconst_1; 6: putstatic #15; // Field ctestLong:"J" 9: return; } } // end Class CTestClass compiled from "CTestClass.java" CTestClass.class.jcod000066400000000000000000000154341514323636100347750ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case8302260/data// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // class org/openjdk/asmtools/transform/case8302260/data/CTestClass { 0xCAFEBABE; 0; // minor version 60; // version [29] { // Constant Pool ; // first element is empty Method #2 #3; // #1 at 0x0A class #4; // #2 at 0x0F NameAndType #5 #6; // #3 at 0x12 Utf8 "org/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass"; // #4 at 0x17 Utf8 ""; // #5 at 0x5D Utf8 "()V"; // #6 at 0x66 String #8; // #7 at 0x6C Utf8 "CTestClass"; // #8 at 0x6F Field #10 #11; // #9 at 0x7C class #12; // #10 at 0x81 NameAndType #13 #14; // #11 at 0x84 Utf8 "org/openjdk/asmtools/transform/case8302260/data/CTestClass"; // #12 at 0x89 Utf8 "ctestString"; // #13 at 0xC6 Utf8 "Ljava/lang/String;"; // #14 at 0xD4 Field #10 #16; // #15 at 0xE9 NameAndType #17 #18; // #16 at 0xEE Utf8 "ctestLong"; // #17 at 0xF3 Utf8 "J"; // #18 at 0xFF class #20; // #19 at 0x0103 Utf8 "org/openjdk/asmtools/transform/case8302260/data/ITestInterfaceA"; // #20 at 0x0106 Utf8 "Code"; // #21 at 0x0148 Utf8 "LineNumberTable"; // #22 at 0x014F Utf8 "LocalVariableTable"; // #23 at 0x0161 Utf8 "this"; // #24 at 0x0176 Utf8 "Lorg/openjdk/asmtools/transform/case8302260/data/CTestClass;"; // #25 at 0x017D Utf8 ""; // #26 at 0x01BC Utf8 "SourceFile"; // #27 at 0x01C7 Utf8 "CTestClass.java"; // #28 at 0x01D4 } // end of Constant Pool 0x0021; // access [ ACC_PUBLIC, ACC_SUPER ] #10; // this_cpx #2; // super_cpx [1] { // Interfaces #19; // org/openjdk/asmtools/transform/case8302260/data/ITestInterfaceA at 0x01F0 } // end of Interfaces [2] { // Fields { // field at 0x01F2 0x0009; // access #13; // name_index : ctestString #14; // descriptor_index : Ljava/lang/String; [0] { // Attributes } // end of Attributes } ; { // field at 0x01FA 0x0009; // access #17; // name_index : ctestLong #18; // descriptor_index : J [0] { // Attributes } // end of Attributes } } // end of Fields [2] { // Methods { // method at 0x0204 0x0001; // access #5; // name_index : #6; // descriptor_index : ()V [1] { // Attributes Attr(#21, 47) { // Code at 0x020C 1; // max_stack 1; // max_locals Bytes[5]{ 0x2AB70001B1; } [0] { // Traps } // end of Traps [2] { // Attributes Attr(#22, 6) { // LineNumberTable at 0x0223 [1] { // line_number_table 0 28; // at 0x022F } } // end of LineNumberTable ; Attr(#23, 12) { // LocalVariableTable at 0x022F [1] { // LocalVariableTable 0 5 24 25 0; // at 0x0241 } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x0241 0x0008; // access #26; // name_index : #6; // descriptor_index : ()V [1] { // Attributes Attr(#21, 38) { // Code at 0x0249 2; // max_stack 0; // max_locals Bytes[10]{ 0x1207B300090AB300; 0x0FB1; } [0] { // Traps } // end of Traps [1] { // Attributes Attr(#22, 10) { // LineNumberTable at 0x0265 [2] { // line_number_table 0 29; // at 0x0271 5 30; // at 0x0275 } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [1] { // Attributes Attr(#27, 2) { // SourceFile at 0x0277 #28; } // end of SourceFile } // end of Attributes } // end of class org/openjdk/asmtools/transform/case8302260/data/CTestClass ITestInterfaceA.class.jasm000066400000000000000000000045441514323636100357520ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case8302260/data// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // package org/openjdk/asmtools/transform/case8302260/data; public interface #1 /* ITestInterfaceA */ version 60:0 { const #1 = class #2; // ITestInterfaceA const #2 = Asciz "org/openjdk/asmtools/transform/case8302260/data/ITestInterfaceA"; const #3 = class #4; // java/lang/Object const #4 = Asciz "java/lang/Object"; const #5 = Asciz "stringField"; const #6 = Asciz "Ljava/lang/String;"; const #7 = Asciz "ConstantValue"; const #8 = String #9; // "ITestInterfaceA" const #9 = Asciz "ITestInterfaceA"; const #10 = Asciz "longField"; const #11 = Asciz "J"; const #12 = long 10l; const #14 = Asciz "stringField3"; const #15 = String #16; // "ITestInterfaceA3" const #16 = Asciz "ITestInterfaceA3"; const #17 = Asciz "longField3"; const #18 = long 13l; const #20 = Asciz "SourceFile"; const #21 = Asciz "ITestInterfaceA.java"; public static final Field #5:#6 = #8; // stringField:"Ljava/lang/String;" = String "ITestInterfaceA" public static final Field #10:#11 = #12; // longField:J = long 10l public static final Field #14:#6 = #15; // stringField3:"Ljava/lang/String;" = String "ITestInterfaceA3" public static final Field #17:#11 = #18; // longField3:J = long 13l } // end Class ITestInterfaceA compiled from "ITestInterfaceA.java" ITestInterfaceA.class.jcod000066400000000000000000000117701514323636100357360ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case8302260/data// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // class org/openjdk/asmtools/transform/case8302260/data/ITestInterfaceA { 0xCAFEBABE; 0; // minor version 60; // version [22] { // Constant Pool ; // first element is empty class #2; // #1 at 0x0A Utf8 "org/openjdk/asmtools/transform/case8302260/data/ITestInterfaceA"; // #2 at 0x0D class #4; // #3 at 0x4F Utf8 "java/lang/Object"; // #4 at 0x52 Utf8 "stringField"; // #5 at 0x65 Utf8 "Ljava/lang/String;"; // #6 at 0x73 Utf8 "ConstantValue"; // #7 at 0x88 String #9; // #8 at 0x98 Utf8 "ITestInterfaceA"; // #9 at 0x9B Utf8 "longField"; // #10 at 0xAD Utf8 "J"; // #11 at 0xB9 long 0x000000000000000A;; // #12 at 0xBD Utf8 "stringField3"; // #14 at 0xC6 String #16; // #15 at 0xD5 Utf8 "ITestInterfaceA3"; // #16 at 0xD8 Utf8 "longField3"; // #17 at 0xEB long 0x000000000000000D;; // #18 at 0xF8 Utf8 "SourceFile"; // #20 at 0x0101 Utf8 "ITestInterfaceA.java"; // #21 at 0x010E } // end of Constant Pool 0x0601; // access [ ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT ] #1; // this_cpx #3; // super_cpx [0] { // Interfaces } // end of Interfaces [4] { // Fields { // field at 0x012F 0x0019; // access #5; // name_index : stringField #6; // descriptor_index : Ljava/lang/String; [1] { // Attributes Attr(#7, 2) { // ConstantValue at 0x0137 #8; } // end of ConstantValue } // end of Attributes } ; { // field at 0x013F 0x0019; // access #10; // name_index : longField #11; // descriptor_index : J [1] { // Attributes Attr(#7, 2) { // ConstantValue at 0x0147 #12; } // end of ConstantValue } // end of Attributes } ; { // field at 0x014F 0x0019; // access #14; // name_index : stringField3 #6; // descriptor_index : Ljava/lang/String; [1] { // Attributes Attr(#7, 2) { // ConstantValue at 0x0157 #15; } // end of ConstantValue } // end of Attributes } ; { // field at 0x015F 0x0019; // access #17; // name_index : longField3 #11; // descriptor_index : J [1] { // Attributes Attr(#7, 2) { // ConstantValue at 0x0167 #18; } // end of ConstantValue } // end of Attributes } } // end of Fields [0] { // Methods } // end of Methods [1] { // Attributes Attr(#20, 2) { // SourceFile at 0x0173 #21; } // end of SourceFile } // end of Attributes } // end of class org/openjdk/asmtools/transform/case8302260/data/ITestInterfaceA jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case8302260/data/pkg/000077500000000000000000000000001514323636100316515ustar00rootroot00000000000000CTestSuperClass.class.jasm000066400000000000000000000107001514323636100365770ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case8302260/data/pkg// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // package org/openjdk/asmtools/transform/case8302260/data/pkg; public super class #10 /* CTestSuperClass */ version 60:0 { const #1 = Method #2.#3; // java/lang/Object."":"()V" const #2 = class #4; // java/lang/Object const #3 = NameAndType #5:#6; // "":"()V" const #4 = Asciz "java/lang/Object"; const #5 = Asciz ""; const #6 = Asciz "()V"; const #7 = String #8; // "CTestSuperClass" const #8 = Asciz "CTestSuperClass"; const #9 = Field #10.#11; // CTestSuperClass.stringField:"Ljava/lang/String;" const #10 = class #12; // CTestSuperClass const #11 = NameAndType #13:#14; // stringField:"Ljava/lang/String;" const #12 = Asciz "org/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass"; const #13 = Asciz "stringField"; const #14 = Asciz "Ljava/lang/String;"; const #15 = long 100l; const #17 = Field #10.#18; // CTestSuperClass.longField:"J" const #18 = NameAndType #19:#20; // longField:"J" const #19 = Asciz "longField"; const #20 = Asciz "J"; const #21 = String #22; // "CTestSuperClass2" const #22 = Asciz "CTestSuperClass2"; const #23 = Field #10.#24; // CTestSuperClass.stringField2:"Ljava/lang/String;" const #24 = NameAndType #25:#14; // stringField2:"Ljava/lang/String;" const #25 = Asciz "stringField2"; const #26 = long 102l; const #28 = Field #10.#29; // CTestSuperClass.longField2:"J" const #29 = NameAndType #30:#20; // longField2:"J" const #30 = Asciz "longField2"; const #31 = Asciz "Code"; const #32 = Asciz "LineNumberTable"; const #33 = Asciz "LocalVariableTable"; const #34 = Asciz "this"; const #35 = Asciz "Lorg/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass;"; const #36 = Asciz ""; const #37 = Asciz "SourceFile"; const #38 = Asciz "CTestSuperClass.java"; public static Field #13:#14; // stringField:"Ljava/lang/String;" public static Field #19:#20; // longField:J public static Field #25:#14; // stringField2:"Ljava/lang/String;" public static Field #30:#20; // longField2:J public Method #5:#6 // "":"()V" stack 1 locals 1 { var 0 #34:#35; // this:"Lorg/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass;" 0: aload_0; 1: invokespecial #1; // Method java/lang/Object."":"()V" 4: return; endvar 0; } static Method #36:#6 // "":"()V" stack 2 locals 0 { 0: ldc #7; // String "CTestSuperClass" 2: putstatic #9; // Field stringField:"Ljava/lang/String;" 5: ldc2_w #15; // long 100l 8: putstatic #17; // Field longField:"J" 11: ldc #21; // String "CTestSuperClass2" 13: putstatic #23; // Field stringField2:"Ljava/lang/String;" 16: ldc2_w #26; // long 102l 19: putstatic #28; // Field longField2:"J" 22: return; } } // end Class CTestSuperClass compiled from "CTestSuperClass.java" CTestSuperClass.class.jcod000066400000000000000000000175171514323636100366010ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/asmtools/test/resources/org/openjdk/asmtools/transform/case8302260/data/pkg// // Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 only, as // published by the Free Software Foundation. // // This code is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // version 2 for more details (a copy is included in the LICENSE file that // accompanied this code). // // You should have received a copy of the GNU General Public License version // 2 along with this work; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. // // Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // or visit www.oracle.com if you need additional information or have any // questions. // class org/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass { 0xCAFEBABE; 0; // minor version 60; // version [39] { // Constant Pool ; // first element is empty Method #2 #3; // #1 at 0x0A class #4; // #2 at 0x0F NameAndType #5 #6; // #3 at 0x12 Utf8 "java/lang/Object"; // #4 at 0x17 Utf8 ""; // #5 at 0x2A Utf8 "()V"; // #6 at 0x33 String #8; // #7 at 0x39 Utf8 "CTestSuperClass"; // #8 at 0x3C Field #10 #11; // #9 at 0x4E class #12; // #10 at 0x53 NameAndType #13 #14; // #11 at 0x56 Utf8 "org/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass"; // #12 at 0x5B Utf8 "stringField"; // #13 at 0xA1 Utf8 "Ljava/lang/String;"; // #14 at 0xAF long 0x0000000000000064;; // #15 at 0xC4 Field #10 #18; // #17 at 0xCD NameAndType #19 #20; // #18 at 0xD2 Utf8 "longField"; // #19 at 0xD7 Utf8 "J"; // #20 at 0xE3 String #22; // #21 at 0xE7 Utf8 "CTestSuperClass2"; // #22 at 0xEA Field #10 #24; // #23 at 0xFD NameAndType #25 #14; // #24 at 0x0102 Utf8 "stringField2"; // #25 at 0x0107 long 0x0000000000000066;; // #26 at 0x0116 Field #10 #29; // #28 at 0x011F NameAndType #30 #20; // #29 at 0x0124 Utf8 "longField2"; // #30 at 0x0129 Utf8 "Code"; // #31 at 0x0136 Utf8 "LineNumberTable"; // #32 at 0x013D Utf8 "LocalVariableTable"; // #33 at 0x014F Utf8 "this"; // #34 at 0x0164 Utf8 "Lorg/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass;"; // #35 at 0x016B Utf8 ""; // #36 at 0x01B3 Utf8 "SourceFile"; // #37 at 0x01BE Utf8 "CTestSuperClass.java"; // #38 at 0x01CB } // end of Constant Pool 0x0021; // access [ ACC_PUBLIC, ACC_SUPER ] #10; // this_cpx #2; // super_cpx [0] { // Interfaces } // end of Interfaces [4] { // Fields { // field at 0x01EC 0x0009; // access #13; // name_index : stringField #14; // descriptor_index : Ljava/lang/String; [0] { // Attributes } // end of Attributes } ; { // field at 0x01F4 0x0009; // access #19; // name_index : longField #20; // descriptor_index : J [0] { // Attributes } // end of Attributes } ; { // field at 0x01FC 0x0009; // access #25; // name_index : stringField2 #14; // descriptor_index : Ljava/lang/String; [0] { // Attributes } // end of Attributes } ; { // field at 0x0204 0x0009; // access #30; // name_index : longField2 #20; // descriptor_index : J [0] { // Attributes } // end of Attributes } } // end of Fields [2] { // Methods { // method at 0x020E 0x0001; // access #5; // name_index : #6; // descriptor_index : ()V [1] { // Attributes Attr(#31, 47) { // Code at 0x0216 1; // max_stack 1; // max_locals Bytes[5]{ 0x2AB70001B1; } [0] { // Traps } // end of Traps [2] { // Attributes Attr(#32, 6) { // LineNumberTable at 0x022D [1] { // line_number_table 0 25; // at 0x0239 } } // end of LineNumberTable ; Attr(#33, 12) { // LocalVariableTable at 0x0239 [1] { // LocalVariableTable 0 5 34 35 0; // at 0x024B } } // end of LocalVariableTable } // end of Attributes } // end of Code } // end of Attributes } ; { // method at 0x024B 0x0008; // access #36; // name_index : #6; // descriptor_index : ()V [1] { // Attributes Attr(#31, 59) { // Code at 0x0253 2; // max_stack 0; // max_locals Bytes[23]{ 0x1207B3000914000F; 0xB300111215B30017; 0x14001AB3001CB1; } [0] { // Traps } // end of Traps [1] { // Attributes Attr(#32, 18) { // LineNumberTable at 0x027C [4] { // line_number_table 0 26; // at 0x0288 5 27; // at 0x028C 11 29; // at 0x0290 16 30; // at 0x0294 } } // end of LineNumberTable } // end of Attributes } // end of Code } // end of Attributes } } // end of Methods [1] { // Attributes Attr(#37, 2) { // SourceFile at 0x0296 #38; } // end of SourceFile } // end of Attributes } // end of class org/openjdk/asmtools/transform/case8302260/data/pkg/CTestSuperClass jtreg8-8.2.1+1+ds1/doc/000077500000000000000000000000001514323636100143155ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/doc/building.md000066400000000000000000000157501514323636100164440ustar00rootroot00000000000000# Building The Regression Test Harness for the OpenJDK platform: `jtreg` (This information is also available at ) `jtreg` depends on a number of external components: JT Harness, TestNG, JUnit, and AsmTools. The fundamental way to build `jtreg` is with GNU make, specifying where to find those external components, but a script is also available that will download appropriate copies of those components before building `jtreg`. ## Building `jtreg` with the `build.sh` script This is the recommended way to build `jtreg`, for those that want a simple, basic way to build `jtreg`. *Note:* The _build.sh_ script supersedes the earlier _build-all.sh_ script. The script is intended to be run in a Unix-like shell, such as `bash` on Linux or Mac OS X, or with Cygwin, MSYS2, or WSL on Windows. At a minimum, you must either set the `JAVA_HOME` environment variable or specify the location of the JDK to be used to build `jtreg` with the `--jdk` command-line option. It must be a recent build of JDK 17 or later. % cd jtreg-root-directory % sh make/build.sh --jdk JDK-directory If your shell is not compatible with `bash`, you may need to invoke `bash` explicitly: % bash make/build.sh --jdk JDK-directory The script will create a `build` sub-directory, download and build dependencies, and finally build `jtreg` itself. The resulting image will be in _build/images/jtreg_ . If you have access to the public Internet, no environment variables need to be specified to get a standard build of `jtreg`. However, you can set environment variables used to define the location of dependencies to be downloaded. These are documented in _make/build.sh_ and are normally specified in _make/build-support/version-numbers_ and _make/build-support/*/version-numbers_ . ### Rebuilding faster with `build/make.sh` After you have run `make/build.sh` once, if you wish to rebuild after making some changes, you can run `build/make.sh`. It skips the steps to download and build the dependencies, and so should be significantly faster. ## Building `jtreg` with GNU Make If you don't want to use `build.sh` to build `jtreg`, you can invoke the makefile directly, or by writing and using your own alternative wrapper. The makefiles require a number of variables to be set, identifying the parts of all the dependencies. In general, there are two kinds of variable to be set for each dependency: the location of any jar files that may be required to use the component, and the location of any "legal notices" (such as license files) that may need to be included in the `jtreg` image. There are five dependencies that need to be made available. The following lists the variables that need to be set for each dependency. 1. [JT Harness] (JavaTest) * `JAVATEST_JAR`: a jar file containing the classes for JT Harness * `JTHARNESS_NOTICES`: any legal notices that may be required to use JT Harness 2. [AsmTools] * `ASMTOOLS_JAR`: a jar file containing the classes for AsmTools * `ASMTOOLS_NOTICES`: any legal notices that may be required to use AsmTools 3. [JUnit] * `JUNIT_JARS`: a list of one or more jar files containing the classes for JUnit and its dependencies: the list may be a series of jar files or a singleton "uber-jar" * `JUNIT_NOTICES`: any legal notices that be required to use JUnit Consult the JUnit documentation to see if there are any additional dependencies that may be required when running JUnit. 4. [TestNG] * `TESTNG_JARS`: a list of one or more jar files containing the classes for TestNG and its dependencies: the list may be a series of jar files or a singleton "uber-jar" * `TESTNG_NOTICES`: any legal notices that be required to use TestNG Consult the TestNG documentation to see if there are any additional dependencies that may be required when running TestNG. In general, any jar files identified by `*_JAR` or `*_JARS` variables will be copied to the `lib` directory in the generated image. Any files identified by `*_NOTICES` variables will be copied to a component-specific subdirectory of the `legal` directory in the generated image. [AsmTools]: https://github.com/openjdk/asmtools [JT Harness]: https://github.com/openjdk/jtharness [JUnit]: https://junit.org/ [TestNG]: https://testng.org/ ## Running `jtreg` Self-Tests The tests can be invoked with individual make targets, or collectively via the `test` target. Individual make targets for self-tests are explained [here](../test/README.md#makefiles). For example, the [ControlTest.gmk](../test/ctrl/ControlTest.gmk) makefile has a `$(BUILDTESTDIR)/ControlTest.ok` target which runs one of the self-tests. In order to run that individual test, use a command such as the following: ```shell bash build/make.sh $(pwd)/build/test/ControlTest.ok ``` Some tests depend on specific versions of JDK being available, specified by the following variables: `JDK8HOME`, `JDK9HOME`, `JDK14HOME`, `JDK18HOME`. A test that requires any of these version of JDK will be skipped if the variable is not set. Some of the tests need to pop up windows while they execute. No interaction with these windows is normally required. Since this can be a problem on a headless server machine, and an annoyance on a personal workstation, the tests will attempt to use VNC to create a dummy X-server for use by the tests while they are running. Various implementations of VNC are available, such as from . Using VNC is optional; it is not required in order to run the tests. By default, VNC will be used if `vncserver` is found on your execution path, or if VNC_HOME points to an installed copy of VNC. To explicitly disable the use of VNC, set the VNC environment variable to one of false, off, no, or 0. Unless explicitly disabled, the tests will check the following: * You must have a password set in _$HOME/.vnc/passwd_. This is the standard location used by the vncserver command. * If you set the environment variable `VNC_HOME`, it will be prepended to your execution path to find vncserver. * vncserver must be on your execution path, after `VNC_HOME` has been added, if set. If the tests find any issue with using VNC, it will not be used. If VNC is used to create a dummy X server, the server will be terminated when the test is complete. The logic for using VNC is encapsulated within the script _make/display.sh_. # Contribution guidelines Contributors are encouraged to follow code style conventions in [Java Style Guidelines](https://cr.openjdk.org/~alundblad/styleguide/index-v6.html) where reasonable. Existing `jtreg` command-line options have a certain style due to their age, but new options should strive to follow [JEP 293: Guidelines for JDK Command-Line Tool Options](https://openjdk.org/jeps/293). For backwards compatibility, `jtreg` option names are case-insensitive. The `jtreg` codebase is very dependent on (jtharness)[https://github.com/openjdk/jtharness]. The two repos should most often be viewed together. This also places constraints on what changes can (easily) be made in jtreg. jtreg8-8.2.1+1+ds1/hawt-jni/000077500000000000000000000000001514323636100152715ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/.gitignore000066400000000000000000000001671514323636100172650ustar00rootroot00000000000000.classpath .project .settings *.iml *.ipr *.iws .idea webgen/out webgen/webgen.cache target dependency-reduced-pom.xml jtreg8-8.2.1+1+ds1/hawt-jni/.travis.yml000066400000000000000000000006021514323636100174000ustar00rootroot00000000000000language: java jobs: include: - arch: amd64 - arch: ppc64le before_install: - mkdir -p /opt/maven - curl https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz|tar -xz --strip 1 -C /opt/maven - export MAVEN_HOME=/opt/maven - export PATH=${MAVEN_HOME}/bin:${PATH} after_failure: print_surefire_reports.sh jtreg8-8.2.1+1+ds1/hawt-jni/changelog.md000066400000000000000000000510421514323636100175440ustar00rootroot00000000000000# ![HawtJNI](http://fusesource.github.io/hawtjni/images/project-logo.png) ## HawtJNI 1.18, released 2020-10-21 * [`84606da`](https://github.com/fusesource/hawtjni/commit/84606dacef9bced4d21c2d47bb641b2737738ceb) Bump junit from 4.13 to 4.13.1 in /hawtjni-example * [`de46737`](https://github.com/fusesource/hawtjni/commit/de4673789a0f0892516450f837c301f5e81246d0) Merge pull request #70 from Siddhesh-Ghadi/ci-power * [`c06f662`](https://github.com/fusesource/hawtjni/commit/c06f662b9e7ef74dd98bf73f9458cae7a3f5fd86) Add ppc64le support on travis-ci * [`2976527`](https://github.com/fusesource/hawtjni/commit/2976527a43ec256c98c383110d436bba7aff8c9c) Add doc to setup the native build environment macOS * [`c00e2d2`](https://github.com/fusesource/hawtjni/commit/c00e2d22b4dfa105d31754bf044874845d7cacb5) Support for shared pointers, fixes #57 * [`5b4e5ad`](https://github.com/fusesource/hawtjni/commit/5b4e5ad74e63f1c1c180b2169eedd20c9b64e716) Merge pull request #59 from voutilad/master * [`8678713`](https://github.com/fusesource/hawtjni/commit/8678713caf00652f4f7d52e36b8b384cf611dde5) Merge pull request #61 from remkop/master * [`d145a1d`](https://github.com/fusesource/hawtjni/commit/d145a1dea37bbd8f98c9f1e6f21d756f849d7979) Do not force JDK 11 but rather support it * [`8ee5b21`](https://github.com/fusesource/hawtjni/commit/8ee5b2113069399c79610a1de6e01af7d5ae8c45) Updated to work with JDK11 * [`d1f1492`](https://github.com/fusesource/hawtjni/commit/d1f14926156d103357e7761c4182085b27e7c663) Fix example on OSX * [`b7277af`](https://github.com/fusesource/hawtjni/commit/b7277aff8f3b01c1c462ede437efb3a4a33973ff) prepare 1.17 release website * [`56b5bd0`](https://github.com/fusesource/hawtjni/commit/56b5bd0dd3e9a3091905cf262dbe232b65447e07) use hawtjni-maven-plugin for Maven Central badge * [`c14fec0`](https://github.com/fusesource/hawtjni/commit/c14fec00b9976ff6b84e62e483d678594a7d3832) Support for OSX Catalina * [`2c64ed4`](https://github.com/fusesource/hawtjni/commit/2c64ed4134de9b3cefd9423382a59f60c8f3ad25) jansi/#162 fix issue where bitModel could not be retrieved on GraalVM * [`e7806ff`](https://github.com/fusesource/hawtjni/commit/e7806ff89508fce6a61c300ea9a16992324c0ce1) support for OpenBSD ## HawtJNI 1.17, released 2019-04-03 * [`1c4a17b`](https://github.com/fusesource/hawtjni/commit/1c4a17b31bf988f99df6da7085f86829b935c342) Remove shared_ptr support until it's working * [`d3f9d0a`](https://github.com/fusesource/hawtjni/commit/d3f9d0ab71fd25d8d6f6eb9c3de6c6b47ddae92e) Keep (long*) for standard pointers * [`906aa15`](https://github.com/fusesource/hawtjni/commit/906aa158c24d3603aca6f3766b7fa0da306d23d6) Merge branch 'calin-iorgulescu-master' * [`c5130eb`](https://github.com/fusesource/hawtjni/commit/c5130eb900279531f67d4734ccf1ad2f2ad95a70) Fix typo * [`9d38df2`](https://github.com/fusesource/hawtjni/commit/9d38df2f4a25ee55fbb0dc921fb2004b33c59541) Merge branch 'master' of https://github.com/calin-iorgulescu/hawtjni into calin-iorgulescu-master * [`1c42406`](https://github.com/fusesource/hawtjni/commit/1c42406ec55ed1955d2fc573e3002e5fa557c984) Merge branch 'master' of https://github.com/batterseapower/hawtjni into batterseapower-master * [`55afd36`](https://github.com/fusesource/hawtjni/commit/55afd361a8fe44d4d6126de30b279c5b941894ba) Add 10.14 in OSX SDK version list * [`d094c95`](https://github.com/fusesource/hawtjni/commit/d094c95e7fd0fb879f896b49c796a92adee72369) Merge pull request #45 from wjsl/osx10.13 * [`d028542`](https://github.com/fusesource/hawtjni/commit/d028542040a23e090633ab0b192ca9c08f7838e2) Merge pull request #48 from castortech/master * [`c0cfb25`](https://github.com/fusesource/hawtjni/commit/c0cfb2558b8e11edd224f08fd7da6daa84876b34) Merge branch 'master' into master * [`73e0b4f`](https://github.com/fusesource/hawtjni/commit/73e0b4f68d4597295bcb6d0196a1c030ff14589a) Merge pull request #55 from tdemande/hawtjni-issue-54 * [`ec9cc6c`](https://github.com/fusesource/hawtjni/commit/ec9cc6c3ce72b7fcd99d356f1abbc0f36fbb9a29) Merge branch 'hawtjni_shared_pointer' of https://github.com/ossdev07/hawtjni into ossdev07-hawtjni_shared_pointer * [`bd514b7`](https://github.com/fusesource/hawtjni/commit/bd514b71878415e7091b914420a291310de3ec30) Implement a different strategy with sha1 checksum for extracting libraries, fixes #56 * [`40e0b2f`](https://github.com/fusesource/hawtjni/commit/40e0b2f27a2218b4d10ae3989a4ed74bcf40562d) Formatting * [`bc3f187`](https://github.com/fusesource/hawtjni/commit/bc3f187087a043caa6737a78c10f982159bd8c2c) #54 Also search in base dir when finding/extracting native lib * [`8f464d0`](https://github.com/fusesource/hawtjni/commit/8f464d07bc9a807acf33f0f2e355065471f15235) Implement new JNIField accessor model: allow support for separate getter/setter methods for individual fields. * [`5f52fee`](https://github.com/fusesource/hawtjni/commit/5f52fee5720c5cbeeaae71cfaa90611bcba56e8d) StructsGenerator: Fix bug where a JniClass extending another class that has only ignored fields would generate calls to cache the fields. * [`2b88a8f`](https://github.com/fusesource/hawtjni/commit/2b88a8f56fdbbf0e71b213f15b333a681e7dc72f) StructsGenerator: Fix bug where an empty field declaration would be created if only skipped fields are declared in a struct. * [`235f0b9`](https://github.com/fusesource/hawtjni/commit/235f0b985acba4559cfda588a0312287f9420791) Change maven settings to allow building. * [`839ddcf`](https://github.com/fusesource/hawtjni/commit/839ddcf2bff9e53020f162feeac7258ea6ac97db) added icon for hawtjni-runtime artifact in Central * [`27af76b`](https://github.com/fusesource/hawtjni/commit/27af76b5f73af61ef592cc66ed65fb12438cc166) Update StructsGenerator.java * [`f29f849`](https://github.com/fusesource/hawtjni/commit/f29f84960133e5a5740bcd6b6120b8bb7f172f0d) added Automatic-Module-Name to manifest for Java 9 auto-module name * [`1c2d511`](https://github.com/fusesource/hawtjni/commit/1c2d511d970ad07924ebdbb1e8566fb56e2edf6c) Hawtjni: Shared_pointer support added in hawtjni * [`7a6082f`](https://github.com/fusesource/hawtjni/commit/7a6082faed85ea73945065466e68ad6035cf724d) fixed typo * [`35c061c`](https://github.com/fusesource/hawtjni/commit/35c061ca7ffedb11fa52a18c8c087a41bbb5cd88) added Runtime API as a feature * [`6c1f140`](https://github.com/fusesource/hawtjni/commit/6c1f140970a59727a102b8ee2daef909eb991b78) Added customization for the Windows build. * [`98b1531`](https://github.com/fusesource/hawtjni/commit/98b1531628f236aa9a68fd49b67ac09f1b547868) Added missing case of "no directory" as per method documentation. * [`a103c50`](https://github.com/fusesource/hawtjni/commit/a103c50b1b1b357d6a5d932cac7ebc599bb0d16b) Added support to detect newer versions of Visual Studio as candidates for msbuild * [`6f891af`](https://github.com/fusesource/hawtjni/commit/6f891af96768e77f5e800fd0f723712b87e30735) Updated documentation to clearly indicate the vcbuild is deprecated and that msbuild is supported. * [`84aa381`](https://github.com/fusesource/hawtjni/commit/84aa381836dae2b784ea685b71c54c6eb6622646) update changelog.md for 1.16 release * [`3fffa67`](https://github.com/fusesource/hawtjni/commit/3fffa67c2b23f92a1c57552e3779c58382795855) fixed and improved changelog.md formatting * [`2c7134b`](https://github.com/fusesource/hawtjni/commit/2c7134b4ee612af788d8486181459580811ba1d6) Add 10.13 in OSX SDK version list ## HawtJNI 1.16, released 2018-02-02 * [`2e99592`](https://github.com/fusesource/hawtjni/commit/2e99592f7be976a935beeed7d7395d4a5787e04e) fixed site build * [`14f1d05`](https://github.com/fusesource/hawtjni/commit/14f1d0564d6e2c71c74288e537fcfa4acf7f4c18) renamed maven-hawtjni-plugin to hawtjni-maven-plugin * [`743d57b`](https://github.com/fusesource/hawtjni/commit/743d57b25337dc1e0b5dcfc7dce63b15a4433f78) switched Maven plugin from javadoc annotations to Java5 annotations * [`4a42ee6`](https://github.com/fusesource/hawtjni/commit/4a42ee611ad66c71a6d4b32d41b78ca02ca225e4) [#36](http://github.com/fusesource/hawtjni/issues/36) added info on loaded native library * [`16c5d82`](https://github.com/fusesource/hawtjni/commit/16c5d820e84864fe437ce77a33011b50b2a6f66d) Merge pull request [#37](http://github.com/fusesource/hawtjni/issues/37) from ghost/patch-1 * [`45e8a55`](https://github.com/fusesource/hawtjni/commit/45e8a557788a8dbf9fd134df6f8e99f456e3324f) [#43](http://github.com/fusesource/hawtjni/issues/43) mark HawtJNI annotations @Documented * [`f0c3b54`](https://github.com/fusesource/hawtjni/commit/f0c3b547aeecd508498871583595ab7adff54ea3) s/your/you're/ ## [HawtJNI 1.15](http://fusesource.github.io/hawtjni/blog/releases/release-1-15.html), released 2017-05-04 * [`7537b9d`](https://github.com/fusesource/hawtjni/commit/7537b9d19be9806b210674ccad4b96d90a11d50b) Update changelog * [`906cedb`](https://github.com/fusesource/hawtjni/commit/906cedb80b9661d0ea08f524fb464243610653a9) Default to extract in the users' home folder in case the temp directory is not writable * [`ed95784`](https://github.com/fusesource/hawtjni/commit/ed95784f9a4d3ed1afb0a14bd3dccc815d3e3cbe) search in library.$name.path like in META-INF/native resources * [`477c8cc`](https://github.com/fusesource/hawtjni/commit/477c8ccac78c3695ebcf6299d8b201adb3394d34) Fix some other problems with platform, especially on windows when compiling for the non native platform * [`58834e8`](https://github.com/fusesource/hawtjni/commit/58834e835c6f196f6188c6f35aa9c349db610d84) Upgrade some plugins * [`992ee3f`](https://github.com/fusesource/hawtjni/commit/992ee3fa28f30823913fe95a790fe3a08d19bdf3) Fix bad naming for the extracted file when the version contains a dot * [`6b58328`](https://github.com/fusesource/hawtjni/commit/6b58328635bd181c18048387aa7d83fda51d5be8) Do not include the extension in the windows project name, [#23](http://github.com/fusesource/hawtjni/issues/23) * [`9165154`](https://github.com/fusesource/hawtjni/commit/916515413152d2b25268d0f813c1f0f411388b3a) Merge pull request [#30](http://github.com/fusesource/hawtjni/issues/30) from felixvf/fix_lib64_bug * [`1cb6770`](https://github.com/fusesource/hawtjni/commit/1cb6770dc7348958d96b38d8d0b1f4b065f43da5) Merge pull request [#34](http://github.com/fusesource/hawtjni/issues/34) from hboutemy/master * [`4c430c6`](https://github.com/fusesource/hawtjni/commit/4c430c6d4454b37e035c1fb7ae284b8d3ac99c03) Merge pull request [#20](http://github.com/fusesource/hawtjni/issues/20) from felixvf/fix_bug_18 * [`f99972b`](https://github.com/fusesource/hawtjni/commit/f99972b7892fd621dca1442b8c8f3234edd4b02f) Better exception reporting when unable to load a library, fixes [#27](http://github.com/fusesource/hawtjni/issues/27) * [`1c5b81f`](https://github.com/fusesource/hawtjni/commit/1c5b81fb386f74e47e776f3ba2775d15003f2ae9) Allow the windows project name to be specified, fixes [#23](http://github.com/fusesource/hawtjni/issues/23) * [`ef3437c`](https://github.com/fusesource/hawtjni/commit/ef3437cde117c04793d773b25bd0627e5e260e66) Allow the -Dplatform=xxx setting to be used when doing the actual native build * [`0072848`](https://github.com/fusesource/hawtjni/commit/0072848253e100c98745725bdf5224e63103fad7) Remove explicit array creation when using var args * [`c6fb914`](https://github.com/fusesource/hawtjni/commit/c6fb9149b43292564bbc854d9942d4898a7f728d) Remove unused imports * [`145f3ee`](https://github.com/fusesource/hawtjni/commit/145f3ee50204c8b8f8ae728cc91533dd19424d7d) Fix typos in method names * [`81a35e1`](https://github.com/fusesource/hawtjni/commit/81a35e1a923bb1c7b0e6ffbdd66a08c83e119324) prepare gh-pages publication with scm-publish plugin * [`b3982d5`](https://github.com/fusesource/hawtjni/commit/b3982d573b04878918aebe5435a5f64af6a4401f) Use latest version of maven javadoc plugin * [`cb2ad85`](https://github.com/fusesource/hawtjni/commit/cb2ad85bc551e1628be25181acd6f9e97e04afab) Merge branch 'hboutemy-hawtjni-31' * [`cd20329`](https://github.com/fusesource/hawtjni/commit/cd20329a801e5d904d7a43c46d3cb150b4767b66) [#31](http://github.com/fusesource/hawtjni/issues/31) fixed API doc generation and misc other Maven-related conf * [`784a50f`](https://github.com/fusesource/hawtjni/commit/784a50f22d0abd1d4fa05f1fb720e70623092e63) Fix libdir to "/lib". Prevent any variation such as "/lib64". * [`401ce1c`](https://github.com/fusesource/hawtjni/commit/401ce1cc6f053fccae386977b695ae7a5948ef4d) Update readme.md * [`a73fc16`](https://github.com/fusesource/hawtjni/commit/a73fc165306a139e8cbb82f9dc28002c05d6d206) Merge pull request [#11](http://github.com/fusesource/hawtjni/issues/11) from OhmData/travis * [`098c501`](https://github.com/fusesource/hawtjni/commit/098c501c90feb20749105840eaca1f51fbae2559) Simplify the fallback case a bit * [`40f9f23`](https://github.com/fusesource/hawtjni/commit/40f9f23b4839941e217a8415eb9799aa539e0e36) Merge pull request [#22](http://github.com/fusesource/hawtjni/issues/22) from slaunay/use-java7-chmod-with-unix-chmod-fallback ## [HawtJNI 1.14](http://fusesource.github.io/hawtjni/blog/releases/release-1.14.html), released 2016-06-20 * [`e2522b0`](https://github.com/fusesource/hawtjni/commit/e2522b0ddd9f8975dc3a1cc99534ea458b807ddd) Merge pull request [#26](http://github.com/fusesource/hawtjni/issues/26) from michael-o/freebsd * [`6dc93fe`](https://github.com/fusesource/hawtjni/commit/6dc93fe4c3b67e68d9805b6f0cc7f2b7c36d5b06) Improve FreeBSD support * [`2d49307`](https://github.com/fusesource/hawtjni/commit/2d493076d264f6d8e2ac81ada4da4fcd78b2dabf) Deploy to sonatype. ## [HawtJNI 1.12](http://fusesource.github.io/hawtjni/blog/releases/release-1.12.html), released 2016-04-26 * [`70f24ba`](https://github.com/fusesource/hawtjni/commit/70f24ba7438a698d8e1e0de599b304774e01f5d4) Don't build the website by default. * [`ef93152`](https://github.com/fusesource/hawtjni/commit/ef931527b4ca915a53c59eb6f6ef0222f8cf3c12) Better JDK detection on OS X. * [`61ac652`](https://github.com/fusesource/hawtjni/commit/61ac6525a42117f0ea8820417d00616ef7f27452) Use Files.setPosixFilePermissions for chmod * [`57e5b32`](https://github.com/fusesource/hawtjni/commit/57e5b3262a86ac0541585f3b3a40bf3b8933561b) Define JNI64 not only in case of \_\_x86\_64\_\_ but in general for any \_LP64 platform. ## [HawtJNI 1.11](http://fusesource.github.io/hawtjni/blog/releases/release-1.11.html), released 2015-04-21 * [`e1da91a`](https://github.com/fusesource/hawtjni/commit/e1da91aec68eda9f40350b062c4fed4e75fb4cb1) Update xbean version used. * [`354e277`](https://github.com/fusesource/hawtjni/commit/354e2773cfb60008fd7500eef52ea7de8e9bb74a) Disable deployment of website since web host is not there anymore. * [`08cfdd0`](https://github.com/fusesource/hawtjni/commit/08cfdd0995bb298d88e87d559d2ce39018e6b509) Update parent pom. * [`86e97d1`](https://github.com/fusesource/hawtjni/commit/86e97d161d956009bbc92f2913dd570ece2ec3da) Merge pull request [#19](http://github.com/fusesource/hawtjni/issues/19) from jerrydlamme/master * [`1e2ee63`](https://github.com/fusesource/hawtjni/commit/1e2ee6330f6832a374e29b78a1fff2df62d4a52c) Added architecture specific native library loading path * [`d10c4b0`](https://github.com/fusesource/hawtjni/commit/d10c4b0914301810297f0f917ce3dba3e8868ff1) Merge pull request [#16](http://github.com/fusesource/hawtjni/issues/16) from NJAldwin/use-absolute-path * [`3d3aa0b`](https://github.com/fusesource/hawtjni/commit/3d3aa0be17cc8d35e251ea3594b1e684ce919d0d) Ensure absolute path is used for library * [`8c28532`](https://github.com/fusesource/hawtjni/commit/8c2853238e31b6e92f61fbdeda84314e5a529254) Merge pull request [#13](http://github.com/fusesource/hawtjni/issues/13) from batterseapower/master * [`c10adf5`](https://github.com/fusesource/hawtjni/commit/c10adf5139969f1bfa6cb6e8dd6af204d64280a9) Version bumps and markup fixes necessary for building on JDK8 * [`aed6cbd`](https://github.com/fusesource/hawtjni/commit/aed6cbd06b4579170617dae7146ec9c61b70d82c) Build a stock travis * [`efa684c`](https://github.com/fusesource/hawtjni/commit/efa684c0a87136f16b0bca67bc518ee9bf698f85) Ignore IDEA project files. * [`18cb7e5`](https://github.com/fusesource/hawtjni/commit/18cb7e5d98e0edf687ba2d02c724c36d631e9f65) prepare for next development iteration * [`f3bd38e`](https://github.com/fusesource/hawtjni/commit/f3bd38e1d83a5563c63b1bbebadf0c77c1fb54b8) Upgrade parent pom version. * [`175faf0`](https://github.com/fusesource/hawtjni/commit/175faf07fbc2ec1c42582d0b935bb05fd46fc33f) Merge pull request [#8](http://github.com/fusesource/hawtjni/issues/8) from normanmaurer/netty\_needs * [`b3f8609`](https://github.com/fusesource/hawtjni/commit/b3f8609c6682bda6d6c112c2e19c0c6cdc6dcfc6) Allow to also use generate mojo with existing native src files * [`c27b5a0`](https://github.com/fusesource/hawtjni/commit/c27b5a0c4640bce9437488275b0d8c360c45c1e6) Avoid warning. * [`c1980ef`](https://github.com/fusesource/hawtjni/commit/c1980ef32387547b0a5bba408abb00cbceaf6705) Add support for building against the Oracle JDK on OS X. ## [HawtJNI 1.10](http://fusesource.github.io/hawtjni/blog/releases/release-1.10.html), released 2014-02-12 * `efa684c` Ignore IDEA project files. * `18cb7e5` prepare for next development iteration * `f3bd38e` Upgrade parent pom version. * `175faf0` Merge pull request [#8](http://github.com/fusesource/hawtjni/issues/8) from normanmaurer/netty\_needs * `b3f8609` Allow to also use generate mojo with existing native src files * `c27b5a0` Avoid warning. * `c1980ef` Add support for building against the Oracle JDK on OS X. ## [HawtJNI 1.9](http://fusesource.github.io/hawtjni/blog/releases/release-1-9.html), released 2013-09-09 * [`1d27b2f`](https://github.com/fusesource/hawtjni/commit/1d27b2f1396920be7fce0be8b1995ac0459c69ef) Improve the generated build settings. * [`d9cd0ab`](https://github.com/fusesource/hawtjni/commit/d9cd0ab660ac5acbdc5f84c806ba14b77e197385) Should fix issue [#7](http://github.com/fusesource/hawtjni/issues/7). We now do a write barrier before setting the 'cached' field to 1 so that reader don't see this get re-ordered before all the fields are readable. ## [HawtJNI 1.8](http://fusesource.github.io/hawtjni/blog/releases/release-1-8.html), released 2013-05-13 * [`92c2661`](https://github.com/fusesource/hawtjni/commit/92c266170ce98edc200c656bd034a237098b8aa5) Simplify shared lib extraction. ## [HawtJNI 1.7](http://fusesource.github.io/hawtjni/blog/releases/release-1-7.html), released 2013-03-20 * [`3567b1d`](https://github.com/fusesource/hawtjni/commit/3567b1d89d458bddb651df252f3bb275c9076e1a) Support explicitly configuring which build tool to use on windows. * [`d566bf7`](https://github.com/fusesource/hawtjni/commit/d566bf7de5d6a67fa7c7b3e04352ca2630fb55fe) Fix for automake 1.11 ## [HawtJNI 1.6](http://fusesource.github.io/hawtjni/blog/releases/release-1-6.html), released 2012-08-09 * [`11df668`](https://github.com/fusesource/hawtjni/commit/11df668cb0d1269c0f98d9c09d80c56cf0770421) Updating hawtjni generate projects so that they work on OS X Lion. * [`f0e3ace`](https://github.com/fusesource/hawtjni/commit/f0e3ace6422e5c5413445229ac79d27f68b1485b) Fixes [#2](http://github.com/fusesource/hawtjni/issues/2) : Support passing the JNIEnv pointer to native methods. ## [HawtJNI 1.5](http://fusesource.github.io/hawtjni/blog/releases/release-1-5.html), released 2011-09-21 * [`15d5b1a`](https://github.com/fusesource/hawtjni/commit/15d5b1a4c928fb8c39eee0705316478af30704b5) Only include config.h if it's available. ## [HawtJNI 1.4](http://fusesource.github.io/hawtjni/blog/releases/release-1-4.html), released 2011-08-18 * Add more options to the maven hawtjni plugin so that you can build jars containing native libs in a different module from the one which generates the native package for the jar. ## [HawtJNI 1.3](http://fusesource.github.io/hawtjni/blog/releases/release-1-3.html), released 2011-08-08 * Add hawtjni_attach_thread and hawtjni_dettach_thread helper methods * Fully support binding against C++ source code / classes. * Support using private fields in struct bound classes. * Avoid "jump to label from here crosses initialization" compiler error message. * Provide better error messages when a user does not properly setup a C++ method binding. * Support mapping a class to a differently named structure name. * Support picking the OS X SDK version via a configure option. * Added pointer math support class to be able to do pointer math in java land without going into a JNI layer. ## [HawtJNI 1.2](http://fusesource.github.io/hawtjni/blog/releases/release-1-2.html), released 2011-06-11 * Adding bit model to the name of the extracted library to support hosts running both 32 and 64 bits JVM. * Converted website to a scalate based static website ## [HawtJNI 1.1](http://fusesource.github.io/hawtjni/blog/releases/release-1-1.html), released 2010-11-04 ---- * Generate a .vcxproj for for compatibility with the new Windows 7.1 SDK * Fixed callback failures on 32 bit platforms ## [HawtJNI 1.0](http://fusesource.github.io/hawtjni/blog/releases/2010/04/release-1-0.html), released 2010-02-24 * Initial release jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/000077500000000000000000000000001514323636100203665ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/pom.xml000066400000000000000000000133741514323636100217130ustar00rootroot00000000000000 4.0.0 org.fusesource.hawtjni hawtjni-project 1.18 hawtjni-example HawtJNI Example org.fusesource.hawtjni hawtjni-runtime ${project.version} junit junit 4.13.1 test log4j log4j 1.2.17 test org.fusesource.hawtjni hawtjni-maven-plugin ${project.version} generate build package-jar package-source org.apache.maven.plugins maven-shade-plugin 3.2.3 package shade junit:junit *:* META-INF/MANIFEST.MF mac mac org.fusesource.hawtjni hawtjni-maven-plugin osname=MacOS;processor=x86-64 osname=MacOS;processor=x86 * --with-universal osx jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/000077500000000000000000000000001514323636100211555ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/main/000077500000000000000000000000001514323636100221015ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/main/java/000077500000000000000000000000001514323636100230225ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/main/java/test/000077500000000000000000000000001514323636100240015ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/main/java/test/Example.java000077500000000000000000000274061514323636100262530ustar00rootroot00000000000000/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package test; import java.util.Arrays; import org.fusesource.hawtjni.runtime.*; import static org.fusesource.hawtjni.runtime.ArgFlag.*; import static org.fusesource.hawtjni.runtime.FieldFlag.*; import static org.fusesource.hawtjni.runtime.MethodFlag.*; /** * * @author Hiram Chirino */ @JniClass public class Example { private static final Library LIBRARY = new Library("hawtjni-example", Example.class); static { LIBRARY.load(); init(); } public static final void main(String args[]) { System.out.println("Checking Operating System Constants:"); System.out.println(" O_RDONLY: "+O_RDONLY); System.out.println(" O_WRONLY: "+O_WRONLY); System.out.println(" O_RDWR: "+O_RDWR); System.out.println(""); System.out.println("Allocating c structures on the heap..."); int COUNT = 10; // We track memory pointers with longs. long []ptrArray = new long[COUNT]; long last=0; for( int i=0; i < COUNT; i++ ) { // Allocate heap space of the structure.. ptrArray[i] = malloc(bar.SIZEOF); // Configure some data for a structure... bar f = new bar(); f.a = i; f.b = 1; byte[] src = "hello world".getBytes(); System.arraycopy(src, 0, f.c, 0, src.length); f.c5 = 0; f.prev = last; // Copy the data values into the allocated space. memmove(ptrArray[i], f, bar.SIZEOF); last = ptrArray[i]; } // Display a couple of structures... System.out.println("Dump of the first 2 structures:"); print_foo(ptrArray[0]); print_foo(ptrArray[1]); System.out.println("Passing a pointer array to a c function..."); long rc = foowork(ptrArray, COUNT); System.out.println("Function result (expecting 55): "+rc); System.out.println("freein up allocated memory."); for( int i=0; i < COUNT; i++ ) { free(ptrArray[i]); } } // Example of how to load constants. @JniMethod(flags={CONSTANT_INITIALIZER}) private static final native void init(); @JniField(flags={CONSTANT}) public static int O_RDONLY; @JniField(flags={CONSTANT}) public static int O_WRONLY; @JniField(flags={CONSTANT}) public static int O_RDWR; @JniMethod(cast="void *") public static final native long malloc( @JniArg(cast="size_t") long size); public static final native void free( @JniArg(cast="void *") long ptr); public static final native void memmove ( @JniArg(cast="void *") long dest, @JniArg(cast="const void *") long src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *") long dest, @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) byte[] src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *") long dest, @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) char[] src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *") long dest, @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) short[] src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *") long dest, @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) int[] src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *") long dest, @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) long[] src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *") long dest, @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) float[] src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *") long dest, @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) double[] src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *", flags={NO_IN, CRITICAL}) byte[] dest, @JniArg(cast="const void *") long src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *", flags={NO_IN, CRITICAL}) char[] dest, @JniArg(cast="const void *") long src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *", flags={NO_IN, CRITICAL}) short[] dest, @JniArg(cast="const void *") long src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *", flags={NO_IN, CRITICAL}) int[] dest, @JniArg(cast="const void *") long src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *", flags={NO_IN, CRITICAL}) long[] dest, @JniArg(cast="const void *") long src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *", flags={NO_IN, CRITICAL}) float[] dest, @JniArg(cast="const void *") long src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *", flags={NO_IN, CRITICAL}) double[] dest, @JniArg(cast="const void *") long src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *", flags={NO_IN, CRITICAL}) byte[] dest, @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) char[] src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *", flags={NO_IN, CRITICAL}) int[] dest, @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) byte[] src, @JniArg(cast="size_t") long size); @JniMethod(cast="void *") public static final native long memset ( @JniArg(cast="void *") long buffer, int c, @JniArg(cast="size_t") long num); public static final native int strlen( @JniArg(cast="char *")long s); @JniClass(name="foo", flags={ClassFlag.STRUCT}) static public class bar { static { LIBRARY.load(); init(); } @JniMethod(flags={CONSTANT_INITIALIZER}) private static final native void init(); // public static final native int foo_sizeof (); @JniField(flags={CONSTANT}, accessor="sizeof(struct foo)") public static int SIZEOF; public int a; @JniField(cast="size_t") public long b; public byte c[] = new byte[20]; @JniField(accessor="c[5]") public byte c5; @JniField(cast="struct foo *") public long prev; @JniField(getter = "get_d()", setter = "set_d()", flags = { GETTER_NONMEMBER, SETTER_NONMEMBER }) private float d; @JniField(getter = "get_sp()", setter = "set_sp()", flags={ SHARED_PTR, GETTER_NONMEMBER, SETTER_NONMEMBER }) private long CheckStr; @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + a; result = prime * result + (int) (b ^ (b >>> 32)); result = prime * result + Arrays.hashCode(c); result = prime * result + c5; result = prime * result + (int) (prev ^ (prev >>> 32)); result = prime * result + Float.valueOf(d).hashCode(); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; bar other = (bar) obj; if (a != other.a) return false; if (b != other.b) return false; if (!Arrays.equals(c, other.c)) return false; if (c5 != other.c5) return false; if (prev != other.prev) return false; if (d != other.d) { return false; } return true; } @Override public String toString() { return "foo [a=" + a + ", b=" + b + ", c=" + Arrays.toString(c) + ", c5=" + c5 + ", prev=" + prev + ", d=" + d + "]"; } } public static final native void memmove ( @JniArg(cast="void *") long dest, @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) bar src, @JniArg(cast="size_t") long size); public static final native void memmove ( @JniArg(cast="void *", flags={NO_IN, CRITICAL}) bar dest, @JniArg(cast="const void *") long src, @JniArg(cast="size_t") long size); public static final native void print_foo(@JniArg(cast="struct foo *")long ptr); public static final native long foowork (@JniArg(cast="struct foo **") long[] foos, int count); @JniMethod(cast = "struct foo *") public static final native long foo_add(@JniArg(cast="struct foo *")long ptr, int count); @JniMethod(cast = "char *") public static final native long char_add(@JniArg(cast="char *")long ptr, int count); @JniClass(flags={ClassFlag.STRUCT, ClassFlag.TYPEDEF}) static public class point { static { LIBRARY.load(); init(); } @JniMethod(flags={CONSTANT_INITIALIZER}) private static final native void init(); @JniField(flags={CONSTANT}, accessor="sizeof(point)") public static int SIZEOF; public int x; public int y; } public static final native void callmeback( @JniArg(cast="void (*)(int)", flags = ArgFlag.POINTER_ARG) long ptr); @JniClass(flags={ClassFlag.STRUCT, ClassFlag.CPP}) static class Range { static { LIBRARY.load(); } @JniMethod(flags={MethodFlag.CPP_NEW}) public static final native long Range(); @JniMethod(flags={MethodFlag.CPP_NEW}) public static final native long Range(int start, int end); @JniMethod(flags={MethodFlag.CPP_DELETE}) public static final native void delete(long ptr); @JniMethod(flags={MethodFlag.CPP_METHOD}) public static final native void dump(long ptr); } public static final native void passingtheenv (String msg, JNIEnv env); @JniClass(flags={ClassFlag.STRUCT}) static class ClassWithAccessors { static { LIBRARY.load(); } @JniField(getter = "get_e()", setter = "set_e()") private float e; } } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/main/java/test/ObjectiveCExample.java000066400000000000000000000055461514323636100302070ustar00rootroot00000000000000/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package test; import org.fusesource.hawtjni.runtime.JniArg; import org.fusesource.hawtjni.runtime.JniClass; import org.fusesource.hawtjni.runtime.JniMethod; import org.fusesource.hawtjni.runtime.Library; import static org.fusesource.hawtjni.runtime.ArgFlag.*; import static org.fusesource.hawtjni.runtime.MethodFlag.*; /** * * @author Hiram Chirino */ @JniClass(conditional="defined(__APPLE__)") public class ObjectiveCExample { private static final Library LIBRARY = new Library("hawtjni-example", Example.class); static { LIBRARY.load(); } public static final void main(String args[]) { // Memory pool... long NSAutoreleasePool = objc_getClass("NSAutoreleasePool"); long pool = $($(NSAutoreleasePool, alloc), init); // Allocate and use a simple Objective C object long NSString = objc_getClass("NSString"); long id = $(NSString, stringWithUTF8String, "Hello"); long value = $(id, length); System.out.println("The length was: "+value); // Release the pool to release the allocations.. $(pool, release); } public static final long stringWithUTF8String = sel_registerName("stringWithUTF8String:"); public static final long release = sel_registerName("release"); public static final long alloc = sel_registerName("alloc"); public static final long init = sel_registerName("init"); public static final long length = sel_registerName("length"); @JniMethod(cast="SEL", flags={POINTER_RETURN}) public static final native long sel_registerName(String selectorName); @JniMethod(cast="id", flags={POINTER_RETURN}) public static final native long objc_getClass(String className); @JniMethod(cast="id", flags={POINTER_RETURN}, accessor="reinterpret_cast (objc_msgSend)") public static final native long $( @JniArg(cast="id", flags={POINTER_ARG})long id, @JniArg(cast="SEL", flags={POINTER_ARG})long sel ); @JniMethod(cast="id", flags={POINTER_RETURN}, accessor="reinterpret_cast (objc_msgSend)") public static final native long $( @JniArg(cast="id", flags={POINTER_ARG})long id, @JniArg(cast="SEL", flags={POINTER_ARG})long sel, String arg0); } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/main/native-package/000077500000000000000000000000001514323636100247605ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/main/native-package/src/000077500000000000000000000000001514323636100255475ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/main/native-package/src/foo.cpp000066400000000000000000000026611514323636100270430ustar00rootroot00000000000000/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ #include "foo.h" #include float get_d(struct foo *arg) { return 0.0f; } void set_d(struct foo *arg, float d) { } std::shared_ptr get_sp(long CheckStr) { return std::make_shared (CheckStr); } void set_sp(struct foo *arg, std::shared_ptr ptr) { } void print_foo(struct foo *arg) { printf("foo@%p: { a: %d, b: %d, c: \"%s\", prev: @%p, d: %f, Checkstr: %p}\n", arg, arg->a, (int)arg->b, arg->c, arg->prev, get_d(arg), get_sp(arg->CheckStr).get()); } long foowork(struct foo **arg, int count) { long rc=0; int i=0; for( i=0; i < count; i++ ) { rc = rc + (*arg)->a; rc = rc + (*arg)->b; arg++; } return rc; } void callmeback(void (*thecallback)(int number)) { thecallback(69); } struct foo * foo_add(struct foo *arg, int count) { return arg+count; } char * char_add(char *arg, int count) { return arg+count; } void passingtheenv (const char *who, JNIEnv *env) { printf("%s, the JNIEnv is at: %p\n", who, env); } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/main/native-package/src/foo.h000066400000000000000000000027121514323636100265050ustar00rootroot00000000000000/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ #ifndef INCLUDED_FOO_H #define INCLUDED_FOO_H #include #include #include "jni.h" #ifdef __cplusplus extern "C" { #endif struct foo { int a; size_t b; char c[20]; struct foo *prev; long CheckStr; }; typedef struct _point { int x; int y; } point; struct ClassWithAccessors { float e; float (*get_e)(); void (*set_e)(float e); }; float get_d(struct foo *arg); void set_d(struct foo *arg, float d); float ClassWithAccessors_get_e(struct foo *arg); void ClassWithAccessors_set_e(struct foo *arg, float e); struct foo * foo_add(struct foo *arg, int count); char * char_add(char *arg, int count); void print_foo(struct foo *arg); long foowork(struct foo **arg, int count); void callmeback(void (*thecallback)(int number)); void passingtheenv (const char *who, JNIEnv *env); #ifdef __cplusplus } /* extern "C" */ #endif std::shared_ptr get_sp(long CheckStr); void set_sp(struct foo *arg, std::shared_ptr); #endif /* INCLUDED_FOO_H */ jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/main/native-package/src/hawtjni-example.h000066400000000000000000000024331514323636100310170ustar00rootroot00000000000000/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ #ifndef INCLUDED_PLATFORM_H #define INCLUDED_PLATFORM_H #ifdef HAVE_CONFIG_H /* configure based build.. we will use what it discovered about the platform */ #include "config.h" #else #ifdef WIN32 /* Windows based build */ #define HAVE_STDLIB_H 1 #define HAVE_STRINGS_H 1 #endif #endif #include #ifdef __APPLE__ #import #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRINGS_H #include #endif #include #include "foo.h" #include "stdio.h" class Range { public: int start; int end; Range() { start = 0; end = 0; } Range(const int s, const int e) { start = s; end = e; } void dump() { printf("range: %d-%d\n", start, end); } }; #endif /* INCLUDED_PLATFORM_H */ jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/test/000077500000000000000000000000001514323636100221345ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/test/java/000077500000000000000000000000001514323636100230555ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/test/java/test/000077500000000000000000000000001514323636100240345ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-example/src/test/java/test/ExampleTest.java000066400000000000000000000050641514323636100271370ustar00rootroot00000000000000package test; import static org.junit.Assert.*; import static test.Example.*; import org.fusesource.hawtjni.runtime.Callback; import org.fusesource.hawtjni.runtime.JNIEnv; import org.junit.Test; import static org.fusesource.hawtjni.runtime.PointerMath.*; import test.Example.bar; public class ExampleTest { static private int staticCallbackResult; private int instanceCallbackResult; @Test public void testPointerMath() { long values[] = new long[]{ 0, Long.MAX_VALUE, Long.MIN_VALUE, Integer.MAX_VALUE, Integer.MIN_VALUE, 0+1, Long.MAX_VALUE+1, Long.MIN_VALUE+1, Integer.MAX_VALUE+1, Integer.MIN_VALUE+1, 0-1, Long.MAX_VALUE-1, Long.MIN_VALUE-1, Integer.MAX_VALUE-1, Integer.MIN_VALUE-1}; for( long i: values ) { assertEquals(char_add(i, 1), add(i, 1) ); assertEquals(char_add(i, -1), add(i, -1) ); } } @Test public void test() { // Allocate and initialize some memory on the heap. long ptr = malloc(bar.SIZEOF); memset(ptr, 0, bar.SIZEOF); // Configure an object that can be mapped to a C structure. bar expected = new bar(); expected.a = 35; expected.b = Integer.MAX_VALUE; System.arraycopy("Hello World!".getBytes(), 0, expected.c, 0, 5); // Marshal the object to the allocated heap memory memmove(ptr, expected, bar.SIZEOF); // Unmarshal the object from the allocated heap memory. bar acutal = new bar(); memmove(acutal, ptr, bar.SIZEOF); assertEquals(expected, acutal); Callback callback = new Callback(this, "instanceCallback", 1); callmeback(callback.getAddress()); assertEquals(69, instanceCallbackResult); callback.dispose(); long r1 = Range.Range(); Range.dump(r1); long r2 = Range.Range(10,100); Range.dump(r2); Range.delete(r1); Range.delete(r2); callback = new Callback(ExampleTest.class, "staticCallback", 1); callmeback(callback.getAddress()); assertEquals(69, staticCallbackResult); callback.dispose(); // Heap memory is not GCed, we must manually free it. free(ptr); passingtheenv("Hiram", null); } public long instanceCallback(long value) { this.instanceCallbackResult = (int) value; return 0; } static public long staticCallback(long value) { staticCallbackResult = (int) value; return 0; } } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/000077500000000000000000000000001514323636100207215ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/pom.xml000066400000000000000000000107121514323636100222370ustar00rootroot00000000000000 4.0.0 org.fusesource.hawtjni hawtjni-project 1.18 hawtjni-generator HawtJNI Generator This module contains the JNI code generation tools. org.fusesource.hawtjni hawtjni-runtime ${project.version} xbean-finder org.apache.xbean 4.16 org.ow2.asm asm 8.0.1 org.ow2.asm asm-commons 8.0.1 commons-cli commons-cli 1.0 org.apache.maven.plugins maven-shade-plugin 3.2.3 package shade junit:junit *:* META-INF/DEPENDENCIES META-INF/LICENSE* META-INF/NOTICE META-INF/MANIFEST.MF module-info.class org.apache.xbean:xbean-finder org/apache/xbean/asm7/original/commons/AsmConstants.class org/apache/xbean/asm7/original/commons/EmptyVisitor* jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/000077500000000000000000000000001514323636100215105ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/000077500000000000000000000000001514323636100224345ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/000077500000000000000000000000001514323636100233555ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/000077500000000000000000000000001514323636100241445ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/000077500000000000000000000000001514323636100263275ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/000077500000000000000000000000001514323636100277735ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/000077500000000000000000000000001514323636100317615ustar00rootroot00000000000000CleanupClass.java000077500000000000000000000105311514323636100351250ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.io.*; import java.util.*; import org.fusesource.hawtjni.generator.model.JNIClass; import org.fusesource.hawtjni.generator.model.JNIMethod; /** * * @author Hiram Chirino */ public abstract class CleanupClass extends JNIGenerator { String classSourcePath; String[] sourcePath; String classSource; HashMap files; int usedCount, unusedCount; String[] getArgNames(JNIMethod method) { int n_args = method.getParameters().size(); if (n_args == 0) return new String[0]; String name = method.getName(); String params = ""; int index = 0; while (true) { index = classSource.indexOf(name, index + 1); if (!Character.isWhitespace(classSource.charAt(index - 1))) continue; if (index == -1) return null; int parantesesStart = classSource.indexOf("(", index); if (classSource.substring(index + name.length(), parantesesStart).trim().length() == 0) { int parantesesEnd = classSource.indexOf(")", parantesesStart); params = classSource.substring(parantesesStart + 1, parantesesEnd); break; } } String[] names = new String[n_args]; StringTokenizer tk = new StringTokenizer(params, ","); for (int i = 0; i < names.length; i++) { String s = tk.nextToken().trim(); StringTokenizer tk1 = new StringTokenizer(s, " "); String s1 = null; while (tk1.hasMoreTokens()) { s1 = tk1.nextToken(); } names[i] = s1.trim(); } return names; } void loadClassSource() { if (classSourcePath == null) return; File f = new File(classSourcePath); classSource = loadFile(f); } void loadFiles() { // BAD - holds on to a lot of memory if (sourcePath == null) return; files = new HashMap(); for (int i = 0; i < sourcePath.length; i++) { File file = new File(sourcePath[i]); if (file.exists()) { if (!file.isDirectory()) { if (file.getAbsolutePath().endsWith(".java")) { files.put(file, loadFile(file)); } } else { loadDirectory(file); } } } } String loadFile(File file) { try { FileReader fr = new FileReader(file); BufferedReader br = new BufferedReader(fr); StringBuffer str = new StringBuffer(); char[] buffer = new char[1024]; int read; while ((read = br.read(buffer)) != -1) { str.append(buffer, 0, read); } fr.close(); return str.toString(); } catch (IOException e) { e.printStackTrace(System.out); } return ""; } void loadDirectory(File file) { String[] entries = file.list(); for (int i = 0; i < entries.length; i++) { String entry = entries[i]; File f = new File(file, entry); if (!f.isDirectory()) { if (f.getAbsolutePath().endsWith(".java")) { files.put(f, loadFile(f)); } } else { loadDirectory(f); } } } public void generate(JNIClass clazz) { loadFiles(); loadClassSource(); } public void setSourcePath(String[] sourcePath) { this.sourcePath = sourcePath; files = null; } public void setClassSourcePath(String classSourcePath) { this.classSourcePath = classSourcePath; } } CleanupConstants.java000077500000000000000000000073761514323636100360510ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2007 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.lang.reflect.Modifier; import java.util.Collection; import java.util.List; import org.fusesource.hawtjni.generator.model.JNIClass; import org.fusesource.hawtjni.generator.model.JNIField; import org.fusesource.hawtjni.generator.model.ReflectClass; /** * * @author Hiram Chirino */ public class CleanupConstants extends CleanupClass { String getFieldValue(JNIField field) { String name = field.getName(); int index = 0; while (true) { index = classSource.indexOf(name, index + 1); if (index == -1) return null; int equalsIndex = classSource.indexOf("=", index); if (classSource.substring(index + name.length(), equalsIndex).trim().length() == 0) { int semiIndex = classSource.indexOf(";", equalsIndex); return classSource.substring(equalsIndex + 1, semiIndex).trim(); } } } public void generate(JNIClass clazz) { unusedCount = usedCount = 0; super.generate(clazz); List fields = clazz.getDeclaredFields(); generate(fields); output("used=" + usedCount + " unused=" + unusedCount + " total=" + (unusedCount + usedCount)); } public void generate(List fields) { sortFields(fields); for (JNIField field : fields) { if ((field.getModifiers() & Modifier.FINAL) == 0) continue; generate(field); } } public void generate(JNIField field) { String name = field.getName(); Collection values = files.values(); for (String str : values) { if (str.indexOf(name) != -1) { int modifiers = field.getModifiers(); String modifiersStr = Modifier.toString(modifiers); output("\t"); output(modifiersStr); if (modifiersStr.length() > 0) output(" "); output(field.getType().getTypeSignature3(false)); output(" "); output(field.getName()); output(" = "); output(getFieldValue(field)); outputln(";"); usedCount++; return; } } unusedCount++; // output("NOT USED=" + field.toString() + " \n"); } public static void main(String[] args) { if (args.length < 3) { System.out.println("Usage: java CleanupConstants "); return; } try { CleanupConstants gen = new CleanupConstants(); String clazzName = args[0]; String classSource = args[1]; String[] sourcePath = new String[args.length - 2]; System.arraycopy(args, 2, sourcePath, 0, sourcePath.length); Class clazz = Class.forName(clazzName); gen.setSourcePath(sourcePath); gen.setClassSourcePath(classSource); gen.generate(new ReflectClass(clazz)); } catch (Exception e) { System.out.println("Problem"); e.printStackTrace(System.out); } } } CleanupNatives.java000077500000000000000000000075121514323636100354760ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2007 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.util.*; import java.io.File; import java.lang.reflect.*; import org.fusesource.hawtjni.generator.model.JNIClass; import org.fusesource.hawtjni.generator.model.JNIMethod; import org.fusesource.hawtjni.generator.model.ReflectClass; /** * * @author Hiram Chirino */ public class CleanupNatives extends CleanupClass { public CleanupNatives() { } public void generate(JNIClass clazz) { unusedCount = usedCount = 0; super.generate(clazz); List methods = clazz.getDeclaredMethods(); generate(methods); output("used=" + usedCount + " unused=" + unusedCount + " total=" + (unusedCount + usedCount)); } public void generate(List methods) { sortMethods(methods); for (JNIMethod method : methods) { if ((method.getModifiers() & Modifier.NATIVE) == 0) continue; generate(method); } } public void generate(JNIMethod method) { String name = method.getName(); Set keys = files.keySet(); for (File key : keys) { String str = (String) files.get(key); if (str.indexOf(name) != -1) { // int modifiers = method.getModifiers(); // Class clazz = method.getDeclaringClass(); // String modifiersStr = Modifier.toString(modifiers); // output(modifiersStr); // if (modifiersStr.length() > 0) output(" "); // output(getTypeSignature3(method.getReturnType())); // output(" " ); // output(method.getName()); // output("("); // Class[] paramTypes = method.getParameterTypes(); // String[] paramNames = getArgNames(method); // for (int i = 0; i < paramTypes.length; i++) { // Class paramType = paramTypes[i]; // if (i != 0) output(", "); // String sig = getTypeSignature3(paramType); // if (clazz.getPackage().equals(paramType.getPackage())) sig = // getClassName(paramType); // output(sig); // output(" "); // output(paramNames[i]); // } // outputln(");"); usedCount++; return; } } unusedCount++; output("NOT USED=" + method.toString() + "\n"); } public static void main(String[] args) { if (args.length < 2) { System.out.println("Usage: java CleanupNatives "); return; } try { CleanupNatives gen = new CleanupNatives(); String clazzName = args[0]; String classSource = args[1]; String[] sourcePath = new String[args.length - 2]; System.arraycopy(args, 2, sourcePath, 0, sourcePath.length); Class clazz = Class.forName(clazzName); gen.setSourcePath(sourcePath); gen.setClassSourcePath(classSource); gen.generate(new ReflectClass(clazz)); } catch (Exception e) { System.out.println("Problem"); e.printStackTrace(System.out); } } } ConstantsGenerator.java000077500000000000000000000047001514323636100363740ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.lang.reflect.Modifier; import java.util.List; import org.fusesource.hawtjni.generator.model.JNIClass; import org.fusesource.hawtjni.generator.model.JNIField; import org.fusesource.hawtjni.generator.model.JNIType; import org.fusesource.hawtjni.generator.model.ReflectClass; /** * * @author Hiram Chirino */ public class ConstantsGenerator extends JNIGenerator { public void generate(JNIClass clazz) { List fields = clazz.getDeclaredFields(); generate(fields); } public void generate(List fields) { sortFields(fields); outputln("int main() {"); for (JNIField field : fields) { if ((field.getModifiers() & Modifier.FINAL) == 0) continue; generate(field); } outputln("}"); } public void generate(JNIField field) { JNIType type = field.getType(); output("\tprintf(\"public static final "); output(field.getType().getTypeSignature3(false)); output(" "); output(field.getName()); output(" = "); if (type.isType("java.lang.String") || type.isType("[B")) output("\"%s\""); else output("0x%x"); output(";\\n\", "); output(field.getName()); outputln(");"); } public static void main(String[] args) { if (args.length < 1) { System.out.println("Usage: java ConstantsGenerator "); return; } try { ConstantsGenerator gen = new ConstantsGenerator(); for (String clazzName : args) { Class clazz = Class.forName(clazzName); gen.generate(new ReflectClass(clazz)); } } catch (Exception e) { System.out.println("Problem"); e.printStackTrace(System.out); } } } DOMWriter.java000077500000000000000000000076411514323636100343740ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.io.PrintStream; import java.util.Arrays; import java.util.Comparator; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * * @author Hiram Chirino */ public class DOMWriter { static String ENCONDING = "UTF8"; PrintStream out; String[] attributeFilter; String nodeFilter; public DOMWriter(PrintStream out) { this.out = new PrintStream(out); } String nodeName(Node node) { // TODO use getLocalName()? return node.getNodeName(); } boolean filter(Attr attr) { if (attributeFilter == null) return false; String name = attr.getNodeName(); for (int i = 0; i < attributeFilter.length; i++) { if (name.matches(attributeFilter[i])) return false; } return true; } void print(String str) { out.print(str); } void println() { out.println(); } public void print(Node node) { print(node, 0); } public void print(Node node, int level) { if (node == null) return; int type = node.getNodeType(); switch (type) { case Node.DOCUMENT_NODE: { print(""); println(); print(((Document) node).getDocumentElement()); break; } case Node.ELEMENT_NODE: { Attr attrs[] = sort(node.getAttributes()); String name = nodeName(node); boolean gen = name.equals("arg") || name.equals("retval"); for (int i = 0; i < attrs.length && !gen; i++) { Attr attr = attrs[i]; if (nodeName(attr).startsWith(nodeFilter)) gen = true; } if (!gen) break; for (int i = 0; i < level; i++) print("\t"); print("<"); print(name); for (int i = 0; i < attrs.length; i++) { Attr attr = attrs[i]; if (filter(attr)) continue; print(" "); print(nodeName(attr)); print("=\""); print(normalize(attr.getNodeValue())); print("\""); } print(">"); NodeList children = node.getChildNodes(); int count = 0; if (children != null) { int len = children.getLength(); for (int i = 0; i < len; i++) { if (children.item(i).getNodeType() == Node.ELEMENT_NODE) count++; } if (count > 0) println(); for (int i = 0; i < len; i++) { print(children.item(i), level + 1); } if (count > 0) { for (int i = 0; i < level; i++) print("\t"); } } print(""); println(); break; } } out.flush(); } Attr[] sort(NamedNodeMap attrs) { if (attrs == null) return new Attr[0]; Attr result[] = new Attr[attrs.getLength()]; for (int i = 0; i < result.length; i++) { result[i] = (Attr) attrs.item(i); } Arrays.sort(result, new Comparator() { public int compare(Node arg0, Node arg1) { return nodeName(arg0).compareTo(nodeName(arg1)); } }); return result; } String normalize(String s) { if (s == null) return ""; StringBuffer str = new StringBuffer(); for (int i = 0, length = s.length(); i < length; i++) { char ch = s.charAt(i); switch (ch) { case '"': str.append("\""); break; case '\r': case '\n': // FALL THROUGH default: str.append(ch); } } return str.toString(); } public void setNodeFilter(String filter) { nodeFilter = filter; } public void setAttributeFilter(String[] filter) { attributeFilter = filter; } }HawtJNI.java000077500000000000000000000412371514323636100340230ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2007 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.PrintStream; import java.io.PrintWriter; import java.lang.reflect.Array; import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import java.util.regex.Pattern; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.commons.cli.PosixParser; import org.apache.xbean.finder.ClassFinder; import org.apache.xbean.finder.UrlSet; import org.fusesource.hawtjni.generator.model.JNIClass; import org.fusesource.hawtjni.generator.model.ReflectClass; import org.fusesource.hawtjni.generator.util.FileSupport; import org.fusesource.hawtjni.runtime.ClassFlag; import org.fusesource.hawtjni.runtime.JniClass; import static org.fusesource.hawtjni.generator.util.OptionBuilder.*; /** * * @author Hiram Chirino */ public class HawtJNI { public static final String END_YEAR_TAG = "%END_YEAR%"; private ProgressMonitor progress; private File nativeOutput = new File("."); // private File javaOutputDir = new File("."); private List classpaths = new ArrayList(); private List packages = new ArrayList(); private String name = "hawtjni_native"; private String copyright = ""; private boolean callbacks = true; /////////////////////////////////////////////////////////////////// // Command line entry point /////////////////////////////////////////////////////////////////// public static void main(String[] args) { String jv = System.getProperty("java.version").substring(0, 3); if (jv.compareTo("1.5") < 0) { System.err.println("This application requires jdk 1.5 or higher to run, the current java version is " + System.getProperty("java.version")); System.exit(-1); return; } HawtJNI app = new HawtJNI(); System.exit(app.execute(args)); } /////////////////////////////////////////////////////////////////// // Entry point for an embedded users who want to call us with // via command line arguments. /////////////////////////////////////////////////////////////////// public int execute(String[] args) { CommandLine cli = null; try { cli = new PosixParser().parse(createOptions(), args, true); } catch (ParseException e) { System.err.println( "Unable to parse command line options: " + e.getMessage() ); displayHelp(); return 1; } if( cli.hasOption("h") ) { displayHelp(); return 0; } if( cli.hasOption("v") ) { progress = new ProgressMonitor() { public void step() { } public void setTotal(int total) { } public void setMessage(String message) { System.out.println(message); } }; } name = cli.getOptionValue("n", "hawtjni_native"); nativeOutput = new File(cli.getOptionValue("o", ".")); // javaOutputDir = new File(cli.getOptionValue("j", ".")); String[] values = cli.getOptionValues("p"); if( values!=null ) { packages = Arrays.asList(values); } values = cli.getArgs(); if( values!=null ) { classpaths = Arrays.asList(values); } try { if( classpaths.isEmpty() ) { throw new UsageException("No classpath supplied."); } generate(); } catch (UsageException e) { System.err.println("Invalid usage: "+e.getMessage()); displayHelp(); return 1; } catch (Throwable e) { System.out.flush(); System.err.println("Unexpected failure:"); e.printStackTrace(); Set exceptions = new HashSet(); exceptions.add(e); for (int i = 0; i < 10; i++) { e = e.getCause(); if (e != null && exceptions.add(e)) { System.err.println("Reason: " + e); e.printStackTrace(); } else { break; } } return 2; } return 0; } /////////////////////////////////////////////////////////////////// // Entry point for an embedded users who want use us like a pojo /////////////////////////////////////////////////////////////////// public ProgressMonitor getProgress() { return progress; } public void setProgress(ProgressMonitor progress) { this.progress = progress; } public File getNativeOutput() { return nativeOutput; } public void setNativeOutput(File nativeOutput) { this.nativeOutput = nativeOutput; } public List getClasspaths() { return classpaths; } public void setClasspaths(List classpaths) { this.classpaths = classpaths; } public List getPackages() { return packages; } public void setPackages(List packages) { this.packages = packages; } public String getName() { return name; } public void setName(String name) { this.name = name; } public void setCopyright(String copyright) { this.copyright = copyright; } public boolean isCallbacks() { return callbacks; } public void setCallbacks(boolean enableCallbacks) { this.callbacks = enableCallbacks; } public void generate() throws UsageException, IOException { progress("Analyzing classes..."); ArrayList natives = new ArrayList(); ArrayList structs = new ArrayList(); findClasses(natives, structs); if( natives.isEmpty() && structs.isEmpty() ) { throw new RuntimeException("No @JniClass or @JniStruct annotated classes found."); } if (progress != null) { int nativeCount = 0; for (JNIClass clazz : natives) { nativeCount += clazz.getNativeMethods().size(); } int total = nativeCount * 4; total += natives.size() * (3); total += structs.size() * 2; progress.setTotal(total); } File file; nativeOutput.mkdirs(); progress("Generating..."); file = nativeFile(".c"); generate(new NativesGenerator(), natives, file); file = nativeFile("_stats.h"); generate(new StatsGenerator(true), natives, file); file = nativeFile("_stats.c"); generate(new StatsGenerator(false), natives, file); file = nativeFile("_structs.h"); generate(new StructsGenerator(true), structs, file); file = nativeFile("_structs.c"); generate(new StructsGenerator(false), structs, file); file = new File(nativeOutput, "hawtjni.h"); generateFromResource("hawtjni.h", file); file = new File(nativeOutput, "hawtjni.c"); generateFromResource("hawtjni.c", file); file = new File(nativeOutput, "hawtjni-callback.c"); if( callbacks ) { generateFromResource("hawtjni-callback.c", file); } else { file.delete(); } file = new File(nativeOutput, "windows"); file.mkdirs(); file = new File(file, "stdint.h"); generateFromResource("windows/stdint.h", file); progress("Done."); } /////////////////////////////////////////////////////////////////// // Helper methods /////////////////////////////////////////////////////////////////// private void findClasses(ArrayList jni, ArrayList structs) throws UsageException { ArrayList urls = new ArrayList(); for (String classpath : classpaths) { String[] fileNames = classpath.replace(';', ':').split(":"); for (String fileName : fileNames) { try { File file = new File(fileName); if( file.isDirectory() ) { urls.add(new URL(url(file)+"/")); } else { urls.add(new URL(url(file))); } } catch (Exception e) { throw new UsageException("Invalid class path. Not a valid file: "+fileName); } } } LinkedHashSet> jniClasses = new LinkedHashSet>(); try { URLClassLoader classLoader = new URLClassLoader(array(URL.class, urls), JniClass.class.getClassLoader()); UrlSet urlSet = new UrlSet(classLoader); urlSet = urlSet.excludeJavaHome(); ClassFinder finder = new ClassFinder(classLoader, urlSet.getUrls()); collectMatchingClasses(finder, JniClass.class, jniClasses); } catch (Exception e) { throw new RuntimeException(e); } for (Class clazz : jniClasses) { ReflectClass rc = new ReflectClass(clazz); if( rc.getFlag(ClassFlag.STRUCT) ) { structs.add(rc); } if( !rc.getNativeMethods().isEmpty() ) { jni.add(rc); } } } static private Options createOptions() { Options options = new Options(); options.addOption("h", "help", false, "Display help information"); options.addOption("v", "verbose", false, "Verbose generation"); options.addOption("o", "offline", false, "Work offline"); options.addOption(ob() .id("n") .name("name") .arg("value") .description("The base name of the library, used to determine generated file names. Defaults to 'hawtjni_native'.").op()); options.addOption(ob() .id("o") .name("native-output") .arg("dir") .description("Directory where generated native source code will be stored. Defaults to the current directory.").op()); // options.addOption(ob() // .id("j") // .name("java-output") // .arg("dir") // .description("Directory where generated native source code will be stored. Defaults to the current directory.").op()); options.addOption(ob() .id("p") .name("package") .arg("package") .description("Restrict looking for JNI classes to the specified package.").op()); return options; } private void displayHelp() { System.err.flush(); String app = System.getProperty("hawtjni.application"); if( app == null ) { try { URL location = getClass().getProtectionDomain().getCodeSource().getLocation(); String[] split = location.toString().split("/"); if( split[split.length-1].endsWith(".jar") ) { app = split[split.length-1]; } } catch (Throwable e) { } if( app == null ) { app = getClass().getSimpleName(); } } // The commented out line is 80 chars long. We have it here as a visual reference // p(" "); p(); p("Usage: "+ app +" [options] "); p(); p("Description:"); p(); pw(" "+app+" is a code generator that produces the JNI code needed to implement java native methods.", 2); p(); p("Options:"); p(); PrintWriter out = new PrintWriter(System.out); HelpFormatter formatter = new HelpFormatter(); formatter.printOptions(out, 78, createOptions(), 2, 2); out.flush(); p(); p("Examples:"); p(); pw(" "+app+" -o build foo.jar bar.jar ", 2); pw(" "+app+" -o build foo.jar:bar.jar ", 2); pw(" "+app+" -o build -p org.mypackage foo.jar;bar.jar ", 2); p(); } private void p() { System.out.println(); } private void p(String s) { System.out.println(s); } private void pw(String message, int indent) { PrintWriter out = new PrintWriter(System.out); HelpFormatter formatter = new HelpFormatter(); formatter.printWrapped(out, 78, indent, message); out.flush(); } @SuppressWarnings("unchecked") private void collectMatchingClasses(ClassFinder finder, Class annotation, LinkedHashSet> collector) { List> annotated = finder.findAnnotatedClasses(annotation); for (Class clazz : annotated) { if( packages.isEmpty() ) { collector.add(clazz); } else { if( packages.contains(clazz.getPackage().getName()) ) { collector.add(clazz); } } } } private void progress(String message) { if (progress != null) { progress.setMessage(message); } } private void generate(JNIGenerator gen, ArrayList classes, File target) throws IOException { gen.setOutputName(name); gen.setClasses(classes); gen.setCopyright(getCopyright()); gen.setProgressMonitor(progress); ByteArrayOutputStream out = new ByteArrayOutputStream(); gen.setOutput(new PrintStream(out)); gen.generate(); if (out.size() > 0) { if( target.getName().endsWith(".c") && gen.isCPP ) { target = new File(target.getParentFile(), target.getName()+"pp"); } if( FileSupport.write(out.toByteArray(), target) ) { progress("Wrote: "+target); } } } private void generateFromResource(String resource, File target) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); InputStream is = getClass().getClassLoader().getResourceAsStream(resource); FileSupport.copy(is, out); String content = new String(out.toByteArray(), "UTF-8"); String[] parts = content.split(Pattern.quote("/* == HEADER-SNIP-LOCATION == */")); if( parts.length==2 ) { content = parts[1]; } out.reset(); PrintStream ps = new PrintStream(out); ps.print(JNIGenerator.fixDelimiter(getCopyright())); ps.print(JNIGenerator.fixDelimiter(content)); ps.close(); if( FileSupport.write(out.toByteArray(), target) ) { progress("Wrote: "+target); } } @SuppressWarnings("unchecked") private T[] array(Class type, ArrayList urls) { return urls.toArray((T[])Array.newInstance(type, urls.size())); } private String url(File file) throws IOException { return "file:"+(file.getCanonicalPath().replace(" ", "%20")); } @SuppressWarnings("serial") public static class UsageException extends Exception { public UsageException(String message) { super(message); } } private File nativeFile(String suffix) { return new File(nativeOutput, name+suffix); } public String getCopyright() { if (copyright == null) return ""; int index = copyright.indexOf(END_YEAR_TAG); if (index != -1) { String temp = copyright.substring(0, index); temp += Calendar.getInstance().get(Calendar.YEAR); temp += copyright.substring(index + END_YEAR_TAG.length()); copyright = temp; } return copyright; } } JNIGenerator.java000077500000000000000000000154151514323636100350450ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2006 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.PrintStream; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import org.fusesource.hawtjni.generator.model.JNIClass; import org.fusesource.hawtjni.generator.model.JNIField; import org.fusesource.hawtjni.generator.model.JNIMethod; import org.fusesource.hawtjni.generator.model.JNIType; import org.fusesource.hawtjni.runtime.ClassFlag; /** * * @author Hiram Chirino */ public abstract class JNIGenerator { static final String delimiter = System.getProperty("line.separator"); static final String JNI64 = "JNI64"; ArrayList classes; String copyright = ""; boolean isCPP; PrintStream output = System.out; ProgressMonitor progress; private String outputName; static String fixDelimiter(String str) { if (delimiter.equals("\n")) { return str; } return str.replaceAll("\n", delimiter); } static String getFunctionName(JNIMethod method) { return getFunctionName(method, method.getParameterTypes()); } static String getFunctionName(JNIMethod method, List paramTypes) { if ((method.getModifiers() & Modifier.NATIVE) == 0) return method.getName(); String function = toC(method.getName()); if (!method.isNativeUnique()) { StringBuffer buffer = new StringBuffer(); buffer.append(function); buffer.append("__"); for (JNIType paramType : paramTypes) { buffer.append(toC(paramType.getTypeSignature(false))); } return buffer.toString(); } return function; } static String loadFile(String file) { try { FileReader fr = new FileReader(file); BufferedReader br = new BufferedReader(fr); StringBuffer str = new StringBuffer(); char[] buffer = new char[1024]; int read; while ((read = br.read(buffer)) != -1) { str.append(buffer, 0, read); } fr.close(); return str.toString(); } catch (IOException e) { throw new RuntimeException("File not found:" + file, e); } } public static void sortMethods(List methods) { Collections.sort(methods, new Comparator() { public int compare(JNIMethod mth1, JNIMethod mth2) { int result = mth1.getName().compareTo(mth2.getName()); return result != 0 ? result : getFunctionName(mth1).compareTo(getFunctionName(mth2)); } }); } static void sortFields(List fields) { Collections.sort(fields, new Comparator() { public int compare(JNIField a, JNIField b) { return a.getName().compareTo(b.getName()); } }); } static void sortClasses(ArrayList classes) { Collections.sort(classes, new Comparator() { public int compare(JNIClass a, JNIClass b) { return a.getName().compareTo(b.getName()); } }); } static String toC(String str) { int length = str.length(); StringBuffer buffer = new StringBuffer(length * 2); for (int i = 0; i < length; i++) { char c = str.charAt(i); switch (c) { case '_': buffer.append("_1"); break; case ';': buffer.append("_2"); break; case '[': buffer.append("_3"); break; case '.': buffer.append("_"); break; case '/': buffer.append("_"); break; default: if( ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') ) { buffer.append(c); } else { buffer.append(String.format("_0%04x",(int)c)); } } } return buffer.toString(); } public abstract void generate(JNIClass clazz); public void generateCopyright() { } public void generateIncludes() { } public void generate() { if (classes == null) return; generateCopyright(); generateIncludes(); sortClasses(classes); for (JNIClass clazz : classes) { if (clazz.getFlag(ClassFlag.CPP)) { isCPP = true; break; } } generate(classes); output.flush(); } protected void generate(ArrayList classes) { for (JNIClass clazz : classes) { if (clazz.getGenerate()) generate(clazz); if (progress != null) progress.step(); } } public boolean getCPP() { return isCPP; } public String getDelimiter() { return delimiter; } public PrintStream getOutput() { return output; } public String getOutputName() { return outputName; } public void setOutputName(String outputName) { this.outputName = outputName; } public ProgressMonitor getProgressMonitor() { return progress; } public void output(String str) { output.print(str); } public void outputln() { output(getDelimiter()); } public void outputln(String str) { output(str); output(getDelimiter()); } public void setClasses(ArrayList classes) { this.classes = classes; } public void setOutput(PrintStream output) { this.output = output; } public void setProgressMonitor(ProgressMonitor progress) { this.progress = progress; } public String getCopyright() { return copyright; } public void setCopyright(String copyright) { this.copyright = copyright; } } LockGenerator.java000077500000000000000000000130741514323636100353140ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2007 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.lang.reflect.Modifier; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.fusesource.hawtjni.generator.model.JNIClass; import org.fusesource.hawtjni.generator.model.JNIMethod; import org.fusesource.hawtjni.generator.model.JNIType; import org.fusesource.hawtjni.generator.model.ReflectClass; import org.fusesource.hawtjni.generator.model.ReflectType; /** * * @author Hiram Chirino */ public class LockGenerator extends CleanupClass { public LockGenerator() { } String getParams(JNIMethod method) { int n_args = method.getParameters().size(); if (n_args == 0) return ""; String name = method.getName(); String params = ""; int index = 0; while (true) { index = classSource.indexOf(name, index + 1); if (!Character.isWhitespace(classSource.charAt(index - 1))) continue; if (index == -1) return null; int parantesesStart = classSource.indexOf("(", index); if (classSource.substring(index + name.length(), parantesesStart).trim().length() == 0) { int parantesesEnd = classSource.indexOf(")", parantesesStart); params = classSource.substring(parantesesStart + 1, parantesesEnd); break; } } return params; } String getReturn(JNIMethod method) { JNIType returnType = method.getReturnType32(); if (!returnType.isType("int")) return returnType.getTypeSignature3(false); String modifierStr = Modifier.toString(method.getModifiers()); String name = method.getName(); Pattern p = Pattern.compile(modifierStr + ".*" + name + ".*(.*)"); Matcher m = p.matcher(classSource); if (m.find()) { String methodStr = classSource.substring(m.start(), m.end()); int index = methodStr.indexOf("/*long*/"); if (index != -1 && index < methodStr.indexOf(name)) { return new ReflectType(Integer.TYPE).getTypeSignature3(false) + " /*long*/"; } } return new ReflectType(Integer.TYPE).getTypeSignature3(false); } public void generate(JNIClass clazz) { super.generate(clazz); generate(clazz.getDeclaredMethods()); } public void generate(List methods) { sortMethods(methods); for (JNIMethod method : methods) { if ((method.getModifiers() & Modifier.NATIVE) == 0) continue; generate(method); } } public void generate(JNIMethod method) { int modifiers = method.getModifiers(); boolean lock = (modifiers & Modifier.SYNCHRONIZED) != 0; String returnStr = getReturn(method); String paramsStr = getParams(method); if (lock) { String modifiersStr = Modifier.toString(modifiers & ~Modifier.SYNCHRONIZED); output(modifiersStr); if (modifiersStr.length() > 0) output(" "); output(returnStr); output(" _"); output(method.getName()); output("("); output(paramsStr); outputln(");"); } String modifiersStr = Modifier.toString(modifiers & ~(Modifier.SYNCHRONIZED | (lock ? Modifier.NATIVE : 0))); output(modifiersStr); if (modifiersStr.length() > 0) output(" "); output(returnStr); output(" "); output(method.getName()); output("("); output(paramsStr); output(")"); if (lock) { outputln(" {"); outputln("\tlock.lock();"); outputln("\ttry {"); output("\t\t"); if (!method.getReturnType32().isType("void")) { output("return "); } output("_"); output(method.getName()); output("("); String[] paramNames = getArgNames(method); for (int i = 0; i < paramNames.length; i++) { if (i != 0) output(", "); output(paramNames[i]); } outputln(");"); outputln("\t} finally {"); outputln("\t\tlock.unlock();"); outputln("\t}"); outputln("}"); } else { outputln(";"); } } public static void main(String[] args) { if (args.length < 2) { System.out.println("Usage: java LockGenerator "); return; } try { LockGenerator gen = new LockGenerator(); String clazzName = args[0]; String classSource = args[1]; Class clazz = Class.forName(clazzName); gen.setClassSourcePath(classSource); gen.generate(new ReflectClass(clazz)); } catch (Exception e) { System.out.println("Problem"); e.printStackTrace(System.out); } } } MacGenerator.java000077500000000000000000002076251514323636100351330ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintStream; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.StringTokenizer; import java.util.TreeMap; import java.util.TreeSet; import javax.xml.parsers.DocumentBuilderFactory; import org.fusesource.hawtjni.generator.HawtJNI.UsageException; import org.fusesource.hawtjni.generator.util.FileSupport; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; /** * * @author Hiram Chirino */ public class MacGenerator { String[] xmls; Document[] documents; String outputDir, mainClassName; String delimiter = System.getProperty("line.separator"); PrintStream out; public MacGenerator() { } static void list(File path, ArrayList list) { if (path == null) return; File[] frameworks = path.listFiles(); if (frameworks == null) return; for (int i = 0; i < frameworks.length; i++) { File file = frameworks[i]; String name = file.getName(); int index = name.lastIndexOf("."); if (index != -1) { String xml = file.getAbsolutePath() + "/Resources/BridgeSupport/" + name.substring(0, index) + "Full.bridgesupport"; if (new File(xml).exists()) { list.add(xml); } } } } int getLevel(Node node) { int level = 0; while (node != null) { level++; node = node.getParentNode(); } return level; } void merge(Document document, Document extraDocument) { if (extraDocument == null) return; /* Build a lookup table for extraDocument */ HashMap extras = new HashMap(); buildLookup(extraDocument, extras); /* * Merge attributes on existing elements building a lookup table for * document */ HashMap lookup = new HashMap(); merge(document, extras, lookup); /* * Merge new elements. Extras at this point contains only elements that * were not found in the document. */ ArrayList sortedNodes = Collections.list(Collections.enumeration(extras.values())); Collections.sort(sortedNodes, new Comparator() { public int compare(Node arg0, Node arg1) { int compare = getLevel(arg0) - getLevel(arg1); if (compare == 0) { return (arg0).getNodeName().compareTo((arg1).getNodeName()); } return compare; } }); String delimiter = System.getProperty("line.separator"); for (Iterator iterator = sortedNodes.iterator(); iterator.hasNext();) { Node node = iterator.next(); String name = node.getNodeName(); if ("arg".equals(name) || "retval".equals(name)) { if (!sortedNodes.contains(node.getParentNode())) continue; } Node parent = lookup.get(getKey(node.getParentNode())); Element element = document.createElement(node.getNodeName()); String text = parent.getChildNodes().getLength() == 0 ? delimiter : ""; for (int i = 0, level = getLevel(parent) - 1; i < level; i++) { text += " "; } parent.appendChild(document.createTextNode(text)); parent.appendChild(element); parent.appendChild(document.createTextNode(delimiter)); NamedNodeMap attributes = node.getAttributes(); for (int j = 0, length = attributes.getLength(); j < length; j++) { Node attr = (Node) attributes.item(j); element.setAttribute(attr.getNodeName(), attr.getNodeValue()); } lookup.put(getKey(element), element); } } public void generate(ProgressMonitor progress) throws UsageException { if (progress != null) { progress.setTotal(3); progress.setMessage("extra attributes..."); } generateExtraAttributes(); if (progress != null) { progress.step(); progress.setMessage(mainClassName); } generateMainClass(); if (progress != null) { progress.step(); progress.setMessage("classes..."); } generateClasses(); if (progress != null) { progress.step(); progress.setMessage("Done."); } } String fixDelimiter(String str) { if (delimiter.equals("\n")) return str; int index = 0, length = str.length(); StringBuffer buffer = new StringBuffer(); while (index != -1) { int start = index; index = str.indexOf('\n', start); if (index == -1) { buffer.append(str.substring(start, length)); } else { buffer.append(str.substring(start, index)); buffer.append(delimiter); index++; } } return buffer.toString(); } void generateMethods(String className, ArrayList methods) { for (Node method : methods) { NamedNodeMap mthAttributes = method.getAttributes(); String sel = mthAttributes.getNamedItem("selector").getNodeValue(); out("public "); boolean isStatic = isStatic(method); if (isStatic) out("static "); Node returnNode = getReturnNode(method.getChildNodes()); if (getType(returnNode).equals("void")) returnNode = null; String returnType = "", returnType64 = ""; if (returnNode != null) { String type = returnType = getJavaType(returnNode), type64 = returnType64 = getJavaType64(returnNode); out(type); if (!type.equals(type64)) { out(" /*"); out(type64); out("*/"); } out(" "); } else { out("void "); } String methodName = sel; if (isUnique(method, methods)) { int index = methodName.indexOf(":"); if (index != -1) methodName = methodName.substring(0, index); } else { // TODO improve this selector methodName = methodName.replaceAll(":", "_"); if (isStatic) methodName = "static_" + methodName; } out(methodName); out("("); NodeList params = method.getChildNodes(); boolean first = true; for (int k = 0; k < params.getLength(); k++) { Node param = params.item(k); if ("arg".equals(param.getNodeName())) { NamedNodeMap paramAttributes = param.getAttributes(); if (!first) out(", "); String type = getJavaType(param), type64 = getJavaType64(param); out(type); if (!type.equals(type64)) { out(" /*"); out(type64); out("*/"); } first = false; out(" "); String paramName = paramAttributes.getNamedItem("name").getNodeValue(); if (paramName.length() == 0) paramName = "arg" + paramAttributes.getNamedItem("index").getNodeValue(); if (paramName.equals("boolean")) paramName = "b"; out(paramName); } } out(") {"); outln(); if (returnNode != null && isStruct(returnNode)) { out("\t"); out(returnType); out(" result = new "); out(returnType); out("();"); outln(); out("\tOS.objc_msgSend_stret(result, "); } else if (returnNode != null && isBoolean(returnNode)) { out("\treturn "); out("OS.objc_msgSend_bool("); } else if (returnNode != null && isFloatingPoint(returnNode)) { out("\treturn "); if (returnType.equals("float")) out("(float)"); out("OS.objc_msgSend_fpret("); } else if (returnNode != null && isObject(returnNode)) { out("\tint /*long*/ result = OS.objc_msgSend("); } else { if (returnNode != null) { out("\treturn "); if ((returnType.equals("int") && returnType64.equals("int")) || !returnType.equals("int")) { out("("); out(returnType); out(")"); } if (returnType.equals("int") && returnType64.equals("int")) { out("/*64*/"); } } else { out("\t"); } out("OS.objc_msgSend("); } if (isStatic) { out("OS.class_"); out(className); } else { out("this.id"); } out(", OS."); out(getSelConst(sel)); first = false; for (int k = 0; k < params.getLength(); k++) { Node param = params.item(k); if ("arg".equals(param.getNodeName())) { NamedNodeMap paramAttributes = param.getAttributes(); if (!first) out(", "); first = false; String paramName = paramAttributes.getNamedItem("name").getNodeValue(); if (paramName.length() == 0) paramName = "arg" + paramAttributes.getNamedItem("index").getNodeValue(); if (paramName.equals("boolean")) paramName = "b"; if (isObject(param)) { out(paramName); out(" != null ? "); out(paramName); out(".id : 0"); } else { out(paramName); } } } out(")"); out(";"); outln(); if (returnNode != null && isObject(returnNode)) { if (!isStatic && returnType.equals(className)) { out("\treturn result == this.id ? this : (result != 0 ? new "); out(returnType); out("(result) : null);"); } else { out("\treturn result != 0 ? new "); NamedNodeMap attributes = returnNode.getAttributes(); Node hawtjni_alloc = attributes.getNamedItem("hawtjni_alloc"); if (hawtjni_alloc != null && hawtjni_alloc.getNodeValue().equals("true")) { out(className); } else { out(returnType); } out("(result) : null;"); } outln(); } else if (returnNode != null && isStruct(returnNode)) { out("\treturn result;"); outln(); } out("}"); outln(); outln(); } } void generateExtraMethods(String className) { /* Empty constructor */ out("public "); out(className); out("() {"); outln(); out("\tsuper();"); outln(); out("}"); outln(); outln(); /* pointer constructor */ out("public "); out(className); out("(int /*long*/ id) {"); outln(); out("\tsuper(id);"); outln(); out("}"); outln(); outln(); /* object constructor */ out("public "); out(className); out("(id id) {"); outln(); out("\tsuper(id);"); outln(); out("}"); outln(); outln(); /* NSObject helpers */ if (className.equals("NSObject")) { out("public NSObject alloc() {"); outln(); out("\tthis.id = OS.objc_msgSend(objc_getClass(), OS.sel_alloc);"); outln(); out("\treturn this;"); outln(); out("}"); outln(); outln(); } /* NSString helpers */ if (className.equals("NSString")) { /* Get java string */ out("public String getString() {"); outln(); out("\tchar[] buffer = new char[(int)/*64*/length()];"); outln(); out("\tgetCharacters(buffer);"); outln(); out("\treturn new String(buffer);"); outln(); out("}"); outln(); outln(); /* create NSString */ out("public NSString initWithString(String str) {"); outln(); out("\tchar[] buffer = new char[str.length()];"); outln(); out("\tstr.getChars(0, buffer.length, buffer, 0);"); outln(); out("\treturn initWithCharacters(buffer, buffer.length);"); outln(); out("}"); outln(); outln(); out("public static NSString stringWith(String str) {"); outln(); out("\tchar[] buffer = new char[str.length()];"); outln(); out("\tstr.getChars(0, buffer.length, buffer, 0);"); outln(); out("\treturn stringWithCharacters(buffer, buffer.length);"); outln(); out("}"); outln(); outln(); } } static class NodeEntry { private final Node parent; private final ArrayList children; public NodeEntry(Node parent, ArrayList children) { this.parent = parent; this.children = children; } } TreeMap getGeneratedClasses() { TreeMap classes = new TreeMap(); for (int x = 0; x < xmls.length; x++) { Document document = documents[x]; if (document == null) continue; NodeList list = document.getDocumentElement().getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if ("class".equals(node.getNodeName()) && getGen(node)) { ArrayList methods; String name = node.getAttributes().getNamedItem("name").getNodeValue(); NodeEntry clazz = classes.get(name); if (clazz == null) { methods = new ArrayList(); classes.put(name, new NodeEntry(node, methods)); } else { methods = clazz.children; } NodeList methodList = node.getChildNodes(); for (int j = 0; j < methodList.getLength(); j++) { Node method = methodList.item(j); if ("method".equals(method.getNodeName()) && getGen(method)) { methods.add(method); } } } } } return classes; } void copyClassMethodsDown(final Map classes) { ArrayList sortedClasses = Collections.list(Collections.enumeration(classes.values())); Collections.sort(sortedClasses, new Comparator() { int getHierarchyLevel(Node node) { String superclass = getSuperclassName(node); int level = 0; while (!superclass.equals("id")) { level++; superclass = getSuperclassName(classes.get(superclass).parent); } return level; } public int compare(NodeEntry arg0, NodeEntry arg1) { return getHierarchyLevel(arg0.parent) - getHierarchyLevel(arg1.parent); } }); for (NodeEntry clazz : sortedClasses) { Node node = (Node) clazz.parent; ArrayList methods = (ArrayList) clazz.children; NodeEntry superclass = classes.get(getSuperclassName(node)); if (superclass != null) { for (Node method : superclass.children) { if (isStatic(method)) { methods.add(method); } } } } } String getSuperclassName(Node node) { NamedNodeMap attributes = node.getAttributes(); Node superclass = attributes.getNamedItem("hawtjni_superclass"); if (superclass != null) { return superclass.getNodeValue(); } else { Node name = attributes.getNamedItem("name"); if (name.getNodeValue().equals("NSObject")) { return "id"; } else { return "NSObject"; } } } void generateClasses() { TreeMap classes = getGeneratedClasses(); copyClassMethodsDown(classes); Set classNames = classes.keySet(); for (Iterator iterator = classNames.iterator(); iterator.hasNext();) { ByteArrayOutputStream out = new ByteArrayOutputStream(); this.out = new PrintStream(out); // out(fixDelimiter(metaData.getCopyright())); String className = iterator.next(); NodeEntry clazz = classes.get(className); Node node = clazz.parent; ArrayList methods = clazz.children; out("package "); String packageName = getPackageName(mainClassName); out(packageName); out(";"); outln(); outln(); out("public class "); out(className); out(" extends "); out(getSuperclassName(node)); out(" {"); outln(); outln(); generateExtraMethods(className); generateMethods(className, methods); out("}"); outln(); String fileName = outputDir + packageName.replace('.', '/') + "/" + className + ".java"; try { out.flush(); if (out.size() > 0) { FileSupport.write(out.toByteArray(), new File(fileName)); } } catch (Exception e) { System.out.println("Problem"); e.printStackTrace(System.out); } out = null; } } void generateExtraAttributes() { Document[] documents = getDocuments(); for (int x = 0; x < xmls.length; x++) { Document document = documents[x]; if (document == null || !getGen(document.getDocumentElement())) continue; saveExtraAttributes(xmls[x], document); } } void generateMainClass() { ByteArrayOutputStream out = new ByteArrayOutputStream(); this.out = new PrintStream(out); String header = "", footer = ""; String fileName = outputDir + mainClassName.replace('.', '/') + ".java"; FileInputStream is = null; try { InputStreamReader input = new InputStreamReader(new BufferedInputStream(is = new FileInputStream(fileName))); StringBuffer str = new StringBuffer(); char[] buffer = new char[4096]; int read; while ((read = input.read(buffer)) != -1) { str.append(buffer, 0, read); } String section = "/** This section is auto generated */"; int start = str.indexOf(section) + section.length(); int end = str.indexOf(section, start); header = str.substring(0, start); footer = str.substring(end); } catch (IOException e) { } finally { try { if (is != null) is.close(); } catch (IOException e) { } } out(header); outln(); outln(); out("/** Custom callbacks */"); outln(); generateCustomCallbacks(); outln(); out("/** Classes */"); outln(); generateClassesConst(); outln(); out("/** Protocols */"); outln(); generateProtocolsConst(); outln(); out("/** Selectors */"); outln(); generateSelectorsConst(); outln(); out("/** Constants */"); outln(); generateEnums(); outln(); out("/** Globals */"); outln(); generateConstants(); outln(); out("/** Functions */"); outln(); outln(); generateFunctions(); outln(); out("/** Super Sends */"); outln(); generateSends(true); outln(); out("/** Sends */"); outln(); generateSends(false); outln(); generateStructNatives(); outln(); out(footer); try { out.flush(); if (out.size() > 0) { FileSupport.write(out.toByteArray(), new File(fileName)); } } catch (Exception e) { System.out.println("Problem"); e.printStackTrace(System.out); } } public Document[] getDocuments() { if (documents == null) { String[] xmls = getXmls(); documents = new Document[xmls.length]; for (int i = 0; i < xmls.length; i++) { String xmlPath = xmls[i]; Document document = documents[i] = getDocument(xmlPath); if (document == null) continue; if (mainClassName != null && outputDir != null) { String packageName = getPackageName(mainClassName); String extrasPath = outputDir + packageName.replace('.', '/') + "/" + getFileName(xmlPath) + ".extras"; merge(document, getDocument(extrasPath)); } } } return documents; } public String[] getXmls() { if (xmls == null || xmls.length == 0) { ArrayList array = new ArrayList(); list(new File("/System/Library/Frameworks"), array); list(new File("/System/Library/Frameworks/CoreServices.framework/Frameworks"), array); list(new File("/System/Library/Frameworks/ApplicationServices.framework/Frameworks"), array); Collections.sort(array, new Comparator() { public int compare(String o1, String o2) { return new File(o1).getName().compareTo(new File(o2).getName()); } }); xmls = array.toArray(new String[array.size()]); } return xmls; } void saveExtraAttributes(String xmlPath, Document document) { try { String packageName = getPackageName(mainClassName); String fileName = outputDir + packageName.replace('.', '/') + "/" + getFileName(xmlPath) + ".extras"; ByteArrayOutputStream out = new ByteArrayOutputStream(); DOMWriter writer = new DOMWriter(new PrintStream(out)); String[] names = getIDAttributeNames(); String[] filter = new String[names.length + 2]; filter[0] = "class_method"; filter[1] = "hawtjni_.*"; System.arraycopy(names, 0, filter, 2, names.length); writer.setAttributeFilter(filter); writer.setNodeFilter("hawtjni_"); writer.print(document); if (out.size() > 0) { FileSupport.write(out.toByteArray(), new File(fileName)); } } catch (Exception e) { System.out.println("Problem"); e.printStackTrace(System.out); } } public void setOutputDir(String dir) { if (dir != null) { if (!dir.endsWith("\\") && !dir.endsWith("/")) { dir += "/"; } } this.outputDir = dir; } public void setXmls(String[] xmls) { this.xmls = xmls; this.documents = null; } public void setMainClass(String mainClassName) { this.mainClassName = mainClassName; } Document getDocument(String xmlPath) { try { InputStream is = null; if (xmlPath.indexOf(File.separatorChar) == -1) is = getClass().getResourceAsStream(xmlPath); if (is == null) is = new BufferedInputStream(new FileInputStream(xmlPath)); if (is != null) return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(is)); } catch (Exception e) { // e.printStackTrace(); } return null; } public String[] getExtraAttributeNames(Node node) { String name = node.getNodeName(); if (name.equals("method")) { return new String[] { "hawtjni_gen_super_msgSend", "hawtjni_gen_custom_callback" }; } else if (name.equals("function")) { NamedNodeMap attribs = node.getAttributes(); if (attribs != null && attribs.getNamedItem("variadic") != null) { return new String[] { "hawtjni_variadic_count", "hawtjni_variadic_java_types" }; } } else if (name.equals("class")) { return new String[] { "hawtjni_superclass" }; } else if (name.equals("retval")) { return new String[] { "hawtjni_java_type", "hawtjni_java_type64", "hawtjni_alloc" }; } else if (name.equals("arg")) { return new String[] { "hawtjni_java_type", "hawtjni_java_type64" }; } return new String[0]; } public String getFileName(String xmlPath) { File file = new File(xmlPath); return file.getName(); } String getKey(Node node) { StringBuffer buffer = new StringBuffer(); while (node != null) { if (buffer.length() > 0) buffer.append("_"); String name = node.getNodeName(); StringBuffer key = new StringBuffer(name); Node nameAttrib = getIDAttribute(node); if (nameAttrib != null) { key.append("-"); key.append(nameAttrib.getNodeValue()); } NamedNodeMap attributes = node.getAttributes(); if (attributes != null) { boolean isStatic = attributes.getNamedItem("class_method") != null; if (isStatic) key.append("-static"); } buffer.append(key.reverse()); node = node.getParentNode(); } buffer.reverse(); return buffer.toString(); } public Node getIDAttribute(Node node) { NamedNodeMap attributes = node.getAttributes(); if (attributes == null) return null; String[] names = getIDAttributeNames(); for (int i = 0; i < names.length; i++) { Node nameAttrib = attributes.getNamedItem(names[i]); if (nameAttrib != null) return nameAttrib; } return null; } public String[] getIDAttributeNames() { return new String[] { "name", "selector", "path", }; } void merge(Node node, HashMap extras, HashMap docLookup) { NodeList list = node.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node childNode = list.item(i); if (childNode.getNodeType() == Node.ELEMENT_NODE) { String key = getKey(childNode); if (docLookup != null && docLookup.get(key) == null) { docLookup.put(key, childNode); } Node extra = extras.remove(key); if (extra != null) { NamedNodeMap attributes = extra.getAttributes(); for (int j = 0, length = attributes.getLength(); j < length; j++) { Node attr = (Node) attributes.item(j); String name = attr.getNodeName(); if (name.startsWith("hawtjni_")) { ((Element) childNode).setAttribute(name, attr.getNodeValue()); } } } } merge(childNode, extras, docLookup); } } void out(String str) { PrintStream out = this.out; if (out == null) out = System.out; out.print(str); } void outln() { PrintStream out = this.out; if (out == null) out = System.out; out.println(); } void generateConstants() { for (int x = 0; x < xmls.length; x++) { Document document = documents[x]; if (document == null) continue; NodeList list = document.getDocumentElement().getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if ("constant".equals(node.getNodeName())) { if (getGen(node)) { NamedNodeMap attributes = node.getAttributes(); String constName = attributes.getNamedItem("name").getNodeValue(); out("/** @method flags=const */"); outln(); out("public static final native "); String type = getType(node), type64 = getType64(node); out(type); if (!type.equals(type64)) { out(" /*"); out(type64); out("*/"); } out(" "); out(constName); out("();"); outln(); if (attributes.getNamedItem("declared_type").getNodeValue().equals("NSString*")) { out("public static final NSString "); out(constName); out(" = new NSString("); out(constName); out("());"); outln(); } } } } } } void generateEnums() { for (int x = 0; x < xmls.length; x++) { Document document = documents[x]; if (document == null) continue; NodeList list = document.getDocumentElement().getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if ("enum".equals(node.getNodeName())) { if (getGen(node)) { NamedNodeMap attributes = node.getAttributes(); Node valueNode = attributes.getNamedItem("value"); if (valueNode != null) { String value = valueNode.getNodeValue(); out("public static final "); boolean isLong = false; if (value.indexOf('.') != -1) { out("double "); } else { try { Integer.parseInt(value); out("int "); } catch (NumberFormatException e) { isLong = true; out("long "); } } out(attributes.getNamedItem("name").getNodeValue()); out(" = "); out(value); if (isLong && !value.endsWith("L")) out("L"); out(";"); outln(); } } } } } } boolean getGen(Node node) { NamedNodeMap attributes = node.getAttributes(); if (attributes == null) return false; Node gen = attributes.getNamedItem("hawtjni_gen"); return gen != null && !gen.getNodeValue().equals("false"); } boolean getGenSuper(Node node) { NamedNodeMap attributes = node.getAttributes(); if (attributes == null) return false; Node gen = attributes.getNamedItem("hawtjni_gen_super_msgSend"); return gen != null && !gen.getNodeValue().equals("false"); } boolean getGenCallback(Node node) { NamedNodeMap attributes = node.getAttributes(); if (attributes == null) return false; Node gen = attributes.getNamedItem("hawtjni_gen_custom_callback"); return gen != null && !gen.getNodeValue().equals("false"); } boolean isStatic(Node node) { NamedNodeMap attributes = node.getAttributes(); Node isStatic = attributes.getNamedItem("class_method"); return isStatic != null && isStatic.getNodeValue().equals("true"); } boolean isStruct(Node node) { NamedNodeMap attributes = node.getAttributes(); String code = attributes.getNamedItem("type").getNodeValue(); return code.startsWith("{"); } boolean isFloatingPoint(Node node) { NamedNodeMap attributes = node.getAttributes(); String code = attributes.getNamedItem("type").getNodeValue(); return code.equals("f") || code.equals("d"); } boolean isObject(Node node) { NamedNodeMap attributes = node.getAttributes(); String code = attributes.getNamedItem("type").getNodeValue(); return code.equals("@"); } boolean isBoolean(Node node) { NamedNodeMap attributes = node.getAttributes(); String code = attributes.getNamedItem("type").getNodeValue(); return code.equals("B"); } void buildLookup(Node node, HashMap table) { NodeList list = node.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node childNode = list.item(i); if (childNode.getNodeType() == Node.ELEMENT_NODE) { String key = getKey(childNode); if (table.get(key) == null) table.put(key, childNode); buildLookup(childNode, table); } } } boolean isUnique(Node method, ArrayList methods) { String methodName = method.getAttributes().getNamedItem("selector").getNodeValue(); String signature = ""; NodeList params = method.getChildNodes(); for (int k = 0; k < params.getLength(); k++) { Node param = params.item(k); if ("arg".equals(param.getNodeName())) { signature += getJavaType(param); } } int index = methodName.indexOf(":"); if (index != -1) methodName = methodName.substring(0, index); for (Node node : methods) { NamedNodeMap attributes = node.getAttributes(); Node otherSel = null; if (attributes != null) otherSel = attributes.getNamedItem("selector"); if (node != method && otherSel != null) { String otherName = otherSel.getNodeValue(); index = otherName.indexOf(":"); if (index != -1) otherName = otherName.substring(0, index); if (methodName.equals(otherName)) { NodeList otherParams = node.getChildNodes(); String otherSignature = ""; for (int k = 0; k < otherParams.getLength(); k++) { Node param = otherParams.item(k); if ("arg".equals(param.getNodeName())) { otherSignature += getJavaType(param); } } if (signature.equals(otherSignature)) { return false; } } } } return true; } void generateSelectorsConst() { TreeSet set = new TreeSet(); for (int x = 0; x < xmls.length; x++) { Document document = documents[x]; if (document == null) continue; NodeList list = document.getDocumentElement().getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if ("class".equals(node.getNodeName()) || "informal_protocol".equals(node.getNodeName())) { if (getGen(node)) { NodeList methods = node.getChildNodes(); for (int j = 0; j < methods.getLength(); j++) { Node method = methods.item(j); if (getGen(method)) { NamedNodeMap mthAttributes = method.getAttributes(); String sel = mthAttributes.getNamedItem("selector").getNodeValue(); set.add(sel); } } } } } } set.add("alloc"); for (Iterator iterator = set.iterator(); iterator.hasNext();) { String sel = iterator.next(); String selConst = getSelConst(sel); out("public static final int /*long*/ "); out(selConst); out(" = "); out("sel_registerName(\""); out(sel); out("\");"); outln(); } } void generateStructNatives() { TreeSet set = new TreeSet(); for (int x = 0; x < xmls.length; x++) { Document document = documents[x]; if (document == null) continue; NodeList list = document.getDocumentElement().getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if ("struct".equals(node.getNodeName()) && getGen(node)) { set.add(getIDAttribute(node).getNodeValue()); } } } out("/** Sizeof natives */"); outln(); for (Iterator iterator = set.iterator(); iterator.hasNext();) { String struct = iterator.next(); out("public static final native int "); out(struct); out("_sizeof();"); outln(); } outln(); out("/** Memmove natives */"); outln(); outln(); for (Iterator iterator = set.iterator(); iterator.hasNext();) { String struct = iterator.next(); out("/**"); outln(); out(" * @param dest cast=(void *),flags=no_in critical"); outln(); out(" * @param src cast=(void *),flags=critical"); // out(" * @param src cast=(void *),flags=no_out critical"); outln(); out(" */"); outln(); out("public static final native void memmove("); out("int /*long*/ dest, "); out(struct); out(" src, int /*long*/ size);"); outln(); out("/**"); outln(); out(" * @param dest cast=(void *),flags=no_in critical"); outln(); out(" * @param src cast=(void *),flags=critical"); // out(" * @param src cast=(void *),flags=no_out critical"); outln(); out(" */"); outln(); out("public static final native void memmove("); out(struct); out(" dest, int /*long*/ src, int /*long*/ size);"); outln(); } } String buildSend(Node method, boolean tags, boolean only64, boolean superCall) { Node returnNode = getReturnNode(method.getChildNodes()); StringBuffer buffer = new StringBuffer(); buffer.append("public static final native "); if (returnNode != null && isStruct(returnNode)) { buffer.append("void "); buffer.append(superCall ? "objc_msgSendSuper_stret" : "objc_msgSend_stret"); buffer.append("("); buffer.append(getJavaType(returnNode)); buffer.append(" result, "); } else if (returnNode != null && isFloatingPoint(returnNode)) { buffer.append("double "); buffer.append(superCall ? "objc_msgSendSuper_fpret" : "objc_msgSend_fpret"); buffer.append("("); } else if (returnNode != null && isBoolean(returnNode)) { buffer.append("boolean "); buffer.append(superCall ? "objc_msgSendSuper_bool" : "objc_msgSend_bool"); buffer.append("("); } else { if (only64) { buffer.append("long"); } else { if (tags) { buffer.append("int /*long*/"); } else { buffer.append("int"); } } buffer.append(" "); buffer.append(superCall ? "objc_msgSendSuper" : "objc_msgSend"); buffer.append("("); } if (superCall) { if (only64) { buffer.append("objc_super superId, long sel"); } else { if (tags) { buffer.append("objc_super superId, int /*long*/ sel"); } else { buffer.append("objc_super superId, int sel"); } } } else { if (only64) { buffer.append("long id, long sel"); } else { if (tags) { buffer.append("int /*long*/ id, int /*long*/ sel"); } else { buffer.append("int id, int sel"); } } } NodeList params = method.getChildNodes(); boolean first = false; int count = 0; for (int k = 0; k < params.getLength(); k++) { Node param = params.item(k); if ("arg".equals(param.getNodeName())) { if (!first) buffer.append(", "); if (isStruct(param)) { buffer.append(getJavaType(param)); } else { String type = getType(param), type64 = getType64(param); buffer.append(only64 ? type64 : type); if (!only64 && tags && !type.equals(type64)) { buffer.append(" /*"); buffer.append(type64); buffer.append("*/"); } } first = false; buffer.append(" arg"); buffer.append(String.valueOf(count++)); } } buffer.append(");"); return buffer.toString(); } String getCType(Node node) { NamedNodeMap attributes = node.getAttributes(); return attributes.getNamedItem("declared_type").getNodeValue(); } Node findNSObjectMethod(Node method) { NamedNodeMap methodAttributes = method.getAttributes(); String selector = methodAttributes.getNamedItem("selector").getNodeValue(); NodeList list = method.getParentNode().getParentNode().getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node cls = list.item(i); if ("class".equals(cls.getNodeName())) { NamedNodeMap classAttributes = cls.getAttributes(); if ("NSObject".equals(classAttributes.getNamedItem("name").getNodeValue())) { NodeList methods = cls.getChildNodes(); for (int j = 0; j < methods.getLength(); j++) { Node mth = methods.item(j); if ("method".equals(mth.getNodeName())) { NamedNodeMap mthAttributes = mth.getAttributes(); if (selector.equals(mthAttributes.getNamedItem("selector").getNodeValue())) { return mth; } } } } } } return null; } void generateCustomCallbacks() { TreeMap set = new TreeMap(); for (int x = 0; x < xmls.length; x++) { Document document = documents[x]; if (document == null) continue; NodeList list = document.getDocumentElement().getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if (("class".equals(node.getNodeName()) || "informal_protocol".equals(node.getNodeName())) && getGen(node)) { NodeList methods = node.getChildNodes(); for (int j = 0; j < methods.getLength(); j++) { Node method = methods.item(j); if ("method".equals(method.getNodeName()) && getGen(method) && getGenCallback(method)) { NamedNodeMap mthAttributes = method.getAttributes(); String sel = mthAttributes.getNamedItem("selector").getNodeValue(); set.put(sel, method); } } } } } for (Iterator iterator = set.keySet().iterator(); iterator.hasNext();) { String key = iterator.next(); Node method = set.get(key); if ("informal_protocol".equals(method.getParentNode().getNodeName())) { method = findNSObjectMethod(method); if (method == null) continue; } String nativeMth = key.replaceAll(":", "_"); out("/** @method callback_types="); Node returnNode = getReturnNode(method.getChildNodes()); out(returnNode == null ? "void" : getCType(returnNode)); out(";id;SEL;"); NodeList params = method.getChildNodes(); for (int k = 0; k < params.getLength(); k++) { Node param = params.item(k); if ("arg".equals(param.getNodeName())) { out(getCType(param)); out(";"); } } out(",callback_flags="); out(returnNode != null && isStruct(returnNode) ? "struct" : "none"); out(";none;none;"); for (int k = 0; k < params.getLength(); k++) { Node param = params.item(k); if ("arg".equals(param.getNodeName())) { out(isStruct(param) ? "struct" : "none"); out(";"); } } out(" */"); outln(); out("public static final native int /*long*/ CALLBACK_"); out(nativeMth); out("(int /*long*/ func);"); outln(); } } void generateSends(boolean superCall) { TreeMap set = new TreeMap(); TreeMap set64 = new TreeMap(); for (int x = 0; x < xmls.length; x++) { Document document = documents[x]; if (document == null) continue; NodeList list = document.getDocumentElement().getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if ("class".equals(node.getNodeName()) && getGen(node)) { NodeList methods = node.getChildNodes(); for (int j = 0; j < methods.getLength(); j++) { Node method = methods.item(j); if ("method".equals(method.getNodeName()) && getGen(method) && (!superCall || getGenSuper(method))) { String code = buildSend(method, false, false, superCall); String code64 = buildSend(method, false, true, superCall); if (set.get(code) == null) { set.put(code, method); } if (set64.get(code64) == null) { set64.put(code64, method); } } } } } } outln(); TreeMap tagsSet = new TreeMap(); for (Iterator iterator = set.keySet().iterator(); iterator.hasNext();) { String key = iterator.next(); Node method = set.get(key); String tagCode = buildSend(method, false, true, superCall); if (set64.get(tagCode) != null) { tagsSet.put(key, method); iterator.remove(); set64.remove(tagCode); } } TreeMap all = new TreeMap(); for (Iterator iterator = tagsSet.keySet().iterator(); iterator.hasNext();) { String key = iterator.next(); Node method = tagsSet.get(key); all.put(buildSend(method, true, false, superCall), method); } for (Iterator iterator = set.keySet().iterator(); iterator.hasNext();) { String key = iterator.next(); all.put(key, set.get(key)); } for (Iterator iterator = set64.keySet().iterator(); iterator.hasNext();) { String key = iterator.next(); all.put(key, set64.get(key)); } for (Iterator iterator = all.keySet().iterator(); iterator.hasNext();) { String key = iterator.next(); Node method = all.get(key); NodeList params = method.getChildNodes(); ArrayList tags = new ArrayList(); int count = 0; for (int k = 0; k < params.getLength(); k++) { Node param = params.item(k); if ("arg".equals(param.getNodeName())) { if (isStruct(param)) { tags.add(" * @param arg" + count + " flags=struct"); } count++; } } out("/**"); if (tags.size() > 0) { outln(); out(" *"); } out(" @method flags=cast"); if (tags.size() > 0) outln(); for (String tag : tags) { out(tag); outln(); } out(" */"); outln(); out(key.toString()); outln(); } } String getSelConst(String sel) { return "sel_" + sel.replaceAll(":", "_"); } void generateClassesConst() { TreeSet set = new TreeSet(); for (int x = 0; x < xmls.length; x++) { Document document = documents[x]; if (document == null) continue; NodeList list = document.getDocumentElement().getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if ("class".equals(node.getNodeName())) { if (getGen(node)) { NamedNodeMap attributes = node.getAttributes(); String name = attributes.getNamedItem("name").getNodeValue(); set.add(name); } } } } for (Iterator iterator = set.iterator(); iterator.hasNext();) { String cls = iterator.next(); String clsConst = "class_" + cls; out("public static final int /*long*/ "); out(clsConst); out(" = "); out("objc_getClass(\""); out(cls); out("\");"); outln(); } } void generateProtocolsConst() { TreeSet set = new TreeSet(); for (int x = 0; x < xmls.length; x++) { Document document = documents[x]; if (document == null) continue; NodeList list = document.getDocumentElement().getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if ("informal_protocol".equals(node.getNodeName())) { if (getGen(node)) { NamedNodeMap attributes = node.getAttributes(); String name = attributes.getNamedItem("name").getNodeValue(); set.add(name); } } } } for (Iterator iterator = set.iterator(); iterator.hasNext();) { String cls = iterator.next(); String clsConst = "protocol_" + cls; out("public static final int /*long*/ "); out(clsConst); out(" = "); out("objc_getProtocol(\""); out(cls); out("\");"); outln(); } } String getPackageName(String className) { int dot = mainClassName.lastIndexOf('.'); if (dot == -1) return ""; return mainClassName.substring(0, dot); } String getClassName(String className) { int dot = mainClassName.lastIndexOf('.'); if (dot == -1) return mainClassName; return mainClassName.substring(dot + 1); } Node getReturnNode(NodeList list) { for (int j = 0; j < list.getLength(); j++) { Node node = list.item(j); if ("retval".equals(node.getNodeName())) { return node; } } return null; } String getType(Node node) { NamedNodeMap attributes = node.getAttributes(); Node javaType = attributes.getNamedItem("hawtjni_java_type"); if (javaType != null) return javaType.getNodeValue(); String code = attributes.getNamedItem("type").getNodeValue(); return getType(code, attributes, false); } String getType64(Node node) { NamedNodeMap attributes = node.getAttributes(); Node javaType = attributes.getNamedItem("hawtjni_java_type"); if (javaType != null) { Node javaType64 = attributes.getNamedItem("hawtjni_java_type64"); return javaType64 != null ? javaType64.getNodeValue() : javaType.getNodeValue(); } Node attrib = attributes.getNamedItem("type"); String code = attrib.getNodeValue(); Node attrib64 = attributes.getNamedItem("type64"); if (attrib64 != null) code = attrib64.getNodeValue(); return getType(code, attributes, true); } String getType(String code, NamedNodeMap attributes, boolean is64) { if (code.equals("c")) return "byte"; if (code.equals("i")) return "int"; if (code.equals("s")) return "short"; if (code.equals("l")) return "int"; if (code.equals("q")) return "long"; if (code.equals("C")) return "byte"; if (code.equals("I")) return "int"; if (code.equals("S")) return "short"; if (code.equals("L")) return "int"; if (code.equals("Q")) return "long"; if (code.equals("f")) return "float"; if (code.equals("d")) return "double"; if (code.equals("B")) return "boolean"; if (code.equals("v")) return "void"; if (code.equals("*")) return is64 ? "long" : "int"; if (code.equals("@")) return is64 ? "long" : "int"; if (code.equals("#")) return is64 ? "long" : "int"; if (code.equals(":")) return is64 ? "long" : "int"; if (code.startsWith("^")) return is64 ? "long" : "int"; if (code.startsWith("{")) { return attributes.getNamedItem("declared_type").getNodeValue(); } return "BAD " + code; } String getJNIType(Node node) { NamedNodeMap attributes = node.getAttributes(); String code = attributes.getNamedItem("type").getNodeValue(); if (code.equals("c")) return "B"; if (code.equals("i")) return "I"; if (code.equals("s")) return "S"; if (code.equals("l")) return "I"; if (code.equals("q")) return "J"; if (code.equals("C")) return "B"; if (code.equals("I")) return "I"; if (code.equals("S")) return "S"; if (code.equals("L")) return "I"; if (code.equals("Q")) return "J"; if (code.equals("f")) return "F"; if (code.equals("d")) return "D"; if (code.equals("B")) return "Z"; if (code.equals("v")) return "V"; if (code.equals("*")) return "I"; if (code.equals("@")) return "I"; if (code.equals("#")) return "I"; if (code.equals(":")) return "I"; if (code.startsWith("^")) return "I"; if (code.startsWith("[")) return "BAD " + code; if (code.startsWith("{")) { return "BAD " + code; } if (code.startsWith("(")) return "BAD " + code; return "BAD " + code; } String getJavaType(Node node) { NamedNodeMap attributes = node.getAttributes(); Node javaType = attributes.getNamedItem("hawtjni_java_type"); if (javaType != null) return javaType.getNodeValue().trim(); String code = attributes.getNamedItem("type").getNodeValue(); return getJavaType(code, attributes, false); } String getJavaType64(Node node) { NamedNodeMap attributes = node.getAttributes(); Node javaType = attributes.getNamedItem("hawtjni_java_type"); if (javaType != null) { Node javaType64 = attributes.getNamedItem("hawtjni_java_type64"); return javaType64 != null ? javaType64.getNodeValue() : javaType.getNodeValue(); } Node attrib = attributes.getNamedItem("type"); String code = attrib.getNodeValue(); Node attrib64 = attributes.getNamedItem("type64"); if (attrib64 != null) code = attrib64.getNodeValue(); return getJavaType(code, attributes, true); } String getJavaType(String code, NamedNodeMap attributes, boolean is64) { if (code.equals("c")) return "byte"; if (code.equals("i")) return "int"; if (code.equals("s")) return "short"; if (code.equals("l")) return "int"; if (code.equals("q")) return "long"; if (code.equals("C")) return "byte"; if (code.equals("I")) return "int"; if (code.equals("S")) return "short"; if (code.equals("L")) return "int"; if (code.equals("Q")) return "long"; if (code.equals("f")) return "float"; if (code.equals("d")) return "double"; if (code.equals("B")) return "boolean"; if (code.equals("v")) return "void"; if (code.equals("*")) return is64 ? "long" : "int"; if (code.equals("#")) return is64 ? "long" : "int"; if (code.equals(":")) return is64 ? "long" : "int"; if (code.startsWith("^")) return is64 ? "long" : "int"; if (code.equals("@")) { String type = attributes.getNamedItem("declared_type").getNodeValue(); int index = type.indexOf('*'); if (index != -1) type = type.substring(0, index); index = type.indexOf('<'); if (index != -1) type = type.substring(0, index); return type.trim(); } if (code.startsWith("{")) { return attributes.getNamedItem("declared_type").getNodeValue().trim(); } return "BAD " + code; } static String[] split(String str, String separator) { StringTokenizer tk = new StringTokenizer(str, separator); ArrayList result = new ArrayList(); while (tk.hasMoreElements()) { result.add(tk.nextElement()); } return result.toArray(new String[result.size()]); } void generateFunctions() { for (int x = 0; x < xmls.length; x++) { Document document = documents[x]; if (document == null) continue; NodeList list = document.getDocumentElement().getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if ("function".equals(node.getNodeName())) { if (getGen(node)) { NamedNodeMap attributes = node.getAttributes(); String name = attributes.getNamedItem("name").getNodeValue(); NodeList params = node.getChildNodes(); int count = 0; for (int j = 0; j < params.getLength(); j++) { Node param = params.item(j); if ("arg".equals(param.getNodeName())) { count++; } } if (count > 0) { out("/**"); outln(); } for (int j = 0; j < params.getLength(); j++) { Node param = params.item(j); if ("arg".equals(param.getNodeName())) { NamedNodeMap paramAttributes = param.getAttributes(); out(" * @param "); out(paramAttributes.getNamedItem("name").getNodeValue()); if (isStruct(param)) { out(" flags=struct"); } else { out(" cast="); Node declaredType = paramAttributes.getNamedItem("declared_type"); String cast = declaredType.getNodeValue(); if (!cast.startsWith("(")) out("("); out(cast); if (!cast.endsWith(")")) out(")"); } outln(); } } if (count > 0) { out(" */"); outln(); } out("public static final native "); Node returnNode = getReturnNode(node.getChildNodes()); if (returnNode != null) { String type = getType(returnNode), type64 = getType64(returnNode); out(type); if (!type.equals(type64)) { out(" /*"); out(type64); out("*/"); } out(" "); } else { out("void "); } out(name); out("("); params = node.getChildNodes(); boolean first = true; for (int j = 0; j < params.getLength(); j++) { Node param = params.item(j); if ("arg".equals(param.getNodeName())) { NamedNodeMap paramAttributes = param.getAttributes(); if (!first) out(", "); first = false; String type = getType(param), type64 = getType64(param); out(type); if (!type.equals(type64)) { out(" /*"); out(type64); out("*/"); } out(" "); out(paramAttributes.getNamedItem("name").getNodeValue()); } } generateVariadics(node); out(");"); outln(); } } } } } void generateVariadics(Node node) { NamedNodeMap attributes = node.getAttributes(); Node variadicCount = attributes.getNamedItem("hawtjni_variadic_count"); if (variadicCount != null) { Node variadicTypes = attributes.getNamedItem("hawtjni_variadic_java_types"); String[] types = null; if (variadicTypes != null) { types = split(variadicTypes.getNodeValue(), ","); } int varCount = 0; try { varCount = Integer.parseInt(variadicCount.getNodeValue()); } catch (NumberFormatException e) { } for (int j = 0; j < varCount; j++) { out(", "); if (types != null && types.length > j && !types[j].equals("*")) { out(types[j]); } else if (types != null && types[types.length - 1].equals("*")) { out(types[types.length - 2]); } else { out("int /*long*/"); } out(" varArg"); out("" + j); } } } public static void main(String[] args) { try { MacGenerator gen = new MacGenerator(); gen.setXmls(args); gen.setOutputDir("../org.eclipse.hawtjni/Eclipse SWT PI/cocoa/"); gen.setMainClass("org.eclipse.hawtjni.internal.cocoa.OS"); gen.generate(null); } catch (Throwable e) { e.printStackTrace(); } } } MozillaGenerator.java000077500000000000000000000577451514323636100360500ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2003, 2006 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.io.*; import java.util.*; /** * Produces the java classes mapping to XPCOM Mozilla objects. * * @author Hiram Chirino */ public class MozillaGenerator { static boolean DEBUG = false; FileReader r = null; FileWriter w = null; int maxLines = 1000; int cntLines = 0; int n = 0; String[] b = null; String body = null; int nMethods = 0; String uuidName; String uuidValue; String className; String parentName; String[] constantNames; String[] constantValues; String[] methodNames; String[][] argTypes; String[][] argNames; String bodyOrder; TreeMap> vtbls = new TreeMap>(); // Contains the characters found before a method name // Useful to extract the method name. e.g. // NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) = 0; // NS_IMETHOD_(nsrefcnt) AddRef(void) = 0; // method name follows: QueryInterface, AddRef etc. static String[] BEFORE_METHOD_NAME = { " NS_IMETHOD ", " NS_IMETHOD_(nsrefcnt) ", " NS_IMETHOD_(void *) ", " NS_IMETHOD_(void) ", " NS_IMETHOD_(nsresult) ", " NS_SCRIPTABLE NS_IMETHOD ", " NS_SCRIPTABLE NS_IMETHOD_(nsrefcnt) ", " NS_SCRIPTABLE NS_IMETHOD_(void *) ", " NS_SCRIPTABLE NS_IMETHOD_(void) ", " NS_SCRIPTABLE NS_IMETHOD_(nsresult) ", }; static String NO_SUPER_CLASS = "SWT_NO_SUPER_CLASS"; static String[][] TYPES_C2JAVA = { { "PRBool *", "int[]" }, { "nsIID &", "nsID" }, { "nsCID &", "nsID" }, { "nsCID * *", "int /*long*/" }, // nsID[] not supported by jnigen { "* *", "int /*long*/[]" }, { "**", "int /*long*/[]" }, { "* &", "int /*long*/[]" }, { "PRUint32 *", "int[]" }, { "PRInt32 *", "int[]" }, { "PRInt64 *", "long[]" }, { "PRUnichar *", "char[]" }, { "char *", "byte[]" }, { "float *", "float[]" }, { "PRUint16 *", "short[]" }, { "nativeWindow *", "int /*long*/[]" }, { "nsWriteSegmentFun", "int /*long*/" }, { "nativeWindow", "int /*long*/" }, { "*", "int /*long*/" }, // c type containing one or more * (and any // other character, and did not match // previous patterns) is a simple pointer { "&", "int /*long*/" }, { "PRUint32", "int" }, { "PRInt32", "int" }, { "PRInt64", "long" }, { "nsresult", "int" }, { "PRBool", "int" }, { "float", "float" }, { "PRUint16", "short" }, { "size_t", "int" }, }; static String GECKO = "/bluebird/teamhawtjni/hawtjni-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/include/"; static String TARGET_FOLDER = "/bluebird/teamhawtjni/chrisx/amd64/workspace/org.eclipse.hawtjni/Eclipse SWT Mozilla/common/org/eclipse/hawtjni/internal/mozilla/"; static String[] XPCOM_HEADERS = { "profile/nsIProfile.h", "widget/nsIAppShell.h", "widget/nsIBaseWindow.h", "xpcom/nsIComponentManager.h", "xpcom/nsIComponentRegistrar.h", "webbrwsr/nsIContextMenuListener.h", "docshell/nsIDocShell.h", "dom/nsIDOMEvent.h", "dom/nsIDOMMouseEvent.h", "dom/nsIDOMUIEvent.h", "dom/nsIDOMWindow.h", "uriloader/nsIDownload.h", "webbrwsr/nsIEmbeddingSiteWindow.h", "xpcom/nsIFactory.h", "xpcom/nsIFile.h", "helperAppDlg/nsIHelperAppLauncherDialog.h", "exthandler/nsIExternalHelperAppService.h", // contains // nsIHelperAppLauncher "xpcom/nsIInputStream.h", "xpcom/nsIInterfaceRequestor.h", "necko/nsIIOService.h", "xpcom/nsILocalFile.h", "xpcom/nsIMemory.h", "progressDlg/nsIProgressDialog.h", "windowwatcher/nsIPromptService.h", "xpcom/nsIServiceManager.h", "xpcom/nsISupports.h", "webbrwsr/nsITooltipListener.h", "necko/nsIURI.h", "uriloader/nsIURIContentListener.h", "xpcom/nsIWeakReference.h", "webbrwsr/nsIWebBrowser.h", "webbrwsr/nsIWebBrowserChrome.h", "webbrwsr/nsIWebBrowserChromeFocus.h", "webbrwsr/nsIWebBrowserFocus.h", "docshell/nsIWebNavigation.h", "uriloader/nsIWebProgress.h", "uriloader/nsIWebProgressListener.h", "embed_base/nsIWindowCreator.h", "windowwatcher/nsIWindowWatcher.h" }; public static void main(String[] args) { MozillaGenerator x = new MozillaGenerator(); for (int i = 0; i < XPCOM_HEADERS.length; i++) x.parse(GECKO + XPCOM_HEADERS[i], TARGET_FOLDER); x.outputVtblCall(); System.out.println("done"); } /** Write callbacks */ public void write(String data) { if (DEBUG) { System.out.print(data); return; } try { w.write(data); } catch (IOException e) { e.printStackTrace(); } } public void writeLine() { if (DEBUG) { System.out.println(); return; } write("\r\n"); } public void writeLine(String data) { if (DEBUG) { System.out.println(data); return; } write(data + "\r\n"); } public void writeCopyrights() { writeLine(COPYRIGHTS); } public void writePackageDeclaration() { writeLine(PACKAGE_DECLARATION); } public void writeClassDeclaration(String className, String parentName) { String line = "public class " + className; if (!parentName.equals(NO_SUPER_CLASS)) line += " extends " + parentName; line += " {"; writeLine(line); } public void writeLastMethodId(String parentName, int nMethods) { String line = "\tstatic final int LAST_METHOD_ID = "; if (!parentName.equals(NO_SUPER_CLASS)) line += parentName + ".LAST_METHOD_ID + " + nMethods + ";"; else line += "" + (nMethods - 1) + ";"; // zero indexed writeLine(line); } public void writeIID(String uuidName, String uuidValue) { writeLine("\tpublic static final String " + uuidName + " ="); writeLine("\t\t\"" + uuidValue + "\";"); writeLine(); String iid = uuidName.substring(0, uuidName.indexOf("_STR")); writeLine("\tpublic static final nsID " + iid + " ="); writeLine("\t\tnew nsID(" + uuidName + ");"); } public void writeAddressField() { writeLine("\tint /*long*/ address;"); } public void writeConstructor(String className, String parentName) { writeLine("\tpublic " + className + "(int /*long*/ address) {"); if (!parentName.equals(NO_SUPER_CLASS)) { writeLine("\t\tsuper(address);"); } else { writeLine("\t\tthis.address = address;"); } writeLine("\t}"); } public void writeAddressGetter() { writeLine("\tpublic int /*long*/ getAddress() {"); writeLine("\t\treturn this.address;"); writeLine("\t}"); } public void writeConstant(String name, String value) { writeLine("\tpublic static final int " + name + " = " + value + ";"); } public void writeMethod(String name, String parentName, int methodIndex, String[] argTypes, String[] argNames) { write("\tpublic int " + name + "("); for (int i = 0; i < argTypes.length; i++) { write(argTypes[i] + " " + argNames[i]); if (i < argTypes.length - 1) write(", "); } write(") {"); writeLine(); String line = "\t\treturn XPCOM.VtblCall("; if (!parentName.equals(NO_SUPER_CLASS)) line += parentName + ".LAST_METHOD_ID + " + (methodIndex + 1) + ", getAddress()"; else line += methodIndex + ", getAddress()"; // zero indexed write(line); if (argTypes.length > 0) write(", "); for (int i = 0; i < argTypes.length; i++) { write(argNames[i]); if (i < argTypes.length - 1) write(", "); } writeLine(");"); writeLine("\t}"); } public void writeClassEnd() { write("}"); } public void logVtblCall(String[] argTypes) { String vtbl = "static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl"; if (argTypes.length > 0) vtbl += ", "; for (int i = 0; i < argTypes.length; i++) { vtbl += argTypes[i] + " arg" + i; if (i < argTypes.length - 1) vtbl += ", "; } vtbl += ");"; Integer key = new Integer(argTypes.length); TreeSet list = vtbls.get(key); if (list == null) { list = new TreeSet(); vtbls.put(key, list); } boolean duplicate = false; for (String s : list) { if (vtbl.equals(s)) { duplicate = true; break; } } if (!duplicate) list.add(vtbl); } public void outputVtblCall() { Collection> values = vtbls.values(); for (TreeSet elts : values) { for (String elt : elts) { System.out.println(elt); } } } /** Parsing invoking write callbacks */ /* * Convert a C header file into a Java source file matching SWT Mozilla * binding. */ public void parse(String src, String destPath) { if (DEBUG) writeLine("*** PARSING <" + src + "> to folder " + destPath); b = new String[maxLines]; cntLines = 0; try { r = new FileReader(src); BufferedReader br = new BufferedReader(r); while ((b[cntLines] = br.readLine()) != null) { cntLines++; } br.close(); } catch (IOException e) { e.printStackTrace(); return; } n = 0; boolean lookForClasses = true; while (lookForClasses) { /* parsing */ lookForClasses = parse(); String destFile = destPath + className + ".java"; try { w = new FileWriter(destFile); if (DEBUG) writeLine("** CREATED JAVA FILE <" + destFile + ">"); } catch (IOException e) { e.printStackTrace(); return; } /* writing */ writeCopyrights(); writePackageDeclaration(); writeLine(); writeClassDeclaration(className, parentName); writeLine(); writeLastMethodId(parentName, nMethods); writeLine(); writeIID(uuidName, uuidValue); writeLine(); if (parentName.equals(NO_SUPER_CLASS)) { writeAddressField(); writeLine(); } writeConstructor(className, parentName); writeLine(); if (parentName.equals(NO_SUPER_CLASS)) { writeAddressGetter(); writeLine(); } int constantIndex = 0, methodIndex = 0; for (int i = 0; i < bodyOrder.length(); i++) { if (bodyOrder.charAt(i) == 'C') { writeConstant(constantNames[constantIndex], constantValues[constantIndex]); if (i < bodyOrder.length() - 1) writeLine(); constantIndex++; } else if (bodyOrder.charAt(i) == 'M') { writeMethod(methodNames[methodIndex], parentName, methodIndex, argTypes[methodIndex], argNames[methodIndex]); if (i < bodyOrder.length() - 1) writeLine(); methodIndex++; } } writeClassEnd(); try { w.close(); } catch (IOException e) { e.printStackTrace(); } } } public String getPackages() { return "package org.eclipse.hawtjni.internal.mozilla;"; } public boolean parse() { if (!jumpToUuidDeclaration()) return false; uuidName = getUuidName(b[n]); if (DEBUG) System.out.println("UUID name: <" + uuidName + ">"); uuidValue = getUuidValue(b[n]); if (DEBUG) System.out.println("UUID value: <" + uuidValue + ">"); jumpToInterfaceDeclaration(); className = getClassName(b[n]); if (DEBUG) System.out.println("Interface name: <" + className + ">"); parentName = getParentName(b[n]); if (DEBUG) System.out.println("parentName: <" + parentName + ">"); parseBody(); return true; } boolean jumpToUuidDeclaration() { // jump to line matching: // "#define NS_IWEBBROWSERCHROME_IID_STR "ba434c60-9d52-11d3-afb0-00a024ffc08c"" while (!(b[n].startsWith("#define ") && b[n].indexOf("_IID_STR \"") != -1)) { n++; if (n >= cntLines) return false; } return true; } // assume a declaration matching: // "#define NS_IWEBBROWSERCHROME_IID_STR "ba434c60-9d52-11d3-afb0-00a024ffc08c"" // returns NS_IWEBBROWSERCHROME_IID_STR String getUuidName(String declaration) { return declaration.substring(declaration.indexOf("#define ") + "#define ".length(), declaration.indexOf(" \"")); } // assume a declaration matching: // "#define NS_IWEBBROWSERCHROME_IID_STR "ba434c60-9d52-11d3-afb0-00a024ffc08c"" // returns ba434c60-9d52-11d3-afb0-00a024ffc08c String getUuidValue(String declaration) { return declaration.substring(declaration.indexOf("_IID_STR \"") + "_IID_STR \"".length(), declaration.lastIndexOf('"')); } void jumpToInterfaceDeclaration() { // jump to line matching: // "class NS_NO_VTABLE nsIWebBrowserChrome : public nsISupports {" while (!(b[n].startsWith("class NS_NO_VTABLE "))) { n++; } } // Assume a declaration matching: // "class NS_NO_VTABLE nsIWebBrowserChrome : public nsISupports {" // or // "class NS_NO_VTABLE NS_SCRIPTABLE nsIWebBrowserChrome : public nsISupports {" // returns nsIWebBrowserChrome. // Special case for nsISupports that has no super class: class NS_NO_VTABLE // nsISupports { String getClassName(String declaration) { int endIndex = declaration.indexOf(" :"); // nsISupports special case (no super class) if (endIndex == -1) endIndex = declaration.indexOf(" {"); String searchString = "class NS_NO_VTABLE NS_SCRIPTABLE"; int startIndex = declaration.indexOf(searchString); if (startIndex == -1) { searchString = "class NS_NO_VTABLE "; startIndex = declaration.indexOf(searchString); } return declaration.substring(startIndex + searchString.length(), endIndex); } // assume a declaration matching: // "class NS_NO_VTABLE nsIWebBrowserChrome : public nsISupports {" // returns nsISupports // special case for nsISupports that has no super class: class NS_NO_VTABLE // nsISupports { String getParentName(String declaration) { if (declaration.indexOf(" :") == -1) return NO_SUPER_CLASS; return declaration.substring(declaration.indexOf(": public ") + ": public ".length(), declaration.indexOf(" {")); } // parse methods and constants declarations starting at the current index // out: // .String body - contains the corresponding java content // .n - set to the end of the interface body declaration ( line with the // enclosing "};" ) // .nMethods - set to the number of methods parsed void parseBody() { body = ""; bodyOrder = ""; int nConstants = 0; nMethods = 0; int tmp_n = n; while (true) { int type = jumpToNextConstantOrMethod(); if (type == CONSTANT) nConstants++; if (type == METHOD) nMethods++; if (type == END_BODY) break; n++; } n = tmp_n; constantNames = new String[nConstants]; constantValues = new String[nConstants]; methodNames = new String[nMethods]; argTypes = new String[nMethods][]; argNames = new String[nMethods][]; int constantIndex = 0, methodIndex = 0; while (true) { int type = jumpToNextConstantOrMethod(); if (type == CONSTANT) { parseConstant(b[n], constantIndex); bodyOrder += "C"; constantIndex++; } if (type == METHOD) { parseMethod(b[n], methodIndex); logVtblCall(argTypes[methodIndex]); bodyOrder += "M"; methodIndex++; } if (type == END_BODY) return; n++; } } static int CONSTANT = 0; static int METHOD = 1; static int END_BODY = 2; boolean isEndOfInterfaceBody() { return b[n].startsWith("};"); } int jumpToNextConstantOrMethod() { while (!isEndOfInterfaceBody()) { if (b[n].startsWith(" enum { ")) { return CONSTANT; } if (methodNameStartIndexOf(b[n]) != -1) { return METHOD; } n++; } return END_BODY; } void parseConstant(String constant, int constantIndex) { String constantName = constant.substring(constant.indexOf(" enum { ") + " enum { ".length(), constant.indexOf(" =")); if (DEBUG) writeLine("constantName <" + constantName + ">"); constantNames[constantIndex] = constantName; // most constants values have a trailing U // enum { APP_TYPE_UNKNOWN = 0U }; int endIndex = constant.indexOf("U };"); // a few others don't // enum { ENUMERATE_FORWARDS = 0 }; if (endIndex == -1) endIndex = constant.indexOf(" };"); String constantValue = constant.substring(constant.indexOf(" = ") + " = ".length(), endIndex); if (DEBUG) writeLine("constantValue <" + constantValue + ">"); constantValues[constantIndex] = constantValue; } // NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) = 0; // identify: // method name: // Nbr of arguments: 2 // Type of argument 0: PRUint32 // Name of argument 0: statusType // Type of argument 1: const PRUnichar * // Name of argument 1: status void parseMethod(String line, int methodIndex) { int start = methodNameStartIndexOf(line); int end = methodNameEndIndexOf(line); String methodName = line.substring(start, end); if (DEBUG) writeLine("method name: <" + methodName + ">"); methodNames[methodIndex] = methodName; int argStart = end + "(".length(); int argEnd = line.indexOf(")", argStart); parseArgs(line.substring(argStart, argEnd), methodIndex); } // Given a line, returns the start of the method name or -1 // if the line does not contain a method declaration. int methodNameStartIndexOf(String line) { for (int i = 0; i < BEFORE_METHOD_NAME.length; i++) { int index = line.indexOf(BEFORE_METHOD_NAME[i]); if (index != -1) return index + BEFORE_METHOD_NAME[i].length(); } return -1; } int methodNameEndIndexOf(String line) { int startIndex = methodNameStartIndexOf(line); return line.indexOf("(", startIndex); } void parseArgs(String args, int methodIndex) { int nArgs = -1; // methods with no args look like: () or (void) String[] noArgs = new String[] { "", "void" }; for (int i = 0; i < noArgs.length; i++) { if (args.equals(noArgs[i])) { nArgs = 0; break; } } if (nArgs == -1) nArgs = count(args, ", ") + 1; String[] argTypes = new String[nArgs]; this.argTypes[methodIndex] = argTypes; String[] argNames = new String[nArgs]; this.argNames[methodIndex] = argNames; int typeStart = 0; // name is separated from its type by either of the following (sorted by // decreasing size to find the most complete pattern */ String[] typeNameSep = new String[] { " * *", " **", " * & ", " * ", " *", " & ", " " }; for (int i = 0; i < nArgs; i++) { /* get the type */ int nextTypeStart = i < nArgs - 1 ? args.indexOf(", ", typeStart) + ", ".length() : args.length(); int typeNameSepIndex = 0; int separatorIndex = 0; for (; typeNameSepIndex < typeNameSep.length; typeNameSepIndex++) { separatorIndex = args.indexOf(typeNameSep[typeNameSepIndex], typeStart); if (separatorIndex != -1 && separatorIndex < nextTypeStart) break; } String separator = typeNameSep[typeNameSepIndex]; argTypes[i] = getC2JavaType(args.substring(typeStart, separatorIndex + separator.length())); if (DEBUG) writeLine("arg type" + i + ": <" + argTypes[i] + ">"); /* get the name */ int nameStart = separatorIndex + separator.length(); int nameEnd = i < nArgs - 1 ? args.indexOf(", ", nameStart) : args.length(); argNames[i] = args.substring(nameStart, nameEnd); if (DEBUG) writeLine("arg name" + i + ": <" + argNames[i] + ">"); typeStart = nextTypeStart; } } String getC2JavaType(String cType) { for (int i = 0; i < TYPES_C2JAVA.length; i++) { if (cType.indexOf(TYPES_C2JAVA[i][0]) != -1) return TYPES_C2JAVA[i][1]; } return "!ERROR UNKNOWN C TYPE <" + cType + ">!"; } // how many times part can be found in s static int count(String s, String part) { int index = -1, cnt = 0; while ((index = s.indexOf(part, index + 1)) != -1) cnt++; return cnt; } static String COPYRIGHTS = "/* ***** BEGIN LICENSE BLOCK *****\r\n" + " * Version: MPL 1.1\r\n" + " *\r\n" + " * The contents of this file are subject to the Mozilla Public License Version\r\n" + " * 1.1 (the \"License\"); you may not use this file except in compliance with\r\n" + " * the License. You may obtain a copy of the License at\r\n" + " * http://www.mozilla.org/MPL/\r\n" + " *\r\n" + " * Software distributed under the License is distributed on an \"AS IS\" basis,\r\n" + " * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License\r\n" + " * for the specific language governing rights and limitations under the\r\n" + " * License.\r\n" + " *\r\n" + " * The Original Code is Mozilla Communicator client code, released March 31, 1998.\r\n" + " *\r\n" + " * The Initial Developer of the Original Code is\r\n" + " * Netscape Communications Corporation.\r\n" + " * Portions created by Netscape are Copyright (C) 1998-1999\r\n" + " * Netscape Communications Corporation. All Rights Reserved.\r\n" + " *\r\n" + " * Contributor(s):\r\n" + " *\r\n" + " * IBM\r\n" + " * - Binding to permit interfacing between Mozilla and SWT\r\n" + " * - Copyright (C) 2003, 2009 IBM Corp. All Rights Reserved.\r\n" + " *\r\n" + " * ***** END LICENSE BLOCK ***** */"; static String PACKAGE_DECLARATION = "package org.eclipse.hawtjni.internal.mozilla;"; } NativesGenerator.java000077500000000000000000001353771514323636100360500ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2007 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.List; import org.fusesource.hawtjni.generator.model.JNIClass; import org.fusesource.hawtjni.generator.model.JNIField; import org.fusesource.hawtjni.generator.model.JNIFieldAccessor; import org.fusesource.hawtjni.generator.model.JNIMethod; import org.fusesource.hawtjni.generator.model.JNIParameter; import org.fusesource.hawtjni.generator.model.JNIType; import org.fusesource.hawtjni.runtime.ArgFlag; import org.fusesource.hawtjni.runtime.ClassFlag; import org.fusesource.hawtjni.runtime.FieldFlag; import org.fusesource.hawtjni.runtime.MethodFlag; import static org.fusesource.hawtjni.runtime.MethodFlag.*; /** * * @author Hiram Chirino */ public class NativesGenerator extends JNIGenerator { boolean enterExitMacro; public NativesGenerator() { enterExitMacro = true; } public void generateCopyright() { outputln(fixDelimiter(getCopyright())); } public void generateIncludes() { String outputName = getOutputName(); outputln("#include \"" + outputName + ".h\""); outputln("#include \"hawtjni.h\""); outputln("#include \"" + outputName + "_structs.h\""); outputln("#include \"" + outputName + "_stats.h\""); outputln(); } public void generate(JNIClass clazz) { List methods = clazz.getNativeMethods(); if( methods.isEmpty() ) { return; } sortMethods(methods); generateNativeMacro(clazz); generate(methods); } public void generate(List methods) { sortMethods(methods); for (JNIMethod method : methods) { if ((method.getModifiers() & Modifier.NATIVE) == 0) continue; generate(method); if (progress != null) progress.step(); } } boolean isStruct(ArgFlag flags[]) { for (ArgFlag flag : flags) { if (flag.equals(ArgFlag.BY_VALUE)) return true; } return false; } void generateCallback(JNIMethod method, String function, List params, JNIType returnType) { output("static jintLong "); output(function); outputln(";"); output("static "); String[] types = method.getCallbackTypes(); ArgFlag[][] flags = method.getCallbackFlags(); output(types[0]); output(" "); output("proc_"); output(function); output("("); boolean first = true; for (int i = 1; i < types.length; i++) { if (!first) output(", "); output(types[i]); output(" "); output("arg"); output(String.valueOf(i - 1)); first = false; } outputln(") {"); output("\t"); if (isStruct(flags[0])) { output(types[0]); output("* lprc = "); } else if (!types[0].equals("void")) { output("return "); } output("(("); output(types[0]); if (isStruct(flags[0])) output("*"); output(" (*)("); first = true; for (int i = 1; i < types.length; i++) { if (!first) output(", "); first = false; output(types[i]); if (isStruct(flags[i])) output("*"); } output("))"); output(function); output(")("); first = true; for (int i = 1; i < types.length; i++) { if (!first) output(", "); first = false; if (isStruct(flags[i])) output("&"); output("arg"); output(String.valueOf(i - 1)); } outputln(");"); if (isStruct(flags[0])) { output("\t"); output(types[0]); outputln(" rc;"); outputln("\tif (lprc) {"); outputln("\t\trc = *lprc;"); outputln("\t\tfree(lprc);"); outputln("\t} else {"); output("\t\tmemset(&rc, 0, sizeof("); output(types[0]); outputln("));"); outputln("\t}"); outputln("\treturn rc;"); } outputln("}"); output("static jintLong "); output(method.getName()); outputln("(jintLong func) {"); output("\t"); output(function); outputln(" = func;"); output("\treturn (jintLong)proc_"); output(function); outputln(";"); outputln("}"); } private void generateConstantsInitializer(JNIMethod method) { JNIClass clazz = method.getDeclaringClass(); ArrayList constants = getConstantFields(clazz); if( constants.isEmpty() ) { return; } if (isCPP) { output("extern \"C\" "); } outputln("JNIEXPORT void JNICALL "+clazz.getSimpleName()+"_NATIVE("+toC(method.getName())+")(JNIEnv *env, jclass that)"); outputln("{"); for (JNIField field : constants) { String conditional = field.getConditional(); if (conditional!=null) { outputln("#if "+conditional); } JNIType type = field.getType(), type64 = field.getType64(); boolean allowConversion = !type.equals(type64); String simpleName = type.getSimpleName(); JNIFieldAccessor accessor = field.getAccessor(); String fieldId = "(*env)->GetStaticFieldID(env, that, \""+field.getName()+"\", \""+type.getTypeSignature(allowConversion)+"\")"; if (isCPP) { fieldId = "env->GetStaticFieldID(that, \""+field.getName()+"\", \""+type.getTypeSignature(allowConversion)+"\")"; } if (type.isPrimitive()) { if (isCPP) { output("\tenv->SetStatic"+type.getTypeSignature1(allowConversion)+"Field(that, "+fieldId +", "); } else { output("\t(*env)->SetStatic"+type.getTypeSignature1(allowConversion)+"Field(env, that, "+fieldId +", "); } output("("+type.getTypeSignature2(allowConversion)+")"); if( field.isPointer() ) { output("(intptr_t)"); } output(accessor.getter()); output(");"); } else if (type.isArray()) { JNIType componentType = type.getComponentType(), componentType64 = type64.getComponentType(); if (componentType.isPrimitive()) { outputln("\t{"); output("\t"); output(type.getTypeSignature2(allowConversion)); output(" lpObject1 = ("); output(type.getTypeSignature2(allowConversion)); if (isCPP) { output(")env->GetStaticObjectField(that, "); } else { output(")(*env)->GetStaticObjectField(env, that, "); } output(field.getDeclaringClass().getSimpleName()); output(fieldId); outputln(");"); if (isCPP) { output("\tenv->Set"); } else { output("\t(*env)->Set"); } output(componentType.getTypeSignature1(!componentType.equals(componentType64))); if (isCPP) { output("ArrayRegion(lpObject1, 0, sizeof("); } else { output("ArrayRegion(env, lpObject1, 0, sizeof("); } output(accessor.getter()); output(")"); if (!componentType.isType("byte")) { output(" / sizeof("); output(componentType.getTypeSignature2(!componentType.equals(componentType64))); output(")"); } output(", ("); output(type.getTypeSignature4(allowConversion, false)); output(")"); output(accessor.getter()); outputln(");"); output("\t}"); } else { throw new Error("not done"); } } else { outputln("\t{"); if (isCPP) { output("\tjobject lpObject1 = env->GetStaticObjectField(that, "); } else { output("\tjobject lpObject1 = (*env)->GetStaticObjectField(env, that, "); } output(field.getDeclaringClass().getSimpleName()); output("Fc."); output(field.getName()); outputln(");"); output("\tif (lpObject1 != NULL) set"); output(simpleName); output("Fields(env, lpObject1, &lpStruct->"); output(accessor.getter()); outputln(");"); output("\t}"); } outputln(); if (conditional!=null) { outputln("#endif"); } } outputln(" return;"); outputln("}"); } private ArrayList getConstantFields(JNIClass clazz) { ArrayList rc = new ArrayList(); List fields = clazz.getDeclaredFields(); for (JNIField field : fields) { int mods = field.getModifiers(); if ( (mods & Modifier.STATIC) != 0 && field.getFlag(FieldFlag.CONSTANT)) { rc.add(field); } } return rc; } public void generate(JNIMethod method) { if (method.getFlag(MethodFlag.METHOD_SKIP)) return; JNIType returnType = method.getReturnType32(), returnType64 = method.getReturnType64(); if( method.getFlag(CONSTANT_INITIALIZER)) { if( returnType.isType("void") && method.getParameters().isEmpty() ) { generateConstantsInitializer(method); } else { output("#error Warning: invalid CONSTANT_INITIALIZER tagged method. It must be void and take no arguments: "); outputln(method.toString()); } return; } if (!(returnType.isType("void") || returnType.isPrimitive() || isSystemClass(returnType) || returnType.isType("java.lang.String"))) { output("#error Warning: bad return type. :"); outputln(method.toString()); return; } String conditional = method.getConditional(); if (conditional!=null) { outputln("#if "+conditional); } List params = method.getParameters(); String function = getFunctionName(method), function64 = getFunctionName(method, method.getParameterTypes64()); boolean sameFunction = function.equals(function64); if (!sameFunction) { output("#ifndef "); output(JNI64); outputln(); } if (isCPP) { output("extern \"C\" "); generateFunctionPrototype(method, function, params, returnType, returnType64, true); outputln(";"); } if (function.startsWith("CALLBACK_")) { generateCallback(method, function, params, returnType); } generateFunctionPrototype(method, function, params, returnType, returnType64, !sameFunction); if (!function.equals(function64)) { outputln(); outputln("#else"); if (isCPP) { output("extern \"C\" "); generateFunctionPrototype(method, function64, params, returnType, returnType64, true); outputln(";"); } generateFunctionPrototype(method, function64, params, returnType, returnType64, !sameFunction); outputln(); outputln("#endif"); } generateFunctionBody(method, function, function64, params, returnType, returnType64); if (conditional!=null) { outputln("#endif"); } outputln(); } public void setEnterExitMacro(boolean enterExitMacro) { this.enterExitMacro = enterExitMacro; } void generateNativeMacro(JNIClass clazz) { output("#define "); output(clazz.getSimpleName()); output("_NATIVE(func) Java_"); output(toC(clazz.getName())); outputln("_##func"); outputln(); } boolean generateGetParameter(JNIMethod method, JNIParameter param, boolean critical, int indent) { JNIType paramType = param.getType32(), paramType64 = param.getType64(); if (paramType.isPrimitive() || isSystemClass(paramType)) return false; String iStr = String.valueOf(param.getParameter()); for (int j = 0; j < indent; j++) output("\t"); output("if (arg"); output(iStr); output(") if ((lparg"); output(iStr); output(" = "); if (paramType.isArray()) { JNIType componentType = paramType.getComponentType(); if (componentType.isPrimitive()) { if( "long".equals( componentType.getName() ) && param.isPointer() ) { // This case is special as we may need to do pointer conversions.. // if your on a 32 bit system but are keeping track of the pointers in a 64 bit long output("hawtjni_malloc_pointer_array(env, arg"); output(iStr); output(")"); } else if (critical) { if (isCPP) { output("("); output(componentType.getTypeSignature2(!paramType.equals(paramType64))); output("*)"); output("env->GetPrimitiveArrayCritical(arg"); } else { output("(*env)->GetPrimitiveArrayCritical(env, arg"); } output(iStr); output(", NULL)"); } else { if (isCPP) { output("env->Get"); } else { output("(*env)->Get"); } output(componentType.getTypeSignature1(!paramType.equals(paramType64))); if (isCPP) { output("ArrayElements(arg"); } else { output("ArrayElements(env, arg"); } output(iStr); output(", NULL)"); } } else { throw new Error("not done"); } } else if (paramType.isType("java.lang.String")) { if (param.getFlag(ArgFlag.UNICODE)) { if (isCPP) { output("env->GetStringChars(arg"); } else { output("(*env)->GetStringChars(env, arg"); } output(iStr); output(", NULL)"); } else { if (isCPP) { output("env->GetStringUTFChars(arg"); } else { output("(*env)->GetStringUTFChars(env, arg"); } output(iStr); output(", NULL)"); } } else { if (param.getFlag(ArgFlag.NO_IN)) { output("&_arg"); output(iStr); } else { output("get"); output(paramType.getSimpleName()); output("Fields(env, arg"); output(iStr); output(", &_arg"); output(iStr); output(")"); } } outputln(") == NULL) goto fail;"); return true; } void generateSetParameter(JNIParameter param, boolean critical) { JNIType paramType = param.getType32(), paramType64 = param.getType64(); if (paramType.isPrimitive() || isSystemClass(paramType)) return; String iStr = String.valueOf(param.getParameter()); if (paramType.isArray()) { output("\tif (arg"); output(iStr); output(" && lparg"); output(iStr); output(") "); JNIType componentType = paramType.getComponentType(); if (componentType.isPrimitive()) { if( "long".equals( componentType.getName() ) && param.isPointer() ) { // This case is special as we may need to do pointer conversions.. // if your on a 32 bit system but are keeping track of the pointers in a 64 bit long output("hawtjni_free_pointer_array(env, arg"); output(iStr); } else if (critical) { if (isCPP) { output("env->ReleasePrimitiveArrayCritical(arg"); } else { output("(*env)->ReleasePrimitiveArrayCritical(env, arg"); } output(iStr); } else { if (isCPP) { output("env->Release"); } else { output("(*env)->Release"); } output(componentType.getTypeSignature1(!paramType.equals(paramType64))); if (isCPP) { output("ArrayElements(arg"); } else { output("ArrayElements(env, arg"); } output(iStr); } output(", lparg"); output(iStr); output(", "); if (param.getFlag(ArgFlag.NO_OUT)) { output("JNI_ABORT"); } else { output("0"); } output(");"); } else { throw new Error("not done"); } outputln(); } else if (paramType.isType("java.lang.String")) { output("\tif (arg"); output(iStr); output(" && lparg"); output(iStr); output(") "); if (param.getFlag(ArgFlag.UNICODE)) { if (isCPP) { output("env->ReleaseStringChars(arg"); } else { output("(*env)->ReleaseStringChars(env, arg"); } } else { if (isCPP) { output("env->ReleaseStringUTFChars(arg"); } else { output("(*env)->ReleaseStringUTFChars(env, arg"); } } output(iStr); output(", lparg"); output(iStr); outputln(");"); } else { if (!param.getFlag(ArgFlag.NO_OUT)) { output("\tif (arg"); output(iStr); output(" && lparg"); output(iStr); output(") "); output("set"); output(paramType.getSimpleName()); output("Fields(env, arg"); output(iStr); output(", lparg"); output(iStr); outputln(");"); } } } void generateEnterExitMacro(JNIMethod method, String function, String function64, boolean enter) { if (!enterExitMacro) return; if (!function.equals(function64)) { output("#ifndef "); output(JNI64); outputln(); } output("\t"); output(method.getDeclaringClass().getSimpleName()); output("_NATIVE_"); output(enter ? "ENTER" : "EXIT"); output("(env, that, "); output(method.getDeclaringClass().getSimpleName()+"_"+function); outputln("_FUNC);"); if (!function.equals(function64)) { outputln("#else"); output("\t"); output(method.getDeclaringClass().getSimpleName()); output("_NATIVE_"); output(enter ? "ENTER" : "EXIT"); output("(env, that, "); output(method.getDeclaringClass().getSimpleName()+"_"+function64); outputln("_FUNC);"); outputln("#endif"); } } boolean generateLocalVars(JNIMethod method, List params, JNIType returnType, JNIType returnType64) { boolean needsReturn = enterExitMacro; for (int i = 0; i < params.size(); i++) { JNIParameter param = params.get(i); JNIType paramType = param.getType32(), paramType64 = param.getType64(); if (paramType.isPrimitive() || isSystemClass(paramType)) continue; output("\t"); if (paramType.isArray()) { JNIType componentType = paramType.getComponentType(); if( "long".equals( componentType.getName() ) && param.isPointer() ) { output("void **lparg" + i+"=NULL;"); } else if (componentType.isPrimitive()) { output(componentType.getTypeSignature2(!paramType.equals(paramType64))); output(" *lparg" + i); output("=NULL;"); } else { throw new Error("not done"); } } else if (paramType.isType("org.fusesource.hawtjni.runtime.JNIEnv")) { // no need to generate a local for this one.. } else if (paramType.isType("java.lang.String")) { if (param.getFlag(ArgFlag.UNICODE)) { output("const jchar *lparg" + i); } else { output("const char *lparg" + i); } output("= NULL;"); } else { if (param.getTypeClass().getFlag(ClassFlag.STRUCT) && !param.getTypeClass().getFlag(ClassFlag.TYPEDEF)) { output("struct "); } output(paramType.getNativeName()); output(" _arg" + i); if (param.getFlag(ArgFlag.INIT)) output("={0}"); output(", *lparg" + i); output("=NULL;"); } outputln(); needsReturn = true; } if (needsReturn) { if (!returnType.isType("void")) { output("\t"); output(returnType.getTypeSignature2(!returnType.equals(returnType64))); outputln(" rc = 0;"); } } return needsReturn; } boolean generateGetters(JNIMethod method, List params) { boolean genFailTag = false; int criticalCount = 0; for (JNIParameter param : params) { if( !"org.fusesource.hawtjni.runtime.JNIEnv".equals(param.getTypeClass().getName()) ) { if (!isCritical(param)) { genFailTag |= generateGetParameter(method, param, false, 1); } else { criticalCount++; } } } if (criticalCount != 0) { outputln("#ifdef JNI_VERSION_1_2"); outputln("\tif (IS_JNI_1_2) {"); for (JNIParameter param : params) { if( !"org.fusesource.hawtjni.runtime.JNIEnv".equals(param.getTypeClass().getName()) ) { if (isCritical(param)) { genFailTag |= generateGetParameter(method, param, true, 2); } } } outputln("\t} else"); outputln("#endif"); outputln("\t{"); for (JNIParameter param : params) { if( !"org.fusesource.hawtjni.runtime.JNIEnv".equals(param.getTypeClass().getName()) ) { if (isCritical(param)) { genFailTag |= generateGetParameter(method, param, false, 2); } } } outputln("\t}"); } return genFailTag; } void generateSetters(JNIMethod method, List params) { int criticalCount = 0; for (int i = params.size() - 1; i >= 0; i--) { JNIParameter param = params.get(i); if( !"org.fusesource.hawtjni.runtime.JNIEnv".equals(param.getTypeClass().getName()) ) { if (isCritical(param)) { criticalCount++; } } } if (criticalCount != 0) { outputln("#ifdef JNI_VERSION_1_2"); outputln("\tif (IS_JNI_1_2) {"); for (int i = params.size() - 1; i >= 0; i--) { JNIParameter param = params.get(i); if( !"org.fusesource.hawtjni.runtime.JNIEnv".equals(param.getTypeClass().getName()) ) { if (isCritical(param)) { output("\t"); generateSetParameter(param, true); } } } outputln("\t} else"); outputln("#endif"); outputln("\t{"); for (int i = params.size() - 1; i >= 0; i--) { JNIParameter param = params.get(i); if( !"org.fusesource.hawtjni.runtime.JNIEnv".equals(param.getTypeClass().getName()) ) { if (isCritical(param)) { output("\t"); generateSetParameter(param, false); } } } outputln("\t}"); } for (int i = params.size() - 1; i >= 0; i--) { JNIParameter param = params.get(i); if( !"org.fusesource.hawtjni.runtime.JNIEnv".equals(param.getTypeClass().getName()) ) { if (!isCritical(param)) { generateSetParameter(param, false); } } } } void generateDynamicFunctionCall(JNIMethod method, List params, JNIType returnType, JNIType returnType64, boolean needsReturn) { outputln("/*"); generateFunctionCall(method, params, returnType, returnType64, needsReturn); outputln("*/"); outputln("\t{"); String name = method.getName(); if (name.startsWith("_")) name = name.substring(1); output("\t\tLOAD_FUNCTION(fp, "); output(name); outputln(")"); outputln("\t\tif (fp) {"); output("\t\t"); generateFunctionCallLeftSide(method, returnType, returnType64, needsReturn); output("(("); output(returnType.getTypeSignature2(!returnType.equals(returnType64))); output(" (CALLING_CONVENTION*)("); for (int i = 0; i < params.size(); i++) { if (i != 0) output(", "); JNIParameter param = params.get(i); String cast = param.getCast(); if( param.isPointer() ) { output("(intptr_t)"); } boolean isStruct = param.getFlag(ArgFlag.BY_VALUE); if (cast.length() > 2) { cast = cast.substring(1, cast.length() - 1); if (isStruct) { int index = cast.lastIndexOf('*'); if (index != -1) cast = cast.substring(0, index).trim(); } output(cast); } else { JNIType paramType = param.getType32(), paramType64 = param.getType64(); output(paramType.getTypeSignature4(!paramType.equals(paramType64), isStruct)); } } output("))"); output("fp"); output(")"); generateFunctionCallRightSide(method, params, 0); output(";"); outputln(); outputln("\t\t}"); outputln("\t}"); } void generateFunctionCallLeftSide(JNIMethod method, JNIType returnType, JNIType returnType64, boolean needsReturn) { output("\t"); if (!returnType.isType("void")) { if (needsReturn) { output("rc = "); } else { output("return "); } String cast = method.getCast(); if (cast.length() != 0 && !cast.equals("()")) { if( method.isPointer() ) { output("(intptr_t)"); } output(cast); } else { if( method.getFlag(CPP_NEW)) { String[] parts = getNativeNameParts(method); String className = parts[0]; output("(intptr_t)("+className+" *)"); } else { output("("); output(returnType.getTypeSignature2(!returnType.equals(returnType64))); output(")"); } } } if (method.getFlag(MethodFlag.ADDRESS)) { output("&"); } if (method.getFlag(MethodFlag.JNI)) { output(isCPP ? "env->" : "(*env)->"); } } void generateFunctionCallRightSide(JNIMethod method, List params, int paramStart) { if (!method.getFlag(MethodFlag.CONSTANT_GETTER)) { output("("); if (method.getFlag(MethodFlag.JNI)) { if (!isCPP) output("env, "); } for (int i = paramStart; i < params.size(); i++) { JNIParameter param = params.get(i); if (i != paramStart) output(", "); if (param.getFlag(ArgFlag.BY_VALUE)) output("*"); output(param.getCast()); if( param.isPointer() ) { output("(intptr_t)"); } if (param.getFlag(ArgFlag.CS_OBJECT)) output("TO_OBJECT("); if (i == params.size() - 1 && param.getFlag(ArgFlag.SENTINEL)) { output("NULL"); } else { if( "org.fusesource.hawtjni.runtime.JNIEnv".equals(param.getTypeClass().getName()) ) { output("env"); } else { JNIType paramType = param.getType32(); if (!paramType.isPrimitive() && !isSystemClass(paramType)) output("lp"); output("arg" + i); } } if (param.getFlag(ArgFlag.CS_OBJECT)) output(")"); } output(")"); } } static String[] getNativeNameParts(JNIMethod method) { String className = null; String methodName = null; JNIClass dc = method.getDeclaringClass(); if( dc.getFlag(ClassFlag.CPP) || dc.getFlag(ClassFlag.STRUCT) ) { className = method.getDeclaringClass().getNativeName(); } if( method.getAccessor().length() != 0 ) { methodName = method.getAccessor(); int pos = methodName.lastIndexOf("::"); if( pos >= 0 ) { className = methodName.substring(0, pos); methodName = methodName.substring(pos+2); } } else { methodName = method.getName(); if( className==null ) { int pos = methodName.indexOf("_"); if( pos > 0 ) { className = methodName.substring(0, pos); methodName = methodName.substring(pos+1); } } } if( className==null ) { throw new Error(String.format("Could not determine object type name of method '%s'", method.getDeclaringClass().getSimpleName()+"."+method.getName())); } return new String[]{className, methodName}; } void generateFunctionCall(JNIMethod method, List params, JNIType returnType, JNIType returnType64, boolean needsReturn) { String name = method.getName(); String copy = method.getCopy(); boolean makeCopy = copy.length() != 0 && isCPP && !returnType.isType("void"); if (makeCopy) { output("\t{"); output("\t\t"); output(copy); output(" temp = "); } else { generateFunctionCallLeftSide(method, returnType, returnType64, needsReturn); } int paramStart = 0; if (name.startsWith("_")) name = name.substring(1); boolean objc_struct = false; if (name.equals("objc_msgSend_stret") || name.equals("objc_msgSendSuper_stret")) objc_struct = true; if (objc_struct) { outputln("if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {"); generate_objc_msgSend_stret(method, params, name); paramStart = 1; } else if (name.equalsIgnoreCase("call")) { output("("); JNIParameter param = params.get(0); String cast = param.getCast(); if (cast.length() != 0 && !cast.equals("()")) { output(cast); if( param.isPointer() ) { output("(intptr_t)"); } } else { output("("); output(returnType.getTypeSignature2(!returnType.equals(returnType64))); output(" (*)())"); } output("arg0)"); paramStart = 1; } else if (name.startsWith("VtblCall") || name.startsWith("_VtblCall")) { output("(("); output(returnType.getTypeSignature2(!returnType.equals(returnType64))); output(" (STDMETHODCALLTYPE *)("); for (int i = 1; i < params.size(); i++) { if (i != 1) output(", "); JNIParameter param = params.get(i); JNIType paramType = param.getType32(), paramType64 = param.getType64(); output(paramType.getTypeSignature4(!paramType.equals(paramType64), false)); } output("))(*("); JNIType paramType = params.get(1).getType32(), paramType64 = params.get(1).getType64(); output(paramType.getTypeSignature4(!paramType.equals(paramType64), false)); output(" **)arg1)[arg0])"); paramStart = 1; } else if (method.getFlag(MethodFlag.CPP_METHOD) || method.getFlag(MethodFlag.SETTER) || method.getFlag(MethodFlag.GETTER) || method.getFlag(MethodFlag.ADDER)) { String[] parts = getNativeNameParts(method); String className = parts[0]; String methodName = parts[1]; if (method.getFlag(MethodFlag.CS_OBJECT)) { output("TO_HANDLE("); } output("("); if( params.isEmpty() ) { throw new Error(String.format("C++ bound method '%s' missing the 'this' parameter", method.getDeclaringClass().getSimpleName()+"."+method.getName())); } JNIParameter param = params.get(0); if (param.getFlag(ArgFlag.BY_VALUE)) output("*"); String cast = param.getCast(); if (cast.length() != 0 && !cast.equals("()")) { output(cast); if( param.isPointer() ) { output("(intptr_t)"); } } else { output("("+className+" *)(intptr_t)"); } if (param.getFlag(ArgFlag.CS_OBJECT)) { output("TO_OBJECT("); } output("arg0"); if (param.getFlag(ArgFlag.CS_OBJECT)) { output(")"); } output(")->"); output(methodName); paramStart = 1; } else if (method.getFlag(MethodFlag.CS_NEW)) { output("TO_HANDLE(gcnew "); String accessor = method.getAccessor(); if (accessor.length() != 0) { output(accessor); } else { JNIClass dc = method.getDeclaringClass(); if( dc.getFlag(ClassFlag.CPP) || dc.getFlag(ClassFlag.STRUCT) ) { output(dc.getNativeName()); } else { int index = -1; if ((index = name.indexOf('_')) != -1) { output(name.substring(index + 1)); } else { output(name); } } } } else if (method.getFlag(MethodFlag.CPP_NEW)) { if (method.getFlag(MethodFlag.CS_OBJECT)) { output("TO_HANDLE("); } output("new "); String accessor = method.getAccessor(); if (accessor.length() != 0) { output(accessor); } else { JNIClass dc = method.getDeclaringClass(); if( dc.getFlag(ClassFlag.CPP) ) { output(method.getDeclaringClass().getNativeName()); } else { int index = -1; if ((index = name.indexOf('_')) != -1) { output(name.substring(index+1)); } else { output(name); } } } } else if (method.getFlag(MethodFlag.CPP_DELETE)) { String[] parts = getNativeNameParts(method); String className = parts[0]; output("delete "); JNIParameter param = params.get(0); String cast = param.getCast(); if (cast.length() != 0 && !cast.equals("()")) { output(cast); if( param.isPointer() ) { output("(intptr_t)"); } } else { output("("+className+" *)(intptr_t)"); } outputln("arg0;"); return; } else { if (method.getFlag(MethodFlag.CS_OBJECT)) { output("TO_HANDLE("); } if (method.getFlag(MethodFlag.CAST)) { output("(("); String returnCast = returnType.getTypeSignature2(!returnType.equals(returnType64)); if (name.equals("objc_msgSend_bool") && returnCast.equals("jboolean")) { returnCast = "BOOL"; } output(returnCast); output(" (*)("); for (int i = 0; i < params.size(); i++) { if (i != 0) output(", "); JNIParameter param = params.get(i); String cast = param.getCast(); if (cast.length() != 0 && !cast.equals("()") ) { if (cast.startsWith("(")) cast = cast.substring(1); if (cast.endsWith(")")) cast = cast.substring(0, cast.length() - 1); output(cast); } else { JNIType paramType = param.getType32(), paramType64 = param.getType64(); if (!(paramType.isPrimitive() || paramType.isArray())) { if (param.getTypeClass().getFlag(ClassFlag.STRUCT) && !param.getTypeClass().getFlag(ClassFlag.TYPEDEF)) { output("struct "); } } output(paramType.getTypeSignature4(!paramType.equals(paramType64), param.getFlag(ArgFlag.BY_VALUE))); } } output("))"); } String accessor = method.getAccessor(); if (accessor.length() != 0) { output(accessor); } else { output(name); } if (method.getFlag(MethodFlag.CAST)) { output(")"); } } if ((method.getFlag(MethodFlag.SETTER) && params.size() == 3) || (method.getFlag(MethodFlag.GETTER) && params.size() == 2)) { output("[arg1]"); paramStart++; } if (method.getFlag(MethodFlag.SETTER)) output(" = "); if (method.getFlag(MethodFlag.ADDER)) output(" += "); if (!method.getFlag(MethodFlag.GETTER)) { generateFunctionCallRightSide(method, params, paramStart); } if (method.getFlag(MethodFlag.CS_NEW) || method.getFlag(MethodFlag.CS_OBJECT)) { output(")"); } output(";"); outputln(); if (makeCopy) { outputln("\t\t{"); output("\t\t\t"); output(copy); output("* copy = new "); output(copy); outputln("();"); outputln("\t\t\t*copy = temp;"); output("\t\t\trc = "); output("("); output(returnType.getTypeSignature2(!returnType.equals(returnType64))); output(")"); outputln("copy;"); outputln("\t\t}"); outputln("\t}"); } if (objc_struct) { outputln("\t} else {"); generate_objc_msgSend_stret(method, params, name.substring(0, name.length() - "_stret".length())); generateFunctionCallRightSide(method, params, 1); outputln(";"); outputln("\t}"); } } void generate_objc_msgSend_stret(JNIMethod method, List params, String func) { output("\t\t*lparg0 = (*("); JNIType paramType = params.get(0).getType32(), paramType64 = params.get(0).getType64(); output(paramType.getTypeSignature4(!paramType.equals(paramType64), true)); output(" (*)("); for (int i = 1; i < params.size(); i++) { if (i != 1) output(", "); JNIParameter param = params.get(i); String cast = param.getCast(); if( param.isPointer() ) { output("(intptr_t)"); } if (cast.length() != 0 && !cast.equals("()")) { if (cast.startsWith("(")) cast = cast.substring(1); if (cast.endsWith(")")) cast = cast.substring(0, cast.length() - 1); output(cast); } else { paramType = param.getType32(); paramType64 = param.getType64(); if (!(paramType.isPrimitive() || paramType.isArray())) { if (param.getTypeClass().getFlag(ClassFlag.STRUCT) && !param.getTypeClass().getFlag(ClassFlag.TYPEDEF)) { output("struct "); } } output(paramType.getTypeSignature4(!paramType.equals(paramType64), param.getFlag(ArgFlag.BY_VALUE))); } } output("))"); output(func); output(")"); } void generateReturn(JNIMethod method, JNIType returnType, boolean needsReturn) { if (needsReturn && !returnType.isType("void")) { outputln("\treturn rc;"); } } void generateMemmove(JNIMethod method, String function, String function64, List params) { generateEnterExitMacro(method, function, function64, true); output("\t"); boolean get = params.get(0).getType32().isPrimitive(); String className = params.get(get ? 1 : 0).getType32().getSimpleName(); output(get ? "if (arg1) get" : "if (arg0) set"); output(className); output(get ? "Fields(env, arg1, (" : "Fields(env, arg0, ("); output(className); output(get ? " *)arg0)" : " *)arg1)"); outputln(";"); generateEnterExitMacro(method, function, function64, false); } void generateFunctionBody(JNIMethod method, String function, String function64, List params, JNIType returnType, JNIType returnType64) { outputln("{"); /* Custom GTK memmoves. */ String name = method.getName(); if (name.startsWith("_")) name = name.substring(1); boolean isMemove = (name.equals("memmove") || name.equals("MoveMemory")) && params.size() == 2 && returnType.isType("void"); if (isMemove) { generateMemmove(method, function, function64, params); } else { boolean needsReturn = generateLocalVars(method, params, returnType, returnType64); generateEnterExitMacro(method, function, function64, true); boolean genFailTag = generateGetters(method, params); if (method.getFlag(MethodFlag.DYNAMIC)) { generateDynamicFunctionCall(method, params, returnType, returnType64, needsReturn); } else { generateFunctionCall(method, params, returnType, returnType64, needsReturn); } if (genFailTag) outputln("fail:"); generateSetters(method, params); generateEnterExitMacro(method, function, function64, false); generateReturn(method, returnType, needsReturn); } outputln("}"); } void generateFunctionPrototype(JNIMethod method, String function, List params, JNIType returnType, JNIType returnType64, boolean singleLine) { output("JNIEXPORT "); output(returnType.getTypeSignature2(!returnType.equals(returnType64))); output(" JNICALL "); output(method.getDeclaringClass().getSimpleName()); output("_NATIVE("); output(function); if (singleLine) { output(")"); output("(JNIEnv *env, "); } else { outputln(")"); output("\t(JNIEnv *env, "); } if ((method.getModifiers() & Modifier.STATIC) != 0) { output("jclass"); } else { output("jobject"); } output(" that"); for (int i = 0; i < params.size(); i++) { output(", "); JNIType paramType = params.get(i).getType32(), paramType64 = params.get(i).getType64(); output(paramType.getTypeSignature2(!paramType.equals(paramType64))); output(" arg" + i); } output(")"); if (!singleLine) outputln(); } boolean isCritical(JNIParameter param) { JNIType paramType = param.getType32(); return paramType.isArray() && paramType.getComponentType().isPrimitive() && param.getFlag(ArgFlag.CRITICAL); } boolean isSystemClass(JNIType type) { return type.isType("java.lang.Object") || type.isType("java.lang.Class"); } } ProgressMonitor.java000077500000000000000000000013301514323636100357210ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (c) 2005 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; /** * * @author Hiram Chirino */ public interface ProgressMonitor { public void setTotal(int total); public void setMessage(String message); public void step(); } SizeofGenerator.java000077500000000000000000000044761514323636100356710ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.lang.reflect.Modifier; import java.util.List; import org.fusesource.hawtjni.generator.model.JNIClass; import org.fusesource.hawtjni.generator.model.JNIField; import org.fusesource.hawtjni.generator.model.ReflectClass; /** * * @author Hiram Chirino */ public class SizeofGenerator extends JNIGenerator { public void generate(JNIClass clazz) { String className = clazz.getSimpleName(); output("\tprintf(\""); output(className); output("=%d\\n\", sizeof("); output(className); outputln("));"); } public void generate() { outputln("int main() {"); super.generate(); outputln("}"); } public void generate(List fields) { sortFields(fields); for (JNIField field : fields) { if ((field.getModifiers() & Modifier.FINAL) == 0) continue; generate(field); } } public void generate(JNIField field) { output("\tprintf(\""); output(field.getName()); output("=%d\\n\", sizeof("); output(field.getName()); outputln("));"); } public static void main(String[] args) { if (args.length < 1) { System.out.println("Usage: java SizeofGenerator "); return; } try { SizeofGenerator gen = new SizeofGenerator(); for (int i = 0; i < args.length; i++) { String clazzName = args[i]; Class clazz = Class.forName(clazzName); gen.generate(new ReflectClass(clazz)); } } catch (Exception e) { System.out.println("Problem"); e.printStackTrace(System.out); } } } StatsGenerator.java000077500000000000000000000163241514323636100355230ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2007 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.lang.reflect.Modifier; import java.util.List; import org.fusesource.hawtjni.generator.model.JNIClass; import org.fusesource.hawtjni.generator.model.JNIMethod; /** * * @author Hiram Chirino */ public class StatsGenerator extends JNIGenerator { boolean header; public StatsGenerator(boolean header) { this.header = header; } public void generateCopyright() { outputln(fixDelimiter(getCopyright())); } public void generateIncludes() { if (!header) { outputln("#include \"hawtjni.h\""); outputln("#include \""+getOutputName()+"_stats.h\""); outputln(); } } public void generate(JNIClass clazz) { if (header) { generateHeaderFile(clazz); } else { generateSourceFile(clazz); } } void generateHeaderFile(JNIClass clazz) { generateNATIVEMacros(clazz); List methods = clazz.getDeclaredMethods(); sortMethods(methods); generateFunctionEnum(methods); } void generateNATIVEMacros(JNIClass clazz) { String className = clazz.getSimpleName(); outputln("#ifdef NATIVE_STATS"); output("extern int "); output(className); outputln("_nativeFunctionCount;"); output("extern int "); output(className); outputln("_nativeFunctionCallCount[];"); output("extern char* "); output(className); outputln("_nativeFunctionNames[];"); output("#define "); output(className); output("_NATIVE_ENTER(env, that, func) "); output(className); outputln("_nativeFunctionCallCount[func]++;"); output("#define "); output(className); outputln("_NATIVE_EXIT(env, that, func) "); outputln("#else"); output("#ifndef "); output(className); outputln("_NATIVE_ENTER"); output("#define "); output(className); outputln("_NATIVE_ENTER(env, that, func) "); outputln("#endif"); output("#ifndef "); output(className); outputln("_NATIVE_EXIT"); output("#define "); output(className); outputln("_NATIVE_EXIT(env, that, func) "); outputln("#endif"); outputln("#endif"); outputln(); } void generateSourceFile(JNIClass clazz) { outputln("#ifdef NATIVE_STATS"); outputln(); List methods = clazz.getDeclaredMethods(); int methodCount = 0; for (JNIMethod method : methods) { if ((method.getModifiers() & Modifier.NATIVE) == 0) continue; methodCount++; } String className = clazz.getSimpleName(); output("int "); output(className); output("_nativeFunctionCount = "); output(String.valueOf(methodCount)); outputln(";"); output("int "); output(className); output("_nativeFunctionCallCount["); output(String.valueOf(methodCount)); outputln("];"); output("char * "); output(className); outputln("_nativeFunctionNames[] = {"); sortMethods(methods); for (JNIMethod method : methods) { if ((method.getModifiers() & Modifier.NATIVE) == 0) continue; String function = getFunctionName(method), function64 = getFunctionName(method, method.getParameterTypes64()); if (!function.equals(function64)) { output("#ifndef "); output(JNI64); outputln(); } output("\t\""); output(function); outputln("\","); if (!function.equals(function64)) { outputln("#else"); output("\t\""); output(function64); outputln("\","); outputln("#endif"); } if (progress != null) progress.step(); } outputln("};"); outputln(); generateStatsNatives(className); outputln(); outputln("#endif"); } void generateStatsNatives(String className) { outputln("#define STATS_NATIVE(func) Java_org_fusesource_hawtjni_runtime_NativeStats_##func"); outputln(); output("JNIEXPORT jint JNICALL STATS_NATIVE("); output(toC(className + "_GetFunctionCount")); outputln(")"); outputln("\t(JNIEnv *env, jclass that)"); outputln("{"); output("\treturn "); output(className); outputln("_nativeFunctionCount;"); outputln("}"); outputln(); output("JNIEXPORT jstring JNICALL STATS_NATIVE("); output(toC(className + "_GetFunctionName")); outputln(")"); outputln("\t(JNIEnv *env, jclass that, jint index)"); outputln("{"); output("\treturn "); if (isCPP) { output("env->NewStringUTF("); } else { output("(*env)->NewStringUTF(env, "); } output(className); outputln("_nativeFunctionNames[index]);"); outputln("}"); outputln(); output("JNIEXPORT jint JNICALL STATS_NATIVE("); output(toC(className + "_GetFunctionCallCount")); outputln(")"); outputln("\t(JNIEnv *env, jclass that, jint index)"); outputln("{"); output("\treturn "); output(className); outputln("_nativeFunctionCallCount[index];"); outputln("}"); } void generateFunctionEnum(List methods) { if (methods.isEmpty()) return; outputln("typedef enum {"); for (JNIMethod method : methods) { if ((method.getModifiers() & Modifier.NATIVE) == 0) continue; String function = getFunctionName(method), function64 = getFunctionName(method, method.getParameterTypes64()); if (!function.equals(function64)) { output("#ifndef "); output(JNI64); outputln(); } output("\t"); output(method.getDeclaringClass().getSimpleName()+"_"+function); outputln("_FUNC,"); if (!function.equals(function64)) { outputln("#else"); output("\t"); output(method.getDeclaringClass().getSimpleName()+"_"+function64); outputln("_FUNC,"); outputln("#endif"); } if (progress != null) progress.step(); } JNIClass clazz = methods.get(0).getDeclaringClass(); output("} "); output(clazz.getSimpleName()); outputln("_FUNCS;"); } } StructsGenerator.java000077500000000000000000000561001514323636100360700ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2007 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.fusesource.hawtjni.generator.model.JNIClass; import org.fusesource.hawtjni.generator.model.JNIField; import org.fusesource.hawtjni.generator.model.JNIFieldAccessor; import org.fusesource.hawtjni.generator.model.JNIType; import org.fusesource.hawtjni.runtime.ClassFlag; /** * * @author Hiram Chirino */ public class StructsGenerator extends JNIGenerator { boolean header; static final boolean GLOBAL_REF = false; private HashMap> structFields = new HashMap>(); public StructsGenerator(boolean header) { this.header = header; } public void generateCopyright() { outputln(fixDelimiter(getCopyright())); } public void generateIncludes() { if (header) { outputln("#include \"" + getOutputName() + ".h\""); } else { outputln("#include \"" + getOutputName() + ".h\""); outputln("#include \"hawtjni.h\""); outputln("#include \"" + getOutputName() + "_structs.h\""); } outputln(); } public void generate(JNIClass clazz) { ArrayList fields = getStructFields(clazz); if (fields.isEmpty()) return; if (header) { generateHeaderFile(clazz); } else { generateSourceFile(clazz); } } private ArrayList getStructFields(JNIClass clazz) { if (!structFields.containsKey(clazz)) { ArrayList rc = new ArrayList(); List fields = clazz.getDeclaredFields(); for (JNIField field : fields) { int mods = field.getModifiers(); if ((mods & Modifier.STATIC) == 0 && (mods & Modifier.TRANSIENT) == 0) { rc.add(field); } } structFields.put(clazz, rc); } return structFields.get(clazz); } void generateHeaderFile(JNIClass clazz) { generateSourceStart(clazz); generatePrototypes(clazz); generateBlankMacros(clazz); generateSourceEnd(clazz); outputln(); } void generateSourceFile(JNIClass clazz) { generateSourceStart(clazz); generateFIDsStructure(clazz); outputln(); generateGlobalVar(clazz); outputln(); generateFunctions(clazz); generateSourceEnd(clazz); outputln(); } void generateSourceStart(JNIClass clazz) { String conditional = clazz.getConditional(); if (conditional != null) { outputln("#if " + conditional); } } void generateSourceEnd(JNIClass clazz) { if (clazz.getConditional() != null) { outputln("#endif"); } } void generateGlobalVar(JNIClass clazz) { String simpleName = clazz.getSimpleName(); output(simpleName); output("_FID_CACHE "); output(simpleName); outputln("Fc;"); } void generateBlankMacros(JNIClass clazz) { if (clazz.getConditional() == null) { return; } String simpleName = clazz.getSimpleName(); outputln("#else"); output("#define cache"); output(simpleName); outputln("Fields(a,b)"); output("#define get"); output(simpleName); outputln("Fields(a,b,c) NULL"); output("#define set"); output(simpleName); outputln("Fields(a,b,c)"); } void generatePrototypes(JNIClass clazz) { String clazzName = clazz.getNativeName(); String simpleName = clazz.getSimpleName(); output("void cache"); output(simpleName); outputln("Fields(JNIEnv *env, jobject lpObject);"); if (clazz.getFlag(ClassFlag.STRUCT) && !clazz.getFlag(ClassFlag.TYPEDEF)) { output("struct "); } output(clazzName); output(" *get"); output(simpleName); output("Fields(JNIEnv *env, jobject lpObject, "); if (clazz.getFlag(ClassFlag.STRUCT) && !clazz.getFlag(ClassFlag.TYPEDEF)) { output("struct "); } output(clazzName); outputln(" *lpStruct);"); output("void set"); output(simpleName); output("Fields(JNIEnv *env, jobject lpObject, "); if (clazz.getFlag(ClassFlag.STRUCT) && !clazz.getFlag(ClassFlag.TYPEDEF)) { output("struct "); } output(clazzName); outputln(" *lpStruct);"); } void generateFIDsStructure(JNIClass clazz) { String simpleName = clazz.getSimpleName(); output("typedef struct "); output(simpleName); outputln("_FID_CACHE {"); outputln("\tint cached;"); outputln("\tjclass clazz;"); List fields = clazz.getDeclaredFields(); boolean first = true; for (JNIField field : fields) { if (ignoreField(field)) continue; if (first) output("\tjfieldID "); else output(", "); output(field.getName()); first = false; } outputln(";"); output("} "); output(simpleName); outputln("_FID_CACHE;"); } void generateCacheFunction(JNIClass clazz) { String simpleName = clazz.getSimpleName(); String clazzName = clazz.getNativeName(); output("void cache"); output(simpleName); outputln("Fields(JNIEnv *env, jobject lpObject)"); outputln("{"); output("\tif ("); output(simpleName); outputln("Fc.cached) return;"); JNIClass superclazz = clazz.getSuperclass(); if (!superclazz.getName().equals("java.lang.Object") && hasNonIgnoredFields(superclazz)) { String superName = superclazz.getSimpleName(); output("\tcache"); output(superName); outputln("Fields(env, lpObject);"); } output("\t"); output(simpleName); if (isCPP) { if (GLOBAL_REF) { output("Fc.clazz = (jclass)env->NewGlobalRef(env->GetObjectClass(lpObject));"); } else { output("Fc.clazz = env->GetObjectClass(lpObject);"); } } else { if (GLOBAL_REF) { output("Fc.clazz = (*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, lpObject));"); } else { output("Fc.clazz = (*env)->GetObjectClass(env, lpObject);"); } } outputln(); List fields = clazz.getDeclaredFields(); for (JNIField field : fields) { if (ignoreField(field)) continue; output("\t"); output(simpleName); output("Fc."); output(field.getName()); if (isCPP) { output(" = env->GetFieldID("); } else { output(" = (*env)->GetFieldID(env, "); } output(simpleName); output("Fc.clazz, \""); output(field.getName()); JNIType type = field.getType(), type64 = field.getType64(); output("\", "); if (type.equals(type64)) output("\""); output(type.getTypeSignature(!type.equals(type64))); if (type.equals(type64)) output("\""); outputln(");"); } // Makes sure compiler/cpu does not reorder the following write before the previous updates are done. outputln("\thawtjni_w_barrier();"); output("\t"); output(simpleName); outputln("Fc.cached = 1;"); outputln("}"); } void generateGetFields(JNIClass clazz) { JNIClass superclazz = clazz.getSuperclass(); String clazzName = clazz.getNativeName(); String superName = superclazz.getNativeName(); String methodname; if (!superclazz.getName().equals("java.lang.Object") && hasNonIgnoredFields(superclazz)) { /* * Windows exception - cannot call get/set function of super class * in this case */ if (!(clazzName.equals(superName + "A") || clazzName.equals(superName + "W"))) { output("\tget"); output(superName); output("Fields(env, lpObject, ("); output(superName); outputln(" *)lpStruct);"); } else { generateGetFields(superclazz); } } List fields = clazz.getDeclaredFields(); int sharePtrIndex = 0; for (JNIField field : fields) { if (ignoreField(field)) continue; String conditional = field.getConditional(); if (conditional != null) { outputln("#if " + conditional); } JNIType type = field.getType(), type64 = field.getType64(); String simpleName = type.getSimpleName(); JNIFieldAccessor accessor = field.getAccessor(); boolean allowConversion = !type.equals(type64); output("\t"); if (type.isPrimitive()) { if (!accessor.isNonMemberSetter()) output("lpStruct->"); if (accessor.isMethodSetter()) { String setterStart = accessor.setter().split("\\(")[0]; output(setterStart + "("); if (accessor.isNonMemberSetter()) output("lpStruct, "); } else { output(accessor.setter()); output(" = "); } if (field.isSharedPointer()) output("std::make_shared<" + type.getTypeSignature2(allowConversion) + ">("); else output(field.getCast()); if (field.isPointer()) { output("(intptr_t)"); } if (isCPP) { output("env->Get"); } else { output("(*env)->Get"); } output(type.getTypeSignature1(!type.equals(type64))); if (isCPP) { output("Field(lpObject, "); } else { output("Field(env, lpObject, "); } output(field.getDeclaringClass().getSimpleName()); output("Fc."); output(field.getName()); if (field.isSharedPointer()) output(")"); if (accessor.isMethodSetter()) output(")"); output(");"); } else if (type.isArray()) { JNIType componentType = type.getComponentType(), componentType64 = type64.getComponentType(); if (componentType.isPrimitive()) { if (field.isSharedPointer()) { output("(&"); output("lpStruct->" + accessor); output("));"); } outputln("{"); output("\t"); output(type.getTypeSignature2(!type.equals(type64))); output(" lpObject1 = ("); output(type.getTypeSignature2(!type.equals(type64))); if (isCPP) { output(")env->GetObjectField(lpObject, "); } else { output(")(*env)->GetObjectField(env, lpObject, "); } output(field.getDeclaringClass().getSimpleName()); output("Fc."); output(field.getName()); outputln(");"); if (isCPP) { output("\tenv->Get"); } else { output("\t(*env)->Get"); } output(componentType.getTypeSignature1(!componentType.equals(componentType64))); if (isCPP) { output("ArrayRegion(lpObject1, 0, sizeof("); } else { output("ArrayRegion(env, lpObject1, 0, sizeof("); } if (!accessor.isNonMemberGetter()) output("lpStruct->"); output(accessor.getter()); output(")"); if (!componentType.isType("byte")) { output(" / sizeof("); output(componentType.getTypeSignature2(!componentType.equals(componentType64))); output(")"); } output(", ("); output(type.getTypeSignature4(!type.equals(type64), false)); output(")"); if (!accessor.isNonMemberGetter()) output("lpStruct->"); output(accessor.getter()); outputln(");"); output("\t}"); } else { throw new Error("not done"); } } else { outputln("\t{"); if (isCPP) { output("\tjobject lpObject1 = env->GetObjectField(lpObject, "); } else { output("\tjobject lpObject1 = (*env)->GetObjectField(env, lpObject, "); } output(field.getDeclaringClass().getSimpleName()); output("Fc."); output(field.getName()); outputln(");"); output("\tif (lpObject1 != NULL) get"); output(simpleName); output("Fields(env, lpObject1, &lpStruct->"); output(accessor.getter()); outputln(");"); output("\t}"); } outputln(); if (conditional != null) { outputln("#endif"); } } } void generateGetFunction(JNIClass clazz) { String clazzName = clazz.getNativeName(); String simpleName = clazz.getSimpleName(); if (clazz.getFlag(ClassFlag.STRUCT) && !clazz.getFlag(ClassFlag.TYPEDEF)) { output("struct "); } output(clazzName); output(" *get"); output(simpleName); output("Fields(JNIEnv *env, jobject lpObject, "); if (clazz.getFlag(ClassFlag.STRUCT) && !clazz.getFlag(ClassFlag.TYPEDEF)) { output("struct "); } output(clazzName); outputln(" *lpStruct)"); outputln("{"); output("\tif (!"); output(simpleName); output("Fc.cached) cache"); output(simpleName); outputln("Fields(env, lpObject);"); if (clazz.getFlag(ClassFlag.ZERO_OUT)) { outputln("memset(lpStruct, 0, sizeof(struct " + clazzName + "));"); } generateGetFields(clazz); outputln("\treturn lpStruct;"); outputln("}"); } void generateSetFields(JNIClass clazz) { JNIClass superclazz = clazz.getSuperclass(); String clazzName = clazz.getNativeName(); String superName = superclazz.getNativeName(); if (!superclazz.getName().equals("java.lang.Object") && hasNonIgnoredFields(superclazz)) { /* * Windows exception - cannot call get/set function of super class * in this case */ if (!(clazzName.equals(superName + "A") || clazzName.equals(superName + "W"))) { output("\tset"); output(superName); output("Fields(env, lpObject, ("); output(superName); outputln(" *)lpStruct);"); } else { generateSetFields(superclazz); } } List fields = clazz.getDeclaredFields(); for (JNIField field : fields) { if (ignoreField(field)) continue; String conditional = field.getConditional(); if (conditional != null) { outputln("#if " + conditional); } JNIType type = field.getType(), type64 = field.getType64(); boolean allowConversion = !type.equals(type64); String simpleName = type.getSimpleName(); JNIFieldAccessor accessor = field.getAccessor(); if (type.isPrimitive()) { if (isCPP) { output("\tenv->Set"); } else { output("\t(*env)->Set"); } output(type.getTypeSignature1(allowConversion)); if (isCPP) { output("Field(lpObject, "); } else { output("Field(env, lpObject, "); } output(field.getDeclaringClass().getSimpleName()); output("Fc."); output(field.getName()); output(", "); output("(" + type.getTypeSignature2(allowConversion) + ")"); if (field.isPointer()) { output("(intptr_t)"); } if (!accessor.isNonMemberGetter()) output("lpStruct->"); if (accessor.isMethodGetter()) { String getterStart = accessor.getter().split("\\(")[0]; output(getterStart + "("); if (accessor.isNonMemberGetter()) output("lpStruct"); if (field.isSharedPointer()) output("->" + field.getName()); output(")"); } else { output(accessor.getter()); } if (field.isSharedPointer()) { output(".get()"); } output(");"); } else if (type.isArray()) { JNIType componentType = type.getComponentType(), componentType64 = type64.getComponentType(); if (componentType.isPrimitive()) { outputln("\t{"); output("\t"); output(type.getTypeSignature2(allowConversion)); output(" lpObject1 = ("); output(type.getTypeSignature2(allowConversion)); if (isCPP) { output(")env->GetObjectField(lpObject, "); } else { output(")(*env)->GetObjectField(env, lpObject, "); } output(field.getDeclaringClass().getSimpleName()); output("Fc."); output(field.getName()); outputln(");"); if (isCPP) { output("\tenv->Set"); } else { output("\t(*env)->Set"); } output(componentType.getTypeSignature1(!componentType.equals(componentType64))); if (isCPP) { output("ArrayRegion(lpObject1, 0, sizeof("); } else { output("ArrayRegion(env, lpObject1, 0, sizeof("); } if (!accessor.isNonMemberGetter()) output("lpStruct->"); if (accessor.isMethodGetter()) { String getterStart = accessor.getter().split("\\(")[0]; output(getterStart + "("); if (accessor.isNonMemberGetter()) output("lpStruct"); output(")"); } else { output(accessor.getter()); } output(")"); if (!componentType.isType("byte")) { output(" / sizeof("); output(componentType.getTypeSignature2(!componentType.equals(componentType64))); output(")"); } output(", ("); output(type.getTypeSignature4(allowConversion, false)); output(")"); if (!accessor.isNonMemberGetter()) output("lpStruct->"); output(accessor.getter()); outputln(");"); output("\t}"); } else { throw new Error("not done"); } } else { outputln("\t{"); if (isCPP) { output("\tjobject lpObject1 = env->GetObjectField(lpObject, "); } else { output("\tjobject lpObject1 = (*env)->GetObjectField(env, lpObject, "); } output(field.getDeclaringClass().getSimpleName()); output("Fc."); output(field.getName()); outputln(");"); output("\tif (lpObject1 != NULL) set"); output(simpleName); output("Fields(env, lpObject1, &lpStruct->"); output(accessor.getter()); outputln(");"); output("\t}"); } outputln(); if (conditional != null) { outputln("#endif"); } } } void generateSetFunction(JNIClass clazz) { String clazzName = clazz.getNativeName(); String simpleName = clazz.getSimpleName(); output("void set"); output(simpleName); output("Fields(JNIEnv *env, jobject lpObject, "); if (clazz.getFlag(ClassFlag.STRUCT) && !clazz.getFlag(ClassFlag.TYPEDEF)) { output("struct "); } output(clazzName); outputln(" *lpStruct)"); outputln("{"); output("\tif (!"); output(simpleName); output("Fc.cached) cache"); output(simpleName); outputln("Fields(env, lpObject);"); generateSetFields(clazz); outputln("}"); } void generateFunctions(JNIClass clazz) { generateCacheFunction(clazz); outputln(); generateGetFunction(clazz); outputln(); generateSetFunction(clazz); } boolean ignoreField(JNIField field) { int mods = field.getModifiers(); return field.ignore() || ((mods & Modifier.FINAL) != 0) || ((mods & Modifier.STATIC) != 0); } boolean hasNonIgnoredFields(JNIClass clazz) { for (JNIField field : getStructFields(clazz)) if (!ignoreField(field)) return true; return false; } } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/model/000077500000000000000000000000001514323636100330615ustar00rootroot00000000000000JNIClass.java000077500000000000000000000021711514323636100352570ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/model/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.model; import java.util.List; import org.fusesource.hawtjni.runtime.ClassFlag; /** * * @author Hiram Chirino */ public interface JNIClass { public boolean getFlag(ClassFlag flag); public String getName(); public String getSimpleName(); public String getNativeName(); public JNIClass getSuperclass(); public List getDeclaredFields(); public List getDeclaredMethods(); public List getNativeMethods(); public boolean getGenerate(); public String getConditional(); } JNIField.java000077500000000000000000000021621514323636100352350ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/model/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.model; import org.fusesource.hawtjni.runtime.FieldFlag; /** * * @author Hiram Chirino */ public interface JNIField { public boolean getFlag(FieldFlag flag); public String getName(); public int getModifiers(); public JNIType getType(); public JNIType getType64(); public JNIClass getDeclaringClass(); public JNIFieldAccessor getAccessor(); public String getCast(); public String getConditional(); public boolean ignore(); public boolean isSharedPointer(); public boolean isPointer(); } JNIFieldAccessor.java000066400000000000000000000006031514323636100367130ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/modelpackage org.fusesource.hawtjni.generator.model; /** * @author Calin Iorgulescu */ public interface JNIFieldAccessor { public String getter(); public String setter(); public boolean isNonMemberGetter(); public boolean isNonMemberSetter(); public boolean isMethodGetter(); public boolean isMethodSetter(); } JNIMethod.java000077500000000000000000000026561514323636100354420ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/model/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.model; import java.util.List; import org.fusesource.hawtjni.runtime.ArgFlag; import org.fusesource.hawtjni.runtime.MethodFlag; /** * * @author Hiram Chirino */ public interface JNIMethod { public boolean getFlag(MethodFlag flag); public String getName(); public int getModifiers(); public boolean isNativeUnique(); public JNIType getReturnType32(); public JNIType getReturnType64(); public List getParameters(); public List getParameterTypes(); public List getParameterTypes64(); public JNIClass getDeclaringClass(); public String getAccessor(); public String getConditional(); public String getCopy(); public String[] getCallbackTypes(); public ArgFlag[][] getCallbackFlags(); public String getCast(); public boolean isPointer(); } JNIParameter.java000077500000000000000000000017401514323636100361330ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/model/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.model; import org.fusesource.hawtjni.runtime.ArgFlag; /** * * @author Hiram Chirino */ public interface JNIParameter { public boolean getFlag(ArgFlag flag); public String getCast(); public boolean isPointer(); public JNIMethod getMethod(); public int getParameter(); public JNIClass getTypeClass(); public JNIType getType32(); public JNIType getType64(); } JNIType.java000077500000000000000000000022501514323636100351310ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/model/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.model; /** * * @author Hiram Chirino */ public interface JNIType { public boolean isPrimitive(); public boolean isArray(); public JNIType getComponentType(); public boolean isType(String type); public String getName(); public String getSimpleName(); public String getNativeName(); public String getTypeSignature(boolean define); public String getTypeSignature1(boolean define); public String getTypeSignature2(boolean define); public String getTypeSignature3(boolean define); public String getTypeSignature4(boolean define, boolean struct); } ReflectClass.java000077500000000000000000000105751514323636100362320ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/model/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.model; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import org.fusesource.hawtjni.runtime.ClassFlag; import org.fusesource.hawtjni.runtime.JniClass; /** * * @author Hiram Chirino */ public class ReflectClass implements JNIClass { private Class clazz; private ArrayList fields; private ArrayList methods; private JniClass annotation; private HashSet flags; private String nativeName; public ReflectClass(Class clazz) { this.clazz = clazz; } public String toString() { return clazz.toString(); } public int hashCode() { return clazz.hashCode(); } public boolean equals(Object obj) { if (!(obj instanceof ReflectClass)) return false; return ((ReflectClass) obj).clazz.equals(clazz); } public Class getWrapedClass() { return clazz; } /////////////////////////////////////////////////////////////////// // JNIClass interface methods /////////////////////////////////////////////////////////////////// public String getName() { return clazz.getName(); } public JNIClass getSuperclass() { return new ReflectClass(clazz.getSuperclass()); } public String getSimpleName() { return clazz.getSimpleName(); } public String getNativeName() { lazyLoad(); if( nativeName!=null ) return nativeName; else return getSimpleName(); } public List getDeclaredFields() { lazyLoad(); return new ArrayList(fields); } public List getDeclaredMethods() { lazyLoad(); return new ArrayList(methods); } public List getNativeMethods() { ArrayList rc = new ArrayList(); for (JNIMethod method : getDeclaredMethods()) { if ((method.getModifiers() & Modifier.NATIVE) == 0) continue; rc.add(method); } return rc; } public String getConditional() { lazyLoad(); return annotation == null ? null : emptyFilter(annotation.conditional()); } public boolean getGenerate() { return !getFlag(ClassFlag.CLASS_SKIP); } public boolean getFlag(ClassFlag flag) { lazyLoad(); return flags.contains(flag); } /////////////////////////////////////////////////////////////////// // Helper methods /////////////////////////////////////////////////////////////////// static public String emptyFilter(String value) { if( value==null || value.length()==0 ) return null; return value; } private void lazyLoad() { if (fields != null) return; this.annotation = this.clazz.getAnnotation(JniClass.class); this.flags = new HashSet(); if( this.annotation!=null ) { this.flags.addAll(Arrays.asList(this.annotation.flags())); if( this.annotation.name().trim().length() > 0 ) { this.nativeName = this.annotation.name().trim(); } } Field[] fields = clazz.getDeclaredFields(); this.fields = new ArrayList(fields.length); for (Field field : fields) { this.fields.add(new ReflectField(this, field)); } Method[] methods = clazz.getDeclaredMethods(); this.methods = new ArrayList(methods.length); for (Method method : methods) { this.methods.add(new ReflectMethod(this, method)); } } } ReflectField.java000077500000000000000000000115661514323636100362110ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/model/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.model; import java.lang.reflect.Field; import java.util.Arrays; import java.util.HashSet; import org.apache.commons.lang.StringUtils; import org.fusesource.hawtjni.runtime.FieldFlag; import org.fusesource.hawtjni.runtime.JniField; import org.fusesource.hawtjni.runtime.T32; import static org.fusesource.hawtjni.generator.util.TextSupport.*; import static org.fusesource.hawtjni.runtime.FieldFlag.*; /** * * @author Hiram Chirino */ public class ReflectField implements JNIField { private ReflectClass parent; private Field field; private ReflectType type; private JniField annotation; private HashSet flags; private boolean allowConversion; private ReflectFieldAccessor accessor; public ReflectField(ReflectClass parent, Field field) { this.parent = parent; this.field = field; lazyLoad(); } public int hashCode() { return field.hashCode(); } public boolean equals(Object obj) { if (!(obj instanceof ReflectField)) return false; return ((ReflectField) obj).field.equals(field); } public String toString() { return field.toString(); } /////////////////////////////////////////////////////////////////// // JNIField interface methods /////////////////////////////////////////////////////////////////// public JNIClass getDeclaringClass() { return parent; } public int getModifiers() { return field.getModifiers(); } public String getName() { return field.getName(); } public JNIType getType() { return type.asType32(allowConversion); } public JNIType getType64() { return type.asType64(allowConversion); } public JNIFieldAccessor getAccessor() { return accessor; } public String getCast() { String rc = annotation == null ? "" : annotation.cast().trim(); return cast(rc); } public boolean ignore() { return getFlag(FieldFlag.FIELD_SKIP); } public boolean isPointer() { if( annotation == null ) { return false; } return getFlag(POINTER_FIELD) || ( type.getWrappedClass() == Long.TYPE && getCast().endsWith("*") ); } public boolean isSharedPointer() { if (annotation == null) { return false; } return getFlag(SHARED_PTR); } public String getConditional() { String parentConditional = getDeclaringClass().getConditional(); String myConditional = annotation == null ? null : emptyFilter(annotation.conditional()); if( parentConditional!=null ) { if( myConditional!=null ) { return parentConditional+" && "+myConditional; } else { return parentConditional; } } return myConditional; } public boolean getFlag(FieldFlag flag) { return flags.contains(flag); } /////////////////////////////////////////////////////////////////// // Helper methods /////////////////////////////////////////////////////////////////// static public String emptyFilter(String value) { if( value==null || value.length()==0 ) return null; return value; } private void lazyLoad() { this.type = new ReflectType(field.getType()); this.annotation = this.field.getAnnotation(JniField.class); this.flags = new HashSet(); this.accessor = new ReflectFieldAccessor(this.field.getName()); if( this.annotation!=null ) { this.flags.addAll(Arrays.asList(this.annotation.flags())); if (!StringUtils.isEmpty(this.annotation.accessor())) { this.accessor = new ReflectFieldAccessor(this.annotation.accessor()); } else if (!StringUtils.isEmpty(this.annotation.getter()) && !StringUtils.isEmpty(this.annotation.setter())) { this.accessor = new ReflectFieldAccessor( this.annotation.getter(), this.flags.contains(GETTER_NONMEMBER), this.annotation.setter(), this.flags.contains(SETTER_NONMEMBER)); } } allowConversion = this.field.getAnnotation(T32.class)!=null; } } ReflectFieldAccessor.java000066400000000000000000000022641514323636100376640ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/modelpackage org.fusesource.hawtjni.generator.model; /** * @author Calin Iorgulescu */ public class ReflectFieldAccessor implements JNIFieldAccessor { private String getter; private String setter; private boolean nonMemberGetter; private boolean nonMemberSetter; public ReflectFieldAccessor(String value) { this.getter = this.setter = value; this.nonMemberGetter = this.nonMemberSetter = false; } public ReflectFieldAccessor(String getter, boolean nonMemberGetter, String setter, boolean nonMemberSetter) { this.getter = getter; this.nonMemberGetter = nonMemberGetter; this.setter = setter; this.nonMemberSetter = nonMemberSetter; } public String getter() { return getter; } public String setter() { return setter; } public boolean isNonMemberGetter() { return nonMemberGetter; } public boolean isNonMemberSetter() { return nonMemberSetter; } public boolean isMethodGetter() { return getter.contains("("); } public boolean isMethodSetter() { return setter.contains("("); } } ReflectMethod.java000077500000000000000000000161551514323636100364050ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/model/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.model; import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import org.fusesource.hawtjni.runtime.ArgFlag; import org.fusesource.hawtjni.runtime.JniArg; import org.fusesource.hawtjni.runtime.JniMethod; import org.fusesource.hawtjni.runtime.MethodFlag; import org.fusesource.hawtjni.runtime.T32; import static org.fusesource.hawtjni.generator.util.TextSupport.*; import static org.fusesource.hawtjni.runtime.MethodFlag.*; /** * * @author Hiram Chirino */ public class ReflectMethod implements JNIMethod { private ReflectClass declaringClass; private Method method; private List paramTypes32; private List paramTypes64; private List parameters; private boolean unique; private JniMethod annotation; private boolean allowConversion; private ReflectType returnType; private HashSet flags; public ReflectMethod(ReflectClass declaringClass, Method method) { this.declaringClass = declaringClass; this.method = method; lazyLoad(); } public int hashCode() { return method.hashCode(); } public boolean equals(Object obj) { if (!(obj instanceof ReflectMethod)) return false; return ((ReflectMethod) obj).method.equals(method); } public String toString() { return method.toString(); } public Method getWrapedMethod() { return method; } /////////////////////////////////////////////////////////////////// // JNIMethod interface methods /////////////////////////////////////////////////////////////////// public JNIClass getDeclaringClass() { return declaringClass; } public int getModifiers() { return method.getModifiers(); } public String getName() { return method.getName(); } public List getParameters() { lazyLoad(); return parameters; } public List getParameterTypes() { lazyLoad(); return paramTypes32; } public List getParameterTypes64() { lazyLoad(); return paramTypes64; } public JNIType getReturnType32() { lazyLoad(); return returnType.asType32(allowConversion); } public JNIType getReturnType64() { lazyLoad(); return returnType.asType64(allowConversion); } public boolean getFlag(MethodFlag flag) { lazyLoad(); return flags.contains(flag); } public String getCast() { lazyLoad(); String rc = annotation == null ? "" : annotation.cast(); return cast(rc); } public boolean isPointer() { lazyLoad(); if( annotation == null ) { return false; } return getFlag(POINTER_RETURN) || ( returnType.getWrappedClass() == Long.TYPE && getCast().endsWith("*)") ); } public String getCopy() { lazyLoad(); return annotation == null ? "" : annotation.copy(); } public String getAccessor() { lazyLoad(); return annotation == null ? "" : annotation.accessor(); } public String getConditional() { lazyLoad(); String parentConditional = getDeclaringClass().getConditional(); String myConditional = annotation == null ? null : emptyFilter(annotation.conditional()); if( parentConditional!=null ) { if( myConditional!=null ) { return parentConditional+" && "+myConditional; } else { return parentConditional; } } return myConditional; } public boolean isNativeUnique() { lazyLoad(); return unique; } public String[] getCallbackTypes() { lazyLoad(); if( annotation==null ) { return new String[0]; } JniArg[] callbackArgs = annotation.callbackArgs(); String[] rc = new String[callbackArgs.length]; for (int i = 0; i < rc.length; i++) { rc[i] = callbackArgs[i].cast(); } return rc; } public ArgFlag[][] getCallbackFlags() { lazyLoad(); if( annotation==null ) { return new ArgFlag[0][]; } JniArg[] callbackArgs = annotation.callbackArgs(); ArgFlag[][] rc = new ArgFlag[callbackArgs.length][]; for (int i = 0; i < rc.length; i++) { rc[i] = callbackArgs[i].flags(); } return rc; } /////////////////////////////////////////////////////////////////// // Helper methods /////////////////////////////////////////////////////////////////// static public String emptyFilter(String value) { if( value==null || value.length()==0 ) return null; return value; } private void lazyLoad() { if( flags!=null ) { return; } this.annotation = this.method.getAnnotation(JniMethod.class); this.allowConversion = method.getAnnotation(T32.class)!=null; this.flags = new HashSet(); if( this.annotation!=null ) { this.flags.addAll(Arrays.asList(this.annotation.flags())); } Class returnType = method.getReturnType(); Class[] paramTypes = method.getParameterTypes(); this.paramTypes32 = new ArrayList(paramTypes.length); this.paramTypes64 = new ArrayList(paramTypes.length); this.parameters = new ArrayList(paramTypes.length); this.returnType = new ReflectType(returnType); Annotation[][] parameterAnnotations = method.getParameterAnnotations(); for (int i = 0; i < paramTypes.length; i++) { ReflectParameter parameter = new ReflectParameter(this, i, parameterAnnotations[i]); this.parameters.add(parameter); this.paramTypes32.add( parameter.getType32() ); this.paramTypes64.add( parameter.getType64() ); } unique = true; Class parent = ((ReflectClass)declaringClass).getWrapedClass(); String name = method.getName(); for (Method mth : parent.getDeclaredMethods() ) { if ( (mth.getModifiers()&Modifier.NATIVE) != 0 && method!=mth && !method.equals(mth) && name.equals(mth.getName())) { unique = false; break; } } } } ReflectParameter.java000077500000000000000000000055021514323636100370770ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/model/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.model; import java.lang.annotation.Annotation; import java.util.Arrays; import java.util.HashSet; import org.fusesource.hawtjni.runtime.ArgFlag; import org.fusesource.hawtjni.runtime.JniArg; import org.fusesource.hawtjni.runtime.T32; import static org.fusesource.hawtjni.generator.util.TextSupport.*; import static org.fusesource.hawtjni.runtime.ArgFlag.*; /** * * @author Hiram Chirino */ public class ReflectParameter implements JNIParameter { private ReflectMethod method; private ReflectType type; private int parameter; private JniArg annotation; private boolean allowConversion; private HashSet flags; public ReflectParameter(ReflectMethod method, int parameter, Annotation[] annotations) { this.method = method; this.parameter = parameter; this.type = new ReflectType(method.getWrapedMethod().getParameterTypes()[parameter]); this.flags = new HashSet(); if( annotations!=null ) { for (Annotation annotation : annotations) { if( annotation instanceof JniArg ) { this.annotation = (JniArg) annotation; this.flags.addAll(Arrays.asList(this.annotation.flags())); } else if( annotation instanceof T32 ) { this.allowConversion = true; } } } } public String getCast() { String rc = annotation == null ? "" : annotation.cast(); return cast(rc); } public boolean isPointer() { if( annotation == null ) { return false; } return getFlag(POINTER_ARG) || ( type.getWrappedClass() == Long.TYPE && getCast().endsWith("*)") ); } public JNIMethod getMethod() { return method; } public boolean getFlag(ArgFlag flag) { return flags.contains(flag); } public JNIType getType32() { return type.asType32(allowConversion); } public JNIType getType64() { return type.asType64(allowConversion); } public JNIClass getTypeClass() { ReflectType type = (ReflectType) getType32(); return new ReflectClass(type.getWrappedClass()); } public int getParameter() { return parameter; } } ReflectType.java000077500000000000000000000171261514323636100361050ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/model/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.model; import org.fusesource.hawtjni.runtime.JniClass; /** * * @author Hiram Chirino */ public class ReflectType implements JNIType { private Class clazz; public ReflectType(Class clazz) { this.clazz = clazz; } public int hashCode() { return clazz.hashCode(); } public boolean equals(Object obj) { if (obj == this) return true; if (!(obj instanceof ReflectType)) return false; return ((ReflectType) obj).clazz == clazz; } public Class getWrappedClass() { return clazz; } public ReflectType asType32(boolean allowConversion) { if (allowConversion) { if (clazz == long.class) return new ReflectType(int.class); else if (clazz == long[].class) return new ReflectType(int[].class); else if (clazz == double.class) return new ReflectType(float.class); else if (clazz == double[].class) return new ReflectType(float[].class); } return this; } public ReflectType asType64(boolean allowConversion) { if (allowConversion) { if (clazz == int.class) return new ReflectType(long.class); else if (clazz == int[].class) return new ReflectType(long[].class); else if (clazz == float.class) return new ReflectType(double.class); else if (clazz == float[].class) return new ReflectType(double[].class); } return this; } public JNIType getComponentType() { return new ReflectType(clazz.getComponentType()); } public String getName() { return clazz.getName(); } public String getSimpleName() { return clazz.getSimpleName(); } public String getNativeName() { JniClass annotation = clazz.getAnnotation(JniClass.class); if( annotation==null ) { return getSimpleName(); } else { String name = annotation.name().trim(); if( name.length()==0 ) { return getSimpleName(); } else { return name; } } } public String getTypeSignature(boolean define) { if (clazz == Void.TYPE) return "V"; if (clazz == Integer.TYPE) return define ? "I_J" : "I"; if (clazz == Boolean.TYPE) return "Z"; if (clazz == Long.TYPE) return define ? "J_J" : "J"; if (clazz == Short.TYPE) return "S"; if (clazz == Character.TYPE) return "C"; if (clazz == Byte.TYPE) return "B"; if (clazz == Float.TYPE) return define ? "F_D" : "F"; if (clazz == Double.TYPE) return define ? "F_D" : "D"; if (clazz == String.class) return "Ljava/lang/String;"; if (clazz.isArray()) { if (define) return getComponentType().getTypeSignature(define) + "Array"; return "[" + getComponentType().getTypeSignature(define); } return "L" + clazz.getName().replace('.', '/') + ";"; } public String getTypeSignature1(boolean define) { if (clazz == Void.TYPE) return "Void"; if (clazz == Integer.TYPE) return define ? "IntLong" : "Int"; if (clazz == Boolean.TYPE) return "Boolean"; if (clazz == Long.TYPE) return define ? "IntLong" : "Long"; if (clazz == Short.TYPE) return "Short"; if (clazz == Character.TYPE) return "Char"; if (clazz == Byte.TYPE) return "Byte"; if (clazz == Float.TYPE) return define ? "FloatDouble" : "Float"; if (clazz == Double.TYPE) return define ? "FloatDouble" : "Double"; if (clazz == String.class) return "String"; return "Object"; } public String getTypeSignature2(boolean define) { if (clazz == Void.TYPE) return "void"; if (clazz == Integer.TYPE) return define ? "jintLong" : "jint"; if (clazz == Boolean.TYPE) return "jboolean"; if (clazz == Long.TYPE) return define ? "jintLong" : "jlong"; if (clazz == Short.TYPE) return "jshort"; if (clazz == Character.TYPE) return "jchar"; if (clazz == Byte.TYPE) return "jbyte"; if (clazz == Float.TYPE) return define ? "jfloatDouble" : "jfloat"; if (clazz == Double.TYPE) return define ? "jfloatDouble" : "jdouble"; if (clazz == String.class) return "jstring"; if (clazz == Class.class) return "jclass"; if (clazz.isArray()) { return getComponentType().getTypeSignature2(define) + "Array"; } return "jobject"; } public String getTypeSignature3(boolean define) { if (clazz == Void.TYPE) return "void"; if (clazz == Integer.TYPE) return "int"; if (clazz == Boolean.TYPE) return "boolean"; if (clazz == Long.TYPE) return "long"; if (clazz == Short.TYPE) return "short"; if (clazz == Character.TYPE) return "char"; if (clazz == Byte.TYPE) return "byte"; if (clazz == Float.TYPE) return "float"; if (clazz == Double.TYPE) return "double"; if (clazz == String.class) return "String"; if (clazz.isArray()) { return getComponentType().getTypeSignature3(define) + "[]"; } return clazz.getName(); } public String getTypeSignature4(boolean define, boolean struct) { if (clazz == Void.TYPE) return "void"; if (clazz == Integer.TYPE) return define ? "jintLong" : "jint"; if (clazz == Boolean.TYPE) return "jboolean"; if (clazz == Long.TYPE) return define ? "jintLong" : "jlong"; if (clazz == Short.TYPE) return "jshort"; if (clazz == Character.TYPE) return "jchar"; if (clazz == Byte.TYPE) return "jbyte"; if (clazz == Float.TYPE) return define ? "jfloatDouble" : "jfloat"; if (clazz == Double.TYPE) return define ? "jfloatDouble" : "jdouble"; if (clazz == String.class) return "jstring"; if (clazz.isArray()) { String sig = getComponentType().getTypeSignature4(define, struct); return struct ? sig : sig + " *"; } String sig = getNativeName(); return struct ? sig : sig + " *"; } public boolean isArray() { return clazz.isArray(); } public boolean isPrimitive() { return clazz.isPrimitive(); } public boolean isType(String type) { return clazz.getName().equals(type); } } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/util/000077500000000000000000000000001514323636100327365ustar00rootroot00000000000000FileSupport.java000066400000000000000000000052661514323636100360070ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/util/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.util; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; /** * * @author Hiram Chirino */ public class FileSupport { public static boolean write(byte[] bytes, File file) throws IOException { if( !equals(bytes, file) ) { FileOutputStream out = new FileOutputStream(file); try { out.write(bytes); } finally { out.close(); } return true; } return false; } public static void copy(InputStream is, OutputStream os) throws IOException { try { byte data[] = new byte[1024*4]; int count; while( (count=is.read(data, 0, data.length))>=0 ) { os.write(data, 0, count); } } finally { close(is); close(os); } } public static boolean equals(byte[] bytes, File file) throws IOException { FileInputStream is = null; try { is = new FileInputStream(file); return equals(new ByteArrayInputStream(bytes), new BufferedInputStream(is)); } catch (FileNotFoundException e) { return false; } finally { close(is); } } public static void close(InputStream is) { try { if (is != null) is.close(); } catch (Throwable e) { } } public static void close(OutputStream ioss) { try { if (ioss != null) ioss.close(); } catch (Throwable e) { } } public static boolean equals(InputStream is1, InputStream is2) throws IOException { while (true) { int c1 = is1.read(); int c2 = is2.read(); if (c1 != c2) return false; if (c1 == -1) break; } return true; } } OptionBuilder.java000066400000000000000000000047221514323636100363060ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/util/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.util; import org.apache.commons.cli.Option; /** * a better version of org.apache.commons.cli.OptionBuilder * IDE provides nicer auto complete and less compiler warnings. * * @author Hiram Chirino */ public class OptionBuilder { private String id; private String name; private String description; private boolean required; private boolean optional; private int args =-1; private String arg; private Object type; private char sperator; public static OptionBuilder ob() { return new OptionBuilder(); } public Option op() { Option option = new Option( id!=null ? id : " ", description ); option.setLongOpt(name); option.setRequired( required ); option.setOptionalArg(optional); option.setType( type ); option.setValueSeparator(sperator); if( arg !=null && args==-1 ) { args=1; } option.setArgs(args); option.setArgName(arg); return option; } public OptionBuilder arg(String argName) { this.arg = argName; return this; } public OptionBuilder args(int args) { this.args = args; return this; } public OptionBuilder description(String description) { this.description = description; return this; } public OptionBuilder name(String lname) { this.name = lname; return this; } public OptionBuilder id(String name) { this.id = name; return this; } public OptionBuilder optional(boolean optional) { this.optional = optional; return this; } public OptionBuilder required(boolean required) { this.required = required; return this; } public OptionBuilder sperator(char sperator) { this.sperator = sperator; return this; } public OptionBuilder type(Object type) { this.type = type; return this; } }TextSupport.java000066400000000000000000000015431514323636100360460ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/java/org/fusesource/hawtjni/generator/util/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.fusesource.hawtjni.generator.util; /** * * @author Hiram Chirino */ public class TextSupport { static public String cast(String cast) { cast = cast.trim(); if (cast.length() > 0) { if (!cast.startsWith("(") || !cast.endsWith(")")) cast = "(" + cast + ")"; } return cast; } } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/resources/000077500000000000000000000000001514323636100244465ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/resources/hawtjni-callback.c000077500000000000000000000537111514323636100300220ustar00rootroot00000000000000/******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ /* == HEADER-SNIP-LOCATION == */ #include "hawtjni.h" #include #include /* define this to print out debug statements */ /* #define DEBUG_CALL_PRINTS */ /* --------------- callback globals ----------------- */ #if defined (_WIN32) || defined (_WIN32_WCE) #include "windows.h" #define RETURN_TYPE LRESULT CALLBACK #define RETURN_CAST (LRESULT) #endif #ifndef RETURN_TYPE #define RETURN_TYPE jintLong #endif #ifndef RETURN_CAST #define RETURN_CAST #endif /* * Note that only x86 assembler is supported */ #if !(defined(__i386__) || defined(_M_IX86) || defined(_X86_)) #undef USE_ASSEMBLER #endif #ifdef REDUCED_CALLBACKS #define MAX_CALLBACKS 16 #else #ifdef USE_ASSEMBLER #define MAX_CALLBACKS 256 #else #define MAX_CALLBACKS 128 #endif #endif /* REDUCED_CALLBACKS */ #define MAX_ARGS 12 typedef struct CALLBACK_DATA { jobject callback; jmethodID methodID; jobject object; jboolean isStatic; jboolean isArrayBased; jint argCount; jlong errorResult; } CALLBACK_DATA; static JavaVM *jvm = NULL; static CALLBACK_DATA callbackData[MAX_CALLBACKS]; static int callbackEnabled = 1; static int callbackEntryCount = 0; static int initialized = 0; static jint JNI_VERSION = 0; #ifdef DEBUG_CALL_PRINTS static int counter = 0; #endif #ifdef ATOMIC #include #define ATOMIC_INC(value) OSAtomicIncrement32(&value); #define ATOMIC_DEC(value) OSAtomicDecrement32(&value); #else #define ATOMIC_INC(value) value++; #define ATOMIC_DEC(value) value--; #endif jintLong callback(int index, ...); #ifdef USE_ASSEMBLER #if !(defined (_WIN32) || defined (_WIN32_WCE)) #include #endif static unsigned char *callbackCode = NULL; #define CALLBACK_THUNK_SIZE 64 #else /* ------------- Start: class Callback impl --------------- */ /* Function name from index and number of arguments */ #define FN(index, args) fn##index##_##args /** * Functions templates * * NOTE: If the maximum number of arguments changes (MAX_ARGS), the number * of function templates has to change accordingly. */ /* Function template with no arguments */ #define FN_0(index) RETURN_TYPE FN(index, 0)() { return RETURN_CAST callback(index); } /* Function template with 1 argument */ #define FN_1(index) RETURN_TYPE FN(index, 1)(jintLong p1) { return RETURN_CAST callback(index, p1); } /* Function template with 2 arguments */ #define FN_2(index) RETURN_TYPE FN(index, 2)(jintLong p1, jintLong p2) { return RETURN_CAST callback(index, p1, p2); } /* Function template with 3 arguments */ #define FN_3(index) RETURN_TYPE FN(index, 3)(jintLong p1, jintLong p2, jintLong p3) { return RETURN_CAST callback(index, p1, p2, p3); } /* Function template with 4 arguments */ #define FN_4(index) RETURN_TYPE FN(index, 4)(jintLong p1, jintLong p2, jintLong p3, jintLong p4) { return RETURN_CAST callback(index, p1, p2, p3, p4); } /* Function template with 5 arguments */ #define FN_5(index) RETURN_TYPE FN(index, 5)(jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5); } /* Function template with 6 arguments */ #define FN_6(index) RETURN_TYPE FN(index, 6)(jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6); } /* Function template with 7 arguments */ #define FN_7(index) RETURN_TYPE FN(index, 7)(jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6, jintLong p7) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6, p7); } /* Function template with 8 arguments */ #define FN_8(index) RETURN_TYPE FN(index, 8)(jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6, jintLong p7, jintLong p8) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6, p7, p8); } /* Function template with 9 arguments */ #define FN_9(index) RETURN_TYPE FN(index, 9)(jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6, jintLong p7, jintLong p8, jintLong p9) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6, p7, p8, p9); } /* Function template with 10 arguments */ #define FN_10(index) RETURN_TYPE FN(index, 10) (jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6, jintLong p7, jintLong p8, jintLong p9, jintLong p10) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } /* Function template with 11 arguments */ #define FN_11(index) RETURN_TYPE FN(index, 11) (jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6, jintLong p7, jintLong p8, jintLong p9, jintLong p10, jintLong p11) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } /* Function template with 12 arguments */ #define FN_12(index) RETURN_TYPE FN(index, 12) (jintLong p1, jintLong p2, jintLong p3, jintLong p4, jintLong p5, jintLong p6, jintLong p7, jintLong p8, jintLong p9, jintLong p10, jintLong p11, jintLong p12) { return RETURN_CAST callback(index, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } /** * Define all functions with the specified number of arguments. * * NOTE: If the maximum number of callbacks changes (MAX_CALLBACKS), * this macro has to be updated. */ #if MAX_CALLBACKS == 16 #define FN_BLOCK(args) \ FN_##args(0) \ FN_##args(1) \ FN_##args(2) \ FN_##args(3) \ FN_##args(4) \ FN_##args(5) \ FN_##args(6) \ FN_##args(7) \ FN_##args(8) \ FN_##args(9) \ FN_##args(10) \ FN_##args(11) \ FN_##args(12) \ FN_##args(13) \ FN_##args(14) \ FN_##args(15) #elif MAX_CALLBACKS == 128 #define FN_BLOCK(args) \ FN_##args(0) \ FN_##args(1) \ FN_##args(2) \ FN_##args(3) \ FN_##args(4) \ FN_##args(5) \ FN_##args(6) \ FN_##args(7) \ FN_##args(8) \ FN_##args(9) \ FN_##args(10) \ FN_##args(11) \ FN_##args(12) \ FN_##args(13) \ FN_##args(14) \ FN_##args(15) \ FN_##args(16) \ FN_##args(17) \ FN_##args(18) \ FN_##args(19) \ FN_##args(20) \ FN_##args(21) \ FN_##args(22) \ FN_##args(23) \ FN_##args(24) \ FN_##args(25) \ FN_##args(26) \ FN_##args(27) \ FN_##args(28) \ FN_##args(29) \ FN_##args(30) \ FN_##args(31) \ FN_##args(32) \ FN_##args(33) \ FN_##args(34) \ FN_##args(35) \ FN_##args(36) \ FN_##args(37) \ FN_##args(38) \ FN_##args(39) \ FN_##args(40) \ FN_##args(41) \ FN_##args(42) \ FN_##args(43) \ FN_##args(44) \ FN_##args(45) \ FN_##args(46) \ FN_##args(47) \ FN_##args(48) \ FN_##args(49) \ FN_##args(50) \ FN_##args(51) \ FN_##args(52) \ FN_##args(53) \ FN_##args(54) \ FN_##args(55) \ FN_##args(56) \ FN_##args(57) \ FN_##args(58) \ FN_##args(59) \ FN_##args(60) \ FN_##args(61) \ FN_##args(62) \ FN_##args(63) \ FN_##args(64) \ FN_##args(65) \ FN_##args(66) \ FN_##args(67) \ FN_##args(68) \ FN_##args(69) \ FN_##args(70) \ FN_##args(71) \ FN_##args(72) \ FN_##args(73) \ FN_##args(74) \ FN_##args(75) \ FN_##args(76) \ FN_##args(77) \ FN_##args(78) \ FN_##args(79) \ FN_##args(80) \ FN_##args(81) \ FN_##args(82) \ FN_##args(83) \ FN_##args(84) \ FN_##args(85) \ FN_##args(86) \ FN_##args(87) \ FN_##args(88) \ FN_##args(89) \ FN_##args(90) \ FN_##args(91) \ FN_##args(92) \ FN_##args(93) \ FN_##args(94) \ FN_##args(95) \ FN_##args(96) \ FN_##args(97) \ FN_##args(98) \ FN_##args(99) \ FN_##args(100) \ FN_##args(101) \ FN_##args(102) \ FN_##args(103) \ FN_##args(104) \ FN_##args(105) \ FN_##args(106) \ FN_##args(107) \ FN_##args(108) \ FN_##args(109) \ FN_##args(110) \ FN_##args(111) \ FN_##args(112) \ FN_##args(113) \ FN_##args(114) \ FN_##args(115) \ FN_##args(116) \ FN_##args(117) \ FN_##args(118) \ FN_##args(119) \ FN_##args(120) \ FN_##args(121) \ FN_##args(122) \ FN_##args(123) \ FN_##args(124) \ FN_##args(125) \ FN_##args(126) \ FN_##args(127) #else #error Invalid MAX_CALLBACKS #endif /* MAX_CALLBACKS == 16 */ /** * Define all callback functions. * * NOTE: If the maximum number of arguments changes (MAX_ARGS), the following * has to change accordinglly. */ FN_BLOCK(0) FN_BLOCK(1) FN_BLOCK(2) FN_BLOCK(3) FN_BLOCK(4) FN_BLOCK(5) FN_BLOCK(6) FN_BLOCK(7) FN_BLOCK(8) FN_BLOCK(9) FN_BLOCK(10) FN_BLOCK(11) FN_BLOCK(12) /** * Initialize the function pointers for the callback routines. * * NOTE: If MAX_ARGS or MAX_CALLBACKS changes, the following has to be updated. */ #if MAX_CALLBACKS == 16 #define FN_A_BLOCK(args) { \ (jintLong)FN(0, args), \ (jintLong)FN(1, args), \ (jintLong)FN(2, args), \ (jintLong)FN(3, args), \ (jintLong)FN(4, args), \ (jintLong)FN(5, args), \ (jintLong)FN(6, args), \ (jintLong)FN(7, args), \ (jintLong)FN(8, args), \ (jintLong)FN(9, args), \ (jintLong)FN(10, args), \ (jintLong)FN(11, args), \ (jintLong)FN(12, args), \ (jintLong)FN(13, args), \ (jintLong)FN(14, args), \ (jintLong)FN(15, args), \ }, #elif MAX_CALLBACKS == 128 #define FN_A_BLOCK(args) { \ (jintLong)FN(0, args), \ (jintLong)FN(1, args), \ (jintLong)FN(2, args), \ (jintLong)FN(3, args), \ (jintLong)FN(4, args), \ (jintLong)FN(5, args), \ (jintLong)FN(6, args), \ (jintLong)FN(7, args), \ (jintLong)FN(8, args), \ (jintLong)FN(9, args), \ (jintLong)FN(10, args), \ (jintLong)FN(11, args), \ (jintLong)FN(12, args), \ (jintLong)FN(13, args), \ (jintLong)FN(14, args), \ (jintLong)FN(15, args), \ (jintLong)FN(16, args), \ (jintLong)FN(17, args), \ (jintLong)FN(18, args), \ (jintLong)FN(19, args), \ (jintLong)FN(20, args), \ (jintLong)FN(21, args), \ (jintLong)FN(22, args), \ (jintLong)FN(23, args), \ (jintLong)FN(24, args), \ (jintLong)FN(25, args), \ (jintLong)FN(26, args), \ (jintLong)FN(27, args), \ (jintLong)FN(28, args), \ (jintLong)FN(29, args), \ (jintLong)FN(30, args), \ (jintLong)FN(31, args), \ (jintLong)FN(32, args), \ (jintLong)FN(33, args), \ (jintLong)FN(34, args), \ (jintLong)FN(35, args), \ (jintLong)FN(36, args), \ (jintLong)FN(37, args), \ (jintLong)FN(38, args), \ (jintLong)FN(39, args), \ (jintLong)FN(40, args), \ (jintLong)FN(41, args), \ (jintLong)FN(42, args), \ (jintLong)FN(43, args), \ (jintLong)FN(44, args), \ (jintLong)FN(45, args), \ (jintLong)FN(46, args), \ (jintLong)FN(47, args), \ (jintLong)FN(48, args), \ (jintLong)FN(49, args), \ (jintLong)FN(50, args), \ (jintLong)FN(51, args), \ (jintLong)FN(52, args), \ (jintLong)FN(53, args), \ (jintLong)FN(54, args), \ (jintLong)FN(55, args), \ (jintLong)FN(56, args), \ (jintLong)FN(57, args), \ (jintLong)FN(58, args), \ (jintLong)FN(59, args), \ (jintLong)FN(60, args), \ (jintLong)FN(61, args), \ (jintLong)FN(62, args), \ (jintLong)FN(63, args), \ (jintLong)FN(64, args), \ (jintLong)FN(65, args), \ (jintLong)FN(66, args), \ (jintLong)FN(67, args), \ (jintLong)FN(68, args), \ (jintLong)FN(69, args), \ (jintLong)FN(70, args), \ (jintLong)FN(71, args), \ (jintLong)FN(72, args), \ (jintLong)FN(73, args), \ (jintLong)FN(74, args), \ (jintLong)FN(75, args), \ (jintLong)FN(76, args), \ (jintLong)FN(77, args), \ (jintLong)FN(78, args), \ (jintLong)FN(79, args), \ (jintLong)FN(80, args), \ (jintLong)FN(81, args), \ (jintLong)FN(82, args), \ (jintLong)FN(83, args), \ (jintLong)FN(84, args), \ (jintLong)FN(85, args), \ (jintLong)FN(86, args), \ (jintLong)FN(87, args), \ (jintLong)FN(88, args), \ (jintLong)FN(89, args), \ (jintLong)FN(90, args), \ (jintLong)FN(91, args), \ (jintLong)FN(92, args), \ (jintLong)FN(93, args), \ (jintLong)FN(94, args), \ (jintLong)FN(95, args), \ (jintLong)FN(96, args), \ (jintLong)FN(97, args), \ (jintLong)FN(98, args), \ (jintLong)FN(99, args), \ (jintLong)FN(100, args), \ (jintLong)FN(101, args), \ (jintLong)FN(102, args), \ (jintLong)FN(103, args), \ (jintLong)FN(104, args), \ (jintLong)FN(105, args), \ (jintLong)FN(106, args), \ (jintLong)FN(107, args), \ (jintLong)FN(108, args), \ (jintLong)FN(109, args), \ (jintLong)FN(110, args), \ (jintLong)FN(111, args), \ (jintLong)FN(112, args), \ (jintLong)FN(113, args), \ (jintLong)FN(114, args), \ (jintLong)FN(115, args), \ (jintLong)FN(116, args), \ (jintLong)FN(117, args), \ (jintLong)FN(118, args), \ (jintLong)FN(119, args), \ (jintLong)FN(120, args), \ (jintLong)FN(121, args), \ (jintLong)FN(122, args), \ (jintLong)FN(123, args), \ (jintLong)FN(124, args), \ (jintLong)FN(125, args), \ (jintLong)FN(126, args), \ (jintLong)FN(127, args), \ }, #else #error Invalid MAX_CALLBACKS #endif /* MAX_CALLBACKS == 16 */ jintLong fnx_array[MAX_ARGS+1][MAX_CALLBACKS] = { FN_A_BLOCK(0) FN_A_BLOCK(1) FN_A_BLOCK(2) FN_A_BLOCK(3) FN_A_BLOCK(4) FN_A_BLOCK(5) FN_A_BLOCK(6) FN_A_BLOCK(7) FN_A_BLOCK(8) FN_A_BLOCK(9) FN_A_BLOCK(10) FN_A_BLOCK(11) FN_A_BLOCK(12) }; #endif /* USE_ASSEMBLER */ /* --------------- class Callback Native Methods --------------- */ JNIEXPORT jlong JNICALL Java_org_fusesource_hawtjni_runtime_Callback_bind (JNIEnv *env, jclass that, jobject callbackObject, jobject object, jstring method, jstring signature, jint argCount, jboolean isStatic, jboolean isArrayBased, jlong errorResult) { int i; jmethodID mid = NULL; jclass javaClass = that; const char *methodString = NULL, *sigString = NULL; if (jvm == NULL) (*env)->GetJavaVM(env, &jvm); if (JNI_VERSION == 0) JNI_VERSION = (*env)->GetVersion(env); if (!initialized) { memset(&callbackData, 0, sizeof(callbackData)); initialized = 1; } if (method) methodString = (const char *) (*env)->GetStringUTFChars(env, method, NULL); if (signature) sigString = (const char *) (*env)->GetStringUTFChars(env, signature, NULL); if (object && methodString && sigString) { if (isStatic) { mid = (*env)->GetStaticMethodID(env, object, methodString, sigString); } else { javaClass = (*env)->GetObjectClass(env, object); mid = (*env)->GetMethodID(env, javaClass, methodString, sigString); } } if (method && methodString) (*env)->ReleaseStringUTFChars(env, method, methodString); if (signature && sigString) (*env)->ReleaseStringUTFChars(env, signature, sigString); if (mid == 0) goto fail; for (i=0; iNewGlobalRef(env, callbackObject)) == NULL) goto fail; if ((callbackData[i].object = (*env)->NewGlobalRef(env, object)) == NULL) goto fail; callbackData[i].isStatic = isStatic; callbackData[i].isArrayBased = isArrayBased; callbackData[i].argCount = argCount; callbackData[i].errorResult = errorResult; callbackData[i].methodID = mid; #ifndef USE_ASSEMBLER return (jintLong) fnx_array[argCount][i]; #else { int j = 0, k; unsigned char* code; #ifdef __APPLE__ int pad = 0; #endif if (callbackCode == NULL) { #if defined (_WIN32) || defined (_WIN32_WCE) callbackCode = VirtualAlloc(NULL, CALLBACK_THUNK_SIZE * MAX_CALLBACKS, MEM_COMMIT, PAGE_EXECUTE_READWRITE); if (callbackCode == NULL) return 0; #else callbackCode = mmap(NULL, CALLBACK_THUNK_SIZE * MAX_CALLBACKS, PROT_EXEC | PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); if (callbackCode == MAP_FAILED) return 0; #endif } code = (unsigned char *)(callbackCode + (i * CALLBACK_THUNK_SIZE)); //PUSH EBP - 1 byte code[j++] = 0x55; //MOV EBP,ESP - 2 bytes code[j++] = 0x8b; code[j++] = 0xec; #ifdef __APPLE__ /* darwin calling conventions require that the stack be aligned on a 16-byte boundary. */ k = (argCount+3)*sizeof(jintLong); pad = ((k + 15) & ~15) - k; if (pad > 0) { //SUB ESP,pad - 3 bytes code[j++] = 0x83; code[j++] = 0xec; code[j++] = pad; } #endif // 3*argCount bytes for (k=(argCount + 1) * sizeof(jintLong); k >= sizeof(jintLong)*2; k -= sizeof(jintLong)) { //PUSH SS:[EBP+k] code[j++] = 0xff; code[j++] = 0x75; code[j++] = k; } if (i > 127) { //PUSH i - 5 bytes code[j++] = 0x68; code[j++] = ((i >> 0) & 0xFF); code[j++] = ((i >> 8) & 0xFF); code[j++] = ((i >> 16) & 0xFF); code[j++] = ((i >> 24) & 0xFF); } else { //PUSH i - 2 bytes code[j++] = 0x6a; code[j++] = i; } //MOV EAX callback - 1 + sizeof(jintLong) bytes code[j++] = 0xb8; ((jintLong *)&code[j])[0] = (jintLong)&callback; j += sizeof(jintLong); //CALL EAX - 2 bytes code[j++] = 0xff; code[j++] = 0xd0; //ADD ESP,(argCount + 1) * sizeof(jintLong) - 3 bytes code[j++] = 0x83; code[j++] = 0xc4; #ifdef __APPLE__ code[j++] = (unsigned char)(pad + ((argCount + 1) * sizeof(jintLong))); #else code[j++] = (unsigned char)((argCount + 1) * sizeof(jintLong)); #endif //POP EBP - 1 byte code[j++] = 0x5d; #if defined (_WIN32) || defined (_WIN32_WCE) //RETN argCount * sizeof(jintLong) - 3 bytes code[j++] = 0xc2; code[j++] = (unsigned char)(argCount * sizeof(jintLong)); code[j++] = 0x00; #else //RETN - 1 byte code[j++] = 0xc3; #endif if (j > CALLBACK_THUNK_SIZE) { jclass errorClass = (*env)->FindClass(env, "java/lang/Error"); (*env)->ThrowNew(env, errorClass, "Callback thunk overflow"); } return (jintLong)code; } #endif /* USE_ASSEMBLER */ } } fail: return 0; } JNIEXPORT void JNICALL Java_org_fusesource_hawtjni_runtime_Callback_unbind (JNIEnv *env, jclass that, jobject callback) { int i; for (i=0; iIsSameObject(env, callback, callbackData[i].callback)) { if (callbackData[i].callback != NULL) (*env)->DeleteGlobalRef(env, callbackData[i].callback); if (callbackData[i].object != NULL) (*env)->DeleteGlobalRef(env, callbackData[i].object); memset(&callbackData[i], 0, sizeof(CALLBACK_DATA)); } } } JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_Callback_getEnabled (JNIEnv *env, jclass that) { return (jboolean)callbackEnabled; } JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_Callback_getEntryCount (JNIEnv *env, jclass that) { return (jint)callbackEntryCount; } JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_Callback_setEnabled (JNIEnv *env, jclass that, jboolean enable) { callbackEnabled = enable; } JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_Callback_reset (JNIEnv *env, jclass that) { memset((void *)&callbackData, 0, sizeof(callbackData)); } jintLong callback(int index, ...) { if (!callbackEnabled) return 0; { JNIEnv *env = NULL; jmethodID mid = callbackData[index].methodID; jobject object = callbackData[index].object; jboolean isStatic = callbackData[index].isStatic; jboolean isArrayBased = callbackData[index].isArrayBased; jint argCount = callbackData[index].argCount; jlong result = callbackData[index].errorResult; int detach = 0; va_list vl; #ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback starting %d\n", counter++); #endif #ifdef JNI_VERSION_1_2 if (IS_JNI_1_2) { (*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_2); } #endif #ifdef JNI_VERSION_1_4 if (env == NULL) { if (JNI_VERSION >= JNI_VERSION_1_4) { (*jvm)->AttachCurrentThreadAsDaemon(jvm, (void **)&env, NULL); } } #endif if (env == NULL) { (*jvm)->AttachCurrentThread(jvm, (void **)&env, NULL); if (IS_JNI_1_2) detach = 1; } /* If the current thread is not attached to the VM, it is not possible to call into the VM */ if (env == NULL) { #ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* could not get env\n"); #endif goto noEnv; } /* If an exception has occurred in previous callbacks do not call into the VM. */ if ((*env)->ExceptionOccurred(env)) { goto done; } /* Call into the VM. */ ATOMIC_INC(callbackEntryCount); va_start(vl, index); if (isArrayBased) { int i; jintLongArray argsArray = (*env)->NewIntLongArray(env, argCount); if (argsArray != NULL) { jintLong *elements = (*env)->GetIntLongArrayElements(env, argsArray, NULL); if (elements != NULL) { for (i=0; iReleaseIntLongArrayElements(env, argsArray, elements, 0); if (isStatic) { result = (*env)->CallStaticIntLongMethod(env, object, mid, argsArray); } else { result = (*env)->CallIntLongMethod(env, object, mid, argsArray); } } /* * This function may be called many times before returning to Java, * explicitly delete local references to avoid GP's in certain VMs. */ (*env)->DeleteLocalRef(env, argsArray); } } else { if (isStatic) { result = (*env)->CallStaticIntLongMethodV(env, object, mid, vl); } else { result = (*env)->CallIntLongMethodV(env, object, mid, vl); } } va_end(vl); ATOMIC_DEC(callbackEntryCount); done: /* If an exception has occurred in Java, return the error result. */ if ((*env)->ExceptionOccurred(env)) { #ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* java exception occurred\n"); (*env)->ExceptionDescribe(env); #endif result = callbackData[index].errorResult; } if (detach) { (*jvm)->DetachCurrentThread(jvm); env = NULL; } noEnv: #ifdef DEBUG_CALL_PRINTS fprintf(stderr, "* callback exiting %d\n", --counter); #endif return result; } } /* ------------- END: class Callback impl --------------- */ jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/resources/hawtjni.c000077500000000000000000000102201514323636100262540ustar00rootroot00000000000000/******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ /* == HEADER-SNIP-LOCATION == */ #include "hawtjni.h" #include #include #include int IS_JNI_1_2 = 0; #ifdef HAVE_PTHREAD_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef JNI_VERSION_1_2 JavaVM *JVM; #ifdef HAVE_PTHREAD_H pthread_key_t JNI_ATTACH_THREAD_LOCAL_KEY; #endif jint hawtjni_attach_thread(JNIEnv **env, const char *thread_name) { JavaVMAttachArgs args; args.version = JNI_VERSION_1_2; args.name = (char *)thread_name; args.group = 0; #ifdef HAVE_PTHREAD_H if( JNI_ATTACH_THREAD_LOCAL_KEY ) { *env = pthread_getspecific(JNI_ATTACH_THREAD_LOCAL_KEY); if( ! *env ) { if( (*JVM)->AttachCurrentThread(JVM, (void**)env, &args)==0 ) { pthread_setspecific(JNI_ATTACH_THREAD_LOCAL_KEY, *env); } else { return -1; } } return 0; } else { return (*JVM)->AttachCurrentThread(JVM, (void**)env, &args); } #else return (*JVM)->AttachCurrentThread(JVM, (void**)env, &args); #endif } jint hawtjni_detach_thread() { #ifdef HAVE_PTHREAD_H if( JNI_ATTACH_THREAD_LOCAL_KEY ) { // Don't actually detach.. that will automatically // happen when the the thread dies. return 0; } else { return (*JVM)->DetachCurrentThread(JVM); } #else return (*JVM)->DetachCurrentThread(JVM); #endif } #ifdef HAVE_PTHREAD_H void hawtjni_thread_cleanup(void *data) { if( data ) { (*JVM)->DetachCurrentThread(JVM); pthread_setspecific(JNI_ATTACH_THREAD_LOCAL_KEY, 0); } } #endif JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { IS_JNI_1_2 = 1; JVM = vm; #ifdef HAVE_PTHREAD_H if( pthread_key_create(&JNI_ATTACH_THREAD_LOCAL_KEY, hawtjni_thread_cleanup) ) { JNI_ATTACH_THREAD_LOCAL_KEY = 0; } #endif return JNI_VERSION_1_2; } #endif void throwOutOfMemory(JNIEnv *env) { jclass clazz = (*env)->FindClass(env, "java/lang/OutOfMemoryError"); if (clazz != NULL) { (*env)->ThrowNew(env, clazz, ""); } } #ifndef JNI64 void **hawtjni_malloc_pointer_array(JNIEnv *env, jlongArray array) { int i, size; jlong *elems; void **rc; if( array==NULL ) { return NULL; } #ifdef JNI_VERSION_1_2 if (IS_JNI_1_2) { elems = (*env)->GetPrimitiveArrayCritical(env, array, NULL); } else #endif { elems = (*env)->GetLongArrayElements(env, array, NULL); } if( elems == NULL) { return NULL; } size = (*env)->GetArrayLength(env, array); rc=malloc(sizeof(void *)*(size+1)); if( rc!= NULL ) { for( i=0; i < size; i++ ) { rc[i]=(void *)(intptr_t)(elems[i]); } rc[size]=NULL; } #ifdef JNI_VERSION_1_2 if (IS_JNI_1_2) { (*env)->ReleasePrimitiveArrayCritical(env, array, elems, JNI_ABORT); } else #endif { (*env)->ReleaseLongArrayElements(env, array, elems, JNI_ABORT); } return rc; } void hawtjni_free_pointer_array(JNIEnv *env, jlongArray array, void **elems, jint mode) { // do we need to copy back the data?? if( mode != JNI_ABORT) { int i, size; jlong *tmp; size = (*env)->GetArrayLength(env, array); #ifdef JNI_VERSION_1_2 if (IS_JNI_1_2) { tmp = (*env)->GetPrimitiveArrayCritical(env, array, NULL); } else #endif { tmp = (*env)->GetLongArrayElements(env, array, NULL); } if( tmp != NULL) { for( i=0; i < size; i++ ) { tmp[i]=(intptr_t)elems[i]; } #ifdef JNI_VERSION_1_2 if (IS_JNI_1_2) { (*env)->ReleasePrimitiveArrayCritical(env, array, tmp, 0); } else #endif { (*env)->ReleaseLongArrayElements(env, array, tmp, 0); } } } /* mode != JNI_ABORTmode */ free(elems); } #endif /* JNI64 */ jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/resources/hawtjni.h000077500000000000000000000133001514323636100262630ustar00rootroot00000000000000/******************************************************************************* * Copyright (c) 2000, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ /* == HEADER-SNIP-LOCATION == */ /** * hawtjni.h * * This file contains the global macro declarations for a hawtjni based * library. * */ #ifndef INC_HAWTJNI_H #define INC_HAWTJNI_H #define _MULTI_THREADED #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "jni.h" #include #ifdef __cplusplus extern "C" { #endif extern int IS_JNI_1_2; #ifndef JNI64 #if defined(_LP64) #define JNI64 #endif #endif /* 64 bit support */ #ifndef JNI64 /* int/long defines */ #define GetIntLongField GetIntField #define SetIntLongField SetIntField #define GetIntLongArrayElements GetIntArrayElements #define ReleaseIntLongArrayElements ReleaseIntArrayElements #define GetIntLongArrayRegion GetIntArrayRegion #define SetIntLongArrayRegion SetIntArrayRegion #define NewIntLongArray NewIntArray #define CallStaticIntLongMethod CallStaticIntMethod #define CallIntLongMethod CallIntMethod #define CallStaticIntLongMethodV CallStaticIntMethodV #define CallIntLongMethodV CallIntMethodV #define jintLongArray jintArray #define jintLong jint #define I_J "I" #define I_JArray "[I" /* float/double defines */ #define GetFloatDoubleField GetFloatField #define SetFloatDoubleField SetFloatField #define GetFloatDoubleArrayElements GetFloatArrayElements #define ReleaseFloatDoubleArrayElements ReleaseFloatArrayElements #define GetFloatDoubleArrayRegion GetFloatArrayRegion #define jfloatDoubleArray jfloatArray #define jfloatDouble jfloat #define F_D "F" #define F_DArray "[F" #else /* int/long defines */ #define GetIntLongField GetLongField #define SetIntLongField SetLongField #define GetIntLongArrayElements GetLongArrayElements #define ReleaseIntLongArrayElements ReleaseLongArrayElements #define GetIntLongArrayRegion GetLongArrayRegion #define SetIntLongArrayRegion SetLongArrayRegion #define NewIntLongArray NewLongArray #define CallStaticIntLongMethod CallStaticLongMethod #define CallIntLongMethod CallLongMethod #define CallStaticIntLongMethodV CallStaticLongMethodV #define CallIntLongMethodV CallLongMethodV #define jintLongArray jlongArray #define jintLong jlong #define I_J "J" #define I_JArray "[J" /* float/double defines */ #define GetFloatDoubleField GetDoubleField #define SetFloatDoubleField SetDoubleField #define GetFloatDoubleArrayElements GetDoubleArrayElements #define ReleaseFloatDoubleArrayElements ReleaseDoubleArrayElements #define GetFloatDoubleArrayRegion GetDoubleArrayRegion #define jfloatDoubleArray jdoubleArray #define jfloatDouble jdouble #define F_D "D" #define F_DArray "[D" #endif #ifdef __APPLE__ #define CALLING_CONVENTION #define LOAD_FUNCTION(var, name) \ static int initialized = 0; \ static void *var = NULL; \ if (!initialized) { \ CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR(name##_LIB)); \ if (bundle) var = CFBundleGetFunctionPointerForName(bundle, CFSTR(#name)); \ initialized = 1; \ } #elif defined (_WIN32) || defined (_WIN32_WCE) #define CALLING_CONVENTION CALLBACK #define LOAD_FUNCTION(var, name) \ static int initialized = 0; \ static FARPROC var = NULL; \ if (!initialized) { \ HMODULE hm = LoadLibrary(name##_LIB); \ if (hm) var = GetProcAddress(hm, #name); \ initialized = 1; \ } #else #define CALLING_CONVENTION #define LOAD_FUNCTION(var, name) \ static int initialized = 0; \ static void *var = NULL; \ if (!initialized) { \ void* handle = dlopen(name##_LIB, RTLD_LAZY); \ if (handle) var = dlsym(handle, #name); \ initialized = 1; \ } #endif #ifdef JNI_VERSION_1_2 extern JavaVM *JVM; jint hawtjni_attach_thread(JNIEnv **env, const char *thread_name); jint hawtjni_detach_thread(); #endif void throwOutOfMemory(JNIEnv *env); #define CHECK_NULL_VOID(ptr) \ if ((ptr) == NULL) { \ throwOutOfMemory(env); \ return; \ } #define CHECK_NULL(ptr) \ if ((ptr) == NULL) { \ throwOutOfMemory(env); \ return 0; \ } #ifndef JNI64 void ** hawtjni_malloc_pointer_array(JNIEnv *env, jlongArray array); void hawtjni_free_pointer_array(JNIEnv *env, jlongArray array, void **elems, jint mode); #else #ifdef __cplusplus #define hawtjni_malloc_pointer_array(env, array) ( (void **)(intptr_t)env->GetLongArrayElements(array, NULL) ) #define hawtjni_free_pointer_array(env, array, elems, mode) ( env->ReleaseLongArrayElements(array, (jlong*)elems, mode) ) #else #define hawtjni_malloc_pointer_array(env, source) ( (void **)(intptr_t)(*env)->GetLongArrayElements(env, source, NULL) ) #define hawtjni_free_pointer_array(env, array, elems, mode) ( (*env)->ReleaseLongArrayElements(env, array, (jlong*)elems, mode) ) #endif #endif /* JNI64 */ #ifdef __GNUC__ #define hawtjni_w_barrier() __sync_synchronize() #elif defined(SOLARIS2) && SOLARIS2 >= 10 #include #define hawtjni_w_barrier() __machine_w_barrier() #elif defined(__APPLE__) #include #define hawtjni_w_barrier() OSMemoryBarrier() #elif defined(_WIN32) || defined(_WIN64) #include #define hawtjni_w_barrier() _mm_sfence(); _WriteBarrier() #else #pragma message ( "Don't know how to do a memory barrier on this platform" ) #define hawtjni_w_barrier() #endif void hawtjni_atomic_set(jlong *target, jlong value); jlong hawtjni_atomic_get(jlong *target); #ifdef __cplusplus } #endif #endif /* ifndef INC_HAWTJNI_H */ jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/resources/windows/000077500000000000000000000000001514323636100261405ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-generator/src/main/resources/windows/stdint.h000066400000000000000000000170601514323636100276220ustar00rootroot00000000000000// ISO C9x compliant stdint.h for Microsoft Visual Studio // Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 // // Copyright (c) 2006-2008 Alexander Chemeris // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // 3. The name of the author may be used to endorse or promote products // derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // /////////////////////////////////////////////////////////////////////////////// #ifndef _MSC_VER // [ #error "Use this header only with Microsoft Visual C++ compilers!" #endif // _MSC_VER ] #ifndef _MSC_STDINT_H_ // [ #define _MSC_STDINT_H_ #if _MSC_VER > 1000 #pragma once #endif #include // For Visual Studio 6 in C++ mode and for many Visual Studio versions when // compiling for ARM we should wrap include with 'extern "C++" {}' // or compiler give many errors like this: // error C2733: second C linkage of overloaded function 'wmemchr' not allowed #ifdef __cplusplus extern "C" { #endif # include #ifdef __cplusplus } #endif // Define _W64 macros to mark types changing their size, like intptr_t. #ifndef _W64 # if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 # define _W64 __w64 # else # define _W64 # endif #endif // 7.18.1 Integer types // 7.18.1.1 Exact-width integer types // Visual Studio 6 and Embedded Visual C++ 4 doesn't // realize that, e.g. char has the same size as __int8 // so we give up on __intX for them. #if (_MSC_VER < 1300) typedef signed char int8_t; typedef signed short int16_t; typedef signed int int32_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else typedef signed __int8 int8_t; typedef signed __int16 int16_t; typedef signed __int32 int32_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; #endif typedef signed __int64 int64_t; typedef unsigned __int64 uint64_t; // 7.18.1.2 Minimum-width integer types typedef int8_t int_least8_t; typedef int16_t int_least16_t; typedef int32_t int_least32_t; typedef int64_t int_least64_t; typedef uint8_t uint_least8_t; typedef uint16_t uint_least16_t; typedef uint32_t uint_least32_t; typedef uint64_t uint_least64_t; // 7.18.1.3 Fastest minimum-width integer types typedef int8_t int_fast8_t; typedef int16_t int_fast16_t; typedef int32_t int_fast32_t; typedef int64_t int_fast64_t; typedef uint8_t uint_fast8_t; typedef uint16_t uint_fast16_t; typedef uint32_t uint_fast32_t; typedef uint64_t uint_fast64_t; // 7.18.1.4 Integer types capable of holding object pointers #ifdef _WIN64 // [ typedef signed __int64 intptr_t; typedef unsigned __int64 uintptr_t; #else // _WIN64 ][ typedef _W64 signed int intptr_t; typedef _W64 unsigned int uintptr_t; #endif // _WIN64 ] // 7.18.1.5 Greatest-width integer types typedef int64_t intmax_t; typedef uint64_t uintmax_t; // 7.18.2 Limits of specified-width integer types #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 // 7.18.2.1 Limits of exact-width integer types #define INT8_MIN ((int8_t)_I8_MIN) #define INT8_MAX _I8_MAX #define INT16_MIN ((int16_t)_I16_MIN) #define INT16_MAX _I16_MAX #define INT32_MIN ((int32_t)_I32_MIN) #define INT32_MAX _I32_MAX #define INT64_MIN ((int64_t)_I64_MIN) #define INT64_MAX _I64_MAX #define UINT8_MAX _UI8_MAX #define UINT16_MAX _UI16_MAX #define UINT32_MAX _UI32_MAX #define UINT64_MAX _UI64_MAX // 7.18.2.2 Limits of minimum-width integer types #define INT_LEAST8_MIN INT8_MIN #define INT_LEAST8_MAX INT8_MAX #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST16_MAX INT16_MAX #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST32_MAX INT32_MAX #define INT_LEAST64_MIN INT64_MIN #define INT_LEAST64_MAX INT64_MAX #define UINT_LEAST8_MAX UINT8_MAX #define UINT_LEAST16_MAX UINT16_MAX #define UINT_LEAST32_MAX UINT32_MAX #define UINT_LEAST64_MAX UINT64_MAX // 7.18.2.3 Limits of fastest minimum-width integer types #define INT_FAST8_MIN INT8_MIN #define INT_FAST8_MAX INT8_MAX #define INT_FAST16_MIN INT16_MIN #define INT_FAST16_MAX INT16_MAX #define INT_FAST32_MIN INT32_MIN #define INT_FAST32_MAX INT32_MAX #define INT_FAST64_MIN INT64_MIN #define INT_FAST64_MAX INT64_MAX #define UINT_FAST8_MAX UINT8_MAX #define UINT_FAST16_MAX UINT16_MAX #define UINT_FAST32_MAX UINT32_MAX #define UINT_FAST64_MAX UINT64_MAX // 7.18.2.4 Limits of integer types capable of holding object pointers #ifdef _WIN64 // [ # define INTPTR_MIN INT64_MIN # define INTPTR_MAX INT64_MAX # define UINTPTR_MAX UINT64_MAX #else // _WIN64 ][ # define INTPTR_MIN INT32_MIN # define INTPTR_MAX INT32_MAX # define UINTPTR_MAX UINT32_MAX #endif // _WIN64 ] // 7.18.2.5 Limits of greatest-width integer types #define INTMAX_MIN INT64_MIN #define INTMAX_MAX INT64_MAX #define UINTMAX_MAX UINT64_MAX // 7.18.3 Limits of other integer types #ifdef _WIN64 // [ # define PTRDIFF_MIN _I64_MIN # define PTRDIFF_MAX _I64_MAX #else // _WIN64 ][ # define PTRDIFF_MIN _I32_MIN # define PTRDIFF_MAX _I32_MAX #endif // _WIN64 ] #define SIG_ATOMIC_MIN INT_MIN #define SIG_ATOMIC_MAX INT_MAX #ifndef SIZE_MAX // [ # ifdef _WIN64 // [ # define SIZE_MAX _UI64_MAX # else // _WIN64 ][ # define SIZE_MAX _UI32_MAX # endif // _WIN64 ] #endif // SIZE_MAX ] // WCHAR_MIN and WCHAR_MAX are also defined in #ifndef WCHAR_MIN // [ # define WCHAR_MIN 0 #endif // WCHAR_MIN ] #ifndef WCHAR_MAX // [ # define WCHAR_MAX _UI16_MAX #endif // WCHAR_MAX ] #define WINT_MIN 0 #define WINT_MAX _UI16_MAX #endif // __STDC_LIMIT_MACROS ] // 7.18.4 Limits of other integer types #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 // 7.18.4.1 Macros for minimum-width integer constants #define INT8_C(val) val##i8 #define INT16_C(val) val##i16 #define INT32_C(val) val##i32 #define INT64_C(val) val##i64 #define UINT8_C(val) val##ui8 #define UINT16_C(val) val##ui16 #define UINT32_C(val) val##ui32 #define UINT64_C(val) val##ui64 // 7.18.4.2 Macros for greatest-width integer constants #define INTMAX_C INT64_C #define UINTMAX_C UINT64_C #endif // __STDC_CONSTANT_MACROS ] #endif // _MSC_STDINT_H_ ] jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/000077500000000000000000000000001514323636100213355ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/pom.xml000066400000000000000000000133461514323636100226610ustar00rootroot00000000000000 4.0.0 org.fusesource.hawtjni hawtjni-project 1.18 hawtjni-maven-plugin maven-plugin HawtJNI Maven Plugin Use HawtJNI from a maven plugin ${mavenVersion} 3.6.3 ${project.version} org.fusesource.hawtjni hawtjni-generator ${project.version} org.apache.maven maven-plugin-api ${mavenVersion} org.apache.maven maven-project 2.0.11 org.codehaus.plexus plexus-utils 3.3.0 org.codehaus.plexus plexus-interpolation 1.26 org.apache.maven maven-artifact-manager 2.0.11 org.apache.maven maven-artifact 2.0.11 org.apache.maven maven-archiver 2.4 org.codehaus.plexus plexus-archiver 4.2.2 org.codehaus.plexus plexus-container-default org.codehaus.plexus plexus-component-api org.codehaus.plexus plexus-io 3.2.0 org.codehaus.plexus plexus-container-default org.codehaus.plexus plexus-component-api org.apache.maven.plugin-tools maven-plugin-annotations 3.6.0 provided org.apache.maven.plugins maven-plugin-plugin 3.6.0 org.apache.maven.plugins maven-plugin-plugin default-descriptor process-classes help-goal helpmojo org.apache.maven.plugins maven-plugin-plugin jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/000077500000000000000000000000001514323636100221245ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/000077500000000000000000000000001514323636100230505ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/java/000077500000000000000000000000001514323636100237715ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/java/org/000077500000000000000000000000001514323636100245605ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/java/org/fusesource/000077500000000000000000000000001514323636100267435ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/000077500000000000000000000000001514323636100304075ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/000077500000000000000000000000001514323636100315155ustar00rootroot00000000000000BuildMojo.java000066400000000000000000000420451514323636100341720ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/** * Copyright (C) 2009-2011 FuseSource Corp. * http://fusesource.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.fusesource.hawtjni.maven; import java.io.*; import java.net.URL; import java.util.List; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.model.Dependency; import org.apache.maven.model.Resource; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.archiver.UnArchiver; import org.codehaus.plexus.archiver.manager.ArchiverManager; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.cli.CommandLineException; import org.fusesource.hawtjni.runtime.Library; /** * This goal builds the JNI module which was previously * generated with the generate goal. It adds the JNI module * to the test resource path so that unit tests can load * the freshly built JNI library. * * @author Hiram Chirino */ @Mojo(name = "build", defaultPhase = LifecyclePhase.GENERATE_TEST_RESOURCES) public class BuildMojo extends AbstractMojo { /** * The maven project. */ @Parameter(defaultValue = "${project}", readonly = true) protected MavenProject project; /** * Remote repositories */ @Parameter(defaultValue = "${project.remoteArtifactRepositories}", readonly = true) protected List remoteArtifactRepositories; /** * Local maven repository. */ @Parameter(defaultValue = "${localRepository}", readonly = true) protected ArtifactRepository localRepository; /** * Artifact factory, needed to download the package source file */ @Component protected ArtifactFactory artifactFactory; /** * Artifact resolver, needed to download the package source file */ @Component protected ArtifactResolver artifactResolver; /** */ @Component private ArchiverManager archiverManager; /** * The base name of the library, used to determine generated file names. */ @Parameter(defaultValue = "${project.artifactId}") private String name; /** * Where the unpacked build package is located. */ @Parameter(defaultValue = "${project.build.directory}/generated-sources/hawtjni/native-package") private File packageDirectory; /** * The output directory where the built JNI library will placed. This directory will be added * to as a test resource path so that unit tests can verify the built JNI library. * * The library will placed under the META-INF/native/${platform} directory that the HawtJNI * Library uses to find JNI libraries as classpath resources. */ @Parameter(defaultValue = "${project.build.directory}/generated-sources/hawtjni/lib") private File libDirectory; /** * The directory where the build will be produced. It creates a native-build and native-dist directory * under the specified directory. */ @Parameter(defaultValue = "${project.build.directory}") private File buildDirectory; /** * Should we skip executing the autogen.sh file. */ @Parameter(defaultValue = "${skip-autogen}") private boolean skipAutogen; /** * Should we force executing the autogen.sh file. */ @Parameter(defaultValue = "${force-autogen}") private boolean forceAutogen; /** * Extra arguments you want to pass to the autogen.sh command. */ @Parameter private List autogenArgs; /** * Should we skip executing the configure command. */ @Parameter(defaultValue = "${skip-configure}") private boolean skipConfigure; /** * Should we force executing the configure command. */ @Parameter(defaultValue = "${force-configure}") private boolean forceConfigure; /** * Should we display all the native build output? */ @Parameter(defaultValue = "${hawtjni-verbose}") private boolean verbose; /** * Extra arguments you want to pass to the configure command. */ @Parameter private List configureArgs; /** * The platform identifier of this build. If not specified, * it will be automatically detected. */ @Parameter private String platform; /** * The classifier of the package archive that will be created. */ @Parameter(defaultValue = "native-src") private String sourceClassifier; /** * If the source build could not be fully generated, perhaps the autotools * were not available on this platform, should we attempt to download * a previously deployed source package and build that? */ @Parameter(defaultValue = "true") private boolean downloadSourcePackage = true; /** * The dependency to download to get the native sources. */ @Parameter private Dependency nativeSrcDependency; /** * URL to where we can down the source package */ @Parameter(defaultValue = "${native-src-url}") private String nativeSrcUrl; /** * The build tool to use on Windows systems. Set * to 'msbuild', 'vcbuild', or 'detect' */ @Parameter(defaultValue = "detect") private String windowsBuildTool; /** * The name of the msbuild/vcbuild project to use. * Defaults to 'vs2010' for 'msbuild' * and 'vs2008' for 'vcbuild'. */ @Parameter private String windowsProjectName; private final CLI cli = new CLI(); public void execute() throws MojoExecutionException { cli.verbose = verbose; cli.log = getLog(); try { File buildDir = new File(buildDirectory, "native-build"); buildDir.mkdirs(); if ( CLI.IS_WINDOWS ) { vsBasedBuild(buildDir); } else { configureBasedBuild(buildDir); } getLog().info("Adding test resource root: "+libDirectory.getAbsolutePath()); Resource testResource = new Resource(); testResource.setDirectory(libDirectory.getAbsolutePath()); this.project.addTestResource(testResource); //(); } catch (Exception e) { throw new MojoExecutionException("build failed: "+e, e); } } private void vsBasedBuild(File buildDir) throws CommandLineException, MojoExecutionException, IOException { FileUtils.copyDirectoryStructureIfModified(packageDirectory, buildDir); Library library = new Library(name); String libPlatform = this.platform != null ? this.platform : Library.getPlatform(); String platform; String configuration="release"; if( "windows32".equals(libPlatform) ) { platform = "Win32"; } else if( "windows64".equals(libPlatform) ) { platform = "x64"; } else { throw new MojoExecutionException("Unsupported platform: "+libPlatform); } boolean useMSBuild = false; String tool = windowsBuildTool.toLowerCase().trim(); if( "detect".equals(tool) ) { String toolset = System.getenv("PlatformToolset"); if( "Windows7.1SDK".equals(toolset) ) { useMSBuild = true; } else { String vcinstalldir = System.getenv("VCINSTALLDIR"); if( vcinstalldir!=null ) { if( vcinstalldir.contains("Microsoft Visual Studio 10") || vcinstalldir.contains("Microsoft Visual Studio 11") || vcinstalldir.contains("Microsoft Visual Studio 12") || vcinstalldir.contains("Microsoft Visual Studio 14") || vcinstalldir.contains("Microsoft Visual Studio\\2017") ) { useMSBuild = true; } } } } else if( "msbuild".equals(tool) ) { useMSBuild = true; } else if( "vcbuild".equals(tool) ) { useMSBuild = false; } else { throw new MojoExecutionException("Invalid setting for windowsBuildTool: "+windowsBuildTool); } if( useMSBuild ) { // vcbuild was removed.. use the msbuild tool instead. int rc = cli.system(buildDir, new String[]{"msbuild", (windowsProjectName != null ? windowsProjectName : "vs2010") + ".vcxproj", "/property:Platform="+platform, "/property:Configuration="+configuration}); if( rc != 0 ) { throw new MojoExecutionException("vcbuild failed with exit code: "+rc); } } else { // try to use a vcbuild.. int rc = cli.system(buildDir, new String[]{"vcbuild", "/platform:"+platform, (windowsProjectName != null ? windowsProjectName : "vs2008") + ".vcproj", configuration}); if( rc != 0 ) { throw new MojoExecutionException("vcbuild failed with exit code: "+rc); } } File libFile=FileUtils.resolveFile(buildDir, "target/"+platform+"-"+configuration+"/lib/"+library.getLibraryFileName()); if( !libFile.exists() ) { throw new MojoExecutionException("vcbuild did not generate: "+libFile); } File target=FileUtils.resolveFile(libDirectory, library.getPlatformSpecificResourcePath(libPlatform)); FileUtils.copyFile(libFile, target); } private void configureBasedBuild(File buildDir) throws IOException, MojoExecutionException, CommandLineException { File configure = new File(packageDirectory, "configure"); if( configure.exists() ) { FileUtils.copyDirectoryStructureIfModified(packageDirectory, buildDir); } else if (downloadSourcePackage) { downloadNativeSourcePackage(buildDir); } else { if( !buildDir.exists() ) { throw new MojoExecutionException("The configure script is missing from the generated native source package and downloadSourcePackage is disabled: "+configure); } } configure = new File(buildDir, "configure"); File autogen = new File(buildDir, "autogen.sh"); File makefile = new File(buildDir, "Makefile"); File distDirectory = new File(buildDir, "target"); File distLibDirectory = new File(distDirectory, "lib"); distLibDirectory.mkdirs(); if( autogen.exists() && !skipAutogen ) { if( (!configure.exists() && !CLI.IS_WINDOWS) || forceAutogen ) { cli.setExecutable(autogen); int rc = cli.system(buildDir, new String[] {"./autogen.sh"}, autogenArgs); if( rc != 0 ) { throw new MojoExecutionException("./autogen.sh failed with exit code: "+rc); } } } if( configure.exists() && !skipConfigure ) { if( !makefile.exists() || forceConfigure ) { File autotools = new File(buildDir, "autotools"); File[] listFiles = autotools.listFiles(); if( listFiles!=null ) { for (File file : listFiles) { cli.setExecutable(file); } } cli.setExecutable(configure); int rc = cli.system(buildDir, new String[]{"./configure", "--disable-ccache", "--prefix="+distDirectory.getCanonicalPath(), "--libdir="+distDirectory.getCanonicalPath()+"/lib"}, configureArgs); if( rc != 0 ) { throw new MojoExecutionException("./configure failed with exit code: "+rc); } } } int rc = cli.system(buildDir, new String[]{"make", "install"}); if( rc != 0 ) { throw new MojoExecutionException("make based build failed with exit code: "+rc); } Library library = new Library(name); File libFile = new File(distLibDirectory, library.getLibraryFileName()); if( !libFile.exists() ) { throw new MojoExecutionException("Make based build did not generate: "+libFile); } if( platform == null ) { platform = library.getPlatform(); } File target=FileUtils.resolveFile(libDirectory, library.getPlatformSpecificResourcePath(platform)); FileUtils.copyFile(libFile, target); } public void downloadNativeSourcePackage(File buildDir) throws MojoExecutionException { File packageZipFile; if( nativeSrcUrl ==null || nativeSrcUrl.trim().length()==0 ) { Artifact artifact=null; if( nativeSrcDependency==null ) { artifact = artifactFactory.createArtifactWithClassifier(project.getGroupId(), project.getArtifactId(), project.getVersion(), "zip", sourceClassifier); } else { artifact = artifactFactory.createArtifactWithClassifier(nativeSrcDependency.getGroupId(), nativeSrcDependency.getArtifactId(), nativeSrcDependency.getVersion(), nativeSrcDependency.getType(), nativeSrcDependency.getClassifier()); } try { artifactResolver.resolveAlways(artifact, remoteArtifactRepositories, localRepository); } catch (ArtifactResolutionException e) { throw new MojoExecutionException("Error downloading.", e); } catch (ArtifactNotFoundException e) { throw new MojoExecutionException("Requested download does not exist.", e); } packageZipFile = artifact.getFile(); if( packageZipFile.isDirectory() ) { // Yep. looks like we are running on mvn 3, seem like // mvn 3 does not actually download the artifact. it just points us // to our own build. throw new MojoExecutionException("Add a '-Dnative-src-url=file:...' to have maven download the native package"); } } else { try { packageZipFile = new File(buildDirectory, "native-build.zip"); URL url = new URL(nativeSrcUrl.trim()); InputStream is = url.openStream(); try { FileOutputStream os = new FileOutputStream(packageZipFile); try { IOUtil.copy(is, os); } finally { IOUtil.close(is); } } finally { IOUtil.close(is); } } catch (Exception e) { throw new MojoExecutionException("Error downloading: "+ nativeSrcUrl, e); } } try { File dest = new File(buildDirectory, "native-build-extracted"); getLog().info("Extracting "+packageZipFile+" to "+dest); UnArchiver unArchiver = archiverManager.getUnArchiver("zip"); unArchiver.setSourceFile(packageZipFile); unArchiver.extract("", dest); File source = findSourceRoot(dest); if( source==null ) { throw new MojoExecutionException("Extracted package did not look like it contained a native source build."); } FileUtils.copyDirectoryStructureIfModified(source, buildDir); } catch (MojoExecutionException e) { throw e; } catch (Throwable e) { throw new MojoExecutionException("Could not extract the native source package.", e); } } private File findSourceRoot(File dest) { if(dest.isDirectory()) { if( new File(dest, "configure").exists() ) { return dest; } else { for (File file : dest.listFiles()) { File root = findSourceRoot(file); if( root!=null ) { return root; } } return null; } } else { return null; } } } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/CLI.java000077500000000000000000000064431514323636100330010ustar00rootroot00000000000000package org.fusesource.hawtjni.maven; import java.io.File; import java.util.List; import java.util.regex.Pattern; import org.apache.maven.plugin.logging.Log; import org.codehaus.plexus.util.cli.CommandLineException; import org.codehaus.plexus.util.cli.CommandLineUtils; import org.codehaus.plexus.util.cli.Commandline; import org.codehaus.plexus.util.cli.StreamConsumer; import org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer; public class CLI { public static final boolean IS_WINDOWS = isWindows(); static private boolean isWindows() { String name = System.getProperty("os.name").toLowerCase().trim(); return name.startsWith("win"); } public boolean verbose; public Log log; public void setExecutable(File path) { if( IS_WINDOWS ) { return; } try { // These are Java 1.6 Methods.. if( !path.canExecute() ) { path.setExecutable(true); } } catch (NoSuchMethodError e1) { // Do it the old fasioned way... try { system(path.getParentFile(), new String[] { "chmod", "a+x", path.getCanonicalPath() }); } catch (Throwable e2) { } } } public int system(File wd, String[] command) throws CommandLineException { return system(wd, command, null); } public int system(File wd, String[] command, List args) throws CommandLineException { Commandline cli = new Commandline(); cli.setWorkingDirectory(wd); for (String c : command) { cli.createArg().setValue(c); } if( args!=null ) { for (String arg : args) { cli.createArg().setValue(arg); } } log.info("executing: "+cli); StreamConsumer consumer = new StreamConsumer() { public void consumeLine(String line) { log.info(line); } }; if( !verbose ) { consumer = new StringStreamConsumer(); } int rc = CommandLineUtils.executeCommandLine(cli, null, consumer, consumer); if( rc!=0 ) { if( !verbose ) { // We only display output if the command fails.. String output = ((StringStreamConsumer)consumer).getOutput(); if( output.length()>0 ) { String nl = System.getProperty( "line.separator"); String[] lines = output.split(Pattern.quote(nl)); for (String line : lines) { log.info(line); } } } log.info("rc: "+rc); } else { if( !verbose ) { String output = ((StringStreamConsumer)consumer).getOutput(); if( output.length()>0 ) { String nl = System.getProperty( "line.separator"); String[] lines = output.split(Pattern.quote(nl)); for (String line : lines) { log.debug(line); } } } log.debug("rc: "+rc); } return rc; } } GenerateMojo.java000066400000000000000000000372071514323636100346710ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/** * Copyright (C) 2009-2011 FuseSource Corp. * http://fusesource.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.fusesource.hawtjni.maven; import java.io.File; import java.io.IOException; import java.io.Reader; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.interpolation.InterpolatorFilterReader; import org.codehaus.plexus.interpolation.MapBasedValueSource; import org.codehaus.plexus.interpolation.StringSearchInterpolator; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.FileUtils.FilterWrapper; import org.fusesource.hawtjni.generator.HawtJNI; import org.fusesource.hawtjni.generator.ProgressMonitor; /** * This goal generates the native source code and a * autoconf/msbuild based build system needed to * build a JNI library for any HawtJNI annotated * classes in your maven project. * * @author Hiram Chirino */ @Mojo(name = "generate", defaultPhase = LifecyclePhase.PROCESS_CLASSES) public class GenerateMojo extends AbstractMojo { /** * The maven project. */ @Parameter(defaultValue = "${project}", readonly = true) protected MavenProject project; /** * The directory where the native source files are located. */ @Parameter private File nativeSourceDirectory; /** * The directory where the generated native source files are located. */ @Parameter(defaultValue = "${project.build.directory}/generated-sources/hawtjni/native-src") private File generatedNativeSourceDirectory; /** * The base name of the library, used to determine generated file names. */ @Parameter(defaultValue = "${project.artifactId}") private String name; /** * The copyright header template that will be added to the generated source files. * Use the '%END_YEAR%' token to have it replaced with the current year. */ @Parameter(defaultValue = "") private String copyright; /** * Restrict looking for JNI classes to the specified package. */ @Parameter private List packages = new ArrayList(); /** * The directory where the java classes files are located. */ @Parameter(defaultValue = "${project.build.outputDirectory}") private File classesDirectory; /** * The directory where the generated build package is located.. */ @Parameter(defaultValue = "${project.build.directory}/generated-sources/hawtjni/native-package") private File packageDirectory; /** * The list of additional files to be included in the package will be * placed. */ @Parameter(defaultValue = "${basedir}/src/main/native-package") private File customPackageDirectory; /** * The text encoding of the files. */ @Parameter(defaultValue = "UTF-8") private String encoding; /** * Should we skip executing the autogen.sh file. */ @Parameter(defaultValue = "${skip-autogen}") private boolean skipAutogen; /** * Should we force executing the autogen.sh file. */ @Parameter(defaultValue = "${force-autogen}") private boolean forceAutogen; /** * Should we display all the native build output? */ @Parameter(defaultValue = "${hawtjni-verbose}") private boolean verbose; /** * Extra arguments you want to pass to the autogen.sh command. */ @Parameter private List autogenArgs; /** * Set this value to false to disable the callback support in HawtJNI. * Disabling callback support can substantially reduce the size * of the generated native library. */ @Parameter(defaultValue = "true") private boolean callbacks; /** * The build tool to use on Windows systems. Set * to 'msbuild', 'vcbuild', or 'detect' or 'none' */ @Parameter(defaultValue = "detect") private String windowsBuildTool; /** * The name of the msbuild/vcbuild project to use. * Defaults to 'vs2010' for 'msbuild' * and 'vs2008' for 'vcbuild'. */ @Parameter private String windowsProjectName; /** * Set this value to true to include the import of a custom properties file in your vcxproj (not applicable * to vs2008). This greatly simplifies the configurability of your project. */ @Parameter(defaultValue = "false") private boolean windowsCustomProps; /** * The tools version used in the header of your vcxproj (not applicable to vs2008). */ @Parameter(defaultValue = "4.0") private String windowsToolsVersion; /** * The target platform version used in your vcxproj (not applicable to vs2008). * Not supplied by default. */ @Parameter private String windowsTargetPlatformVersion; /** * The platform toolset version used in your vcxproj (not applicable to vs2008). * Not supplied by default. */ @Parameter private String windowsPlatformToolset; private File targetSrcDir; private CLI cli = new CLI(); public void execute() throws MojoExecutionException { cli.verbose = verbose; cli.log = getLog(); if (nativeSourceDirectory == null) { generateNativeSourceFiles(); } else { copyNativeSourceFiles(); } generateBuildSystem(); } private void copyNativeSourceFiles() throws MojoExecutionException { try { FileUtils.copyDirectory(nativeSourceDirectory, generatedNativeSourceDirectory); } catch (Exception e) { throw new MojoExecutionException("Copy of Native source failed: "+e, e); } } private void generateNativeSourceFiles() throws MojoExecutionException { HawtJNI generator = new HawtJNI(); generator.setClasspaths(getClasspath()); generator.setName(name); generator.setCopyright(copyright); generator.setNativeOutput(generatedNativeSourceDirectory); generator.setPackages(packages); generator.setCallbacks(callbacks); generator.setProgress(new ProgressMonitor() { public void step() { } public void setTotal(int total) { } public void setMessage(String message) { getLog().info(message); } }); try { generator.generate(); } catch (Exception e) { throw new MojoExecutionException("Native source code generation failed: "+e, e); } } private void generateBuildSystem() throws MojoExecutionException { try { packageDirectory.mkdirs(); new File(packageDirectory, "m4").mkdirs(); targetSrcDir = new File(packageDirectory, "src"); targetSrcDir.mkdirs(); if( customPackageDirectory!=null && customPackageDirectory.isDirectory() ) { FileUtils.copyDirectoryStructureIfModified(customPackageDirectory, packageDirectory); } if( generatedNativeSourceDirectory!=null && generatedNativeSourceDirectory.isDirectory() ) { FileUtils.copyDirectoryStructureIfModified(generatedNativeSourceDirectory, targetSrcDir); } copyTemplateResource("readme.md", false); copyTemplateResource("configure.ac", true); copyTemplateResource("Makefile.am", true); copyTemplateResource("m4/custom.m4", false); copyTemplateResource("m4/jni.m4", false); copyTemplateResource("m4/osx-universal.m4", false); // To support windows based builds.. String tool = windowsBuildTool.toLowerCase().trim(); if( "detect".equals(tool) ) { copyTemplateResource("vs2008.vcproj", (windowsProjectName != null ? windowsProjectName : "vs2008") + ".vcproj", true); copyTemplateResource("vs2010.vcxproj", (windowsProjectName != null ? windowsProjectName : "vs2010") + ".vcxproj", true); if (windowsCustomProps) { copyTemplateResource("vs2010.custom.props", (windowsProjectName != null ? windowsProjectName : "vs2010") + ".custom.props", true); } } else if( "msbuild".equals(tool) ) { copyTemplateResource("vs2010.vcxproj", (windowsProjectName != null ? windowsProjectName : "vs2010") + ".vcxproj", true); if (windowsCustomProps) { copyTemplateResource("vs2010.custom.props", (windowsProjectName != null ? windowsProjectName : "vs2010") + ".custom.props", true); } } else if( "vcbuild".equals(tool) ) { copyTemplateResource("vs2008.vcproj", (windowsProjectName != null ? windowsProjectName : "vs2008") + ".vcproj", true); } else if( "none".equals(tool) ) { } else { throw new MojoExecutionException("Invalid setting for windowsBuildTool: "+windowsBuildTool); } File autogen = new File(packageDirectory, "autogen.sh"); File configure = new File(packageDirectory, "configure"); if( !autogen.exists() ) { copyTemplateResource("autogen.sh", false); cli.setExecutable(autogen); } if( !skipAutogen ) { if( (!configure.exists() && !CLI.IS_WINDOWS) || forceAutogen ) { try { cli.system(packageDirectory, new String[] {"./autogen.sh"}, autogenArgs); } catch (Exception e) { e.printStackTrace(); } } } } catch (Exception e) { throw new MojoExecutionException("Native build system generation failed: "+e, e); } } @SuppressWarnings("unchecked") private ArrayList getClasspath() throws MojoExecutionException { ArrayList artifacts = new ArrayList(); try { artifacts.add(classesDirectory.getCanonicalPath()); for (Artifact artifact : (Set) project.getArtifacts()) { File file = artifact.getFile(); getLog().debug("Including: " + file); artifacts.add(file.getCanonicalPath()); } } catch (IOException e) { throw new MojoExecutionException("Could not determine project classath.", e); } return artifacts; } private void copyTemplateResource(String file, boolean filter) throws MojoExecutionException { copyTemplateResource(file, file, filter); } private void copyTemplateResource(String file, String output, boolean filter) throws MojoExecutionException { try { File target = FileUtils.resolveFile(packageDirectory, output); if( target.isFile() && target.canRead() ) { return; } URL source = getClass().getClassLoader().getResource("project-template/" + file); File tmp = FileUtils.createTempFile("tmp", "txt", new File(project.getBuild().getDirectory())); try { FileUtils.copyURLToFile(source, tmp); FileUtils.copyFile(tmp, target, encoding, filters(filter), true); } finally { tmp.delete(); } } catch (IOException e) { throw new MojoExecutionException("Could not extract template resource: "+file, e); } } @SuppressWarnings("unchecked") private FilterWrapper[] filters(boolean filter) throws IOException { if( !filter ) { return new FilterWrapper[0]; } final String startExp = "@"; final String endExp = "@"; final String escapeString = "\\"; final Map values = new HashMap(); values.put("PROJECT_NAME", name); values.put("PROJECT_NAME_UNDER_SCORE", name.replaceAll("\\W", "_")); values.put("VERSION", project.getVersion()); List cpp_files = new ArrayList(); cpp_files.addAll(FileUtils.getFileNames(targetSrcDir, "**/*.cpp", null, false)); cpp_files.addAll(FileUtils.getFileNames(targetSrcDir, "**/*.cxx", null, false)); List files = new ArrayList(); files.addAll(cpp_files); files.addAll(FileUtils.getFileNames(targetSrcDir, "**/*.c", null, false)); files.addAll(FileUtils.getFileNames(targetSrcDir, "**/*.m", null, false)); String sources = ""; String xml_sources = ""; String vs10_sources = ""; boolean first = true; for (String f : files) { if( !first ) { sources += "\\\n"; } else { values.put("FIRST_SOURCE_FILE", "src/"+f.replace('\\', '/')); first=false; } sources += " src/"+f; xml_sources+=" \n"; vs10_sources+=" \n"; //VS adds trailing space and eases compares } if( cpp_files.isEmpty() ) { values.put("AC_PROG_CHECKS", "AC_PROG_CC"); } else { values.put("AC_PROG_CHECKS", "AC_PROG_CXX"); } values.put("PROJECT_SOURCES", sources); values.put("PROJECT_XML_SOURCES", xml_sources); values.put("PROJECT_VS10_SOURCES", vs10_sources); values.put("CUSTOM_PROPS", windowsCustomProps ? "" : ""); values.put("TOOLS_VERSION", windowsToolsVersion); values.put("TARGET_PLATFORM_VERSION", windowsTargetPlatformVersion != null ? "" + windowsTargetPlatformVersion + "" : ""); values.put("PLATFORM_TOOLSET", windowsPlatformToolset != null ? "" + windowsPlatformToolset + "" : ""); FileUtils.FilterWrapper wrapper = new FileUtils.FilterWrapper() { public Reader getReader(Reader reader) { StringSearchInterpolator propertiesInterpolator = new StringSearchInterpolator(startExp, endExp); propertiesInterpolator.addValueSource(new MapBasedValueSource(values)); propertiesInterpolator.setEscapeString(escapeString); InterpolatorFilterReader interpolatorFilterReader = new InterpolatorFilterReader(reader, propertiesInterpolator, startExp, endExp); interpolatorFilterReader.setInterpolateWithPrefixPattern(false); return interpolatorFilterReader; } }; return new FilterWrapper[] { wrapper }; } } PackageJarMojo.java000066400000000000000000000210171514323636100351170ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/** * Copyright (C) 2009-2011 FuseSource Corp. * http://fusesource.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.fusesource.hawtjni.maven; import java.io.File; import java.util.List; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectHelper; import org.codehaus.plexus.archiver.jar.JarArchiver; import org.codehaus.plexus.archiver.jar.Manifest; import org.codehaus.plexus.archiver.jar.Manifest.Attribute; import org.codehaus.plexus.archiver.manager.ArchiverManager; import org.fusesource.hawtjni.runtime.Library; /** * This goal allows allows you to package the JNI library created by build goal * in a JAR which the HawtJNI runtime can unpack when the library needs to be * loaded. * * This platform specific jar is attached with a classifier which matches the * current platform. * * @author Hiram Chirino */ @Mojo(name = "package-jar", defaultPhase = LifecyclePhase.PREPARE_PACKAGE) public class PackageJarMojo extends AbstractMojo { /** * The maven project. */ @Parameter(defaultValue = "${project}", readonly = true) protected MavenProject project; /** * The base name of the library, used to determine generated file names. */ @Parameter(defaultValue = "${project.artifactId}") private String name; /** */ @Component private ArchiverManager archiverManager; /** */ @Component private MavenProjectHelper projectHelper; /** * The output directory where the built JNI library will placed. This * directory will be added to as a test resource path so that unit tests can * verify the built JNI library. * * The library will placed under the META-INF/native/${platform} directory * that the HawtJNI Library uses to find JNI libraries as classpath * resources. */ @Parameter(defaultValue = "${project.build.directory}/generated-sources/hawtjni/lib") private File libDirectory; /** * The platform identifier of this build. If not specified, * it will be automatically detected. * * @parameter */ @Parameter private String platform; /** * Should a classifier of the native jar be set * to match the platform? */ @Parameter(defaultValue = "true") private boolean classified; /** * The osgi platforms that the library match for. Example value: * osname=MacOS;processor=x86-64 */ @Parameter private List osgiPlatforms; public void execute() throws MojoExecutionException { try { Library library = new Library(name); if (platform == null) { platform = Library.getPlatform(); } String classifier = null; if( classified ) { classifier = platform; String packageName = project.getArtifactId() + "-" + project.getVersion() + "-" + platform; JarArchiver archiver = (JarArchiver) archiverManager.getArchiver("jar"); File packageFile = new File(new File(project.getBuild().getDirectory()), packageName + ".jar"); archiver.setDestFile(packageFile); archiver.setIncludeEmptyDirs(true); archiver.addDirectory(libDirectory); Manifest manifest = new Manifest(); manifest.addConfiguredAttribute(new Attribute("Bundle-SymbolicName", project.getArtifactId() + "-" + platform)); manifest.addConfiguredAttribute(new Attribute("Bundle-Name", name + " for " + platform)); manifest.addConfiguredAttribute(new Attribute("Bundle-NativeCode", getNativeCodeValue(library))); manifest.addConfiguredAttribute(new Attribute("Bundle-Version", project.getVersion())); manifest.addConfiguredAttribute(new Attribute("Bundle-ManifestVersion", "2")); manifest.addConfiguredAttribute(new Attribute("Bundle-Description", project.getDescription())); archiver.addConfiguredManifest(manifest); archiver.createArchive(); projectHelper.attachArtifact(project, "jar", classifier, packageFile); } else { projectHelper.addResource(project, libDirectory.getCanonicalPath(), null, null); } } catch (Exception e) { throw new MojoExecutionException("packaging failed: " + e, e); } } public String getNativeCodeValue(Library library) { if (osgiPlatforms == null || osgiPlatforms.isEmpty() ) { return library.getPlatformSpecificResourcePath(platform) + ";" +"osname=" + getOsgiOSName() + ";processor=" + getOsgiProcessor()+ ",*"; } boolean first=true; String rc = ""; for (String s : osgiPlatforms) { if( !first ) { rc += ","; } first = false; if( "*".equals(s) ) { rc += s; } else { rc += library.getPlatformSpecificResourcePath(platform) + ";"+s; } } return rc; } public String getOsgiOSName() { String name = System.getProperty("os.name"); String trimmed = name.toLowerCase().trim(); if (trimmed.startsWith("win")) { return "Win32"; } else if (trimmed.startsWith("linux")) { return "Linux"; } else if (trimmed.startsWith("macos") || trimmed.startsWith("mac os")) { return "MacOS"; } else if (trimmed.startsWith("aix")) { return "AIX"; } else if (trimmed.startsWith("hpux")) { return "HPUX"; } else if (trimmed.startsWith("irix")) { return "IRIX"; } else if (trimmed.startsWith("netware")) { return "Netware"; } else if (trimmed.startsWith("openbsd")) { return "OpenBSD"; } else if (trimmed.startsWith("netbsd")) { return "NetBSD"; } else if (trimmed.startsWith("os2") || trimmed.startsWith("os/2")) { return "OS2"; } else if (trimmed.startsWith("qnx") || trimmed.startsWith("procnto")) { return "QNX"; } else if (trimmed.startsWith("solaris")) { return "Solaris"; } else if (trimmed.startsWith("sunos")) { return "SunOS"; } else if (trimmed.startsWith("vxworks")) { return "VxWorks"; } return name; } public String getOsgiProcessor() { String name = System.getProperty("os.arch"); String trimmed = name.toLowerCase().trim(); if (trimmed.startsWith("x86-64") || trimmed.startsWith("amd64") || trimmed.startsWith("em64") || trimmed.startsWith("x86_64")) { return "x86-64"; } else if (trimmed.startsWith("x86") || trimmed.startsWith("pentium") || trimmed.startsWith("i386") || trimmed.startsWith("i486") || trimmed.startsWith("i586") || trimmed.startsWith("i686")) { return "x86"; } else if (trimmed.startsWith("68k")) { return "68k"; } else if (trimmed.startsWith("arm")) { return "ARM"; } else if (trimmed.startsWith("alpha")) { return "Alpha"; } else if (trimmed.startsWith("ignite") || trimmed.startsWith("psc1k")) { return "Ignite"; } else if (trimmed.startsWith("mips")) { return "Mips"; } else if (trimmed.startsWith("parisc")) { return "PArisc"; } else if (trimmed.startsWith("powerpc") || trimmed.startsWith("power") || trimmed.startsWith("ppc")) { return "PowerPC"; } else if (trimmed.startsWith("sparc")) { return "Sparc"; } return name; } } PackageSourceMojo.java000066400000000000000000000077321514323636100356530ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/** * Copyright (C) 2009-2011 FuseSource Corp. * http://fusesource.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.fusesource.hawtjni.maven; import java.io.File; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectHelper; import org.codehaus.plexus.archiver.Archiver; import org.codehaus.plexus.archiver.manager.ArchiverManager; /** * This goal creates a source zip file of the native build * module and attaches it to the build so that it can get * deployed. * * @author Hiram Chirino */ @Mojo(name = "package-source", defaultPhase = LifecyclePhase.PACKAGE) public class PackageSourceMojo extends AbstractMojo { /** * The maven project. */ @Parameter(defaultValue = "${project}", readonly = true) protected MavenProject project; /** */ @Component private ArchiverManager archiverManager; /** */ @Component private MavenProjectHelper projectHelper; /** * The directory where the generated native files are located.. */ @Parameter(defaultValue = "${project.build.directory}/generated-sources/hawtjni/native-package") private File packageDirectory; /** * The classifier of the package archive that will be created. */ @Parameter(defaultValue = "native-src") private String sourceClassifier; /** * Should we skip executing the autogen.sh file. */ @Parameter(defaultValue = "${skip-autogen}") private boolean skipAutogen; public void execute() throws MojoExecutionException { try { String packageName = project.getArtifactId()+"-"+project.getVersion()+"-"+sourceClassifier; File packageFile = new File(new File(project.getBuild().getDirectory()), packageName+".zip"); // Verify the the configure script got generated before packaging. File configure = new File(packageDirectory, "configure"); if( !skipAutogen && !configure.exists() ) { // Looks like this platform could not generate the // configure script. So don't install deploy // partially created source package. getLog().info(""); getLog().warn("Will NOT package the native sources to: "+packageFile); getLog().info(" Native source build directory did not contain a 'configure' script."); getLog().info(" To ignore this warning and package it up anyways, configure the plugin with: true"); getLog().info(""); return; } Archiver archiver = archiverManager.getArchiver( "zip" ); archiver.setDestFile( packageFile); archiver.setIncludeEmptyDirs(true); archiver.addDirectory(packageDirectory, packageName+"/"); archiver.createArchive(); projectHelper.attachArtifact( project, "zip", sourceClassifier, packageFile ); } catch (Exception e) { throw new MojoExecutionException("packageing failed: "+e, e); } } } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/000077500000000000000000000000001514323636100250625ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/project-template/000077500000000000000000000000001514323636100303415ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/project-template/Makefile.am000066400000000000000000000022331514323636100323750ustar00rootroot00000000000000# --------------------------------------------------------------------------- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --------------------------------------------------------------------------- ACLOCAL_AMFLAGS = -I m4 AM_CXXFLAGS = -std=gnu++11 lib_LTLIBRARIES = lib@PROJECT_NAME@.la # lib@PROJECT_NAME_UNDER_SCORE@_la_CFLAGS = #lib@PROJECT_NAME_UNDER_SCORE@_la_LDFLAGS = lib@PROJECT_NAME_UNDER_SCORE@_la_SOURCES =@PROJECT_SOURCES@ jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/project-template/autogen.sh000077500000000000000000000030061514323636100323410ustar00rootroot00000000000000#!/bin/sh # --------------------------------------------------------------------------- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --------------------------------------------------------------------------- auto_clean() { AUTO_FILES=" configure config.log config.status autom4te.cache autotools aclocal.m4 libtool m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 Makefile.in Makefile src/Makefile src/Makefile.in src/config.in src/config.h src/config.h.in* src/stamp-h1 " for f in "$AUTO_FILES" ; do rm -Rf $f done } auto_reconf() { autoreconf --force --install -I m4 } case "$1" in clean) echo "auto clean..." auto_clean ;; *) echo "auto reconf..." auto_clean auto_reconf ;; esac jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/project-template/configure.ac000066400000000000000000000043531514323636100326340ustar00rootroot00000000000000# --------------------------------------------------------------------------- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --------------------------------------------------------------------------- ## -------------------------------- ## Initialization macros. ## -------------------------------- AC_PREREQ([2.61]) AC_INIT([@PROJECT_NAME@], [@VERSION@]) AC_CONFIG_AUX_DIR([autotools]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([@FIRST_SOURCE_FILE@]) AC_CONFIG_HEADERS([src/config.h]) AC_CANONICAL_HOST AC_CANONICAL_SYSTEM ## ----------------------------------------------- ## Application Checks ## ----------------------------------------------- @AC_PROG_CHECKS@ AC_PROG_INSTALL # Make AM_PROG_AR work before automake 1.12 m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AC_PROG_LIBTOOL([disable-static]) ## ----------------------------------------------- ## API Checks ## ----------------------------------------------- WITH_JNI_JDK CUSTOM_M4_SETUP WITH_OSX_UNIVERSAL CFLAGS="$CFLAGS $JNI_EXTRA_CFLAGS" AC_SUBST(CFLAGS) CXXFLAGS="$CXXFLAGS $JNI_EXTRA_CFLAGS" AC_SUBST(CXXFLAGS) LDFLAGS="$LDFLAGS $JNI_EXTRA_LDFLAGS -release @VERSION@" AC_SUBST(LDFLAGS) ## ----------------------------------------------------- ## Generate the files ## ----------------------------------------------------- AM_INIT_AUTOMAKE([subdir-objects no-dependencies -Wall -Werror foreign]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT echo " ($PACKAGE_NAME) version $PACKAGE_VERSION Prefix.........: $prefix C Compiler.....: $CC $CFLAGS Linker.........: $LD $LDFLAGS $LIBS " jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/project-template/m4/000077500000000000000000000000001514323636100306615ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/project-template/m4/custom.m4000066400000000000000000000022221514323636100324330ustar00rootroot00000000000000dnl --------------------------------------------------------------------------- dnl Copyright (C) 2009-2011 FuseSource Corp. dnl http://fusesource.com dnl dnl Licensed under the Apache License, Version 2.0 (the "License"); dnl you may not use this file except in compliance with the License. dnl You may obtain a copy of the License at dnl dnl http://www.apache.org/licenses/LICENSE-2.0 dnl dnl Unless required by applicable law or agreed to in writing, software dnl distributed under the License is distributed on an "AS IS" BASIS, dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. dnl See the License for the specific language governing permissions and dnl limitations under the License. dnl --------------------------------------------------------------------------- AC_DEFUN([CUSTOM_M4_SETUP], [ # # This is just a stub. If you wish to customize your configure.ac # just copy this file to src/main/native-package/m4/custom.m4 # then replace add your configure.ac statements here. # AC_CHECK_HEADER([pthread.h],[AC_DEFINE([HAVE_PTHREAD_H], [1], [Define to 1 if you have the header file.])]) ])jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/project-template/m4/jni.m4000066400000000000000000000132721514323636100317100ustar00rootroot00000000000000dnl --------------------------------------------------------------------------- dnl Copyright (C) 2009-2011 FuseSource Corp. dnl http://fusesource.com dnl dnl Licensed under the Apache License, Version 2.0 (the "License"); dnl you may not use this file except in compliance with the License. dnl You may obtain a copy of the License at dnl dnl http://www.apache.org/licenses/LICENSE-2.0 dnl dnl Unless required by applicable law or agreed to in writing, software dnl distributed under the License is distributed on an "AS IS" BASIS, dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. dnl See the License for the specific language governing permissions and dnl limitations under the License. dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- dnl SYNOPSIS: dnl dnl WITH_JNI_JDK() dnl dnl Adds the --with-jni-jdk=PATH option. If not provided, it searches dnl for the JDK in the default OS locations. dnl dnl This macro calls: dnl AC_SUBST(JNI_JDK) dnl AC_SUBST(JNI_EXTRA_CFLAGS) dnl AC_SUBST(JNI_EXTRA_LDFLAGS) dnl dnl AUTHOR: Hiram Chrino dnl --------------------------------------------------------------------------- AC_DEFUN([WITH_JNI_JDK], [ AC_PREREQ([2.61]) AC_ARG_WITH(jni-jdk, [AS_HELP_STRING([--with-jni-jdk=PATH], [Location of the Java Development Kit. Defaults to your JAVA_HOME setting and falls back to where it is typically installed on your OS])], [ if test "$withval" = "no" || test "$withval" = "yes"; then AC_MSG_ERROR([--with-jni-jdk: PATH to JDK not supplied]) fi CHECK_JNI_JDK([$withval], [], [AC_MSG_ERROR([JDK not found. Invalid --with-jni-jdk PATH])]) ],[ if test -n "$JAVA_HOME" ; then AC_MSG_NOTICE([JAVA_HOME was set, checking to see if it's a JDK we can use...]) CHECK_JNI_JDK([$JAVA_HOME], [], []) fi __JNI_GUESS=`which javac` AS_IF(test -z "$JNI_JDK" && test -n "$__JNI_GUESS", [ AC_MSG_NOTICE([javac was on your path, checking to see if it's part of a JDK we can use...]) # transitively resolve the symbolic links to javac while file -h "$__JNI_GUESS" 2>/dev/null | grep " symbolic link to " >/dev/null; do __JNI_LINK=$( file -h $__JNI_GUESS | sed 's/.*symbolic link to //' | sed "s/'$//" | sed 's/^`//' ) __JNI_GUESS=$(cd $(dirname $__JNI_GUESS); cd $(dirname $__JNI_LINK); echo "$(pwd)/$(basename $__JNI_LINK)") done # move 2 dirs up to the home dir... __JNI_GUESS=$(dirname $(dirname $__JNI_GUESS)) CHECK_JNI_JDK([$__JNI_GUESS], [], [],[]) ],[]) AS_IF(test -z "$JNI_JDK", [ case "$host_os" in darwin*) __JNI_GUESS="/System/Library/Frameworks/JavaVM.framework";; freebsd*) __JNI_GUESS=$(env JAVAVM_DRYRUN=yes /usr/local/bin/java | grep '^JAVA_HOME' | cut -c11-);; *) __JNI_GUESS="/usr";; esac AC_MSG_NOTICE([Taking a guess as to where your OS installs the JDK by default...]) CHECK_JNI_JDK([$__JNI_GUESS], [], [AC_MSG_ERROR([JDK not found. Please use the --with-jni-jdk option])]) ],[]) ]) ]) dnl --------------------------------------------------------------------------- dnl dnl JNI_CHECK_JDK_HOME(PATH, [ACTION-SUCCESS], [ACTION-FAILURE]) dnl dnl Tests to see if the given path is a valid JDK home location with dnl with a JNI headers and library that can be compiled against. dnl dnl This macro calls: dnl dnl AC_SUBST(JNI_JDK) dnl AC_SUBST(JNI_EXTRA_CFLAGS) dnl AC_SUBST(JNI_EXTRA_LDFLAGS) dnl dnl AUTHOR: Hiram Chrino dnl --------------------------------------------------------------------------- AC_DEFUN([CHECK_JNI_JDK],[ AC_PREREQ([2.61]) __JNI_JDK_HOME="$1" AC_MSG_CHECKING(if '$__JNI_JDK_HOME' is a JDK) __JNI_INCLUDE="$__JNI_JDK_HOME/include" # OSX had to be a little different. case "$host_os" in darwin*) AS_IF(test -r "$__JNI_JDK_HOME/Headers/jni.h",[ __JNI_INCLUDE="$__JNI_JDK_HOME/Headers"; ]) esac AS_IF(test -r "$__JNI_INCLUDE/jni.h",[ # Also include the os specific include dirs in the JNI_CFLAGS __JNI_CFLAGS="-I$__JNI_INCLUDE" case "$host_os" in darwin*) __JNI_INCLUDE_EXTRAS="darwin";; freebsd*) __JNI_INCLUDE_EXTRAS="freebsd";; linux*) __JNI_INCLUDE_EXTRAS="linux genunix";; openbsd*) __JNI_INCLUDE_EXTRAS="openbsd";; osf*) __JNI_INCLUDE_EXTRAS="alpha";; solaris*) __JNI_INCLUDE_EXTRAS="solaris";; mingw*) __JNI_INCLUDE_EXTRAS="win32";; cygwin*) __JNI_INCLUDE_EXTRAS="win32";; *) __JNI_INCLUDE_EXTRAS="genunix";; esac for f in $__JNI_INCLUDE_EXTRAS ; do if test -d "$__JNI_INCLUDE/$f"; then __JNI_CFLAGS="$__JNI_CFLAGS -I$__JNI_INCLUDE/$f" fi done saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $__JNI_CFLAGS" JNI_VERSION="1_2" AC_LANG_PUSH(C) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[@%:@include ]],[[ #ifndef JNI_VERSION_$JNI_VERSION # error JNI version $JNI_VERSION is not supported. #endif ]]) ],[ JNI_JDK=$"$__JNI_JDK_HOME" JNI_EXTRA_CFLAGS="$__JNI_CFLAGS" AC_SUBST(JNI_JDK) AC_SUBST(JNI_EXTRA_CFLAGS) case $host_os in darwin*) JNI_EXTRA_LDFLAGS="-shrext .jnilib -dynamiclib" ;; esac AC_SUBST(JNI_EXTRA_LDFLAGS) AC_MSG_RESULT([yes]) $2 ],[ AC_MSG_RESULT([no]) $3 ]) AC_LANG_POP() CPPFLAGS="$saved_CPPFLAGS" ],[ AC_MSG_RESULT([no]) $3 ]) ]) osx-universal.m4000066400000000000000000000076341514323636100336750ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/project-template/m4dnl --------------------------------------------------------------------------- dnl Copyright (C) 2009-2011 FuseSource Corp. dnl http://fusesource.com dnl dnl Licensed under the Apache License, Version 2.0 (the "License"); dnl you may not use this file except in compliance with the License. dnl You may obtain a copy of the License at dnl dnl http://www.apache.org/licenses/LICENSE-2.0 dnl dnl Unless required by applicable law or agreed to in writing, software dnl distributed under the License is distributed on an "AS IS" BASIS, dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. dnl See the License for the specific language governing permissions and dnl limitations under the License. dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- dnl SYNOPSIS: dnl dnl WITH_OSX_UNIVERSAL() dnl dnl Allows creating universal binaries on the dnl dnl Adds the --with-universal=ARCH option. This will will dnl set -isysroot option to the location of the MacOSX${OSX_VERSION}.sdk. dnl if OSX_VERSION is not defined, it will set it to the latest version dnl of the SDK installed on your system. dnl dnl You must use the no-dependencies option when automake is initialized. dnl for example: AM_INIT_AUTOMAKE([no-dependencies]) dnl dnl This macro calls: dnl AC_SUBST(CFLAGS) dnl AC_SUBST(CXXFLAGS) dnl AC_SUBST(LDFLAGS) dnl AC_SUBST(OSX_VERSION) dnl dnl AUTHOR: Hiram Chrino dnl --------------------------------------------------------------------------- AC_DEFUN([WITH_OSX_UNIVERSAL], [ AC_PREREQ([2.61]) case "$host_os" in darwin*) AC_MSG_CHECKING(OS X SDK version) AC_ARG_WITH([osxsdk], [AS_HELP_STRING([--with-osxsdk@<:@=VERSION@:>@], [OS X SDK version to build against. Example: --with-osxsdk=10.6])], [ OSX_UNIVERSAL="$withval" ],[ OSX_SDKS_DIR="" OSX_VERSION="" for v in 10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 10.10 10.11 10.12 10.13 10.14 10.15; do for location in "/Developer/SDKs" "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" ; do if test -z "${OSX_VERSION}" && test -d "${location}/MacOSX${v}.sdk" ; then OSX_SDKS_DIR="${location}" OSX_VERSION="${v}" fi done done ]) AC_MSG_RESULT([$OSX_VERSION]) AC_SUBST(OSX_SDKS_DIR) AC_SUBST(OSX_VERSION) AC_MSG_CHECKING(whether to build universal binaries) AC_ARG_WITH([universal], [AS_HELP_STRING([--with-universal@<:@=ARCH@:>@], [Build a universal binary. Set to a space separated architecture list. Pick from: i386, x86_64, ppc, and/or ppc64. @<:@default="i386 x86_64"@:>@])], [ AS_IF(test "$withval" = "no", [ OSX_UNIVERSAL="" AC_MSG_RESULT([no]) ], test "$withval" = "yes", [ OSX_UNIVERSAL="i386 x86_64" AC_MSG_RESULT([yes, archs: $OSX_UNIVERSAL]) ],[ OSX_UNIVERSAL="$withval" AC_MSG_RESULT([yes, archs: $OSX_UNIVERSAL]) ]) ],[ OSX_UNIVERSAL="" AC_MSG_RESULT([no]) ]) AS_IF(test -n "$OSX_UNIVERSAL", [ for i in $OSX_UNIVERSAL ; do CFLAGS="-arch $i $CFLAGS" CXXFLAGS="-arch $i $CXXFLAGS" LDFLAGS="-arch $i $LDFLAGS" done for f in $__JNI_INCLUDE_EXTRAS ; do if test -d "$__JNI_INCLUDE/$f"; then __JNI_CFLAGS="$__JNI_CFLAGS -I$__JNI_INCLUDE/$f" fi done CFLAGS="-isysroot ${OSX_SDKS_DIR}/MacOSX${OSX_VERSION}.sdk $CFLAGS" CXXFLAGS="-isysroot ${OSX_SDKS_DIR}/MacOSX${OSX_VERSION}.sdk $CXXFLAGS" LDFLAGS="-syslibroot,${OSX_SDKS_DIR}/MacOSX${OSX_VERSION}.sdk $LDFLAGS" AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(LDFLAGS) ]) ;; esac ]) jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/project-template/readme.md000066400000000000000000000030111514323636100321130ustar00rootroot00000000000000Building on Unix/Linux/OS X --------------------------- The configure script will customize the way the software is built and installed into your system along with detecting the available libraries that have been installed. To use the default configuration just run: ./configure For more help on how to customize the build configuration, run: ./configure --help Once the configure script has run successfully, you are ready to build. Run: make This will build all of the core ActiveMQ CPP source code. To build and install the code into the system directories, run: make install You will have to become the superuser in order to be able to install the JNI libraries. ### OS X Lion requirements Install brew. It will depends on XCode being installed along with the command line tools. Then use brew to install autoconf, automake, and libtool. brew install autoconf automake libtool Building on Windows ------------------- Download and install the free [Microsoft Windows SDK][1]. The SDK includes all the headers, libraries, and build tools needed to compile the JNI library. Set the `JAVA_HOME` environment variable to the location where your JDK is installed. Use the installed command window and change to the directory that this file is located in and then run: For recent SDK Versions: msbuild vs2010.vcxproj (or ) For legacy SDK Versions: vcbuild vs2008.vcproj The dll files will be located under the target directory. [1]: https://developer.microsoft.com/en-us/windows/downloadsjtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/project-template/vs2008.vcproj000077500000000000000000000164161514323636100325430ustar00rootroot00000000000000 @PROJECT_XML_SOURCES@ vs2010.custom.props000066400000000000000000000012531514323636100336140ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/project-template jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-maven-plugin/src/main/resources/project-template/vs2010.vcxproj000077500000000000000000000242171514323636100327220ustar00rootroot00000000000000 debug Win32 debug x64 release Win32 release x64 @PROJECT_NAME@ @PROJECT_NAME@ @TARGET_PLATFORM_VERSION@ DynamicLibrary Unicode @PLATFORM_TOOLSET@ DynamicLibrary Unicode @PLATFORM_TOOLSET@ true DynamicLibrary @PLATFORM_TOOLSET@ Unicode DynamicLibrary Unicode @PLATFORM_TOOLSET@ true <_ProjectFileVersion>10.0.30319.1 $(ProjectDir)/target/$(Platform)-$(Configuration)/lib\ $(ProjectDir)/target/$(Platform)-$(Configuration)/obj\ false $(ProjectDir)/target/$(Platform)-$(Configuration)/lib\ $(ProjectDir)/target/$(Platform)-$(Configuration)/obj\ false $(ProjectDir)/target/$(Platform)-$(Configuration)/lib\ $(ProjectDir)/target/$(Platform)-$(Configuration)/obj\ true $(ProjectDir)/target/$(Platform)-$(Configuration)/lib\ $(ProjectDir)/target/$(Platform)-$(Configuration)/obj\ true @CUSTOM_PROPS@ $(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\src\windows;%(AdditionalIncludeDirectories) MaxSpeed true Speed WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreadedDLL true false Level3 ProgramDatabase StdCall true Windows true true MachineX86 $(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\src\windows;%(AdditionalIncludeDirectories) MaxSpeed true Speed WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreadedDLL true false Level3 ProgramDatabase StdCall true Windows true true MachineX64 $(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\src\windows;%(AdditionalIncludeDirectories) Disabled Speed WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL false Level3 EditAndContinue StdCall true Windows MachineX86 $(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\src\windows;%(AdditionalIncludeDirectories) Disabled Speed WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL false Level3 EditAndContinue StdCall true Windows MachineX64 @PROJECT_VS10_SOURCES@ jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/000077500000000000000000000000001514323636100204165ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/pom.xml000066400000000000000000000042731514323636100217410ustar00rootroot00000000000000 4.0.0 org.fusesource.hawtjni hawtjni-project 1.18 hawtjni-runtime HawtJNI Runtime The API that projects using HawtJNI should build against. org.apache.maven.plugins maven-jar-plugin org.fusesource.hawtjni.runtime org.apache.maven.plugins maven-javadoc-plugin attach-javadocs jar jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/000077500000000000000000000000001514323636100212055ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/000077500000000000000000000000001514323636100221315ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/000077500000000000000000000000001514323636100230525ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/000077500000000000000000000000001514323636100236415ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/000077500000000000000000000000001514323636100260245ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/000077500000000000000000000000001514323636100274705ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/000077500000000000000000000000001514323636100311535ustar00rootroot00000000000000ArgFlag.java000066400000000000000000000052341514323636100332460ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.fusesource.hawtjni.runtime; /** * * @author Hiram Chirino */ public enum ArgFlag { /** * Indicate that a native method parameter is an out only variable. * This only makes sense if the parameter is a structure or an array * of primitives. It is an optimization to avoid copying the java * memory to C memory on the way in. */ NO_IN, /** * Indicate that a native method parameter is an in only variable. * This only makes sense if the parameter is a structure or an array * of primitives. It is an optimization to avoid copying the C memory * from java memory on the way out. */ NO_OUT, /** * Indicate that GetPrimitiveArrayCritical() should be used instead * of Get<PrimitiveType>ArrayElements() when transferring array of * primitives from/to C. This is an optimization to avoid copying * memory and must be used carefully. It is ok to be used in * MoveMemory() and memmove() natives. */ CRITICAL, /** * Indicate that the associated C local variable for a native method * parameter should be initialized with zeros. */ INIT, /** * Indicate that the parameter is a pointer. */ POINTER_ARG, /** * Indicate that a structure parameter should be passed by value * instead of by reference. This dereferences the parameter by * prepending *. The parameter must not be NULL. */ BY_VALUE, /** * Indicate that GetStringChars()should be used instead of * GetStringUTFChars() to get the characters of a java.lang.String * passed as a parameter to native methods. */ UNICODE, /** * Indicate that the parameter of a native method is the sentinel * (last parameter of a variable argument C function). The generated * code is always the literal NULL. Some compilers expect the sentinel * to be the literal NULL and output a warning if otherwise. */ SENTINEL, /** * Indicate that the native parameter is a C# managed object. */ CS_OBJECT, }Callback.java000077500000000000000000000224011514323636100334350ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/******************************************************************************* * Copyright (c) 2000, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.fusesource.hawtjni.runtime; /** * Instances of this class represent entry points into Java which can be invoked * from operating system level callback routines. *

* IMPORTANT: A callback is only valid when invoked on the thread which created * it. The results are undefined (and typically bad) when a callback is passed * out to the operating system (or other code) in such a way that the callback * is called from a different thread. */ public class Callback { Object object; String method, signature; int argCount; long /* int */ address, errorResult; boolean isStatic, isArrayBased; static final String PTR_SIGNATURE = "J"; /* C.PTR_SIZEOF == 4 ? "I" : "J"; */ static final String SIGNATURE_0 = getSignature(0); static final String SIGNATURE_1 = getSignature(1); static final String SIGNATURE_2 = getSignature(2); static final String SIGNATURE_3 = getSignature(3); static final String SIGNATURE_4 = getSignature(4); static final String SIGNATURE_N = "([" + PTR_SIGNATURE + ")" + PTR_SIGNATURE; /** * Constructs a new instance of this class given an object to send the * message to, a string naming the method to invoke and an argument count. * Note that, if the object is an instance of Class it is * assumed that the method is a static method on that class. * * @param object * the object to send the message to * @param method * the name of the method to invoke * @param argCount * the number of arguments that the method takes */ public Callback(Object object, String method, int argCount) { this(object, method, argCount, false); } /** * Constructs a new instance of this class given an object to send the * message to, a string naming the method to invoke, an argument count and a * flag indicating whether or not the arguments will be passed in an array. * Note that, if the object is an instance of Class it is * assumed that the method is a static method on that class. * * @param object * the object to send the message to * @param method * the name of the method to invoke * @param argCount * the number of arguments that the method takes * @param isArrayBased * true if the arguments should be passed in an * array and false otherwise */ public Callback(Object object, String method, int argCount, boolean isArrayBased) { this(object, method, argCount, isArrayBased, 0); } /** * Constructs a new instance of this class given an object to send the * message to, a string naming the method to invoke, an argument count, a * flag indicating whether or not the arguments will be passed in an array * and a value to return when an exception happens. Note that, if the object * is an instance of Class it is assumed that the method is a * static method on that class. * * @param object * the object to send the message to * @param method * the name of the method to invoke * @param argCount * the number of arguments that the method takes * @param isArrayBased * true if the arguments should be passed in an * array and false otherwise * @param errorResult * the return value if the java code throws an exception */ public Callback(Object object, String method, int argCount, boolean isArrayBased, long /* int */errorResult) { /* Set the callback fields */ this.object = object; this.method = method; this.argCount = argCount; this.isStatic = object instanceof Class; this.isArrayBased = isArrayBased; this.errorResult = errorResult; /* Inline the common cases */ if (isArrayBased) { signature = SIGNATURE_N; } else { switch (argCount) { case 0: signature = SIGNATURE_0; break; //$NON-NLS-1$ case 1: signature = SIGNATURE_1; break; //$NON-NLS-1$ case 2: signature = SIGNATURE_2; break; //$NON-NLS-1$ case 3: signature = SIGNATURE_3; break; //$NON-NLS-1$ case 4: signature = SIGNATURE_4; break; //$NON-NLS-1$ default: signature = getSignature(argCount); } } /* Bind the address */ address = bind(this, object, method, signature, argCount, isStatic, isArrayBased, errorResult); } /** * Allocates the native level resources associated with the callback. This * method is only invoked from within the constructor for the argument. * * @param callback * the callback to bind * @param object * the callback's object * @param method * the callback's method * @param signature * the callback's method signature * @param argCount * the callback's method argument count * @param isStatic * whether the callback's method is static * @param isArrayBased * whether the callback's method is array based * @param errorResult * the callback's error result */ static native synchronized long /* int */ bind(Callback callback, Object object, String method, String signature, int argCount, boolean isStatic, boolean isArrayBased, long /* int */errorResult); /** * Releases the native level resources associated with the callback, and * removes all references between the callback and other objects. This helps * to prevent (bad) application code from accidentally holding onto * extraneous garbage. */ public void dispose() { if (object == null) return; unbind(this); object = method = signature = null; address = 0; } /** * Returns the address of a block of machine code which will invoke the * callback represented by the receiver. * * @return the callback address */ public long /* int */getAddress() { return address; } /** * Returns the SWT platform name. * * @return the platform name of the currently running SWT */ public static native String getPlatform(); /** * Returns the number of times the system has been recursively entered * through a callback. *

* Note: This should not be called by application code. *

* * @return the entry count * * @since 2.1 */ public static native int getEntryCount(); static String getSignature(int argCount) { String signature = "("; //$NON-NLS-1$ for (int i = 0; i < argCount; i++) signature += PTR_SIGNATURE; signature += ")" + PTR_SIGNATURE; //$NON-NLS-1$ return signature; } /** * Indicates whether or not callbacks which are triggered at the native * level should cause the messages described by the matching * Callback objects to be invoked. This method is used to * safely shut down SWT when it is run within environments which can * generate spurious events. *

* Note: This should not be called by application code. *

* * @param enable * true if callbacks should be invoked */ public static final native synchronized void setEnabled(boolean enable); /** * Returns whether or not callbacks which are triggered at the native level * should cause the messages described by the matching Callback * objects to be invoked. This method is used to safely shut down SWT when * it is run within environments which can generate spurious events. *

* Note: This should not be called by application code. *

* * @return true if callbacks should not be invoked */ public static final native synchronized boolean getEnabled(); /** * Immediately wipes out all native level state associated with all * callbacks. *

* WARNING: This operation is extremely dangerous, and * should never be performed by application code. *

*/ public static final native synchronized void reset(); /** * Releases the native level resources associated with the callback. * * @see #dispose */ static final native synchronized void unbind(Callback callback); } ClassFlag.java000066400000000000000000000025601514323636100336010ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.fusesource.hawtjni.runtime; /** * * @author Hiram Chirino */ public enum ClassFlag { /** * Indicate that the item should not be generated. For example, * custom natives are coded by hand. */ CLASS_SKIP, /** * Indicate that the platform source is in C++ */ CPP, /** * Indicate that this class will define a structure */ STRUCT, /** * Indicate that structure name is a typedef (It should * not be prefixed with 'struct' to reference it.) */ TYPEDEF, /** * Indicate that the struct should get zeroed out before * setting any of it's fields. Comes in handy when * you don't map all the struct fields to java fields but * still want the fields that are not mapped initialized. */ ZERO_OUT, }FieldFlag.java000066400000000000000000000032011514323636100335500ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.fusesource.hawtjni.runtime; /** * * @author Hiram Chirino */ public enum FieldFlag { /** * Indicate that the item should not be generated. For example, * custom natives are coded by hand. */ FIELD_SKIP, /** * Indicate that the field represents a constant or global * variable. It is expected that the java field will be declared * static. */ CONSTANT, /** * Indicate that the field is a pointer. */ POINTER_FIELD, /** * Indicate that the field is a shared pointer. */ SHARED_PTR, /** * Indicate that the getter method used is not part of * the structure. Useful for using wrappers to access * certain structure fields. * * Only useful when the getter is declared explicitly. */ GETTER_NONMEMBER, /** * Indicate that the setter method used is not part of * the structure. Useful for using wrappers to access * certain structure fields. * * Only useful when the setter is declared explicitly. */ SETTER_NONMEMBER, } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/JNIEnv.java000066400000000000000000000007151514323636100331120ustar00rootroot00000000000000/** * Copyright (C) 2010, FuseSource Corp. All rights reserved. */ package org.fusesource.hawtjni.runtime; /** *

* This is a marker class. Methods that take this as an argument * will receive that actual native 'JNIEnv *' value. Since this * class cannot be instantiated, Java callers must pass null * for the value. *

* * @author Hiram Chirino */ public class JNIEnv { private JNIEnv() {} } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/JniArg.java000066400000000000000000000015731514323636100331760ustar00rootroot00000000000000/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.fusesource.hawtjni.runtime; /** * */ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.*; import java.lang.annotation.Documented; @Documented @Target({PARAMETER}) @Retention(RetentionPolicy.RUNTIME) public @interface JniArg { ArgFlag[] flags() default {}; String cast() default ""; } JniClass.java000066400000000000000000000016401514323636100334460ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.fusesource.hawtjni.runtime; /** * */ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.*; import java.lang.annotation.Documented; @Documented @Target({TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface JniClass { ClassFlag[] flags() default {}; String conditional() default ""; String name() default ""; } JniField.java000066400000000000000000000020751514323636100334270ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.fusesource.hawtjni.runtime; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.*; import java.lang.annotation.Documented; /** * * @author Hiram Chirino */ @Documented @Target({FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface JniField { String cast() default ""; String accessor() default ""; String getter() default ""; String setter() default ""; String conditional() default ""; FieldFlag[] flags() default {}; } JniMethod.java000066400000000000000000000022131514323636100336160ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.fusesource.hawtjni.runtime; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.*; import java.lang.annotation.Documented; /** * * @author Hiram Chirino */ @Documented @Target({METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface JniMethod { String cast() default ""; // Pointer pointer() default Pointer.DETERMINE_FROM_CAST; String accessor() default ""; MethodFlag[] flags() default {}; String copy() default ""; String conditional() default ""; JniArg[] callbackArgs() default {}; } Library.java000077500000000000000000000512501514323636100333510ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2000, 2009 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.fusesource.hawtjni.runtime; import java.io.*; import java.lang.reflect.Method; import java.net.URL; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Arrays; import java.util.Set; /** * Used to find and load a JNI library, eventually after having extracted it. * * It will search for the library in order at the following locations: *
    *
  1. in the custom library path: If the "library.${name}.path" System property is set to a directory, * subdirectories are searched: *
      *
    1. "${platform}/${arch}" *
    2. "${platform}" *
    3. "${os}" *
    * for 2 namings of the library: *
      *
    1. as "${name}-${version}" library name if the version can be determined. *
    2. as "${name}" library name *
    *
  2. system library path: This is where the JVM looks for JNI libraries by default. *
      *
    1. as "${name}${bit-model}-${version}" library name if the version can be determined. *
    2. as "${name}-${version}" library name if the version can be determined. *
    3. as "${name}" library name *
    *
  3. classpath path: If the JNI library can be found on the classpath, it will get extracted * and then loaded. This way you can embed your JNI libraries into your packaged JAR files. * They are looked up as resources in this order: *
      *
    1. "META-INF/native/${platform}/${arch}/${library[-version]}": Store your library here if you want to embed * more than one platform JNI library on different processor archs in the jar. *
    2. "META-INF/native/${platform}/${library[-version]}": Store your library here if you want to embed more * than one platform JNI library in the jar. *
    3. "META-INF/native/${os}/${library[-version]}": Store your library here if you want to embed more * than one platform JNI library in the jar but don't want to take bit model into account. *
    4. "META-INF/native/${library[-version]}": Store your library here if your JAR is only going to embedding one * platform library. *
    * The file extraction is attempted until it succeeds in the following directories. *
      *
    1. The directory pointed to by the "library.${name}.path" System property (if set) *
    2. a temporary directory (uses the "java.io.tmpdir" System property) *
    *
* * where: *
    *
  • "${name}" is the name of library *
  • "${version}" is the value of "library.${name}.version" System property if set. * Otherwise it is set to the ImplementationVersion property of the JAR's Manifest
  • *
  • "${os}" is your operating system, for example "osx", "linux", or "windows"
  • *
  • "${bit-model}" is "64" if the JVM process is a 64 bit process, otherwise it's "32" if the * JVM is a 32 bit process
  • *
  • "${arch}" is the architecture for the processor, for example "amd64" or "sparcv9"
  • *
  • "${platform}" is "${os}${bit-model}", for example "linux32" or "osx64"
  • *
  • "${library[-version]}": is the normal jni library name for the platform (eventually with -${version}) suffix. * For example "${name}.dll" on * windows, "lib${name}.jnilib" on OS X, and "lib${name}.so" on linux
  • *
* * @author Hiram Chirino * @see System#mapLibraryName(String) */ public class Library { public static final String STRATEGY_PROPERTY = "hawtjni.strategy"; public static final String STRATEGY_SHA1 = "sha1"; public static final String STRATEGY_TEMP = "temp"; static final String SLASH = System.getProperty("file.separator"); static final String STRATEGY = System.getProperty(STRATEGY_PROPERTY, "windows".equals(getOperatingSystem()) ? STRATEGY_SHA1 : STRATEGY_TEMP); final private String name; final private String version; final private ClassLoader classLoader; private boolean loaded; private String nativeLibraryPath; private URL nativeLibrarySourceUrl; public Library(String name) { this(name, null, null); } public Library(String name, Class clazz) { this(name, version(clazz), clazz.getClassLoader()); } public Library(String name, String version) { this(name, version, null); } public Library(String name, String version, ClassLoader classLoader) { if( name == null ) { throw new IllegalArgumentException("name cannot be null"); } this.name = name; this.version = version; this.classLoader= classLoader; } private static String version(Class clazz) { try { return clazz.getPackage().getImplementationVersion(); } catch (Throwable e) { } return null; } /** * Get the path to the native library loaded. * @return the path (should not be null once the library is loaded) * @since 1.16 */ public String getNativeLibraryPath() { return nativeLibraryPath; } /** * Get the URL to the native library source that has been extracted (if it was extracted). * @return the url to the source (in classpath) * @since 1.16 */ public URL getNativeLibrarySourceUrl() { return nativeLibrarySourceUrl; } public static String getOperatingSystem() { String name = System.getProperty("os.name").toLowerCase().trim(); if( name.startsWith("linux") ) { return "linux"; } if( name.startsWith("mac os x") ) { return "osx"; } if( name.startsWith("win") ) { return "windows"; } return name.replaceAll("\\W+", "_"); } public static String getPlatform() { return getOperatingSystem()+getBitModel(); } public static int getBitModel() { String prop = System.getProperty("sun.arch.data.model"); if (prop == null) { prop = System.getProperty("com.ibm.vm.bitmode"); } if( prop!=null ) { return Integer.parseInt(prop); } // GraalVM support, see https://github.com/fusesource/jansi/issues/162 String arch = System.getProperty("os.arch"); if (arch.endsWith("64") && "Substrate VM".equals(System.getProperty("java.vm.name"))) { return 64; } return -1; // we don't know.. } /** * Load the native library. */ synchronized public void load() { if( loaded ) { return; } doLoad(); loaded = true; } private void doLoad() { /* Perhaps a custom version is specified */ String version = System.getProperty("library."+name+".version"); if (version == null) { version = this.version; } ArrayList errors = new ArrayList(); String[] specificDirs = getSpecificSearchDirs(); String libFilename = map(name); String versionlibFilename = (version == null) ? null : map(name + "-" + version); /* Try loading library from a custom library path */ String customPath = System.getProperty("library."+name+".path"); if (customPath != null) { for ( String dir: specificDirs ) { if( version!=null && load(errors, file(customPath, dir, versionlibFilename)) ) return; if( load(errors, file(customPath, dir, libFilename)) ) return; } } /* Try loading library from java library path */ if( version!=null && loadLibrary(errors, name + getBitModel() + "-" + version) ) return; if( version!=null && loadLibrary(errors, name + "-" + version) ) return; if( loadLibrary(errors, name) ) return; /* Try extracting the library from the jar */ if( classLoader!=null ) { String targetLibName = version != null ? versionlibFilename : libFilename; for ( String dir: specificDirs ) { if( version!=null && extractAndLoad(errors, customPath, dir, versionlibFilename, targetLibName) ) return; if( extractAndLoad(errors, customPath, dir, libFilename, targetLibName) ) return; } } /* Failed to find the library */ UnsatisfiedLinkError e = new UnsatisfiedLinkError("Could not load library. Reasons: " + errors.toString()); try { Method method = Throwable.class.getMethod("addSuppressed", Throwable.class); for (Throwable t : errors) { method.invoke(e, t); } } catch (Throwable ignore) { } throw e; } @Deprecated final public String getArchSpecifcResourcePath() { return getArchSpecificResourcePath(); } final public String getArchSpecificResourcePath() { return "META-INF/native/"+ getPlatform() + "/" + System.getProperty("os.arch") + "/" +map(name); } @Deprecated final public String getOperatingSystemSpecifcResourcePath() { return getOperatingSystemSpecificResourcePath(); } final public String getOperatingSystemSpecificResourcePath() { return getPlatformSpecificResourcePath(getOperatingSystem()); } @Deprecated final public String getPlatformSpecifcResourcePath() { return getPlatformSpecificResourcePath(); } final public String getPlatformSpecificResourcePath() { return getPlatformSpecificResourcePath(getPlatform()); } @Deprecated final public String getPlatformSpecifcResourcePath(String platform) { return getPlatformSpecificResourcePath(platform); } final public String getPlatformSpecificResourcePath(String platform) { return "META-INF/native/"+platform+"/"+map(name); } @Deprecated final public String getResorucePath() { return getResourcePath(); } final public String getResourcePath() { return "META-INF/native/"+map(name); } final public String getLibraryFileName() { return map(name); } /** * Search directories for library:
    *
  • ${platform}/${arch} to enable platform JNI library for different processor archs
  • *
  • ${platform} to enable platform JNI library
  • *
  • ${os} to enable OS JNI library
  • *
  • no directory
  • *
* @return the list * @since 1.15 */ final public String[] getSpecificSearchDirs() { return new String[] { getPlatform() + "/" + System.getProperty("os.arch"), getPlatform(), getOperatingSystem(), "." }; } private boolean extractAndLoad(ArrayList errors, String customPath, String dir, String libName, String targetLibName) { String resourcePath = "META-INF/native/" + ( dir == null ? "" : (dir + '/')) + libName; URL resource = classLoader.getResource(resourcePath); if( resource !=null ) { int idx = targetLibName.lastIndexOf('.'); String prefix = targetLibName.substring(0, idx)+"-"; String suffix = targetLibName.substring(idx); // Use the user provided path, // then fallback to the java temp directory, // and last, use the user home folder for (File path : Arrays.asList( customPath != null ? file(customPath) : null, file(System.getProperty("java.io.tmpdir")), file(System.getProperty("user.home"), ".hawtjni", name))) { if( path!=null ) { // Try to extract it to the custom path... File target; if (STRATEGY_SHA1.equals(STRATEGY)) { target = extractSha1(errors, resource, prefix, suffix, path); } else { target = extractTemp(errors, resource, prefix, suffix, path); } if( target!=null ) { if( load(errors, target) ) { nativeLibrarySourceUrl = resource; return true; } } } } } return false; } private File file(String ...paths) { File rc = null ; for (String path : paths) { if( rc == null ) { rc = new File(path); } else if( path != null ) { rc = new File(rc, path); } } return rc; } private String map(String libName) { /* * libraries in the Macintosh use the extension .jnilib but the some * VMs map to .dylib. */ libName = System.mapLibraryName(libName); String ext = ".dylib"; if (libName.endsWith(ext)) { libName = libName.substring(0, libName.length() - ext.length()) + ".jnilib"; } return libName; } private File extractSha1(ArrayList errors, URL source, String prefix, String suffix, File directory) { File target = null; directory = directory.getAbsoluteFile(); if (!directory.exists()) { if (!directory.mkdirs()) { errors.add(new IOException("Unable to create directory: " + directory)); return null; } } try { String sha1 = computeSha1(source.openStream()); String sha1f = ""; target = new File(directory, prefix + sha1 + suffix); if (target.isFile() && target.canRead()) { sha1f = computeSha1(new FileInputStream(target)); } if (sha1f.equals(sha1)) { return target; } FileOutputStream os = null; InputStream is = null; try { is = source.openStream(); if (is != null) { byte[] buffer = new byte[4096]; os = new FileOutputStream(target); int read; while ((read = is.read(buffer)) != -1) { os.write(buffer, 0, read); } chmod755(target); } return target; } finally { close(os); close(is); } } catch (Throwable e) { IOException io; if (target != null) { target.delete(); io = new IOException("Unable to extract library from " + source + " to " + target); } else { io = new IOException("Unable to create temporary file in " + directory); } io.initCause(e); errors.add(io); } return null; } private String computeSha1(InputStream is) throws NoSuchAlgorithmException, IOException { String sha1; try { MessageDigest mDigest = MessageDigest.getInstance("SHA1"); int read; byte[] buffer = new byte[4096]; while ((read = is.read(buffer)) != -1) { mDigest.update(buffer, 0, read); } byte[] result = mDigest.digest(); StringBuilder sb = new StringBuilder(); for (byte b : result) { sb.append(Integer.toString((b & 0xff) + 0x100, 16).substring(1)); } sha1 = sb.toString(); } finally { close(is); } return sha1; } private File extractTemp(ArrayList errors, URL source, String prefix, String suffix, File directory) { File target = null; directory = directory.getAbsoluteFile(); if (!directory.exists()) { if (!directory.mkdirs()) { errors.add(new IOException("Unable to create directory: " + directory)); return null; } } try { FileOutputStream os = null; InputStream is = null; try { target = File.createTempFile(prefix, suffix, directory); is = source.openStream(); if (is != null) { byte[] buffer = new byte[4096]; os = new FileOutputStream(target); int read; while ((read = is.read(buffer)) != -1) { os.write(buffer, 0, read); } chmod755(target); } target.deleteOnExit(); return target; } finally { close(os); close(is); } } catch (Throwable e) { IOException io; if (target != null) { target.delete(); io = new IOException("Unable to extract library from " + source + " to " + target); } else { io = new IOException("Unable to create temporary file in " + directory); } io.initCause(e); errors.add(io); } return null; } static private void close(Closeable file) { if (file != null) { try { file.close(); } catch (Exception ignore) { } } } private void chmod755(File file) { if (getPlatform().startsWith("windows")) return; // Use Files.setPosixFilePermissions if we are running Java 7+ to avoid forking the JVM for executing chmod try { ClassLoader classLoader = getClass().getClassLoader(); // Check if the PosixFilePermissions exists in the JVM, if not this will throw a ClassNotFoundException Class posixFilePermissionsClass = classLoader.loadClass("java.nio.file.attribute.PosixFilePermissions"); // Set permissionSet = PosixFilePermissions.fromString("rwxr-xr-x") Method fromStringMethod = posixFilePermissionsClass.getMethod("fromString", String.class); Object permissionSet = fromStringMethod.invoke(null, "rwxr-xr-x"); // Path path = file.toPath() Object path = file.getClass().getMethod("toPath").invoke(file); // Files.setPosixFilePermissions(path, permissionSet) Class pathClass = classLoader.loadClass("java.nio.file.Path"); Class filesClass = classLoader.loadClass("java.nio.file.Files"); Method setPosixFilePermissionsMethod = filesClass.getMethod("setPosixFilePermissions", pathClass, Set.class); setPosixFilePermissionsMethod.invoke(null, path, permissionSet); } catch (Throwable ignored) { // Fallback to starting a new process try { Runtime.getRuntime().exec(new String[]{"chmod", "755", file.getCanonicalPath()}).waitFor(); } catch (Throwable e) { } } } private boolean load(ArrayList errors, File lib) { try { System.load(lib.getPath()); nativeLibraryPath = lib.getPath(); return true; } catch (UnsatisfiedLinkError e) { LinkageError le = new LinkageError("Unable to load library from " + lib); le.initCause(e); errors.add(le); } return false; } private boolean loadLibrary(ArrayList errors, String lib) { try { System.loadLibrary(lib); nativeLibraryPath = "java.library.path,sun.boot.library.pathlib:" + lib; return true; } catch (UnsatisfiedLinkError e) { LinkageError le = new LinkageError("Unable to load library " + lib); le.initCause(e); errors.add(le); } return false; } } MethodFlag.java000066400000000000000000000063311514323636100337540ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2000, 2008 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.fusesource.hawtjni.runtime; /** * * @author Hiram Chirino */ public enum MethodFlag { /** * Indicate that the item should not be generated. For example, * custom natives are coded by hand. */ METHOD_SKIP, /** * Indicate that a native method should be looked up dynamically. It * is useful when having a dependence on a given library is not * desirable. The library name is specified in the *_custom.h file. */ DYNAMIC, /** * Indicate that the native method represents a constant or global * variable instead of a function. This omits () from the generated * code. */ CONSTANT_GETTER, /** * Indicate that the C function should be casted to a prototype * generated from the parameters of the native method. Useful for * variable argument C functions. */ CAST, /** * Indicate that the native is part of the Java Native Interface. For * example: NewGlobalRef(). */ JNI, /** * Indicate that the native method represents a structure global * variable and the address of it should be returned to Java. This is * done by prepending &. */ ADDRESS, /** * Indicate that the native method is calling a C++ object's method. */ CPP_METHOD, /** * Indicate that the native method is a C++ constructor that allocates * an object on the heap. */ CPP_NEW, /** * Indicate that the native method is a C++ destructor that * deallocates an object from the heap. */ CPP_DELETE, /** * Indicate that the native method is a C# constructor that allocates * an object on the managed (i.e. garbage collected) heap. */ CS_NEW, /** * Indicate that the native method's return value is a * C# managed object. */ CS_OBJECT, /** * Indicate that the native method represents a setter for a field in * an object or structure */ SETTER, /** * Indicate that the native method represents a getter for a field in * an object or structure. */ GETTER, /** * Indicate that the native method takes 2 arguments, a collection and * an item, and the += operator is used to add the item to the * collection. */ ADDER, /** * Indicate that the return value is a pointer. */ POINTER_RETURN, /** * Indicate that this method will be the constant initializer for * the class. When called, it will set all the static constant fields * to the values defined in your platform. */ CONSTANT_INITIALIZER, }NativeStats.java000077500000000000000000000166111514323636100342140ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * Copyright (c) 2004, 2006 IBM Corporation and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.fusesource.hawtjni.runtime; import java.io.PrintStream; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map.Entry; /** * Instructions on how to use the NativeStats tool with a standalone SWT * example: *
    *
  1. Compile the native libraries defining the NATIVE_STATS flag.
  2. *
  3. Add the following code around the sections of * interest to dump the native calls done in that section. *
     *      StatsInterface si = MyFooStatsInterface.INSTANCE;
     *      NativeStats stats = new NativeStats(si); 
     *      ... // your code
     *      stats.diff().dump(System.out);
     *      
    *
  4. *
  5. Or add the following code at a given point to dump a snapshot of * the native calls done until that point. *
     *      stats.snapshot().dump(System.out);
     *      
    *
  6. *
* * @author Hiram Chirino */ public class NativeStats { public interface StatsInterface { String getNativeClass(); int functionCount(); String functionName(int ordinal); int functionCounter(int ordinal); } public static class NativeFunction implements Comparable { private final int ordinal; private final String name; private int counter; public NativeFunction(int ordinal, String name, int callCount) { this.ordinal = ordinal; this.name = name; this.counter = callCount; } void subtract(NativeFunction func) { this.counter -= func.counter; } public int getCounter() { return counter; } public void setCounter(int counter) { this.counter = counter; } public String getName() { return name; } public int getOrdinal() { return ordinal; } public int compareTo(NativeFunction func) { return func.counter - counter; } public void reset() { counter=0; } public NativeFunction copy() { return new NativeFunction(ordinal, name, counter); } } private final HashMap> snapshot; public NativeStats(StatsInterface... classes) { this(Arrays.asList(classes)); } public NativeStats(Collection classes) { this(snapshot(classes)); } private NativeStats(HashMap> snapshot) { this.snapshot = snapshot; } public void reset() { for (ArrayList functions : snapshot.values()) { for (NativeFunction function : functions) { function.reset(); } } } public void update() { for (Entry> entry : snapshot.entrySet()) { StatsInterface si = entry.getKey(); for (NativeFunction function : entry.getValue()) { function.setCounter( si.functionCounter(function.getOrdinal()) ); } } } public NativeStats snapshot() { NativeStats copy = copy(); copy.update(); return copy; } public NativeStats copy() { HashMap> rc = new HashMap>(snapshot.size()*2); for (Entry> entry : snapshot.entrySet()) { ArrayList list = new ArrayList(entry.getValue().size()); for (NativeFunction function : entry.getValue()) { list.add(function.copy()); } rc.put(entry.getKey(), list); } return new NativeStats(rc); } public NativeStats diff() { HashMap> rc = new HashMap>(snapshot.size()*2); for (Entry> entry : snapshot.entrySet()) { StatsInterface si = entry.getKey(); ArrayList list = new ArrayList(entry.getValue().size()); for (NativeFunction original : entry.getValue()) { NativeFunction copy = original.copy(); copy.setCounter( si.functionCounter(copy.getOrdinal()) ); copy.subtract(original); list.add(copy); } rc.put(si, list); } return new NativeStats(rc); } /** * Dumps the stats to the print stream in a JSON format. * @param ps Print stream. */ public void dump(PrintStream ps) { boolean firstSI=true; for (Entry> entry : snapshot.entrySet()) { StatsInterface si = entry.getKey(); ArrayList funcs = entry.getValue(); int total = 0; for (NativeFunction func : funcs) { total += func.getCounter(); } if( !firstSI ) { ps.print(", "); } firstSI=false; ps.print("["); if( total>0 ) { ps.println("{ "); ps.println(" \"class\": \""+si.getNativeClass()+"\","); ps.println(" \"total\": "+total+", "); ps.print(" \"functions\": {"); boolean firstFunc=true; for (NativeFunction func : funcs) { if (func.getCounter() > 0) { if( !firstFunc ) { ps.print(","); } firstFunc=false; ps.println(); ps.print(" \""+func.getName()+"\": "+func.getCounter()); } } ps.println(); ps.println(" }"); ps.print("}"); } ps.print("]"); } } static private HashMap> snapshot(Collection classes) { HashMap> rc = new HashMap>(); for (StatsInterface sc : classes) { int count = sc.functionCount(); ArrayList functions = new ArrayList(count); for (int i = 0; i < count; i++) { String name = (String) sc.functionName(i); functions.add(new NativeFunction(i, name, 0)); } Collections.sort(functions); rc.put(sc, functions); } return rc; } } PointerMath.java000066400000000000000000000015141514323636100341720ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.fusesource.hawtjni.runtime; /** * * @author Hiram Chirino */ public class PointerMath { private static final boolean bits32 = Library.getBitModel() == 32; final public static long add(long ptr, long n) { if(bits32) { return (int)(ptr + n); } else { return ptr + n; } } } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/T32.java000066400000000000000000000015041514323636100323660ustar00rootroot00000000000000/******************************************************************************* * Copyright (C) 2009-2011 FuseSource Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.fusesource.hawtjni.runtime; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.*; import java.lang.annotation.Documented; @Documented @Target({FIELD, METHOD, PARAMETER, LOCAL_VARIABLE}) @Retention(RetentionPolicy.RUNTIME) public @interface T32 { } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-website/000077500000000000000000000000001514323636100203755ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-website/ext/000077500000000000000000000000001514323636100211755ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-website/ext/ScalatePackage.scala000066400000000000000000000021631514323636100250340ustar00rootroot00000000000000/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import org.fusesource.scalate.support.TemplatePackage import org.fusesource.scalate.{Binding, TemplateSource} /** * Defines the template package of reusable imports, attributes and methods across templates */ class ScalatePackage extends TemplatePackage { def header(source: TemplateSource, bindings: List[Binding]) = """ // common imports go here import _root_.Website._; """ } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-website/ext/Website.scala000066400000000000000000000041611514323636100236060ustar00rootroot00000000000000/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import org.fusesource.scalate.RenderContext package /** *

*

* * @author Hiram Chirino */ object Website { val project_name= "HawtJNI" val project_slogan= "Making JNI easy and fast." val project_id= "hawtjni" val project_issue_url= "https://github.com/fusesource/hawtjni/issues" val project_forums_url= "http://groups.google.com/group/hawtjni" val project_wiki_url= "https://github.com/fusesource/hawtjni/wiki" val project_logo= "/images/project-logo.png" val project_version= "1.17" val project_snapshot_version= "1.18-SNAPSHOT" val project_versions = List( project_version, "1.16", "1.15", "1.14", "1.13", "1.12", "1.11", "1.10", "1.9", "1.8", "1.7", "1.6", "1.5", "1.4", "1.3", "1.2", "1.1", "1.0" ) val project_keywords= "jni,java,jna,c,objective-c,c++,c#" // ------------------------------------------------------------------- val github_page= "http://github.com/fusesource/hawtjni" val git_user_url= "git://github.com/fusesource/hawtjni.git" val git_commiter_url= "git@github.com:fusesources/hawtjni.git" val project_maven_groupId= "org.fusesource.hawtjni" val project_maven_artifactId= "hawtjni-runtime" val website_base_url= "http://fusesource.github.io/hawtjni/" } jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-website/ext/scalate/000077500000000000000000000000001514323636100226115ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-website/ext/scalate/Boot.scala000066400000000000000000000053751514323636100245330ustar00rootroot00000000000000/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package scalate import org.fusesource.scalate.util.Logging import java.util.concurrent.atomic.AtomicBoolean import _root_.Website._ import org.fusesource.scalate._ import org.fusesource.scalamd.{MacroDefinition, Markdown} import java.util.regex.Matcher import org.fusesource.scalate.wikitext.Pygmentize class Boot(engine: TemplateEngine) extends Logging { private var _initialised = new AtomicBoolean(false) def run: Unit = { if (_initialised.compareAndSet(false, true)) { def filter(m:Matcher):String = { val filter_name = m.group(1) val body = m.group(2) engine.filter(filter_name) match { case Some(filter)=> filter.filter(RenderContext(), body) case None=> "

filter not found: %s

%s
".format(filter_name, body) } } def pygmentize(m:Matcher):String = Pygmentize.pygmentize(m.group(2), m.group(1)) // add some macros to markdown. Markdown.macros :::= List( MacroDefinition("""\{filter::(.*?)\}(.*?)\{filter\}""", "s", filter, true), MacroDefinition("""\{pygmentize::(.*?)\}(.*?)\{pygmentize\}""", "s", pygmentize, true), MacroDefinition("""\{pygmentize\_and\_compare::(.*?)\}(.*?)\{pygmentize\_and\_compare\}""", "s", pygmentize, true), MacroDefinition("""\$\{project_version\}""", "", _ => project_version.toString, true), MacroDefinition("""\$\{project_name\}""", "", _ => project_name.toString, true), MacroDefinition("""\$\{project_id\}""", "", _ => project_id.toString, true), MacroDefinition("""\$\{project_issue_url\}""", "", _ => project_issue_url.toString, true), MacroDefinition("""\$\{website_base_url\}""", "", _ => website_base_url.toString, true) ) for( ssp <- engine.filter("ssp"); md <- engine.filter("markdown") ) { engine.pipelines += "ssp.md"-> List(ssp, md) engine.pipelines += "ssp.markdown"-> List(ssp, md) } info("Bootstrapped website gen for: %s".format(project_name)) } } }jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-website/pom.xml000066400000000000000000000177041514323636100217230ustar00rootroot00000000000000 4.0.0 org.fusesource.hawtjni hawtjni-project 1.17 hawtjni-website ${project.artifactId} The HawtJNI Website pom Tomcat60 hawtjni-gh-pages scm:git:https://github.com/fusesource/hawtjni.git org.scala-lang scala-library ${scala-version} org.scala-lang scala-compiler ${scala-version} org.fusesource.scalate scalate-wikitext ${scalate-version} org.fusesource.scalate scalate-page ${scalate-version} org.fusesource.scalamd scalamd ${scalamd-version} org.slf4j slf4j-log4j12 ${slf4j-version} org.fusesource.scalate scalate-test ${scalate-version} test org.fusesource.hawtjni hawtjni-runtime ${project.version} javadoc test ext true maven-source-plugin attach-sources jar org.scala-tools maven-scala-plugin ${scala-plugin-version} compile -Xmx1024m ${scala-version} maven-surefire-plugin once false false **/*Test.* org.fusesource.scalate maven-scalate-plugin ${scalate-version} ${basedir}/src sitegen sitegen package org.apache.maven.plugins maven-scm-publish-plugin 1.1 gh-pages ${project.build.directory}/sitegen gh-pages publish-scm install org.mortbay.jetty jetty-maven-plugin ${jetty-plugin-version} ${basedir}/src scalate.editor ${env.SCALATE_EDITOR} scalate.workdir ${basedir}/target/_scalate scalate.mode development 0 org.apache.maven.plugins maven-dependency-plugin 2.2 unpack package unpack org.fusesource.hawtjni hawtjni-runtime javadoc ${basedir}/target/sitegen/documentation/api org.fusesource.mvnplugins maven-linkchecker-plugin ${mvnplugins-version} http://github.com/ http://git.or.cz/ http://localhost:8080/ http://repo.fusesource.com/ http://search.twitter.com/ http://www.chengin.com/ jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-website/src/000077500000000000000000000000001514323636100211645ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-website/src/WEB-INF/000077500000000000000000000000001514323636100222135ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-website/src/WEB-INF/scalate/000077500000000000000000000000001514323636100236275ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-website/src/WEB-INF/scalate/layouts/000077500000000000000000000000001514323636100253275ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/hawt-jni/hawtjni-website/src/WEB-INF/scalate/layouts/default.jade000066400000000000000000000057571514323636100276160ustar00rootroot00000000000000!!! Basic :plain - response.setContentType("text/html") -@ var title : String = "" -@ var body: String = null -@ var overview: String = null -@ var spot: String = null -@ var blog: String = null -@ var head: String = null - val include_console = engine.isDevelopmentMode && engine.resourceLoader.exists("/org/fusesource/scalate/console/console_head.scaml") html(lang="en") head meta(content="text/html; charset=utf-8" http-equiv="Content-Type") meta(content="#{project_slogan}" name="description") meta(content="#{project_keywords}" name="keywords") meta(content="#{project_name}" name="author") link(type="text/css" rel="stylesheet" href={uri("/styles/impact/css/pygmentize.css")}) link(type="text/css" rel="stylesheet" href={uri("/styles/impact/css/site.css")}) - if (head!=null) !~~ head -# - if (include_console) - include("/org/fusesource/scalate/console/console_head.scaml") link(href={uri("/css/scalate/console.css")} rel="stylesheet" type="text/css") title= title body div#navigation div.wrapper - include("/_navigation.ssp.md") - if (overview!=null) div#overview div.wrapper -if ( project_logo!=null ) div.logo img(src="#{uri(project_logo)}" alt="#{project_name} logo") div.message !~~ overview - if (spot!=null) div#spot div.wrapper !~~ spot - if (body!=null) div#content div.wrapper !~~ body - if (blog!=null) div#blog div.wrapper !~~ blog -# - if (include_console) = include("/org/fusesource/scalate/console/console.scaml") -# :javascript var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/package-lock.json000066400000000000000000004210721514323636100253550ustar00rootroot00000000000000{ "name": "html-report", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "html-report", "version": "0.0.0", "dependencies": { "@vueuse/core": "^14.0.0", "lucide-vue-next": "^0.548.0", "vue": "^3.4.37", "vue-easy-lightbox": "^1.19.0", "vue-i18n": "^11.0.0", "vue-resizables": "^0.7.1" }, "devDependencies": { "@eslint/js": "9.38.0", "@tailwindcss/vite": "4.1.16", "@vitejs/plugin-vue": "6.0.1", "eslint": "9.38.0", "eslint-config-prettier": "10.1.8", "eslint-plugin-vue": "10.5.1", "globals": "16.4.0", "prettier": "3.6.2", "tailwindcss": "4.1.16", "typescript": "5.9.3", "typescript-eslint": "8.46.2", "vite": "7.1.12", "vite-plugin-singlefile": "2.3.0", "vue-tsc": "3.1.2" } }, "node_modules/@babel/helper-string-parser": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", "license": "MIT", "dependencies": { "@babel/types": "^7.28.4" }, "bin": { "parser": "bin/babel-parser.js" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/types": { "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz", "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==", "cpu": [ "ppc64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "aix" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/android-arm": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz", "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==", "cpu": [ "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ "android" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz", "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "android" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/android-x64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz", "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "android" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz", "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz", "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz", "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz", "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz", "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==", "cpu": [ "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz", "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz", "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==", "cpu": [ "ia32" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz", "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==", "cpu": [ "loong64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz", "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==", "cpu": [ "mips64el" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz", "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==", "cpu": [ "ppc64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz", "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==", "cpu": [ "riscv64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz", "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==", "cpu": [ "s390x" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz", "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/netbsd-arm64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz", "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "netbsd" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz", "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "netbsd" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/openbsd-arm64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz", "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "openbsd" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz", "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "openbsd" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz", "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "sunos" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz", "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz", "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==", "cpu": [ "ia32" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz", "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { "node": ">=18" } }, "node_modules/@eslint-community/eslint-utils": { "version": "4.9.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/@eslint-community/regexpp": { "version": "4.12.1", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/config-array": { "version": "0.21.1", "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", "dev": true, "license": "Apache-2.0", "dependencies": { "@eslint/object-schema": "^2.1.7", "debug": "^4.3.1", "minimatch": "^3.1.2" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/config-array/node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/@eslint/config-array/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, "engines": { "node": "*" } }, "node_modules/@eslint/config-helpers": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.1.tgz", "integrity": "sha512-csZAzkNhsgwb0I/UAV6/RGFTbiakPCf0ZrGmrIxQpYvGZ00PhTkSnyKNolphgIvmnJeGw6rcGVEXfTzUnFuEvw==", "dev": true, "license": "Apache-2.0", "dependencies": { "@eslint/core": "^0.16.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/core": { "version": "0.16.0", "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz", "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==", "dev": true, "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.15" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/eslintrc": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^10.0.1", "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "license": "MIT", "engines": { "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, "engines": { "node": "*" } }, "node_modules/@eslint/js": { "version": "9.38.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.38.0.tgz", "integrity": "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A==", "dev": true, "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://eslint.org/donate" } }, "node_modules/@eslint/object-schema": { "version": "2.1.7", "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", "dev": true, "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/plugin-kit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.0.tgz", "integrity": "sha512-sB5uyeq+dwCWyPi31B2gQlVlo+j5brPlWx4yZBrEaRo/nhdDE8Xke1gsGgtiBdaBTxuTkceLVuVt/pclrasb0A==", "dev": true, "license": "Apache-2.0", "dependencies": { "@eslint/core": "^0.16.0", "levn": "^0.4.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, "license": "Apache-2.0", "engines": { "node": ">=18.18.0" } }, "node_modules/@humanfs/node": { "version": "0.16.6", "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, "license": "Apache-2.0", "dependencies": { "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.3.0" }, "engines": { "node": ">=18.18.0" } }, "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", "dev": true, "license": "Apache-2.0", "engines": { "node": ">=18.18" }, "funding": { "type": "github", "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, "license": "Apache-2.0", "engines": { "node": ">=12.22" }, "funding": { "type": "github", "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/retry": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", "dev": true, "license": "Apache-2.0", "engines": { "node": ">=18.18" }, "funding": { "type": "github", "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@intlify/core-base": { "version": "11.1.12", "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-11.1.12.tgz", "integrity": "sha512-whh0trqRsSqVLNEUCwU59pyJZYpU8AmSWl8M3Jz2Mv5ESPP6kFh4juas2NpZ1iCvy7GlNRffUD1xr84gceimjg==", "license": "MIT", "dependencies": { "@intlify/message-compiler": "11.1.12", "@intlify/shared": "11.1.12" }, "engines": { "node": ">= 16" }, "funding": { "url": "https://github.com/sponsors/kazupon" } }, "node_modules/@intlify/message-compiler": { "version": "11.1.12", "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-11.1.12.tgz", "integrity": "sha512-Fv9iQSJoJaXl4ZGkOCN1LDM3trzze0AS2zRz2EHLiwenwL6t0Ki9KySYlyr27yVOj5aVz0e55JePO+kELIvfdQ==", "license": "MIT", "dependencies": { "@intlify/shared": "11.1.12", "source-map-js": "^1.0.2" }, "engines": { "node": ">= 16" }, "funding": { "url": "https://github.com/sponsors/kazupon" } }, "node_modules/@intlify/shared": { "version": "11.1.12", "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-11.1.12.tgz", "integrity": "sha512-Om86EjuQtA69hdNj3GQec9ZC0L0vPSAnXzB3gP/gyJ7+mA7t06d9aOAiqMZ+xEOsumGP4eEBlfl8zF2LOTzf2A==", "license": "MIT", "engines": { "node": ">= 16" }, "funding": { "url": "https://github.com/sponsors/kazupon" } }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "node_modules/@jridgewell/remapping": { "version": "2.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.30", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.30.tgz", "integrity": "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" }, "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" }, "engines": { "node": ">= 8" } }, "node_modules/@rolldown/pluginutils": { "version": "1.0.0-beta.29", "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.29.tgz", "integrity": "sha512-NIJgOsMjbxAXvoGq/X0gD7VPMQ8j9g0BiDaNjVNVjvl+iKXxL3Jre0v31RmBYeLEmkbj2s02v8vFTbUXi5XS2Q==", "dev": true, "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.44.1.tgz", "integrity": "sha512-JAcBr1+fgqx20m7Fwe1DxPUl/hPkee6jA6Pl7n1v2EFiktAHenTaXl5aIFjUIEsfn9w3HE4gK1lEgNGMzBDs1w==", "cpu": [ "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.44.1.tgz", "integrity": "sha512-RurZetXqTu4p+G0ChbnkwBuAtwAbIwJkycw1n6GvlGlBuS4u5qlr5opix8cBAYFJgaY05TWtM+LaoFggUmbZEQ==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.44.1.tgz", "integrity": "sha512-fM/xPesi7g2M7chk37LOnmnSTHLG/v2ggWqKj3CCA1rMA4mm5KVBT1fNoswbo1JhPuNNZrVwpTvlCVggv8A2zg==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.44.1.tgz", "integrity": "sha512-gDnWk57urJrkrHQ2WVx9TSVTH7lSlU7E3AFqiko+bgjlh78aJ88/3nycMax52VIVjIm3ObXnDL2H00e/xzoipw==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-freebsd-arm64": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.44.1.tgz", "integrity": "sha512-wnFQmJ/zPThM5zEGcnDcCJeYJgtSLjh1d//WuHzhf6zT3Md1BvvhJnWoy+HECKu2bMxaIcfWiu3bJgx6z4g2XA==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "freebsd" ] }, "node_modules/@rollup/rollup-freebsd-x64": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.44.1.tgz", "integrity": "sha512-uBmIxoJ4493YATvU2c0upGz87f99e3wop7TJgOA/bXMFd2SvKCI7xkxY/5k50bv7J6dw1SXT4MQBQSLn8Bb/Uw==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "freebsd" ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.44.1.tgz", "integrity": "sha512-n0edDmSHlXFhrlmTK7XBuwKlG5MbS7yleS1cQ9nn4kIeW+dJH+ExqNgQ0RrFRew8Y+0V/x6C5IjsHrJmiHtkxQ==", "cpu": [ "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.44.1.tgz", "integrity": "sha512-8WVUPy3FtAsKSpyk21kV52HCxB+me6YkbkFHATzC2Yd3yuqHwy2lbFL4alJOLXKljoRw08Zk8/xEj89cLQ/4Nw==", "cpu": [ "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.44.1.tgz", "integrity": "sha512-yuktAOaeOgorWDeFJggjuCkMGeITfqvPgkIXhDqsfKX8J3jGyxdDZgBV/2kj/2DyPaLiX6bPdjJDTu9RB8lUPQ==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.44.1.tgz", "integrity": "sha512-W+GBM4ifET1Plw8pdVaecwUgxmiH23CfAUj32u8knq0JPFyK4weRy6H7ooxYFD19YxBulL0Ktsflg5XS7+7u9g==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.44.1.tgz", "integrity": "sha512-1zqnUEMWp9WrGVuVak6jWTl4fEtrVKfZY7CvcBmUUpxAJ7WcSowPSAWIKa/0o5mBL/Ij50SIf9tuirGx63Ovew==", "cpu": [ "loong64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.44.1.tgz", "integrity": "sha512-Rl3JKaRu0LHIx7ExBAAnf0JcOQetQffaw34T8vLlg9b1IhzcBgaIdnvEbbsZq9uZp3uAH+JkHd20Nwn0h9zPjA==", "cpu": [ "ppc64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.44.1.tgz", "integrity": "sha512-j5akelU3snyL6K3N/iX7otLBIl347fGwmd95U5gS/7z6T4ftK288jKq3A5lcFKcx7wwzb5rgNvAg3ZbV4BqUSw==", "cpu": [ "riscv64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.44.1.tgz", "integrity": "sha512-ppn5llVGgrZw7yxbIm8TTvtj1EoPgYUAbfw0uDjIOzzoqlZlZrLJ/KuiE7uf5EpTpCTrNt1EdtzF0naMm0wGYg==", "cpu": [ "riscv64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.44.1.tgz", "integrity": "sha512-Hu6hEdix0oxtUma99jSP7xbvjkUM/ycke/AQQ4EC5g7jNRLLIwjcNwaUy95ZKBJJwg1ZowsclNnjYqzN4zwkAw==", "cpu": [ "s390x" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.44.1.tgz", "integrity": "sha512-EtnsrmZGomz9WxK1bR5079zee3+7a+AdFlghyd6VbAjgRJDbTANJ9dcPIPAi76uG05micpEL+gPGmAKYTschQw==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.44.1.tgz", "integrity": "sha512-iAS4p+J1az6Usn0f8xhgL4PaU878KEtutP4hqw52I4IO6AGoyOkHCxcc4bqufv1tQLdDWFx8lR9YlwxKuv3/3g==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.44.1.tgz", "integrity": "sha512-NtSJVKcXwcqozOl+FwI41OH3OApDyLk3kqTJgx8+gp6On9ZEt5mYhIsKNPGuaZr3p9T6NWPKGU/03Vw4CNU9qg==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.44.1.tgz", "integrity": "sha512-JYA3qvCOLXSsnTR3oiyGws1Dm0YTuxAAeaYGVlGpUsHqloPcFjPg+X0Fj2qODGLNwQOAcCiQmHub/V007kiH5A==", "cpu": [ "ia32" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.44.1.tgz", "integrity": "sha512-J8o22LuF0kTe7m+8PvW9wk3/bRq5+mRo5Dqo6+vXb7otCm3TPhYOJqOaQtGU9YMWQSL3krMnoOxMr0+9E6F3Ug==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@tailwindcss/node": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.16.tgz", "integrity": "sha512-BX5iaSsloNuvKNHRN3k2RcCuTEgASTo77mofW0vmeHkfrDWaoFAFvNHpEgtu0eqyypcyiBkDWzSMxJhp3AUVcw==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/remapping": "^2.3.4", "enhanced-resolve": "^5.18.3", "jiti": "^2.6.1", "lightningcss": "1.30.2", "magic-string": "^0.30.19", "source-map-js": "^1.2.1", "tailwindcss": "4.1.16" } }, "node_modules/@tailwindcss/oxide": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.16.tgz", "integrity": "sha512-2OSv52FRuhdlgyOQqgtQHuCgXnS8nFSYRp2tJ+4WZXKgTxqPy7SMSls8c3mPT5pkZ17SBToGM5LHEJBO7miEdg==", "dev": true, "license": "MIT", "engines": { "node": ">= 10" }, "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.1.16", "@tailwindcss/oxide-darwin-arm64": "4.1.16", "@tailwindcss/oxide-darwin-x64": "4.1.16", "@tailwindcss/oxide-freebsd-x64": "4.1.16", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.16", "@tailwindcss/oxide-linux-arm64-gnu": "4.1.16", "@tailwindcss/oxide-linux-arm64-musl": "4.1.16", "@tailwindcss/oxide-linux-x64-gnu": "4.1.16", "@tailwindcss/oxide-linux-x64-musl": "4.1.16", "@tailwindcss/oxide-wasm32-wasi": "4.1.16", "@tailwindcss/oxide-win32-arm64-msvc": "4.1.16", "@tailwindcss/oxide-win32-x64-msvc": "4.1.16" } }, "node_modules/@tailwindcss/oxide-android-arm64": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.16.tgz", "integrity": "sha512-8+ctzkjHgwDJ5caq9IqRSgsP70xhdhJvm+oueS/yhD5ixLhqTw9fSL1OurzMUhBwE5zK26FXLCz2f/RtkISqHA==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "android" ], "engines": { "node": ">= 10" } }, "node_modules/@tailwindcss/oxide-darwin-arm64": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.16.tgz", "integrity": "sha512-C3oZy5042v2FOALBZtY0JTDnGNdS6w7DxL/odvSny17ORUnaRKhyTse8xYi3yKGyfnTUOdavRCdmc8QqJYwFKA==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { "node": ">= 10" } }, "node_modules/@tailwindcss/oxide-darwin-x64": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.16.tgz", "integrity": "sha512-vjrl/1Ub9+JwU6BP0emgipGjowzYZMjbWCDqwA2Z4vCa+HBSpP4v6U2ddejcHsolsYxwL5r4bPNoamlV0xDdLg==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { "node": ">= 10" } }, "node_modules/@tailwindcss/oxide-freebsd-x64": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.16.tgz", "integrity": "sha512-TSMpPYpQLm+aR1wW5rKuUuEruc/oOX3C7H0BTnPDn7W/eMw8W+MRMpiypKMkXZfwH8wqPIRKppuZoedTtNj2tg==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { "node": ">= 10" } }, "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.16.tgz", "integrity": "sha512-p0GGfRg/w0sdsFKBjMYvvKIiKy/LNWLWgV/plR4lUgrsxFAoQBFrXkZ4C0w8IOXfslB9vHK/JGASWD2IefIpvw==", "cpu": [ "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">= 10" } }, "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.16.tgz", "integrity": "sha512-DoixyMmTNO19rwRPdqviTrG1rYzpxgyYJl8RgQvdAQUzxC1ToLRqtNJpU/ATURSKgIg6uerPw2feW0aS8SNr/w==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">= 10" } }, "node_modules/@tailwindcss/oxide-linux-arm64-musl": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.16.tgz", "integrity": "sha512-H81UXMa9hJhWhaAUca6bU2wm5RRFpuHImrwXBUvPbYb+3jo32I9VIwpOX6hms0fPmA6f2pGVlybO6qU8pF4fzQ==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">= 10" } }, "node_modules/@tailwindcss/oxide-linux-x64-gnu": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.16.tgz", "integrity": "sha512-ZGHQxDtFC2/ruo7t99Qo2TTIvOERULPl5l0K1g0oK6b5PGqjYMga+FcY1wIUnrUxY56h28FxybtDEla+ICOyew==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">= 10" } }, "node_modules/@tailwindcss/oxide-linux-x64-musl": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.16.tgz", "integrity": "sha512-Oi1tAaa0rcKf1Og9MzKeINZzMLPbhxvm7rno5/zuP1WYmpiG0bEHq4AcRUiG2165/WUzvxkW4XDYCscZWbTLZw==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { "node": ">= 10" } }, "node_modules/@tailwindcss/oxide-wasm32-wasi": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.16.tgz", "integrity": "sha512-B01u/b8LteGRwucIBmCQ07FVXLzImWESAIMcUU6nvFt/tYsQ6IHz8DmZ5KtvmwxD+iTYBtM1xwoGXswnlu9v0Q==", "bundleDependencies": [ "@napi-rs/wasm-runtime", "@emnapi/core", "@emnapi/runtime", "@tybys/wasm-util", "@emnapi/wasi-threads", "tslib" ], "cpu": [ "wasm32" ], "dev": true, "license": "MIT", "optional": true, "dependencies": { "@emnapi/core": "^1.5.0", "@emnapi/runtime": "^1.5.0", "@emnapi/wasi-threads": "^1.1.0", "@napi-rs/wasm-runtime": "^1.0.7", "@tybys/wasm-util": "^0.10.1", "tslib": "^2.4.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": { "version": "1.5.0", "dev": true, "inBundle": true, "license": "MIT", "optional": true, "dependencies": { "@emnapi/wasi-threads": "1.1.0", "tslib": "^2.4.0" } }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": { "version": "1.5.0", "dev": true, "inBundle": true, "license": "MIT", "optional": true, "dependencies": { "tslib": "^2.4.0" } }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": { "version": "1.1.0", "dev": true, "inBundle": true, "license": "MIT", "optional": true, "dependencies": { "tslib": "^2.4.0" } }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { "version": "1.0.7", "dev": true, "inBundle": true, "license": "MIT", "optional": true, "dependencies": { "@emnapi/core": "^1.5.0", "@emnapi/runtime": "^1.5.0", "@tybys/wasm-util": "^0.10.1" } }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": { "version": "0.10.1", "dev": true, "inBundle": true, "license": "MIT", "optional": true, "dependencies": { "tslib": "^2.4.0" } }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": { "version": "2.8.1", "dev": true, "inBundle": true, "license": "0BSD", "optional": true }, "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.16.tgz", "integrity": "sha512-zX+Q8sSkGj6HKRTMJXuPvOcP8XfYON24zJBRPlszcH1Np7xuHXhWn8qfFjIujVzvH3BHU+16jBXwgpl20i+v9A==", "cpu": [ "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { "node": ">= 10" } }, "node_modules/@tailwindcss/oxide-win32-x64-msvc": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.16.tgz", "integrity": "sha512-m5dDFJUEejbFqP+UXVstd4W/wnxA4F61q8SoL+mqTypId2T2ZpuxosNSgowiCnLp2+Z+rivdU0AqpfgiD7yCBg==", "cpu": [ "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { "node": ">= 10" } }, "node_modules/@tailwindcss/vite": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.1.16.tgz", "integrity": "sha512-bbguNBcDxsRmi9nnlWJxhfDWamY3lmcyACHcdO1crxfzuLpOhHLLtEIN/nCbbAtj5rchUgQD17QVAKi1f7IsKg==", "dev": true, "license": "MIT", "dependencies": { "@tailwindcss/node": "4.1.16", "@tailwindcss/oxide": "4.1.16", "tailwindcss": "4.1.16" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7" } }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true, "license": "MIT" }, "node_modules/@types/web-bluetooth": { "version": "0.0.21", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.21.tgz", "integrity": "sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==", "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.46.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.2.tgz", "integrity": "sha512-ZGBMToy857/NIPaaCucIUQgqueOiq7HeAKkhlvqVV4lm089zUFW6ikRySx2v+cAhKeUCPuWVHeimyk6Dw1iY3w==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.46.2", "@typescript-eslint/type-utils": "8.46.2", "@typescript-eslint/utils": "8.46.2", "@typescript-eslint/visitor-keys": "8.46.2", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { "@typescript-eslint/parser": "^8.46.2", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", "dev": true, "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/@typescript-eslint/parser": { "version": "8.46.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.2.tgz", "integrity": "sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==", "dev": true, "license": "MIT", "dependencies": { "@typescript-eslint/scope-manager": "8.46.2", "@typescript-eslint/types": "8.46.2", "@typescript-eslint/typescript-estree": "8.46.2", "@typescript-eslint/visitor-keys": "8.46.2", "debug": "^4.3.4" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/project-service": { "version": "8.46.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.2.tgz", "integrity": "sha512-PULOLZ9iqwI7hXcmL4fVfIsBi6AN9YxRc0frbvmg8f+4hQAjQ5GYNKK0DIArNo+rOKmR/iBYwkpBmnIwin4wBg==", "dev": true, "license": "MIT", "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.46.2", "@typescript-eslint/types": "^8.46.2", "debug": "^4.3.4" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/scope-manager": { "version": "8.46.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.2.tgz", "integrity": "sha512-LF4b/NmGvdWEHD2H4MsHD8ny6JpiVNDzrSZr3CsckEgCbAGZbYM4Cqxvi9L+WqDMT+51Ozy7lt2M+d0JLEuBqA==", "dev": true, "license": "MIT", "dependencies": { "@typescript-eslint/types": "8.46.2", "@typescript-eslint/visitor-keys": "8.46.2" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/tsconfig-utils": { "version": "8.46.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.2.tgz", "integrity": "sha512-a7QH6fw4S57+F5y2FIxxSDyi5M4UfGF+Jl1bCGd7+L4KsaUY80GsiF/t0UoRFDHAguKlBaACWJRmdrc6Xfkkag==", "dev": true, "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/type-utils": { "version": "8.46.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.2.tgz", "integrity": "sha512-HbPM4LbaAAt/DjxXaG9yiS9brOOz6fabal4uvUmaUYe6l3K1phQDMQKBRUrr06BQkxkvIZVVHttqiybM9nJsLA==", "dev": true, "license": "MIT", "dependencies": { "@typescript-eslint/types": "8.46.2", "@typescript-eslint/typescript-estree": "8.46.2", "@typescript-eslint/utils": "8.46.2", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/types": { "version": "8.46.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.2.tgz", "integrity": "sha512-lNCWCbq7rpg7qDsQrd3D6NyWYu+gkTENkG5IKYhUIcxSb59SQC/hEQ+MrG4sTgBVghTonNWq42bA/d4yYumldQ==", "dev": true, "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/typescript-estree": { "version": "8.46.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.2.tgz", "integrity": "sha512-f7rW7LJ2b7Uh2EiQ+7sza6RDZnajbNbemn54Ob6fRwQbgcIn+GWfyuHDHRYgRoZu1P4AayVScrRW+YfbTvPQoQ==", "dev": true, "license": "MIT", "dependencies": { "@typescript-eslint/project-service": "8.46.2", "@typescript-eslint/tsconfig-utils": "8.46.2", "@typescript-eslint/types": "8.46.2", "@typescript-eslint/visitor-keys": "8.46.2", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/utils": { "version": "8.46.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.2.tgz", "integrity": "sha512-sExxzucx0Tud5tE0XqR0lT0psBQvEpnpiul9XbGUB1QwpWJJAps1O/Z7hJxLGiZLBKMCutjTzDgmd1muEhBnVg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", "@typescript-eslint/scope-manager": "8.46.2", "@typescript-eslint/types": "8.46.2", "@typescript-eslint/typescript-estree": "8.46.2" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { "version": "8.46.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.2.tgz", "integrity": "sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w==", "dev": true, "license": "MIT", "dependencies": { "@typescript-eslint/types": "8.46.2", "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@vitejs/plugin-vue": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.1.tgz", "integrity": "sha512-+MaE752hU0wfPFJEUAIxqw18+20euHHdxVtMvbFcOEpjEyfqXH/5DCoTHiVJ0J29EhTJdoTkjEv5YBKU9dnoTw==", "dev": true, "license": "MIT", "dependencies": { "@rolldown/pluginutils": "1.0.0-beta.29" }, "engines": { "node": "^20.19.0 || >=22.12.0" }, "peerDependencies": { "vite": "^5.0.0 || ^6.0.0 || ^7.0.0", "vue": "^3.2.25" } }, "node_modules/@volar/language-core": { "version": "2.4.23", "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.23.tgz", "integrity": "sha512-hEEd5ET/oSmBC6pi1j6NaNYRWoAiDhINbT8rmwtINugR39loROSlufGdYMF9TaKGfz+ViGs1Idi3mAhnuPcoGQ==", "dev": true, "license": "MIT", "dependencies": { "@volar/source-map": "2.4.23" } }, "node_modules/@volar/source-map": { "version": "2.4.23", "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.23.tgz", "integrity": "sha512-Z1Uc8IB57Lm6k7q6KIDu/p+JWtf3xsXJqAX/5r18hYOTpJyBn0KXUR8oTJ4WFYOcDzWC9n3IflGgHowx6U6z9Q==", "dev": true, "license": "MIT" }, "node_modules/@volar/typescript": { "version": "2.4.23", "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.23.tgz", "integrity": "sha512-lAB5zJghWxVPqfcStmAP1ZqQacMpe90UrP5RJ3arDyrhy4aCUQqmxPPLB2PWDKugvylmO41ljK7vZ+t6INMTag==", "dev": true, "license": "MIT", "dependencies": { "@volar/language-core": "2.4.23", "path-browserify": "^1.0.1", "vscode-uri": "^3.0.8" } }, "node_modules/@vue/compiler-core": { "version": "3.5.22", "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.22.tgz", "integrity": "sha512-jQ0pFPmZwTEiRNSb+i9Ow/I/cHv2tXYqsnHKKyCQ08irI2kdF5qmYedmF8si8mA7zepUFmJ2hqzS8CQmNOWOkQ==", "license": "MIT", "dependencies": { "@babel/parser": "^7.28.4", "@vue/shared": "3.5.22", "entities": "^4.5.0", "estree-walker": "^2.0.2", "source-map-js": "^1.2.1" } }, "node_modules/@vue/compiler-dom": { "version": "3.5.22", "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.22.tgz", "integrity": "sha512-W8RknzUM1BLkypvdz10OVsGxnMAuSIZs9Wdx1vzA3mL5fNMN15rhrSCLiTm6blWeACwUwizzPVqGJgOGBEN/hA==", "license": "MIT", "dependencies": { "@vue/compiler-core": "3.5.22", "@vue/shared": "3.5.22" } }, "node_modules/@vue/compiler-sfc": { "version": "3.5.22", "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.22.tgz", "integrity": "sha512-tbTR1zKGce4Lj+JLzFXDq36K4vcSZbJ1RBu8FxcDv1IGRz//Dh2EBqksyGVypz3kXpshIfWKGOCcqpSbyGWRJQ==", "license": "MIT", "dependencies": { "@babel/parser": "^7.28.4", "@vue/compiler-core": "3.5.22", "@vue/compiler-dom": "3.5.22", "@vue/compiler-ssr": "3.5.22", "@vue/shared": "3.5.22", "estree-walker": "^2.0.2", "magic-string": "^0.30.19", "postcss": "^8.5.6", "source-map-js": "^1.2.1" } }, "node_modules/@vue/compiler-ssr": { "version": "3.5.22", "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.22.tgz", "integrity": "sha512-GdgyLvg4R+7T8Nk2Mlighx7XGxq/fJf9jaVofc3IL0EPesTE86cP/8DD1lT3h1JeZr2ySBvyqKQJgbS54IX1Ww==", "license": "MIT", "dependencies": { "@vue/compiler-dom": "3.5.22", "@vue/shared": "3.5.22" } }, "node_modules/@vue/devtools-api": { "version": "6.6.4", "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz", "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==", "license": "MIT" }, "node_modules/@vue/language-core": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-3.1.2.tgz", "integrity": "sha512-PyFDCqpdfYUT+oMLqcc61oHfJlC6yjhybaefwQjRdkchIihToOEpJ2Wu/Ebq2yrnJdd1EsaAvZaXVAqcxtnDxQ==", "dev": true, "license": "MIT", "dependencies": { "@volar/language-core": "2.4.23", "@vue/compiler-dom": "^3.5.0", "@vue/shared": "^3.5.0", "alien-signals": "^3.0.0", "muggle-string": "^0.4.1", "path-browserify": "^1.0.1", "picomatch": "^4.0.2" }, "peerDependencies": { "typescript": "*" }, "peerDependenciesMeta": { "typescript": { "optional": true } } }, "node_modules/@vue/language-core/node_modules/picomatch": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/@vue/reactivity": { "version": "3.5.22", "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.22.tgz", "integrity": "sha512-f2Wux4v/Z2pqc9+4SmgZC1p73Z53fyD90NFWXiX9AKVnVBEvLFOWCEgJD3GdGnlxPZt01PSlfmLqbLYzY/Fw4A==", "license": "MIT", "dependencies": { "@vue/shared": "3.5.22" } }, "node_modules/@vue/runtime-core": { "version": "3.5.22", "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.22.tgz", "integrity": "sha512-EHo4W/eiYeAzRTN5PCextDUZ0dMs9I8mQ2Fy+OkzvRPUYQEyK9yAjbasrMCXbLNhF7P0OUyivLjIy0yc6VrLJQ==", "license": "MIT", "dependencies": { "@vue/reactivity": "3.5.22", "@vue/shared": "3.5.22" } }, "node_modules/@vue/runtime-dom": { "version": "3.5.22", "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.22.tgz", "integrity": "sha512-Av60jsryAkI023PlN7LsqrfPvwfxOd2yAwtReCjeuugTJTkgrksYJJstg1e12qle0NarkfhfFu1ox2D+cQotww==", "license": "MIT", "dependencies": { "@vue/reactivity": "3.5.22", "@vue/runtime-core": "3.5.22", "@vue/shared": "3.5.22", "csstype": "^3.1.3" } }, "node_modules/@vue/server-renderer": { "version": "3.5.22", "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.22.tgz", "integrity": "sha512-gXjo+ao0oHYTSswF+a3KRHZ1WszxIqO7u6XwNHqcqb9JfyIL/pbWrrh/xLv7jeDqla9u+LK7yfZKHih1e1RKAQ==", "license": "MIT", "dependencies": { "@vue/compiler-ssr": "3.5.22", "@vue/shared": "3.5.22" }, "peerDependencies": { "vue": "3.5.22" } }, "node_modules/@vue/shared": { "version": "3.5.22", "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.22.tgz", "integrity": "sha512-F4yc6palwq3TT0u+FYf0Ns4Tfl9GRFURDN2gWG7L1ecIaS/4fCIuFOjMTnCyjsu/OK6vaDKLCrGAa+KvvH+h4w==", "license": "MIT" }, "node_modules/@vueuse/core": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-14.0.0.tgz", "integrity": "sha512-d6tKRWkZE8IQElX2aHBxXOMD478fHIYV+Dzm2y9Ag122ICBpNKtGICiXKOhWU3L1kKdttDD9dCMS4bGP3jhCTQ==", "license": "MIT", "dependencies": { "@types/web-bluetooth": "^0.0.21", "@vueuse/metadata": "14.0.0", "@vueuse/shared": "14.0.0" }, "funding": { "url": "https://github.com/sponsors/antfu" }, "peerDependencies": { "vue": "^3.5.0" } }, "node_modules/@vueuse/metadata": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-14.0.0.tgz", "integrity": "sha512-6yoGqbJcMldVCevkFiHDBTB1V5Hq+G/haPlGIuaFZHpXC0HADB0EN1ryQAAceiW+ryS3niUwvdFbGiqHqBrfVA==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@vueuse/shared": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-14.0.0.tgz", "integrity": "sha512-mTCA0uczBgurRlwVaQHfG0Ja7UdGe4g9mwffiJmvLiTtp1G4AQyIjej6si/k8c8pUwTfVpNufck+23gXptPAkw==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/antfu" }, "peerDependencies": { "vue": "^3.5.0" } }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" }, "engines": { "node": ">=0.4.0" } }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" }, "funding": { "type": "github", "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/alien-signals": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-3.0.0.tgz", "integrity": "sha512-JHoRJf18Y6HN4/KZALr3iU+0vW9LKG+8FMThQlbn4+gv8utsLIkwpomjElGPccGeNwh0FI2HN6BLnyFLo6OyLQ==", "dev": true, "license": "MIT" }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, "license": "Python-2.0" }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true, "license": "MIT" }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true, "license": "ISC" }, "node_modules/brace-expansion": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/chalk/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, "engines": { "node": ">=7.0.0" } }, "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, "license": "MIT" }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" }, "engines": { "node": ">= 8" } }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, "license": "MIT", "bin": { "cssesc": "bin/cssesc" }, "engines": { "node": ">=4" } }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "license": "MIT" }, "node_modules/debug": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" }, "engines": { "node": ">=6.0" }, "peerDependenciesMeta": { "supports-color": { "optional": true } } }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true, "license": "MIT" }, "node_modules/detect-libc": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", "dev": true, "license": "Apache-2.0", "engines": { "node": ">=8" } }, "node_modules/enhanced-resolve": { "version": "5.18.3", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", "dev": true, "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" }, "engines": { "node": ">=10.13.0" } }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "license": "BSD-2-Clause", "engines": { "node": ">=0.12" }, "funding": { "url": "https://github.com/fb55/entities?sponsor=1" } }, "node_modules/esbuild": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz", "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==", "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, "engines": { "node": ">=18" }, "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.0", "@esbuild/android-arm": "0.25.0", "@esbuild/android-arm64": "0.25.0", "@esbuild/android-x64": "0.25.0", "@esbuild/darwin-arm64": "0.25.0", "@esbuild/darwin-x64": "0.25.0", "@esbuild/freebsd-arm64": "0.25.0", "@esbuild/freebsd-x64": "0.25.0", "@esbuild/linux-arm": "0.25.0", "@esbuild/linux-arm64": "0.25.0", "@esbuild/linux-ia32": "0.25.0", "@esbuild/linux-loong64": "0.25.0", "@esbuild/linux-mips64el": "0.25.0", "@esbuild/linux-ppc64": "0.25.0", "@esbuild/linux-riscv64": "0.25.0", "@esbuild/linux-s390x": "0.25.0", "@esbuild/linux-x64": "0.25.0", "@esbuild/netbsd-arm64": "0.25.0", "@esbuild/netbsd-x64": "0.25.0", "@esbuild/openbsd-arm64": "0.25.0", "@esbuild/openbsd-x64": "0.25.0", "@esbuild/sunos-x64": "0.25.0", "@esbuild/win32-arm64": "0.25.0", "@esbuild/win32-ia32": "0.25.0", "@esbuild/win32-x64": "0.25.0" } }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "license": "MIT", "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint": { "version": "9.38.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.38.0.tgz", "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.1", "@eslint/config-helpers": "^0.4.1", "@eslint/core": "^0.16.0", "@eslint/eslintrc": "^3.3.1", "@eslint/js": "9.38.0", "@eslint/plugin-kit": "^0.4.0", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.4.0", "eslint-visitor-keys": "^4.2.1", "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://eslint.org/donate" }, "peerDependencies": { "jiti": "*" }, "peerDependenciesMeta": { "jiti": { "optional": true } } }, "node_modules/eslint-config-prettier": { "version": "10.1.8", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", "dev": true, "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, "funding": { "url": "https://opencollective.com/eslint-config-prettier" }, "peerDependencies": { "eslint": ">=7.0.0" } }, "node_modules/eslint-plugin-vue": { "version": "10.5.1", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-10.5.1.tgz", "integrity": "sha512-SbR9ZBUFKgvWAbq3RrdCtWaW0IKm6wwUiApxf3BVTNfqUIo4IQQmreMg2iHFJJ6C/0wss3LXURBJ1OwS/MhFcQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "natural-compare": "^1.4.0", "nth-check": "^2.1.1", "postcss-selector-parser": "^6.0.15", "semver": "^7.6.3", "xml-name-validator": "^4.0.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "peerDependencies": { "@stylistic/eslint-plugin": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0", "@typescript-eslint/parser": "^7.0.0 || ^8.0.0", "eslint": "^8.57.0 || ^9.0.0", "vue-eslint-parser": "^10.0.0" }, "peerDependenciesMeta": { "@stylistic/eslint-plugin": { "optional": true }, "@typescript-eslint/parser": { "optional": true } } }, "node_modules/eslint-scope": { "version": "8.4.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, "engines": { "node": "*" } }, "node_modules/espree": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/esquery": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, "engines": { "node": ">=0.10" } }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, "engines": { "node": ">=4.0" } }, "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "license": "MIT" }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true, "license": "MIT" }, "node_modules/fast-glob": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" } }, "node_modules/fast-glob/node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, "engines": { "node": ">= 6" } }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true, "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true, "license": "MIT" }, "node_modules/fastq": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "dev": true, "license": "ISC", "dependencies": { "reusify": "^1.0.4" } }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { "flat-cache": "^4.0.0" }, "engines": { "node": ">=16.0.0" } }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" }, "engines": { "node": ">=16" } }, "node_modules/flatted": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", "dev": true, "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, "engines": { "node": ">=10.13.0" } }, "node_modules/globals": { "version": "16.4.0", "resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz", "integrity": "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==", "dev": true, "license": "MIT", "engines": { "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true, "license": "ISC" }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true, "license": "MIT" }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" }, "engines": { "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, "license": "MIT", "engines": { "node": ">=0.8.19" } }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, "engines": { "node": ">=0.10.0" } }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true, "license": "ISC" }, "node_modules/jiti": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", "dev": true, "license": "MIT", "bin": { "jiti": "lib/jiti-cli.mjs" } }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true, "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true, "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true, "license": "MIT" }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/lightningcss": { "version": "1.30.2", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.2.tgz", "integrity": "sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ==", "dev": true, "license": "MPL-2.0", "dependencies": { "detect-libc": "^2.0.3" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" }, "optionalDependencies": { "lightningcss-android-arm64": "1.30.2", "lightningcss-darwin-arm64": "1.30.2", "lightningcss-darwin-x64": "1.30.2", "lightningcss-freebsd-x64": "1.30.2", "lightningcss-linux-arm-gnueabihf": "1.30.2", "lightningcss-linux-arm64-gnu": "1.30.2", "lightningcss-linux-arm64-musl": "1.30.2", "lightningcss-linux-x64-gnu": "1.30.2", "lightningcss-linux-x64-musl": "1.30.2", "lightningcss-win32-arm64-msvc": "1.30.2", "lightningcss-win32-x64-msvc": "1.30.2" } }, "node_modules/lightningcss-android-arm64": { "version": "1.30.2", "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.30.2.tgz", "integrity": "sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A==", "cpu": [ "arm64" ], "dev": true, "license": "MPL-2.0", "optional": true, "os": [ "android" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-darwin-arm64": { "version": "1.30.2", "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.2.tgz", "integrity": "sha512-ylTcDJBN3Hp21TdhRT5zBOIi73P6/W0qwvlFEk22fkdXchtNTOU4Qc37SkzV+EKYxLouZ6M4LG9NfZ1qkhhBWA==", "cpu": [ "arm64" ], "dev": true, "license": "MPL-2.0", "optional": true, "os": [ "darwin" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-darwin-x64": { "version": "1.30.2", "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.2.tgz", "integrity": "sha512-oBZgKchomuDYxr7ilwLcyms6BCyLn0z8J0+ZZmfpjwg9fRVZIR5/GMXd7r9RH94iDhld3UmSjBM6nXWM2TfZTQ==", "cpu": [ "x64" ], "dev": true, "license": "MPL-2.0", "optional": true, "os": [ "darwin" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-freebsd-x64": { "version": "1.30.2", "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.2.tgz", "integrity": "sha512-c2bH6xTrf4BDpK8MoGG4Bd6zAMZDAXS569UxCAGcA7IKbHNMlhGQ89eRmvpIUGfKWNVdbhSbkQaWhEoMGmGslA==", "cpu": [ "x64" ], "dev": true, "license": "MPL-2.0", "optional": true, "os": [ "freebsd" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-linux-arm-gnueabihf": { "version": "1.30.2", "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.2.tgz", "integrity": "sha512-eVdpxh4wYcm0PofJIZVuYuLiqBIakQ9uFZmipf6LF/HRj5Bgm0eb3qL/mr1smyXIS1twwOxNWndd8z0E374hiA==", "cpu": [ "arm" ], "dev": true, "license": "MPL-2.0", "optional": true, "os": [ "linux" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-linux-arm64-gnu": { "version": "1.30.2", "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.2.tgz", "integrity": "sha512-UK65WJAbwIJbiBFXpxrbTNArtfuznvxAJw4Q2ZGlU8kPeDIWEX1dg3rn2veBVUylA2Ezg89ktszWbaQnxD/e3A==", "cpu": [ "arm64" ], "dev": true, "license": "MPL-2.0", "optional": true, "os": [ "linux" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-linux-arm64-musl": { "version": "1.30.2", "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.2.tgz", "integrity": "sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==", "cpu": [ "arm64" ], "dev": true, "license": "MPL-2.0", "optional": true, "os": [ "linux" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-linux-x64-gnu": { "version": "1.30.2", "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.30.2.tgz", "integrity": "sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==", "cpu": [ "x64" ], "dev": true, "license": "MPL-2.0", "optional": true, "os": [ "linux" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-linux-x64-musl": { "version": "1.30.2", "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.30.2.tgz", "integrity": "sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==", "cpu": [ "x64" ], "dev": true, "license": "MPL-2.0", "optional": true, "os": [ "linux" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-win32-arm64-msvc": { "version": "1.30.2", "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.2.tgz", "integrity": "sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==", "cpu": [ "arm64" ], "dev": true, "license": "MPL-2.0", "optional": true, "os": [ "win32" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-win32-x64-msvc": { "version": "1.30.2", "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.30.2.tgz", "integrity": "sha512-5g1yc73p+iAkid5phb4oVFMB45417DkRevRbt/El/gKXJk4jid+vPFF/AXbxn05Aky8PapwzZrdJShv5C0avjw==", "cpu": [ "x64" ], "dev": true, "license": "MPL-2.0", "optional": true, "os": [ "win32" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true, "license": "MIT", "peer": true }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true, "license": "MIT" }, "node_modules/lucide-vue-next": { "version": "0.548.0", "resolved": "https://registry.npmjs.org/lucide-vue-next/-/lucide-vue-next-0.548.0.tgz", "integrity": "sha512-VtL3HkoPOhrhBkJdLWm6JY1kmCetsri1lvoaenem5PQagO2cjR1sNENNnuLJHzl/l0IcFg8RKJyiHt2GZtvj2A==", "license": "ISC", "peerDependencies": { "vue": ">=3.0.1" } }, "node_modules/magic-string": { "version": "0.30.19", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz", "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==", "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "license": "MIT", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" } }, "node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, "node_modules/muggle-string": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz", "integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==", "dev": true, "license": "MIT" }, "node_modules/nanoid": { "version": "3.3.11", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, "engines": { "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true, "license": "MIT" }, "node_modules/nth-check": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "boolbase": "^1.0.0" }, "funding": { "url": "https://github.com/fb55/nth-check?sponsor=1" } }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, "engines": { "node": ">=6" } }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", "dev": true, "license": "MIT" }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "license": "MIT", "engines": { "node": ">=8.6" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/postcss": { "version": "8.5.6", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", "funding": [ { "type": "opencollective", "url": "https://opencollective.com/postcss/" }, { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" }, { "type": "github", "url": "https://github.com/sponsors/ai" } ], "license": "MIT", "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" } }, "node_modules/postcss-selector-parser": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, "license": "MIT", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" }, "engines": { "node": ">=4" } }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/feross" }, { "type": "patreon", "url": "https://www.patreon.com/feross" }, { "type": "consulting", "url": "https://feross.org/support" } ], "license": "MIT" }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/reusify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, "node_modules/rollup": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.44.1.tgz", "integrity": "sha512-x8H8aPvD+xbl0Do8oez5f5o8eMS3trfCghc4HhLAnCkj7Vl0d1JWGs0UF/D886zLW2rOj2QymV/JcSSsw+XDNg==", "dev": true, "license": "MIT", "dependencies": { "@types/estree": "1.0.8" }, "bin": { "rollup": "dist/bin/rollup" }, "engines": { "node": ">=18.0.0", "npm": ">=8.0.0" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.44.1", "@rollup/rollup-android-arm64": "4.44.1", "@rollup/rollup-darwin-arm64": "4.44.1", "@rollup/rollup-darwin-x64": "4.44.1", "@rollup/rollup-freebsd-arm64": "4.44.1", "@rollup/rollup-freebsd-x64": "4.44.1", "@rollup/rollup-linux-arm-gnueabihf": "4.44.1", "@rollup/rollup-linux-arm-musleabihf": "4.44.1", "@rollup/rollup-linux-arm64-gnu": "4.44.1", "@rollup/rollup-linux-arm64-musl": "4.44.1", "@rollup/rollup-linux-loongarch64-gnu": "4.44.1", "@rollup/rollup-linux-powerpc64le-gnu": "4.44.1", "@rollup/rollup-linux-riscv64-gnu": "4.44.1", "@rollup/rollup-linux-riscv64-musl": "4.44.1", "@rollup/rollup-linux-s390x-gnu": "4.44.1", "@rollup/rollup-linux-x64-gnu": "4.44.1", "@rollup/rollup-linux-x64-musl": "4.44.1", "@rollup/rollup-win32-arm64-msvc": "4.44.1", "@rollup/rollup-win32-ia32-msvc": "4.44.1", "@rollup/rollup-win32-x64-msvc": "4.44.1", "fsevents": "~2.3.2" } }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/feross" }, { "type": "patreon", "url": "https://www.patreon.com/feross" }, { "type": "consulting", "url": "https://feross.org/support" } ], "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" }, "engines": { "node": ">=10" } }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, "engines": { "node": ">=8" } }, "node_modules/shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "license": "MIT", "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/tailwindcss": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.16.tgz", "integrity": "sha512-pONL5awpaQX4LN5eiv7moSiSPd/DLDzKVRJz8Q9PgzmAdd1R4307GQS2ZpfiN7ZmekdQrfhZZiSE5jkLR4WNaA==", "dev": true, "license": "MIT" }, "node_modules/tapable": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/tinyglobby": { "version": "0.2.15", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "license": "MIT", "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.3" }, "engines": { "node": ">=12.0.0" }, "funding": { "url": "https://github.com/sponsors/SuperchupuDev" } }, "node_modules/tinyglobby/node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", "engines": { "node": ">=12.0.0" }, "peerDependencies": { "picomatch": "^3 || ^4" }, "peerDependenciesMeta": { "picomatch": { "optional": true } } }, "node_modules/tinyglobby/node_modules/picomatch": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, "engines": { "node": ">=8.0" } }, "node_modules/ts-api-utils": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", "dev": true, "license": "MIT", "engines": { "node": ">=18.12" }, "peerDependencies": { "typescript": ">=4.8.4" } }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { "node": ">=14.17" } }, "node_modules/typescript-eslint": { "version": "8.46.2", "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.46.2.tgz", "integrity": "sha512-vbw8bOmiuYNdzzV3lsiWv6sRwjyuKJMQqWulBOU7M0RrxedXledX8G8kBbQeiOYDnTfiXz0Y4081E1QMNB6iQg==", "dev": true, "license": "MIT", "dependencies": { "@typescript-eslint/eslint-plugin": "8.46.2", "@typescript-eslint/parser": "8.46.2", "@typescript-eslint/typescript-estree": "8.46.2", "@typescript-eslint/utils": "8.46.2" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true, "license": "MIT" }, "node_modules/vite": { "version": "7.1.12", "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.12.tgz", "integrity": "sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==", "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "bin": { "vite": "bin/vite.js" }, "engines": { "node": "^20.19.0 || >=22.12.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "peerDependenciesMeta": { "@types/node": { "optional": true }, "jiti": { "optional": true }, "less": { "optional": true }, "lightningcss": { "optional": true }, "sass": { "optional": true }, "sass-embedded": { "optional": true }, "stylus": { "optional": true }, "sugarss": { "optional": true }, "terser": { "optional": true }, "tsx": { "optional": true }, "yaml": { "optional": true } } }, "node_modules/vite-plugin-singlefile": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/vite-plugin-singlefile/-/vite-plugin-singlefile-2.3.0.tgz", "integrity": "sha512-DAcHzYypM0CasNLSz/WG0VdKOCxGHErfrjOoyIPiNxTPTGmO6rRD/te93n1YL/s+miXq66ipF1brMBikf99c6A==", "dev": true, "license": "MIT", "dependencies": { "micromatch": "^4.0.8" }, "engines": { "node": ">18.0.0" }, "peerDependencies": { "rollup": "^4.44.1", "vite": "^5.4.11 || ^6.0.0 || ^7.0.0" } }, "node_modules/vite/node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", "engines": { "node": ">=12.0.0" }, "peerDependencies": { "picomatch": "^3 || ^4" }, "peerDependenciesMeta": { "picomatch": { "optional": true } } }, "node_modules/vite/node_modules/picomatch": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/vscode-uri": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", "dev": true, "license": "MIT" }, "node_modules/vue": { "version": "3.5.22", "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.22.tgz", "integrity": "sha512-toaZjQ3a/G/mYaLSbV+QsQhIdMo9x5rrqIpYRObsJ6T/J+RyCSFwN2LHNVH9v8uIcljDNa3QzPVdv3Y6b9hAJQ==", "license": "MIT", "dependencies": { "@vue/compiler-dom": "3.5.22", "@vue/compiler-sfc": "3.5.22", "@vue/runtime-dom": "3.5.22", "@vue/server-renderer": "3.5.22", "@vue/shared": "3.5.22" }, "peerDependencies": { "typescript": "*" }, "peerDependenciesMeta": { "typescript": { "optional": true } } }, "node_modules/vue-easy-lightbox": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/vue-easy-lightbox/-/vue-easy-lightbox-1.19.0.tgz", "integrity": "sha512-YxLXgjEn91UF3DuK1y8u3Pyx2sJ7a/MnBpkyrBSQkvU1glzEJASyAZ7N+5yDpmxBQDVMwCsL2VmxWGIiFrWCgA==", "license": "MIT", "engines": { "node": ">=14.18.3" }, "peerDependencies": { "vue": "^3.0.0" } }, "node_modules/vue-eslint-parser": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-10.0.0.tgz", "integrity": "sha512-xGtmOQJzWUIi6opA7CfJTJsJyCRjibJKHNzq39yqJ/f4AJ+N7Ngr7lDZMl/9ePaobBnsZgifu+7G6bST+gaYJA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "debug": "^4.4.0", "eslint-scope": "^8.2.0", "eslint-visitor-keys": "^4.2.0", "espree": "^10.3.0", "esquery": "^1.6.0", "lodash": "^4.17.21", "semver": "^7.6.3" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://github.com/sponsors/mysticatea" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0" } }, "node_modules/vue-i18n": { "version": "11.1.12", "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-11.1.12.tgz", "integrity": "sha512-BnstPj3KLHLrsqbVU2UOrPmr0+Mv11bsUZG0PyCOzsawCivk8W00GMXHeVUWIDOgNaScCuZah47CZFE+Wnl8mw==", "license": "MIT", "dependencies": { "@intlify/core-base": "11.1.12", "@intlify/shared": "11.1.12", "@vue/devtools-api": "^6.5.0" }, "engines": { "node": ">= 16" }, "funding": { "url": "https://github.com/sponsors/kazupon" }, "peerDependencies": { "vue": "^3.0.0" } }, "node_modules/vue-resizables": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/vue-resizables/-/vue-resizables-0.7.1.tgz", "integrity": "sha512-sKG0QvbQE+sTKQtuXAnkjA2GTNZIt25LeaGDavA76tMJVUASpJ9+4cFWxZEJLfxBNJ4SX3e1qup/IUI4AUJWjg==", "license": "MIT", "peerDependencies": { "vue": "^3.0.0" } }, "node_modules/vue-tsc": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-3.1.2.tgz", "integrity": "sha512-3fd4DY0rFczs5f+VB3OhcLU83V6+3Puj2yLBe0Ak65k7ERk+STVNKaOAi0EBo6Lc15UiJB6LzU6Mxy4+h/pKew==", "dev": true, "license": "MIT", "dependencies": { "@volar/typescript": "2.4.23", "@vue/language-core": "3.1.2" }, "bin": { "vue-tsc": "bin/vue-tsc.js" }, "peerDependencies": { "typescript": ">=5.0.0" } }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "bin/node-which" }, "engines": { "node": ">= 8" } }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/xml-name-validator": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", "dev": true, "license": "Apache-2.0", "engines": { "node": ">=12" } }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "license": "MIT", "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } } } } jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/package.json000066400000000000000000000015301514323636100244200ustar00rootroot00000000000000{ "name": "html-report", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vue-tsc -b && vite build", "preview": "vite preview" }, "dependencies": { "@vueuse/core": "^14.0.0", "lucide-vue-next": "^0.548.0", "vue": "^3.4.37", "vue-easy-lightbox": "^1.19.0", "vue-i18n": "^11.0.0", "vue-resizables": "^0.7.1" }, "devDependencies": { "@eslint/js": "9.38.0", "@tailwindcss/vite": "4.1.16", "@vitejs/plugin-vue": "6.0.1", "eslint": "9.38.0", "eslint-config-prettier": "10.1.8", "eslint-plugin-vue": "10.5.1", "globals": "16.4.0", "prettier": "3.6.2", "tailwindcss": "4.1.16", "typescript": "5.9.3", "typescript-eslint": "8.46.2", "vite": "7.1.12", "vite-plugin-singlefile": "2.3.0", "vue-tsc": "3.1.2" } } jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/public/000077500000000000000000000000001514323636100234115ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/public/init.js000066400000000000000000000341751514323636100247240ustar00rootroot00000000000000globalThis.testExecutions = [ { id: "1", name: "open-test-report.xml", durationMillis: 85, sections: [ { title: "Infrastructure", blocks: [ { type: "kvp", content: { Hostname: "coriol", Username: "marc", "Operating system": "Linux", "CPU cores": "16", }, }, ], }, { title: "Java Virtual Machine", blocks: [ { type: "kvp", content: { "Java version": "21.0.5", "File encoding": "UTF-8", "Max heap size": "512 MiB (536870912 bytes)", }, }, ], }, { title: "Git", blocks: [ { type: "kvp", content: { Origin: "https://github.com/ota4j-team/open-test-reporting.git", Branch: "main", "Commit hash": "95a3fcc4e967f93e01ca54eac9077901e682a411", Clean: "true", }, }, ], }, ], roots: ["2"], children: { 2: { ids: ["3"], childStatuses: ["FAILED", "SUCCESSFUL", "SKIPPED", "ABORTED"], }, 3: { ids: ["4", "5", "6", "7"], childStatuses: ["FAILED", "SUCCESSFUL", "SKIPPED", "ABORTED"], }, }, testNodes: [ { id: "2", name: "JUnit Jupiter", durationMillis: 85, status: "SUCCESSFUL", sections: [ { title: "JUnit metadata", blocks: [ { type: "kvp", content: { Type: "CONTAINER", "Unique ID": "[engine:junit-jupiter]", "Legacy reporting name": "JUnit Jupiter", }, }, ], }, ], }, { id: "3", name: "KitchenSinkTests", durationMillis: 70, status: "SUCCESSFUL", sections: [ { title: "Tags", blocks: [{ type: "labels", content: ["inherited"] }], }, { title: "Sources", blocks: [ { type: "sub", content: [ { title: "Class", blocks: [ { type: "kvp", content: { "Class name": "org.example.KitchenSinkTests", }, }, ], }, ], }, ], }, { title: "JUnit metadata", blocks: [ { type: "kvp", content: { Type: "CONTAINER", "Unique ID": "[engine:junit-jupiter]/[class:org.example.KitchenSinkTests]", "Legacy reporting name": "org.example.KitchenSinkTests", }, }, ], }, { title: "Attachments", blocks: [ { type: "sub", content: [ { title: "Data", metaInfo: "2025-01-04T13:42:08.569908895", blocks: [{ type: "kvp", content: { value: "beforeAll" } }], }, ], }, ], }, ], }, { id: "4", name: "successful test", durationMillis: 13, status: "SUCCESSFUL", sections: [ { title: "Tags", blocks: [{ type: "labels", content: ["inherited", "success"] }], }, { title: "Sources", blocks: [ { type: "sub", content: [ { title: "Method", blocks: [ { type: "kvp", content: { "Class name": "org.example.KitchenSinkTests", "Method name": "successful", "Method parameter types": "org.junit.jupiter.api.TestReporter", }, }, ], }, ], }, ], }, { title: "JUnit metadata", blocks: [ { type: "kvp", content: { Type: "TEST", "Unique ID": "[engine:junit-jupiter]/[class:org.example.KitchenSinkTests]/[method:successful(org.junit.jupiter.api.TestReporter)]", "Legacy reporting name": "successful(TestReporter)", }, }, ], }, { title: "Attachments", blocks: [ { type: "sub", content: [ { title: "Data", metaInfo: "2025-01-04T13:42:08.581025508", blocks: [{ type: "kvp", content: { value: "✅" } }], }, ], }, ], }, ], }, { id: "5", name: "skipped()", durationMillis: 1, status: "SKIPPED", sections: [ { title: "Tags", blocks: [{ type: "labels", content: ["aborted", "inherited"] }], }, { title: "Sources", blocks: [ { type: "sub", content: [ { title: "Method", blocks: [ { type: "kvp", content: { "Class name": "org.example.KitchenSinkTests", "Method name": "skipped", }, }, ], }, ], }, ], }, { title: "JUnit metadata", blocks: [ { type: "kvp", content: { Type: "TEST", "Unique ID": "[engine:junit-jupiter]/[class:org.example.KitchenSinkTests]/[method:skipped()]", "Legacy reporting name": "skipped()", }, }, ], }, { title: "Reason", blocks: [{ type: "p", content: "for demonstration purposes" }], }, ], }, { id: "6", name: "aborted(TestReporter)", durationMillis: 7, status: "ABORTED", sections: [ { title: "Tags", blocks: [{ type: "labels", content: ["aborted", "inherited"] }], }, { title: "Sources", blocks: [ { type: "sub", content: [ { title: "Method", blocks: [ { type: "kvp", content: { "Class name": "org.example.KitchenSinkTests", "Method name": "aborted", "Method parameter types": "org.junit.jupiter.api.TestReporter", }, }, ], }, ], }, ], }, { title: "JUnit metadata", blocks: [ { type: "kvp", content: { Type: "TEST", "Unique ID": "[engine:junit-jupiter]/[class:org.example.KitchenSinkTests]/[method:aborted(org.junit.jupiter.api.TestReporter)]", "Legacy reporting name": "aborted(TestReporter)", }, }, ], }, { title: "Result", blocks: [ { type: "sub", content: [ { title: "org.opentest4j.TestAbortedException", blocks: [ { type: "pre", content: "org.opentest4j.TestAbortedException: for demonstration purposes\n\tat org.junit.jupiter.api.Assumptions.abort(Assumptions.java:300)\n\tat org.example.KitchenSinkTests.aborted(KitchenSinkTests.java:55)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n", }, ], }, ], }, ], }, { title: "Attachments", blocks: [ { type: "sub", content: [ { title: "Data", metaInfo: "2025-01-04T13:42:08.598566069", blocks: [{ type: "kvp", content: { foo: "bar" } }], }, { title: "Data", metaInfo: "2025-01-04T13:42:08.599224439", blocks: [{ type: "kvp", content: { baz: "qux" } }], }, ], }, ], }, ], }, { id: "7", name: "failed(TestReporter)", durationMillis: 15, status: "FAILED", sections: [ { title: "Tags", blocks: [{ type: "labels", content: ["failure", "inherited"] }], }, { title: "Sources", blocks: [ { type: "sub", content: [ { title: "Method", blocks: [ { type: "kvp", content: { "Class name": "org.example.KitchenSinkTests", "Method name": "failed", "Method parameter types": "org.junit.jupiter.api.TestReporter", }, }, ], }, ], }, ], }, { title: "JUnit metadata", blocks: [ { type: "kvp", content: { Type: "TEST", "Unique ID": "[engine:junit-jupiter]/[class:org.example.KitchenSinkTests]/[method:failed(org.junit.jupiter.api.TestReporter)]", "Legacy reporting name": "failed(TestReporter)", }, }, ], }, { title: "Result", blocks: [ { type: "sub", content: [ { title: "org.opentest4j.AssertionFailedError", blocks: [ { type: "pre", content: "org.opentest4j.AssertionFailedError: expected: \u003cfoo\u003e but was: \u003cbar\u003e\n\tat org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)\n\tat org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)\n\tat org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)\n\tat org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)\n\tat org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177)\n\tat org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1145)\n\tat org.example.KitchenSinkTests.failed(KitchenSinkTests.java:73)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n", }, ], }, ], }, ], }, { title: "Attachments", blocks: [ { type: "sub", content: [ { title: "Data", metaInfo: "2025-01-04T13:42:08.608483976", blocks: [ { type: "kvp", content: { foo: "bar", baz: "qux" } }, ], }, { title: "File", metaInfo: "2025-01-04T13:42:08.612645162", blocks: [ { type: "pre", content: "Hellö, Wörld!\n" }, { type: "kvp", content: { Filename: "test.txt", Path: "link:junit-jupiter/org.example.KitchenSinkTests/failed(org.junit.jupiter.api.TestReporter)/test.txt", "Media type": "text/plain; charset\u003dISO-8859-1", }, }, ], }, { title: "Standard output", metaInfo: "2025-01-04T13:42:08.619179136", blocks: [ { type: "pre", content: "some standard output\n" }, ], }, { title: "Standard error", metaInfo: "2025-01-04T13:42:08.619179136", blocks: [{ type: "pre", content: "some error output\n" }], }, ], }, ], }, ], }, ], }, ]; jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/000077500000000000000000000000001514323636100227225ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/App.vue000066400000000000000000000026601514323636100241670ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/000077500000000000000000000000001514323636100251075ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/common/000077500000000000000000000000001514323636100263775ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/common/ExecutionIcon.vue000066400000000000000000000006531514323636100317000ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/common/Selection.ts000066400000000000000000000004771514323636100307040ustar00rootroot00000000000000import TestExecution from "./TestExecution.ts"; export default class Selection { public readonly execution: TestExecution; public readonly item: TestNodeData | TestExecution; constructor(execution: TestExecution, item: TestNodeData | TestExecution) { this.execution = execution; this.item = item; } } jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/common/TestExecution.ts000066400000000000000000000101051514323636100315470ustar00rootroot00000000000000import Selection from "./Selection.ts"; export default class TestExecution { private static readonly STATUSES = [ "SKIPPED", "ABORTED", "SUCCESSFUL", "FAILED", "ERRORED", ]; static initialSelection(executions: TestExecution[]): Selection | undefined { const failedExecution = executions.find((e) => this.isFailedOrErrored(e.overallStatus()), ); if (failedExecution) { const failedNode = Array.from(failedExecution.testNodes.values()).find( (n) => this.isFailedOrErrored(n.status), ); if (failedNode) { return new Selection(failedExecution, failedNode); } } if (executions.length > 0) { return new Selection(executions[0], executions[0]); } return undefined; } private static isFailedOrErrored(status: string) { return status === "FAILED" || status == "ERRORED"; } static overallStatus(executions: TestExecution[]): string { const statuses = executions .map((e) => TestExecution.STATUSES.indexOf(e.overallStatus())) .sort(); return statuses.length > 0 ? TestExecution.STATUSES[statuses[statuses.length - 1]] : TestExecution.STATUSES[0]; } static statusCount(executions: TestExecution[]): Map { const statusCount = new Map(); TestExecution.STATUSES.forEach((s) => statusCount.set(s, 0)); executions.forEach((e) => { e.statusCount().forEach((count, status) => { statusCount.set(status, statusCount.get(status)! + count); }); }); return statusCount; } public readonly id: string; public readonly name: string; public readonly durationMillis: number; public readonly sections: SectionData[]; private readonly rootIds: string[]; private readonly childrenMetadata: Map; private readonly parentIds: Map; private readonly testNodes: Map; constructor(execution: ExecutionData) { this.id = execution.id; this.name = execution.name; this.durationMillis = execution.durationMillis; this.sections = execution.sections || []; this.rootIds = execution.roots || []; this.childrenMetadata = new Map( Object.entries(execution.children ? execution.children : []), ); this.parentIds = new Map(); this.childrenMetadata.forEach((children, p) => { children.ids?.forEach((c) => this.parentIds.set(c, p)); }); this.testNodes = new Map(execution.testNodes?.map((n) => [n.id, n])); } size(): number { return this.testNodes.size; } nodesWithChildren(): TestNodeData[] { return Array.from(this.childrenMetadata.keys()).map( (id) => this.testNodes.get(id)!, ); } roots(): TestNodeData[] { return this.rootIds.map((id) => this.testNodes.get(id)!); } children(node: TestNodeData): TestNodeData[] { if (this.childrenMetadata.has(node.id)) { return this.childrenMetadata .get(node.id)! .ids!.map((id) => this.testNodes.get(id)!); } return []; } parents(node: TestNodeData): (TestNodeData | TestExecution)[] { if (this.parentIds.has(node.id)) { const parentId = this.parentIds.get(node.id)!; const parent = this.testNodes.get(parentId)!; return [...this.parents(parent), parent]; } return [this]; } nodeStatuses(node: TestNodeData): string[] { if (this.childrenMetadata.has(node.id)) { return this.childrenMetadata.get(node.id)!.childStatuses!; } return node.status ? [node.status] : []; } overallStatus(): string { const statuses = Array.from(this.testNodes.values()) .map((node) => TestExecution.STATUSES.indexOf(node.status)) .sort(); return statuses.length > 0 ? TestExecution.STATUSES[statuses[statuses.length - 1]] : TestExecution.STATUSES[0]; } statusCount(): Map { const result = new Map(); TestExecution.STATUSES.forEach((s) => result.set(s, 0)); Array.from(this.testNodes.values()).forEach((n) => result.set(n.status, result.get(n.status)! + 1), ); return result; } } jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/common/TestResultStatus.ts000066400000000000000000000017721514323636100323000ustar00rootroot00000000000000export const testResultStatusForegroundColorClass = (status: string) => { switch (status) { case "SUCCESSFUL": return "text-green-600"; case "ABORTED": return "text-yellow-600"; case "SKIPPED": return "text-sky-600"; default: return "text-red-600"; } }; export const testResultStatusBackgroundColorClasses = (status: string) => { switch (status) { case "SUCCESSFUL": return [ "border-green-600", "bg-green-500", "dark:border-green-500", "dark:bg-green-600", ]; case "ABORTED": return [ "border-yellow-600", "bg-yellow-500", "dark:border-yellow-500", "dark:bg-yellow-600", ]; case "SKIPPED": return [ "border-sky-600", "bg-sky-500", "dark:border-sky-500", "dark:bg-sky-600", ]; default: return [ "border-red-600", "bg-red-500", "dark:border-red-500", "dark:bg-red-600", ]; } }; jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/common/TestResultStatusIcon.vue000066400000000000000000000024411514323636100332540ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/common/icon.ts000066400000000000000000000001061514323636100276740ustar00rootroot00000000000000export const defaultIconProps = { size: 16, strokeWidth: 2.25, }; jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/details/000077500000000000000000000000001514323636100265345ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/details/CodeBlock.vue000066400000000000000000000027001514323636100311010ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/details/DetailsHeader.vue000066400000000000000000000006031514323636100317520ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/details/DetailsSections.vue000066400000000000000000000031741514323636100323570ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/details/DurationLabel.vue000066400000000000000000000022651514323636100320070ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/details/ExecutionDetails.vue000066400000000000000000000010631514323636100325260ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/details/RenderedBlock.vue000066400000000000000000000045201514323636100317610ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/details/RenderedSection.vue000066400000000000000000000016651514323636100323420ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/details/TestNodeDetails.vue000066400000000000000000000047451514323636100323220ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/details/keys.ts000066400000000000000000000001601514323636100300540ustar00rootroot00000000000000import { InjectionKey } from "vue"; export const imageHandler = Symbol() as InjectionKey<(a: string) => void>; jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/header/000077500000000000000000000000001514323636100263375ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/header/DarkModeSwitch.vue000066400000000000000000000014341514323636100317320ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/header/ExecutionSummary.vue000066400000000000000000000032031514323636100323770ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/header/StatusBar.vue000066400000000000000000000013271514323636100307730ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/sidebar/000077500000000000000000000000001514323636100265205ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/sidebar/ExecutionTree.vue000066400000000000000000000013441514323636100320260ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/sidebar/SideBar.vue000066400000000000000000000020441514323636100305520ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/sidebar/TestNodeTree.vue000066400000000000000000000016251514323636100316120ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/sidebar/ToolBar.vue000066400000000000000000000044131514323636100306050ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/sidebar/ToolBarIcon.vue000066400000000000000000000005161514323636100314160ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/sidebar/TreeNode.vue000066400000000000000000000043541514323636100307540ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/components/sidebar/TreeState.ts000066400000000000000000000044201514323636100307700ustar00rootroot00000000000000import TestExecution from "../common/TestExecution.ts"; import { InjectionKey } from "vue"; export const treeStateKey = Symbol() as InjectionKey; export default class TreeState { public readonly nodes: Record; public showAborted = true; public showFailedAndErrored = true; public showSkipped = true; public showSuccessful = true; constructor(executions: TestExecution[]) { this.nodes = executions.reduce( (prev, execution) => { return { ...prev, [execution.id]: { collapsed: false, }, ...execution.nodesWithChildren().reduce((prev, node) => { const statuses = execution.nodeStatuses(node); const initiallyCollapsed = execution.parents(node).length > 1 && statuses.indexOf("FAILED") == -1 && statuses.indexOf("ERRORED") == -1; return { ...prev, [node.id]: { collapsed: initiallyCollapsed, }, }; }, {}), }; }, {} as Record, ); } toggleShowAborted() { this.showAborted = !this.showAborted; } toggleShowFailedAndErrored() { this.showFailedAndErrored = !this.showFailedAndErrored; } toggleShowSuccessful() { this.showSuccessful = !this.showSuccessful; } toggleShowSkipped() { this.showSkipped = !this.showSkipped; } collapseAll() { Object.keys(this.nodes).forEach((key) => { this.nodes[key].collapsed = true; }); } expandAll() { Object.keys(this.nodes).forEach((key) => { this.nodes[key].collapsed = false; }); } toggleNode(id: string) { this.nodes[id].collapsed = !this.nodes[id].collapsed; } isVisible(statuses: string[]): boolean { return ( statuses.length == 0 || statuses.filter((status) => { switch (status) { case "SUCCESSFUL": return this.showSuccessful; case "FAILED": case "ERRORED": return this.showFailedAndErrored; case "SKIPPED": return this.showSkipped; case "ABORTED": return this.showAborted; } }).length > 0 ); } } type NodeState = { collapsed: boolean; }; jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/global.d.ts000066400000000000000000000014371514323636100247610ustar00rootroot00000000000000export declare global { interface Data { id: string; name: string; durationMillis: number; sections: SectionData[] | undefined; } interface ExecutionData extends Data { roots: string[]; children: Record; testNodes: TestNodeData[] | undefined; } interface TestNodeData extends Data { status: string; } interface ChildMetadata { ids: string[]; childStatuses: string[]; } interface SectionData { title: string; metaInfo: string; blocks: BlockData[]; } interface BlockData { type: string; content: never; } interface ImageBlockData extends BlockData { altText: string; } declare namespace globalThis { var testExecutions: ExecutionData[]; // eslint-disable-line no-var } } jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/main.ts000066400000000000000000000025221514323636100242170ustar00rootroot00000000000000import { createApp } from "vue"; import { createI18n } from "vue-i18n"; import "./style.css"; import App from "./App.vue"; import TestExecution from "./components/common/TestExecution.ts"; import VueEasyLightbox from "vue-easy-lightbox"; const app = createApp(App, { executions: globalThis.testExecutions.map((it) => new TestExecution(it)), }); app.use( createI18n({ messages: { en: { executionSummary: { testCount: "No tests | 1 test/container | {count} tests/containers", errored: "1 errored | {count} errored", failed: "1 failed | {count} failed", aborted: "1 aborted | {count} aborted", skipped: "1 skipped | {count} skipped", execution: "in 1 execution | in { count } executions", }, clipboard: { copy: "Copy to clipboard", }, duration: { hours: "{count} h", minutes: "{count} m", seconds: "{count} s", millis: "{count} ms", }, toolbar: { collapseAll: "Collapse all", expandAll: "Expand all", showAborted: "Show aborted", showFailedAndErrored: "Show failed/errored", showSkipped: "Show skipped", showSuccessful: "Show successful", }, }, }, }), ); app.use(VueEasyLightbox); app.mount("#app"); jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/style.css000066400000000000000000000000711514323636100245720ustar00rootroot00000000000000@import "tailwindcss"; @config '../tailwind.config.js'; jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/src/vite-env.d.ts000066400000000000000000000000461514323636100252510ustar00rootroot00000000000000/// jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/tailwind.config.js000066400000000000000000000002271514323636100255510ustar00rootroot00000000000000/** @type {import('tailwindcss').Config} */ export default { content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"], darkMode: "selector", }; jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/tsconfig.app.json000066400000000000000000000011171514323636100254210ustar00rootroot00000000000000{ "compilerOptions": { "target": "ES2020", "useDefineForClassFields": true, "module": "ESNext", "lib": ["ES2020", "DOM", "DOM.Iterable"], "skipLibCheck": true, /* Bundler mode */ "moduleResolution": "bundler", "allowImportingTsExtensions": true, "isolatedModules": true, "moduleDetection": "force", "noEmit": true, "jsx": "preserve", /* Linting */ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] } jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/tsconfig.json000066400000000000000000000001671514323636100246460ustar00rootroot00000000000000{ "files": [], "references": [ { "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" } ] } jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/tsconfig.node.json000066400000000000000000000007371514323636100255750ustar00rootroot00000000000000{ "compilerOptions": { "target": "ES2022", "lib": ["ES2023"], "module": "ESNext", "skipLibCheck": true, /* Bundler mode */ "moduleResolution": "bundler", "allowImportingTsExtensions": true, "isolatedModules": true, "moduleDetection": "force", "noEmit": true, /* Linting */ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, "include": ["vite.config.ts"] } jtreg8-8.2.1+1+ds1/opentest4j-reporting/html-report/vite.config.ts000066400000000000000000000007701514323636100247220ustar00rootroot00000000000000import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; import { viteSingleFile } from "vite-plugin-singlefile"; import tailwindcss from "@tailwindcss/vite"; // https://vitejs.dev/config/ export default defineConfig(({ command }) => { const defaultPlugins = [vue(), tailwindcss()]; if (command === "serve") { return { plugins: defaultPlugins, }; } else { // command === 'build' return { plugins: [...defaultPlugins, viteSingleFile()], }; } }); jtreg8-8.2.1+1+ds1/opentest4j-reporting/sample-project/000077500000000000000000000000001514323636100226035ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/sample-project/build.gradle.kts000066400000000000000000000074351514323636100256730ustar00rootroot00000000000000import org.gradle.api.tasks.PathSensitivity.NONE import org.gradle.api.tasks.PathSensitivity.RELATIVE import java.nio.file.Files plugins { `java-basics` } val cli by configurations.dependencyScope("cli") val cliClasspath by configurations.resolvable("cliClasspath") { extendsFrom(cli) } dependencies { testImplementation(libs.junit.jupiter) testImplementation(projects.toolingSpi) testRuntimeOnly(libs.junit.platform.reporting) testRuntimeOnly(projects.toolingSpi) cli(projects.cli) cli(libs.junit.platform.reporting) } configurations.all { resolutionStrategy.dependencySubstitution { substitute(module("${group}:open-test-reporting-${projects.toolingSpi.name}")) .using(project(projects.toolingSpi.path)) } } val htmlReportFile = tasks.test.flatMap { it.reports.junitXml.outputLocation.file("open-test-report.html") } tasks { compileTestJava { options.release = 17 modularity.inferModulePath = true } val eventXmlFile = test.map { it.reports.junitXml.outputLocation.get().file("open-test-report.xml") } val convertTestResultXmlToHierarchicalFormat by registering(JavaExec::class) { mainModule = "org.opentest4j.reporting.cli" modularity.inferModulePath = true args("convert") classpath(cliClasspath) inputs.file(eventXmlFile).withPathSensitivity(NONE).skipWhenEmpty() argumentProviders += CommandLineArgumentProvider { listOf(eventXmlFile.get().asFile.absolutePath) } outputs.files(eventXmlFile.map { it.asFile.resolveSibling("hierarchy.xml") }) outputs.cacheIf { true } } val validateTestResultXml by registering(JavaExec::class) { mainModule = "org.opentest4j.reporting.cli" modularity.inferModulePath = true args("validate") classpath(cliClasspath) inputs.file(eventXmlFile).withPathSensitivity(NONE).skipWhenEmpty() argumentProviders += CommandLineArgumentProvider { listOf(eventXmlFile.get().asFile.absolutePath) } } val generateHtmlReport by registering(JavaExec::class) { mainModule = "org.opentest4j.reporting.cli" modularity.inferModulePath = true args("html-report") classpath(cliClasspath) outputs.file(htmlReportFile) inputs.files(eventXmlFile).withPathSensitivity(RELATIVE).skipWhenEmpty() argumentProviders += CommandLineArgumentProvider { listOf( "--output", htmlReportFile.get().asFile.absolutePath ) + eventXmlFile.get().asFile.absolutePath } outputs.cacheIf { true } } configurations.consumable("xmlReport") { attributes { outgoing.artifact(eventXmlFile) attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.RESOURCES)) } } test { useJUnitPlatform() ignoreFailures = true jvmArgumentProviders += CommandLineArgumentProvider { listOf( "-Djunit.platform.reporting.open.xml.enabled=true", "-Djunit.platform.output.capture.stdout=true", "-Djunit.platform.output.capture.stderr=true", "-Djunit.platform.reporting.output.dir=${reports.junitXml.outputLocation.get().asFile.absolutePath}" ) } doFirst { files(reports.junitXml.outputLocation.get().asFileTree.matching { include("open-test-report.xml") include("open-test-report.html") include("hierarchy.xml") }).files.forEach { Files.delete(it.toPath()) } } finalizedBy(validateTestResultXml, convertTestResultXmlToHierarchicalFormat, generateHtmlReport) } } jtreg8-8.2.1+1+ds1/opentest4j-reporting/sample-project/src/000077500000000000000000000000001514323636100233725ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/sample-project/src/test/000077500000000000000000000000001514323636100243515ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/sample-project/src/test/java/000077500000000000000000000000001514323636100252725ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/sample-project/src/test/java/module-info.java000066400000000000000000000004201514323636100303470ustar00rootroot00000000000000module org.example { requires org.junit.jupiter.api; opens org.example to org.junit.platform.commons; requires org.opentest4j.reporting.tooling.spi; provides org.opentest4j.reporting.tooling.spi.htmlreport.Contributor with org.example.SampleContributor; } jtreg8-8.2.1+1+ds1/opentest4j-reporting/sample-project/src/test/java/org/000077500000000000000000000000001514323636100260615ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/sample-project/src/test/java/org/example/000077500000000000000000000000001514323636100275145ustar00rootroot00000000000000KitchenSinkTests.java000066400000000000000000000041001514323636100335300ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/sample-project/src/test/java/org/examplepackage org.example; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.MediaType; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; import org.junit.jupiter.api.TestReporter; import java.nio.file.Files; import java.util.LinkedHashMap; import java.util.Map; import static java.nio.charset.StandardCharsets.ISO_8859_1; import static java.util.Collections.singletonList; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assumptions.abort; @Tag("inherited") @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class KitchenSinkTests { @SuppressWarnings("JUnitMalformedDeclaration") @BeforeAll static void beforeAll(TestReporter reporter) { reporter.publishEntry("beforeAll"); } @Test @DisplayName("successful test") @Tag("success") @Order(1) void successful(TestReporter reporter) { reporter.publishEntry("✅"); } @Test @Disabled("for demonstration purposes") @Tag("aborted") @Order(2) void skipped() { } @Test @Tag("aborted") @Order(3) void aborted(TestReporter reporter) { reporter.publishEntry("foo", "bar"); reporter.publishEntry("baz", "qux"); abort("for demonstration purposes"); } @Test @Tag("failure") @Order(4) void failed(TestReporter reporter) { Map map = new LinkedHashMap<>(); map.put("foo", "bar"); map.put("baz", "qux"); reporter.publishEntry(map); MediaType mediaType = MediaType.create("text", "plain", ISO_8859_1); reporter.publishFile("test.txt", mediaType, file -> Files.write(file, singletonList("Hellö, Wörld!"), ISO_8859_1)); System.out.println("some standard output"); System.err.println("some error output"); assertEquals("foo", "bar"); } } SampleContributor.java000066400000000000000000000007371514323636100337630ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/sample-project/src/test/java/org/examplepackage org.example; import org.opentest4j.reporting.tooling.spi.htmlreport.Contributor; import org.opentest4j.reporting.tooling.spi.htmlreport.Section; import java.util.List; public class SampleContributor implements Contributor { @Override public List
contributeSectionsForExecution(Context context) { return List.of(); } @Override public List
contributeSectionsForTestNode(Context context) { return List.of(); } } jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/000077500000000000000000000000001514323636100211165ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/build.gradle.kts000066400000000000000000000005121514323636100241730ustar00rootroot00000000000000plugins { `java-conventions` } val schemas by configurations.creating { isCanBeConsumed = true isCanBeResolved = false outgoing { artifact(file("src/main/resources/org/opentest4j/reporting/schema")) } } dependencies { compileOnlyApi(libs.apiguardian) testImplementation(libs.bundles.junit) } jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/000077500000000000000000000000001514323636100217055ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/docs/000077500000000000000000000000001514323636100226355ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/docs/asciidoc/000077500000000000000000000000001514323636100244135ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/docs/asciidoc/includes/000077500000000000000000000000001514323636100262215ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/docs/asciidoc/includes/events.xml000066400000000000000000000013431514323636100302500ustar00rootroot00000000000000 wonderland alice jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/docs/asciidoc/includes/hierarchy.xml000066400000000000000000000012241514323636100307200ustar00rootroot00000000000000 wonderland alice jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/000077500000000000000000000000001514323636100226315ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/java/000077500000000000000000000000001514323636100235525ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/java/org/000077500000000000000000000000001514323636100243415ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/java/org/opentest4j/000077500000000000000000000000001514323636100264405ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/java/org/opentest4j/reporting/000077500000000000000000000000001514323636100304515ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/java/org/opentest4j/reporting/schema/000077500000000000000000000000001514323636100317115ustar00rootroot00000000000000Namespace.java000066400000000000000000000107161514323636100343760ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/java/org/opentest4j/reporting/schema/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.schema; import org.apiguardian.api.API; import java.util.Objects; import static javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * An XML namespace identified by a URI. * * @since 0.1.0 */ @API(status = EXPERIMENTAL, since = "0.1.0") public class Namespace { /** * W3C XML Schema Instance namespace ({@value javax.xml.XMLConstants#W3C_XML_SCHEMA_INSTANCE_NS_URI}). */ public static final Namespace XML_SCHEMA_INSTANCE = Namespace.of(W3C_XML_SCHEMA_INSTANCE_NS_URI); /** * Open Test Reporting core 0.1.0 namespace * * @since 0.2.0 */ public static final Namespace REPORTING_CORE_0_1_0 = Namespace.of( "https://schemas.opentest4j.org/reporting/core/0.1.0"); /** * Open Test Reporting core 0.2.0 namespace * * @since 0.2.0 */ public static final Namespace REPORTING_CORE_0_2_0 = Namespace.of( "https://schemas.opentest4j.org/reporting/core/0.2.0"); /** * Latest Open Test Reporting core namespace */ public static final Namespace REPORTING_CORE = REPORTING_CORE_0_2_0; /** * Open Test Reporting events 0.1.0 namespace * * @since 0.2.0 */ public static final Namespace REPORTING_EVENTS_0_1_0 = Namespace.of( "https://schemas.opentest4j.org/reporting/events/0.1.0"); /** * Open Test Reporting events 0.2.0 namespace * * @since 0.2.0 */ public static final Namespace REPORTING_EVENTS_0_2_0 = Namespace.of( "https://schemas.opentest4j.org/reporting/events/0.2.0"); /** * Latest Open Test Reporting events namespace */ public static final Namespace REPORTING_EVENTS = REPORTING_EVENTS_0_2_0; /** * Open Test Reporting Java 0.1.0 namespace * * @since 0.2.0 */ public static final Namespace REPORTING_JAVA_0_1_0 = Namespace.of( "https://schemas.opentest4j.org/reporting/java/0.1.0"); /** * Open Test Reporting Java 0.2.0 namespace * * @since 0.2.0 */ public static final Namespace REPORTING_JAVA_0_2_0 = Namespace.of( "https://schemas.opentest4j.org/reporting/java/0.2.0"); /** * Latest Open Test Reporting Java namespace */ public static final Namespace REPORTING_JAVA = REPORTING_JAVA_0_2_0; /** * Open Test Reporting Git 0.2.0 namespace * * @since 0.2.0 */ public static final Namespace REPORTING_GIT_0_2_0 = Namespace.of( "https://schemas.opentest4j.org/reporting/git/0.2.0"); /** * Latest Open Test Reporting Git namespace * * @since 0.2.0 */ public static final Namespace REPORTING_GIT = REPORTING_GIT_0_2_0; /** * Open Test Reporting hierarchical 0.1.0 namespace * * @since 0.2.0 */ public static final Namespace REPORTING_HIERARCHY_0_1_0 = Namespace.of( "https://schemas.opentest4j.org/reporting/hierarchy/0.1.0"); /** * Open Test Reporting hierarchical 0.2.0 namespace * * @since 0.2.0 */ public static final Namespace REPORTING_HIERARCHY_0_2_0 = Namespace.of( "https://schemas.opentest4j.org/reporting/hierarchy/0.2.0"); /** * Latest Open Test Reporting hierarchical namespace */ public static final Namespace REPORTING_HIERARCHY = REPORTING_HIERARCHY_0_2_0; /** * Create the namespace with the supplied URI. * * @param uri the namespace URI * @return namespace with the supplied URI */ public static Namespace of(String uri) { return new Namespace(uri); } private final String uri; private Namespace(String uri) { this.uri = uri; } /** * {@return the URI that identifies this namespace} */ public String getUri() { return uri; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Namespace namespace = (Namespace) o; return uri.equals(namespace.uri); } @Override public int hashCode() { return Objects.hash(uri); } @Override public String toString() { return String.format("Namespace{uri='%s'}", uri); } } QualifiedName.java000066400000000000000000000040531514323636100352030ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/java/org/opentest4j/reporting/schema/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.schema; import org.apiguardian.api.API; import java.util.Objects; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * A qualified name consisting of a namespace and a simple name. * * @since 0.1.0 */ @API(status = EXPERIMENTAL, since = "0.1.0") public class QualifiedName { /** * Create the qualified name for the supplied namespace and name. * * @param namespace the namespace * @param simpleName the simple name * @return namespace with the supplied URI */ public static QualifiedName of(Namespace namespace, String simpleName) { return new QualifiedName(namespace, simpleName); } private final Namespace namespace; private final String simpleName; private QualifiedName(Namespace namespace, String simpleName) { this.namespace = namespace; this.simpleName = simpleName; } /** * {@return the namespace of this qualified name} */ public Namespace getNamespace() { return namespace; } /** * {@return the simple name of this qualified name} */ public String getSimpleName() { return simpleName; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } QualifiedName that = (QualifiedName) o; return namespace.equals(that.namespace) && simpleName.equals(that.simpleName); } @Override public int hashCode() { return Objects.hash(namespace, simpleName); } } Schemas.java000066400000000000000000000044331514323636100340640ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/java/org/opentest4j/reporting/schema/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.schema; import java.net.URL; import java.util.HashMap; import java.util.Map; import java.util.Optional; import static java.util.Collections.unmodifiableMap; /** * Utility class for retrieving schema locations. * * @since 0.2.2 */ public final class Schemas { private static final Map SCHEMAS; static { Map schemas = new HashMap<>(); schemas.put(Namespace.REPORTING_EVENTS_0_1_0, "/org/opentest4j/reporting/schema/events-0.1.0.xsd"); schemas.put(Namespace.REPORTING_HIERARCHY_0_1_0, "/org/opentest4j/reporting/schema/hierarchy-0.1.0.xsd"); schemas.put(Namespace.REPORTING_CORE_0_1_0, "/org/opentest4j/reporting/schema/core-0.1.0.xsd"); schemas.put(Namespace.REPORTING_JAVA_0_1_0, "/org/opentest4j/reporting/schema/java-0.1.0.xsd"); schemas.put(Namespace.REPORTING_EVENTS_0_2_0, "/org/opentest4j/reporting/schema/events-0.2.0.xsd"); schemas.put(Namespace.REPORTING_HIERARCHY_0_2_0, "/org/opentest4j/reporting/schema/hierarchy-0.2.0.xsd"); schemas.put(Namespace.REPORTING_CORE_0_2_0, "/org/opentest4j/reporting/schema/core-0.2.0.xsd"); schemas.put(Namespace.REPORTING_GIT_0_2_0, "/org/opentest4j/reporting/schema/git-0.2.0.xsd"); schemas.put(Namespace.REPORTING_JAVA_0_2_0, "/org/opentest4j/reporting/schema/java-0.2.0.xsd"); SCHEMAS = unmodifiableMap(schemas); } /** * {@return the schema location for the given built-in namespace} * * @param namespace the namespace to get the schema location for */ public static Optional getSchemaLocation(Namespace namespace) { return Optional.ofNullable(SCHEMAS.get(namespace)) // .map(Schemas.class::getResource); } private Schemas() { } } jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/000077500000000000000000000000001514323636100246435ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/000077500000000000000000000000001514323636100254325ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/opentest4j/000077500000000000000000000000001514323636100275315ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/opentest4j/reporting/000077500000000000000000000000001514323636100315425ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/opentest4j/reporting/schema/000077500000000000000000000000001514323636100330025ustar00rootroot00000000000000core-0.1.0.xsd000066400000000000000000000100121514323636100350170ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/opentest4j/reporting/schema core-0.2.0.xsd000066400000000000000000000133701514323636100350320ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/opentest4j/reporting/schema The media type of the file content, e.g. 'text/plain' or 'application/json', see https://www.iana.org/assignments/media-types/media-types.xhtml. For text files, the charset should be specified in the 'charset' attribute, e.g. 'text/plain; charset=utf-8'. Typically 'stdout' or 'stderr' but may also be used for attaching other log output events-0.1.0.xsd000066400000000000000000000027051514323636100354050ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/opentest4j/reporting/schema events-0.2.0.xsd000066400000000000000000000027051514323636100354060ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/opentest4j/reporting/schema git-0.2.0.xsd000066400000000000000000000042131514323636100346610ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/opentest4j/reporting/schema the URL of the 'origin' remote of the Git repository the branch the HEAD commit is pointing to, if any the commit hash the output of `git status --porcelain`, potentially empty whether the working directory clean contains no changes or untracked files hierarchy-0.1.0.xsd000066400000000000000000000023221514323636100360520ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/opentest4j/reporting/schema hierarchy-0.2.0.xsd000066400000000000000000000023221514323636100360530ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/opentest4j/reporting/schema java-0.1.0.xsd000066400000000000000000000044711514323636100350240ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/opentest4j/reporting/schema java-0.2.0.xsd000066400000000000000000000044711514323636100350250ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/main/resources/org/opentest4j/reporting/schema jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/module/000077500000000000000000000000001514323636100231725ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/module/java/000077500000000000000000000000001514323636100241135ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/module/java/org.opentest4j.reporting.schema/000077500000000000000000000000001514323636100322475ustar00rootroot00000000000000module-info.java000066400000000000000000000015141514323636100352520ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/module/java/org.opentest4j.reporting.schema/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * XML schema definitions of both formats * * @since 0.2.0 */ module org.opentest4j.reporting.schema { requires static org.apiguardian.api; requires java.xml; exports org.opentest4j.reporting.schema; } jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/test/000077500000000000000000000000001514323636100226645ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/test/java/000077500000000000000000000000001514323636100236055ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/test/java/org/000077500000000000000000000000001514323636100243745ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/test/java/org/opentest4j/000077500000000000000000000000001514323636100264735ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/test/java/org/opentest4j/reporting/000077500000000000000000000000001514323636100305045ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/test/java/org/opentest4j/reporting/schema/000077500000000000000000000000001514323636100317445ustar00rootroot00000000000000SchemaTests.java000066400000000000000000000033151514323636100347550ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/schema/src/test/java/org/opentest4j/reporting/schema/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.schema; import org.junit.jupiter.api.Named; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import javax.xml.validation.SchemaFactory; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.stream.Stream; import static java.util.Comparator.comparing; import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI; public class SchemaTests { private static final SchemaFactory SCHEMA_FACTORY = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI); @ParameterizedTest @MethodSource("schemas") void shouldBeValidXmlSchema(Path xsdFile) throws Exception { SCHEMA_FACTORY.newSchema(xsdFile.toFile()); } @SuppressWarnings("resource") // JUnit will close the stream static Stream> schemas() throws IOException { return Files.list(Path.of("src/main/resources/org/opentest4j/reporting/schema")) // .filter(path -> path.toString().endsWith(".xsd")) // .map(file -> Named.of(file.getFileName().toString(), file)) // .sorted(comparing(Named::getName)); } } jtreg8-8.2.1+1+ds1/opentest4j-reporting/settings.gradle.kts000066400000000000000000000021671514323636100235040ustar00rootroot00000000000000plugins { id("com.gradle.develocity") version "4.2.2" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.4.0" } rootProject.name = "open-test-reporting" dependencyResolutionManagement { repositories { mavenCentral() } } val isCiServer = System.getenv("CI") != null develocity { buildScan { server = "https://ge.junit.org" uploadInBackground = !isCiServer obfuscation { if (isCiServer) { username { "github" } } else { hostname { null } ipAddresses { emptyList() } } } publishing.onlyIf { it.isAuthenticated } } } buildCache { local { isEnabled = !isCiServer } remote(develocity.buildCache) { val authenticated = System.getenv("DEVELOCITY_ACCESS_KEY") != null isPush = isCiServer && authenticated } } include("cli") include("documentation") include("events") include("html-report") include("sample-project") include("schema") include("tooling-core") include("tooling-spi") enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/000077500000000000000000000000001514323636100222575ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/build.gradle.kts000066400000000000000000000047241514323636100253450ustar00rootroot00000000000000plugins { `java-conventions` } val htmlReportTemplate = configurations.dependencyScope("htmlReportTemplate") val sampleXmlReport = configurations.dependencyScope("sampleXmlReport") dependencies { api(projects.schema) implementation(projects.events) implementation(projects.toolingSpi) implementation(libs.gson) compileOnlyApi(libs.apiguardian) testImplementation(libs.assertj.core) testImplementation(libs.bundles.junit) testImplementation(libs.xmlunit.assertj) testImplementation(libs.playwright) testCompileOnly(libs.jetbrains.annotations) htmlReportTemplate(projects.htmlReport) sampleXmlReport(project(mapOf("path" to projects.sampleProject.path, "configuration" to "xmlReport"))) } tasks.compileJava { options.release = 17 } val playwrightInstallationAction = objects.newInstance(InstallPlaywrightDeps::class).apply { classpath.from(configurations.testRuntimeClasspath) } val installPlaywrightDeps by tasks.registering { doFirst(playwrightInstallationAction) } val sampleXmlReportFiles = configurations.resolvable("sampleXmlReportFiles") { extendsFrom(sampleXmlReport.get()) } tasks.test { inputs.files(sampleXmlReportFiles).withPathSensitivity(PathSensitivity.NONE) jvmArgumentProviders.add(CommandLineArgumentProvider { listOf("-DsampleXmlReport=${sampleXmlReportFiles.get().singleFile.absolutePath}") }) if (System.getenv("CI") != null) { doFirst(playwrightInstallationAction) } } abstract class InstallPlaywrightDeps @Inject constructor (private val execOperations: ExecOperations) : Action { abstract val classpath: ConfigurableFileCollection override fun execute(t: Task) { execOperations.javaexec { classpath(this@InstallPlaywrightDeps.classpath) mainClass = "com.microsoft.playwright.CLI" args("install-deps") } } } val htmlReportTemplateFiles = configurations.resolvable("htmlReportTemplateFiles") { extendsFrom(htmlReportTemplate.get()) } val generatedResourcesDir = layout.buildDirectory.dir("generated/sources/htmlReportTemplate") val prepareResourceDir by tasks.registering(Sync::class) { from(htmlReportTemplateFiles) rename { "template.html" } into(generatedResourcesDir.map { it.dir("org/opentest4j/reporting/tooling/core/htmlreport") }) } sourceSets { main { resources { srcDir(files(generatedResourcesDir).builtBy(prepareResourceDir)) } } } jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/000077500000000000000000000000001514323636100230465ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/000077500000000000000000000000001514323636100237725ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/000077500000000000000000000000001514323636100247135ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/000077500000000000000000000000001514323636100255025ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/000077500000000000000000000000001514323636100276015ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/000077500000000000000000000000001514323636100316125ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/000077500000000000000000000000001514323636100332655ustar00rootroot00000000000000core/000077500000000000000000000000001514323636100341365ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/toolingconverter/000077500000000000000000000000001514323636100361455ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/coreConverter.java000066400000000000000000000024441514323636100407630ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/converter/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.converter; import org.apiguardian.api.API; import java.nio.file.Path; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * Converter for event-based reports into the hierarchical format. * * @since 0.1.0 */ @API(status = EXPERIMENTAL, since = "0.1.0") public interface Converter { /** * Convert the supplied event-based report into the hierarchical format. * * @param eventsXmlFile the source file * @param hierarchicalXmlFile the target file * @throws Exception if an error occurs converting or writing to the target file */ void convert(Path eventsXmlFile, Path hierarchicalXmlFile) throws Exception; } DefaultConverter.java000066400000000000000000000234521514323636100422720ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/converter/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.converter; import org.apiguardian.api.API; import org.opentest4j.reporting.events.core.Infrastructure; import org.opentest4j.reporting.events.root.Event; import org.opentest4j.reporting.events.root.Finished; import org.opentest4j.reporting.events.root.Reported; import org.opentest4j.reporting.events.root.Started; import org.opentest4j.reporting.schema.Namespace; import org.opentest4j.reporting.schema.QualifiedName; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import java.nio.file.Path; import java.time.Duration; import java.time.Instant; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.function.BiPredicate; import java.util.stream.Stream; import static java.util.stream.Collectors.toUnmodifiableSet; import static javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING; import static javax.xml.XMLConstants.XMLNS_ATTRIBUTE; import static javax.xml.XMLConstants.XMLNS_ATTRIBUTE_NS_URI; import static org.apiguardian.api.API.Status.EXPERIMENTAL; import static org.opentest4j.reporting.tooling.core.util.DomUtils.children; import static org.opentest4j.reporting.tooling.core.util.DomUtils.matches; import static org.opentest4j.reporting.tooling.core.util.DomUtils.parseNamespace; import static org.opentest4j.reporting.tooling.core.util.DomUtils.stream; /** * Default implementation of {@link Converter}. * * @since 0.1.0 */ @API(status = EXPERIMENTAL, since = "0.1.0") public class DefaultConverter implements Converter { private static final String HIERARCHY_PREFIX = "h"; private static final String EXECUTION_NODE_NAME = HIERARCHY_PREFIX + ":execution"; private static final String ROOT_NODE_NAME = HIERARCHY_PREFIX + ":root"; private static final String CHILD_NODE_NAME = HIERARCHY_PREFIX + ":child"; private static final String START_ATTRIBUTE_NAME = "start"; private static final String DURATION_ATTRIBUTE_NAME = "duration"; private static final Set EVENT_ONLY_ATTRIBUTES = Stream.of(Event.ID, Event.TIME, Started.PARENT_ID) // .map(QualifiedName::getSimpleName) // .collect(toUnmodifiableSet()); private final DocumentBuilderFactory factory; /** * Create a new instance. */ public DefaultConverter() { this.factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); } @Override public void convert(Path eventsXmlFile, Path hierarchicalXmlFile) throws Exception { Document sourceDocument = factory.newDocumentBuilder().parse(eventsXmlFile.toFile()); Document targetDocument = convert(sourceDocument.getDocumentElement()); TransformerFactory transformerFactory = TransformerFactory.newInstance(); transformerFactory.setFeature(FEATURE_SECURE_PROCESSING, true); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //noinspection HttpUrlsUsage transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); transformer.transform(new DOMSource(targetDocument), new StreamResult(hierarchicalXmlFile.toFile())); } /** * Convert the supplied event-based report into the hierarchical format. * * @param sourceRoot the root of the source document * @return the converted document * @throws Exception if an error occurs during the conversion */ public Document convert(Node sourceRoot) throws Exception { Document targetDocument = factory.newDocumentBuilder().newDocument(); var targetNamespace = determineTargetNamespace(sourceRoot); createRootElement(sourceRoot, targetDocument, targetNamespace); Map nodeById = new HashMap<>(); for (Node child = sourceRoot.getFirstChild(); child != null; child = child.getNextSibling()) { if (child instanceof Element element) { if (matches(Started.ELEMENT, element)) { started(targetDocument, nodeById, element, targetNamespace); } else if (matches(Reported.ELEMENT, element)) { reported(nodeById, element); } else if (matches(Finished.ELEMENT, element)) { finished(nodeById, element); } else if (matches(Infrastructure.ELEMENT, element)) { infrastructure(targetDocument, element); } } } return targetDocument; } private static Namespace determineTargetNamespace(Node sourceRoot) { return parseNamespace(Namespace.REPORTING_HIERARCHY.getUri()).orElseThrow() // .withVersion(parseNamespace(sourceRoot.getNamespaceURI()).orElseThrow().getVersion()) // .toNamespace(); } private void createRootElement(Node sourceRoot, Document targetDocument, Namespace targetNamespace) { Element targetRoot = targetDocument.createElement(EXECUTION_NODE_NAME); targetDocument.appendChild(targetRoot); copyAttributes(sourceRoot, targetRoot, (__, value) -> !Namespace.REPORTING_EVENTS.getUri().equals(value)); targetRoot.setAttributeNS(XMLNS_ATTRIBUTE_NS_URI, XMLNS_ATTRIBUTE + ":" + HIERARCHY_PREFIX, targetNamespace.getUri()); } private void infrastructure(Document targetDocument, Element sourceElement) { Node targetElement = sourceElement.cloneNode(true); targetDocument.adoptNode(targetElement); targetDocument.getDocumentElement().appendChild(targetElement); } private void started(Document targetDocument, Map nodeById, Element sourceElement, Namespace targetNamespace) { Element targetElement; if (sourceElement.hasAttribute(Started.PARENT_ID.getSimpleName())) { targetElement = targetDocument.createElementNS(targetNamespace.getUri(), CHILD_NODE_NAME); nodeById.get(sourceElement.getAttribute(Started.PARENT_ID.getSimpleName())).appendChild(targetElement); } else { targetElement = targetDocument.createElementNS(targetNamespace.getUri(), ROOT_NODE_NAME); targetDocument.getDocumentElement().appendChild(targetElement); } String id = sourceElement.getAttribute(Event.ID.getSimpleName()); nodeById.put(id, targetElement); copyAttributes(sourceElement, targetElement, (name, __) -> !EVENT_ONLY_ATTRIBUTES.contains(name)); copyChildren(sourceElement, targetElement); if (sourceElement.hasAttribute(Event.TIME.getSimpleName())) { targetElement.setAttribute(START_ATTRIBUTE_NAME, sourceElement.getAttribute(Event.TIME.getSimpleName())); } } private void reported(Map nodeById, Element sourceElement) { Element targetElement = nodeById.get(sourceElement.getAttribute(Event.ID.getSimpleName())); copyAttributes(sourceElement, targetElement, (name, __) -> !EVENT_ONLY_ATTRIBUTES.contains(name)); mergeChildren(sourceElement, targetElement); } private void finished(Map nodeById, Element sourceElement) { Element targetElement = nodeById.get(sourceElement.getAttribute(Event.ID.getSimpleName())); copyAttributes(sourceElement, targetElement, (name, __) -> !EVENT_ONLY_ATTRIBUTES.contains(name)); mergeChildren(sourceElement, targetElement); if (targetElement.hasAttribute(START_ATTRIBUTE_NAME) && sourceElement.hasAttribute(Event.TIME.getSimpleName())) { Instant start = Instant.parse(targetElement.getAttribute(START_ATTRIBUTE_NAME)); Instant finish = Instant.parse(sourceElement.getAttribute(Event.TIME.getSimpleName())); targetElement.setAttribute(DURATION_ATTRIBUTE_NAME, Duration.between(start, finish).toString()); } moveChildrenToEnd(targetElement); } private void moveChildrenToEnd(Element targetElement) { children(targetElement) // .filter(child -> CHILD_NODE_NAME.equals(child.getNodeName())) // .toList() // avoid concurrent modification .forEach(child -> { targetElement.removeChild(child); targetElement.appendChild(child); }); } private void copyAttributes(Node sourceNode, Node targetNode, BiPredicate filter) { stream(sourceNode.getAttributes()) // .filter(sourceItem -> filter.test(sourceItem.getNodeName(), sourceItem.getNodeValue())) // .map(sourceItem -> sourceItem.cloneNode(true)) // .forEach(targetItem -> { targetNode.getOwnerDocument().adoptNode(targetItem); targetNode.getAttributes().setNamedItem(targetItem); }); } private void mergeChildren(Node sourceElement, Node targetElement) { children(sourceElement) // .forEach(sourceChild -> findNode(targetElement.getChildNodes(), sourceChild.getNodeName()) // .ifPresentOrElse( // existingNode -> copyChildren(sourceChild, existingNode), // () -> { Node targetChild = sourceChild.cloneNode(true); targetElement.getOwnerDocument().adoptNode(targetChild); targetElement.appendChild(targetChild); })); } private Optional findNode(NodeList nodes, String name) { return stream(nodes) // .filter(node -> node.getNodeName().equals(name)) // .findAny(); } private void copyChildren(Node sourceElement, Node targetElement) { children(sourceElement) // .map(sourceChild -> sourceChild.cloneNode(true)) // .forEach(targetChild -> { targetElement.getOwnerDocument().adoptNode(targetChild); targetElement.appendChild(targetChild); }); } } htmlreport/000077500000000000000000000000001514323636100363365ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/coreCoreContributor.java000066400000000000000000000312221514323636100423240ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.htmlreport; import org.apiguardian.api.API; import org.opentest4j.reporting.events.core.Attachments; import org.opentest4j.reporting.events.core.CpuCores; import org.opentest4j.reporting.events.core.Data; import org.opentest4j.reporting.events.core.File; import org.opentest4j.reporting.events.core.FilePosition; import org.opentest4j.reporting.events.core.HostName; import org.opentest4j.reporting.events.core.Infrastructure; import org.opentest4j.reporting.events.core.Metadata; import org.opentest4j.reporting.events.core.OperatingSystem; import org.opentest4j.reporting.events.core.Output; import org.opentest4j.reporting.events.core.Reason; import org.opentest4j.reporting.events.core.Result; import org.opentest4j.reporting.events.core.Sources; import org.opentest4j.reporting.events.core.Tag; import org.opentest4j.reporting.events.core.Tags; import org.opentest4j.reporting.events.core.UserName; import org.opentest4j.reporting.schema.QualifiedName; import org.opentest4j.reporting.tooling.core.util.DomUtils; import org.opentest4j.reporting.tooling.spi.htmlreport.Contributor; import org.opentest4j.reporting.tooling.spi.htmlreport.Image; import org.opentest4j.reporting.tooling.spi.htmlreport.KeyValuePairs; import org.opentest4j.reporting.tooling.spi.htmlreport.Labels; import org.opentest4j.reporting.tooling.spi.htmlreport.Paragraph; import org.opentest4j.reporting.tooling.spi.htmlreport.PreFormattedOutput; import org.opentest4j.reporting.tooling.spi.htmlreport.Section; import org.opentest4j.reporting.tooling.spi.htmlreport.Subsections; import org.w3c.dom.Element; import org.w3c.dom.Node; import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; import java.util.Optional; import java.util.Set; import java.util.function.BiConsumer; import java.util.regex.Pattern; import java.util.stream.Stream; import static org.apiguardian.api.API.Status.INTERNAL; import static org.opentest4j.reporting.tooling.core.util.DomUtils.findChild; import static org.opentest4j.reporting.tooling.core.util.DomUtils.findChildren; import static org.opentest4j.reporting.tooling.core.util.DomUtils.getAttribute; import static org.opentest4j.reporting.tooling.core.util.DomUtils.getAttributeValue; import static org.opentest4j.reporting.tooling.core.util.DomUtils.matches; import static org.opentest4j.reporting.tooling.core.util.DomUtils.stream; /** * Contributes sections to the HTML report elements in the core schema. * * @since 0.2.0 */ @API(status = INTERNAL, since = "0.2.0") public class CoreContributor implements Contributor { private static final Pattern CAMEL_CASE_WORD_BOUNDARY_PATTERN = Pattern.compile("([a-z])([A-Z])"); private static final Set SUPPORTED_IMAGE_MEDIA_TYPES = Set.of("image/png", "image/jpeg", "image/gif", "image/avif", "image/webp", "image/svg+xml"); private static final Set SUPPORTED_TEXT_MEDIA_TYPES = Set.of("text/csv", "text/plain", "text/html", "text/xml", "application/xml", "application/json", "application/yaml"); /** * Create a new instance. */ public CoreContributor() { } @Override public List
contributeSectionsForExecution(Context context) { var sections = new ArrayList
(); createInfrastructureSection(context.element()).ifPresent(sections::add); return sections; } @Override public List
contributeSectionsForTestNode(Context context) { var sections = new ArrayList
(); createTagsSection(context.element()).ifPresent(sections::add); createSourcesSection(context.element()).ifPresent(sections::add); createReasonSection(context.element()).ifPresent(sections::add); createAttachmentsSection(context).ifPresent(sections::add); return sections; } private static Optional
createInfrastructureSection(Element element) { return findChild(element, Infrastructure.ELEMENT) // .map(infrastructure -> { var table = new LinkedHashMap(); addToTable(infrastructure, HostName.ELEMENT, "Hostname", table::put); addToTable(infrastructure, UserName.ELEMENT, "Username", table::put); addToTable(infrastructure, OperatingSystem.ELEMENT, "Operating system", table::put); addToTable(infrastructure, CpuCores.ELEMENT, "CPU cores", table::put); return table.isEmpty() ? null : table; }) // .map(table -> { var keyValuePairs = KeyValuePairs.builder().content(table).build(); return Section.builder().title("Infrastructure").addBlock(keyValuePairs).build(); }); } private static Optional
createTagsSection(Element element) { return findChild(element, Metadata.ELEMENT) // .flatMap(metadata -> findChild(metadata, Tags.ELEMENT)) // .map(tags -> findChildren(tags, Tag.ELEMENT)) // .map(tags -> tags.map(Node::getTextContent).sorted().toList()) // .filter(sortedTags -> !sortedTags.isEmpty()) // .map(sortedTags -> Labels.builder().content(sortedTags).build()) // .map(labels -> Section.builder().title("Tags").order(0).addBlock(labels).build()); } private static Optional
createSourcesSection(Element element) { var children = findChild(element, Sources.ELEMENT) // .map(DomUtils::children) // .orElseGet(Stream::empty) // .filter(Element.class::isInstance) // .toList(); if (children.isEmpty()) { return Optional.empty(); } var subsections = Subsections.builder(); children.stream().map(child -> { var type = child.getLocalName(); if (child.getLocalName().endsWith("Source")) { type = child.getLocalName().substring(0, child.getLocalName().length() - "Source".length()); } var subsection = Section.builder().title(capitalize(type)); var attributes = KeyValuePairs.builder(); stream(child.getAttributes()) // .filter(it -> it.getNodeValue() != null && !it.getNodeValue().isEmpty()) // .forEach(it -> attributes.putContent(prettifyCamelCaseName(it.getNodeName()), it.getNodeValue())); findChild(child, FilePosition.ELEMENT).ifPresent(filePosition -> { addToTable(getAttribute(filePosition, FilePosition.LINE), "line", attributes::putContent); addToTable(getAttribute(filePosition, FilePosition.COLUMN), "column", attributes::putContent); }); subsection.addBlock(attributes.build()); return subsection.build(); }).forEach(subsections::addContent); return Optional.of(Section.builder().title("Sources").order(10).addBlock(subsections.build()).build()); } private static Optional
createReasonSection(Element element) { return findChild(element, Result.ELEMENT) // .flatMap(result -> findChild(result, Reason.ELEMENT)) // .map(Node::getTextContent) // .map(reason -> { var paragraph = Paragraph.builder().content(reason).build(); return Section.builder().title("Reason").order(20).addBlock(paragraph).build(); }); } private static Optional
createAttachmentsSection(Context context) { var children = findChild(context.element(), Attachments.ELEMENT) // .map(DomUtils::children) // .orElseGet(Stream::empty) // .filter(Element.class::isInstance) // .toList(); if (children.isEmpty()) { return Optional.empty(); } var subsections = Subsections.builder(); children.stream().map(child -> { var type = child.getLocalName(); var section = Section.builder().title(capitalize(type)); if (matches(File.ELEMENT, child)) { addFileAttachment(context, child, section); } else if (matches(Data.ELEMENT, child)) { addDataAttachment(child, section); } else if (matches(Output.ELEMENT, child)) { addOutputAttachment(child, section); } return section.build(); }).forEach(subsections::addContent); return Optional.of(Section.builder().title("Attachments").order(30).addBlock(subsections.build()).build()); } private static void addFileAttachment(Context context, Node child, Section.Builder section) { var attributes = KeyValuePairs.builder(); getAttributeValue(child, File.TIME).ifPresent(section::metaInfo); var mediaType = getAttributeValue(child, File.MEDIA_TYPE); getAttributeValue(child, File.PATH).ifPresent(rawPath -> { var pathWithNormalizedSeparators = rawPath.replace('\\', '/'); var originalPath = context.sourceXmlFile().getParent().resolve( pathWithNormalizedSeparators).toAbsolutePath(); var path = context.relativizeToTargetDirectory(originalPath); var filename = path.getFileName().toString(); filename = filename.substring(Math.max(filename.lastIndexOf('/'), filename.lastIndexOf('\\')) + 1); attributes.putContent("Filename", filename); attributes.putContent("Path", "link:" + path); if (Files.isRegularFile(originalPath)) { var resolvedMediaType = mediaType.or(() -> { try { return Optional.ofNullable(Files.probeContentType(path)); } catch (IOException e) { return Optional.empty(); } }).orElse(null); if (resolvedMediaType != null) { addInlineFileBlock(section, resolvedMediaType, path, filename, originalPath); } } }); mediaType.ifPresent(it -> attributes.putContent("Media type", it)); section.addBlock(attributes.build()); } private static void addInlineFileBlock(Section.Builder section, String resolvedMediaType, Path path, String filename, Path originalPath) { if (SUPPORTED_IMAGE_MEDIA_TYPES.contains(resolvedMediaType)) { section.addBlock(Image.builder().content(path.toString()).altText(filename).build()); } else if (SUPPORTED_TEXT_MEDIA_TYPES.stream().anyMatch(resolvedMediaType::startsWith)) { try { var charset = parseCharset(resolvedMediaType); var content = Files.readString(originalPath, charset); section.addBlock(PreFormattedOutput.builder().content(content).build()); } catch (IOException ignore) { } } } private static void addDataAttachment(Node child, Section.Builder section) { var attributes = KeyValuePairs.builder(); getAttributeValue(child, Data.TIME).ifPresent(section::metaInfo); findChildren(child, Data.Entry.ELEMENT).forEach(entry -> { getAttributeValue(entry, Data.Entry.KEY).ifPresent(key -> { var value = entry.getTextContent(); attributes.putContent(key, value); }); }); section.addBlock(attributes.build()); } private static void addOutputAttachment(Node child, Section.Builder section) { getAttributeValue(child, Output.SOURCE) // .map(source -> switch (source) { case "stdout" -> "Standard output"; case "stderr" -> "Standard error"; default -> "%s (%s)".formatted("Output", source); }) // .ifPresent(section::title); getAttributeValue(child, Output.TIME).ifPresent(section::metaInfo); section.addBlock(PreFormattedOutput.builder().content(child.getTextContent()).build()); } private static Charset parseCharset(String resolvedMediaType) { var mediaTypeParts = resolvedMediaType.split(";"); for (var part : mediaTypeParts) { if (part.trim().startsWith("charset=")) { var charsetName = part.trim().substring("charset=".length()).trim(); if (charsetName.startsWith("\"") && charsetName.endsWith("\"")) { charsetName = charsetName.substring(1, charsetName.length() - 1); } return Charset.forName(charsetName); } } return Charset.defaultCharset(); } private static String prettifyCamelCaseName(String value) { var matcher = CAMEL_CASE_WORD_BOUNDARY_PATTERN.matcher(value); while (matcher.find()) { value = matcher.replaceFirst(matcher.group(1) + " " + matcher.group(2).toLowerCase(Locale.ROOT)); matcher = CAMEL_CASE_WORD_BOUNDARY_PATTERN.matcher(value); } return capitalize(value); } static void addToTable(Node parent, QualifiedName elementName, String label, BiConsumer table) { addToTable(findChild(parent, elementName), label, table); } @SuppressWarnings("OptionalUsedAsFieldOrParameterType") static void addToTable(Optional node, String label, BiConsumer table) { node // .map(Node::getTextContent) // .ifPresent(value -> table.accept(label, value)); } private static String capitalize(String value) { return value.substring(0, 1).toUpperCase(Locale.ROOT) + value.substring(1); } } DefaultHtmlReportWriter.java000066400000000000000000000266321514323636100440140ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.htmlreport; import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; import com.google.gson.JsonSerializer; import org.apiguardian.api.API; import org.opentest4j.reporting.events.core.Result; import org.opentest4j.reporting.events.root.Events; import org.opentest4j.reporting.schema.Namespace; import org.opentest4j.reporting.schema.QualifiedName; import org.opentest4j.reporting.tooling.core.converter.DefaultConverter; import org.opentest4j.reporting.tooling.spi.htmlreport.Block; import org.opentest4j.reporting.tooling.spi.htmlreport.Contributor; import org.opentest4j.reporting.tooling.spi.htmlreport.Image; import org.opentest4j.reporting.tooling.spi.htmlreport.KeyValuePairs; import org.opentest4j.reporting.tooling.spi.htmlreport.Labels; import org.opentest4j.reporting.tooling.spi.htmlreport.Paragraph; import org.opentest4j.reporting.tooling.spi.htmlreport.PreFormattedOutput; import org.opentest4j.reporting.tooling.spi.htmlreport.Section; import org.opentest4j.reporting.tooling.spi.htmlreport.Subsections; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.time.Duration; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Deque; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Scanner; import java.util.ServiceLoader; import java.util.Set; import java.util.function.BiConsumer; import java.util.function.BiFunction; import java.util.function.Function; import static java.util.Comparator.comparing; import static java.util.Objects.requireNonNull; import static org.apiguardian.api.API.Status.EXPERIMENTAL; import static org.opentest4j.reporting.tooling.core.util.DomUtils.children; import static org.opentest4j.reporting.tooling.core.util.DomUtils.matches; /** * Default implementation of {@link HtmlReportWriter}. * * @since 0.2.0 */ @API(status = EXPERIMENTAL, since = "0.2.0") public class DefaultHtmlReportWriter implements HtmlReportWriter { private static final QualifiedName ROOT_ELEMENT = QualifiedName.of(Namespace.REPORTING_HIERARCHY, "root"); private static final QualifiedName CHILD_ELEMENT = QualifiedName.of(Namespace.REPORTING_HIERARCHY, "child"); private static final String PLACEHOLDER_SCRIPT_TAG = ""; private final ServiceLoader contributors = ServiceLoader.load(Contributor.class); /** * Create a new instance. */ public DefaultHtmlReportWriter() { } @Override public void writeHtmlReport(List xmlFiles, Path htmlFile) throws Exception { var executions = extractData(xmlFiles, htmlFile); try (var template = new Scanner(openTemplate()); var out = Files.newBufferedWriter(htmlFile)) { while (template.hasNextLine()) { var line = template.nextLine(); var placeHolderIndex = line.indexOf(PLACEHOLDER_SCRIPT_TAG); if (placeHolderIndex >= 0) { var indent = " ".repeat(placeHolderIndex); appendScriptTag(executions, indent, out); } else { out.write(line); out.newLine(); } } } } private List extractData(List xmlFiles, Path htmlFile) throws Exception { var idGenerator = new IdGenerator(); var executions = new ArrayList(); for (Path xmlFile : xmlFiles) { var rootElement = parseDom(xmlFile); var name = String.format(tryRelativize(htmlFile, xmlFile).toString()); executions.add( extractData(idGenerator, rootElement, name, element -> new DefaultContext(element, xmlFile, htmlFile))); } return executions; } static Path tryRelativize(Path htmlFile, Path file) { try { var parent = htmlFile.toAbsolutePath().getParent(); if (parent == null) { return file; } return parent.relativize(file.toAbsolutePath()); } catch (IllegalArgumentException e) { return file; } } private static void appendScriptTag(List executions, String indent, BufferedWriter out) throws IOException { out.append(indent).append(""); out.newLine(); } private static void appendJavaScript(List executions, Appendable out) throws IOException { var gson = new GsonBuilder() // .registerTypeHierarchyAdapter(Section.class, (JsonSerializer
) (section, typeOfSrc, context) -> { var jsonObject = new JsonObject(); jsonObject.addProperty("title", section.getTitle()); section.getMetaInfo().ifPresent(metaInfo -> jsonObject.addProperty("metaInfo", metaInfo)); jsonObject.add("blocks", context.serialize(section.getBlocks())); return jsonObject; }) // .registerTypeHierarchyAdapter(KeyValuePairs.class, blockSerializer("kvp")) // .registerTypeHierarchyAdapter(Labels.class, blockSerializer("labels")) // .registerTypeHierarchyAdapter(Paragraph.class, blockSerializer("p")) // .registerTypeHierarchyAdapter(PreFormattedOutput.class, blockSerializer("pre")) // .registerTypeHierarchyAdapter(Subsections.class, blockSerializer("sub")) // .registerTypeHierarchyAdapter(Image.class, blockSerializer("img", (Image image, JsonObject json) -> json.addProperty("altText", image.getAltText()))) // .disableJdkUnsafe() // .create(); out.append("globalThis.testExecutions = "); gson.toJson(executions, out); out.append(";"); } private static > JsonSerializer blockSerializer(String type) { return blockSerializer(type, (__, ___) -> { }); } private static > JsonSerializer blockSerializer(String type, BiConsumer additionalElementSerializer) { return (block, typeOfSrc, context) -> { var jsonObject = new JsonObject(); jsonObject.addProperty("type", type); jsonObject.add("content", context.serialize(block.getContent())); additionalElementSerializer.accept(block, jsonObject); return jsonObject; }; } private Execution extractData(IdGenerator idGenerator, Element rootElement, String name, Function contextCreator) { var execution = new Execution(idGenerator.next(), name); addSections(contextCreator.apply(rootElement), execution); for (Node child = rootElement.getFirstChild(); child != null; child = child.getNextSibling()) { if (matches(ROOT_ELEMENT, child)) { var root = visitNode((Element) child, idGenerator, new ArrayDeque<>(), execution, contextCreator); execution.durationMillis += root.durationMillis; execution.roots.add(root.id); } } return execution; } private TestNode visitNode(Element node, IdGenerator idGenerator, Deque parentIds, Execution execution, Function contextCreator) { String currentId = idGenerator.next(); String status = children(node) // .filter(it -> matches(Result.ELEMENT, it)) // .findAny() // .map(it -> ((Element) it).getAttribute(Result.STATUS.getSimpleName())).orElse(null); var duration = Duration.parse(node.getAttribute("duration")); var testNode = new TestNode(currentId, node.getAttribute("name"), duration.toMillis(), status); execution.testNodes.add(testNode); addSections(contextCreator.apply(node), testNode); ChildMetadata parentChildMetadata = null; if (!parentIds.isEmpty()) { String parentId = parentIds.peek(); parentChildMetadata = execution.children.computeIfAbsent(parentId, __ -> new ChildMetadata()); parentChildMetadata.addChild(currentId, status); } parentIds.push(currentId); for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) { if (matches(CHILD_ELEMENT, child)) { visitNode((Element) child, idGenerator, parentIds, execution, contextCreator); } } parentIds.pop(); ChildMetadata currentNodeChildMetadata = execution.children.get(currentId); if (currentNodeChildMetadata != null && parentChildMetadata != null) { parentChildMetadata.childStatuses.addAll(currentNodeChildMetadata.childStatuses); } return testNode; } private void addSections(Contributor.Context context, Execution execution) { contributeSections(context, Contributor::contributeSectionsForExecution, execution.sections); } private void addSections(Contributor.Context context, TestNode node) { contributeSections(context, Contributor::contributeSectionsForTestNode, node.sections); } private void contributeSections(Contributor.Context context, BiFunction> call, List
sections) { contributors.stream() // .flatMap(it -> call.apply(it.get(), context).stream()).sorted(comparing(Section::getOrder)) // .forEach(sections::add); } static class IdGenerator { private int nextId = 1; String next() { return Integer.toString(nextId++); } } private static Element parseDom(Path xmlFile) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); Document sourceDocument = builder.parse(xmlFile.toFile()); Element element = sourceDocument.getDocumentElement(); if (matches(Events.ELEMENT, element)) { return new DefaultConverter().convert(element).getDocumentElement(); } return element; } private InputStream openTemplate() { return requireNonNull(getClass().getResourceAsStream("template.html")); } private static class Execution { public final String id; public final String name; public long durationMillis; public final List
sections = new ArrayList<>(); public final List roots = new ArrayList<>(); public final Map children = new LinkedHashMap<>(); public final List testNodes = new ArrayList<>(); Execution(String id, String name) { this.id = id; this.name = name; } } private record ChildMetadata(List ids, Set childStatuses) { ChildMetadata() { this(new ArrayList<>(), new HashSet<>()); } private void addChild(String childId, String status) { ids.add(childId); if (status != null) { childStatuses.add(status); } } } private record TestNode(String id, String name, long durationMillis, String status, List
sections) { TestNode(String id, String name, long durationMillis, String status) { this(id, name, durationMillis, status, new ArrayList<>()); } } private record DefaultContext(Element element, Path sourceXmlFile, Path targetHtmlFile) implements Contributor.Context { @Override public Path relativizeToTargetDirectory(Path path) { return tryRelativize(targetHtmlFile, path); } } } GitContributor.java000066400000000000000000000071121514323636100421600ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.htmlreport; import org.apiguardian.api.API; import org.opentest4j.reporting.events.core.Infrastructure; import org.opentest4j.reporting.events.git.Branch; import org.opentest4j.reporting.events.git.Commit; import org.opentest4j.reporting.events.git.Repository; import org.opentest4j.reporting.events.git.Status; import org.opentest4j.reporting.tooling.spi.htmlreport.Contributor; import org.opentest4j.reporting.tooling.spi.htmlreport.KeyValuePairs; import org.opentest4j.reporting.tooling.spi.htmlreport.PreFormattedOutput; import org.opentest4j.reporting.tooling.spi.htmlreport.Section; import org.opentest4j.reporting.tooling.spi.htmlreport.Subsections; import org.w3c.dom.Node; import java.util.ArrayList; import java.util.List; import java.util.Optional; import static org.apiguardian.api.API.Status.INTERNAL; import static org.opentest4j.reporting.tooling.core.htmlreport.CoreContributor.addToTable; import static org.opentest4j.reporting.tooling.core.util.DomUtils.findChild; import static org.opentest4j.reporting.tooling.core.util.DomUtils.getAttribute; /** * Contributes sections to the HTML report elements in the git schema. * * @since 0.2.0 */ @API(status = INTERNAL, since = "0.2.0") public class GitContributor implements Contributor { /** * Create a new instance. */ public GitContributor() { } @Override public List
contributeSectionsForExecution(Context context) { var sections = new ArrayList
(); findChild(context.element(), Infrastructure.ELEMENT) // .flatMap(GitContributor::createGitSection) // .ifPresent(sections::add); return sections; } private static Optional
createGitSection(Node infrastructure) { var table = KeyValuePairs.builder(); findChild(infrastructure, Repository.ELEMENT) // .ifPresent(repository -> addToTable(getAttribute(repository, Repository.ORIGIN_URL), "Origin", table::putContent)); addToTable(infrastructure, Branch.ELEMENT, "Branch", table::putContent); addToTable(infrastructure, Commit.ELEMENT, "Commit hash", table::putContent); var status = findChild(infrastructure, Status.ELEMENT); status.ifPresent(it -> addToTable(getAttribute(it, Status.CLEAN), "Clean", table::putContent)); var statusBlock = status.map(Node::getTextContent) // .filter(it -> !it.isBlank()) // .map(statusText -> { var codeBlock = PreFormattedOutput.builder().content(statusText).build(); var statusSubsection = Section.builder().title("Status of working tree").addBlock( codeBlock).build(); return Subsections.builder().addContent(statusSubsection).build(); }); var sectionBuilder = Section.builder().title("Git").order(15); var keyValuePairs = table.build(); if (!keyValuePairs.getContent().isEmpty()) { sectionBuilder.addBlock(keyValuePairs); } statusBlock.ifPresent(sectionBuilder::addBlock); var section = sectionBuilder.build(); return section.getBlocks().isEmpty() ? Optional.empty() : Optional.of(section); } } HtmlReportWriter.java000066400000000000000000000026231514323636100425010ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.htmlreport; import org.apiguardian.api.API; import java.nio.file.Path; import java.util.List; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * Writer of HTML reports for event-based and hierarchical XML report files. * * @since 0.2.0 */ @API(status = EXPERIMENTAL, since = "0.2.0") public interface HtmlReportWriter { /** * Write an HTML report for the supplied XML files. * *

The supplied XML files may be in the event-based or hierarchical format. * * @param xmlFiles XML files in event-based or hierarchical format * @param htmlFile the target HTML file * @throws Exception if an error occurs during creation of the HTML report */ void writeHtmlReport(List xmlFiles, Path htmlFile) throws Exception; } JavaContributor.java000066400000000000000000000116251514323636100423220ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.htmlreport; import org.apiguardian.api.API; import org.opentest4j.reporting.events.core.Infrastructure; import org.opentest4j.reporting.events.core.Result; import org.opentest4j.reporting.events.java.FileEncoding; import org.opentest4j.reporting.events.java.HeapSize; import org.opentest4j.reporting.events.java.JavaVersion; import org.opentest4j.reporting.events.java.Throwable; import org.opentest4j.reporting.tooling.spi.htmlreport.Contributor; import org.opentest4j.reporting.tooling.spi.htmlreport.KeyValuePairs; import org.opentest4j.reporting.tooling.spi.htmlreport.PreFormattedOutput; import org.opentest4j.reporting.tooling.spi.htmlreport.Section; import org.opentest4j.reporting.tooling.spi.htmlreport.Subsections; import org.w3c.dom.Element; import org.w3c.dom.Node; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; import java.util.Optional; import static org.apiguardian.api.API.Status.INTERNAL; import static org.opentest4j.reporting.tooling.core.htmlreport.CoreContributor.addToTable; import static org.opentest4j.reporting.tooling.core.util.DomUtils.findChild; import static org.opentest4j.reporting.tooling.core.util.DomUtils.findChildren; import static org.opentest4j.reporting.tooling.core.util.DomUtils.getAttributeValue; /** * Contributes sections to the HTML report elements in the java schema. * * @since 0.2.0 */ @API(status = INTERNAL, since = "0.2.0") public class JavaContributor implements Contributor { /** * Create a new instance. */ public JavaContributor() { } @Override public List

contributeSectionsForExecution(Context context) { var sections = new ArrayList
(); findChild(context.element(), Infrastructure.ELEMENT) // .flatMap(JavaContributor::createJvmSection) // .ifPresent(sections::add); return sections; } @Override public List
contributeSectionsForTestNode(Context context) { var sections = new ArrayList
(); createResultSection(context.element()).ifPresent(sections::add); return sections; } private static Optional
createJvmSection(Node infrastructure) { var table = new LinkedHashMap(); addToTable(infrastructure, JavaVersion.ELEMENT, "Java version", table::put); addToTable(infrastructure, FileEncoding.ELEMENT, "File encoding", table::put); findChild(infrastructure, HeapSize.ELEMENT) // .flatMap(heapSize -> getAttributeValue(heapSize, HeapSize.MAX)) // .map(maxHeapSize -> String.format("%s (%s bytes)", toHumanReadableFormat(Long.parseLong(maxHeapSize)), maxHeapSize)) // .ifPresent(maxHeapSize -> table.put("Max heap size", maxHeapSize)); if (table.isEmpty()) { return Optional.empty(); } var keyValuePairs = KeyValuePairs.builder().content(table).build(); return Optional.of(Section.builder().title("Java Virtual Machine").order(10).addBlock(keyValuePairs).build()); } private static Optional
createResultSection(Element element) { return findChild(element, Result.ELEMENT) // .map(result -> findChildren(result, Throwable.ELEMENT) // .map(throwable -> { var type = getAttributeValue(throwable, Throwable.TYPE).orElse("Throwable"); var stackTrace = throwable.getTextContent(); var preFormattedOutput = PreFormattedOutput.builder().content(stackTrace).build(); return Section.builder().title(type).addBlock(preFormattedOutput).build(); }) // .toList() // ) // .filter(content -> !content.isEmpty()) // .map(content -> Subsections.builder().content(content).build()) // .map(subsections -> Section.builder().title("Result").order(25).addBlock(subsections).build()); } // Adapted from https://www.baeldung.com/java-human-readable-byte-size#using-the-longnumberofleadingzeros-method private static String toHumanReadableFormat(long size) { if (size < 1024) return size + " B"; int unitIdx = (63 - Long.numberOfLeadingZeros(size)) / 10; return formatSize(size, 1L << (unitIdx * 10), " KMGTPE".charAt(unitIdx) + "iB"); } private static String formatSize(long size, long divider, String unitName) { return new DecimalFormat("#.##", new DecimalFormatSymbols(Locale.US)).format((double) size / divider) + " " + unitName; } } util/000077500000000000000000000000001514323636100351135ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/coreDomUtils.java000066400000000000000000000173261514323636100375270ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/util/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.util; import org.apiguardian.api.API; import org.opentest4j.reporting.schema.Namespace; import org.opentest4j.reporting.schema.QualifiedName; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import java.util.Arrays; import java.util.Optional; import java.util.function.IntFunction; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.IntStream; import java.util.stream.Stream; import static org.apiguardian.api.API.Status.INTERNAL; /** * Internal utils to work with DOM types * * @since 0.2.0 */ @API(status = INTERNAL, since = "0.2.0") public class DomUtils { private static final Pattern NAMESPACE_VERSION_PATTERN = Pattern.compile("^(.+)/([0-9.]+)$"); private DomUtils() { } /** * Find the first child of the supplied parent node with the supplied element name. * * @param parent the parent node * @param elementName the element name to find * @return the first child node with the supplied element name */ public static Optional findChild(Node parent, QualifiedName elementName) { return children(parent) // .filter(child -> DomUtils.matches(elementName, child)) // .findFirst(); } /** * Find the children of the supplied parent node with the supplied element name. * * @param parent the parent node * @param elementName the element name to find * @return the children nodes with the supplied element name */ public static Stream findChildren(Node parent, QualifiedName elementName) { return children(parent) // .filter(child -> DomUtils.matches(elementName, child)); } /** * Stream the children of the supplied node. * * @param parent the parent node * @return a stream of the children of the node */ public static Stream children(Node parent) { return stream(parent.getChildNodes()); } /** * Get the value of the attribute with the supplied element name of the supplied node. * * @param node the node * @param elementName the element name of the attribute * @return the value of the attribute */ public static Optional getAttributeValue(Node node, QualifiedName elementName) { return getAttribute(node, elementName).map(Node::getNodeValue); } /** * Get the attribute with the supplied element name of the supplied node. * * @param node the node * @param elementName the element name of the attribute * @return the attribute */ public static Optional getAttribute(Node node, QualifiedName elementName) { var attributes = node.getAttributes(); var namespaceURI = elementName.getNamespace().getUri(); var simpleName = elementName.getSimpleName(); return Optional.ofNullable(attributes.getNamedItemNS(namespaceURI, simpleName)) // .or(() -> Optional.ofNullable(attributes.getNamedItem(simpleName))); } /** * Stream the nodes of the supplied node list. * * @param nodeList the node list to stream * @return a stream of the nodes in the node list */ public static Stream stream(NodeList nodeList) { return stream(nodeList.getLength(), nodeList::item); } /** * Stream the nodes of the supplied named node map. * * @param namedNodeMap the named node map to stream * @return a stream of the nodes in the named node map */ public static Stream stream(NamedNodeMap namedNodeMap) { return stream(namedNodeMap.getLength(), namedNodeMap::item); } private static Stream stream(int length, IntFunction item) { return IntStream.range(0, length).mapToObj(item); } /** * Check whether the simple name of the supplied node matches the * supplied qualified name and the namespace of the node is compatible * with the namespace of the qualified name (same base URI and version less * than or equal to the version of the qualified name). * * @param qualifiedName the qualified name to match * @param node the node to check * @return {@code true} if the node matches the qualified name */ public static boolean matches(QualifiedName qualifiedName, Node node) { return isNamespaceCompatible(qualifiedName, node) && qualifiedName.getSimpleName().equals(node.getLocalName()); } private static boolean isNamespaceCompatible(QualifiedName qualifiedName, Node node) { return qualifiedName.getNamespace().getUri().equals(node.getNamespaceURI()) // || parseNamespace(qualifiedName.getNamespace().getUri()) // .flatMap(expected -> parseNamespace(node.getNamespaceURI()).filter(expected::isCompatible)) // .isPresent(); } /** * Parse the supplied namespace URI into a base URI and a version. * * @param namespaceUri the namespace URI to parse * @return the versioned namespace */ public static Optional parseNamespace(String namespaceUri) { return Optional.ofNullable(namespaceUri) // .map(NAMESPACE_VERSION_PATTERN::matcher) // .filter(Matcher::matches) // .map(it -> new VersionedNamespace(it.group(1), NamespaceVersion.parse(it.group(2)))); } /** * A namespace base URI and version. */ public static class VersionedNamespace { private final String baseUri; private final NamespaceVersion version; VersionedNamespace(String baseUri, NamespaceVersion version) { this.baseUri = baseUri; this.version = version; } /** * {@return the base URI} */ public String getBaseUri() { return baseUri; } /** * {@return the version} */ public NamespaceVersion getVersion() { return version; } boolean isCompatible(VersionedNamespace that) { return this.getBaseUri().equals(that.getBaseUri()) // && that.getVersion().compareTo(this.getVersion()) <= 0; } /** * Create a new versioned namespace with the supplied version. * * @param version the version * @return the new versioned namespace */ public VersionedNamespace withVersion(NamespaceVersion version) { return new VersionedNamespace(getBaseUri(), version); } /** * Convert this versioned namespace to a namespace. * * @return the namespace */ public Namespace toNamespace() { return Namespace.of(getBaseUri() + "/" + getVersion()); } } /** * Represents a namespace version. */ public static class NamespaceVersion implements Comparable { /** * Parse the supplied version string. * * @param version the version string to parse * @return the parsed version */ public static NamespaceVersion parse(String version) { var parts = Arrays.stream(version.split("\\.")) // .mapToInt(Integer::parseInt) // .toArray(); return new NamespaceVersion(version, parts); } private final String stringValue; private final int[] parts; NamespaceVersion(String stringValue, int[] parts) { this.stringValue = stringValue; this.parts = parts; } @Override public int compareTo(NamespaceVersion that) { for (int i = 0; i < Math.min(this.parts.length, that.parts.length); i++) { int comparison = Integer.compare(this.parts[i], that.parts[i]); if (comparison != 0) { return comparison; } } return Integer.compare(this.parts.length, that.parts.length); } @Override public String toString() { return stringValue; } } } validator/000077500000000000000000000000001514323636100361235ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/coreDefaultValidator.java000066400000000000000000000156001514323636100422220ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/validator/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.validator; import org.apiguardian.api.API; import org.opentest4j.reporting.schema.Namespace; import org.opentest4j.reporting.schema.Schemas; import org.w3c.dom.ls.LSInput; import org.w3c.dom.ls.LSResourceResolver; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; import javax.xml.catalog.CatalogFeatures; import javax.xml.catalog.CatalogFeatures.Feature; import javax.xml.catalog.CatalogResolver; import javax.xml.transform.Source; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.SchemaFactory; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.io.UncheckedIOException; import java.net.URI; import java.net.URL; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import static java.util.Objects.requireNonNull; import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI; import static javax.xml.catalog.CatalogManager.catalogResolver; import static org.apiguardian.api.API.Status.EXPERIMENTAL; import static org.opentest4j.reporting.tooling.core.validator.Severity.ERROR; import static org.opentest4j.reporting.tooling.core.validator.Severity.WARNING; /** * Default implementation of {@link Validator}. * * @since 0.1.0 */ @API(status = EXPERIMENTAL, since = "0.1.0") public class DefaultValidator implements Validator { private final SchemaFactory schemaFactory = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI); private final CatalogResolver catalogResolver; /** * Create a new instance. * * @param catalogs for resolving references to XML schemas */ public DefaultValidator(URI... catalogs) { var features = CatalogFeatures.builder().with(Feature.RESOLVE, "continue").build(); this.catalogResolver = catalogResolver(features, catalogs); } @Override public ValidationResult validate(Path xmlFile) { try (var in = Files.newInputStream(xmlFile)) { return validateSafely(xmlFile, new StreamSource(in)); } catch (Exception e) { throw new RuntimeException("Failure during validation: " + xmlFile, e); } } private ValidationResult validateSafely(Path xmlFile, Source source) throws SAXException, IOException { var errorHandler = new CollectingErrorHandler(xmlFile); validate(source, errorHandler); return errorHandler.toValidationResult(); } private void validate(Source source, ErrorHandler errorHandler) throws SAXException, IOException { var validator = schemaFactory.newSchema().newValidator(); validator.setResourceResolver(createResourceResolver()); validator.setErrorHandler(errorHandler); validator.validate(source); } private LSResourceResolver createResourceResolver() { return (type, namespaceURI, publicId, systemId, baseURI) -> { if (namespaceURI != null) { var namespace = Namespace.of(namespaceURI); var schemaLocation = Schemas.getSchemaLocation(namespace); if (schemaLocation.isPresent()) { LSInputImpl input = new LSInputImpl(); input.setPublicId(publicId); var url = schemaLocation.get(); input.setSystemId(url.toExternalForm()); input.setBaseURI(baseURI); @SuppressWarnings("resource") var stream = openStream(url); input.setCharacterStream(new InputStreamReader(requireNonNull(stream))); return input; } } if (systemId != null) { return catalogResolver.resolveResource(type, namespaceURI, publicId, systemId, baseURI); } return null; }; } private static InputStream openStream(URL url) { try { return url.openStream(); } catch (IOException e) { throw new UncheckedIOException("Failed to read resource from " + url, e); } } static class LSInputImpl implements LSInput { private Reader characterStream; private InputStream byteStream; private String stringData; private String systemId; private String publicId; private String baseURI; private String encoding; private boolean certifiedText; @Override public Reader getCharacterStream() { return characterStream; } @Override public void setCharacterStream(Reader characterStream) { this.characterStream = characterStream; } @Override public InputStream getByteStream() { return byteStream; } @Override public void setByteStream(InputStream byteStream) { this.byteStream = byteStream; } @Override public String getStringData() { return stringData; } @Override public void setStringData(String stringData) { this.stringData = stringData; } @Override public String getSystemId() { return systemId; } @Override public void setSystemId(String systemId) { this.systemId = systemId; } @Override public String getPublicId() { return publicId; } @Override public void setPublicId(String publicId) { this.publicId = publicId; } @Override public String getBaseURI() { return baseURI; } @Override public void setBaseURI(String baseURI) { this.baseURI = baseURI; } @Override public String getEncoding() { return encoding; } @Override public void setEncoding(String encoding) { this.encoding = encoding; } @Override public boolean getCertifiedText() { return certifiedText; } @Override public void setCertifiedText(boolean certifiedText) { this.certifiedText = certifiedText; } } private static class CollectingErrorHandler implements ErrorHandler { private final Path xmlFile; private final List messages = new ArrayList<>(); public CollectingErrorHandler(Path xmlFile) { this.xmlFile = xmlFile; } @Override public void warning(SAXParseException e) { addValidationMessage(WARNING, e); } @Override public void error(SAXParseException e) { addValidationMessage(ERROR, e); } private void addValidationMessage(Severity severity, SAXParseException e) { var path = e.getSystemId() == null ? xmlFile.toString() : e.getSystemId(); var location = new Location(path, e.getLineNumber(), e.getColumnNumber()); messages.add(new ValidationMessage(severity, location, e.getMessage())); } @Override public void fatalError(SAXParseException e) throws SAXParseException { throw e; } public ValidationResult toValidationResult() { return new ValidationResult(List.copyOf(messages)); } } } Location.java000066400000000000000000000022521514323636100405370ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/validator/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.validator; import org.apiguardian.api.API; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * Location of a {@linkplain ValidationMessage validation message}. * * @param path the path of the file * @param lineNumber the line number * @param column the column number * @since 0.1.0 */ @API(status = EXPERIMENTAL, since = "0.1.0") public record Location(String path, int lineNumber, int column) { @Override public String toString() { return String.format("%s:%d:%d", path, lineNumber, column); } } Severity.java000066400000000000000000000017571514323636100406120ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/validator/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.validator; import org.apiguardian.api.API; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * Severity of a {@linkplain ValidationMessage validation message}. * * @since 0.1.0 */ @API(status = EXPERIMENTAL, since = "0.1.0") public enum Severity { /** * A warning. */ WARNING, /** * An error. */ ERROR } ValidationMessage.java000066400000000000000000000023051514323636100423650ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/validator/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.validator; import org.apiguardian.api.API; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * Validation message with severity and location. * * @param severity the severity of the message * @param location the location of the message * @param message the message * @since 0.1.0 */ @API(status = EXPERIMENTAL, since = "0.1.0") public record ValidationMessage(Severity severity, Location location, String message) { @Override public String toString() { return String.format("[%s] %s - %s", severity, location, message); } } ValidationResult.java000066400000000000000000000032641514323636100422640ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/validator/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.validator; import org.apiguardian.api.API; import java.util.Iterator; import java.util.List; import java.util.Objects; import static java.util.stream.Collectors.joining; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * Result of validating an XML report file. * * @param messages the validation messages * @since 0.1.0 */ @API(status = EXPERIMENTAL, since = "0.1.0") public record ValidationResult(List messages) implements Iterable { /** * Count the number of validation messages with the supplied severity. * * @param severity the severity to count * @return number of validation messages with the supplied severity */ public long count(Severity severity) { return messages.stream().filter(m -> severity.equals(m.severity())).count(); } @Override public Iterator iterator() { return messages.iterator(); } @Override public String toString() { return messages.stream() // .map(Objects::toString) // .collect(joining("\n")); } } Validator.java000066400000000000000000000021611514323636100407130ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/java/org/opentest4j/reporting/tooling/core/validator/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.validator; import org.apiguardian.api.API; import java.nio.file.Path; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * Validator for event-based and hierarchical XML report files. * * @since 0.1.0 */ @API(status = EXPERIMENTAL, since = "0.1.0") public interface Validator { /** * Validate the supplied XML file. * * @param xmlFile the XML file to validate * @return validation result */ ValidationResult validate(Path xmlFile); } jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/resources/000077500000000000000000000000001514323636100260045ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/resources/META-INF/000077500000000000000000000000001514323636100271445ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/resources/META-INF/services/000077500000000000000000000000001514323636100307675ustar00rootroot00000000000000org.opentest4j.reporting.tooling.spi.htmlreport.Contributor000066400000000000000000000003021514323636100444770ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/main/resources/META-INF/servicesorg.opentest4j.reporting.tooling.core.htmlreport.CoreContributor org.opentest4j.reporting.tooling.core.htmlreport.GitContributor org.opentest4j.reporting.tooling.core.htmlreport.JavaContributor jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/module/000077500000000000000000000000001514323636100243335ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/module/java/000077500000000000000000000000001514323636100252545ustar00rootroot00000000000000org.opentest4j.reporting.tooling.core/000077500000000000000000000000001514323636100344735ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/module/javamodule-info.java000066400000000000000000000032571514323636100375630ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/module/java/org.opentest4j.reporting.tooling.core/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Java API for validating both formats, converting from the event-based to the * hierarchical format (suitable for inclusion in build tools and reporting * tools), and generating HTML reports * * @since 0.2.0 */ module org.opentest4j.reporting.tooling.core { requires static org.apiguardian.api; requires com.google.gson; requires org.opentest4j.reporting.events; requires org.opentest4j.reporting.tooling.spi; exports org.opentest4j.reporting.tooling.core.converter; exports org.opentest4j.reporting.tooling.core.htmlreport; exports org.opentest4j.reporting.tooling.core.validator; uses org.opentest4j.reporting.tooling.spi.htmlreport.Contributor; provides org.opentest4j.reporting.tooling.spi.htmlreport.Contributor with org.opentest4j.reporting.tooling.core.htmlreport.CoreContributor, org.opentest4j.reporting.tooling.core.htmlreport.GitContributor, org.opentest4j.reporting.tooling.core.htmlreport.JavaContributor; opens org.opentest4j.reporting.tooling.core.htmlreport to com.google.gson; } jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/000077500000000000000000000000001514323636100240255ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/000077500000000000000000000000001514323636100247465ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/000077500000000000000000000000001514323636100255355ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/000077500000000000000000000000001514323636100276345ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/000077500000000000000000000000001514323636100316455ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/tooling/000077500000000000000000000000001514323636100333205ustar00rootroot00000000000000core/000077500000000000000000000000001514323636100341715ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/toolingconverter/000077500000000000000000000000001514323636100362005ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/tooling/coreDefaultConverterTests.java000066400000000000000000000174561514323636100433570ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/tooling/core/converter/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.converter; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import org.opentest4j.reporting.events.api.DocumentWriter; import org.opentest4j.reporting.events.api.NamespaceRegistry; import org.opentest4j.reporting.events.root.Events; import org.opentest4j.reporting.schema.Namespace; import org.opentest4j.reporting.tooling.core.util.DomUtils; import org.opentest4j.reporting.tooling.core.util.DomUtils.NamespaceVersion; import org.xmlunit.assertj3.XmlAssert; import org.xmlunit.builder.Input; import org.xmlunit.util.Convert; import java.nio.file.Files; import java.nio.file.Path; import java.time.Duration; import java.time.Instant; import java.time.LocalDateTime; import java.util.Arrays; import java.util.Map; import java.util.function.Consumer; import static org.opentest4j.reporting.events.core.CoreFactory.attachments; import static org.opentest4j.reporting.events.core.CoreFactory.cpuCores; import static org.opentest4j.reporting.events.core.CoreFactory.data; import static org.opentest4j.reporting.events.core.CoreFactory.infrastructure; import static org.opentest4j.reporting.events.core.CoreFactory.metadata; import static org.opentest4j.reporting.events.core.CoreFactory.result; import static org.opentest4j.reporting.events.core.CoreFactory.tag; import static org.opentest4j.reporting.events.core.CoreFactory.tags; import static org.opentest4j.reporting.events.core.Result.Status.SUCCESSFUL; import static org.opentest4j.reporting.events.root.RootFactory.finished; import static org.opentest4j.reporting.events.root.RootFactory.reported; import static org.opentest4j.reporting.events.root.RootFactory.started; class DefaultConverterTests { static final NamespaceRegistry NAMESPACE_REGISTRY = NamespaceRegistry.builder(Namespace.REPORTING_CORE) // .add("e", Namespace.REPORTING_EVENTS) // .add("java", Namespace.REPORTING_JAVA) // .build(); static final NamespaceVersion CURRENT_VERSION = DomUtils.parseNamespace( Namespace.REPORTING_HIERARCHY.getUri()).orElseThrow().getVersion(); Path sourceFile; Path targetFile; @BeforeEach void setUp(@TempDir Path tempDir) { sourceFile = tempDir.resolve("events.xml"); targetFile = tempDir.resolve("hierarchy.xml"); } @Test void convertsInfrastructureSection() throws Exception { writeXml(sourceFile, writer -> writer.append(infrastructure(), infrastructure -> infrastructure.append(cpuCores(42)))); new DefaultConverter().convert(sourceFile, targetFile); assertAll(targetFile, CURRENT_VERSION, it -> it.valueByXPath("//*/c:infrastructure/c:cpuCores").isEqualTo(42)); } @Test void convertsStartedAndFinishedEvents() throws Exception { var duration = Duration.ofMillis(42); var startTime = Instant.now().minus(duration); writeXml(sourceFile, writer -> writer // .append(started("1", startTime, "container"), started -> started // .append(metadata(), metadata -> metadata // .append(tags(), tags -> tags // .append(tag("a"))))) // .append(started("2", startTime.plus(duration), "test"), started -> started.withParentId("1")) // .append(finished("2", startTime.plus(duration.multipliedBy(2)))) // .append(finished("1", startTime.plus(duration.multipliedBy(3))), finished -> finished // .append(result(SUCCESSFUL)))); new DefaultConverter().convert(sourceFile, targetFile); assertAll(targetFile, CURRENT_VERSION, // it -> it.nodesByXPath("//*/h:root") // .hasSize(1) // .haveAttribute("name", "container") // .haveAttribute("start", startTime.toString()) // .haveAttribute("duration", duration.multipliedBy(3).toString()), // it -> it.valueByXPath("//*/h:root/c:metadata/c:tags/c:tag") // .isEqualTo("a"), // it -> it.valueByXPath("//*/h:root/c:result/@status") // .isEqualTo("SUCCESSFUL"), // it -> it.nodesByXPath("//*/h:root/h:child") // .hasSize(1) // .haveAttribute("name", "test") // .haveAttribute("start", startTime.plus(duration).toString()) // .haveAttribute("duration", duration.toString()) // ); } @Test void mergesReportEntries() throws Exception { writeXml(sourceFile, writer -> writer.append(started("1", Instant.now(), "test"), started -> started // .append(attachments(), attachments -> attachments // .append(data(LocalDateTime.now()), data -> data.addEntry("started", "1")))) // .append(reported("1", Instant.now()), reported -> reported // .append(attachments(), attachments -> attachments // .append(data(LocalDateTime.now()), data -> data.addEntry("reported", "2")))) // .append(finished("1", Instant.now()), finished -> finished // .append(attachments(), attachments -> attachments // .append(data(LocalDateTime.now()), data -> data.addEntry("finished", "3"))))); new DefaultConverter().convert(sourceFile, targetFile); assertAll(targetFile, CURRENT_VERSION, // it -> it.nodesByXPath("//*/h:root/c:attachments").hasSize(1), // it -> it.nodesByXPath("//*/h:root/c:attachments/c:data").hasSize(3), // it -> it.valueByXPath("(//*/h:root/c:attachments/c:data/c:entry/@key)[1]").isEqualTo("started"), // it -> it.valueByXPath("(//*/h:root/c:attachments/c:data/c:entry/text())[1]").isEqualTo("1"), // it -> it.valueByXPath("(//*/h:root/c:attachments/c:data/c:entry/@key)[2]").isEqualTo("reported"), // it -> it.valueByXPath("(//*/h:root/c:attachments/c:data/c:entry/text())[2]").isEqualTo("2"), // it -> it.valueByXPath("(//*/h:root/c:attachments/c:data/c:entry/@key)[3]").isEqualTo("finished"), // it -> it.valueByXPath("(//*/h:root/c:attachments/c:data/c:entry/text())[3]").isEqualTo("3") // ); } @Test void convertsOldVersions() throws Exception { Files.writeString(sourceFile, """ 42 """); new DefaultConverter().convert(sourceFile, targetFile); assertAll(targetFile, NamespaceVersion.parse("0.1.0"), // it -> it.nodesByXPath("//h:execution").hasSize(1), // it -> it.valueByXPath("//*/c:infrastructure/c:cpuCores").isEqualTo(42)); } private void writeXml(Path eventsXmlFile, Consumer> action) throws Exception { try (var writer = Events.createDocumentWriter(NAMESPACE_REGISTRY, eventsXmlFile)) { action.accept(writer); } } @SafeVarargs @SuppressWarnings("varargs") private static void assertAll(Path targetFile, NamespaceVersion version, Consumer... checks) { var document = Convert.toDocument(Input.from(targetFile).build()); var xmlAssert = XmlAssert.assertThat(document).withNamespaceContext(Map.of( // "h", toNamespaceUri(Namespace.REPORTING_HIERARCHY, version), // "c", toNamespaceUri(Namespace.REPORTING_CORE, version) // )); Assertions.assertAll(targetFile.toUri().toString(), Arrays.stream(checks).map(it -> () -> it.accept(xmlAssert))); } private static String toNamespaceUri(Namespace namespace, NamespaceVersion version) { return DomUtils.parseNamespace(namespace.getUri()).orElseThrow().withVersion(version).toNamespace().getUri(); } } htmlreport/000077500000000000000000000000001514323636100363715ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/tooling/coreDefaultHtmlReportWriterBrowserTests.java000066400000000000000000000066241514323636100464350ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/tooling/core/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.htmlreport; import com.microsoft.playwright.Page; import com.microsoft.playwright.Page.GetByRoleOptions; import com.microsoft.playwright.Page.ScreenshotOptions; import com.microsoft.playwright.junit.UsePlaywright; import com.microsoft.playwright.options.AriaRole; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.MediaType; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestReporter; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.io.TempDir; import java.nio.file.Path; import java.util.List; import java.util.regex.Pattern; import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat; import static java.util.Objects.requireNonNull; import static org.assertj.core.api.Assertions.assertThat; @UsePlaywright @ExtendWith(PlaywrightTracePublisher.class) class DefaultHtmlReportWriterBrowserTests { @TempDir static Path tempDir; static Path sampleHtmlReport; @BeforeAll static void createHtmlReport() throws Exception { var sampleXmlReport = Path.of(requireNonNull(System.getProperty("sampleXmlReport"))); assertThat(sampleXmlReport).exists().hasExtension("xml"); sampleHtmlReport = tempDir.resolve("open-test-report.html"); new DefaultHtmlReportWriter().writeHtmlReport(List.of(sampleXmlReport), sampleHtmlReport); } @BeforeEach void openHtmlReport(Page page) { page.setViewportSize(1920, 1080); page.navigate(sampleHtmlReport.toUri().toString()); assertThat(page).hasTitle(Pattern.compile("Open Test Report")); } @Test void sampleHtmlReportIsRenderedCorrectly(Page page, TestReporter reporter) { reporter.publishFile("screenshot-failure.png", MediaType.IMAGE_PNG, file -> page.screenshot(new ScreenshotOptions().setPath(file))); assertThat( page.getByRole(AriaRole.HEADING, new GetByRoleOptions().setName("failed(TestReporter)"))).isVisible(); assertThat(page.getByRole(AriaRole.STATUS)).containsText("FAILED"); page.getByRole(AriaRole.SWITCH).click(); page.getByRole(AriaRole.LINK, new GetByRoleOptions().setName("KitchenSinkTests").setExact(true)).click(); reporter.publishFile("screenshot-success.png", MediaType.IMAGE_PNG, file -> page.screenshot(new ScreenshotOptions().setPath(file))); assertThat(page.getByRole(AriaRole.HEADING, new GetByRoleOptions().setName("KitchenSinkTest"))).isVisible(); assertThat(page.getByRole(AriaRole.STATUS)).containsText("SUCCESSFUL"); } @Test void canOpenAttachments(Page page) { page.navigate(sampleHtmlReport.toUri().toString()); assertThat(page.getByText("Hellö, Wörld!")).isVisible(); page.getByText(Pattern.compile("[/\\\\]test.txt$"), new Page.GetByTextOptions().setExact(false)).click(); assertThat(page.getByText("Hellö, Wörld!")).isVisible(); } } DefaultHtmlReportWriterTests.java000066400000000000000000000101021514323636100450530ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/tooling/core/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.htmlreport; import org.intellij.lang.annotations.Language; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; class DefaultHtmlReportWriterTests { @Test // https://github.com/ota4j-team/open-test-reporting/issues/293 void canHandleWhitespaceInSources(@TempDir Path tempDir) throws Exception { @Language("xml") var xml = """ """; var xmlFile = Files.writeString(tempDir.resolve("report.xml"), xml); var writer = new DefaultHtmlReportWriter(); assertDoesNotThrow(() -> writer.writeHtmlReport(List.of(xmlFile), tempDir.resolve("report.html"))); } @Test // https://github.com/ota4j-team/open-test-reporting/issues/294 void canHandleWhitespaceInAttachments(@TempDir Path tempDir) throws Exception { @Language("xml") var xml = """ someOutput """; var xmlFile = Files.writeString(tempDir.resolve("report.xml"), xml); var writer = new DefaultHtmlReportWriter(); assertDoesNotThrow(() -> writer.writeHtmlReport(List.of(xmlFile), tempDir.resolve("report.html"))); } @Test void handlesRelativePath() { var xmlFile = Path.of("junit-platform-events-8096972057150721349.xml"); var relativePath = DefaultHtmlReportWriter.tryRelativize(Path.of("open-test-report.html"), xmlFile); assertThat(relativePath).isEqualTo(xmlFile); } @Test void avoidsHtmlInclusionProblems(@TempDir Path tempDir) throws Exception { @Language("xml") var xml = """ """; var xmlFile = Files.writeString(tempDir.resolve("report.xml"), xml); var htmlFile = tempDir.resolve("report.html"); var writer = new DefaultHtmlReportWriter(); writer.writeHtmlReport(List.of(xmlFile), htmlFile); assertThat(Files.readString(htmlFile)).contains("\"name\":\"\\u003c/script\\u003e\""); } } PlaywrightTracePublisher.java000066400000000000000000000033161514323636100442260ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/tooling/core/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.htmlreport; import com.microsoft.playwright.Tracing; import com.microsoft.playwright.impl.junit.BrowserContextExtension; import org.junit.jupiter.api.MediaType; import org.junit.jupiter.api.extension.BeforeTestExecutionCallback; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.TestWatcher; class PlaywrightTracePublisher implements BeforeTestExecutionCallback, TestWatcher { @Override public void beforeTestExecution(ExtensionContext context) { var startOptions = new Tracing.StartOptions() // .setSnapshots(true) // .setScreenshots(true) // .setTitle(context.getDisplayName()); BrowserContextExtension.getOrCreateBrowserContext(context).tracing().start(startOptions); } @Override public void testFailed(ExtensionContext context, Throwable cause) { context.publishFile("trace.zip", MediaType.parse("application/zip"), path -> { var browserContext = BrowserContextExtension.getOrCreateBrowserContext(context); browserContext.tracing().stop(new Tracing.StopOptions().setPath(path)); }); } } util/000077500000000000000000000000001514323636100351465ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/tooling/coreDomUtilsTest.java000066400000000000000000000037631514323636100404220ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/tooling/core/util/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.util; import org.junit.jupiter.api.Test; import org.opentest4j.reporting.schema.Namespace; import org.opentest4j.reporting.schema.QualifiedName; import org.w3c.dom.Element; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import static org.junit.jupiter.api.Assertions.*; class DomUtilsTest { @Test void matchesCompatibleNamespaces() { assertAll( // () -> assertTrue(DomUtils.matches(QualifiedName.of(Namespace.of("https://foo/1.2.3"), "a"), element("https://foo/1.2", "a"))), // () -> assertTrue(DomUtils.matches(QualifiedName.of(Namespace.of("https://foo/1.2.3"), "a"), element("https://foo/1.2.3", "a"))), // () -> assertFalse(DomUtils.matches(QualifiedName.of(Namespace.of("https://foo/1.2.3"), "a"), element("https://foo/1.2.3", "b"))), // () -> assertFalse(DomUtils.matches(QualifiedName.of(Namespace.of("https://foo/1.2.3"), "a"), element("https://foo/1.2.4", "a"))), // () -> assertFalse(DomUtils.matches(QualifiedName.of(Namespace.of("https://foo/1.2.3"), "a"), element("https://bar/1.2.3", "a"))) // ); } private static Element element(String namespaceURI, String qualifiedName) throws ParserConfigurationException { return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument().createElementNS(namespaceURI, qualifiedName); } } validator/000077500000000000000000000000001514323636100361565ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/tooling/coreDefaultValidatorTests.java000066400000000000000000000071751514323636100433100ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-core/src/test/java/org/opentest4j/reporting/tooling/core/validator/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.core.validator; import org.intellij.lang.annotations.Language; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; import java.io.IOException; import java.io.UncheckedIOException; import java.nio.file.Files; import java.nio.file.Path; import static org.assertj.core.api.Assertions.assertThat; import static org.opentest4j.reporting.tooling.core.validator.Severity.ERROR; import static org.opentest4j.reporting.tooling.core.validator.Severity.WARNING; class DefaultValidatorTests { @TempDir Path tempDir; @ParameterizedTest @ValueSource(strings = { "0.1.0", "0.2.0" }) void validatesEventsXmlFile(String version) { var xmlFile = writeXml(tempDir.resolve("events.xml"), ""); var validationResult = new DefaultValidator().validate(xmlFile); assertThat(validationResult).isEmpty(); } @ParameterizedTest @ValueSource(strings = { "0.1.0", "0.2.0" }) void validatesHierarchicalXmlFile(String version) { var xmlFile = writeXml(tempDir.resolve("hierarchy.xml"), "\n"); var validationResult = new DefaultValidator().validate(xmlFile); assertThat(validationResult).isEmpty(); } @Test void resolvesThirdPartySchemasUsingCatalog() { writeXml(tempDir.resolve("schema.xsd"), """ """); var catalog = writeXml(tempDir.resolve("catalog.xml"), """ """); var xmlFile = writeXml(tempDir.resolve("test.xml"), """ Hello World! """); var validationResult = new DefaultValidator(catalog.toUri()).validate(xmlFile); assertThat(validationResult).isEmpty(); } @Test void generatesWarningsAndErrors() { var xmlFile = writeXml(tempDir.resolve("test.xml"), """ Hello World! """); var validationResult = new DefaultValidator().validate(xmlFile); assertThat(validationResult.count(WARNING)).isEqualTo(1); assertThat(validationResult.count(ERROR)).isEqualTo(1); } private Path writeXml(Path file, @Language("xml") String content) { try { return Files.writeString(file, content); } catch (IOException e) { throw new UncheckedIOException(e); } } } jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/000077500000000000000000000000001514323636100221225ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/build.gradle.kts000066400000000000000000000007461514323636100252100ustar00rootroot00000000000000plugins { `java-conventions` } dependencies { annotationProcessor(libs.immutables.value) compileOnlyApi(libs.apiguardian) compileOnly(libs.immutables.valueAnnotations) } tasks { compileJava { options.compilerArgs.addAll(listOf("-Aimmutables.gradle.incremental", "-Xlint:-processing")) } jar { // Avoid Immutables annotation from leaking into JAR exclude("org/opentest4j/reporting/tooling/spi/htmlreport/package-info.class") } } jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/000077500000000000000000000000001514323636100227115ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/000077500000000000000000000000001514323636100236355ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/000077500000000000000000000000001514323636100245565ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/000077500000000000000000000000001514323636100253455ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/000077500000000000000000000000001514323636100274445ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/000077500000000000000000000000001514323636100314555ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/tooling/000077500000000000000000000000001514323636100331305ustar00rootroot00000000000000spi/000077500000000000000000000000001514323636100336445ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/toolinghtmlreport/000077500000000000000000000000001514323636100360445ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/tooling/spiBlock.java000066400000000000000000000020011514323636100377320ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/tooling/spi/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.spi.htmlreport; import org.apiguardian.api.API; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * A block to be rendered in the HTML report. * * @param the type of content * @since 0.2.0 */ @API(status = EXPERIMENTAL, since = "0.2.0") public interface Block { /** * {@return the content of this block} */ T getContent(); } Contributor.java000066400000000000000000000046001514323636100412210ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/tooling/spi/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.spi.htmlreport; import org.apiguardian.api.API; import org.w3c.dom.Element; import java.nio.file.Path; import java.util.List; import static java.util.Collections.emptyList; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * Implementations of this interface can contribute additional sections to the * HTML report when registered via the Java service loader mechanism. * * @since 0.2.0 */ @API(status = EXPERIMENTAL, since = "0.2.0") public interface Contributor { /** * Contribute additional sections for the given execution element. * * @param context the DOM element representing the execution * @return additional sections to be rendered */ default List
contributeSectionsForExecution(Context context) { return emptyList(); } /** * Contribute additional sections for the given test node element. * * @param context the DOM element representing the test node * @return additional sections to be rendered */ default List
contributeSectionsForTestNode(Context context) { return emptyList(); } /** * The context to contribute sections for. */ interface Context { /** * {@return the DOM element representing the execution or test node} */ Element element(); /** * {@return the path to the source XML file} */ Path sourceXmlFile(); /** * {@return the path to the target HTML file} */ Path targetHtmlFile(); /** * {@return the relative path of the supplied {@code path} from the * parent directory of the target HTML file or {@code path} itself if it * cannot be relativized} * * @param path The path to relativize * @since 0.2.1 */ @API(status = EXPERIMENTAL, since = "0.2.1") Path relativizeToTargetDirectory(Path path); } } Image.java000066400000000000000000000024331514323636100377330ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/tooling/spi/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.spi.htmlreport; import org.apiguardian.api.API; import org.immutables.value.Value.Immutable; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * An image to be rendered in the HTML report. * * @since 0.2.0 */ @Immutable @API(status = EXPERIMENTAL, since = "0.2.0") public interface Image extends Block { /** * Builder for {@link Image}. */ class Builder extends ImmutableImage.Builder { Builder() { } } /** * {@return the alt text of this image} */ String getAltText(); /** * {@return a new builder for {@link Image}} */ static Image.Builder builder() { return new Image.Builder(); } } KeyValuePairs.java000066400000000000000000000024341514323636100414360ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/tooling/spi/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.spi.htmlreport; import org.apiguardian.api.API; import org.immutables.value.Value.Immutable; import java.util.Map; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * A block of key-value pairs to be rendered in the HTML report. * * @since 0.2.0 */ @Immutable @API(status = EXPERIMENTAL, since = "0.2.0") public interface KeyValuePairs extends Block> { /** * Builder for {@link KeyValuePairs}. */ class Builder extends ImmutableKeyValuePairs.Builder { Builder() { } } /** * {@return a new builder for {@link KeyValuePairs}} */ static Builder builder() { return new Builder(); } } Labels.java000066400000000000000000000023611514323636100401130ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/tooling/spi/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.spi.htmlreport; import org.apiguardian.api.API; import org.immutables.value.Value.Immutable; import java.util.List; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * A block of labels to be rendered in the HTML report. * * @since 0.2.0 */ @Immutable @API(status = EXPERIMENTAL, since = "0.2.0") public interface Labels extends Block> { /** * Builder for {@link Labels}. */ class Builder extends ImmutableLabels.Builder { Builder() { } } /** * {@return a new builder for {@link Labels}} */ static Builder builder() { return new Builder(); } } Paragraph.java000066400000000000000000000023351514323636100406170ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/tooling/spi/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.spi.htmlreport; import org.apiguardian.api.API; import org.immutables.value.Value.Immutable; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * A block of text to be rendered in the HTML report. * * @since 0.2.0 */ @Immutable @API(status = EXPERIMENTAL, since = "0.2.0") public interface Paragraph extends Block { /** * Builder for {@link Paragraph}. */ class Builder extends ImmutableParagraph.Builder { Builder() { } } /** * {@return a new builder for {@link Paragraph}} */ static Builder builder() { return new Builder(); } } PreFormattedOutput.java000066400000000000000000000024171514323636100425300ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/tooling/spi/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.spi.htmlreport; import org.apiguardian.api.API; import org.immutables.value.Value.Immutable; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * A block of pre-formatted text to be rendered in the HTML report. * * @since 0.2.0 */ @Immutable @API(status = EXPERIMENTAL, since = "0.2.0") public interface PreFormattedOutput extends Block { /** * Builder for {@link PreFormattedOutput}. */ class Builder extends ImmutablePreFormattedOutput.Builder { Builder() { } } /** * {@return a new builder for {@link PreFormattedOutput}} */ static Builder builder() { return new Builder(); } } Section.java000066400000000000000000000034401514323636100403140ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/tooling/spi/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.spi.htmlreport; import org.apiguardian.api.API; import org.immutables.value.Value.Default; import org.immutables.value.Value.Immutable; import java.util.List; import java.util.Optional; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * A titled section to be rendered in the HTML report. * * @since 0.2.0 */ @Immutable @API(status = EXPERIMENTAL, since = "0.2.0") public interface Section { /** * Builder for {@link Section}. */ class Builder extends ImmutableSection.Builder { Builder() { } } /** * {@return a new builder for {@link Section}} */ static Builder builder() { return new Builder(); } /** * {@return the title of this section} */ String getTitle(); /** * {@return the meta information of this section} * *

This may, for example, contain a timestamp. */ Optional getMetaInfo(); /** * {@return the blocks in this section} */ List> getBlocks(); /** * {@return the order of this section} * *

This is used to sort the all {@linkplain Contributor contributed} * sections in the HTML report. */ @Default default int getOrder() { return 0; } } Subsections.java000066400000000000000000000024131514323636100412100ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/tooling/spi/htmlreport/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j.reporting.tooling.spi.htmlreport; import org.apiguardian.api.API; import org.immutables.value.Value.Immutable; import java.util.List; import static org.apiguardian.api.API.Status.EXPERIMENTAL; /** * A block of subsections to be rendered in the HTML report. * * @since 0.2.0 */ @Immutable @API(status = EXPERIMENTAL, since = "0.2.0") public interface Subsections extends Block> { /** * Builder for {@link Subsections}. */ class Builder extends ImmutableSubsections.Builder { Builder() { } } /** * {@return a new builder for {@link Subsections}} */ static Builder builder() { return new Builder(); } } package-info.java000066400000000000000000000007341514323636100412370ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/main/java/org/opentest4j/reporting/tooling/spi/htmlreport/** * SPI for extending HTML report generation. * * @see org.opentest4j.reporting.tooling.spi.htmlreport.Contributor */ @Style(visibility = ImplementationVisibility.PACKAGE, jdkOnly = true, overshadowImplementation = true, from = "", depluralize = true, allowedClasspathAnnotations = { Override.class }) package org.opentest4j.reporting.tooling.spi.htmlreport; import org.immutables.value.Value.Style; import org.immutables.value.Value.Style.ImplementationVisibility; jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/module/000077500000000000000000000000001514323636100241765ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/module/java/000077500000000000000000000000001514323636100251175ustar00rootroot00000000000000org.opentest4j.reporting.tooling.spi/000077500000000000000000000000001514323636100342015ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/module/javamodule-info.java000066400000000000000000000016151514323636100372650ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j-reporting/tooling-spi/src/module/java/org.opentest4j.reporting.tooling.spi/* * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Java Service Provider Interface (SPI) for the extending the HTML report * * @since 0.2.0 */ module org.opentest4j.reporting.tooling.spi { requires static org.apiguardian.api; requires transitive java.xml; exports org.opentest4j.reporting.tooling.spi.htmlreport; } jtreg8-8.2.1+1+ds1/opentest4j/000077500000000000000000000000001514323636100156475ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/.gitattributes000066400000000000000000000000351514323636100205400ustar00rootroot00000000000000* text eol=lf *.bat eol=crlf jtreg8-8.2.1+1+ds1/opentest4j/.github/000077500000000000000000000000001514323636100172075ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/.github/PULL_REQUEST_TEMPLATE.md000066400000000000000000000001511514323636100230050ustar00rootroot00000000000000## Overview - --- I hereby agree to the terms of the Open Test Alliance Contributor License Agreement. jtreg8-8.2.1+1+ds1/opentest4j/.gitignore000066400000000000000000000002641514323636100176410ustar00rootroot00000000000000# Gradle .gradle build/ # Ignore Gradle GUI config gradle-app.setting # Eclipse .classpath .settings/ .project bin/ # IntelliJ *.iml *.ipr *.iws *.uml .idea/ out/ # Misc *.log jtreg8-8.2.1+1+ds1/opentest4j/.travis.yml000066400000000000000000000056071514323636100177700ustar00rootroot00000000000000language: java # Specify which branches/tags that we do not want to be built: r5.0.0-M5 branches: except: - /^r\d.*$/ before_install: - unset _JAVA_OPTIONS # https://github.com/travis-ci/travis-ci/issues/8408 install: - ./gradlew --version # Display Gradle, Groovy, JVM and other versions jdk: - openjdk11 stages: - test - name: deploy if: (branch = master) AND (NOT type IN (pull_request)) jobs: include: - script: ./gradlew --stacktrace build - stage: deploy name: "Publish snapshot artifacts" env: # ORG_GRADLE_PROJECT_ossrhUsername - secure: K3oEnLQ2ai8lmTHrfQsktkb8vc/W5ghP6NurUmb4E+SHWw/zqv2naxupbpVZqovhhTqYm1/I0rqHKrGrBIUDSFMhyTKYmqw4+Nck3BAnjXovotGuKyMrg6yqoBjaWhT8rJe/fR2hZgUi96vSjEKC/UDSGRRHhoEyX73qAwbA7CGJ3SMVRZpkBvs2GUubKZgXuJCpGSk2FWOtJpWK4sC87/yV8Arg1DgrCHUm7uc1we+CedjierPxfo6QX9Laohyn60D3BtojYw1xxsiX9Rv0KCxCqmZn5Qd6PLV4+0PzFXjO0xvrHecQ+NhyWfmMkfV5dO/zaF0OoxrHj/cFmvoGSHN4r1SIV2TwbtIuUCxypWqUTVrfejQyJ2Dhk2GbOa941EtXXX8i2zEDTBq56Tby4d44QvhK1v8QNmmev/o6j1YCBMKN+X59bSqUHF4PX8ap9m2iWYNCbvwET5YJAKnWLEj2QGBXn34GWZksyU/Fe+mvVJ0eRwZjUWKfOcS5xzrvRrNayyMIzUSUGKuTDeS+KR9eF7215hBDu6t8z+s+jSyoLD8+tttnHrgBkkUvwzctT8MeQP0JdpYhYyITuWYJ1OB9w2GKHE5ch9JYYOKUliJga42P6Hbx4NwTeCSNJ96mzQAKcDwwJZujzN2PDSr86uBlHwLdn+9cy0vndYUSYtY= # ORG_GRADLE_PROJECT_ossrhPassword - secure: NewZka3bmiDgrSP8+yfPQNf85K/sT4CQiIbrf9SWOTgI7Z6kq6kKXU94cEQue6Ugli0USreMZYhl5b6XvcCUzRF9kOh/mRk9VIaOOaOIloatmaF581mGiYNBn8AoBoQ/JURQ59dBxHxyyf4Wm5o63FW0RdZoBOb8FA+esLGdY8ZlpsSc3WdYmguJf6Ga2auT1FIGujDLjBYCaPBqx1xM8JckFWBU0QHhDGFo6CjGUUd62KTf72RVtsLmcMnEvoJ18s7txmWYY4H/BwONekTnmXw80+y6EVXP3K7kkD/9KL9xq/fDibcmP9UfbpCnEysu7hygMhPfMPB3KmPhFSP7GGlEZsLeGNhLBLXidpJmyNvcSHOdS+vaF8xbW/+DBJ3stNntS1TaPGPcIjAyKN67q4yayZBdJKzkIWzVkJy3akRwO7D0Lj1irs7mcLL0DSkP3YrgShIhcq34D+Iknblz4AykG1/ehv4eAipljrh66SGB41QlN6U0AZVpqi869sPfu55q8Piucnrps+3jo26q25mtPpurEIIQIX6SCwUyK4A+4Jvk4r8KUykkBS7HildiflKGwiLTRHgskGkAslm0ARZo4B50FQgqcJbytkSqe76y4WeVLZ648zNNTlX7oysKeizGjj6CxnXN3KLKmmXqKaht5UX6gCSbw2+O9/OlAgw= script: ./gradlew --stacktrace uploadArchives -x check - name: "Update snapshot documentation" env: # ORG_GRADLE_PROJECT_githubToken - secure: AW4jpuuv5MTIxUw1dlfIKyRgp5G9aj9/wsJx+XBVdZ6/+0Tj8BzBldUe9b4JeNEnDGIRIL83lPHMR0a/DbfF5Cg0Cpi0oLQE+JkKh/ucRZucrXXMjIg+3IEtpdUG/I4vqjwd1xUAYZ/URPP75NVr7b3RVY9+MTaSaZ2b+VtG/aMNJ5kih4PHfJ2wR0OobHrTSxOkyGwZTdG6ZvFplHcPtuZ/v6KJGaUrCFYRnXOZIE73dPDQjxqy90FQrNlscvkZ3cerqVeeQ1nK7eU60neNBrSP9PJsN6zqSyPfMfyfzGBiS7v2dlVktSjeOmdEn+NCSmR59a0wbVObhzisOgODqBMk3KLWOWwWHfA2M5URuQaNr/AsKQTr2FlVkwY/cHO52q58tKNE1m/3nPs5ZMEhlh6jtbBafUe8NA9JQ0LKppA/kMqd1vT97hCeMGR0B5rTZEYXK9pCKWmWg98YEAR9RA9gnNuRod07uI/T9dSvHVvg3T7K1jdFtnSs8TOYamxn3wo1I8jud34mUTv7v4Wdk7ujXZJIcIkHFWKon/OpRwiBHNh9w5w0d7qZVvH7dYFhxRYjbUP4d+QzYlUQUVcy1QvixHBr4eYRZ1q7v40OWBKb9lOXdD1I6x7XLtcNcZ08c3xKpiBFjwTPIMot87vw90PTPFigBAfRj1wDocdd9Sg= script: ./gradlew --stacktrace publishGhPages jtreg8-8.2.1+1+ds1/opentest4j/CONTRIBUTING.md000066400000000000000000000043031514323636100201000ustar00rootroot00000000000000# Contributing ## Open Test Alliance Contributor License Agreement **Project License:** [Apache License Version 2.0](LICENSE) - You will only Submit Contributions where You have authored 100% of the content. - You will only Submit Contributions to which You have the necessary rights. This means that if You are employed You have received the necessary permissions from Your employer to make the Contributions. - Whatever content You Contribute will be provided under the Project License(s). ## Pull Requests Please add the following lines to your pull request description: ```markdown --- I hereby agree to the terms of the Open Test Alliance Contributor License Agreement. ``` ## Coding Conventions ### Formatting Code formatting is enforced using the [Spotless](https://github.com/diffplug/spotless) Gradle plugin. You can use `gradle spotlessApply` to format new code and add missing license headers to source files. Formatter settings for Eclipse are available [in the repository](https://github.com/ota4j-team/opentest4j/blob/master/etc/eclipse/eclipse-formatter-settings.xml). For IntelliJ IDEA there's a [plugin](https://plugins.jetbrains.com/plugin/6546) you can use. ### Javadoc - Javadoc comments should be wrapped after 80 characters whenever possible. - This first paragraph must be a single, concise sentence that ends with a period ("."). - Place `

` on the same line as the first line in a new paragraph and precede `

` with a blank line. - Insert a blank line before at-clauses/tags. - Favor `{@code foo}` over `foo`. - Favor literals (e.g., `{@literal @}`) over HTML entities. - Use `@since 1.0` instead of `@since 1.0.0`. - Use `@author` tags with full, real names (no nicknames or aliases) at the type level. Do not include email addresses or URLs in `@author` tags. ### Tests #### Naming - Tests are written using JUnit 4. - All test classes must end with a `Tests` suffix. - Example test classes that should not be picked up by the build must end with a `TestCase` suffix. #### Assertions - Use `org.junit.Assert` wherever possible. - Do not use `junit.framework.Assert`. - Use AssertJ when richer assertions are needed. #### Mocking - Use either Mockito or hand-written test doubles. jtreg8-8.2.1+1+ds1/opentest4j/LICENSE000066400000000000000000000261361514323636100166640ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. jtreg8-8.2.1+1+ds1/opentest4j/README.md000066400000000000000000000100401514323636100171210ustar00rootroot00000000000000# Open Test Alliance for the JVM [![Travis Build Status](https://travis-ci.org/ota4j-team/opentest4j.svg?branch=master)](https://travis-ci.org/ota4j-team/opentest4j) ## History This project is the result of an initiative by the [JUnit 5 team](https://github.com/junit-team/junit5/issues/12). ## Status Quo There is no standard for testing on the JVM: the only common building block we have is `java.lang.AssertionError`. `AssertionError` is great for signaling that a test has failed, but it doesn't go far enough. Each testing framework is therefore forced to fill the gap with custom subclasses of `AssertionError` or `RuntimeException` to provide a richer feature set to end users. The downside is that each framework has its **own** set of custom errors and exceptions, and this makes it a challenge for frameworks to interoperate. For example, JUnit has long supported the notion of a _failed assumption_ via its `AssumptionViolatedException`, but assertion frameworks like AssertJ cannot integrate that feature without a direct dependency on JUnit. Furthermore, the status quo makes the work of IDEs and build tools more difficult than it should be. ## Proposal The only real solution to this problem is to create a foundation that we can all build on! Based on discussions with IDE and build tool developers from Eclipse, Gradle, and IntelliJ, the JUnit 5 team is working on a proposal for an open source project to provide a minimal common foundation for testing libraries on the JVM. The primary goal of the project is to enable testing frameworks like JUnit, TestNG, Spock, etc. and third-party assertion libraries like Hamcrest, AssertJ, etc. to use a common set of exceptions that IDEs and build tools can support in a consistent manner across all testing scenarios -- for example, for consistent handling of failed assertions and failed assumptions as well as visualization of test execution in IDEs and reports. ## Initial Implementation We have begun with a small set of errors and exceptions that we consider to be common for all testing and assertion frameworks. In fact, these errors and exceptions are already used in [JUnit 5]. Please take a look at the project and let us know what you think. ## Javadocs - [Latest release](http://ota4j-team.github.io/opentest4j/docs/current/api/) - [Latest snapshot](http://ota4j-team.github.io/opentest4j/docs/snapshot/api/) ## Contributing Contributions to the Open Test Alliance are both welcomed and appreciated. For specific guidelines regarding contributions, please see [CONTRIBUTING.md] in the root directory of the project. Those willing to use milestone or SNAPSHOT releases are encouraged to file feature requests and bug reports using the project's [issue tracker](https://github.com/ota4j-team/opentest4j/issues). ### Feedback is welcome! What types of _errors_ and _exceptions_ should the OTA support? What types of properties should such errors and exceptions have? What additional functionality (e.g., interfaces, utility methods, etc.) should the OTA provide? ## Projects already contacted We've already reached out to and asked for feedback from the maintainers of the following projects. - Test NG - Hamcrest - AssertJ - Spock - Google Truth - ScalaTest - Eclipse - IntelliJ - Gradle - Maven Surefire Plugin - Allure Framework # Installation Release artifacts are deployed to [Maven Central]. Snapshot artifacts are deployed to Sonatype's [snapshots repository]. ## Dependency Metadata ### Latest Release - **Group ID**: `org.opentest4j` - **Artifact ID**: `opentest4j` - **Version**: `1.2.0` See also: ### Snapshots - **Group ID**: `org.opentest4j` - **Artifact ID**: `opentest4j` - **Version**: `1.3.0-SNAPSHOT` See also: [CONTRIBUTING.md]: https://github.com/ota4j-team/opentest4j/blob/master/CONTRIBUTING.md [JUnit 5]: https://github.com/junit-team/junit5 [Maven Central]: http://search.maven.org/ [snapshots repository]: https://oss.sonatype.org/content/repositories/snapshots/ jtreg8-8.2.1+1+ds1/opentest4j/build.gradle000066400000000000000000000150061514323636100201300ustar00rootroot00000000000000import java.text.SimpleDateFormat plugins { id 'java' id 'osgi' id 'eclipse' id 'idea' id 'maven' id 'signing' id 'com.diffplug.gradle.spotless' version '3.23.0' id 'net.nemerosa.versioning' version '2.8.2' id 'org.ajoberstar.github-pages' version '1.7.2' } Date buildTimeAndDate = new Date() ext { buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate) buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate) builtByValue = project.hasProperty('builtBy') ? project.builtBy : project.defaultBuiltBy } description = 'Open Test Alliance for the JVM' def moduleName = 'org.opentest4j' repositories { mavenCentral() } compileJava { options.compilerArgs = ['--release', '6'] } task compileModule(type: JavaCompile) { def moduleSrcDir = file('src/module/java') source(moduleSrcDir) destinationDir = file("$buildDir/classes/java/modules") classpath = compileJava.classpath inputs.property("moduleName", moduleName) inputs.property("moduleVersion", project.version) options.compilerArgs = [ '--release', '9', '--module-version', project.version as String, '--module-source-path', moduleSrcDir.toString(), '--patch-module', "$moduleName=${sourceSets.main.allJava.srcDirs.join(':')}", '--module', moduleName ] } dependencies { testCompile("junit:junit:${junit4Version}") } test { testLogging { exceptionFormat = 'full' } } def normalizeVersion = { versionLiteral -> try { (versionLiteral =~ /(\d+)\.(\d+)\.(\d+).*/)[0][1..3].join('.') } catch (e) { throw new GradleException("Version '$versionLiteral' does not match version pattern, e.g. 1.0.0-QUALIFIER", e) } } jar { manifest { attributes( 'Created-By': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})".toString(), 'Built-By': builtByValue, 'Build-Date': buildDate, 'Build-Time': buildTime, 'Build-Revision': versioning.info.commit, 'Specification-Title': project.name, 'Specification-Version': normalizeVersion(project.version), 'Specification-Vendor': 'opentest4j.org', 'Implementation-Title': project.name, 'Implementation-Version': project.version, 'Implementation-Vendor': 'opentest4j.org' ) license = 'The Apache License, Version 2.0' vendor = 'opentest4j.org' } from(files("${compileModule.destinationDir}/$moduleName").builtBy(compileModule)) { include('module-info.class') } } javadoc { options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED options.author = true options.header = 'Open Test Alliance for the JVM' options.addStringOption('Xdoclint:html,syntax,reference', '-quiet') options.links 'https://docs.oracle.com/en/java/javase/11/docs/api/' } task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar) { classifier = 'javadoc' from javadoc } artifacts { archives sourcesJar archives javadocJar } spotless { java { licenseHeaderFile rootProject.file('etc/spotless/apache-license-2.0.java') importOrder('java', 'javax', 'com', 'org') eclipse().configFile(rootProject.file('etc/eclipse/eclipse-formatter-settings.xml')) trimTrailingWhitespace() endWithNewline() } } def signArtifacts = !project.version.contains('SNAPSHOT') if (signArtifacts) { signing { sign configurations.archives } } uploadArchives { dependsOn check repositories { mavenDeployer { if (signArtifacts) { beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } } def ossrhUsername = rootProject.hasProperty('ossrhUsername') ? rootProject.ossrhUsername : '' def ossrhPassword = rootProject.hasProperty('ossrhPassword') ? rootProject.ossrhPassword : '' repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { authentication(userName: ossrhUsername, password: ossrhPassword) } snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { authentication(userName: ossrhUsername, password: ossrhPassword) } pom.project { name "${project.group}:${project.name}" packaging 'jar' description "Open Test Alliance for the JVM" url 'https://github.com/ota4j-team/opentest4j' scm { connection 'scm:git:git://github.com/ota4j-team/opentest4j.git' developerConnection 'scm:git:git://github.com/ota4j-team/opentest4j.git' url 'https://github.com/ota4j-team/opentest4j' } licenses { license { name 'The Apache License, Version 2.0' url 'http://www.apache.org/licenses/LICENSE-2.0.txt' } } developers { developer { id 'bechte' name 'Stefan Bechtold' email 'stefan.bechtold@me.com' } developer { id 'jlink' name 'Johannes Link' email 'business@johanneslink.net' } developer { id 'marcphilipp' name 'Marc Philipp' email 'mail@marcphilipp.de' } developer { id 'mmerdes' name 'Matthias Merdes' email 'Matthias.Merdes@heidelberg-mobil.com' } developer { id 'sbrannen' name 'Sam Brannen' email 'sam@sambrannen.com' } } } pom.whenConfigured { p -> p.dependencies = p.dependencies.findAll { dep -> dep.scope != 'test' } } } } } spotless { format 'misc', { target project.fileTree(project.rootDir) { include '**/*.gradle', '**/*.md', '**/*.gitignore' exclude '.gradle/**/*.*' } indentWithTabs() trimTrailingWhitespace() endWithNewline() } } def docsVersion = project.version.contains('SNAPSHOT') ? 'snapshot' : project.version def docsDir = new File(buildDir, 'ghpages-docs') task prepareDocsForUploadToGhPages(dependsOn: [javadoc], type: Copy) { outputs.dir docsDir from("$buildDir/docs") { include 'javadoc/**' } into "${docsDir}/${docsVersion}" filesMatching('javadoc/**') { fileCopyDetails -> fileCopyDetails.path = fileCopyDetails.path.replace('javadoc/', 'api/') } includeEmptyDirs = false } task createCurrentDocsFolder(dependsOn: prepareDocsForUploadToGhPages, type: Copy) { outputs.dir "${docsDir}/current" from "${docsDir}/${docsVersion}" into "${docsDir}/current" } createCurrentDocsFolder.onlyIf { project.hasProperty('replaceCurrentDocs') } githubPages { repoUri = 'https://github.com/ota4j-team/opentest4j.git' credentials { username = project.hasProperty('githubToken') ? project.githubToken : '' password = '' } pages { from docsDir into "docs" } deleteExistingFiles = false } prepareGhPages.dependsOn(prepareDocsForUploadToGhPages) prepareGhPages.dependsOn(createCurrentDocsFolder) jtreg8-8.2.1+1+ds1/opentest4j/etc/000077500000000000000000000000001514323636100164225ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/etc/eclipse/000077500000000000000000000000001514323636100200465ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/etc/eclipse/eclipse-formatter-settings.xml000066400000000000000000000750071514323636100260640ustar00rootroot00000000000000 jtreg8-8.2.1+1+ds1/opentest4j/etc/spotless/000077500000000000000000000000001514323636100202765ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/etc/spotless/apache-license-2.0.java000066400000000000000000000011551514323636100243010ustar00rootroot00000000000000/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ jtreg8-8.2.1+1+ds1/opentest4j/gradle.properties000066400000000000000000000001531514323636100212220ustar00rootroot00000000000000group = org.opentest4j version = 1.2.0 junit4Version = 4.12 defaultBuiltBy = OTA4J Team jtreg8-8.2.1+1+ds1/opentest4j/settings.gradle000066400000000000000000000003401514323636100206640ustar00rootroot00000000000000rootProject.name = 'opentest4j' // Require Java 11 if (!JavaVersion.current().java11) { throw new GradleException('The OpenTest4J build requires Java 11. ' + "Currently executing with Java ${JavaVersion.current()}.") } jtreg8-8.2.1+1+ds1/opentest4j/src/000077500000000000000000000000001514323636100164365ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/main/000077500000000000000000000000001514323636100173625ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/main/java/000077500000000000000000000000001514323636100203035ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/main/java/org/000077500000000000000000000000001514323636100210725ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/main/java/org/opentest4j/000077500000000000000000000000001514323636100231715ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/main/java/org/opentest4j/AssertionFailedError.java000066400000000000000000000112401514323636100301200ustar00rootroot00000000000000/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j; /** * {@code AssertionFailedError} is a common base class for test-related * {@link AssertionError AssertionErrors}. * *

In addition to a message and a cause, this class stores the expected * and actual values of an assertion using the {@link ValueWrapper} type. * * @author Sam Brannen * @author Marc Philipp * @since 1.0 */ public class AssertionFailedError extends AssertionError { private static final long serialVersionUID = 1L; private final ValueWrapper expected; private final ValueWrapper actual; /** * Constructs an {@code AssertionFailedError} with an empty message, no * cause, and no expected/actual values. */ public AssertionFailedError() { this(null); } /** * Constructs an {@code AssertionFailedError} with a message, no cause, * and no expected/actual values. * * @param message the detail message; {@code null} or blank will be * converted to the empty {@code String} */ public AssertionFailedError(String message) { this(message, null); } /** * Constructs an {@code AssertionFailedError} with a message and * expected/actual values but without a cause. * * @param message the detail message; {@code null} or blank will be * converted to the empty {@code String} * @param expected the expected value; may be {@code null} * @param actual the actual value; may be {@code null} */ public AssertionFailedError(String message, Object expected, Object actual) { this(message, expected, actual, null); } /** * Constructs an {@code AssertionFailedError} with a message and a cause * but without expected/actual values. * * @param message the detail message; {@code null} or blank will be * converted to the empty {@code String} * @param cause the cause of the failure */ public AssertionFailedError(String message, Throwable cause) { this(message, null, null, cause); } /** * Constructs an {@code AssertionFailedError} with a message, * expected/actual values, and a cause. * * @param message the detail message; {@code null} or blank will be * converted to the empty {@code String} * @param expected the expected value; may be {@code null} * @param actual the actual value; may be {@code null} * @param cause the cause of the failure */ public AssertionFailedError(String message, Object expected, Object actual, Throwable cause) { this(message, ValueWrapper.create(expected), ValueWrapper.create(actual), cause); } private AssertionFailedError(String message, ValueWrapper expected, ValueWrapper actual, Throwable cause) { super((message == null || message.trim().length() == 0) ? "" : message); this.expected = expected; this.actual = actual; initCause(cause); } /** * Returns {@code true} if an expected value was supplied via an * appropriate constructor. * * @see #getExpected() */ public boolean isExpectedDefined() { return this.expected != null; } /** * Returns {@code true} if an actual value was supplied via an * appropriate constructor. * * @see #getActual() */ public boolean isActualDefined() { return this.actual != null; } /** * Returns the wrapped expected value if it is defined; otherwise {@code null}. * * @see #isExpectedDefined() */ public ValueWrapper getExpected() { return this.expected; } /** * Returns the wrapped actual value if it is defined; otherwise {@code null}. * * @see #isActualDefined() */ public ValueWrapper getActual() { return this.actual; } /** * Returns a short description of this assertion error using the same format * as {@link Throwable#toString()}. * *

Since the constructors of this class convert supplied {@code null} or * blank messages to the empty {@code String}, this method only includes * non-empty messages in its return value. * * @return a string representation of this {@code AssertionFailedError} * @since 1.1.1 */ @Override public String toString() { String className = getClass().getName(); String message = getLocalizedMessage(); return ("".equals(message) ? className : (className + ": " + message)); } } jtreg8-8.2.1+1+ds1/opentest4j/src/main/java/org/opentest4j/IncompleteExecutionException.java000066400000000000000000000025771514323636100317110ustar00rootroot00000000000000/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j; /** * {@link RuntimeException} used to indicate that the execution of a test * was incomplete — for example, that the execution was entirely * skipped or aborted mid-stream. See subclasses for concrete use cases. * *

An {@code IncompleteExecutionException} is not used * to indicate that a test execution failed. * * @author Johannes Link * @author Sam Brannen * @since 1.0 */ public class IncompleteExecutionException extends RuntimeException { private static final long serialVersionUID = 1L; public IncompleteExecutionException() { } public IncompleteExecutionException(String message) { super(message); } public IncompleteExecutionException(String message, Throwable cause) { super(message, cause); } } jtreg8-8.2.1+1+ds1/opentest4j/src/main/java/org/opentest4j/MultipleFailuresError.java000066400000000000000000000066631514323636100303470ustar00rootroot00000000000000/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * {@link MultipleFailuresError} is an {@link AssertionError} that aggregates * multiple failures thrown in a given context (i.e., typically within the * invocation of a single test). * * @author Johannes Link * @author Sam Brannen * @author Marc Philipp * @since 1.0 */ public class MultipleFailuresError extends AssertionError { private static final long serialVersionUID = 1L; private static final String EOL = System.getProperty("line.separator"); private final String heading; private final List failures; /** * Constructs an {@code MultipleFailuresError} with the supplied heading and * failures. * * @param heading the message heading; a default value will be used if * {@code null} or blank * @param failures the list of failures; must not be {@code null} or contain * {@code null} elements */ public MultipleFailuresError(String heading, List failures) { if (failures == null) { throw new NullPointerException("failures must not be null"); } this.heading = isBlank(heading) ? "Multiple Failures" : heading.trim(); this.failures = new ArrayList(); for (Throwable failure : failures) { if (failure == null) { throw new NullPointerException("failures must not contain null elements"); } this.failures.add(failure); } } @Override public String getMessage() { int failureCount = this.failures.size(); if (failureCount == 0) { return this.heading; } // @formatter:off StringBuilder builder = new StringBuilder(this.heading) .append(" (") .append(failureCount).append(" ") .append(pluralize(failureCount, "failure", "failures")) .append(")") .append(EOL); // @formatter:on int lastIndex = failureCount - 1; for (Throwable failure : this.failures.subList(0, lastIndex)) { builder.append("\t").append(nullSafeMessage(failure)).append(EOL); } builder.append('\t').append(nullSafeMessage(this.failures.get(lastIndex))); return builder.toString(); } /** * Returns the list of failures contained in this error. */ public List getFailures() { return Collections.unmodifiableList(this.failures); } /** * Returns whether this error contains any failures. */ public boolean hasFailures() { return !this.failures.isEmpty(); } private static boolean isBlank(String str) { return (str == null || str.trim().length() == 0); } private static String pluralize(int count, String singular, String plural) { return count == 1 ? singular : plural; } private static String nullSafeMessage(Throwable failure) { if (isBlank(failure.getMessage())) { return failure.getClass().getName() + ": "; } return failure.getClass().getName() + ": " + failure.getMessage(); } } jtreg8-8.2.1+1+ds1/opentest4j/src/main/java/org/opentest4j/TestAbortedException.java000066400000000000000000000023321514323636100301330ustar00rootroot00000000000000/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j; /** * Specialization of {@link IncompleteExecutionException} used to indicate * that a test was aborted during execution (e.g., due to a failed * assumption). * * @author Sam Brannen * @author Johannes Link * @since 1.0 * @see TestSkippedException */ public class TestAbortedException extends IncompleteExecutionException { private static final long serialVersionUID = 1L; public TestAbortedException() { } public TestAbortedException(String message) { super(message); } public TestAbortedException(String message, Throwable cause) { super(message, cause); } } jtreg8-8.2.1+1+ds1/opentest4j/src/main/java/org/opentest4j/TestSkippedException.java000066400000000000000000000023471514323636100301600ustar00rootroot00000000000000/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j; /** * Specialization of {@link IncompleteExecutionException} used to indicate * that a test was skipped prior to execution (e.g., disabled * or ignored). * * @author Sam Brannen * @author Johannes Link * @since 1.0 * @see TestAbortedException */ public class TestSkippedException extends IncompleteExecutionException { private static final long serialVersionUID = 1L; public TestSkippedException() { } public TestSkippedException(String message) { super(message); } public TestSkippedException(String message, Throwable cause) { super(message, cause); } } jtreg8-8.2.1+1+ds1/opentest4j/src/main/java/org/opentest4j/ValueWrapper.java000066400000000000000000000145411514323636100264560ustar00rootroot00000000000000/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j; import java.io.Serializable; /** * Serializable representation of a value that was used in an assertion. * *

This class only stores the value if it implements {@link Serializable}. * In any case, it stores its {@linkplain #getType() runtime type}, {@linkplain * #getIdentityHashCode() identity hash code}, and {@linkplain * #getStringRepresentation() string representation} determined via {@link * String#valueOf(Object)}. If the invocation of {@code String.valueOf(Object)} * throws an {@link Exception}, the string representation will take the form of * {@code ""}, where "e" is the caught * exception. * *

The {@link #toString()} method returns the string representation of the * value along with its type and identity hash code. * * @author Marc Philipp * @author Sam Brannen * @since 1.0 * @see System#identityHashCode */ public final class ValueWrapper implements Serializable { private static final long serialVersionUID = 1L; private static final ValueWrapper nullValueWrapper = new ValueWrapper(null); /** * Factory for creating a new {@code ValueWrapper} for the supplied {@code value}. * *

If the supplied {@code value} is {@code null}, this method will return a * cached {@code ValueWrapper} suitable for all {@code null} values. * If the supplied {@code value} is already an instance of {@link ValueWrapper}, * it will be returned as is. * * @param value the value to wrap; may be {@code null} * @return a wrapper for the supplied value; never {@code null} */ public static ValueWrapper create(Object value) { if (value instanceof ValueWrapper) return (ValueWrapper) value; return (value == null) ? nullValueWrapper : new ValueWrapper(value); } /** * Factory for creating a new {@code ValueWrapper} for the supplied {@code value} * using the supplied custom {@code stringRepresentation}. * *

You should use this method when you don't want to rely on the result of the * value's {@link Object#toString() toString()} method. * *

If the supplied {@code value} is {@code null}, this method will return a * cached {@code ValueWrapper} suitable for all {@code null} values. * If the supplied {@code value} is already an instance of {@link ValueWrapper}, * it will be returned as is if the {@code stringRepresentation} match, otherwise * the original value will be unwrapped and a new {@code ValueWrapper} with the * new {@code stringRepresentation} will be created. * * @param value the value to wrap; may be {@code null} * @param stringRepresentation a custom rendering of the value; will fallback to * the default behavior if {@code null} * @return a wrapper for the supplied value; never {@code null} * @since 1.2 */ public static ValueWrapper create(Object value, String stringRepresentation) { if (value instanceof ValueWrapper) { ValueWrapper wrapper = (ValueWrapper) value; return wrapper.stringRepresentation.equals(stringRepresentation) ? wrapper : create(wrapper.value, stringRepresentation); } return (value == null ? nullValueWrapper : new ValueWrapper(value, stringRepresentation)); } private final Serializable value; private final Class type; private final String stringRepresentation; private final int identityHashCode; private final transient Object ephemeralValue; /** * Reads and stores the supplied value's runtime type, string representation, and * identity hash code. */ private ValueWrapper(Object value, String stringRepresentation) { this.value = value instanceof Serializable ? (Serializable) value : null; this.type = value != null ? value.getClass() : null; this.stringRepresentation = stringRepresentation == null ? safeValueToString(value) : stringRepresentation; this.identityHashCode = System.identityHashCode(value); this.ephemeralValue = value; } private ValueWrapper(Object value) { this(value, safeValueToString(value)); } private static String safeValueToString(Object value) { try { return String.valueOf(value); } catch (Exception e) { return ""; } } /** * Returns the value supplied to {@link #create(Object)} if the value * implements {@link Serializable}; otherwise, {@code null}. * * @see #getEphemeralValue() */ public Serializable getValue() { return this.value; } /** * Returns the value's runtime type or {@code null} if the value is * {@code null}. */ public Class getType() { return this.type; } /** * Returns the value's string representation. * *

The string representation is generated by invoking * {@link String#valueOf(Object) String.valueOf(value)} for the value * supplied to {@link #create(Object)}. * * @see #getValue() */ public String getStringRepresentation() { return this.stringRepresentation; } /** * Returns the value's identity hash code. * *

The identity hash code is generated by invoking * {@link System#identityHashCode(Object) System.identityHashCode(value)} * for the value supplied to {@link #create(Object)}. * * @see #getValue() */ public int getIdentityHashCode() { return this.identityHashCode; } /** * Returns the original value supplied to {@link #create(Object) create()}. * *

If this {@code ValueWrapper} was created by deserialization this method * returns {@code null}. * * @see #getValue() * @since 1.2 */ public Object getEphemeralValue() { return this.ephemeralValue; } /** * Returns the value's string representation along with its type and * identity hash code. */ @Override public String toString() { if (this.type == null) { return "null"; } return this.stringRepresentation + // " (" + this.type.getName() + "@" + Integer.toHexString(this.identityHashCode) + ")"; } } jtreg8-8.2.1+1+ds1/opentest4j/src/main/java/org/opentest4j/package-info.java000066400000000000000000000002761514323636100263650ustar00rootroot00000000000000/** * Common {@link java.lang.AssertionError AssertionErrors} and * {@link java.lang.RuntimeException RuntimeExceptions} for testing * frameworks on the JVM. */ package org.opentest4j; jtreg8-8.2.1+1+ds1/opentest4j/src/module/000077500000000000000000000000001514323636100177235ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/module/java/000077500000000000000000000000001514323636100206445ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/module/java/org.opentest4j/000077500000000000000000000000001514323636100235315ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/module/java/org.opentest4j/module-info.java000066400000000000000000000000631514323636100266110ustar00rootroot00000000000000module org.opentest4j { exports org.opentest4j; } jtreg8-8.2.1+1+ds1/opentest4j/src/test/000077500000000000000000000000001514323636100174155ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/test/java/000077500000000000000000000000001514323636100203365ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/test/java/org/000077500000000000000000000000001514323636100211255ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/test/java/org/opentest4j/000077500000000000000000000000001514323636100232245ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/test/java/org/opentest4j/AssertionFailedErrorTests.java000066400000000000000000000204451514323636100312050ustar00rootroot00000000000000/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; import org.junit.Test; /** * Unit tests for {@link AssertionFailedError}. * * @author Marc Philipp * @author Sam Brannen * @since 1.0 */ public class AssertionFailedErrorTests { private static final String EMPTY = ""; private static final String BLANK = " "; @Test public void defaultConstructorUsesEmptyMessage() { assertEquals(EMPTY, new AssertionFailedError().getMessage()); } @Test public void nullMessageIsConvertedToEmptyMessage() { assertEquals(EMPTY, new AssertionFailedError(null).getMessage()); assertEquals(EMPTY, new AssertionFailedError(null, null).getMessage()); assertEquals(EMPTY, new AssertionFailedError(null, "foo", "bar").getMessage()); assertEquals(EMPTY, new AssertionFailedError(null, "foo", "bar", null).getMessage()); } @Test public void blankMessageIsConvertedToEmptyMessage() { assertEquals(EMPTY, new AssertionFailedError(BLANK).getMessage()); assertEquals(EMPTY, new AssertionFailedError(BLANK, null).getMessage()); assertEquals(EMPTY, new AssertionFailedError(BLANK, "foo", "bar").getMessage()); assertEquals(EMPTY, new AssertionFailedError(BLANK, "foo", "bar", null).getMessage()); } @Test public void toStringChecks() { String className = AssertionFailedError.class.getName(); assertEquals(className, new AssertionFailedError().toString()); assertEquals(className, new AssertionFailedError(null).toString()); assertEquals(className, new AssertionFailedError(null, "foo", "bar").toString()); assertEquals(className, new AssertionFailedError(null, new RuntimeException()).toString()); assertEquals(className, new AssertionFailedError(null, "foo", "bar", new RuntimeException()).toString()); assertEquals(className, new AssertionFailedError(EMPTY).toString()); assertEquals(className, new AssertionFailedError(EMPTY, "foo", "bar").toString()); assertEquals(className, new AssertionFailedError(EMPTY, new RuntimeException()).toString()); assertEquals(className, new AssertionFailedError(EMPTY, "foo", "bar", new RuntimeException()).toString()); assertEquals(className, new AssertionFailedError(BLANK).toString()); assertEquals(className, new AssertionFailedError(BLANK, "foo", "bar").toString()); assertEquals(className, new AssertionFailedError(BLANK, new RuntimeException()).toString()); assertEquals(className, new AssertionFailedError(BLANK, "foo", "bar", new RuntimeException()).toString()); assertEquals(className + ": message", new AssertionFailedError("message").toString()); assertEquals(className + ": message", new AssertionFailedError("message", "foo", "bar").toString()); assertEquals(className + ": message", new AssertionFailedError("message", new RuntimeException()).toString()); assertEquals(className + ": message", new AssertionFailedError("message", "foo", "bar", new RuntimeException()).toString()); } @Test public void messageAndCauseAreStored() { RuntimeException cause = new RuntimeException("cause"); AssertionFailedError error = new AssertionFailedError("my message", cause); assertEquals("my message", error.getMessage()); assertEquals(cause, error.getCause()); assertFalse(error.isExpectedDefined()); assertFalse(error.isActualDefined()); } @Test public void expectedAndActualValuesAreStored() { AssertionFailedError errorWithExpectedAndActual = new AssertionFailedError(null, "foo", "bar"); assertTrue(errorWithExpectedAndActual.isExpectedDefined()); assertEquals("foo", errorWithExpectedAndActual.getExpected().getValue()); assertTrue(errorWithExpectedAndActual.isActualDefined()); assertEquals("bar", errorWithExpectedAndActual.getActual().getValue()); } @Test public void returnsNullForExpectedAndActualWhenNotPassedToConstructor() { AssertionFailedError errorWithoutExpectedAndActual = new AssertionFailedError(); assertFalse(errorWithoutExpectedAndActual.isExpectedDefined()); assertNull(errorWithoutExpectedAndActual.getExpected()); assertFalse(errorWithoutExpectedAndActual.isActualDefined()); assertNull(errorWithoutExpectedAndActual.getActual()); } @Test public void serializationWorksForAssertionFailedErrorWithMessageAndExpectedAndActualValues() throws Exception { AssertionFailedError error = serializeAndDeserialize(new AssertionFailedError("a message", "foo", "bar")); assertEquals("a message", error.getMessage()); assertTrue(error.isExpectedDefined()); assertEquals("foo", error.getExpected().getValue()); assertTrue(error.isActualDefined()); assertEquals("bar", error.getActual().getValue()); } @Test public void serializationWorksForAssertionFailedErrorWithoutAnyValues() throws Exception { AssertionFailedError error = serializeAndDeserialize(new AssertionFailedError()); assertEquals(EMPTY, error.getMessage()); assertFalse(error.isExpectedDefined()); assertNull(error.getExpected()); assertFalse(error.isActualDefined()); assertNull(error.getActual()); } @Test public void deserializationOfAssertionFailedErrorWorksForVersion_1_0_0() throws Exception { // Generated using: // FileOutputStream outputStream = new FileOutputStream("src/test/resources/AssertionFailedError_serializedVersion_1_0_0.out"); // serialize(new AssertionFailedError("message", "foo", "bar"), outputStream); // outputStream.close(); AssertionFailedError error = (AssertionFailedError) deserializeClasspathResource( "/AssertionFailedError_serializedVersion_1_0_0.out"); assertEquals("message", error.getMessage()); assertTrue(error.isExpectedDefined()); assertEquals("foo", error.getExpected().getValue()); assertTrue(error.isActualDefined()); assertEquals("bar", error.getActual().getValue()); } @Test public void ephemeralValueIsOmittedFromSerialization() throws Exception { class NonSerializable { public final String guid = "8675309"; } AssertionFailedError error = serializeAndDeserialize( new AssertionFailedError("a message", new NonSerializable(), new NonSerializable())); assertEquals("a message", error.getMessage()); assertTrue(error.isExpectedDefined()); assertNull(error.getExpected().getValue()); assertNull(error.getExpected().getEphemeralValue()); assertTrue(error.isActualDefined()); assertNull(error.getActual().getValue()); assertNull(error.getActual().getEphemeralValue()); } private Object deserializeClasspathResource(String name) throws Exception { InputStream inputStream = getClass().getResourceAsStream(name); try { return deserialize(inputStream); } finally { inputStream.close(); } } private AssertionFailedError serializeAndDeserialize(AssertionFailedError originalError) throws Exception { byte[] bytes = serialize(originalError); Object deserializedObject = deserialize(new ByteArrayInputStream(bytes)); assertEquals(AssertionFailedError.class, deserializedObject.getClass()); return (AssertionFailedError) deserializedObject; } private Object deserialize(InputStream inputStream) throws Exception { ObjectInputStream in = new ObjectInputStream(inputStream); return in.readObject(); } private byte[] serialize(Object object) throws Exception { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); serialize(object, byteArrayOutputStream); return byteArrayOutputStream.toByteArray(); } private void serialize(Object object, OutputStream outputStream) throws Exception { ObjectOutputStream out = new ObjectOutputStream(outputStream); out.writeObject(object); out.flush(); } } jtreg8-8.2.1+1+ds1/opentest4j/src/test/java/org/opentest4j/MultipleFailuresErrorTests.java000066400000000000000000000105421514323636100314140ustar00rootroot00000000000000/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; import org.junit.Test; /** * Unit tests for {@link MultipleFailuresError}. * * @author Marc Philipp * @author Sam Brannen * @since 1.0 */ public class MultipleFailuresErrorTests { private static final String DEFAULT_HEADING = "Multiple Failures"; private static final String HEADING = "Custom Heading"; @Test public void mfeWithNoFailuresWithNullHeading() { assertExceptionWithNoFailures(null, DEFAULT_HEADING); } @Test public void mfeWithNoFailuresWithEmptyHeading() { assertExceptionWithNoFailures(" ", DEFAULT_HEADING); } @Test public void mfeWithNoFailuresWithCustomHeading() { assertExceptionWithNoFailures(HEADING, HEADING); } @Test public void mfeWithSingleFailureWithNullHeading() { assertExceptionWithSingleFailure(null, DEFAULT_HEADING); } @Test public void mfeWithSingleFailureWithEmptyHeading() { assertExceptionWithSingleFailure(" ", DEFAULT_HEADING); } @Test public void mfeWithSingleFailureWithCustomHeading() { assertExceptionWithSingleFailure(HEADING, HEADING); } @Test public void mfeWithFailuresWithNullHeading() { assertExceptionWithFailures(null, DEFAULT_HEADING); } @Test public void mfeWithFailuresWithEmptyHeading() { assertExceptionWithFailures(" ", DEFAULT_HEADING); } @Test public void mfeWithFailuresWithCustomHeading() { assertExceptionWithFailures(HEADING, HEADING); } @Test public void mfeWithNullMessageFailures() throws Exception { List failures = new ArrayList(); failures.add(new AssertionError()); failures.add(new AssertionFailedError()); MultipleFailuresError mfe = new MultipleFailuresError(HEADING, failures); assertEquals(String.format("%s %s%n\t%s%n\t%s", HEADING, "(2 failures)", // "java.lang.AssertionError: ", // "org.opentest4j.AssertionFailedError: "), // mfe.getMessage()); } @Test(expected = NullPointerException.class) public void mfeThrowsNPEForNullFailureElements() { List failures = new ArrayList(); failures.add(new AssertionError()); failures.add(null); new MultipleFailuresError("", failures); } private void assertExceptionWithNoFailures(String inputHeading, String outputHeading) { MultipleFailuresError mfe = new MultipleFailuresError(inputHeading, new ArrayList()); assertTrue(mfe.getFailures().isEmpty()); assertFalse(mfe.hasFailures()); assertEquals(outputHeading, mfe.getMessage()); } private void assertExceptionWithSingleFailure(String inputHeading, String outputHeading) { List failures = new ArrayList(); failures.add(new AssertionError("failure 1")); MultipleFailuresError mfe = new MultipleFailuresError(inputHeading, failures); assertEquals(1, mfe.getFailures().size()); assertTrue(mfe.hasFailures()); assertEquals( String.format("%s %s%n\t%s: %s", outputHeading, "(1 failure)", AssertionError.class.getName(), "failure 1"), mfe.getMessage()); } private void assertExceptionWithFailures(String inputHeading, String outputHeading) { List failures = new ArrayList(); failures.add(new AssertionError("failure 1")); failures.add(new AssertionError("failure 2")); String assertErrorClassName = AssertionError.class.getName(); MultipleFailuresError mfe = new MultipleFailuresError(inputHeading, failures); assertEquals(2, mfe.getFailures().size()); assertTrue(mfe.hasFailures()); assertEquals(String.format("%s %s%n\t%s: %s%n\t%s: %s", outputHeading, "(2 failures)", assertErrorClassName, "failure 1", assertErrorClassName, "failure 2"), mfe.getMessage()); } } jtreg8-8.2.1+1+ds1/opentest4j/src/test/java/org/opentest4j/ValueWrapperTests.java000066400000000000000000000117011514323636100275270ustar00rootroot00000000000000/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opentest4j; import static org.junit.Assert.*; import java.io.Serializable; import org.junit.Test; /** * Unit tests for {@link ValueWrapper}. * * @author Marc Philipp * @author Sam Brannen * @since 1.0 */ public class ValueWrapperTests { @Test public void wrapsNull() { ValueWrapper wrapper = ValueWrapper.create(null); assertNull(wrapper.getType()); assertNull(wrapper.getValue()); assertEquals("null", wrapper.getStringRepresentation()); assertEquals(0, wrapper.getIdentityHashCode()); assertEquals("null", wrapper.toString()); assertNull(wrapper.getEphemeralValue()); } @Test public void wrapsSerializableValue() { ValueWrapper wrapper = ValueWrapper.create(1.2d); assertEquals(Double.class, wrapper.getType()); assertEquals(1.2d, wrapper.getValue()); assertEquals("1.2", wrapper.getStringRepresentation()); assertNotEquals(0, wrapper.getIdentityHashCode()); assertTrue(wrapper.toString().startsWith("1.2 (java.lang.Double@")); assertTrue(wrapper.toString().endsWith(")")); assertEquals(1.2D, wrapper.getEphemeralValue()); assertSame(wrapper.getValue(), wrapper.getEphemeralValue()); } @Test public void acceptsCustomStringRepresentation() { ValueWrapper wrapper = ValueWrapper.create(1.2d, "1,20"); assertEquals(Double.class, wrapper.getType()); assertEquals(1.2d, wrapper.getValue()); assertEquals("1,20", wrapper.getStringRepresentation()); assertNotEquals(0, wrapper.getIdentityHashCode()); assertTrue(wrapper.toString().startsWith("1,20 (java.lang.Double@")); assertTrue(wrapper.toString().endsWith(")")); } @Test public void doesNotWrapAnotherValueWrapper() { ValueWrapper wrapper = ValueWrapper.create(1.2d); ValueWrapper same = ValueWrapper.create(wrapper); assertSame(wrapper, same); } @Test public void doesNotWrapAnotherValueWrapperWithSameCustomRepresentation() { ValueWrapper wrapper = ValueWrapper.create(1.2d, "1,20"); ValueWrapper same = ValueWrapper.create(wrapper, "1,20"); assertSame(wrapper, same); } @Test public void doesRepackageValueWrapperWithDifferentStringRepresentation() { ValueWrapper wrapper = ValueWrapper.create(1.2d); ValueWrapper same = ValueWrapper.create(wrapper, "1,20"); assertNotSame(wrapper, same); } @Test public void nullForCustomStringRepresentationFallsBackToDefaultToString() { ValueWrapper wrapper = ValueWrapper.create(1.2d, null); assertEquals(Double.class, wrapper.getType()); assertEquals(1.2d, wrapper.getValue()); assertEquals("1.2", wrapper.getStringRepresentation()); assertNotEquals(0, wrapper.getIdentityHashCode()); assertTrue(wrapper.toString().startsWith("1.2 (java.lang.Double@")); assertTrue(wrapper.toString().endsWith(")")); } @Test public void wrapsNonSerializableValue() { class NonSerializable { @Override public String toString() { return "someString"; } } NonSerializable value = new NonSerializable(); ValueWrapper wrapper = ValueWrapper.create(value); assertEquals(NonSerializable.class, wrapper.getType()); assertNull(wrapper.getValue()); assertEquals("someString", wrapper.getStringRepresentation()); assertNotEquals(0, wrapper.getIdentityHashCode()); assertEquals(value, wrapper.getEphemeralValue()); String toString = wrapper.toString(); assertTrue(toString, toString.startsWith("someString (" + NonSerializable.class.getName() + "@")); assertTrue(toString, toString.endsWith(")")); } @Test public void wrapsWithBrokenToString() { class BrokenToString implements Serializable { private static final long serialVersionUID = -3072024134414066195L; @Override public String toString() { throw new RuntimeException("toStringFailure"); } } BrokenToString value = new BrokenToString(); ValueWrapper wrapper = ValueWrapper.create(value); assertEquals(BrokenToString.class, wrapper.getType()); assertEquals(value, wrapper.getValue()); assertEquals(value, wrapper.getEphemeralValue()); String representation = wrapper.getStringRepresentation(); assertTrue(representation, representation.contains(RuntimeException.class.getName())); assertTrue(representation, representation.contains("toStringFailure")); assertNotEquals(0, wrapper.getIdentityHashCode()); String toString = wrapper.toString(); assertTrue(toString, toString.contains(RuntimeException.class.getName())); assertTrue(toString, toString.contains("toStringFailure")); } } jtreg8-8.2.1+1+ds1/opentest4j/src/test/resources/000077500000000000000000000000001514323636100214275ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/opentest4j/src/test/resources/AssertionFailedError_serializedVersion_1_0_0.out000066400000000000000000000050561514323636100327130ustar00rootroot00000000000000¬ísr#org.opentest4j.AssertionFailedErrorLactualtLorg/opentest4j/ValueWrapper;Lexpectedq~xrjava.lang.AssertionErrorºm.«ýA=æxrjava.lang.ErrorE6V‹‚Vxrjava.lang.ThrowableÕÆ5'9w¸ËLcausetLjava/lang/Throwable;L detailMessagetLjava/lang/String;[ stackTracet[Ljava/lang/StackTraceElement;LsuppressedExceptionstLjava/util/List;xpptmessageur[Ljava.lang.StackTraceElement;F*<<ý"9xpsrjava.lang.StackTraceElementa Åš&6Ý…I lineNumberLdeclaringClassq~LfileNameq~L methodNameq~xpvt(org.opentest4j.AssertionFailedErrorTeststAssertionFailedErrorTests.javat:deserializationOfAssertionFailedErrorWorksForVersion_1_0_0sq~ ÿÿÿþt$sun.reflect.NativeMethodAccessorImpltNativeMethodAccessorImpl.javatinvoke0sq~ >q~q~tinvokesq~ +t(sun.reflect.DelegatingMethodAccessorImplt!DelegatingMethodAccessorImpl.javaq~sq~ òtjava.lang.reflect.Methodt Method.javaq~sq~ 2t)org.junit.runners.model.FrameworkMethod$1tFrameworkMethod.javatrunReflectiveCallsq~ t3org.junit.internal.runners.model.ReflectiveCallabletReflectiveCallable.javatrunsq~ /t'org.junit.runners.model.FrameworkMethodq~ tinvokeExplosivelysq~ t2org.junit.internal.runners.statements.InvokeMethodtInvokeMethod.javatevaluatesq~ Etorg.junit.runners.ParentRunnertParentRunner.javatrunLeafsq~ Nt(org.junit.runners.BlockJUnit4ClassRunnertBlockJUnit4ClassRunner.javatrunChildsq~ 9q~2q~3q~4sq~ "t org.junit.runners.ParentRunner$3q~/q~%sq~ Gt org.junit.runners.ParentRunner$1q~/tschedulesq~  q~.q~/t runChildrensq~ :q~.q~/t access$000sq~  t org.junit.runners.ParentRunner$2q~/q~,sq~ kq~.q~/q~%sq~ ‰torg.junit.runner.JUnitCoretJUnitCore.javaq~%sq~ Dt(com.intellij.junit4.JUnit4IdeaTestRunnertJUnit4IdeaTestRunner.javatstartRunnerWithArgssq~ /t7com.intellij.rt.execution.junit.IdeaTestRunner$RepeatertIdeaTestRunner.javaq~Hsq~ òt,com.intellij.rt.execution.junit.JUnitStartertJUnitStarter.javatprepareStreamsAndStartsq~ Fq~Mq~Ntmainsr&java.util.Collections$UnmodifiableListü%1µìŽLlistq~xr,java.util.Collections$UnmodifiableCollectionB€Ë^÷LctLjava/util/Collection;xpsrjava.util.ArrayListxÒ™ÇaIsizexpwxq~Wxsrorg.opentest4j.ValueWrapperIidentityHashCodeLstringRepresentationq~LtypetLjava/lang/Class;LvaluetLjava/io/Serializable;xp5Åótbarvrjava.lang.String ð¤8z;³Bxpq~\sq~X ú#Átfooq~^q~`jtreg8-8.2.1+1+ds1/picocli/000077500000000000000000000000001514323636100151725ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/picocli/.gitattributes000066400000000000000000000020641514323636100200670ustar00rootroot00000000000000# Handle line endings automatically for files detected as text # and leave all files detected as binary untouched. * text=auto # # The above will handle all files NOT found below # # These files are text and should be normalized (Convert crlf => lf) *.adoc text *.css text *.gradle text *.groovy text *.java text *.js text *.md text *.properties text *.txt text *.yml text *.html text # These files are text and must be normalized to lf gradlew text eol=lf *.sh text eol=lf *.bash text eol=lf *.html text eol=lf run text eol=lf runCompletion text eol=lf bashrc text eol=lf inputrc text eol=lf # These files are text and must be normalized to crlf *.bat text eol=crlf # These files are binary and should be left untouched # (binary is a macro for -text -diff) *.gif binary *.ico binary *.jar binary *.jpg binary *.jpeg binary *.png binary jtreg8-8.2.1+1+ds1/picocli/.github/000077500000000000000000000000001514323636100165325ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/picocli/.github/workflows/000077500000000000000000000000001514323636100205675ustar00rootroot00000000000000jtreg8-8.2.1+1+ds1/picocli/.github/workflows/gradle-wrapper-validation.yml000066400000000000000000000003411514323636100263540ustar00rootroot00000000000000name: "Validate Gradle Wrapper" on: [ push, pull_request ] jobs: validation: name: "Validation" runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: gradle/wrapper-validation-action@v1 jtreg8-8.2.1+1+ds1/picocli/.gitignore000066400000000000000000000010671514323636100171660ustar00rootroot00000000000000.gradle/ .idea/ build/ local.properties target/ tmp/ picocli.iml /out/ /picocli-annotation-processing-tests/out/ /picocli-codegen/out/ /picocli-examples/out/ /picocli-groovy/out/ /picocli-shell-jline2/out/ /picocli-shell-jline3/out/ /picocli-spring-boot-starter/out/ /src/test/dejagnu.tests/xtrace.log /src/test/dejagnu.tests/log/completion.sum /src/test/dejagnu.tests/log/completion.log /src/test/dejagnu.tests/completion.log /src/test/dejagnu.tests/completion.sum /src/test/dejagnu.tests/testrun.log /src/test/dejagnu.tests/testrun.sum /src/test/dejagnu.tests/tmp/ jtreg8-8.2.1+1+ds1/picocli/.travis.yml000066400000000000000000000022371514323636100173070ustar00rootroot00000000000000env: global: # for CodeClimate - CC_TEST_REPORTER_ID=83a2e05f875e3a67f60a1969f20a558a3de03a7592052c8bf52807d0e317f01a os: - linux - osx language: java jdk: - openjdk8 - openjdk9 - openjdk10 - openjdk11 - openjdk12 - openjdk13 - openjdk14 - openjdk15 - openjdk16 - openjdk-ea matrix: fast_finish: true exclude: - os: macos jdk: openjdk8 - os: macos jdk: openjdk9 - os: macos jdk: openjdk10 allow_failures: - jdk: openjdk16 - jdk: openjdk-ea # - openjdk7 # Disabled to avoid error java.security.NoSuchProviderException: no such provider: SunEC... install: skip before_script: - chmod +x gradlew # for CodeClimate - | if [ "$TRAVIS_OS_NAME" = "linux" ]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter && chmod +x ./cc-test-reporter && ./cc-test-reporter before-build fi script: - ./gradlew check --info --stacktrace after_success: - bash <(curl -s https://codecov.io/bash) - | if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT fi cache: directories: - $HOME/.m2 jtreg8-8.2.1+1+ds1/picocli/CONTRIBUTING.md000066400000000000000000000042421514323636100174250ustar00rootroot00000000000000# Contributing to picocli :+1::star_struck: Wow, thanks for taking the time to contribute! :tada::+1: The following is a set of guidelines for contributing to [picocli](https://github.com/remkop/picocli). These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. ## It is okay to raise an issue to ask a question If you have a question about picocli, feel free to raise an issue for it. ## Helpful problem reports look like this A helpful issue (problem report) is one that saves the maintainer time. Try to include these elements: * How to reproduce the problem * What is the expected behaviour * What do you actually see If you can provide code that reproduces the problem, great! If this code is in the form of a failing unit test, even better! ## Issues or pull requests? As a rule of thumb, it may be good to raise an issue first before providing a pull request. It is a good idea to check we all have the same understanding that there actually is a problem to solve, and for complex pull requests it may save time when we discuss in advance what shape the solution should take. That said, for bugfixes and documentation fixes, reporting the issue and providing a pull request to fix it in one PR is perfectly fine. When in doubt, maybe raise an issue first. ## Conventions for pull requests If there is a corresponding GitHub issue, please mention the issue number in the pull request title. Ideally prefix commit comments with either the pull request number, or the associated GitHub issue number. ## Java version The project is built with Java 8, and different artifacts target different versions of Java. See the table below. Artifact | Target Java Version ------------ | ------------- `picocli` | Java 5 `picocli-codegen` | Java 6 `picocli-groovy` | Java 5 `picocli-shell-jline2` | Java 5 `picocli-shell-jline3` | Java 8 `picocli-spring-boot-starter` | Java 8 Please be aware that pull requests can only use language features that are supported in the above version of Java. jtreg8-8.2.1+1+ds1/picocli/LICENSE000066400000000000000000000261351514323636100162060ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. jtreg8-8.2.1+1+ds1/picocli/README.md000066400000000000000000001045711514323636100164610ustar00rootroot00000000000000

picocli

[![GitHub Release](https://img.shields.io/github/release/remkop/picocli.svg)](https://github.com/remkop/picocli/releases) [![Build Status](https://travis-ci.org/remkop/picocli.svg?branch=master)](https://travis-ci.org/remkop/picocli) [![codecov](https://codecov.io/gh/remkop/picocli/branch/master/graph/badge.svg)](https://codecov.io/gh/remkop/picocli) [![Follow @remkopopma](https://img.shields.io/twitter/follow/remkopopma.svg?style=social)](https://twitter.com/intent/follow?screen_name=remkopopma) [![Follow @picocli](https://img.shields.io/twitter/follow/picocli.svg?style=social)](https://twitter.com/intent/follow?screen_name=picocli) [![Follow picocli on StackShare](https://img.shields.io/badge/Follow%20on-StackShare-blue.svg?logo=stackshare&style=flat)](https://stackshare.io/picocli) # picocli - a mighty tiny command line interface Picocli aims to be the easiest-to-use way to create rich command line applications that can run on and off the JVM. Considering picocli? Check [what happy users say](https://github.com/remkop/picocli/wiki/Feedback-from-Users) about picocli. Picocli is a modern library and framework, written in Java, that contains both an annotations API and a programmatic API. It features usage help with [ANSI colors and styles](https://picocli.info/#_ansi_colors_and_styles), [TAB autocompletion](https://picocli.info/autocomplete.html) and nested subcommands. In a single file, so you can include it _in source form_. This lets users run picocli-based applications without requiring picocli as an external dependency. Picocli-based applications can be ahead-of-time compiled to a GraalVM [native image](https://picocli.info/#_graalvm_native_image), with extremely fast startup time and lower memory requirements, which can be distributed as a single executable file. Picocli comes with an [annotation processor](https://picocli.info/#_annotation_processor) that automatically Graal-enables your jar during compilation. Picocli applications can be very compact with no boilerplate code: your command (or subcommand) can be executed with a [single line of code](#example "(example below)"). Simply implement `Runnable` or `Callable`, or put the business logic of your command in a `@Command`-annotated method. ![Picocli Demo help message with ANSI colors](docs/images/picocli.Demo.png?raw=true) Picocli makes it easy to follow [Command Line Interface Guidelines](https://clig.dev/#guidelines). How it works: annotate your class and picocli initializes it from the command line arguments, converting the input to strongly typed data. Supports git-like [subcommands](https://picocli.info/#_subcommands) (and nested [sub-subcommands](https://picocli.info/#_nested_sub_subcommands)), any option prefix style, POSIX-style [grouped short options](https://picocli.info/#_short_posix_options), custom [type converters](https://picocli.info/#_custom_type_converters), [password options](http://picocli.info/#_interactive_password_options) and more. Picocli distinguishes between [named options](https://picocli.info/#_options) and [positional parameters](https://picocli.info/#_positional_parameters) and allows _both_ to be [strongly typed](https://picocli.info/#_strongly_typed_everything). [Multi-valued fields](https://picocli.info/#_multiple_values) can specify an exact number of parameters or a [range](https://picocli.info/#_arity) (e.g., `0..*`, `1..2`). Supports [Map options](https://picocli.info/#_maps) like `-Dkey1=val1 -Dkey2=val2`, where both key and value can be strongly typed. Parser [tracing](https://picocli.info/#_tracing) facilitates troubleshooting. Command-line [argument files](https://picocli.info/#AtFiles) (@-files) allow applications to handle very long command lines. Generates polished and easily tailored [usage help](https://picocli.info/#_usage_help) and [version help](https://picocli.info/#_version_help), using [ANSI colors](https://picocli.info/#_ansi_colors_and_styles) where possible. Requires at minimum Java 5, but is designed to facilitate the use of Java 8 lambdas. Tested on all Java versions between 5 and 15-ea (inclusive). Picocli-based command line applications can have [TAB autocompletion](https://picocli.info/autocomplete.html), interactively showing users what options and subcommands are available. When an option has [`completionCandidates`](https://picocli.info/#_completion_candidates_variable) or has an `enum` type, autocompletion can also suggest option values. Picocli can generate completion scripts for bash and zsh, and offers [`picocli-shell-jline2`](picocli-shell-jline2/README.md) and [`picocli-shell-jline3`](picocli-shell-jline3/README.md) modules with JLine `Completer` implementations for building interactive shell applications. Unique features in picocli include support for [negatable options](https://picocli.info/#_negatable_options), advanced [quoted values](https://picocli.info/#_quoted_values), and [argument groups](https://picocli.info/#_argument_groups). Argument groups can be used to create mutually [exclusive](https://picocli.info/#_mutually_exclusive_options) options, mutually [dependent](https://picocli.info/#_mutually_dependent_options) options, option [sections](https://picocli.info/#_option_sections_in_usage_help) in the usage help message and [repeating composite arguments](https://picocli.info/#_repeating_composite_argument_groups) like `([-a= -b= -c=] (-x | -y | -z))...`. For advanced use cases, applications can access the picocli command object model with the [`@Spec` annotation](https://picocli.info/#_spec_annotation), and implement [custom parameter processing](https://picocli.info/#_custom_parameter_processing) for option parameters if the built-in logic is insufficient. Picocli-based applications can easily [integrate](https://picocli.info/#_dependency_injection) with Dependency Injection containers. The [Micronaut](https://micronaut.io/) microservices framework has [built-in support](https://docs.micronaut.io/latest/guide/index.html#commandLineApps) for picocli. Picocli ships with a [`picocli-spring-boot-starter` module](https://github.com/remkop/picocli/tree/master/picocli-spring-boot-starter) that includes a `PicocliSpringFactory` and Spring Boot auto-configuration to use Spring dependency injection in your picocli command line application. The user manual has examples of integrating with [Guice](https://picocli.info/#_guice_example), [Spring Boot](https://picocli.info/#_spring_boot_example), [Micronaut](https://picocli.info/#_micronaut_example), [Quarkus](https://picocli.info/#_quarkus_example) and with containers that comply to [CDI 2.0 specification](https://picocli.info/#_cdi_2_0_jsr_365) (JSR 365). ### Releases * [All Releases](https://github.com/remkop/picocli/releases) * Latest: 4.6.2 [Release Notes](https://github.com/remkop/picocli/releases/tag/v4.6.2) * Older: Picocli 4.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v4.0.0) * Older: Picocli 3.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v3.0.0) * Older: Picocli 2.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v2.0.0) ### Documentation * [4.x User manual: https://picocli.info](https://picocli.info) * [4.x Quick Guide](https://picocli.info/quick-guide.html) * [4.x API Javadoc](https://picocli.info/apidocs/) * [Command line autocompletion](https://picocli.info/autocomplete.html) * [Programmatic API](https://picocli.info/picocli-programmatic-api.html) * [FAQ](https://github.com/remkop/picocli/wiki/FAQ) * [GraalVM AOT Compilation to Native Image](https://picocli.info/picocli-on-graalvm.html) ### Older * ~~[3.x User manual](https://picocli.info/man/3.x)~~ * ~~[3.x Quick Guide](https://picocli.info/man/3.x/quick-guide.html)~~ * ~~[3.x API Javadoc](https://picocli.info/man/3.x/apidocs/)~~ * ~~[2.x User manual](https://picocli.info/man/2.x)~~ * ~~[2.x API Javadoc](https://picocli.info/man/2.x/apidocs/)~~ * ~~[1.x User manual](https://picocli.info/man/1.x)~~ ### Articles & Presentations #### English * [VIDEO] [Building kubectl plugins with Quarkus, picocli, fabric8io and jbang](https://www.youtube.com/watch?v=ZL29qrpk_Kc) (2021-01-22) by [Sébastien Blanc](https://twitter.com/sebi2706). * [VIDEO] [J-Fall Virtual 2020: Julien Lengrand - An introduction to creating CLI applications using picoCLI](https://www.youtube.com/watch?v=Rc_D4OTKidU&list=PLpQuPreMkT6D36w9d13uGpIPi5nf9I_0c&index=13) (2020-12-07) by [Julien Lengrand-Lambert](https://twitter.com/jlengrand). This was the top rated talk for [@nljug](https://twitter.com/nljug) #jfall virtual 2020! Congrats, Julien! * [Paginate results in a command line application using picoCLI](https://lengrand.fr/paginate-results-in-a-jvm-cli-application-using-picocli/) (2020-11-17) by [Julien Lengrand-Lambert](https://twitter.com/jlengrand). * [CLI applications with GraalVM Native Image](https://medium.com/graalvm/cli-applications-with-graalvm-native-image-d629a40aa0be) (2020-11-13) by [Oleg Å elajev](https://twitter.com/shelajev). * [Picocli subcommands - One program, many purposes](https://aragost.com/blog/java/picocli-subcommands.html) (2020-09-22) by [Jonas Andersen](https://twitter.com/PrimusAlgo). * [How to build a CLI app in Java using jbang and picocli](https://www.twilio.com/blog/cli-app-java-jbang-picocli) (2020-08-13) by [Matthew Gilliard](https://twitter.com/MaximumGilliard). * [Building a GitHub Dependents Scraper with Quarkus and Picocli](https://blog.marcnuri.com/github-dependents-scraper-quarkus-picocli/) (2020-07-31) by [Marc Nuri](https://twitter.com/MarcNuri). * [Building a decent Java CLI](https://atextor.de/2020/07/27/building-a-decent-java-cli.html) (2020-07-27) by [Andreas Textor](https://twitter.com/atextor). * [VIDEO] (Another very well-produced video by Szymon Stepniak) [OAuth 2.0 in a Java command-line app | #micronaut #picocli #oauth2](https://www.youtube.com/watch?v=js5H9UbmmMY) (2020-07-23) by [Szymon Stepniak](https://e.printstacktrace.blog/) ([YouTube channel](https://www.youtube.com/channel/UCEf8e5YAYnowq-2deW4tpsw)). * [Micronaut, Picocli, and GraalVM](https://e.printstacktrace.blog/building-stackoverflow-cli-with-java-11-micronaut-picocli-and-graalvm/) (2020-07-08) by [Szymon Stepniak](https://e.printstacktrace.blog/). * [VIDEO] (Extremely well-produced and informative, recommended!) [Building command-line app with Java 11, Micronaut, Picocli, and GraalVM](https://www.youtube.com/watch?v=Xdcg4Drg1hc) (2020-07-01) by [Szymon Stepniak](https://e.printstacktrace.blog/) ([YouTube channel](https://www.youtube.com/channel/UCEf8e5YAYnowq-2deW4tpsw)). * [AUDIO] [Scala Valentines #2](https://scala.love/scala-valentines-2/) (2020-06-21) Podcast talks about picocli (from 18:11). * [How to create a command line tool using Java?](https://fullstackdeveloper.guru/2020/06/18/how-to-create-a-command-line-tool-using-java/) (2020-06-18) by [Vijay SRJ](https://twitter.com/FullStackDevel6). * [Command-line tools with Quarkus and Picocli](https://quarkify.net/command-line-tools-with-quarkus-and-picocli/) (2020-06-08) by [Dmytro Chaban](https://twitter.com/dmi3coder). * Quarkus guide for [Quarkus command mode with picocli](https://quarkus.io/guides/picocli), thanks to a picocli extension by [MichaÅ‚ Górniewski](https://github.com/mgorniew) included in [Quarkus 1.5](https://quarkus.io/blog/quarkus-1-5-final-released/) (2020-06-03). * [Native images with Micronaut and GraalVM](https://dev.to/stack-labs/native-images-with-micronaut-and-graalvm-4koe) (2020-06-01) by [Λ\: Olivier Revial](https://twitter.com/pommeDouze). * [CLI applications with Micronaut and Picocli](https://dev.to/stack-labs/cli-applications-with-micronaut-and-picocli-4mc8) (2020-06-01) by [Λ\: Olivier Revial](https://twitter.com/pommeDouze). * [Picocli introduction - Modern Java command-line parsing](https://aragost.com/blog/java/picocli-introduction.html) (2020-05-19) by [Jonas Andersen](https://twitter.com/PrimusAlgo). * [Building Native Covid19 Tracker CLI using Java, PicoCLI & GraalVM](https://aboullaite.me/java-covid19-cli-picocli-graalvm/) (2020-05-11) by [Mohammed Aboullaite](https://aboullaite.me/author/mohammed/). * [Quarkus Command mode with Picocli](https://quarkify.net/quarkus-command-mode-with-picocli/) (2020-04-27) by [Dmytro Chaban](https://twitter.com/dmi3coder). * [Creating CLI tools with Scala, Picocli and GraalVM](https://medium.com/@takezoe/creating-cli-tools-with-scala-picocli-and-graalvm-ffde05bbd01d) (2020-03-09) by [Naoki Takezoe](https://twitter.com/takezoen) * [Building native Java CLIs with GraalVM, Picocli, and Gradle](https://medium.com/@mitch.seymour/building-native-java-clis-with-graalvm-picocli-and-gradle-2e8a8388d70d) (2020-03-08) by [Mitch Seymour](https://medium.com/@mitch.seymour) * [Build Great Native CLI Apps in Java with Graalvm and Picocli](https://www.infoq.com/articles/java-native-cli-graalvm-picocli/) (2020-03-07) * [Picocli Structured Objects](https://gist.github.com/hanslovsky/8276da86c53bc6d95bf01447cd5cb2b7#file-00_picocli-structured-objects-md) (2019-09-10) by [Philipp Hanslovsky](https://gist.github.com/hanslovsky) explains how to use picocli's support for repeating argument groups to add or configure structured objects from the command line. * [Create a Java Command Line Program with Picocli|Baeldung](https://www.baeldung.com/java-picocli-create-command-line-program) (2019-05-07) by [François Dupire](https://www.baeldung.com/author/francois-dupire/). * A whirlwind tour of picocli [JAX Magazine "Putting the spotlight on Java tools"](https://jaxenter.com/jax-mag-java-tools-157592.html) (2019-04-08). * [An Introduction to PicoCLI](https://devops.datenkollektiv.de/an-introduction-to-picocli.html) (2019-02-10) by [devop](https://devops.datenkollektiv.de/author/devop.html). * [Corda CLI UX (User Experience) Guide](https://docs.corda.net/head/cli-ux-guidelines.html) (2018 by R3 Limited) gives useful advice. * [Develop a CLI tool using groovy scripts](https://medium.com/@chinthakadinadasa/develop-a-cli-tool-using-groovy-scripts-a7d545eecddd) (2018-10-26) by [Chinthaka Dinadasa](https://medium.com/@chinthakadinadasa). * [Migrating from Commons CLI to picocli](https://picocli.info/migrating-from-commons-cli.html). You won't regret it! :-) (also on: [DZone](https://dzone.com/articles/migrating-from-commons-cli-to-picocli) and [Java Code Geeks](https://www.javacodegeeks.com/2018/11/migrating-commons-cli-picocli.html)). * [Groovy 2.5 CliBuilder Renewal](https://picocli.info/groovy-2.5-clibuilder-renewal.html) (also on [blogs.apache.org](https://blogs.apache.org/logging/entry/groovy-2-5-clibuilder-renewal)). In two parts: [Part 1](https://picocli.info/groovy-2.5-clibuilder-renewal-part1.html) (also on: [DZone](https://dzone.com/articles/groovy-25-clibuilder-renewal), [Java Code Geeks](https://www.javacodegeeks.com/2018/06/groovy-clibuilder-renewal-part-1.html)), [Part 2](https://picocli.info/groovy-2.5-clibuilder-renewal-part2.html) (also on: [DZone](https://dzone.com/articles/groovy-25-clibuilder-renewal-part-2), [Java Code Geeks](https://www.javacodegeeks.com/2018/06/groovy-clibuilder-renewal-part-2.html)). * Micronaut user manual for running microservices [standalone with picocli](https://docs.micronaut.io/snapshot/guide/index.html#commandLineApps). * [Java Command-Line Interfaces (Part 30): Observations](http://marxsoftware.blogspot.jp/2017/11/java-cmd-line-observations.html) by Dustin Marx about picocli 2.0.1 (also on: [DZone](https://dzone.com/articles/java-command-line-interfaces-part-30-finale-observations), [Java Code Geeks](https://www.javacodegeeks.com/2017/11/java-command-line-interfaces-part-30-observations.html)) * [Java Command-Line Interfaces (Part 10): Picocli](http://marxsoftware.blogspot.jp/2017/08/picocli.html) by Dustin Marx about picocli 0.9.7 (also on: [DZone](https://dzone.com/articles/java-command-line-interfaces-part-10-picocli), [Java Code Geeks](https://www.javacodegeeks.com/2017/08/java-command-line-interfaces-part-10-picocli.html)) * [Picocli 2.0: Groovy Scripts on Steroids](https://picocli.info/picocli-2.0-groovy-scripts-on-steroids.html) (also on: [DZone](https://dzone.com/articles/picocli-v2-groovy-scripts-on-steroids), [Java Code Geeks](https://www.javacodegeeks.com/2018/01/picocli-2-0-groovy-scripts-steroids.html)) * [Picocli 2.0: Do More With Less](https://picocli.info/picocli-2.0-do-more-with-less.html) (also on: [DZone](https://dzone.com/articles/whats-new-in-picocli-20), [Java Code Geeks](https://www.javacodegeeks.com/2018/01/picocli-2-0-less.html)) * [Announcing picocli 1.0](https://picocli.info/announcing-picocli-1.0.html) (also on: [DZone](https://dzone.com/articles/announcing-picocli-10)) #### руÑÑкий * [ИнтерфейÑÑ‹ командной Ñтроки Java: picocli](https://habr.com/ru/company/otus/blog/419401/) (2018-08-06): Russian translation by [MaxRokatansky](https://habr.com/ru/users/MaxRokatansky/) of Dustin Marx' blog post. #### Español * [Quarkus + Picocli: Web scaper para extraer proyectos dependientes en GitHub](https://blog.marcnuri.com/quarkus-picocli-web-scaper-dependientes-github/) (2020-08-15) by [Marc Nuri](https://twitter.com/MarcNuri). * [Quarkus - Introducción: picocli](https://gerardo.dev/aws-quarkus-picocli.html) (2020-06-15) by [Gerardo Arroyo](https://twitter.com/codewarrior506). * [VIDEO] [Picocli - Spring Boot example](https://youtu.be/y9ayfjfrTF4) (2020-05-24) 7-minute quick introduction by Gonzalo H. Mendoza. #### Français * [Application mobile: Créez de superbes applications CLI natives en Java avec Graalvm et Picocli](https://seodigitalmarketing.net/application-mobile-creez-de-superbes-applications-cli-natives-en-java-avec-graalvm-et-picocli/) (2020-05-07) Translation of [Build Great Native CLI Apps in Java with Graalvm and Picocli](https://www.infoq.com/articles/java-native-cli-graalvm-picocli/) by [bouf1450](https://seodigitalmarketing.net/author/bouf1450/). * [VIDEO] [Des applications en ligne de commande avec Picocli et GraalVM (N. Peters)](https://www.youtube.com/watch?v=8ENbMwkaFyk) (2019-05-07): 15-minute presentation by Nicolas Peters during Devoxx FR. Presentation slides are [available on GitHub](https://t.co/tXhtpTpAff?amp=1). #### Português * [Desenvolva aplicações CLI nativas em Java com Graalvm e Picocli](https://www.infoq.com/br/articles/java-native-cli-graalvm-picocli/) (2020-08-28): Portuguese translation of [Build Great Native CLI Apps in Java with Graalvm and Picocli](https://www.infoq.com/articles/java-native-cli-graalvm-picocli/), thanks to [Rodrigo Ap G Batista](https://www.infoq.com/br/profile/Rodrigo-Ap-G-Batista/). * [VIDEO] [Quarkus #40: Command Mode com Picocli](https://www.youtube.com/watch?v=LweGDh-Jxlc) (2020-06-23): 13-minute presentation by [Vinícius Ferraz](https://www.youtube.com/channel/UCJNOHl-pTTTj4S9yq60Ps9A) (@viniciusfcf). #### 日本語 * [CLI applications with GraalVM Native Image](https://logico-jp.io/2020/11/21/cli-applications-with-graalvm-native-image/) (2020-11-21) translation by [Logico_jp](https://logico-jp.io/who-is-logico/) of Oleg Å elajev's [post](https://medium.com/graalvm/cli-applications-with-graalvm-native-image-d629a40aa0be). * [Picocli + Kotlin + graalvm-native-image plugin ã§ãƒã‚¤ãƒ†ã‚£ãƒ–ツールを作る](https://mike-neck.hatenadiary.com/entry/2020/04/24/090000) (2020-04-24) blog post by [mike-neck](https://mike-neck.hatenadiary.com/about) ([引ãã“もりæŒç”°](https://twitter.com/mike_neck) on Twitter). * [Javaã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¢ãƒ—リケーションå‘ã‘ã®ãƒ•レームワークã€picocliã§éŠã¶](https://kazuhira-r.hatenablog.com/entry/2020/03/07/013626) (2020-03-07) blog post by [ã‹ãšã²ã‚‰](https://twitter.com/kazuhira_r). * [Kuromojiã®CLIコマンドã¨picocliã¨GraalVM](https://blog.johtani.info/blog/2020/02/28/kuromoji-cli/) (2020-02-28) blog post by [@johtani](https://twitter.com/johtani). * [GraalVM, Picocliã¨Javaã§ã¨ãã‚ããƒã‚¤ãƒ†ã‚£ãƒ–コマンドラインアプリを作ã‚ã†](https://remkop.github.io/presentations/20191123/) (2019-11-23) Slides for my presentation at Japan Java User Group's [JJUG CCC 2019 Fall](https://ccc2019fall.java-users.jp/) conference. * [GraalVM 㨠Picocliã§ Javaã®ãƒã‚¤ãƒ†ã‚£ãƒ–コマンドラインアプリを作ã‚ã†](https://remkop.github.io/presentations/20190906/) (2019-09-06) Slides for my lightning talk presentation at [ã€æ±äº¬ã€‘JJUG ナイトセミナー: ビール片手ã«LT大会 9/6(金)](https://jjug.doorkeeper.jp/events/95987) * [Picocli+Spring Boot ã§ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚¢ãƒ—リケーションを作æˆã—ã¦ã¿ã‚‹](https://ksby.hatenablog.com/entry/2019/07/20/092721) (2019-07-20) by [ã‹ã‚“ãŒã‚‹ãƒ¼ã•ã‚“ã®æ—¥è¨˜](https://ksby.hatenablog.com/). * [GraalVM ã® native image を使ã£ã¦ Java ã§çˆ†é€Ÿ Lambda ã®å¤¢ã‚’見る](https://qiita.com/kencharos/items/69e43965515f368bc4a3) (2019-05-02) by [@kencharos](https://qiita.com/kencharos) #### 中文 * [如何借助 Graalvm å’Œ Picocli 构建 Java 编写的原生 CLI 应用](https://www.infoq.cn/article/4RRJuxPRE80h7YsHZJtX) (2020-03-26): Chinese translation of [Build Great Native CLI Apps in Java with Graalvm and Picocli](https://www.infoq.com/articles/java-native-cli-graalvm-picocli/), thanks to [张嫿»¨](https://www.infoq.cn/profile/1067660). * [从Commons CLIè¿ç§»åˆ°Picocli](https://blog.csdn.net/genghaihua/article/details/88529409) (2019-03-13): Chinese translation of Migrating from Commons CLI to picocli, thanks to [genghaihua](https://me.csdn.net/genghaihua). * [Picocli 2.0: Steroids上的Groovy脚本](https://picocli.info/zh/picocli-2.0-groovy-scripts-on-steroids.html) * [Picocli 2.0: 以少求多](https://picocli.info/zh/picocli-2.0-do-more-with-less.html) ### Mailing List Join the [picocli Google group](https://groups.google.com/d/forum/picocli) if you are interested in discussing anything picocli-related and receiving announcements on new releases. ### Credit [Reallinfo](https://github.com/reallinfo) designed the new picocli logo! Many thanks! ### Commitments | This project follows [semantic versioning](http://semver.org/) and adheres to the **[Zero Bugs Commitment](https://github.com/classgraph/classgraph/blob/master/Zero-Bugs-Commitment.md)**. | |------------------------| ## Adoption * Picocli is now part of Groovy. From Groovy 2.5, all Groovy command line tools are picocli-based, and picocli is the underlying parser for Groovy's [CliBuilder DSL](http://groovy-lang.org/dsls.html#_clibuilder). * Picocli is now part of Micronaut. The Micronaut CLI has been rewritten with picocli, and Micronaut has dedicated support for running microservices [standalone with picocli](https://docs.micronaut.io/snapshot/guide/index.html#commandLineApps). * Picocli is now part of JUnit 5. JUnit 5.3 migrated its `ConsoleLauncher` from jopt-simple to picocli to support @-files (argument files); this helps users who need to specify many tests on the command line and run into system limitations. * Debian now offers a [libpicocli-java package](https://tracker.debian.org/pkg/picocli). Thanks to [Miroslav Kravec](https://udd.debian.org/dmd/?kravec.miroslav%40gmail.com). * Picocli is used in the Intuit [Karate](https://github.com/intuit/karate) standalone JAR / executable. * Picocli is part of [Ballerina](https://ballerina.io/). Ballerina uses picocli for all its command line utilities. * Picocli is used in the [CheckStyle](https://checkstyle.org/cmdline.html) standalone JAR / executable from Checkstyle 8.15. * Picocli is included in the [OpenJDK Quality Outreach](https://wiki.openjdk.java.net/display/quality/Quality+Outreach) list of Free Open Source Software (FOSS) projects that actively test against OpenJDK builds. * Picocli is used in the Apache Hadoop Ozone/HDDS command line tools, the Apache Hive benchmark CLI, Apache [Ignite TensorFlow](https://github.com/apache/ignite), and Apache Sling [Feature Model Converter](https://github.com/apache/sling-org-apache-sling-feature-modelconverter). * Picocli is listed on [StackShare](https://stackshare.io/picocli). Please add it to your stack and add/upvote reasons why you like picocli! * Picocli is used in Pinterest [ktlint](https://ktlint.github.io/). * Picocli is used in Spring IO [nohttp-cli](https://github.com/spring-io/nohttp/tree/master/nohttp-cli). * The [MinecraftPicocli](https://github.com/Rubydesic/MinecraftPicocli) library allows the use of picocli in [Minecraft Forge](https://files.minecraftforge.net/). * [Simple Java Mail](http://www.simplejavamail.org/) now offers a picocli-based [CLI](http://www.simplejavamail.org/cli.html#navigation). * [jbang](https://github.com/maxandersen/jbang) not only uses picocli internally, but also has a CLI template to generate an initial script: use `jbang --init=cli helloworld.java` to generate a sample picocli-enabled jbang script. See [asciinema](https://asciinema.org/a/AVwA19yijKRNKEO0bJENN2ME3?autoplay=true&speed=2). * Picocli is the main library used in the CookieTemple [cli-java template](https://cookietemple.readthedocs.io/en/latest/available_templates/available_templates.html#cli-java) for building GraalVM native CLI executables in Java. See [this preview](https://user-images.githubusercontent.com/21954664/86740903-474a3000-c037-11ea-9ae3-1a8f7bf1743f.gif). * Picocli is [mentioned](https://clig.dev/#the-basics) in [Command Line Interface Guidelines](https://clig.dev/). Glad to see more people are using picocli. We must be doing something right. :-) ### Help to promote picocli If you like picocli, there are a few things you can do to help: * Give picocli a star on GitHub! * Tweet about picocli! What do you like about it? How has it helped you? How is it different from the alternatives? * Upvote my [Quora answer](https://www.quora.com/What-is-the-best-way-to-parse-command-line-arguments-with-Java/answer/Remko-Popma) to "What is the best way to parse command-line arguments with Java?" * Upvote my [StackOverflow answer](https://stackoverflow.com/a/43780433/1446916) to "How do I parse command line arguments in Java?" If you like picocli and your project is on GitHub, consider adding this badge to your README.md: [![picocli](https://img.shields.io/badge/picocli-4.6.2-green.svg)](https://github.com/remkop/picocli) ``` [![picocli](https://img.shields.io/badge/picocli-4.6.2-green.svg)](https://github.com/remkop/picocli) ``` ## Example Annotate fields with the command line parameter names and description. Optionally implement `Runnable` or `Callable` to delegate error handling and requests for usage help or version help to picocli. For example: ```java import picocli.CommandLine; import picocli.CommandLine.Option; import picocli.CommandLine.Parameters; import java.io.File; @Command(name = "example", mixinStandardHelpOptions = true, version = "Picocli example 4.0") public class Example implements Runnable { @Option(names = { "-v", "--verbose" }, description = "Verbose mode. Helpful for troubleshooting. Multiple -v options increase the verbosity.") private boolean[] verbose = new boolean[0]; @Parameters(arity = "1..*", paramLabel = "FILE", description = "File(s) to process.") private File[] inputFiles; public void run() { if (verbose.length > 0) { System.out.println(inputFiles.length + " files to process..."); } if (verbose.length > 1) { for (File f : inputFiles) { System.out.println(f.getAbsolutePath()); } } } public static void main(String[] args) { // By implementing Runnable or Callable, parsing, error handling and handling user // requests for usage help or version help can be done with one line of code. int exitCode = new CommandLine(new Example()).execute(args); System.exit(exitCode); } } ``` Implement `Runnable` or `Callable`, and your command can be [executed](https://picocli.info/#execute) in one line of code. The example above uses the `CommandLine.execute` method to parse the command line, handle errors, handle requests for usage and version help, and invoke the business logic. Applications can call `System.exit` with the returned exit code to signal success or failure to their caller. ```bash $ java Example -v inputFile1 inputFile2 2 files to process... ``` The `CommandLine.execute` method automatically prints the usage help message if the user requested help or when the input was invalid. ![Usage help message with ANSI colors](docs/images/ExampleUsageANSI.png?raw=true) This can be customized in many ways. See the user manual [section on Executing Commands](https://picocli.info/#execute) for details. ## Usage Help with ANSI Colors and Styles Colors, styles, headers, footers and section headings are easily [customized with annotations](https://picocli.info/#_ansi_colors_and_styles). For example: ![Longer help message with ANSI colors](docs/images/UsageHelpWithStyle.png?raw=true) See the [source code](https://github.com/remkop/picocli/blob/v0.9.4/src/test/java/picocli/Demo.java#L337). ## Usage Help API Picocli annotations offer many ways to customize the usage help message. If annotations are not sufficient, you can use picocli's [Help API](https://picocli.info/#_usage_help_api) to customize even further. For example, your application can generate help like this with a custom layout: ![Usage help message with two options per row](docs/images/UsageHelpWithCustomLayout.png?raw=true) See the [source code](https://github.com/remkop/picocli/blob/master/src/test/java/picocli/CustomLayoutDemo.java#L61). ## Download You can add picocli as an external dependency to your project, or you can include it as source. See the [source code](https://github.com/remkop/picocli/blob/master/src/main/java/picocli/CommandLine.java). Copy and paste it into a file called `CommandLine.java`, add it to your project, and enjoy! ### Gradle ``` implementation 'info.picocli:picocli:4.6.2' ``` ### Maven ``` info.picocli picocli 4.6.2 ``` ### Scala SBT ``` libraryDependencies += "info.picocli" % "picocli" % "4.6.2" ``` ### Ivy ``` ``` ### Grape ```groovy @Grapes( @Grab(group='info.picocli', module='picocli', version='4.6.2') ) ``` ### Leiningen ``` [info.picocli/picocli "4.6.2"] ``` ### Buildr ``` 'info.picocli:picocli:jar:4.6.2' ``` ### JBang ``` //DEPS info.picocli:picocli:4.6.2 ``` jtreg8-8.2.1+1+ds1/picocli/RELEASE-NOTES.md000066400000000000000000016227761514323636100175070ustar00rootroot00000000000000# picocli Release Notes # Picocli 4.6.2 The picocli community is pleased to announce picocli 4.6.2. This release includes bugfixes and enhancements. Many improvements in the documentation. Thanks to the many people in the picocli community for raising issues and contributing pull requests to fix issues! From this release, picocli uses system properties `sun.stdout.encoding` and `sun.stderr.encoding` when creating the `PrintWriters` returned by `CommandLine::getOut` and `CommandLine::getErr`. When these system properties do not exist, picocli falls back to the default charset (determined by `file.encoding`). This addresses an issue on Windows, where the default charset is not the same as the encoding for its console (often the older `cp437` codepage on English-language versions of Windows). Note that these system properties [seem to have been](https://wrapper.tanukisoftware.com/doc/english/prop-jvm-encoding.html) introduced in Java 8 (although I cannot find it in the JDK 8 release notes) and may not exist on earlier JVMs or on JVMs other than the Oracle and OpenJDK implementations. This is the seventy-seventh public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.6.2-new) * [Fixed issues](#4.6.2-fixes) * [Deprecations](#4.6.2-deprecated) * [Potential breaking changes](#4.6.2-breaking-changes) ## New and Noteworthy ## Fixed issues * [#1422] API: Un-deprecate the `@Option` `help` attribute; it is useful for custom help options. Thanks to [kaushalkumar](https://github.com/kaushalkumar) for raising this. * [#1337][#1338] Enhancement: prevent spurious `WARNING: tag not found in include file` messages when generating man pages. Thanks to [Philip Crotwell](https://github.com/crotwell) for the pull request. * [#1340] Enhancement: add xref to generated man page document to link to subcommands from the parent command page. Thanks to [Philip Crotwell](https://github.com/crotwell) for the pull request. * [#1351][#1362] Enhancement: avoid calling option `completionCandidates` when displaying usage help if `${COMPLETION-CANDIDATES}` is not specified in description. Thanks to [Wenhao ZHANG](https://github.com/wtd2), [sustc11810424](https://github.com/sustc11810424) and [Yining Tang](https://github.com/Lanninger08) for the pull request. * [#1303] Bugfix: Prevent `IllegalArgumentException: argument type mismatch` error in method subcommands with inherited mixed-in standard help options. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. * [#1300] Bugfix: Avoid spurious warning "Could not set initial value for field boolean" when reusing `CommandLine` with ArgGroup. Thanks to [Yashodhan Ghadge](https://github.com/codexetreme) for raising this. * [#1316] Bugfix: Avoid `DuplicateOptionAnnotationsException` thrown on `mixinStandardHelpOptions` for subcommands when parent has `scope = INHERIT` by `picocli-codegen` annotation processor. Thanks to [Philippe Charles](https://github.com/charphi) for raising this. * [#1319] Bugfix: Avoid `DuplicateOptionAnnotationsException` when parent has inherited mixed-in help options and the built-in `HelpCommand` subcommand. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. * [#1331] Bugfix: Avoid `IllegalArgumentException` when parent has no standard help options and `scope = INHERIT`, while subcommand does have mixed-in standard help options. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. * [#1381][#1382] Bugfix: Default value of option in repeated subcommand was not applied correctly. Thanks to [sfeuerhahn](https://github.com/sfeuerhahn) for the pull request. * [#1434][#1435] `CommandSpec.remove(arg)` should also remove the arg from the `args` collection in the CommandSpec. Thanks to [kaushalkumar](https://github.com/kaushalkumar) for the pull request. * [#1404] Bugfix/Enhancement: Print paramLabel only when it could exist. Thanks to [João Guerra](https://github.com/joca-bt) for the pull reqeust. * [#1320][#1321] Bugfix/Enhancement: Use system properties `sun.stdout.encoding` and `sun.stderr.encoding` when creating the `PrintWriters` returned by `CommandLine::getOut` and `CommandLine::getErr`. Thanks to [Philippe Charles](https://github.com/charphi) for the investigation and the pull request. * [#1431] Bugfix/enhancement: `.gitattributes` should include HTML files to convert CRLF to LF. Thanks to [wenhoujx](https://github.com/wenhoujx) for pointing this out. * [#1388][#1430] Bugfix: Fix subcommand aliases autocomplete regression. Thanks to [NewbieOrange](https://github.com/NewbieOrange) for the pull request. * [#1415] Bugfix/DOC: fix NullPointerException in README Example. Thanks to [shannonbay](https://github.com/shannonbay) for raising this. * [#1421] Bugfix/DOC: `execute` method in `RunAll`, `RunFirst` and `RunLast` should not be deprecated. Thanks to [Gamal DeWeever](https://github.com/gadeweever) for raising this. * [#1326][#1339] DOC: Added documentation and examples for controlling the locale. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1296] DOC: add Kotlin code samples to user manual; other user manual improvements. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1299] DOC: Link to `IParameterPreprocessor` from `IParameterConsumer` javadoc. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1304] DOC: Manual, chapter '17.9 Inherited Command Attributes': added Kotlin version of code sample. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1305] DOC: Document use of `IParameterConsumer` as n-ary type converter. Thanks to [Martin](https://github.com/martlin2cz) for raising this. * [#1307] DOC: Added CAUTION admonitions, Kotlin code sample. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1308] DOC: Add example for Option `converter`, improve text for default values. Thanks to [Abhijit Sarkar](https://github.com/asarkar) for raising this. * [#1314] DOC: Fix use of deprecated Maven properties in README. Thanks to [Philippe Charles](https://github.com/charphi) for the pull request. * [#1323] DOC: Update Testing section of the user manual for Stefan Birkner's library [System-Lambda](https://github.com/stefanbirkner/system-lambda). * [#1325] DOC: Add section on Short and Long Option Columns to user manual. Thanks to [Andrei Ciobanu](https://github.com/nomemory) for raising this. * [#1336] DOC: Kotlin sample code, documentation improvements. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1342] DOC: Improve user manual chapter 28.3 'Testing the Exit Code'. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1344] DOC: Documentation, chapter 'Testing environment variables:': add Kotlin test sample. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1443] DOC: Fix incorrect method name `setLongOptionsMaxWidth` to `setUsageHelpLongOptionsMaxWidth` in user manual section 'Long Option Column Width'. Thanks to [kunlk](https://github.com/kunlk) for raising this. * [#1360][#1359] DOC: add JReleaser as packaging option. Thanks to [Andres Almiray](https://github.com/aalmiray) for the pull request. * [#1363][#1364] DOC: Add caution on Variable interpolation in Kotlin. Thanks to [MagnusMG](https://github.com/MagnusMG) for the pull request. * [#1397][#1399] DOC: Update Jline2 README.md to add some recommended workaround about ANSI incompatible terminals. Thanks to [Simon](https://github.com/sbernard31) for the pull request. * [#1398][#1400] DOC: Arity of boolean options is now documented correctly. Thanks to [João Guerra](https://github.com/joca-bt) for the pull request. * [#1428][#1433] DOC: Add section about subcommands with the same name as option default value. Thanks to [cbcmg](https://github.com/cbcmg) for the pull request. * [#1390][#1432] DOC: Update examples to not throw Exception from main method. Thanks to [wenhoujx](https://github.com/wenhoujx) for the pull request. * [#1423] DOC: Fixed broken link in README.md to annotation processor documentation. Thanks to [Sevy007](https://github.com/Sevy007) for raising this. * [#1449] DOC: Fix typo in `picocli-shell-jline2/README.md`. Thanks to [Ahmed Ashour](https://github.com/asashour) for the pull request. * [#1426] Fix README adoption logos. Thanks to [NewbieOrange](https://github.com/NewbieOrange) for the pull request. * [#1313] DEP: Bump jline3Version in order to avoid stackoverflow error. Thanks to [Rupert Madden-Abbott](https://github.com/rupert-madden-abbott) for the pull request. * [#1455] DEP: Bump spring-boot version to 2.5.6. * [#1369][#1371] Upgrade jline3 to version 3.19.0 to avoid "ReadConsoleInputW failed: Incorrect function" error. Thanks to [auricgoldfinger](https://github.com/auricgoldfinger) for the pull request. * [#1336] BUILD: Bump Spring Boot, Gradle and Kotlin to latest version. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1327] BUILD: fix incorrect version in `MANIFEST.MF`. Thanks to [Fiouz](https://github.com/Fiouz) for the pull request. * [#1328] BUILD: Upgrade Gradle to 6.8.2 and enable official Gradle Wrapper Validation GitHub Action. Thanks to [Fiouz](https://github.com/Fiouz) for the pull request. * [#1329] BUILD: OSGi manifest entry in picocli-4.6.0.jar should not require groovy. Thanks to [Fiouz](https://github.com/Fiouz) for raising this. * [#1330] BUILD: use type-safe DSL instead of direct XML manipulation to generate `pom.xml`. Thanks to [Fiouz](https://github.com/Fiouz) for the pull request. * [#1332] BUILD: Bumping asciidoctor + asciidoctor gradle plugin to latest versions. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1413] BUILD: Improve Travis CI build Performance. Thanks to [YunLemon](https://github.com/YunLemon) for the pull request. * [#1322] BUILD: switch from Bintray jcenter to Maven Central. ## Deprecations No features were deprecated in this release. The `@Option` `help` attribute is no longer deprecated from this release; it is useful for custom help options. ## Potential breaking changes This release has no breaking changes. # Picocli 4.6.1 The picocli community is pleased to announce picocli 4.6.1. This release fixes a problem with dependency scope in the following sub-modules: * picocli-codegen * picocli-groovy * picocli-shell-jline2 * picocli-shell-jline3 * picocli-spring-boot-starter The problem was that these modules contained dependencies that were declared to have `implementation` scope instead of `api` scope. However, these were transitive dependencies, and necessary to compile any project that uses the above picocli modules. In this release, transitive dependencies are declared with `api` scope in the above modules. Special thanks to [Sualeh Fatehi](https://github.com/sualeh), [Dejan Stojadinović](https://github.com/dejan2609) and [Semyon Levin](https://github.com/remal) for the quick community feedback, pull request and reviews! This is the seventy-sixth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.6.1-new) * [Fixed issues](#4.6.1-fixes) * [Deprecations](#4.6.1-deprecated) * [Potential breaking changes](#4.6.1-breaking-changes) ## New and Noteworthy ## Fixed issues * [#1291] Fix dependency scope for `picocli-shell-jline3`. Thanks to [Sualeh Fatehi](https://github.com/sualeh) for raising this. * [#1292] PR to fix dependency scope for `picocli-shell-jline3`. Thanks to [Dejan Stojadinović](https://github.com/dejan2609) for the pull request, and [Semyon Levin](https://github.com/remal) for the review. * [#1294] Fix dependency scope for `picocli-spring-boot-starter`. Thanks to [Semyon Levin](https://github.com/remal) for raising this. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.6.0 The picocli community is pleased to announce picocli 4.6.0. This release contains new features, bug fixes and other enhancements. ## Community Contributions This release contains many, many community contributions, for which I am extremely grateful. Let's give them some credit! * [Andreas Deininger](https://github.com/deining) has been contributing to the documentation and other areas for a long time, but recently went into overdrive :-) and contributed many, many new pull requests to improve the documentation. The user manual and Quick Guide now have a "foldable" table of contents, and examples in tabs, with many additional examples in Kotlin, Scala and Groovy. A lot of work went into this! Many thanks, Andreas! * [Marko Mackic](https://github.com/MarkoMackic) contributed a pull request to add `IModelTransformer` API for user-defined model transformations after initialization and before parsing. * [Sualeh Fatehi](https://github.com/sualeh) contributed a pull request to the `picocli-shell-jline3` module that adds a built-in `clear` command and improves the `help` command. * [H.Sakata](https://github.com/sakata1222) contributed a pull request that adds support for `echo` and `prompt` for interactive options and positional parameters. * [Daniel Gray](https://github.com/danielthegray) contributed a bug fix to prevent incorrectly defaulting inherited positional params after a subcommand. * [nveeser-google](https://github.com/nveeser-google) contributed a fix for compiler warnings about `Annotation::getClass` and assignment in `if` condition. * [Petr Hála](https://github.com/pehala) contributed a pull request to add a section on Mocking to user manual. * [Max Rydahl Andersen](https://github.com/maxandersen) contributed a pull request to include jbang in the Build Tools section of the user manual. * [David Phillips](https://github.com/electrum) contributed a section to the user manual on [Really Executable JARs](https://skife.org/java/unix/2011/06/20/really_executable_jars.html). * [Laurent Almeras](https://github.com/lalmeras) contributed a pull request to fix the user manual: `@ParentObject` should be `@ParentCommand`. * [Mattias Andersson](https://github.com/attiand) raised the idea of supporting subcommand methods in Groovy scripts. * [Adrian A.](https://github.com/aadrian) raised the idea of using closures in the picocli annotations in Groovy programs instead of specifying a class. * [Nick Cross](https://github.com/rnc) raised the idea of inheriting `@Command` attributes with `scope=INHERIT`. * [Marko Mackic](https://github.com/MarkoMackic) raised the idea of adding a `CommandSpec::removeSubcommand` method. * [Max Rydahl Andersen](https://github.com/maxandersen) raised the idea of supporting `Optional` type for options and positional parameters. * [Max Rydahl Andersen](https://github.com/maxandersen) and [David Walluck](https://github.com/dwalluck) raised the idea of supporting key-only Map options (to support `-Dkey` as well as `-Dkey=value`). * [David Walluck](https://github.com/dwalluck) raised the idea of a "preprocessor" parser plugin. * [Jannick Hemelhof](https://github.com/clone1612) raised the idea of supporting `@Spec`-annotated members in `ArgGroup` classes. * [Vitaly Shukela](https://github.com/vi) raised a bug report: the error message for unmatched positional argument reports an incorrect index when value equals a previously matched argument. * [drkilikil](https://github.com/drkilikil) raised a bug report: `MissingParameterException` should not be thrown when subcommand has required options and help option is specified on parent command. * [Sebastian Thomschke](https://github.com/sebthom) raised a bug report: `ReflectionConfigGenerator` should not generate method section in subclass config for private superclass methods in `reflect-config.json`. * [Lukas Heumos](https://github.com/Zethson) added the picocli-based [cli-java template](https://cookietemple.readthedocs.io/en/latest/available_templates/available_templates.html#cli-java) to CookieTemple. * [Sualeh Fatehi](https://github.com/sualeh) raised the idea of adding add `CommandLine::getFactory` accessor method. * [David Walluck](https://github.com/dwalluck) contributed a test improvement that allows the tests to run reliably in more environments. ## What is in this release Improved Groovy support: this release introduces a new `@PicocliScript2` annotation that adds support for exit codes and `@Command`-annotated methods to define subcommands. Also, from this release, Groovy programs can use closures in the picocli annotations instead of specifying a class. From this release, Map options accept key-only parameters, so end users can specify `-Dkey` as well as `-Dkey=value`. There is a new `mapFallbackValue` attribute that enables this, which can be used to control the value that is put into the map when only a key was specified on the command line. Also, this release adds support for `java.util.Optional`: single-value types can be wrapped in an `Optional` container object when running on Java 8 or higher. If the option or positional parameter was not specified on the command line, picocli assigns the value `Optional.empty()` instead of `null`. This release also adds support for commands with `scope = ScopeType.INHERIT`. Commands with this scope have their attributes copied to all subcommands (and sub-subcommands). New parser plugin: `IParameterPreprocessor` and new configuration plugin: `IModelTransformer`. From this release, `@Spec`-annotated elements can be used in `ArgGroup` classes, which can be convenient for validation. Interactive options and positional parameters can now set `echo = true` (for non-security sensitive data) so that user input is echoed to the console, and control the `prompt` text that is shown before asking the user for input. Help API: this release adds public methods `Help.Layout::colorScheme`, `Help.Layout::textTable`, `Help.Layout::optionRenderer`, `Help.Layout::parameterRenderer`, and `Help::calcLongOptionColumnWidth`, making it easier to customize the table format used to lay out options and positional parameters in the usage help message. CommandSpec API: added method `CommandSpec::removeSubcommand`. This is the seventy-fifth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.6.0-new) * [New `@PicocliScript2` annotation](#4.6.0-PicocliScript2-annotation) * [Groovy Closures in Annotations](#4.6.0-closures-in-annotation) * [Key-only map parameters](#4.6.0-key-only-map-params) * [System Properties](#4.6.0-system-properties) * [`java.util.Optional`](#4.6.0-java-util-optional) * [Inherited Command Attributes](#4.6.0-inherited-command-attributes) * [Preprocessor Parser Plugin](#4.6.0-preprocessor) * [Model Transformations](#4.6.0-model-transformations) * [Fixed issues](#4.6.0-fixes) * [Deprecations](#4.6.0-deprecated) * [Potential breaking changes](#4.6.0-breaking-changes) ## New and Noteworthy ### New `@PicocliScript2` annotation The older `@picocli.groovy.PicocliScript` annotation is deprecated from picocli 4.6. New scripts should use the `@picocli.groovy.PicocliScript2` annotation (and associated `picocli.groovy.PicocliBaseScript2` base class) instead. The table below lists the differences between the `PicocliBaseScript2` and `PicocliBaseScript` script base classes. | `PicocliBaseScript2` | `PicocliBaseScript` |---- | ---- | Subcommands can be defined as `@Command`-annotated methods in the script. | No support for `@Command`-annotated methods. | Support for `help` subcommands (both the built-in one and custom ones). | No support for `help` subcommands. | Exit code support: scripts can override `afterExecution(CommandLine, int, Exception)` to call `System.exit`.| No support for exit code. | Invokes `CommandLine::execute`. Scripts can override `beforeParseArgs(CommandLine)` to install a custom `IExecutionStrategy`.| Execution after parsing is defined in `PicocliBaseScript::run` and is not easy to customize. Any subcommand _and_ the main script are _both_ executed. | Scripts can override `beforeParseArgs(CommandLine)` to install a custom `IParameterExceptionHandler`. | Invalid input handling can be customized by overriding `PicocliBaseScript::handleParameterException`. | Scripts can override `beforeParseArgs(CommandLine)` to install a custom `IExecutionExceptionHandler`. | Runtime exception handling can be customized by overriding `PicocliBaseScript::handleExecutionException`. | Implements `Callable`, script body is transformed to the `call` method. | Script body is transformed to the `runScriptBody` method. ### Groovy Closures in Annotations From picocli 4.6, Groovy programs can use closures in the picocli annotations instead of specifying a class. This can be especially useful in Groovy scripts, where one cannot define a static inner class. Example: ```java @Command(name = "ClosureDemo", versionProvider = { { -> ["line1" , "line2"] as String[] } as IVersionProvider // <1> }, defaultValueProvider = { { argSpec -> "some default" } as IDefaultValueProvider // <2> }) class ClosureDemo { @Option(names = '-x', completionCandidates = {["A", "B", "C"]}) // <3> String x @Option(names = '-y', parameterConsumer = { { args, argSpec, commandSpec -> // <4> argSpec.setValue(args.toString() + commandSpec.name()) args.clear() } as IParameterConsumer }) String y @Option(names = '-z', converter = [ // requires Groovy 3.0.7 { { str -> MessageDigest.getInstance(str) } as ITypeConverter } // <5> ]) MessageDigest z } ``` When a class is specified, picocli creates an instance of the class. By contrast, when a closure is specified, picocli _calls the closure_ to get an instance. (To be precise, both of these are delegated to the configured [factory](https://picocli.info/#_custom_factory), and the default factory implementation supports closures from picocli 4.6.) As you can see in the above example, each closure in the annotation should contain another closure that has the required type (`IVersionProvider`, `IDefaultValueProvider`, etc.) * <1> Command `versionProvider`: note the empty parameter list before the `->` arrow. This is needed to help the Groovy compiler. The closure must be cast to `IVersionProvider`. * <2> Command `defaultProvider`: return a default value for the specified `ArgSpec` parameter. The closure must be cast to `IDefaultValueProvider`. * <3> Option or Parameters `completionCandidates`: return a list of Strings. No parameter list or casting is required. * <4> Option or Parameters `parameterConsumer`: given a `Stack`, `ArgSpec` and `CommandSpec`, process the remaining arguments. The closure must be cast to `IParameterConsumer`. * <5> Option or Parameters type `converter` takes an array of closures. Groovy 3.0.7 or greater is required: older versions of Groovy ignore closures in class array annotations. Each closure must have a parameter and be cast to `ITypeConverter`. ### Key-only map parameters By default, picocli expects Map options and positional parameters to look like `key=value`, that is, the option parameter or positional parameter is expected to have a key part and a value part, separated by a `=` character. If this is not the case, picocli shows a user-facing error message: `Value for ... should be in KEY=VALUE format but was ...`. From picocli 4.6, applications can specify a `mapFallbackValue` to allow end users to specify only the key part. The specified `mapFallbackValue` is put into the map when end users to specify only a key. The value type can be wrapped in a `java.util.Optional`. For example: ```java @Option(names = {"-P", "--properties"}, mapFallbackValue = Option.NULL_VALUE) Map> properties; @Parameters(mapFallbackValue = "INFO", description = "... ${MAP-FALLBACK-VALUE} ...") Map, LogLevel> logLevels; ``` This allows input like the following: ``` --properties=key1 -Pkey2 -Pkey3=3 org.myorg.MyClass org.myorg.OtherClass=DEBUG ``` The above input would give the following results: ``` properties = [key1: Optional.empty, key2: Optional.empty, key3: Optional[3]] logLevels = [org.myorg.MyClass: INFO, org.myorg.OtherClass: DEBUG] ``` Note that the option description may contain the [`${MAP-FALLBACK-VALUE}` variable](https://picocli.info/#_predefined_variables) which will be replaced with the actual map fallback value when the usage help is shown. ### System Properties A common requirement for command line applications is to support the `-Dkey=value` syntax to allow end users to set system properties. The example below uses the `Map` type to define an `@Option`-annotated method that delegates all key-value pairs to `System::setProperty`. Note the use of `mapFallbackValue = ""` to allow key-only option parameters. ```java class SystemPropertiesDemo { @Option(names = "-D", mapFallbackValue = "") // allow -Dkey void setProperty(Map props) { props.forEach((k, v) -> System.setProperty(k, v)); } } ``` ### `java.util.Optional` From version 4.6, picocli supports single-value types wrapped in a `java.util.Optional` container when running on Java 8 or higher. If the option or positional parameter was not specified on the command line, picocli assigns the value `Optional.empty()` instead of `null`. For example: ```java @Option(names = "-x") Optional x; @Option(names = "-D", mapFallbackValue = Option.NULL_VALUE) Map> map; ``` WARNING: Picocli has only limited support for `java.util.Optional` types: only single-value types, and the values in a `Map` (but not the keys!) can be wrapped in an `Optional` container. `java.util.Optional` cannot be combined with arrays or other `Collection` classes. ### Inherited Command Attributes Picocli 4.6 adds support for inheriting `@Command` attributes with the `scope = ScopeType.INHERIT` annotation. Commands with this scope have their `@Command` attributes copied to all subcommands (and sub-subcommands, to any level of depth). When a subcommand specifies an explicit value in its `@Command` annotation, this value is used instead of the inherited value. For example: ```java @Command(name = "app", scope = ScopeType.INHERIT, mixinStandardHelpOptions = true, version = "app version 1.0", header = "App header", description = "App description", footerHeading = "Copyright%n", footer = "(c) Copyright by the authors", showAtFileInUsageHelp = true) class App implements Runnable { @Option(names = "-x") int x; public void run() { System.out.printf("Hello from app %d%n!", x); } @Command(header = "Subcommand header", description = "Subcommand description") void sub(@Option(names = "-y") int y) { System.out.printf("Hello app sub %d%n!", y); } } ``` The `app` command in the above example has `scope = ScopeType.INHERIT`, so its `@Command` properties are inherited by the `sub` subcommand. The `sub` subcommand defines its own `header` and `description`, so these are not inherited from the parent command. The help message for the subcommand looks like this: ``` Subcommand header Usage: app sub [-hV] [-y=] [@...] Subcommand description [@...] One or more argument files containing options. -h, --help Show this help message and exit. -V, --version Print version information and exit. -y= Copyright (c) Copyright by the authors ``` Note that the subcommand has inherited the mixed-in standard help options (`--help` and `--version`), the `@file` usage help, and the footer and footer heading. It also inherited the version string, shown when the user invokes `app sub --version`. When a command has `scope = INHERIT`, the following attributes are copied to its subcommands: * all usage help attributes: description, descriptionHeading, header, headerHeading, footer, footerHeading, customSynopsis, synopsisHeading, synopsisSubcommandLabel, abbreviateSynopsis, optionListHeading, parameterListHeading, commandListHeading, exitCodeList, exitCodeListHeading, requiredOptionMarker, showDefaultValues, sortOptions, autoWidth, width, showAtFileInUsageHelp, showEndOfOptionsDelimiterInUsageHelp, and hidden * exit codes: exitCodeOnSuccess, exitCodeOnUsageHelp, exitCodeOnVersionHelp, exitCodeOnInvalidInput, exitCodeOnExecutionException * the help and version options mixed in by `mixinStandardHelpOptions` * separator between option and option parameter * version * versionProvider * defaultValueProvider * subcommandsRepeatable * whether this command is a `helpCommand` Attributes that are _not_ copied include: * command name * command aliases * options and parameters (other than the help and version options mixed in by `mixinStandardHelpOptions`) * other mixins than `mixinStandardHelpOptions` * subcommands * argument groups ### Preprocessor Parser Plugin Introduced in picocli 4.6, the `IParameterPreprocessor` is also a parser plugin, similar to `IParameterConsumer`, but more flexible. Options, positional parameters and commands can be assigned a `IParameterPreprocessor` that implements custom logic to preprocess the parameters for this option, position or command. When an option, positional parameter or command with a custom `IParameterPreprocessor` is matched on the command line, picocli's internal parser is temporarily suspended, and this custom logic is invoked. This custom logic may completely replace picocli's internal parsing for this option, positional parameter or command, or augment it by doing some preprocessing before picocli's internal parsing is resumed for this option, positional parameter or command. The "preprocessing" actions can include modifying the stack of command line parameters, or modifying the model. #### Example use case This may be useful when disambiguating input for commands that have both a positional parameter and an option with an optional parameter. For example, suppose we have a command with the following synopsis: ``` edit [--open[=]] ``` One of the limitations of options with an optional parameter is that they are difficult to combine with positional parameters. With a custom parser plugin, we can customize the parser, such that `VALUE` in `--option=VALUE` is interpreted as the option parameter, and in `--option VALUE` (without the `=` separator), VALUE is interpreted as the positional parameter. The code below demonstrates: ```java @Command(name = "edit") class Edit { @Parameters(index = "0", description = "The file to edit.") File file; enum Editor { defaultEditor, eclipse, idea, netbeans } @Option(names = "--open", arity = "0..1", preprocessor = Edit.MyPreprocessor.class, description = { "Optionally specify the editor to use; if omitted the default editor is used. ", "Example: edit --open=idea FILE opens IntelliJ IDEA (notice the '=' separator)", " edit --open FILE opens the specified file in the default editor" }) Editor editor = Editor.defaultEditor; static class MyPreprocessor implements IParameterPreprocessor { public boolean preprocess(Stack args, CommandSpec commandSpec, ArgSpec argSpec, Map info) { // we need to decide whether the next arg is the file to edit // or the name of the editor to use... if (" ".equals(info.get("separator"))) { // parameter was not attached to option // act as if the user specified --open=defaultEditor args.push(Editor.defaultEditor.name()); } return false; // picocli's internal parsing is resumed for this option } } } ``` With this preprocessor, the following user input gives the following command state: ``` # User input # Command State # -------------------------- --open A B # editor: defaultEditor, file: A, unmatched: [B] --open A # editor: defaultEditor, file: A, unmatched: [] --open=A B # editor: A, file: B, unmatched: [] --open=A # editor: A, file: null, unmatched: [] ``` ### Model Transformations From picocli 4.6, it is possible to use the annotations API to modify the model (commands, options, subcommands, etc.) dynamically at runtime. The `@Command` annotation now has a `modelTransformer` attribute where applications can specify a class that implements the `IModelTransformer` interface: This allows applications to dynamically add or remove options, positional parameters or subcommands, or modify the command in any other way, based on some runtime condition. ```java @Command(modelTransformer = Dynamic.SubCmdFilter.class) class Dynamic { private static class SubCmdFilter implements IModelTransformer { public CommandSpec transform(CommandSpec commandSpec) { if (Boolean.getBoolean("disable_sub")) { commandSpec.removeSubcommand("sub"); } return commandSpec; } } @Command private void sub() { // subcommand business logic } } ``` ## Fixed issues * [#1164] API: Add support for `@Command(scope=INHERIT)`. Thanks to [Nick Cross](https://github.com/rnc) for raising this. * [#1191] API: Add `@PicocliScript2` annotation to support subcommand methods in Groovy scripts. Thanks to [Mattias Andersson](https://github.com/attiand) for raising this. * [#1241] API: Add `mapFallbackValue` attribute to `@Options` and `@Parameters` annotations, and corresponding `ArgSpec.mapFallbackValue()`. * [#1217] API: Add `IParameterPreprocessor` parser plugin to invoke custom logic when a command, option or positional parameter is matched. Thanks to [David Walluck](https://github.com/dwalluck) for raising this. * [#1259][#1266] API: Add `IModelTransformer` to support user-defined model transformations after initialization and before parsing. Thanks to [Marko Mackic](https://github.com/MarkoMackic) for the pull request. * [#802][#1284] API: Add support for `echo` and `prompt` in for interactive options and positional parameters. Thanks to [H.Sakata](https://github.com/sakata1222) for the pull request. * [#1184] API: Added public methods `Help.Layout::colorScheme`, `Help.Layout::textTable`, `Help.Layout::optionRenderer`, `Help.Layout::parameterRenderer`, and `Help::calcLongOptionColumnWidth`. * [#1254] API: Added `ArgSpec::root`: this method returns the original `ArgSpec` for inherited `ArgSpec` objects, and `null` for other `ArgSpec` objects. Thanks to [Daniel Gray](https://github.com/danielthegray) for the pull request. * [#1256] API: Added `CommandSpec::removeSubcommand` method. Thanks to [Marko Mackic](https://github.com/MarkoMackic) for raising this. * [#1258] API: Groovy programs can now use closures in the picocli annotations instead of specifying a class. Thanks to [Adrian A.](https://github.com/aadrian) for raising this. * [#1267] API: Add `CommandLine::getFactory` accessor for the factory. Thanks to [Sualeh Fatehi](https://github.com/sualeh) for the suggestion. * [#1108] Enhancement: Support `Optional` type for options and positional parameters. Thanks to [Max Rydahl Andersen](https://github.com/maxandersen) for raising this. * [#1214] Enhancement: Support Map options with key-only (support `-Dkey` as well as `-Dkey=value`). Thanks to [Max Rydahl Andersen](https://github.com/maxandersen) and [David Walluck](https://github.com/dwalluck) for raising this and subsequent discussion. * [#1260] Enhancement: Support `@Spec`-annotated members in `ArgGroup` classes. Thanks to [Jannick Hemelhof](https://github.com/clone1612) for raising this. * [#1265] Enhancement in `picocli-shell-jline3`: add built-in `clear` command and improve `help` command. Thanks to [Sualeh Fatehi](https://github.com/sualeh) for the pull request. * [#1236] Enhancement/bugfix: Fix compiler warnings about `Annotation::getClass` and assignment in `if` condition. Thanks to [nveeser-google](https://github.com/nveeser-google) for the pull request. * [#1229] Bugfix: Fix compilation error introduced with fc5ef6de6 (#1184). Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1225] Bugfix: Error message for unmatched positional argument reports an incorrect index when value equals a previously matched argument. Thanks to [Vitaly Shukela](https://github.com/vi) for raising this. * [#1250] Bugfix: Inherited positional parameter should not be overridden by default value if placed after subcommand. Thanks to [Daniel Gray](https://github.com/danielthegray) for the pull request. * [#1183] Bugfix: Prevent `MissingParameterException` thrown when subcommand has required options and help option is specified on parent command. Thanks to [drkilikil](https://github.com/drkilikil) for raising this. * [#1273] Bugfix: The `Help.calcLongOptionColumnWidth` now calls `Help.createDefaultOptionRenderer`, so overriding `createDefaultOptionRenderer` uses the correct column width in the options and parameters list. * [#1274] Bugfix: `ReflectionConfigGenerator` should not generate method section in subclass config for private superclass methods in `reflect-config.json`. Thanks to [Sebastian Thomschke](https://github.com/sebthom) for raising this. * [#1215] DOC: User manual improvements, including more tabs with Kotlin source code. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1219] DOC: User manual improvements: added more tabs with Kotlin code. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1220] DOC: User manual improvements: corrections, more Kotlin tabs. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1221] DOC: User manual improvements: add tabs with Kotlin code for samples (chapter 14: Usage help). Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1222] DOC: User manual improvements: add tabs with Kotlin code for samples (chapter 7 + 12). Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1223] DOC: User manual improvements: add tabs with Kotlin code for samples (chapter 10: Validation). Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1224] DOC: User manual improvements: add tabs with Kotlin code for samples (chapter 5: Default Values). Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1226] DOC: User manual improvements: add tabs with Kotlin code for samples (chapter 9.6 - 9.8: Executing commands). Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1228] DOC: User manual improvements: add tabs with Kotlin code for samples (chapters 8, 16, 20). Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1230] DOC: User manual improvements: add tabs with Kotlin code for samples (Chapters 6, 11, 15, 19). Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1232] DOC: User manual improvements for Micronaut example: add Kotlin version, extended description of Micronaut usage. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1233] DOC: User manual improvements: add tabs with Kotlin code for samples (Chapter 21: Tips & Tricks). Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1234] DOC: add system properties example to user manual. * [#1235][#1238] DOC: User manual: update DI section on Quarkus. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1246] DOC: User manual improvements: Guice and Spring Boot examples: add Kotlin versions. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1242] DOC: "Foldable" table of contents for User Manual and Quick Guide. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1247] DOC: User manual: extended Spring Boot example. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1249] DOC: Added section on Mocking to user manual. Thanks to [Petr Hála](https://github.com/pehala) for the pull request. * [#1244] DEP: Bump `Spring-Boot-Starter` version to 2.3.5.RELEASE. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1289] DEP: Bump Spring boot dependency to 2.4.1. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1248] BUILD: Fix gradle warnings. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1280] BUILD: Remove trailing comment from gradle.properties to prevent build error. Thanks to [David Walluck](https://github.com/dwalluck) for raising this. * [#1253] DOC: Fix line endings to LF in documentation files. Thanks to [Daniel Gray](https://github.com/danielthegray) for the pull request. * [#1255] DOC: User manual and Quick Guide: add Groovy, Kotlin and Scala examples. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1261] DOC: User manual improvements: add Scala code samples. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1262] DOC: User manual: include jbang in the Build Tools section. Thanks to [Max Rydahl Andersen](https://github.com/maxandersen) for the pull request. * [#1263] DOC: User manual: show build scripts in tabs. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1264] DOC: Fix broken links to GraalVm native image build configuration. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1005] DOC: Add link to the CookieTemple [cli-java template](https://cookietemple.readthedocs.io/en/latest/available_templates/available_templates.html#cli-java) README. Thanks to [Lukas Heumos](https://github.com/Zethson) for getting this added to CookieTemple. * [#1276] DOC: User manual: add section for "really executable JARs". Thanks to [David Phillips](https://github.com/electrum) for the pull request. * [#1286] DOC: Fix: `@ParentObject` should be `@ParentCommand`. Thanks to [Laurent Almeras](https://github.com/lalmeras) for the pull request. * [#1290] DOC: JLine: change keystroke syntax 'Ctl-D' to more common used syntax 'Ctrl-D'. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1270] TEST: Fix issue #1103 in `Issue1225UnmatchedArgBadIndex`. Thanks to [David Walluck](https://github.com/dwalluck) for the pull request. ## Deprecations From this release, the `@picocli.groovy.PicocliScript` annotation in the `picocli-groovy` module is deprecated in favor of `@picocli.groovy.PicocliScript2`, and the `picocli.groovy.PicocliBaseScript` class is deprecated in favor of `picocli.groovy.PicocliBaseScript2`. ## Potential breaking changes Added method `isOptional()` to the `picocli.CommandLine.Model.ITypeInfo` interface. # Picocli 4.5.2 The picocli community is pleased to announce picocli 4.5.2. This release contains bug fixes and enhancements: * Auto-enable ANSI colors on MSYS2 terminals. * Abbreviated options are now matched correctly even when value attached with '=' separator. * The built-in `HelpCommand` now respects subcommands case-sensitivity and abbreviations. * Required parameters no longer consume negated options. * Positional parameters in Argument Groups no longer result in `ArithmeticException: / by zero` exceptions. * The user manual now has tabs showing examples in languages other than Java. This is a work in progress: many examples still only have a Java version. Contributions welcome! * Many, many documentation enhancements, most of which contributed by the community. Many thanks to the picocli community who contributed 28 pull requests in this release! Please see the Fixed Issues section below for the individual contributors. Great work! This is the seventy-fourth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.5.2-new) * [Fixed issues](#4.5.2-fixes) * [Deprecations](#4.5.2-deprecated) * [Potential breaking changes](#4.5.2-breaking-changes) ## New and Noteworthy The user manual now has tabs showing examples in languages other than Java. This is a work in progress: many examples still only have a Java version. Contributions welcome! ## Fixed issues * [#1186] Enhancement: Auto-enable ANSI colors on MSYS2 (Git for Windows, MSYS2-based Windows Terminal shells, etc.). Thanks to [Sysmat](https://github.com/sysmat) for raising this. * [#1162] Bugfix: Abbreviated options are not matched if value attached with '=' separator (like `-x=3`). Thanks to [Chris Laprun](https://github.com/metacosm) for raising this. * [#1156][#1172] Bugfix: the built-in `HelpCommand` now respects subcommands case-sensitivity and abbreviations. Thanks to [NewbieOrange](https://github.com/NewbieOrange) for the pull request. * [#1197] Bugfix: required parameters should not consume negated options. Thanks to [Kevin Turner](https://github.com/keturn) for raising this. * [#1213] Bugfix: `@Parameters` in `@ArgGroup` should not result in `ArithmeticException: / by zero`. Thanks to [Loren Keagle](https://github.com/LorenKeagle) for raising this. * [#1158] DOC: Fix broken links to GraalVM repo. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1155] DOC: Fix sample code in chapter "Validation". Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1157] DOC: Fix typo "a argument group" in user manual. Thanks to sabrina for raising this. * [#1160] DOC: Added section [Was a Value Defaulted?](https://picocli.info/#_was_a_value_defaulted) to the user manual. * [#1161] DOC: Fix typo "4,2" (should be 4.2) in user manual. Thanks to sabrina for raising this. * [#1165] DOC: Fix jline3 example: add `AnsiConsole::systemUninstall` in `finally` clause. Thanks to [David Walluck](https://github.com/dwalluck) for raising this. * [#1168][#1169] DOC: Ensure `org.jline.terminal.Terminal` is closed when done. Thanks to [David Walluck](https://github.com/dwalluck) for the pull request. * [#1167] DOC: Fix broken links in Quick Guide. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1171] DOC: Various documentation improvements. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1173] DOC: Improve example applications for the user manual and Quick Guide. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1175] DOC: section on compatible versions to `picocli-shell-jline3/README.md`. Thanks to [Nick Cross](https://github.com/rnc) for raising this. * [#1176] DOC: Update JLine `picocli-shell-jline3` example to 3.16.0. Thanks to [Nick Cross](https://github.com/rnc) for the pull request. * [#890][#1187] DOC: Extend and improve subcommands documentation. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1190] DOC: Improve InetSocketAddressConverter demo. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1192] DOC: Fix broken links in documentation. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1196] DOC: Quick Guide examples can now be executed on the documentation page via [JDoodle.com](https://www.jdoodle.com). Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1200] DOC: User manual `checksum` example can now be executed on the documentation page via [JDoodle.com](https://www.jdoodle.com). Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1199] DOC: Fix `paramLabel` in examples. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1198] DOC: Add copy button to code blocks. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1201] DOC: User manual `checksum` example: add Kotlin source code on second tab. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1202] DOC: Update to latest Asciidoctor gradle plugin. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1203] DOC: Replace 'coderay' source code highlighter with 'rouge' to support Kotlin, Scala and Groovy. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1205] DOC: User manual `checksum` example: add more tabs for Groovy, Groovy script and Scala. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1208] DOC: Fix: Show copy buttons in code blocks with latest Asciidoctor gradle plugin. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1209] DOC: Show Maven coordinates in JLine2/3 README. Thanks to [Jiří HoluÅ¡a](https://github.com/Holmistr) for the pull request. * [#1210] DOC: User manual `subcommands` example: add tab with Kotlin source code. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1211] DOC: User manual `subcommands` section: add several tabs with Kotlin source code. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1170] TEST: Ensure ANSI is disabled in `ManPageGeneratorTest` regardless of environment. Thanks to [David Walluck](https://github.com/dwalluck) for the pull request. * [#1166][#1103] TEST: Ensure ANSI is disabled in `TracerTest` regardless of environment. Thanks to [David Walluck](https://github.com/dwalluck) for the pull request. * [#1179] TEST: Use `.invalid` domain name for `InetAddress` test. Thanks to [David Phillips](https://github.com/electrum) for the pull request. * [#1178] BUILD: Run Travis build on macOS. Thanks to [David Phillips](https://github.com/electrum) for the pull request. * [#1192] Dependency Upgrade: Bump AsciiDoctor to 2.1.0 from 1.6.2. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.5.1 The picocli community is pleased to announce picocli 4.5.1. This release contains bug fixes and enhancements. Fixed bug in the `picocli-codegen` annotation processor that resulted in errors in native images that used `ManPageGenerator` as subcommand. Suppress generation of Gradle Module Metadata, to fix Gradle build failures for projects using picocli 4.4.0 or 4.5.0. Fixed terminal width detection on macOS. The user manual now has a new section on [Validation](https://picocli.info/#_validation). Various other documentation improvements. This is the seventy-third public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.5.1-new) * [Fixed issues](#4.5.1-fixes) * [Deprecations](#4.5.1-deprecated) * [Potential breaking changes](#4.5.1-breaking-changes) ## New and Noteworthy ## Fixed issues * [#1151] Bugfix: `ManPageGenerator` as subcommand with native-image throws exception. Thanks to [Sebastian Hoß](https://github.com/sebhoss) for raising this. * [#1152] Bugfix: Gradle build fail when using picocli 4.4.0 or 4.5.0: Gradle Module Metadata for picocli 4.4.0+ missing from Maven Central. Thanks to [Frank Pavageau](https://github.com/fpavageau) for reporting this. * [#1150] Bugfix: Fix terminal width detection on macOS. Thanks to [David Phillips](https://github.com/electrum) for the pull request. * [#1142] DOC: Update Kotlin GraalVM native image example - Update native image gradle plugin. Now supports jdk 11. Thanks to [OndrejMalek](https://github.com/OndrejMalek) for the pull request. * [#1153] DOC: Fix documentation leading code quote. Thanks to sabrina for raising this. * [#1147] DOC: Add documentation on how to do custom parameter validation. Thanks to [Loren Keagle](https://github.com/LorenKeagle) for raising this. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.5.0 The picocli community is pleased to announce picocli 4.5.0. This release contains bug fixes and enhancements. The `ColorScheme` class now has new methods `stackTraceText` and `richStackTraceString`, which can be convenient when creating [custom error handlers](https://picocli.info/#_handling_errors) with colors. Various bugfixes in the `picocli-codegen` annotation processor. The user manual now has anchor links before all section titles. This is the seventy-second public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.5.0-new) * [Fixed issues](#4.5.0-fixes) * [Deprecations](#4.5.0-deprecated) * [Potential breaking changes](#4.5.0-breaking-changes) ## New and Noteworthy ## Fixed issues * [#1129] API: Add methods `ColorScheme::stackTraceText(Throwable)` and `ColorScheme::richStackTraceString(Throwable)`. * [#1124] Enhancement: automatically generate a better summary in the `AutoComplete.GenerateCompletion` generated man page. * [#1126] Enhancement: Make picocli trace levels case-insensitive. * [#1128] Enhancement: `ParameterException` caused by `TypeConversionException` now have their cause exception set. * [#1137] Bugfix: The `picocli-codegen` annotation processor causes the build to fail with a `ClassCastException` when an option has `completionCandidates` defined. * [#1134] Bugfix: The `picocli-codegen` annotation processor should allow `@Spec`-annotated field in classes implementing `IVersionProvider`. * [#1138] Bugfix: The `picocli-codegen` annotation processor no longer gives `FATAL ERROR: picocli.CommandLine$InitializationException: ArgGroup has no options or positional parameters, and no subgroups` during incremental compilation in Intelli/J IDEA. * [#1127] DOC: Custom ShortErrorMessageHandler manual example should use bold red for error message. * [#1130] DOC: Clarify how to run picocli-based applications. * [#1131] DOC: Add anchor links before section titles in user manual. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.4.0 The picocli community is pleased to announce picocli 4.4.0. This release contains over 45 bugfixes, enhancements, and new features. A major new feature in this release is support for abbreviated options and subcommands. When abbreviations are enabled, users can specify the initial letter(s) of the first "component" and optionally of one or more subsequent components of an option or subcommand name. "Components" are parts of a name, separated by `-` dash characters or by upper/lower case. So for example, both `--CamelCase` and `--kebab-case` have two components. For details see the [New and Noteworthy](#4.4.0-new) section below. Another important change are parser fixes and improvements: the parser will no longer assign values that match an option name to options that take a parameter, unless the value is in quotes. Also, values that resemble, but not exactly match, option names are now treated more consistently and parser behaviour for such values is configurable. Also worth hightlighting: from this release, the `ManPageGenerator` tool can be used as a subcommand in your application. This release has many more improvements for customizing the usage help message, JANSI fixes, and other bugfixes and improvements. See the [Fixed Issues](#4.4.0-fixes) list for details. This is the seventy-first public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.4.0-new) * [Abbreviated Options and Subcommands](#4.4.0-abbreviated-options-and-commands) * [Parser Fixes and Improvements](#4.4.0-parser) * [ManPageGenerator as Subcommand in Your App](#4.4.0-gen-manpage-subcommand) * [Fixed issues](#4.4.0-fixes) * [Deprecations](#4.4.0-deprecated) * [Potential breaking changes](#4.4.0-breaking-changes) ## New and Noteworthy ### Abbreviated Options and Subcommands Since picocli 4.4, the parser can recognize abbreviated options and subcommands. This needs to be enabled explicitly with `CommandLine::setAbbreviatedOptionsAllowed` and `CommandLine::setAbbreviatedSubcommandsAllowed`. #### Recognized Abbreviations When abbreviations are enabled, users can specify the initial letter(s) of the first component and optionally of one or more subsequent components of an option or subcommand name. "Components" are separated by `-` dash characters or by case, so for example, both `--CamelCase` and `--kebab-case` have two components. NOTE: When case sensitivity is disabled, only the `-` dash character can be used to separate components. Examples of valid abbreviations: ``` Option or Subcommand | Recognized Abbreviations -------------------- | ------------------------ --veryLongCamelCase | --very, --vLCC --vCase --super-long-option | --sup, --sLO, --s-l-o, --s-lon, --s-opt, --sOpt some-long-command | so, sLC, s-l-c, soLoCo, someCom ``` #### Ambiguous Abbreviations When the user specifies input that can match multiple options or subcommands, the parser throws a `ParameterException`. When applications use the `execute` method, a short error message and the usage help is displayed to the user. For example, given a command with subcommands `help` and `hello`, then ambiguous user input like `hel` will show this error message: ``` Error: 'hel' is not unique: it matches 'hello', 'help' ``` #### Abbreviated Long Options and POSIX Clustered Short Options When an argument can match both a long option and a set of clustered short options, picocli matches the long option. For example: ```java class AbbreviationsAndPosix { @Option(names = "-A") boolean a; @Option(names = "-B") boolean b; @Option(names = "-AaaBbb") boolean aaaBbb; } AbbreviationsAndPosix app = new AbbreviationsAndPosix(); new CommandLine(app).setAbbreviatedOptionsAllowed(true).parseArgs("-AB"); assertTrue(app.aaaBbb); assertFalse(app.a); assertFalse(app.b); ``` When abbreviated options are enabled, user input `-AB` will match the long `-AaaBbb` option, but not the `-A` and `-B` options. ### Parser Fixes and Improvements #### Option Names as Option Values Options that take a parameter previously were able to take option names as the parameter value. From this release, this is no longer possible. The parser will no longer assign values that match an option name to an option, unless the value is in quotes. For example: ```java class App { @Option(names = "-x") String x; @Option(names = "-y") String y; public static void main(String... args) { App app = new App(); new CommandLine(app).setTrimQuotes(true).parseArgs(args); System.out.printf("x='%s', y='%s'%n", app.x, app.y); } } ``` In previous versions of picocli, the above command would accept input `-x -y`, and the value `-y` would be assigned to the `x` String field. From this release, the above input will be rejected with an error message indicating that the `-x` option requires a parameter. If it is necessary to accept values that match option names, these values need to be quoted. For example: ``` java App -x="-y" ``` This will print the following output: ``` x='-y', y='null' ``` #### Vararg Positional Parameters No Longer Consume Unmatched Options Vararg positional arguments no longer consume unmatched options unless configured to do so. For example: ```java class App { @Parameters(arity = "*") String[] positionals; } ``` In previous versions of picocli, the parser behaviour was not consistent: * input `-z 123` would be rejected with error `"Unmatched argument: '-z'` * input `123 -z` would be accepted and the `positionals` String array would contain two values, `123` and `-z` (Note that this problem only occurred with multi-value positional parameters defined with variable arity: `arity = "*"`.) From this release, both of the above input sequences will be rejected with an error message indicating that `-z` is an unknown option. As before, to accept such values as positional parameters, call `CommandLine::setUnmatchedOptionsArePositionalParams` with `true`. #### Configure Whether Options Should Consume Unknown Options By default, options accept parameter values that "resemble" (but don't exactly match) an option. This release introduces a `CommandLine::setUnmatchedOptionsAllowedAsOptionParameters` method that makes it possible to configure the parser to reject values that resemble options as option parameters. Setting it to `false` will result in values resembling option names being rejected as option values. For example: ```java class App { @Option(names = "-x") String x; } ``` By default, a value like `-z`, which resembles an option, is accepted as the parameter for `-x`: ```java App app = new App(); new CommandLine(app).parseArgs("-x", "-z"); assertEquals("-z", app.x); ``` After setting the `unmatchedOptionsAllowedAsOptionParameters` parser option to `false`, values resembling an option are rejected as parameter for `-x`: ```java new CommandLine(new App()) .setUnmatchedOptionsAllowedAsOptionParameters(false) .parseArgs("-x", "-z"); ``` This will throw an `UnmatchedArgumentException` with message: ``` "Unknown option '-z'; Expected parameter for option '-x' but found '-z'" ``` NOTE: Negative numbers are not considered to be unknown options, so even when `unmatchedOptionsAllowedAsOptionParameters` is set to `false`, option parameters like `-123`, `-NaN`, `-Infinity`, `-#ABC` and `-0xCAFEBABE` will not be rejected for resembling but not matching an option name. ### ManPageGenerator as Subcommand in Your App From picocli 4.4, the `ManPageGenerator` tool can be used as a subcommand in your application, with the usual syntax: ``` import picocli.codegen.docgen.manpage.ManPageGenerator; @Command(subcommands = ManPageGenerator.class) ... ``` To use the `ManPageGenerator` tool as a subcommand, you will need the `picocli-codegen` jar in your classpath. ## Fixed issues * [#10][#732][#1047] API: Support abbreviated options and commands. Thanks to [NewbieOrange](https://github.com/NewbieOrange) for the pull request. * [#639] API: Add method `CommandLine::is/setUnmatchedOptionsAllowedAsOptionParameters` to disallow option parameter values resembling option names. Thanks to [Peter Murray-Rust ](https://github.com/petermr) for raising this. * [#1074][#1075] API: Added method `ParseResult::expandedArgs` to return the list of arguments after `@-file` expansion. Thanks to [Kevin Bedi](https://github.com/mashlol) for the pull request. * [#1052] API: Show/Hide commands in usage help on specific conditions. Thanks to [Philippe Charles](https://github.com/charphi) for raising this. * [#1088] API: Add method `Help::allSubcommands` to return all subcommands, including hidden ones. Clarify the semantics of `Help::subcommands`. * [#1090] API: Add methods `Help::optionListExcludingGroups` to return a String with the rendered section of the usage help containing only the specified options, including hidden ones. * [#1092] API: Add method `Help::parameterList(List)` to return a String with the rendered section of the usage help containing only the specified positional parameters, including hidden ones. * [#1093] API: Add method `Help::commandList(Map)` to return a String with the rendered section of the usage help containing only the specified subcommands, including hidden ones. * [#1091] API: Add method `Help::optionListGroupSections` to return a String with the rendered section of the usage help containing only the option groups. * [#1089] API: Add method `Help::createDefaultOptionSort` to create a `Comparator` that follows the command and options' configuration. * [#1084][#1094] API: Add method `Help::createDefaultLayout(List, List, ColorScheme)` to create a layout for the specified options and positionals. * [#1087] API: Add methods `ArgumentGroupSpec::allOptionsNested` and `ArgumentGroupSpec::allPositionalParametersNested`. * [#1086] API: add methods `Help.Layout::addAllOptions` and `Help.Layout::addAllPositionals`, to show all specified options, including hidden ones. * [#1085] API: Add method `Help::optionSectionGroups` to get argument groups with a header. * [#1101] API: Add method `Help::createDetailedSynopsisOptionsText` to specify which options to show in the synopsis. * [#1061] API: Add method `Help::makeSynopsisFromParts` for building complex synopsis strings; synopsis now shows non-group options before argument groups, for a more natural synopsis when groups contain only positional parameters. * [#983] Allow making inherited options hidden on subcommands. This can now be accomplished with the new `Help` methods by providing a custom option list and customizing the synopsis. * [#1051][#1056] Enhancement: `GenerateCompletion` command no longer needs to be a direct subcommand of the root command. Thanks to [Philippe Charles](https://github.com/charphi) for the pull request. * [#1083] Enhancement: `@Command`-annotated methods no longer need the enclosing class to have a `@Command` annotation. * [#1068] Enhancement: Make `ParserSpec::toString` output settings in alphabetic order. * [#1069] Enhancement: Debug output should show `optionsCaseInsensitive` and `subcommandsCaseInsensitive` settings. * [#1070] Enhancement: Code cleanup: removed redundant modifiers and initializations, unused variables, incorrect javadoc references, and more. Thanks to [NewbieOrange](https://github.com/NewbieOrange) for the pull request. * [#1096] Enhancement: Override `Help.Column` `equals`, `hashCode` and `toString` methods to facilitate testing. * [#1106] Enhancement: First check if JANSI is explicitly disabled _without loading any JANSI classes_, to avoid JANSI extracting a DLL to the temporary folder when one of its classes is loaded. This avoids problems where AppLocker can forbid loading of non-signed libraries from the Windows temporary folder. Thanks to [Philippe Charles](https://github.com/charphi) for raising this. * [#1110] Enhancement: Fix broken javadoc links, fix Kotlin compiler warnings, bump to latest Kotlin and Scala versions. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1109][#1112] Enhancement: Fix `ManPageGenerator` to ensure generated AsciiDoc man pages use UTF-8 encoding. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1063][#1064] `ManPageGenerator` now correctly excludes hidden options, parameters, and subcommands from man page generation. Thanks to [Brian Demers](https://github.com/bdemers) for the pull request. * [#1103] Enhancement: Tests no longer fail under Cygwin/ConEmu due to ANSI in output. Thanks to [David Walluck](https://github.com/dwalluck) for raising this. * [#1055] Bugfix: The parser will no longer assign values that match an option name to options that take a parameter, unless the value is in quotes. Thanks to [waacc-gh](https://github.com/waacc-gh) for raising this. * [#1015] Bugfix: Parser improvement: varargs positional arguments no longer consume unmatched options unless `unmatchedOptionsArePositionalParams` is configured. Thanks to [Chris Smowton](https://github.com/smowton) for raising this. * [#1071] Bugfix: Usage help no longer renders options header when it is specified via `optionListHeading` when all options are hidden. * [#1076] Bugfix: Don't generate Autocomplete for hidden commands. Thanks to [power721](https://github.com/power721) for raising this. * [#1081] Bugfix: `CommandLine.Help` constructor no longer calls overridable methods `addAllSubcommands` and `createDefaultParamLabelRenderer`. * [#1065] Bugfix: With a `List<>` option in `@ArgGroup`, group incorrectly appears twice in the synopsis. Thanks to [kap4lin](https://github.com/kap4lin) for raising this. * [#1067] Bugfix: `ParserSpec::initFrom` was not copying `useSimplifiedAtFiles`. * [#1054] Bugfix: Fixed issue in argument group parsing where incorrect input with missing mandatory elements was accepted when an option was specified multiple times. Thanks to [waacc-gh](https://github.com/waacc-gh) for raising this. * [#1072] Bugfix: Mixin `UsageMessageSpec::width` and `UsageMessageSpec::longOptionsMaxWidth` is no longer ignored. * [#1100] Bugfix: The factory of the original `CommandSpec` is now correctly used in the `CommandSpec` copy for repeatable subcommands. Thanks to [Michael Kunz](https://github.com/protogenes) for the pull request. * [#1058][#1059] DOC: Man page generator: fix incorrect asciidoctor call in synopsis. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1058][#1060] DOC: Man page generator: add documentation about creating language variants. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1120] Clean up compiler warnings. * [#1073] DOC: Improve user manual: fix typos, update content. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1102] DOC: Show `descriptionKeys` for `@file` and EndOfOptions (--) delimiter in resource bundles. * [#1116] DOC: Improved Guice example in user manual. Thanks to [H.Sakata](https://github.com/sakata1222) for the pull request. * [#1098][#1117] DOC: Simplify JLine 3 documentation by moving examples for older JLine 3 and picocli to the [picocli wiki](https://github.com/remkop/picocli/wiki/JLine-3-Examples). Thanks to [Kevin Arthur](https://github.com/thetoothpick) for the pull request. * [#1121] DOC: Link to alternative in `@deprecated` Javadoc tag for `Help::addSubcommand`. * [#1099] Dependency Upgrade: Bump JLine to 3.15.0. Thanks to [mattirn](https://github.com/mattirn) for the pull request. ## Deprecations No features were deprecated in this release. ## Potential breaking changes ### Parser Changes The parser behaviour has changed: picocli will no longer assign values that match an option name to options that take a parameter, unless the value is in quotes. Applications that rely on this behaviour need to use quoted values. ### Error Message for Unknown Options Unmatched arguments that look like options now result in an error message `Unknown option: '-unknown'`. Previously, the error message was: `Unmatched argument: '-unknown'`. ### Usage Help: Synopsis for Arg Groups This release changes the synopsis for commands with argument groups: the synopsis now shows the non-group options before argument groups, where previously argument groups were shown first. This gives a more natural synopsis when groups contain only positional parameters. # Picocli 4.3.2 The picocli community is pleased to announce picocli 4.3.2. This release fixes a bug where the stack trace of an exception in the business logic would omit nested cause exceptions. This is the seventieth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.3.2-new) * [Fixed issues](#4.3.2-fixes) * [Deprecations](#4.3.2-deprecated) * [Potential breaking changes](#4.3.2-breaking-changes) ## New and Noteworthy ## Fixed issues * [#1048][#1049] Bugfix: Cause exception not printed by default execution exception handler. Thanks to [Neko Null](https://github.com/jerrylususu) for the pull request. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.3.1 The picocli community is slightly embarrassed to announce picocli 4.3.1. :-) This release fixes some critical bugs: * an `IllegalArgumentException: wrong number of arguments` was thrown when the `@Option(scope = INHERIT)` feature is used in a command that has subcommands defined in `@Command`-annotated methods * a `NullPointerException` was thrown in `DefaultParamLabelRenderer.renderParameterLabel` for programmatically built models that have a non-`null` `split` regex and do not have a `splitSynopsisLabel` * removed call to a `String` method introduced in Java 6, which prevented picocli from running on Java 5 See [Fixed issues](#4.3.1-fixes) for the full list of changes. This is the sixty-ninth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.3.1-new) * [Fixed issues](#4.3.1-fixes) * [Deprecations](#4.3.1-deprecated) * [Potential breaking changes](#4.3.1-breaking-changes) ## New and Noteworthy ## Fixed issues * [#1042] Bugfix: "wrong number of arguments" exception when using inherited options with `@Command`-annotated methods. Thanks to [Garret Wilson](https://github.com/garretwilson) for raising this. * [#1043] Bugfix: NullPointerException thrown in `DefaultParamLabelRenderer.renderParameterLabel` for programmatically built models that have a non-`null` `split` regex and do not have a `splitSynopsisLabel`. * [#1044] Bugfix: only display `splitSynopsisLabel` in usage help message if the option has a `split` regex. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. * [#1045] Bugfix: replace use of Java 6 API `String.isEmpty` with picocli-internal Java 5 equivalent. * [#1046] DOC: mention picocli's programmatic API and link to the programmatic API documentation from the user manual. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.3.0 The picocli community is pleased to announce picocli 4.3.0. This is a fairly big release with 70 [tickets closed](https://github.com/remkop/picocli/milestone/65?closed=1), and over 50 [bugfixes and enhancements](#4.3.0-fixes). Many thanks to the picocli community who contributed 21 pull requests! A major theme of this release is sharing options between commands: * New feature: "inherited" options. Options defined with `scope = ScopeType.INHERIT` are shared with all subcommands (and sub-subcommands, to any level of depth). Applications can define an inherited option on the top-level command, in one place, to allow end users to specify this option anywhere: not only on the top-level command, but also on any of the subcommands and nested sub-subcommands. * More powerful mixins. Mixin classes can declare a `@Spec(MIXEE)`-annotated field, and picocli will inject the `CommandSpec` of the command _receiving_ this mixin (the "mixee") into this field. This is useful for mixins containing shared logic, in addition to shared options and parameters. Another major theme is improved support for positional parameters: * Automatic indexes for positional parameters. Single-value positional parameters without an explicit `index = "..."` attribute are now automatically assigned an index based on the other positional parameters in the command. One use case is mixins with positional parameters. * Repeatable ArgGroups can now define positional parameters. Other improvements: * The parser now supports case-insensitive mode for options and subcommands. * Error handlers now use ANSI colors and styles. The default styles are bold red for the error message, and italic for stack traces. Applications can customize with the new `Help.ColorScheme` methods `errors` and `stackTraces`. * The usage help message can now show an entry for `--` in the options list with the `@Command(showEndOfOptionsDelimiterInUsageHelp = true)` annotation. * Easily make subcommands mandatory by making the top-level command a class that does not implement `Runnable` or `Callable`. This is the sixty-eighth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.3.0-new) * [Inherited Options](#4.3.0-inherited-options) * [Case-insensitive mode](#4.3.0-case-insensitive) * [Automatic Indexes for Positional Parameters](#4.3.0-auto-index) * [Repeatable ArgGroups with Positional Parameters](#4.3.0-positionals-in-groups) * [`@Spec(MIXEE)` Annotation](#4.3.0-mixee) * [Showing `--` End of Options in usage help](#4.3.0-end-of-options) * [Fixed issues](#4.3.0-fixes) * [Deprecations](#4.3.0-deprecated) * [Potential breaking changes](#4.3.0-breaking-changes) ## New and Noteworthy ### Inherited Options This release adds support for "inherited" options. Options defined with `scope = ScopeType.INHERIT` are shared with all subcommands (and sub-subcommands, to any level of depth). Applications can define an inherited option on the top-level command, in one place, to allow end users to specify this option anywhere: not only on the top-level command, but also on any of the subcommands and nested sub-subcommands. Below is an example where an inherited option is used to configure logging. ```java @Command(name = "app", subcommands = Sub.class) class App implements Runnable { private static Logger logger = LogManager.getLogger(App.class); @Option(names = "-x", scope = ScopeType.LOCAL) // option is not shared: this is the default int x; @Option(names = "-v", scope = ScopeType.INHERIT) // option is shared with subcommands, sub-subcommands, etc public void setVerbose(boolean verbose) { // Configure log4j. // This is a simplistic example: you probably only want to modify the ConsoleAppender level. Configurator.setRootLevel(verbose ? Level.DEBUG : Level.INFO); } public void run() { logger.debug("-x={}", x); } } @Command(name = "sub") class Sub implements Runnable { private static Logger logger = LogManager.getLogger(Sub.class); @Option(names = "-y") int y; public void run() { logger.debug("-y={}", y); } } ``` Users can specify the `-v` option on either the top-level command or on the subcommand, and it will have the same effect. ``` # the -v option can be specified on the top-level command java App -x=3 -v sub -y=4 ``` Specifying the `-v` option on the subcommand will have the same effect. For example: ``` # specifying the -v option on the subcommand also changes the log level java App -x=3 sub -y=4 -v ``` NOTE: Subcommands don't need to do anything to receive inherited options, but a potential drawback is that subcommands do not get a reference to inherited options. Subcommands that need to inspect the value of an inherited option can use the `@ParentCommand` annotation to get a reference to their parent command, and access the inherited option via the parent reference. Alternatively, for such subcommands, sharing options via mixins may be a more suitable mechanism. ### Case-insensitive mode By default, all options and subcommands are case sensitive. Case sensitivity can be switched off globally, as well as on a per-command basis. To toggle case sensitivity for all commands, use the `CommandLine::setSubcommandsCaseInsensitive` and `CommandLine::setOptionsCaseInsensitive` methods. Use the `CommandSpec::subcommandsCaseInsensitive` and `CommandSpec::optionsCaseInsensitive` methods to give some commands a different case sensitivity than others. ### Automatic Indexes for Positional Parameters From this release, when the `index = "..."` attribute is omitted, the default index is `index = "0+"`, which tells picocli to assign an index automatically, starting from zero, based on the other positional parameters defined in the same command. A simple example can look like this: ```java class AutomaticIndex { @Parameters(hidden = true) // "hidden": don't show this parameter in usage help message List allParameters; // no "index" attribute: captures _all_ arguments @Parameters String group; // assigned index = "0" @Parameters String artifact; // assigned index = "1" @Parameters String version; // assigned index = "2" } ``` Picocli initializes fields with the values at the specified index in the arguments array. ```java String[] args = { "info.picocli", "picocli", "4.3.0" }; AutomaticIndex auto = CommandLine.populateCommand(new AutomaticIndex(), args); assert auto.group.equals("info.picocli"); assert auto.artifact.equals("picocli"); assert auto.version.equals("4.3.0"); assert auto.allParameters.equals(Arrays.asList(args)); ``` The default automatic index (`index = "0+"`) for single-value positional parameters is "anchored at zero": it starts at zero, and is increased with each additional positional parameter. Sometimes you want to have indexes assigned automatically from a different starting point than zero. This can be useful when defining Mixins with positional parameters. To accomplish this, specify an index with the anchor point and a `+` character to indicate that picocli should start to automatically assign indexes from that anchor point. For example: ```java class Anchored { @Parameters(index = "1+") String p1; // assigned index = "1" or higher @Parameters(index = "1+") String p2; // assigned index = "2" or higher } ``` Finally, sometimes you want to have indexes assigned automatically to come at the end. Again, this can be useful when defining Mixins with positional parameters. To accomplish this, specify an index with a `+` character to indicate that picocli should automatically assign indexes that come at the end. For example: ```java class Unanchored { @Parameters(index = "+") String penultimate; // assigned the penultimate index in the command @Parameters(index = "+") String last; // assigned the last index in the command } ``` ### Repeatable ArgGroups with Positional Parameters From this release, positional parameters can be used in repeating [Argument Groups](https://picocli.info/#_argument_groups). When a `@Parameters` positional parameter is part of a group, its `index` is the index _within the group_, not within the command. Below is an example of an application that uses a repeating group of positional parameters: ```java @Command(name = "grades", mixinStandardHelpOptions = true, version = "grades 1.0") public class Grades implements Runnable { static class StudentGrade { @Parameters(index = "0") String name; @Parameters(index = "1") BigDecimal grade; } @ArgGroup(exclusive = false, multiplicity = "1..*") List gradeList; @Override public void run() { gradeList.forEach(e -> System.out.println(e.name + ": " + e.grade)); } public static void main(String[] args) { System.exit(new CommandLine(new Grades()).execute(args)); } } ``` Running the above program with this input: ``` Alice 3.1 Betty 4.0 "X Æ A-12" 3.5 Zaphod 3.4 ``` Produces the following output: ``` Alice: 3.1 Betty: 4.0 X Æ A-12: 3.5 Zaphod: 3.4 ``` ### `@Spec(MIXEE)` Annotation From this release, mixins are more powerful. Mixin classes can declare a `@Spec(MIXEE)`-annotated field, and picocli will inject the `CommandSpec` of the command _receiving_ this mixin (the "mixee") into this field. This is useful for mixins containing shared logic, in addition to shared options and parameters. Since picocli 4.3, the `@Spec` annotation has a `value` element. The value is `Spec.Target.SELF` by default, meaning that the `CommandSpec` of the enclosing class is injected into the `@Spec`-annotated field. For classes that are used as a [mixins](https://picocli.info/#_mixins), there is another value that may be useful. When `@Spec(Spec.Target.MIXEE)` is specified in a mixin class, the `CommandSpec` of the command _receiving_ this mixin (the "mixee") is injected into the `@Spec`-annotated field. This can be useful when a mixin contains logic that is common to many commands. For example: ```java import picocli.CommandLine.Option; import picocli.CommandLine.Spec; class AdvancedMixin { @Spec(Spec.Target.MIXEE) CommandSpec mixee; /** * When the -x option is specified on any subcommand, * multiply its value with another integer supplied by this subcommand * and set the result on the top-level command. * @param x the value of the -x option */ @Option(names = "-x") void setValue(int x) { // Get another value from the command we are mixed into. // This mixin requires the command(s) it is mixed into to implement `IntSupplier`. int y = ((java.util.function.IntSupplier) mixee.userObject()).getAsInt(); int product = x * y; // Set the result on the top-level (root) command. // This mixin requires the root command to implement `IntConsumer`. ((java.util.function.IntConsumer) mixee.root().userObject()).accept(product); } } ``` ### Showing `--` End of Options in usage help From picocli 4.3, an entry for the `--` End of Options delimiter can be shown in the options list of the usage help message of a command with the `@Command(showEndOfOptionsDelimiterInUsageHelp = true)` annotation. Example command: ```java @Command(name = "myapp", showEndOfOptionsDelimiterInUsageHelp = true, mixinStandardHelpOptions = true, description = "Example command.") class MyApp { @Parameters(description = "A file.") File file; } ``` The usage help message for this command looks like this: ``` Usage: myapp [-hV] [--] Example command. A file. -h, --help Show this help message and exit. -V, --version Print version information and exit. -- This option can be used to separate command-line options from the list of positional parameters. ``` ## Fixed issues * [#649][#948] Provide convenience API for inherited/global options (was: Feature request: inheriting mixins in subcommands). Thanks to [Garret Wilson](https://github.com/garretwilson) for the request and subsequent discussion (and patience!). * [#1001] Support required inherited options. * [#996] Default values should not be applied to inherited options. * [#985] API: Show end-of-options `--` in usage help options list. * [#958] API: Add `@Spec(Spec.Target.MIXEE)` annotation element to allow mixins to get a reference to the command they are mixed into. * [#960] API: Add method `CommandSpec::root` to return the `CommandSpec` of the top-level command. * [#484][#845][#1008] API: Error handlers now use ANSI colors and styles. Added methods `errors` and `stackTraces` to `Help.ColorScheme`. Thanks to [Neko Null](https://github.com/jerrylususu) for the pull request. * [#765][#1017] API: Added `splitSynopsisLabel` attribute on `@Option` and `@Parameters` for controlling how `split` regular expressions are displayed in the synopsis. Thanks to [Murphy Han](https://github.com/Hannnnnn) for the pull request and thanks to [deining](https://github.com/deining) for raising this. * [#9][#1021][#1020][#1023][#154] API: Added support for case-insensitive subcommands and options. Thanks to [NewbieOrange](https://github.com/NewbieOrange) for the pull request, thanks to [ifsheldon](https://github.com/ifsheldon) for exploring alternative solutions and helping clarify the requirements, and thanks to [Neko Null](https://github.com/jerrylususu) for the pull request with documentation and executable examples. * [#564] Add support for relative indices for positional parameters. Useful in mixins and inherited positional parameters. Thanks to [krisleonard-mcafee](https://github.com/krisleonard-mcafee) for raising this topic. * [#956] Enhancement: Default ParameterExceptionHandler should show stack trace when tracing is set to DEBUG level. * [#952] Enhancement: Make annotation processor quiet by default; add `-Averbose` annotation processor option to enable printing NOTE-level diagnostic messages to the console. * [#959] Enhancement: Print "Missing required subcommand" instead of throwing exception if command with subcommands does not implement `Runnable` or `Callable`. Thanks to [Max Rydahl Andersen](https://github.com/maxandersen) for the suggestion. * [#693][#1009][#1011] Enhancement: Add autocompletion for the built-in `HelpCommand`. Thanks to [NewbieOrange](https://github.com/NewbieOrange) for the pull request. * [#1022][#1029] Enhancement/Bugfix: Duplicate negated options were incorrectly accepted. Thanks to [NewbieOrange](https://github.com/NewbieOrange) for the pull request. * [#1030][#1029] Enhancement/Bugfix: `setOptionsCaseInsensitive` should make negatable options case insensitive. Thanks to [NewbieOrange](https://github.com/NewbieOrange) for the pull request. * [#1027][#1036] Enhancement: Support repeatable ArgGroups with positional parameters. Thanks to [NewbieOrange](https://github.com/NewbieOrange) for the pull request. * [#974] Enhancement/Bugfix: Add support for `@ArgGroup` argument groups in `@Command`-annotated methods. Thanks to [Usman Saleem](https://github.com/usmansaleem) for raising this. * [#962][#961] Enhancement/Bugfix: Default value should only be applied if value is missing. Thanks to [粟嘉逸](https://github.com/sjyMystery) and [chirlo](https://github.com/chirlo) for raising this. * [#995][#1024][#1035] Enhancement/Bugfix: Reset multi-value options/positional params to initial value when reusing `CommandLine` instances. Thanks to [Linyer-qwq](https://github.com/Linyer-qwq), [WU Jiangning](https://github.com/licia-tia), and [Wycers](https://github.com/Wycers) for the pull request. * [#991][#993] Enhancement/Bugfix: Detecting terminal width fails on non-English Windows versions. Thanks to [Stefan Gärtner](https://github.com/S-Gaertner) for the pull request. * [#1040] Enhancement: internal code cleanup and minor fixes. Thanks to [NewbieOrange](https://github.com/NewbieOrange) for the pull request. * [#987] Bugfix: Bump JLine to 3.14.1 and fix [#969] autocompletion in Picocli Shell JLine3. Thanks to [mattirn](https://github.com/mattirn) for the pull request. * [#969] Bugfix: Fixed broken autocompletion for nested subcommands in Picocli Shell JLine3. Thanks to [niklas97](https://github.com/niklas97) for raising this. * [#968] Bugfix: Avoid creating user object in Help constructor. Thanks to [Immueggpain](https://github.com/Immueggpain) for raising this. * [#990] Bugfix: Options in subcommands were not reset to their initial value between invocations when the `CommandLine` object is reused. Thanks to [marinier](https://github.com/marinier) for [pointing this out](https://stackoverflow.com/questions/61191211). * [#984][#997] Bugfix: Parameters heading is now shown in the usage help message when `@filename` is the only parameter. Thanks to [Wycer](https://github.com/Wycers) for the pull request. * [#1004] Bugfix: Prevent `NullPointerException` in `IParameterConsumer` with `@Option` in `@ArgGroup`. Thanks to [masupilami](https://github.com/masupilami) for raising this. * [#988][#1002] Bugfix: Option group sections in the usage help message now include subgroup options. Thanks to [Wycer](https://github.com/Wycers) for the pull request. * [#957] Bugfix: Debug tracing now shows variable value instead of variable name. * [#955] Bugfix: TargetInvocationMessage handling in `MethodBinding.set` methods should use `getTargetException` not `getCause`; better error reporting. * [#1007] Bugfix: Custom Type Converters are missing for repeated subcommands. Thanks to [Bastian Diehl](https://github.com/diba1013) for raising this. * [#1026] Bugfix: Hidden options should not impact usage help. * [#1034] Bugfix: Writer should `flush()` in `UnmatchedArgumentException.printSuggestions`. Thanks to [darkmoonka](https://github.com/darkmoonka) for raising this. * [#963] DOC: Fixed broken link in README. Thanks to [vladimirf7](https://github.com/vladimirf7) for the pull request. * [#895] DOC: Added [Initialization Before Execution](https://picocli.info/#_initialization_before_execution) section on initialization with subcommands to the user manual. Thanks to [Walter Scott Johnson](https://github.com/li-wjohnson) for raising this. * [#951] DOC: Fixed typo in `picocli-codegen` annotation processor documentation: `disable.resource.config` is correct (the option name was incorrectly spelled as `disable.resources.config`). Thanks to [Max Rydahl Andersen](https://github.com/maxandersen) for raising this. * [#966] DOC: Add section about Testing to the user manual. * [#973] DOC: Update documentation for using the `picocli-codegen` annotation processor during the build with Kotlin. * [#972] DOC: Add section "Handling Invalid Input" for custom type converters to user manual, demonstrating `TypeConversionException`. Add example `InetSocketAddressConverter` to `picocli-examples`. Thanks to [Simon](https://github.com/sbernard31) for raising this. * [#975] DOC: Update user manual [Annotation Processor](https://picocli.info/#_enabling_the_annotation_processor) section to use `${project.groupId}` instead of deprecated `${groupId}`. Thanks to [Dmitry Timofeev](https://github.com/dmitry-timofeev) for the pull request. * [#976] DOC: Update user manual Testing section; add subsection on [Testing Environment Variables](file:///C:/Users/remko/IdeaProjects/picocli3/build/docs/html5/index.html#_testing_environment_variables). Thanks to [David M. Carr](https://github.com/davidmc24) for raising this and providing a [sample project](https://github.com/remkop/picocli/files/4359943/bulk-scripts-public.zip). * [#979][#981] DOC: Update user manual: add section [Options with an Optional Parameter](https://picocli.info/#_options_with_an_optional_parameter). Thanks to [razvanh](https://github.com/razvanh), [Jake](https://github.com/kyeo138) and [mohdpasha](https://github.com/mohdpasha) for raising this. * [#989] DOC: Update examples for `picocli-shell-jline3` prior to and after the [#987][#969] bugfix. Thanks to [Ralf D. Müller](https://github.com/rdmueller) for raising this. * [#998] DOC: Update manual: quote option parameter containing pipe characters in `split` regex for FIX message example. Thanks to [Galder Zamarreño](https://github.com/galderz) and [Max Rydahl Andersen](https://github.com/maxandersen) for raising this and subsequent discussion. * [#1012] DOC: Update user manual: add to ArgGroup limitations. Thanks to [masupilami](https://github.com/masupilami) and [patric-r](https://github.com/patric-r) for raising this and subsequent discussion. * [#1015] DOC: Update user manual: added section Variable Arity Options and Unknown Options. Thanks to [Chris Smowton](https://github.com/smowton) for raising this. * [#1019] DOC: Fix PrintExceptionMessageHandler example. Thanks to [Adam Hosman](https://github.com/hosmanadam) for the pull request. * [#1006] DOC: Add Mixin example: MyLogger to the user manual. * [#1028][#1031] DOC: Update user manual: added Java 15 text blocks example. Thanks to [Enderaoe](https://github.com/Lyther) for the pull request. * [#1037] DOC: Update user manual for programmatic API: fix typo. Thanks to [Yoshida](https://github.com/grimrose) for the pull request. * [#1041] DOC: Fix broken links in javaDoc. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1033] TEST: Added tests for [#984][#997]. Thanks to [WU Jiangning](https://github.com/licia-tia) for the pull request. * [#965] Dependency Upgrade: in `picocli-examples`, bump `hibernate-validator` from 6.0.2 to 6.1.2 to deal with [CVE-2019-10219](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-10219). Thanks to [https://github.com/Security3rd](Security3rd) for raising this. ## Deprecations No features were deprecated in this release. ## Potential breaking changes Behaviour has changed for some cases involving positional parameters. One example is applications that define multiple positional parameters without an explicit `index` (see next section). I hope these are edge cases. Other than that, some error messages and details of the usage help message have changed. See details below. ### Default index for single-value positional parameters Prior to picocli 4.3.0, if your application defines any single-value positional parameters without explicit `index`, these parameters would all point to index zero. From picocli 4.3.0, picocli automatically assigns an index, so the first such parameter gets index `0` (zero), the next parameter gets index `1` (one), the next parameter gets index `2` (two), etc. This may break applications that have multiple single-value positional parameters without explicit `index`, that expect to capture the first argument in all of these parameters. ### Different error when user specifies too many parameters The error message has changed when a user specifies more positional parameters than the program can accept. For example: ```java class SingleValue { @Parameters String str; } ``` This program only accepts one parameter. What happens when this program is invoked incorrectly with two parameters, like this: ```java java SingleValue val1 val2 ``` Before this release, picocli would throw an `OverwrittenOptionException` with message `"positional parameter at index 0..* () should be specified only once"`. From picocli 4.3, picocli throws an `UnmatchedArgumentException` with message `"Unmatched argument at index 1: 'val2'"`. This may break applications that have error handling that depends on an `OverwrittenOptionException` being thrown. ### Different mechanism for dealing with too many parameters Continuing with the previous example, before this release, applications could deal with this by allowing single-value options to be overwritten: ```java // before CommandLine cmd = new CommandLine(new SingleValue()); cmd.setOverwrittenOptionsAllowed(true); // ... ``` From picocli 4.3, applications need to allow unmatched arguments instead: ```java // after CommandLine cmd = new CommandLine(new SingleValue()); cmd.setUnmatchedArgumentsAllowed(true); // ... // get the invalid values cmd.getUnmatchedArguments(); ``` ### Usage help message for single-value positional parameters Before picocli 4.3.0, single-value positional parameters would incorrectly show an ellipsis (`...`) after their parameter label. This ellipsis is incorrect because it indicates that multiple values can be specified. The ellipsis is no longer shown for single-value positional parameters from picocli 4.3.0. Before: ``` Usage:
PARAM... PARAM... Param description. ``` After: ``` Usage:
PARAM PARAM Param description. ``` This may break application tests that expect a specific usage help message format. ### Different error for missing required options or parameters #### Missing options list now starts with colon, no more square brackets Before: ``` Missing required option '--required=' Missing required options [-a=, -b=, -c=] ``` After: ``` Missing required option: '--required=' Missing required options: '-a=', '-b=', '-c=' ``` #### Better message when both options and positional parameters are missing Before: ``` Missing required options [-x=, params[0]=, params[1]=] ``` After: ``` Missing required options and parameters: '-x=', '', '' ``` #### Missing positional parameters are now quoted Before: ``` Missing required parameter: Missing required parameters: , ``` After: ``` Missing required parameter: '' Missing required parameters: '', '' ``` # Picocli 4.2.0 The picocli community is pleased to announce picocli 4.2.0. This release adds support for Repeatable Subcommands: when a command is marked as `@Command(subcommandsRepeatable = true)` it becomes possible to specify that command's subcommands multiple times on the command line. The `picocli-codegen` module can now generate AsciiDoc documentation for picocli-based applications. AsciiDoc is a lightweight markup language that can easily can be converted to unix man pages, HTML and PDF with the wonderful [asciidoctor](https://asciidoctor.org/docs/user-manual/#man-pages) tool. From this release, subcommands are not instantiated until they are matched on the command line. This should improve the startup time for applications with subcommands that do a lot of initialization when they are instantiated. Autocompletion improvements: from this release the generated bash completions scripts support completing positional parameters, and are implemented without the use of associative arrays (so they should work on MacOS or other systems that use older versions of bash). Additionally there are now automated tests using Expect to verify that the generated completion scripts work as expected. GraalVM configuration generation improvement: added `--factory` option to `ReflectionConfigGenerator`, `ResourceConfigGenerator` and `DynamicProxyConfigGenerator`. This makes it possible to generate configurations for command classes without a default no-arg constructor. From this release it is possible to inject the `CommandSpec` into a `IVersionProvider`, making it easier to write version provider implementations that are reusable across multiple commands or even applications. Similarly, from this release it is possible to inject the parent command object into mixins via a `@ParentCommand`-annotated field. This release adds programmatic API to allow the long options column to grow larger than 20 characters in the usage help message via the `CommandLine::setLongOptionsMaxWidth` and `UsageMessageSpec::longOptionsMaxWidth` methods. Finally, it is now possible let the usage help show that [@-files](https://picocli.info/#AtFiles) are supported by listing a `@` entry above the list of positional parameters in the usage help. This is the sixty-seventh public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.2.0-new) * [Generate AsciiDoc Documentation for Your Application](#4.2.0-generate-docs) * [Repeatable Subcommands](#4.2.0-repeatable-subcommands) * [Inject `CommandSpec` into a `IVersionProvider`](#4.2.0-versionprovider-with-spec) * [Subcommands are now lazily instantiated](#4.2.0-lazy-instantiation) * [Mixins with `@ParentCommand`-annotated fields](#4.2.0-mixins) * [Showing `@filename` in usage help](#4.2.0-atfiles-usage) * [Configurable long options column width](#4.2.0-long-options-width) * [Fixed issues](#4.2.0-fixes) * [Deprecations](#4.2.0-deprecated) * [Potential breaking changes](#4.2.0-breaking-changes) ## New and Noteworthy ### Generate AsciiDoc Documentation for Your Application (convertable to unix man pages, HTML and PDF) This release adds a new class `picocli.codegen.docgen.manpage.ManPageGenerator` to the `picocli-codegen` module that generates AsciiDoc documentation for picocli-based applications using the `manpage` doctype and manpage document structure. The generated AsciiDoc files can be converted to HTML, PDF and unix man pages with the [asciidoctor](https://asciidoctor.org/docs/user-manual/#man-pages) tool. The [`picocli-codegen` README](https://github.com/remkop/picocli/blob/master/picocli-codegen/README.adoc) has more details. ### Repeatable Subcommands From picocli 4.2, it is possible to specify that a command's subcommands can be specified multiple times by marking it with `@Command(subcommandsRepeatable = true)`. #### Example Below is an example where the top-level command `myapp` is marked as `subcommandsRepeatable = true`. This command has three subcommands, `add`, `list` and `send-report`: ```java @Command(name = "myapp", subcommandsRepeatable = true) class MyApp implements Runnable { @Command void add(@Option(names = "-x") String x, @Option(names = "-w") double w) { ... } @Command void list(@Option(names = "--where") String where) { ... } @Command(name = "send-report") void sendReport(@Option(names = "--to", split = ",") String[] recipients) { ... } // ... } ``` The above example command allows users to specify one or more of its subcommands multiple time. For example, this would be a valid invocation: ```bash myapp add -x=item1 -w=0.2 \ add -x=item2 -w=0.5 \ add -x=item3 -w=0.7 \ list --where "w>0.2" \ send-report --to=recipient@myorg.com ``` In the above command line invocation, the `myapp` top-level command is followed by its subcommand `add`. Next, this is followed by another two occurences of `add`, followed by `list` and `send-report`. These are all "sibling" commands, that share the same parent command `myapp`. This invocation is valid because `myapp` is marked with `subcommandsRepeatable = true`. #### Repeatable Subcommands Specification Normally, `subcommandsRepeatable` is `false`, so for each command, only one of its subcommands can be specified, potentially followed by only one sub-subcommand of that subcommand, etc. In mathematical terms, a valid sequence of commands and subcommands can be represented by a _directed rooted tree_ that starts at the top-level command. This is illustrated by the diagram below. ![subcommands not repeatable](https://picocli.info/images/subcommands-non-repeatable.png) When `subcommandsRepeatable` is set to `true` on a command, the subcommands of this command may appear multiple times. Also, a subcommand can be followed by a "sibling" command (another command with the same parent command). In mathematical terms, when a parent command has this property, the additional valid sequences of its subcommands form a fully connected subgraph (_a complete digraph_). The blue and green dotted arrows in the diagram below illustrate the additional sequences that are allowed when a command has repeatable subcommands. ![subcommands-repeatable](https://picocli.info/images/subcommands-repeatable2.png) Note that it is not valid to specify a subcommand followed by its parent command: ```bash # invalid: cannot move _up_ the hierarchy myapp add -x=item1 -w=0.2 myapp ``` ### Subcommands are now lazily instantiated From this release, subcommands are not instantiated until they are matched on the command line, unless the user object has a `@Spec` or `@ParentObject`-annotated field; these are instantiated during initialization. ### Injecting `CommandSpec` Into a `IVersionProvider` From this release, `IVersionProvider` implementations can have `@Spec`-annotated fields. If such a field exists, picocli will inject the `CommandSpec` of the command that uses this version provider. This gives the version provider access to the full command hierarchy, and may make it easier to implement version providers that can be reused among multiple commands. For example: ```java class MyVersionProvider implements IVersionProvider { @Spec CommandSpec spec; public String[] getVersion() { return new String[] { "Version info for " + spec.qualifiedName() }; } } ``` ### Showing `@filename` in usage help From picocli 4.2, an entry for `@` can be shown in the options and parameters list of the usage help message of a command with the `@Command(showAtFileInUsageHelp = true)` annotation. Example: ```java @Command(name = "myapp", showAtFileInUsageHelp = true, mixinStandardHelpOptions = true, description = "Example command.") class MyApp { @Parameters(description = "A file.") File file; } ``` The usage help message for this command looks like this: ``` Usage: myapp [-hV] [@...] Example command. [@...] One or more argument files containing options. A file. -h, --help Show this help message and exit. -V, --version Print version information and exit. ``` By default, the `@` entry is shown before the positional parameters in the synopsis as well as in the parameters list. This can be changed with the Help API for [reordering sections](https://picocli.info/#_reordering_sections). Both the label and the description of the `@` entry have been defined with [custom variables](https://picocli.info/#_custom_variables), to allow applications to change the text. The variables are: * `picocli.atfile.label` * `picocli.atfile.description` By setting the above variables in either system properties, environment variables or the [resource bundle](https://picocli.info/#_internationalization) for a command, the text can be customized. See the [user manual](https://picocli.info/#_show_at_files) for examples. ### Mixins with `@ParentCommand`-annotated fields A common use case is sharing options between different levels of the command hierarchy, so that "global" options from the top-level command are also available on subcommands. Since picocli 4.2, [`@ParentCommand`-annotated](https://picocli.info/#_parentcommand_annotation) fields can be used in mixins, which makes this easier. See the [Use Case: Sharing Options](https://picocli.info/#_use_case_sharing_options) section of the user manual for a full example. For mixins that need to be reusable across more than two levels in the command hierarchy, injecting a [`@Spec`-annotated](https://picocli.info/#_spec_annotation) field gives the mixin access to the full command hierarchy. ### Configurable long options column width The default layout shows short options and long options in separate columns, followed by the description column. The width of the long options column shrinks automatically if all long options are very short, but by default this column does not grow larger than 20 characters. If the long option with its option parameter is longer than 20 characters (for example: `--output=`), the long option overflows into the description column, and the option description is shown on the next line. This (the default) looks like this: ``` Usage: myapp [-hV] [-o=] -h, --help Show this help message and exit. -o, --output= Output location full path. -V, --version Print version information and exit. ``` From picocli 4.2, there is programmatic API to change this via the `CommandLine::setLongOptionsMaxWidth` and `UsageMessageSpec::longOptionsMaxWidth` methods. In the above example, if we call `commandLine.setLongOptionsMaxWidth(23)` before printing the usage help, we get this result: ``` Usage: myapp [-hV] [-o=] -h, --help Show this help message and exit. -o, --output= Output location full path. -V, --version Print version information and exit. ``` ## Fixed issues * [#454] API: Added support for repeatable subcommands. Thanks to [Idan Arye](https://github.com/idanarye), [Miroslav Kravec](https://github.com/kravemir), [Philipp Hanslovsky](https://github.com/hanslovsky) and [Jay](https://github.com/lakemove) for raising this and the subsequent discussion. * [#629] API: Support injecting `@Spec CommandSpec spec` into `IVersionProvider` implementations. Thanks to [Garret Wilson](https://github.com/garretwilson) for raising this. * [#795] API: Added `@Command(showAtFileInUsageHelp=true)` attribute to show `@filename` in usage help. * [#925] API: Support `@ParentCommand`-annotated fields in mixin classes. * [#936] API: Change visibility of `Help.subcommands()` method from protected to public. * [#459] API: Generate manpage documentation. Thanks to [Miroslav Kravec](https://github.com/kravemir) for raising this. The `picocli-codegen` module can now generate AsciiDoc documentation that uses the `manpage` doctype and adheres to the manpage document structure so it can be converted to unix man pages in troff format with the [asciidoctor](https://asciidoctor.org/docs/user-manual/#man-pages) tool. * [#299] API: Generate AsciiDoc documentation. Thanks to [Philippe Charles](https://github.com/charphi) for raising this. Added a new class `picocli.codegen.docgen.manpage.ManPageGenerator` to the `picocli-codegen` module that generates AsciiDoc documentation using the `manpage` doctype and manpage document structure. Custom markup like `@|bold mytext|@`, `@|italic mytext|@` etc., originally intended to be converted to ANSI escape codes, can from this release also be converted to custom markup like `mytext` and `mytext` in HTML, or `*mytext*` and `_mytext_` in lightweight markup languages like AsciiDoc. Applications can control this by setting a `ColorScheme` with a custom markup map. This ticket resulted in the following additional methods: `ColorScheme::text`, `ColorScheme::string`, `ColorScheme::customMarkupMap`, `ColorScheme::parse`, `ColorScheme::resetStyle`, `ColorScheme::apply`, `ColorScheme.Builder::customMarkupMap` (getter and setter) and a new `picocli.CommandLine.Help.Ansi.Text(String, ColorScheme)` constructor. The `picocli.CommandLine.Help.Ansi::apply` method is now deprecated in favor of `ColorScheme::apply`. * [#906] Auto-completion: Added automated tests for picocli-generated bash/zsh completion scripts. * [#468][#505][#852] Auto-completion: added support for positional parameter completion. Thanks to [Serhii Avsheniuk](https://github.com/avshenuk) for the pull request. * [#644][#671] Auto-completion: fix [shellcheck](https://github.com/koalaman/shellcheck) warnings in generated autocompletion scripts. Thanks to [Dylan Cali](https://github.com/calid) for raising this, and thanks to [AlcaYezz](https://github.com/AlcaYezz) for the pull request. * [#396] Auto-completion: completion scripts no longer use associative arrays, and should now work on OSX. * [#934] Enhancement: Make long options column width configurable. Thanks to [tomerz90](https://github.com/tomerz90) for raising this. * [#930] Enhancement: Add `--factory` option to `ReflectionConfigGenerator`, `ResourceConfigGenerator` and `DynamicProxyConfigGenerator`. Thanks to [Santiago Acosta](https://github.com/hanzo2001) for raising this. * [#690] Enhancement: Postpone instantiating subcommands until they are matched on the command line. Thanks to [Daniel Breitlauch](https://github.com/danielBreitlauch) for raising this. * [#942] Enhancement: Show at files in usage help for picocli built-in commands. * [#941] Enhancement: Allow default values for predefined variables. * [#926] Enhancement: Clarify debug trace output when adding aliases. * [#928] Enhancement: Improve debug tracing: show command user object identity hashcode and prefix "Processing argument..." with argument index. * [#920] Enhancement: Reduce `DEBUG` tracing noise if no resource bundle is set. * [#946] Enhancement: Add `--exit` option to picocli codegen utilities. * [#940] Bugfix: ArgGroups with a negatable option no longer cause a `NullPointerException` during initialization. * [#938] Bugfix: ArgGroups validation now correctly reports an error when a required option is missing, while an optional subgroup is present. Thanks to [Trent Mohay](https://github.com/rain-on) for raising this. * [#933] Bugfix: Incorrect error message when multiple exclusive groups are used. Thanks to [Mikaël Barbero](https://github.com/mbarbero) for raising this. * [#905] Bugfix: non-public `@Command`-annotated methods without arguments caused a `IllegalAccessException`. From this release such methods no longer need to be public. Thanks to [David Connelly](https://github.com/dconnelly) for raising this. * [#924] Bugfix: `CommandSpec.mixinAnnotatedElements` map should be initialized when discovering `@Mixin`-annotated fields and methods via reflection. * [#937] Bugfix: `Text.getStyledChars` no longer incorrectly inserts ANSI escape chars into the next line prefix when lines are broken. * [#945] Bugfix: `Text.substring` now leaves out `StyledSection` instances that do not apply. * [#944] DOC: Fix typo in picocli user manual - remove unnecessary semicolon. Thanks to [ztbx](https://github.com/ztbx) for raising this. * [#943] DOC: Create man pages for built-in picocli commands. * [#929] DOC: Add [jbang](https://github.com/maxandersen/jbang) under [packaging](https://picocli.info/#_packaging_your_application) in the user manual. * [#927] DOC: Show current picocli version in the Spring Boot section of the user manual. Thanks to [Christian Grobmeier](https://github.com/grobmeier) for the pull request. * [#919] DOC: Added example Gradle project with Kotlin and Graal Native Image. Thanks to [OndrejMalek](https://github.com/OndrejMalek) for the pull request. * [#918] DOC: Added more Scala examples. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#916] DOC: Added Scala examples. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#914] DOC: Added Java and Kotlin examples for using `ResourceBundle` to internationalize and localize your CLI app. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#915] DOC: Ensure Kotlin examples compile correctly. Thanks to [Andreas Deininger](https://github.com/deining) for the suggestion. * [#913] DOC: Added more Java and Kotlin examples. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#912] DOC: Fixed broken links in javadoc. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#911] DOC: Fixed syntax error in javadoc. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#909] DOC: User manual: minor fixes. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#908] DOC: Fix typo in user manual: Add missing closing curly bracket. Thanks to [Piotrek Å»ygieÅ‚o](https://github.com/pzygielo) for the pull request. * [#907] DOC: Updated and added Kotlin examples. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#910] Dependency Upgrade: Bump Spring Boot dependency to 2.2.2 to allow it to work under Java 13. Thanks to [Stéphane Vanacker](https://github.com/svanacker) for raising this. ## Deprecations * The `picocli.CommandLine.Help.Ansi#apply` method has been deprecated in favor of the `picocli.CommandLine.Help.ColorScheme#apply` method. * The `picocli.CommandLine.Help.TextTable forDefaultColumns(Ansi, int, int)` method has been deprecated in favor of the new `TextTable.forDefaultColumns(ColorScheme, int, int)` method. * The `picocli.CommandLine.Help.TextTable forColumnWidths(Ansi, int...)` method has been deprecated in favor of the new `TextTable.forColumnWidths(ColorScheme, int...)` method. * The `picocli.CommandLine.Help.TextTable forColumns(Ansi, Column...)` method has been deprecated in favor of the new `TextTable.forColumns(ColorScheme, Column...)` method. * The `picocli.CommandLine.Help.TextTable constructor (Ansi, Column[])` has been deprecated in favor of the new `TextTable(ColorScheme, Column...)` constructor. ## Potential breaking changes Annotated command objects are now not instantiated until the command is matched on the command line. Previously all subcommands were instantiated when the top-level command's `CommandLine` was constructed. # Picocli 4.1.4 The picocli community is pleased to announce picocli 4.1.4. This release contains a bugfix for GraalVM users, and minor documentation enhancements. This release fixes a bug in the `picocli-codegen` annotation processor that generates an incorrect `reflect-config.json` file with invalid entries for inner classes of commands in the unnamed package, that are unnecessarily prefixed with a dot. This makes the GraalVM `native-image` generator fail with an error like "Class .Outer$Inner not found". This is the sixty-sixth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.1.4-new) * [Fixed issues](#4.1.4-fixes) * [Deprecations](#4.1.4-deprecated) * [Potential breaking changes](#4.1.4-breaking-changes) ## New and Noteworthy ## Fixed issues [#903] Bugfix: `picocli-codegen` generates invalid reflect-config.json for classes in unnamed package. [#902] DOC: replace deprecated `CommandLine.invoke()` function. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.1.3 The picocli community is pleased to announce picocli 4.1.3. This release contains a bugfix for GraalVM users. This release fixes a bug in the `picocli-codegen` annotation processor that generates an incorrect `reflect-config.json` file with duplicate entries for inner classes of a command, one with the standard class name and one with the canonical class name. This makes the GraalVM `native-image` generator fail with an error like "Class Outer.Inner not found". This is the sixty-fifth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.1.3-new) * [Fixed issues](#4.1.3-fixes) * [Deprecations](#4.1.3-deprecated) * [Potential breaking changes](#4.1.3-breaking-changes) ## New and Noteworthy ## Fixed issues * [#901] Bugfix: `picocli-codegen` generated invalid reflect-config.json for inner classes. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.1.2 The picocli community is pleased to announce picocli 4.1.2. This release contains bugfixes, improvements, and documentation enhancements. This version of picocli requires JLine 3.13.2 or higher and adds a `PicocliCommands` class that provides command descriptions that can be displayed in the terminal status bar via the new JLine `TailTipWidgets` functionality. The built-in `picocli.AutoComplete.GenerateCompletion` (`generate-completion`) subcommand now omits validation of mandatory options in the parent command. "Hidden" subcommands and options are no longer shown as suggestions in unmatched argument usage help or autocompletion scripts. From picocli 4.1.2, all options in an exclusive group are automatically considered required, even if they are not marked as `required = true` in the annotations. Applications using older versions of picocli should mark all options in exclusive groups as required. This is the sixty-fourth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.1.2-new) * [Fixed issues](#4.1.2-fixes) * [Deprecations](#4.1.2-deprecated) * [Potential breaking changes](#4.1.2-breaking-changes) ## New and Noteworthy ### JLine3 JLine has had some interesting improvements in its 3.12 release. This version of picocli requires JLine 3.13.2 or higher and adds a `PicocliCommands` class that provides command descriptions that can be displayed in the terminal status bar via the new JLine `TailTipWidgets` functionality. See the `picocli-shell-jline3` [README](https://github.com/remkop/picocli/tree/master/picocli-shell-jline3) for details. ### Completion The built-in `picocli.AutoComplete.GenerateCompletion` (`generate-completion`) subcommand now omits validation of mandatory options in the parent command. Also, "hidden" subcommands and options are no longer shown as suggestions in unmatched argument usage help or autocompletion scripts. ## Fixed issues * [#888] (API) Added new `PicocliCommands` class to `picocli-shell-jline3` module; bumped `JLine` to 3.13.2. Thanks to [mattirn](https://github.com/mattirn) for the pull request. * [#884] (Bugfix) Built-in `picocli.AutoComplete.GenerateCompletion` (`generate-completion`) subcommand now omits validation of mandatory options in the parent command. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. * [#887] (Bugfix) "Hidden" subcommands and options are no longer shown as suggestions in unmatched argument usage help or autocompletion scripts. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. * [#871] (Bugfix) All options in an exclusive group are now automatically considered `required`, to prevent unexpected results when mixing required and non-required options in exclusive ArgGroups. Thanks to [W Scott Johnson](https://github.com/wjohnson5) for raising this. * [#883] (DOC) Update of Quick Guide. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#889][#885] (DOC) Update of Picocli Programmatic API documentation. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#891] (DOC) Fixed broken links in README. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#892] (DOC) Minor improvements to example app in `picocli-shell-jline3`. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.1.1 The picocli community is pleased to announce picocli 4.1.1. This release contains bugfixes, and documentation enhancements. This is the sixty-third public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.1.1-new) * [Fixed issues](#4.1.1-fixes) * [Deprecations](#4.1.1-deprecated) * [Potential breaking changes](#4.1.1-breaking-changes) ## New and Noteworthy ## Fixed issues * [#880] (Bugfix) Built-in `picocli.AutoComplete.GenerateCompletion` (`generate-completion`) subcommand does not flush, resulting in no output. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. * [#875] (DOC) Fix broken internal links in RELEASE-NOTES for 4.1. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. * [#881] (DOC) Update of Quick Guide to the latest `execute` API. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#874] (DOC) Fix Javadoc issues. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.1.0 The picocli community is pleased to announce picocli 4.1.0. This release contains bugfixes, and enhancements. The library now provides functionality that previously required custom code: [PropertiesDefaultProvider](#4.1.0-propertiesdefaultprovider) - this release includes a built-in default provider allows end users to maintain their own default values for options and positional parameters, which may override the defaults that are hard-coded in the application. [AutoComplete.GenerateCompletion](#4.1.0-completion) - this release includes a built-in `generate-completion` subcommand that end users can use to easily install Bash/ZSH completion for your application. [Help API improvements](#4.1.0-helpapi) make it even easier to add custom sections to the usage help message. This release also includes various bug fixes for [ArgGroups](#4.1.0-arggroups), which were first introduced in picocli 4.0, and are still maturing. This is the sixty-second public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.1.0-new) * [Fixed issues](#4.1.0-fixes) * [Deprecations](#4.1.0-deprecated) * [Potential breaking changes](#4.1.0-breaking-changes) ## New and Noteworthy ### PropertiesDefaultProvider From picocli 4.1, applications can use the built-in `PropertiesDefaultProvider` implementation that loads default values from a properties file. By default, this implementation tries to find a properties file named `.${COMMAND-NAME}.properties` in the user home directory, where `${COMMAND-NAME}` is the name of the command. If a command has aliases in addition to its name, these aliases are also used to try to find the properties file. For example: ```java import picocli.CommandLine.PropertiesDefaultProvider; // ... @Command(name = "git", defaultValueProvider = PropertiesDefaultProvider.class) class Git { } ``` The above will try to load default values from `new File(System.getProperty("user.home"), ".git.properties")`. The location of the properties file can also be controlled with system property `"picocli.defaults.${COMMAND-NAME}.path"` (`"picocli.defaults.git.path"` in this example), in which case the value of the property must be the path to the file containing the default values. The location of the properties file may also be specified programmatically. For example: ```java CommandLine cmd = new CommandLine(new MyCommand()); File defaultsFile = new File("path/to/config/mycommand.properties"); cmd.setDefaultValueProvider(new PropertiesDefaultProvider(defaultsFile)); cmd.execute(args); ``` #### PropertiesDefaultProvider Format The `PropertiesDefaultProvider` expects the properties file to be in the standard java `.properties` https://en.wikipedia.org/wiki/.properties[format]. For options, the key is either the [descriptionKey](https://picocli.info/apidocs/picocli/CommandLine.Option.html#descriptionKey--), or the option's [longest name](https://picocli.info/apidocs/picocli/CommandLine.Model.OptionSpec.html#longestName--), without the prefix. So, for an option `--verbose`, the key would be `verbose`, and for an option `/F`, the key would be `F`. For positional parameters, the key is either the [descriptionKey](https://picocli.info/apidocs/picocli/CommandLine.Parameters.html#descriptionKey--), or the positional parameter's [param label](https://picocli.info/apidocs/picocli/CommandLine.Parameters.html#paramLabel--). End users may not know what the `descriptionKey` of your options and positional parameters are, so be sure to document that with your application. #### Subcommands Default Values The default values for options and positional parameters of subcommands can be included in the properties file for the top-level command, so that end users need to maintain only a single file. This can be achieved by prefixing the keys for the options and positional parameters with their command's qualified name. For example, to give the `git commit` command's `--cleanup` option a default value of `strip`, define a key of `git.commit.cleanup` and assign it a default value: ``` # /home/remko/.git.properties git.commit.cleanup = strip ``` ### AutoComplete.GenerateCompletion This release adds a built-in `generate-completion` subcommand that generates a completion script for its parent command. Example usage: ```java @Command(name = "myapp", subcommands = picocli.AutoComplete.GenerateCompletion.class) static class MyApp { //... } ``` This allows users to install completion for the `myapp` command by running the following command: ```bash source <(myapp generate-completion) ``` ### Autocompletion script improvements The generated completion script itself now enables bash completion in zsh. That means it is no longer necessary to run the below commands in ZSH before sourcing the completion script: ```zsh autoload -U +X compinit && compinit autoload -U +X bashcompinit && bashcompinit ``` ### Help API improvements The new `Help.createHeading(String, Object...)` and `Help.createTextTable(Map)` methods facilitate creating tabular custom Help sections. The below example shows how to add a custom Environment Variables section to the usage help message. ```java // help section keys static final String SECTION_KEY_ENV_HEADING = "environmentVariablesHeading"; static final String SECTION_KEY_ENV_DETAILS = "environmentVariables"; // ... // the data to display Map env = new LinkedHashMap<>(); env.put("FOO", "explanation of foo"); env.put("BAR", "explanation of bar"); env.put("XYZ", "xxxx yyyy zzz"); // register the custom section renderers CommandLine cmd = new CommandLine(new MyApp()); cmd.getHelpSectionMap().put(SECTION_KEY_ENV_HEADING, help -> help.createHeading("Environment Variables:%n")); cmd.getHelpSectionMap().put(SECTION_KEY_ENV_DETAILS, help -> help.createTextTable(env).toString()); // specify the location of the new sections List keys = new ArrayList<>(cmd.getHelpSectionKeys()); int index = keys.indexOf(CommandLine.Model.UsageMessageSpec.SECTION_KEY_FOOTER_HEADING); keys.add(index, SECTION_KEY_ENV_HEADING); keys.add(index + 1, SECTION_KEY_ENV_DETAILS); cmd.setHelpSectionKeys(keys); ``` There are also new convenience methods `Help.fullSynopsis()` and `CommandLine.getHelp()`. ### ArgGroup improvements * ArgGroups with `@Option`-annotated methods no longer fail with `NullPointerException` * ArgGroups now match multiple occurrences of a multi-value `@Option` in the same group instance, and don't create a new group for each occurrence * ArgGroups now don't validate when marked as `validate = false` * ArgGroups now correctly validate that required options are present * Non-validating ArgGroups are now automatically set to be non-exclusive ## Fixed issues * [#841] (API) Add `JniConfigGenerator` to `picocli-codegen` module. * [#865] (API) Add `Help.createHeading(String, Object...)` and `Help.createTextTable(Map)` to facilitate creating tabular custom Help sections. * [#829] (Bugfix) `@ArgGroup` with `@Option`-annotated methods fail with `NullPointerException`. Thanks to [A2 Geek](https://github.com/a2geek) for raising this. * [#828] (Bugfix/enhancement) Subcommands should not be parsed as option values for options with optional parameters. Thanks to [Martin Paljak](https://github.com/martinpaljak) for raising this. * [#811] (Bugfix) `CommandLine.setResourceBundle` did not propagate resource bundle to subcommands recursively. Thanks to [thope](https://github.com/frontfact) for the pull request with the bug fix. * [#850] (Bugfix) `@Mixin`-annotated fields were not included in `reflect-config.json` by `picocli-codegen` annotation processor. Thanks to [Nikolaos Georgiou](https://github.com/ngeor) for raising this. * [#826] (Enhancement) Suppress compiler warning "Supported source version 'RELEASE_6' from annotation processor... less than -source..." in picocli-codegen. * [#815] (Enhancement) `@ArgGroup` should match multiple occurrences of a multi-value `@Option` in the same group instance, not create new group for each occurrence. Thanks to [kacchi](https://github.com/kacchi) for raising this. * [#810] (Bugfix) `@ArgGroup` should not validate when marked as `validate = false`. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. * [#870] (Bugfix) Required options were not validated when mixing required and non-required options in an ArgGroup. Thanks to [W Scott Johnson](https://github.com/wjohnson5) for raising this. * [#868] (Enhancement) Add built-in default value provider implementation `PropertiesDefaultProvider` that loads default values from properties file in home directory or specified location. * [#809] (Enhancement) Add built-in `generate-completion` subcommand that generates a completion script for its parent command. Thanks to [George Gastaldi](https://github.com/gastaldi) for the suggestion. * [#836] (Enhancement) Add convenience methods `Help.fullSynopsis()` and `CommandLine.getHelp()`. * [#833] (Enhancement) Non-validating ArgGroups are now automatically set to be non-exclusive. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. * [#830] (Enhancement) Enum constants can now be matched by their `toString()` as well as their `name()`. Improved error reporting. Thanks to [Henning Makholm](https://github.com/hmakholm) for the pull request. * [#846] (Enhancement) Allow value `tty` for system property `picocli.ansi`: force picocli to emit ANSI escape characters if the process is using an interactive console. * [#772] (Enhancement) Generated completion script should enable bash completion in zsh. Thanks to [Bob Tiernay](https://github.com/bobtiernay-okta) for raising this. * [#480] (DOC) Added a [Handling Errors](https://picocli.info#_handling_errors) subsection to the Executing Commands section of the user manual to show how to customize how your application deals with invalid input or business logic exceptions. * [#813] (DOC) Clarify usage of negatable boolean `@Option` with default value "true". Thanks to [Yann ROBERT](https://github.com/YannRobert) for raising this. * [#814] (DOC) Document how a CLI application can be packaged for distribution. * [#820] (DOC) Update user manual section on ANSI supported platforms: mention Windows Subsystem for Linux under Windows 10. * [#819] (DOC) Update user manual section on Variable Interpolation: improve example, link to this section from other parts of the manual. * [#818] (DOC) Update user manual section on Usage Help API to point to `picocli-examples`. * [#816] (DOC) Update user manual for `IHelpCommandInitializable2`. * [#817] (DOC) Update user manual section on Subcommands for the execute API. * [#809] (DOC) Output completion script as a subcommand of the command itself. Thanks to [George Gastaldi](https://github.com/gastaldi) for the suggestion. * [#456] (DOC) Integrate completion generation into command itself. Thanks to [jvassev](https://github.com/jvassev) for the suggestion. * [#835] (DOC) Document how to create ANSI colored output in an application. * [#847] (DOC) Improve documentation for ANSI colors in Windows. * [#844] (DOC) Clarify when `@ArgGroup`-annotated fields are initialized in user manual. * [#860] (DOC) Fix broken link to GraalVM Native Image section. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#861] (DOC) Fix broken link to `ShowCommandHierarchy` example. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#864] (DOC) Fix code examples in documentation. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#867] (DOC) Update user manual to clarify that the toggling behaviour is no longer the default from picocli 4.0. Thanks to [Linus Fernandes](https://github.com/Fernal73) for raising this. ## Deprecations No features were deprecated in this release. ## Potential breaking changes * From picocli 4.1, subcommands will not be parsed as option values for options with optional parameters. * Enum constants can now be matched by their `toString()` as well as their `name()`. # Picocli 4.0.4 The picocli community is pleased to announce picocli 4.0.4. This release contains a bugfixes and enhancements. GraalVM native image-configuration generation for options or positional parameters with custom type converters or custom parameter consumers now work correctly. Also fixed a bug where validation was performed on `ArgGroup`s even when they were marked as `validate = false`. This is the sixty-first public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.0.4-new) * [Fixed issues](#4.0.4-fixes) * [Deprecations](#4.0.4-deprecated) * [Potential breaking changes](#4.0.4-breaking-changes) ## New and Noteworthy ## Fixed issues * [#803] (Bugfix) Custom `IParameterConsumer` caused native-image to fail. Thanks to [Patrick Plenefisch](https://github.com/byteit101) for raising this. * [#804][#806] (Bugfix) Visit Parameter Consumers when doing GraalVM reflection generation; added test. Thanks to [Patrick Plenefisch](https://github.com/byteit101) for the pull requests. * [#808] (Bugfix) Option-specific `ITypeConverter` class is now correctly included in generated `reflect-config.json`. * [#807] (Bugfix) `ArgGroup` should not validate when marked as `validate = false`. Thanks to [cranphin](https://github.com/cranphin) for the bug report. * [#799] (DOC) Update adoption section in README. * [#805] (DOC) Add example for alphabetically sorting subcommands by subclassing `Help`. Thanks to []() for raising this issue. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.0.3 The picocli community is pleased to announce picocli 4.0.3. This release contains a bugfixes and enhancements. GraalVM native image-configuration generation for picocli commands with argument groups now work correctly. This is the sixtieth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.0.3-new) * [Fixed issues](#4.0.3-fixes) * [Deprecations](#4.0.3-deprecated) * [Potential breaking changes](#4.0.3-breaking-changes) ## New and Noteworthy ## Fixed issues * [#794] (Bugfix) Perform topological sort on ArgGroups in annotation processor before wiring up the model to prevent FATAL ERROR in annotation processor: picocli.CommandLine$InitializationException: ArgGroup has no options or positional parameters, and no subgroups. * [#793] (Bugfix) Argument groups disappear in GraalVM native-image (the generated `reflect-config.json` was missing the `@ArgGroup`-annotated fields). Thanks to [Mike Hearn](https://github.com/mikehearn) for the bug report. * [#787] (Enhancement) Throw `InitializationException` instead of `StackOverflowError` when subcommand is subclass of itself. Thanks to [Peter Murray-Rust](https://github.com/petermr) for raising this. * [#784] (DOC) Update documentation to show custom `IFactory` implementations should fall back to the default factory to enable the creation of collections for `@Option`-annotated methods and fields. * [#788] (DOC) Add link to GitHub examples in user manual Mixins section. Thanks to [Peter Murray-Rust](https://github.com/petermr) for the suggestion. * [#789] (DOC) Add example usage help to the user manual Negatable Options section. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.0.2 The picocli community is pleased to announce picocli 4.0.2. This release contains a bugfixes and enhancements. This is the fifty-ninth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.0.2-new) * [Fixed issues](#4.0.2-fixes) * [Deprecations](#4.0.2-deprecated) * [Potential breaking changes](#4.0.2-breaking-changes) ## New and Noteworthy ## Fixed issues - [#781] Bugfix: Standard help mixin options not added in source order when running on Java 12+. - [#773] Bugfix: Add public `NativeImageConfigGeneratorProcessor` constructor to fix build error in IntelliJ IDEA 2019.2. Thanks to [Lukáš Petrovický](https://github.com/triceo) for raising this issue. - [#779] Bugfix: `DuplicateOptionAnnotationsException` when a nested group is defined inside a mixin. Thanks to [Matteo Melli](https://github.com/teoincontatto) for the bug report. - [#777] Bugfix: Codegen failed when command contains field with argGroup annotation. Thanks to [eomeara](https://github.com/eomeara) for the bug report. - [#776] Bugfix: Argument groups in mixins were ignored. Thanks to [Matteo Melli](https://github.com/teoincontatto) for the bug report. - [#780] (DOC) Fixed the provided flag usage in the `picocli-codegen` readme. Thanks to [Lasantha Kularatne](https://github.com/lasanthak) for the pull request. - [#778] (DOC) Improve documentation for argument group sections in the help. Thanks to [Matteo Melli](https://github.com/teoincontatto) for raising this. - [#774] (DOC) Add example demonstrating how to left-align long options in the usage help. - [#766] (DOC) Update user manual: mention the dependency required for using `PicocliSpringFactory`. Thanks to [rome-legacy](https://github.com/rome-legacy) for the suggestion. - [#775] (DOC) Document jline2 incompatibility with picocli's `interactive` options for passwords, and update the example to show a workaround. Thanks to [querqueq](https://github.com/querqueq) for the pull request. - [#770][#771] (DOC) Improve example code in `picocli-spring-boot-starter` README. Thanks to [Stéphane Nicoll](https://github.com/snicoll) for the pull requests. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.0.1 The picocli community is pleased to announce picocli 4.0.1. This release contains a fix for a bug in the annotation processor that causes a compilation error when a subcommand contains a `@Mixin`-annotated field or method. This is the fifty-eighth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.0.1-new) * [Fixed issues](#4.0.1-fixes) * [Deprecations](#4.0.1-deprecated) * [Potential breaking changes](#4.0.1-breaking-changes) ## New and Noteworthy ## Fixed issues - [#769] Annotation processor fails on subcommands with mixins. Thanks to [MortronMeymo](https://github.com/MortronMeymo) for the bug report. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.0.0 GA The picocli community is pleased to announce picocli 4.0. This is a big release. First, the `picocli-codegen` module now includes an [annotation processor](#4.0.0-annotation-processor) that instantly enables your JAR for GraalVM native images. It also gives compile-time errors for invalid annotations and attributes. We recommend that all projects using picocli enable this annotation processor. The [`execute` API](#4.0.0-execute) is an easy way to execute your command with almost no code. It allows for more flexible configuration than previous APIs, and introduces much improved exit code support. This replaces the static methods `call` and `run`, as well as the `parseWithHandlers` methods, which are now deprecated. Improved Spring support: the new [`picocli-spring-boot-starter` module](#4.0.0-spring-boot) includes a `PicocliSpringFactory` and auto-configuration to use Spring dependency injection in your picocli command line application. This is especially useful if your application contains subcommands. The parser has been enhanced to handle [argument groups](#4.0.0-argument-groups): mutually exclusive options, mutually dependent options, and option sections in the usage help. What makes the picocli design unique and extremely powerful is that argument groups can be nested, so applications can define repeating composite groups of mutually exclusive or co-dependent options. Annotation attributes can now contain [variables](#4.0.0-variable-expansion) that can be resolved as system properties, environment variables and resource bundle keys. The picocli JAR is now an [explicit JPMS module](#4.0.0-jpms-module), as well as an OSGi bundle. As part of this change, the Groovy support classes and annotations have been moved to a separate [`picocli-groovy`](#4.0.0-groovy-module) artifact. Boolean options can now easily be made [negatable](#4.0.0-negatable-options), which adds a "no-" version of the option. This is a common feature in command line parser libraries for Perl, PHP, Ruby, Lisp, Dart and Go, but we are not aware of any other Java libraries that support this. All in all, this release contains 96 [bugfixes and improvements](#4.0.0-fixes) over picocli 3.9.6. Many thanks to the following community contributors to this release of picocli: [AkosCz](https://github.com/akoscz), [AlcaYezz](https://github.com/AlcaYezz), [Andreas Deininger](https://github.com/deining), [andrewbleonard](https://github.com/andrewbleonard), [Arturo Alonso](https://github.com/thefang12), [Bob Tiernay](https://github.com/bobtiernay-okta), [Devin Smith](https://github.com/devinrsmith), [feinstein](https://github.com/feinstein), [Garret Wilson](https://github.com/garretwilson), [Gerard Bosch](https://github.com/gerardbosch), [gitfineon](https://github.com/gitfineon), [jrevault](https://github.com/jrevault), [Judd Gaddie](https://github.com/juddgaddie), [Liam Esteban Prince](https://github.com/leliamesteban), [marinier](https://github.com/marinier), [Michael D. Adams](https://github.com/adamsmd), [Mikaël Barbero](https://github.com/mbarbero), [Mikusch](https://github.com/Mikusch), [Nicolas Mingo](https://github.com/nicolasmingo), [Paolo Di Tommaso](https://github.com/pditommaso), [Philipp Hanslovsky](https://github.com/hanslovsky), [Radu Cotescu](https://github.com/raducotescu), [Reinhard Pointner](https://github.com/rednoah), [Sebastian Thomschke](https://github.com/sebthom), [Shane Rowatt](https://github.com/srowatt), [shanetreacy](https://github.com/shanetreacy), [Steffen Rehberg](https://github.com/StefRe), [Sualeh Fatehi](https://github.com/sualeh), Takuya Ishibashi, [Thibaud Lepretre](https://github.com/kakawait) and [Warkdev](https://github.com/Warkdev). This is the fifty-seventh public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.0.0-new) * [Annotation processor](#4.0.0-annotation-processor) * [Execution API](#4.0.0-execute) * [Spring Boot support](#4.0.0-spring-boot) * [Argument groups](#4.0.0-argument-groups) * [Variable interpolation](#4.0.0-variable-expansion) in annotation attributes * Explicit [JPMS module](#4.0.0-jpms-module) and OSGi bundle * New [Groovy module](#4.0.0-groovy-module) * [Negatable options](#4.0.0-negatable-options) * [Fallback value](#4.0.0-fallback-values) for options * [Custom parameter processing](#4.0.0-parameterConsumer) * Improved parsing of [quoted parameters](#4.0.0-quoted-params) * [Auto-detect terminal width](#4.0.0-auto-width) for usage help * Improved support for [Chinese, Japanese and Korean](#4.0.0-cjk) usage help * [Fixed issues](#4.0.0-fixes) * [Deprecations](#4.0.0-deprecated) * [`run`, `call`, `invoke`, and `parseWithHandlers` methods](#4.0.0-deprecated-run-call) replaced by `execute` * [`CommandLine.setSplitQuotedStrings`](#4.0.0-deprecated-setSplitQuotedStrings) deprecated * [`parse`](#4.0.0-deprecated-parse) deprecated in favor of `parseArgs` * [Range public fields](#4.0.0-deprecated-range-public-fields) * [Potential breaking changes](#4.0.0-breaking-changes) * `picocli.groovy` classes [moved to separate artifact](4.0.0-breaking-groovy) * [Split regex on single-value options is now disallowed](#4.0.0-breaking-split) * [ColorScheme is now immutable](#4.0.0-breaking-colorscheme) * [Boolean options no longer toggle](#4.0.0-breaking-toggle) by default * [ParseResult `matchedOptions`](#4.0.0-breaking-matchedOptions) now returns full list * [Error message for unmatched arguments](#4.0.0-breaking-unmatched-error) changed * [Option order](#4.0.0-breaking-option-order) changed * [Factory](#4.0.0-breaking-factory) ## New and Noteworthy ### Annotation processor GraalVM The `picocli-codegen` module now includes an annotation processor that instantly enables your JAR for GraalVM native images. The annotation processor can build a model from the picocli annotations at compile time rather than at runtime. Use this if you’re interested in: * **Compile time error checking**. The annotation processor shows errors for invalid annotations and attributes immediately when you compile, instead of during testing at runtime, resulting in shorter feedback cycles. * **Graal native images**. The annotation processor generates and updates [Graal configuration](https://github.com/oracle/graal/blob/master/substratevm/BuildConfiguration.md) files under `META-INF/native-image/picocli-generated/$project` during compilation, to be included in the application jar. This includes configuration files for [reflection](https://github.com/oracle/graal/blob/master/substratevm/Reflection.md), [resources](https://github.com/oracle/graal/blob/master/substratevm/Resources.md) and [dynamic proxies](https://github.com/oracle/graal/blob/master/substratevm/DynamicProxy.md). By embedding these configuration files, your jar is instantly Graal-enabled. The `$project` location is configurable, see [processor options](#picocli-processor-options) below. In most cases no further configuration is needed when generating a native image. #### Processor option: `project` The picocli annotation processor supports a number of [options](https://github.com/remkop/picocli/tree/master/picocli-codegen#picocli-processor-options), most important of which is the `project` option to control the output subdirectory: the generated files are written to `META-INF/native-image/picocli-generated/${project}`. A good convention is to use the Maven `${groupId}/${artifactId}` as the value; a unique subdirectory ensures your jar can be shaded with other jars that may also contain generated configuration files. To configure this option, pass the `-Aproject=` to the javac compiler. The examples below show how to do this for Maven and Gradle. #### Enabling the Annotation Processor Since Java 6, annotation processing is part of the standard `javac` compiler, but many IDEs and build tools require something extra to enable annotation processing. ##### IDE [This page](https://immutables.github.io/apt.html) shows the steps to configure Eclipse and IntelliJ IDEA to enable annotation processing. ##### Maven In Maven, use `annotationProcessorPaths` in the `configuration` of the `maven-compiler-plugin`. This requires `maven-compiler-plugin` plugin version 3.5 or higher. ``` org.apache.maven.plugins maven-compiler-plugin ${maven-compiler-plugin-version} info.picocli picocli-codegen 4.0.0 -Aproject=${groupId}/${artifactId} ``` See the [`picocli-codegen` README](https://github.com/remkop/picocli/tree/master/picocli-codegen) for more details. ##### Gradle Use the `annotationProcessor` path in Gradle [4.6 and higher](https://docs.gradle.org/4.6/release-notes.html#convenient-declaration-of-annotation-processor-dependencies): ``` dependencies { compile 'info.picocli:picocli:4.0.0' annotationProcessor 'info.picocli:picocli-codegen:4.0.0' } ``` To set an annotation processor option in Gradle, add these options to the `options.compilerArgs` list in the `compileJava` block. ``` compileJava { options.compilerArgs += ["-Aproject=${project.group}/${project.name}"] } ``` See the [`picocli-codegen` README](https://github.com/remkop/picocli/tree/master/picocli-codegen) for more details. ### Execution API executable commands Picocli 4.0 introduces new API to execute commands. Let’s take a quick look at what changed. #### Exit Code Many command line applications return an [exit code](https://en.wikipedia.org/wiki/Exit_status) to signify success or failure. Zero often means success, a non-zero exit code is often used for errors, but other than that, meanings differ per application. The new `CommandLine.execute` method introduced in picocli 4.0 returns an `int`, and applications can use this return value to call `System.exit` if desired. For example: ```java public static void main(String... args) { CommandLine cmd = new CommandLine(new App()); int exitCode = cmd.execute(args); System.exit(exitCode); } ``` Older versions of picocli had some limited exit code support where picocli would call `System.exit`, but this is now deprecated. #### Generating an Exit Code `@Command`-annotated classes that implement `Callable` and `@Command`-annotated methods can simply return an `int` or `Integer`, and this value will be returned from `CommandLine.execute`. For example: ```java @Command(name = "greet") class Greet implements Callable { public Integer call() { System.out.println("hi"); return 1; } @Command int shout() { System.out.println("HI!"); return 2; } } assert 1 == new CommandLine(new Greet()).execute(); assert 2 == new CommandLine(new Greet()).execute("shout"); ``` Commands with a user object that implements `Runnable` can implement the `IExitCodeGenerator` interface to generate an exit code. For example: ```java @Command(name = "wave") class Gesture implements Runnable, IExitCodeGenerator { public void run() { System.out.println("wave"); } public int getExitCode() { return 3; } } assert 3 == new CommandLine(new Gesture()).execute(); ``` #### Exception Exit Codes By default, the `execute` method returns `CommandLine.ExitCode.USAGE` (`64`) for invalid input, and `CommandLine.ExitCode.SOFTWARE` (`70`) when an exception occurred in the Runnable, Callable or command method. (For reference, these values are `EX_USAGE` and `EX_SOFTWARE`, respectively, from Unix and Linux [sysexits.h](https://www.freebsd.org/cgi/man.cgi?query=sysexits&sektion=3)). This can be customized with the `@Command` annotation. For example: ```java @Command(exitCodeOnInvalidInput = 123, exitCodeOnExecutionException = 456) ``` Additionally, applications can configure a `IExitCodeExceptionMapper` to map a specific exception to an exit code: ```java class MyMapper implements IExitCodeExceptionMapper { public int getExitCode(Throwable t) { if (t instanceof FileNotFoundException) { return 74; } return 1; } } ``` When the end user specified invalid input, the `execute` method prints an error message followed by the usage help message of the command, and returns an exit code. This can be customized by configuring a `IParameterExceptionHandler`. If the business logic of the command throws an exception, the `execute` method prints the stack trace of the exception and returns an exit code. This can be customized by configuring a `IExecutionExceptionHandler`. #### Configuration The new `CommandLine.execute` method is an instance method. The older `run`, `call` and `invoke` methods are static methods. Static methods don’t allow configuration. The new API lets applications configure the parser or other aspects before execution. For example: ```java public static void main(String... args) { CommandLine cmd = new CommandLine(new App()); cmd.setCaseInsensitiveEnumValuesAllowed(true); cmd.setUnmatchedArgumentsAllowed(true); cmd.setStopAtPositional(true); cmd.setExpandAtFiles(false); cmd.execute(args); } ``` ### Spring support spring and spring boot logos [Thibaud Lepretre](https://github.com/kakawait), the author of [kakawait/picocli-spring-boot-starter](https://github.com/kakawait/picocli-spring-boot-starter) has graciously contributed a pull request to the picocli project with a new `picocli-spring-boot-starter` module. This includes a `PicocliSpringFactory` and auto-configuration and makes it extremely easy to use Spring dependency injection in your picocli command line application. #### Spring Boot example ```java import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.ExitCodeGenerator; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.SpringApplication; import org.springframework.context.annotation.Bean; import picocli.CommandLine; import picocli.CommandLine.IFactory; @SpringBootApplication public class MySpringApp implements CommandLineRunner, ExitCodeGenerator { private int exitCode; @Autowired IFactory factory; // auto-configured to inject PicocliSpringFactory @Autowired MyCommand myCommand; // your @picocli.CommandLine.Command-annotated class @Override public void run(String... args) { // let picocli parse command line args and run the business logic exitCode = new CommandLine(myCommand, factory).execute(args); } @Override public int getExitCode() { return exitCode; } public static void main(String[] args) { // let Spring instantiate and inject dependencies System.exit(SpringApplication.exit(SpringApplication.run(MySpringApp.class, args))); } } ``` When your command is annotated with `@Component`, Spring can autodetect it for dependency injection. The business logic of your command looks like any other picocli command with options and parameters. ```java import org.springframework.stereotype.Component; import org.springframework.beans.factory.annotation.Autowired; import picocli.CommandLine.Command; import picocli.CommandLine.Option; import java.util.concurrent.Callable; @Component @Command(name = "myCommand") public class MyCommand implements Callable { @Autowired private SomeService someService; // Prevent "Unknown option" error when users use // the Spring Boot parameter 'spring.config.location' to specify // an alternative location for the application.properties file. @Option(names = "--spring.config.location", hidden = true) private String springConfigLocation; @Option(names = { "-x", "--option" }, description = "example option") private boolean flag; public Integer call() throws Exception { // business logic here return 0; } } ``` ### Argument groups argument groups This release introduces a new `@ArgGroup` annotation and its `ArgGroupSpec` programmatic equivalent. Argument Groups can be used to define: * mutually exclusive options * options that must co-occur (dependent options) * option sections in the usage help message * repeating composite arguments To create a group using the annotations API, annotate a field or method with `@ArgGroup`. The field's type refers to the class containing the options and positional parameters in the group. (For annotated interface methods this would be the return type, for annotated setter methods in a concrete class this would be the setter's parameter type.) Picocli will instantiate this class as necessary to capture command line argument values in the `@Option` and `@Parameters`-annotated fields and methods of this class. #### Mutually Exclusive Options Annotate a field or method with `@ArgGroup(exclusive = true)` to create a group of mutually exclusive options and positional parameters. For example: ```java @Command(name = "exclusivedemo") public class MutuallyExclusiveOptionsDemo { @ArgGroup(exclusive = true, multiplicity = "1") Exclusive exclusive; static class Exclusive { @Option(names = "-a", required = true) int a; @Option(names = "-b", required = true) int b; @Option(names = "-c", required = true) int c; } } ``` The above example defines a command with mutually exclusive options `-a`, `-b` and `-c`. The group itself has a `multiplicity` attribute that defines how many times the group may be specified within the command. The default is `multiplicity = "0..1"`, meaning that by default a group may be omitted or specified once. In this example the group has `multiplicity = "1"`, so the group must occur once: one of the exclusive options must occur on the command line. The synopsis of this command is `exclusivedemo (-a= | -b= | -c=)`. Note that the options are defined as `required = true`; this means required _within the group_, not required within the command. Picocli will validate the arguments and throw a `MutuallyExclusiveArgsException` if multiple mutually exclusive arguments were specified. For example: ```java MutuallyExclusiveOptionsDemo example = new MutuallyExclusiveOptionsDemo(); CommandLine cmd = new CommandLine(example); try { cmd.parseArgs("-a=1", "-b=2"); } catch (MutuallyExclusiveArgsException ex) { assert "Error: -a=, -b= are mutually exclusive (specify only one)" .equals(ex.getMessage()); } ``` For the above group, only one of the options can be specified. Any other combination of options, or the absence of options, is invalid. #### Mutually Dependent Options Annotate a field or method with `@ArgGroup(exclusive = false)` to create a group of dependent options and positional parameters that must co-occur. For example: ```java @Command(name = "co-occur") public class DependentOptionsDemo { @ArgGroup(exclusive = false) Dependent dependent; static class Dependent { @Option(names = "-a", required = true) int a; @Option(names = "-b", required = true) int b; @Option(names = "-c", required = true) int c; } } ``` The above example defines a command with dependent options `-a`, `-b` and `-c` that must co-occur. The group itself has a `multiplicity` attribute that defines how many times the group may be specified within the command. In this example the group uses the default multiplicity, `multiplicity = "0..1"`, meaning that the group may be omitted or specified once. The synopsis of this command is `co-occur [-a= -b= -c=]`. Note that the options are defined as `required = true`; this means required _within the group_, not required within the command. Picocli will validate the arguments and throw a `MissingParameterException` if not all dependent arguments were specified. For example: ```java DependentOptionsDemo example = new DependentOptionsDemo(); CommandLine cmd = new CommandLine(example); try { cmd.parseArgs("-a=1", "-b=2"); } catch (MissingParameterException ex) { assert "Error: Missing required argument(s): -c=".equals(ex.getMessage()); } ``` #### Option Sections in Usage Help The example below uses groups to define options sections in the usage help. When a group has a non-null `heading` (or `headingKey`), the options in the group are given the specified heading in the usage help message. The `headingKey` attribute can be used to get the heading text from the command's resource bundle. This works for mutually exclusive or co-occurring groups, but it is also possible to define a group that does no validation but only creates an option section in the usage help. Annotate a field or method with `@ArgGroup(validate = false)` to create a group for display purposes only. For example: ```java @Command(name = "sectiondemo", description = "Section demo") public class OptionSectionDemo { @ArgGroup(validate = false, heading = "This is the first section%n") Section1 section1; static class Section1 { @Option(names = "-a", description = "Option A") int a; @Option(names = "-b", description = "Option B") int b; @Option(names = "-c", description = "Option C") int c; } @ArgGroup(validate = false, heading = "This is the second section%n") Section2 section2; static class Section2 { @Option(names = "-x", description = "Option X") int x; @Option(names = "-y", description = "Option Y") int y; @Option(names = "-z", description = "Option X") int z; } public static void main(String[] args) { new CommandLine(new OptionSectionDemo()).usage(System.out); } } ``` This prints the following usage help message: ``` Usage: sectiondemo [-a=] [-b=] [-c=] [-x=] [-y=] [-z=] Section demo This is the first section -a= Option A -b= Option B -c= Option C This is the second section -x= Option X -y= Option Y -z= Option X ``` Note that the heading text must end with `%n` to insert a newline between the heading text and the first option. This is for consistency with other headings in the usage help, like `@Command(headerHeading = "Usage:%n", optionListHeading = "%nOptions:%n")`. #### Repeating Composite Argument Groups The below example shows how groups can be composed of other groups, and how arrays and collections can be used to capture repeating groups (with a `multiplicity` greater than one): ```java @Command(name = "repeating-composite-demo") public class CompositeGroupDemo { @ArgGroup(exclusive = false, multiplicity = "1..*") List composites; static class Composite { @ArgGroup(exclusive = false, multiplicity = "0..1") Dependent dependent; @ArgGroup(exclusive = true, multiplicity = "1") Exclusive exclusive; } static class Dependent { @Option(names = "-a", required = true) int a; @Option(names = "-b", required = true) int b; @Option(names = "-c", required = true) int c; } static class Exclusive { @Option(names = "-x", required = true) boolean x; @Option(names = "-y", required = true) boolean y; @Option(names = "-z", required = true) boolean z; } } ``` In the above example, the annotated `composites` field defines a composite group that must be specified at least once, and may be specified many times (`multiplicity = "1..*"`), on the command line. The synopsis of this command is: ``` Usage: repeating-composite-demo ([-a= -b= -c=] (-x | -y | -z))... ``` Each time the group is matched, picocli creates an instance of the `Composite` class and adds it to the `composites` list. The `Composite` class itself contains two groups: an optional (`multiplicity = "0..1"`) group of dependent options that must co-occur, and another group of mutually exclusive options, which is mandatory (`multiplicity = "1"`). The below example illustrates: ```java CompositeGroupDemo example = new CompositeGroupDemo(); CommandLine cmd = new CommandLine(example); cmd.parseArgs("-x", "-a=1", "-b=1", "-c=1", "-a=2", "-b=2", "-c=2", "-y"); assert example.composites.size() == 2; Composite c1 = example.composites.get(0); assert c1.exclusive.x; assert c1.dependent.a == 1; assert c1.dependent.b == 1; assert c1.dependent.c == 1; Composite c2 = example.composites.get(1); assert c2.exclusive.y; assert c2.dependent.a == 2; assert c2.dependent.b == 2; assert c2.dependent.c == 2; ``` #### Positional Parameters When a `@Parameters` positional parameter is part of a group, its `index` is the index _within the group_, not within the command. ### Variable expansion From this release, picocli supports variable interpolation (variable expansion) in annotation attributes as well as in text attributes of the programmatic API. #### Variable Interpolation Example ```java @Command(name = "status", description = "This command logs the status for ${PARENT-COMMAND-NAME}.") class Status { @Option(names = {"${dirOptionName1:--d}", "${dirOptionName2:---directories}"}, // -d or --directories description = {"Specify one or more directories, separated by '${sys:path.separator}'.", "The default is the user home directory (${DEFAULT-VALUE})."}, arity = "${sys:dirOptionArity:-1..*}", defaultValue = "${sys:user.home}", split = "${sys:path.separator}") String[] directories; } ``` #### Predefined Variables See the [user manual](https://picocli.info/#_predefined_variables) for the list of predefined variables. #### Custom Variables In addition, you can define your own variables. Currently the following syntaxes are supported: * `${sys:key}`: system property lookup, replaced by the value of `System.getProperty("key")` * `${env:key}`: environment variable lookup, replaced by the value of `System.getEnv("key")` * `${bundle:key}`: look up the value of `key` in the resource bundle of the command * `${key}`: search all of the above, first system properties, then environment variables, and finally the resource bundle of the command #### Default Values for Custom Variables You can specify a default value to use when no value is found for a custom variable. The syntax for specifying a default is `${a:-b}`, where `a` is the variable name and `b` is the default value to use if `a` is not found. ### Explicit JPMS module modules The main `picocli-4.0.0.jar` is a JPMS module named `info.picocli`. Starting from picocli 4.0, this jar will be an explicit module instead of an automatic module, so the [`jlink` tool](https://docs.oracle.com/en/java/javase/12/tools/jlink.html) can be used to provide a trimmed binary image that has only the required modules. Typically, a modular jar includes the `module-info.class` file in its root directory. This causes problems for some older tools, which incorrectly process the module descriptor as if it were a normal Java class. To provide the best backward compatibility, the main picocli artifact is a [modular multi-release jar](https://openjdk.java.net/jeps/238#Modular-multi-release-JAR-files) with the `module-info.class` file located in `META-INF/versions/9`. ### Separate `picocli-groovy` module Groovy logo Also, from this release the main `picocli-4.x` artifact no longer contains the `picocli.groovy` classes: these have been split off into a separate `picocli-groovy-4.x` artifact. This was necessary to make the main `picocli-4.x.jar` an explicit JPMS module. ### Negatable options From picocli 4.0, options can be `negatable`. ```java class App { @Option(names = "--verbose", negatable = true) boolean verbose; @Option(names = "-XX:+PrintGCDetails", negatable = true) boolean printGCDetails; @Option(names = "-XX:-UseG1GC", negatable = true) boolean useG1GC = true; } ``` When an option is negatable, picocli will recognize negative aliases of the option on the command line. For *nix-style long options, aliases have the prefix 'no-' to the given names. For Java JVM-style options, the `:+` is turned into `:-` and vice versa. (This can be changed by customizing the `INegatableOptionTransformer`.) If the negated form of the option is found, for example `--no-verbose`, the value is set to the provided default. Otherwise, with a regular call, for example `--verbose`, it is set to the opposite of the default. ### Fallback value for options This release introduces a new attribute on the `Option` annotation: `fallbackValue` for options with optional parameter: assign this value when the option was specified on the command line without parameter. This is different from the `defaultValue`, which is assigned if the option is not specified at all on the command line. Using a `fallbackValue` allows applications to distinguish between cases where * the option was not specified on the command line (default value assigned) * the option was specified without parameter on the command line (fallback value assigned) * the option was specified with parameter on the command line (command line argument value assigned) This is useful to define options that can function as a boolean "switch" and optionally allow users to provide a (strongly typed) extra parameter value. The option description may contain the `${FALLBACK-VALUE}` variable which will be replaced with the actual fallback value when the usage help is shown. ### Custom parameter processing Options or positional parameters can be assigned a `IParameterConsumer` that implements custom logic to process the parameters for this option or this position. When an option or positional parameter with a custom `IParameterConsumer` is matched on the command line, picocli's internal parser is temporarily suspended, and the custom parameter consumer becomes responsible for consuming and processing as many command line arguments as needed. This can be useful when passing options through to another command. For example, the unix [`find`](https://en.wikipedia.org/wiki/Find_(Unix)) command has a [`-exec`](https://en.wikipedia.org/wiki/Find_(Unix)#Execute_an_action) option to execute some action for each file found. Any arguments following the `-exec` option until a `;` or `+` argument are not options for the `find` command itself, but are interpreted as a separate command and its options. The example below demonstrates how to implement `find -exec` using this API: ```java @Command(name = "find") class Find { @Option(names = "-exec", parameterConsumer = ExecParameterConsumer.class) List list = new ArrayList(); } class ExecParameterConsumer implements IParameterConsumer { public void consumeParameters(Stack args, ArgSpec argSpec, CommandSpec commandSpec) { List list = argSpec.getValue(); while (!args.isEmpty()) { String arg = args.pop(); list.add(arg); // `find -exec` semantics: stop processing after a ';' or '+' argument if (";".equals(arg) || "+".equals(arg)) { break; } } } } ``` ### Improved parsing of quoted parameters Also, from this release, support for quoted parameter values has been improved. Quoted parameter values can now contain nested quoted substrings to give end users fine-grained control over how values are split. See the [user manual](https://picocli.info/#_quoted_values) for details. ### Auto-detect terminal width for usage help From this release, commands defined with `@Command(usageHelpAutoWidth = true)` will try to adjust the usage message help layout to the terminal width. There is also programmatic API to control this via the `CommandLine::setUsageHelpAutoWidth` and `UsageMessageSpec::autoWidth` methods. End users may enable this by setting system property `picocli.usage.width` to `AUTO`, and may disable this by setting this system property to a numeric value. This feature requires Java 7. ### Improved support for Chinese, Japanese and Korean usage help Picocli will align the usage help message to fit within some user-defined width (80 columns by default). A number of characters in Chinese, Japanese and Korean (CJK) are wider than others. If those characters are treated to have the same width as other characters, the usage help message may extend past the right margin. From this release, picocli will use 2 columns for these wide characters when calculating where to put line breaks, resulting in better usage help message text. This can be switched off with `CommandLine.setAdjustLineBreaksForWideCJKCharacters(false)`. ## Fixed issues ### 4.0.0-GA - [#752][#658][#496] Add `picocli-spring-boot-starter` module including a `PicocliSpringFactory` and auto-configuration. Thanks to [Thibaud Lepretre](https://github.com/kakawait) for the pull request. - [#736] API: Allow removal of `ArgSpec` from `CommandSpec`. Thanks to [AkosCz](https://github.com/akoscz) for the feature request. - [#756] API: Make synopsis indent for multi-line synopsis configurable (related to #739). - [#761] API: Add `ParseResult.matchedArgs()` method to return all matched arguments in order; change `ParseResult.matchedOptions()` and `ParseResult.matchedPositionals()` to return the full list of matched options and positional parameters, including duplicates if the option or positional parameter was matched multiple times. Thanks to [Michael D. Adams](https://github.com/adamsmd) for the feature request. - [#760] API: Deprecate `CommandLine.setSplitQuotedStrings`: the vast majority of applications want to `split` while respecting quotes. - [#754] API/Enhancement: Allow boolean options to get value from fallback instead of defaultProvider. Thanks to [Michael D. Adams](https://github.com/adamsmd) for the feature request. - [#696][#741] Enhancement: Automatically split lines in TextTable. Thanks to [Sualeh Fatehi](https://github.com/sualeh) for the pull request. - [#744] Enhancement: Composite Argument Groups: more informative error messages. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. - [#745] Enhancement: Picocli should disallow `split` regex for single-value type options. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. - [#748] Enhancement: Provide API to use a custom Layout in usage help message: ensure `Help.createDefaultLayout()` is used internally so that subclasses overriding this method can control the Layout that is used. - [#595] Enhancement: Support for quoted arguments containing nested quoted substrings, allowing end-users to control how values are split in parts when a `split` regex is defined. - [#739] Bugfix: infinite loop or exception when command name plus synopsis heading length equals or exceeds usage help message width. Thanks to [Arturo Alonso](https://github.com/thefang12) for raising this. - [#746] Bugfix: Apply default values to options and positional parameters in argument groups. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. - [#742] Bugfix: Default values prevent correct parsing in argument groups. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. - [#759] Bugfix: Correct tracing when custom end-of-option delimiter is matched on the command line. - [#738] Bugfix: `setTrimQuotes` does not trim quotes from option names. Thanks to [Judd Gaddie](https://github.com/juddgaddie) for raising this. - [#758] Bugfix: Duplicate name exception in argument group: better / more concise error message. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. - [#751] Build: Make build more portable. - [#753] Doc: Improve documentation for multi-value fields: mention the `split` attribute. Thanks to [feinstein](https://github.com/feinstein). - [#740] Doc: Update user manual to replace `parse` examples with `parseArgs`. - [#713] Doc: Update UML class diagrams for picocli 4.0. ### 4.0.0-beta-2 - [#280] API: `@Option(fallbackValue = "...")` for options with optional parameter: assign this value when the option was specified on the command line without parameter. Thanks to [Paolo Di Tommaso](https://github.com/pditommaso) and [marinier](https://github.com/marinier) for the suggestion and in-depth discussion. - [#625] API: `@Command(synopsisSubcommandLabel = "...")` to allow customization of the subcommands part of the synopsis: by default this is `[COMMAND]`. Thanks to [Sebastian Thomschke](https://github.com/sebthom) and [AlcaYezz](https://github.com/AlcaYezz) for the feature request and subsequent discussion. - [#718] API: Add `IParameterConsumer` and `@Option(parameterConsumer = Xxx.class)` for passing arguments through to another command, like `find -exec`. Thanks to [Reinhard Pointner](https://github.com/rednoah) for the suggestion. - [#721] API: Add public method Text.getCJKAdjustedLength(). - [#634] API: Dynamically detect terminal size. Requires Java 7. Thanks to my colleague Takuya Ishibashi for the suggestion. - [#737] Deprecate the `parse` method in favor of `parseArgs`. - [#717] Negatable options change: avoid unmappable character `±` for synopsis: it renders as scrambled characters in encoding ASCII and in some terminals. - [#734][#735] Make the picocli jar OSGi friendly. Thanks to [Radu Cotescu](https://github.com/raducotescu) for the pull request. - [#733] Improve error message for unmatched arguments. Thanks to my colleague Takuya Ishibashi for raising this. - [#719] Bugfix: options with variable arity should stop consuming arguments on custom end-of-options delimiter. - [#720] Bugfix: `@Unmatched` list should be cleared prior to subsequent invocations. - [#723] Bugfix: variables in `defaultValue` were not expanded in usage help option description line for `showDefaultValues = true`. Thanks to [Mikaël Barbero](https://github.com/mbarbero) for raising this. - [#722] Bugfix: synopsis of deeply nested `@ArgGroup` shows `@Options` duplicate on outer level of command. Thanks to [Shane Rowatt](https://github.com/srowatt) for raising this. - [#724] Bugfix: Usage message exceeds width. - [#731] Doc: Add Zero Bugs Commitment to README. ### 4.0.0-beta-1b - [#500] Add a generic and extensible picocli annotation processor - [#699] Add annotation processor that generates `reflect-config.json` during build - [#703] Add annotation processor that generates `resource-config.json` during build - [#704] Add annotation processor that generates `proxy-config.json` during build - [#707] Add example maven/gradle projects that demonstrate using the annotation processor - [#711] API: Create separate `picocli-groovy` module, make `picocli` an explicit module (a modular multiversion jar) - [#694] API: `negatable` boolean options. Thanks to [Michael D. Adams](https://github.com/adamsmd) for the feature request. - [#712] Boolean options should not toggle by default, to be consistent with negatable options - [#709] Fix scrambled characters for the `±` character when running on system with non-UTF8 encoding - [#717] Fix unmappable character for encoding ASCII by setting compiler encoding to UTF8 explicitly. Thanks to [Liam Esteban Prince](https://github.com/leliamesteban) for raising this. - [#697] Option sort in usage help should ignore option name prefix; long options without short name should be inserted alphabetically, instead of always appear at the top. - [#695] Fix runtime warnings about illegal reflective access to field `java.io.FilterOutputStream.out`. Thanks to [gitfineon](https://github.com/gitfineon) for reporting this issue. - [#698] Reduce `reflect-config.json` used by GraalVM native-image generation - [#700] Change default exit codes to `1` for Exceptions in client code, `2` for invalid usage. Add links to `ExitCode` javadoc. - [#715] processor tests should not fail when running in different locale - [#710] Let annotation processor validate negatable options, usageHelp options - [#716] Revert `@Inherited` annotation for `@Command`. Thanks to [Mikusch](https://github.com/Mikusch) for raising this. ### 4.0.0-alpha-3 - [#516] API: Add support for color schemes in the convenience methods and associated classes and interfaces. Thanks to [Bob Tiernay](https://github.com/bobtiernay-okta) for the suggestion. - [#561] API: Parser configuration for convenience methods. - [#650] API: Global parser configuration if using Runnable. Thanks to [gitfineon](https://github.com/gitfineon) for raising this. - [#424] API: Exit on help, version or invalid arguments. Thanks to [Gerard Bosch](https://github.com/gerardbosch) for raising this. - [#541] API: Improved exception handling for Runnable/Callable. - [#680] API: Add annotation API for exitCodeList and exitCodeListHeading. - [#611] API: Add `CommandLine.addSubcommand` overloaded method without name or alias. Thanks to [andrewbleonard](https://github.com/andrewbleonard) for the request. - [#684] API: Make `CommandLine.defaultFactory` method public. - [#675] API: Make `Help.ColorScheme` immutable. This is a breaking API change. - [#673] API: Deprecate `CommandLine.Range` public fields, add accessor methods to use instead. - [#663] How to remove stacktraces on error. Thanks to [Nicolas Mingo](https://github.com/nicolasmingo) and [jrevault](https://github.com/jrevault) for raising this and subsequent discussion. - [#672] Need way to send errors back from subcommand. Thanks to [Garret Wilson](https://github.com/garretwilson) for raising this. - [#678] Exit Status section in usage help message. - [#683] Ensure exitCodeList implementation is consistent with other usage message attributes. - [#575] Codegen: Use mixinStandardHelpOptions in `AutoComplete$App` (add support for the `--version` option) - [#645] Codegen: Exclude Jansi Console from generated GraalVM reflection configuration. Thanks to [shanetreacy](https://github.com/shanetreacy) for raising this. - [#686] Codegen: Add support for `@Command` interfaces (dynamic proxies) in GraalVM native image. - [#669] Codegen: Add support for resource bundles in GraalVM native image. - [#691] Codegen bugfix: `ReflectionConfigGenerator` should not generate config for `picocli.CommandLine$Model$ObjectScope`. - [#674] JPMS module: move module-info.class to root of jar. - [#676] Bugfix: non-defined variables in `defaultValue` now correctly resolve to `null`, and options and positional parameters are now correctly considered `required` only if their default value is `null` after variable interpolation. Thanks to [ifedorenko](https://github.com/ifedorenko) for raising this. - [#682] Bugfix: incorrect evaluation for multiple occurrences of a variable. - [#689] NPE in codegen OutputFileMixin. - [#679] Documentation: Update examples for new execute API. Add examples for exit code control and custom exception handlers. - [#681] Documentation: Add exit code section to Internationalization example in user manual. ### 4.0.0-alpha-2 - [#495] Publish picocli as a JPMS module in a new artifact `picocli-core-module`. Thanks to [Warkdev](https://github.com/Warkdev) for the pull request. - [#21] Count double-width Asian characters as two characters for line-breaking purposes. - [#526] Add support for variable interpolation in message strings. Thanks to [Bob Tiernay](https://github.com/bobtiernay-okta) for the suggestion. - [#660] Added `@java.lang.annotation.Inherited` to the `@picocli.CommandLine.Command` annotation. Thanks to [Devin Smith](https://github.com/devinrsmith) for the suggestion. - [#661] Bugfix for stack overflow when option in an argument group had a default value. Thanks to [Andreas Deininger](https://github.com/deining) for reporting this. - [#656] Bugfix for issue where synopsis for composite argument groups did not expand for n..* (n > 1). Thanks to Arno Tuomainen for finding this issue. - [#654] Bugfix: argument group heading text was not retrieved from ResourceBundle. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. - [#635] Bugfix in argument group validation: did not show an error if some but not all parts of a co-occurring group were specified. Thanks to [Philipp Hanslovsky](https://github.com/hanslovsky) for the pull request. - [#653] Bugfix: argument group validation should be skipped if help was requested. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. - [#655] Bugfix: argument group validation silently accepts missing subgroup with multiplicity=1. - [#652] Documentation: fixes in user manual. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. - [#651] Documentation: fixes in user manual. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. ### 4.0.0-alpha-1 - [#643] Change `%` to `%%` when using `${DEFAULT-VALUE}` in option description. Thanks to [Steffen Rehberg](https://github.com/StefRe) for the pull request. - [#638] Document fallback descriptionKey for options and parameters in user manual. Thanks to [Mikusch](https://github.com/Mikusch) for the suggestion. - [#199] mutually exclusive options - [#295] options that must co-occur (dependent options) - [#450] option grouping in the usage help message - [#358] (also [#635]) repeating composite arguments (this should also cover the use cases presented in #454 and #434 requests for repeatable subcommands) ## Deprecations ### `run`, `call`, `invoke`, and `parseWithHandlers` methods replaced by `execute` All variants of the `run`, `call`, `invoke`, and `parseWithHandlers` methods are deprecated from this release, in favor of the new `execute` method. Similarly, the following classes and interfaces are deprecated: * `IParseResultHandler2` is deprecated in favor of the new `IExecutionStrategy` interface. * `IExceptionHandler2` is deprecated in favor of the new `IParameterExceptionHandler` `IExecutionExceptionHandler` interfaces. * The `AbstractHandler` and `AbstractParseResultHandler` classes are deprecated with no replacement. ### `CommandLine.setSplitQuotedStrings` deprecated The `CommandLine.setSplitQuotedStrings` (and `isSplitQuotedStrings`) methods have been deprecated: Most applications should not change the default. The rare application that _does_ need to split parameter values without respecting quotes should use [`ParserSpec.splitQuotedStrings(boolean)`](https://picocli.info/apidocs/picocli/CommandLine.Model.ParserSpec.html#splitQuotedStrings-boolean-). ### `parse` deprecated in favor of `parseArgs` From this release, the `parse` method is deprecated in favor of `parseArgs`. ### Range public fields The public fields of the `Range` class have been deprecated and public methods `min()`, `max()`, `isVariable()` have been added that should be used instead. ## Potential breaking changes ### `picocli.groovy` classes moved to separate artifact From this release the main `picocli-4.x` artifact no longer contains the `picocli.groovy` classes: these have been split off into a separate `picocli-groovy-4.x` artifact. Scripts upgrading to picocli 4.0 must change more than just the version number! Scripts should use `@Grab('info.picocli:picocli-groovy:4.x')` from version 4.0, `@Grab('info.picocli:picocli:4.x')` will not work. ### Split regex on single-value options is now disallowed Picocli now throws an `InitializationException` when a single-value type option or positional parameter has a `split` regex. Only multi-value options or positional parameters should have a `split` regex. The runtime check can be disabled by setting system property `picocli.ignore.invalid.split` to any value. (The annotation processor also checks this at compile time; this check cannot be disabled.) ### ColorScheme is now immutable The `Help.ColorScheme` class has been made immutable. Its public fields are no longer public. A new `Help.ColorScheme.Builder` class has been introduced to create `ColorScheme` instances. This is a breaking API change: I could not think of a way to do this without breaking backwards compatibility. ### Boolean options do not toggle by default From this release, when a flag option is specified on the command line picocli will set its value to the opposite of its _default_ value. Prior to 4.0, the default was to "toggle" boolean flags to the opposite of their _current_ value: if the previous value was `true` it is set to `false`, and when the value was `false` it is set to `true`. Applications can call `CommandLine.setToggleBooleanFlags(true)` to enable toggling. Note that when toggling is enabled, specifying a flag option twice on the command line will have no effect because they cancel each other out. ### ParseResult `matchedOptions` now returns full list `ParseResult.matchedOptions()` and `ParseResult.matchedPositionals()` now return the full list of matched options and positional parameters, including duplicates if the option or positional parameter was matched multiple times. Prior to this release, these methods would return a list that did not contain duplicates. Applications interested in the old behavior should use the new `matchedOptionSet()` and `matchedPositionalSet()` methods that return a `Set`. ### Error message for unmatched arguments changed The error message for unmatched arguments now shows the index in the command line arguments where the unmatched argument was found, and shows the unmatched value in single quotes. This is useful when the unmatched value is whitespace or an empty String. For example: ``` Previously: Unmatched arguments: B, C New : Unmatched arguments from index 1: 'B', 'C' ``` This may break tests that rely on the exact error message. ### Option order changed Previously, options that only have a long name (and do not have a short name) were always shown before options with a short name. From this release, they are inserted in the option list by their first non-prefix letter. This may break tests that expect a specific help message. ### Factory From version 4.0, picocli delegates all object creation to the [factory](https://picocli.info/#_custom_factory), including creating `Collection` instances to capture [multi-value](https://picocli.info/#_arrays_and_collections) `@Option` values. Previously, `Collection` objects were instantiated separately without involving the factory. It is recommended that custom factories should fall back to the default factory. Something like this: ```java @Override public K create(Class clazz) throws Exception { try { return doCreate(clazz); // custom factory lookup or instantiation } catch (Exception e) { return CommandLine.defaultFactory().create(clazz); // fallback if missing } } ``` # Picocli 4.0.0-beta-2 The picocli community is pleased to announce picocli 4.0.0-beta-2. Bugfixes and improvements. This release introduces two new attributes on the `Option` annotation: * `fallbackValue` * `parameterConsumer` `fallbackValue` is for options with optional parameter: assign this value when the option was specified on the command line without parameter. `parameterConsumer` and the associated `IParameterConsumer` interface allows for options to bypass picocli's parsing logic and replace it with custom logic. One use case is collecting arguments to pass them through to another command. This release introduces a new `synopsisSubcommandLabel` attribute on the `@Command` annotation to allow customization of the subcommands part of the synopsis. This is useful for applications that have required subcommands. Also, this release adds the ability to dynamically detect the terminal width. From this release, the picocli JAR is an OSGi bundle with `Bundle-Name: picocli` and other appropriate metadata in the manifest. _Please try this and provide feedback. We can still make changes._ _What do you think of the `@ArgGroup` annotations API? What about the programmatic API? Does it work as expected? Are the input validation error messages correct and clear? Is the documentation clear and complete? Anything you want to change or improve? Any other feedback?_ Many thanks to the picocli community for the contributions! This is the fifty-sixth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.0.0-beta-2-new) * [Fixed issues](#4.0.0-beta-2-fixes) * [Deprecations](#4.0.0-beta-2-deprecated) * [Potential breaking changes](#4.0.0-beta-2-breaking-changes) ## New and Noteworthy ### Fallback Value API This release introduces a new attribute on the `Option` annotation: `fallbackValue` for options with optional parameter: assign this value when the option was specified on the command line without parameter. This is different from the `defaultValue`, which is assigned if the option is not specified at all on the command line. Using a `fallbackValue` allows applications to distinguish between cases where * the option was not specified on the command line (default value assigned) * the option was specified without parameter on the command line (fallback value assigned) * the option was specified with parameter on the command line (command line argument value assigned) This is useful to define options that can function as a boolean "switch" and optionally allow users to provide a (strongly typed) extra parameter value. The option description may contain the `${FALLBACK-VALUE}` variable which will be replaced with the actual fallback value when the usage help is shown. ### Synopsis Subcommand Label For commands with subcommands, the string `[COMMAND]` is appended to the end of the synopsis (whether the synopsis is abbreviated or not). This looks something like this: ``` [OPTIONS] FILES [COMMAND] ``` From picocli 4.0, this can be customized with the `synopsisSubcommandLabel` attribute. For example, to clarify that a subcommand is mandatory, an application may specify `COMMAND`, without the `[` and `]` brackets: ```java @Command(name = "git", synopsisSubcommandLabel = "COMMAND") class Git implements Runnable { @Spec CommandSpec spec; public void run() { throw new ParameterException(spec.commandLine(), "Missing required subcommand"); } } ``` An application with a limited number of subcommands may want to show them all in the synopsis, for example: ```java @Command(name = "fs", synopsisSubcommandLabel = "(list | add | delete)", subcommands = {List.class, Add.class, Delete.class}) class Fs { ... } ``` ### Dynamically Detect Terminal Size From this release, commands defined with `@Command(usageHelpAutoWidth = true)` will try to adjust the usage message help layout to the terminal width. There is also programmatic API to control this via the `CommandLine::setUsageHelpAutoWidth` and `UsageMessageSpec::autoWidth` methods. End users may enable this by setting system property `picocli.usage.width` to `AUTO`, and may disable this by setting this system property to a numeric value. This feature requires Java 7. ### Custom Parameter Processing Options or positional parameters can be assigned a `IParameterConsumer` that implements custom logic to process the parameters for this option or this position. When an option or positional parameter with a custom `IParameterConsumer` is matched on the command line, picocli's internal parser is temporarily suspended, and the custom parameter consumer becomes responsible for consuming and processing as many command line arguments as needed. This can be useful when passing options through to another command. For example, the unix [`find`](https://en.wikipedia.org/wiki/Find_(Unix)) command has a [`-exec`](https://en.wikipedia.org/wiki/Find_(Unix)#Execute_an_action) option to execute some action for each file found. Any arguments following the `-exec` option until a `;` or `+` argument are not options for the `find` command itself, but are interpreted as a separate command and its options. The example below demonstrates how to implement `find -exec` using this API: ```java @Command(name = "find") class Find { @Option(names = "-exec", parameterConsumer = ExecParameterConsumer.class) List list = new ArrayList(); } class ExecParameterConsumer implements IParameterConsumer { public void consumeParameters(Stack args, ArgSpec argSpec, CommandSpec commandSpec) { List list = argSpec.getValue(); while (!args.isEmpty()) { String arg = args.pop(); list.add(arg); // `find -exec` semantics: stop processing after a ';' or '+' argument if (";".equals(arg) || "+".equals(arg)) { break; } } } } ``` ## Fixed issues - [#280] API: `@Option(fallbackValue = "...")` for options with optional parameter: assign this value when the option was specified on the command line without parameter. Thanks to [Paolo Di Tommaso](https://github.com/pditommaso) and [marinier](https://github.com/marinier) for the suggestion and in-depth discussion. - [#625] API: `@Command(synopsisSubcommandLabel = "...")` to allow customization of the subcommands part of the synopsis: by default this is `[COMMAND]`. Thanks to [Sebastian Thomschke](https://github.com/sebthom) and [AlcaYezz](https://github.com/AlcaYezz) for the feature request and subsequent discussion. - [#718] API: Add `IParameterConsumer` and `@Option(parameterConsumer = Xxx.class)` for passing arguments through to another command, like `find -exec`. Thanks to [Reinhard Pointner](https://github.com/rednoah) for the suggestion. - [#721] API: Add public method Text.getCJKAdjustedLength(). - [#634] API: Dynamically detect terminal size. Requires Java 7. Thanks to my colleague Takuya Ishibashi for the suggestion. - [#737] Deprecate the `parse` method in favor of `parseArgs`. - [#717] Negatable options change: avoid unmappable character `±` for synopsis: it renders as scrambled characters in encoding ASCII and in some terminals. - [#734][#735] Make the picocli jar OSGi friendly. Thanks to [Radu Cotescu](https://github.com/raducotescu) for the pull request. - [#733] Improve error message for unmatched arguments. Thanks to my colleague Takuya Ishibashi for raising this. - [#719] Bugfix: options with variable arity should stop consuming arguments on custom end-of-options delimiter. - [#720] Bugfix: `@Unmatched` list should be cleared prior to subsequent invocations. - [#723] Bugfix: variables in `defaultValue` were not expanded in usage help option description line for `showDefaultValues = true`. Thanks to [Mikaël Barbero](https://github.com/mbarbero) for raising this. - [#722] Bugfix: synopsis of deeply nested `@ArgGroup` shows `@Options` duplicate on outer level of command. Thanks to [Shane Rowatt](https://github.com/srowatt) for raising this. - [#724] Bugfix: Usage message exceeds width. - [#731] Doc: Add Zero Bugs Commitment to README. ## Deprecations From this release, the `parse` method is deprecated in favor of `parseArgs`. ## Potential breaking changes The error message for unmatched arguments now shows the index in the command line arguments where the unmatched argument was found, and shows the unmatched value in single quotes. This is useful when the unmatched value is whitespace or an empty String. For example: ``` Previously: Unmatched arguments: B, C New : Unmatched arguments from index 1: 'B', 'C' ``` This may break tests that rely on the exact error message. # Picocli 4.0.0-beta-1b The picocli community is pleased to announce picocli 4.0.0-beta-1b. This release includes the first cut of an annotation processor that can build a model from the picocli annotations at compile time rather than at runtime. Use this if you’re interested in: * **Compile time error checking**. The annotation processor shows errors for invalid annotations and attributes immediately when you compile, instead of during testing at runtime, resulting in shorter feedback cycles. * **Graal native images**. The annotation processor generates [Graal configuration](https://github.com/oracle/graal/blob/master/substratevm/BuildConfiguration.md) files under `META-INF/native-image/picocli-generated/$project` during compilation, to be included in the application jar. By embedding these configuration files, your jar is instantly Graal-enabled. In most cases no further configuration is needed when generating a native image. Also, from this release the main `picocli-4.x` artifact no longer contains the `picocli.groovy` classes: these have been split off into a separate `picocli-groovy-4.x` artifact. The main `picocli-4.x.jar` is now an explicit JPMS module, with a `module-info.class` located in `META-INF/versions/9`. The `picocli-jpms-module` subproject has been removed. From picocli 4.0, options can be `negatable`. When an option is negatable, picocli will recognize negative aliases of the option on the command line. See the New and Noteworthy section below for more details. _Please try this and provide feedback. We can still make changes._ _What do you think of the `@ArgGroup` annotations API? What about the programmatic API? Does it work as expected? Are the input validation error messages correct and clear? Is the documentation clear and complete? Anything you want to change or improve? Any other feedback?_ Many thanks to the picocli community for the contributions! This is the fifty-fifth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.0.0-beta-1b-new) * [Fixed issues](#4.0.0-beta-1b-fixes) * [Deprecations](#4.0.0-beta-1b-deprecated) * [Potential breaking changes](#4.0.0-beta-1b-breaking-changes) ## New and Noteworthy ### Annotation Processor This release includes the first cut of an annotation processor that can build a model from the picocli annotations at compile time rather than at runtime. Use this if you’re interested in: * **Compile time error checking**. The annotation processor shows errors for invalid annotations and attributes immediately when you compile, instead of during testing at runtime, resulting in shorter feedback cycles. * **Graal native images**. The annotation processor generates and updates [Graal configuration](https://github.com/oracle/graal/blob/master/substratevm/BuildConfiguration.md) files under `META-INF/native-image/picocli-generated/$project` during compilation, to be included in the application jar. This includes configuration files for [reflection](https://github.com/oracle/graal/blob/master/substratevm/Reflection.md), [resources](https://github.com/oracle/graal/blob/master/substratevm/Resources.md) and [dynamic proxies](https://github.com/oracle/graal/blob/master/substratevm/DynamicProxy.md). By embedding these configuration files, your jar is instantly Graal-enabled. The `$project` location is configurable, see [processor options](#picocli-processor-options) below. In most cases no further configuration is needed when generating a native image. #### Enabling the Annotation Processor Since Java 6, annotation processing is part of the standard `javac` compiler, but many IDEs and build tools require something extra to enable annotation processing. ##### IDE [This page](https://immutables.github.io/apt.html) shows the steps to configure Eclipse and IntelliJ IDEA to enable annotation processing. ##### Maven In Maven, use `annotationProcessorPaths` in the `configuration` of the `maven-compiler-plugin`. This requires `maven-compiler-plugin` plugin version 3.5 or higher. ``` org.apache.maven.plugins maven-compiler-plugin ${maven-compiler-plugin-version} info.picocli picocli-codegen 4.0.0-beta-1b ``` An alternative that works with older versions of the `maven-compiler-plugin` is to specify the `picocli-codegen` module on the classpath as a `provided` dependency. This also prevents the `picocli-codegen` module from being included in the artifact the module produces as a transitive dependency. ``` info.picocli picocli 4.0.0-beta-1b info.picocli picocli-codegen 4.0.0-beta-1b true ``` See Processor Options below. ##### Gradle Use the `annotationProcessor` path in Gradle [4.6 and higher](https://docs.gradle.org/4.6/release-notes.html#convenient-declaration-of-annotation-processor-dependencies): ``` dependencies { compile 'info.picocli:picocli:4.0.0-beta-1b' annotationProcessor 'info.picocli:picocli-codegen:4.0.0-beta-1b' } ``` For Gradle versions prior to 4.6, use `compileOnly`, to prevent the `picocli-codegen` jar from being a transitive dependency included in the artifact the module produces. ``` dependencies { compile 'info.picocli:picocli:4.0.0-beta-1b' compileOnly 'info.picocli:picocli-codegen:4.0.0-beta-1b' } ``` #### Picocli Processor Options The picocli annotation processor supports the options below. ##### Recommended Options * `project` - output subdirectory The generated files are written to `META-INF/native-image/picocli-generated/${project}`. The `project` option can be omitted, but it is a good idea to specify the `project` option with a unique value for your project (e.g. `${groupId}/${artifactId}`) if your jar may be [shaded](https://stackoverflow.com/a/49811665) with other jars into an uberjar. ##### Other Options * `other.resource.patterns` - comma-separated list of regular expressions matching additional resources to include in the image * `other.resource.bundles` - comma-separated list of the base names of additional resource bundles to include in the image * `other.proxy.interfaces` - comma-separated list of the fully qualified class names of additional interfaces for which to generate proxy classes when building the image * `disable.proxy.config` - don’t generate `proxy-config.json` * `disable.reflect.config` - don’t generate `reflect-config.json` * `disable.resource.config` - don’t generate `resources-config.json` ##### Javac To pass an annotation processor option with `javac`, specify the `-A` command line option: ``` javac -Aproject=org.myorg.myproject/myapp -cp ... ``` The `-A` option lets you pass options to annotation processors. See the [javac documentation](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javac.html) for details. ##### Maven To set an annotation processor option in Maven, you need to use the `maven-compiler-plugin` and configure the `compilerArgs` section. ``` org.apache.maven.plugins maven-compiler-plugin ${maven-compiler-plugin-version} -Aproject=${groupId}/${artifactId} ``` See https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html for details. #### Gradle Example To set an annotation processor option in Gradle, add these options to the `options.compilerArgs` list in the `compileJava` block. ``` compileJava { // minimum 1.6 sourceCompatibility = ${java-version} targetCompatibility = ${java-version} options.compilerArgs += ["-Aproject=${project.group}/${project.name}"] } ``` See the [Gradle documentation](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.compile.CompileOptions.html) for details. ### Negatable Options From picocli 4.0, options can be `negatable`. ```java class App { @Option(names = "--verbose", negatable = true) boolean verbose; @Option(names = "-XX:+PrintGCDetails", negatable = true) boolean printGCDetails; @Option(names = "-XX:-UseG1GC", negatable = true) boolean useG1GC = true; } ``` When an option is negatable, picocli will recognize negative aliases of the option on the command line. For *nix-style long options, aliases have the prefix 'no-' to the given names. For Java JVM-style options, the `:+` is turned into `:-` and vice versa. (This can be changed by customizing the `INegatableOptionTransformer`.) If the negated form of the option is found, for example `--no-verbose`, the value is set to the provided default. Otherwise, with a regular call, for example `--verbose`, it is set to the opposite of the default. ## Fixed issues - [#500] Add a generic and extensible picocli annotation processor - [#699] Add annotation processor that generates `reflect-config.json` during build - [#703] Add annotation processor that generates `resource-config.json` during build - [#704] Add annotation processor that generates `proxy-config.json` during build - [#707] Add example maven/gradle projects that demonstrate using the annotation processor - [#711] API: Create separate `picocli-groovy` module, make `picocli` an explicit module (a modular multiversion jar) - [#694] API: `negatable` boolean options. Thanks to [Michael D. Adams](https://github.com/adamsmd) for the feature request. - [#712] Boolean options should not toggle by default, to be consistent with negatable options - [#709] Fix scrambled characters for the `±` character when running on system with non-UTF8 encoding - [#717] Fix unmappable character for encoding ASCII by setting compiler encoding to UTF8 explicitly. Thanks to [Liam Esteban Prince](https://github.com/leliamesteban) for raising this. - [#697] Option sort in usage help should ignore option name prefix; long options without short name should be inserted alphabetically, instead of always appear at the top. - [#695] Fix runtime warnings about illegal reflective access to field `java.io.FilterOutputStream.out`. Thanks to [gitfineon](https://github.com/gitfineon) for reporting this issue. - [#698] Reduce `reflect-config.json` used by GraalVM native-image generation - [#700] Change default exit codes to `1` for Exceptions in client code, `2` for invalid usage. Add links to `ExitCode` javadoc. - [#715] processor tests should not fail when running in different locale - [#710] Let annotation processor validate negatable options, usageHelp options - [#716] Revert `@Inherited` annotation for `@Command`. Thanks to [Mikusch](https://github.com/Mikusch) for raising this. ## Deprecations ## Potential breaking changes ### `picocli.groovy` Classes Moved to Separate Artifact From this release the main `picocli-4.x` artifact no longer contains the `picocli.groovy` classes: these have been split off into a separate `picocli-groovy-4.x` artifact. Scripts upgrading to picocli 4.0 must change more than just the version number! Scripts should use `@Grab('info.picocli:picocli-groovy:4.x')` from version 4.0, `@Grab('info.picocli:picocli:4.x')` will not work. ### Option Order Changed Previously, options that only have a long name (and do not have a short name) were always shown before options with a short name. From this release, they are inserted in the option list by their first non-prefix letter. This may break tests that expect a specific help message. ### Boolean Options Do Not Toggle By Default From this release, when a flag option is specified on the command line picocli will set its value to the opposite of its _default_ value. Prior to 4.0, the default was to "toggle" boolean flags to the opposite of their _current_ value: if the previous value was `true` it is set to `false`, and when the value was `false` it is set to `true`. Applications can call `CommandLine.setToggleBooleanFlags(true)` to enable toggling. Note that when toggling is enabled, specifying a flag option twice on the command line will have no effect because they cancel each other out. ### Revert `@Inherited` annotation on `@Command` The `@Inherited` annotated that was added to `@Command` in picocli 4.0.0-alpha-2 turned out to cause issues in scenarios with multiple levels of inheritance and is reverted in this release. # Picocli 4.0.0-alpha-3 The picocli community is pleased to announce picocli 4.0.0-alpha-3. This release adds improved support for command execution via the new `execute` method. This method returns an exit code that applications can use to call `System.exit`. The older `run`, `call`, `invoke` and `parseWithHandlers` convenience methods that were similar to `execute` but had limited support for parser configuration and and limited support for exit codes are deprecated from this release. This release also improves the picocli tools for configuring GraalVM native image builds: there is now support for commands with resource bundles and jewelcli-style `@Command`-annotated interfaces for which picocli generates a dynamic proxy. _Please try this and provide feedback. We can still make changes._ _What do you think of the `@ArgGroup` annotations API? What about the programmatic API? Does it work as expected? Are the input validation error messages correct and clear? Is the documentation clear and complete? Anything you want to change or improve? Any other feedback?_ Many thanks to the picocli community for the contributions! This is the fifty-fourth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.0.0-alpha-3-new) * [Fixed issues](#4.0.0-alpha-3-fixes) * [Deprecations](#4.0.0-alpha-3-deprecated) * [Potential breaking changes](#4.0.0-alpha-3-breaking-changes) ## New and Noteworthy ### Executing Commands Picocli 4.0 introduces new API to execute commands. Let’s take a quick look at what changed. #### Exit Code Many command line applications return an [exit code](https://en.wikipedia.org/wiki/Exit_status) to signify success or failure. Zero often means success, a non-zero exit code is often used for errors, but other than that, meanings differ per application. The new `CommandLine.execute` method introduced in picocli 4.0 returns an `int`, and applications can use this return value to call `System.exit` if desired. For example: ```java public static void main(String... args) { CommandLine cmd = new CommandLine(new App()); int exitCode = cmd.execute(args); System.exit(exitCode); } ``` Older versions of picocli had some limited exit code support where picocli would call `System.exit`, but this is now deprecated. #### Generating an Exit Code `@Command`-annotated classes that implement `Callable` and `@Command`-annotated methods can simply return an `int` or `Integer`, and this value will be returned from `CommandLine.execute`. For example: ```java @Command(name = "greet") class Greet implements Callable { public Integer call() { System.out.println("hi"); return 1; } @Command int shout() { System.out.println("HI!"); return 2; } } assert 1 == new CommandLine(new Greet()).execute(); assert 2 == new CommandLine(new Greet()).execute("shout"); ``` Commands with a user object that implements `Runnable` can implement the `IExitCodeGenerator` interface to generate an exit code. For example: ```java @Command(name = "wave") class Gesture implements Runnable, IExitCodeGenerator { public void run() { System.out.println("wave"); } public int getExitCode() { return 3; } } assert 3 == new CommandLine(new Gesture()).execute(); ``` #### Exception Exit Codes By default, the `execute` method returns `CommandLine.ExitCode.USAGE` (`64`) for invalid input, and `CommandLine.ExitCode.SOFTWARE` (`70`) when an exception occurred in the Runnable, Callable or command method. (For reference, these values are `EX_USAGE` and `EX_SOFTWARE`, respectively, from Unix and Linux [sysexits.h](https://www.freebsd.org/cgi/man.cgi?query=sysexits&sektion=3)). This can be customized with the `@Command` annotation. For example: ```java @Command(exitCodeOnInvalidInput = 123, exitCodeOnExecutionException = 456) ``` Additionally, applications can configure a `IExitCodeExceptionMapper` to map a specific exception to an exit code: ```java class MyMapper implements IExitCodeExceptionMapper { public int getExitCode(Throwable t) { if (t instance of FileNotFoundException) { return 74; } return 1; } } ``` When the end user specified invalid input, the `execute` method prints an error message followed by the usage help message of the command, and returns an exit code. This can be customized by configuring a `IParameterExceptionHandler`. If the business logic of the command throws an exception, the `execute` method prints the stack trace of the exception and returns an exit code. This can be customized by configuring a `IExecutionExceptionHandler`. #### Configuration The new `CommandLine.execute` method is an instance method. The older `run`, `call` and `invoke` methods are static methods. Static methods don’t allow configuration. The new API lets applications configure the parser or other aspects before execution. For example: ```java public static void main(String... args) { CommandLine cmd = new CommandLine(new App()); cmd.setCaseInsensitiveEnumValuesAllowed(true); cmd.setUnmarchedArgumentsAllowed(true); cmd.setStopAtPositional(true); cmd.setExpandAtFiles(false); cmd.execute(args); } ``` #### Execution Configuration The following configuration methods are new and are only applicable with the `execute` method (and `executeHelpRequest`): * get/setOut * get/setErr * get/setColorScheme * get/setExecutionStrategy * get/setParameterExceptionHandler * get/setExecutionExceptionHandler * get/setExitCodeExceptionMapper The above methods are not applicable (and ignored) with other entry points like `parse`, `parseArgs`, `populateCommand`, `run`, `call`, `invoke`, `parseWithHandler` and `parseWithHandlers`. #### API Evolution and Trade-offs Previous versions of picocli offered the `run`, `call` and `invoke` methods to execute a `Runnable`, `Callable` or `Method` command. Here are some trade-offs versus the new `execute` method: * *Static* - These are static methods, with the drawback that they don't allow configuration, as mentioned above. * *Type Safety* - It is a compile-time error when an application tries to pass anything else than a `Runnable` to the `run` method, and a `Callable` to the `call` method. The `execute` method does not have this type safety, since the `CommandLine` constructor allows any `Object` as a parameter. * *Return Value* - The `call` and `invoke` static methods allow commands to return _any_ value, while the `execute` method only returns an `int` exit code. From 4.0 the result object will be available from the `CommandLine.getExecutionResult` method. #### Feedback Requested With the new execute API the `ColorScheme` class will start to play a more central role. I decided to make the `ColorScheme` class immutable from this release. This is a breaking API change. Should it be deprecated first, or not changed at all, or is the 4.0 release a good time to make breaking changes? Your feedback is very welcome on https://github.com/remkop/picocli/issues/675. ### Tools for Configuring GraalVM Native Image Builds The `picocli-codegen` module now has two new tools, in addition to the existing `ReflectionConfigGenerator`: * ResourceConfigGenerator * DynamicProxyConfigGenerator #### ResourceConfigGenerator The GraalVM native-image builder by default will not integrate any of the [classpath resources](https://github.com/oracle/graal/blob/master/substratevm/Resources.md) into the image it creates. `ResourceConfigGenerator` generates a JSON String with the resource bundles and other classpath resources that should be included in the Substrate VM native image. The output of `ResourceConfigGenerator` is intended to be passed to the `-H:ResourceConfigurationFiles=/path/to/reflect-config.json` option of the `native-image` GraalVM utility, or placed in a `META-INF/native-image/` subdirectory of the JAR. This allows picocli-based native image applications to access these resources. #### DynamicProxyConfigGenerator Substrate VM doesn't provide machinery for generating and interpreting bytecodes at run time. Therefore all dynamic proxy classes [need to be generated](https://github.com/oracle/graal/blob/master/substratevm/DynamicProxy.md) at native image build time. `DynamicProxyConfigGenerator` generates a JSON String with the fully qualified interface names for which dynamic proxy classes should be generated at native image build time. The output of `DynamicProxyConfigGenerator` is intended to be passed to the `-H:DynamicProxyConfigurationFiles=/path/to/proxy-config.json` option of the `native-image` GraalVM utility, or placed in a `META-INF/native-image/` subdirectory of the JAR. This allows picocli-based native image applications that use `@Command`-annotated interfaces with `@Option` and `@Parameters`-annotated methods. ## Fixed issues - [#516] API: Add support for color schemes in the convenience methods and associated classes and interfaces. Thanks to [Bob Tiernay](https://github.com/bobtiernay-okta) for the suggestion. - [#561] API: Parser configuration for convenience methods. - [#650] API: Global parser configuration if using Runnable. Thanks to [gitfineon](https://github.com/gitfineon) for raising this. - [#424] API: Exit on help, version or invalid arguments. Thanks to [Gerard Bosch](https://github.com/gerardbosch) for raising this. - [#541] API: Improved exception handling for Runnable/Callable. - [#680] API: Add annotation API for exitCodeList and exitCodeListHeading. - [#611] API: Add `CommandLine.addSubcommand` overloaded method without name or alias. Thanks to [andrewbleonard](https://github.com/andrewbleonard) for the request. - [#684] API: Make `CommandLine.defaultFactory` method public. - [#675] API: Make `Help.ColorScheme` immutable. This is a breaking API change. - [#673] API: Deprecate `CommandLine.Range` public fields, add accessor methods to use instead. - [#663] How to remove stacktraces on error. Thanks to [Nicolas Mingo](https://github.com/nicolasmingo) and [jrevault](https://github.com/jrevault) for raising this and subsequent discussion. - [#672] Need way to send errors back from subcommand. Thanks to [Garret Wilson](https://github.com/garretwilson) for raising this. - [#678] Exit Status section in usage help message. - [#683] Ensure exitCodeList implementation is consistent with other usage message attributes. - [#575] Codegen: Use mixinStandardHelpOptions in `AutoComplete$App` (add support for the `--version` option) - [#645] Codegen: Exclude Jansi Console from generated GraalVM reflection configuration. Thanks to [shanetreacy](https://github.com/shanetreacy) for raising this. - [#686] Codegen: Add support for `@Command` interfaces (dynamic proxies) in GraalVM native image. - [#669] Codegen: Add support for resource bundles in GraalVM native image. - [#691] Codegen bugfix: `ReflectionConfigGenerator` should not generate config for `picocli.CommandLine$Model$ObjectScope`. - [#674] JPMS module: move module-info.class to root of jar. - [#676] Bugfix: non-defined variables in `defaultValue` now correctly resolve to `null`, and options and positional parameters are now correctly considered `required` only if their default value is `null` after variable interpolation. Thanks to [ifedorenko](https://github.com/ifedorenko) for raising this. - [#682] Bugfix: incorrect evaluation for multiple occurrences of a variable. - [#689] NPE in codegen OutputFileMixin. - [#679] Documentation: Update examples for new execute API. Add examples for exit code control and custom exception handlers. - [#681] Documentation: Add exit code section to Internationalization example in user manual. ## Deprecations ### Convenience Methods Replaced by `execute` All variants of the `run`, `call`, `invoke`, and `parseWithHandlers` methods are deprecated from this release, in favor of the new `execute` method. Similarly, the following classes and interfaces are deprecated: * `IParseResultHandler2` is deprecated in favor of the new `IExecutionStrategy` interface. * `IExceptionHandler2` is deprecated in favor of the new `IParameterExceptionHandler` `IExecutionExceptionHandler` interfaces. * The `AbstractHandler` and `AbstractParseResultHandler` classes are deprecated with no replacement. ### Range The public fields of the `Range` class have been deprecated and public methods `min()`, `max()`, `isVariable()` have been added that should be used instead. ## Potential breaking changes The `Help.ColorScheme` class has been made immutable. Its public fields are no longer public. A new `Help.ColorScheme.Builder` class has been introduced to create `ColorScheme` instances. This is a breaking API change: I could not think of a way to do this without breaking backwards compatibility. # Picocli 4.0.0-alpha-2 The picocli community is pleased to announce picocli 4.0.0-alpha-2. Thanks to great feedback from the picocli community on the 4.0.0-alpha-1 release, this release contains many argument group-related bugfixes. See the [4.0.0-alpha-1 New and Noteworthy section](#4.0.0-alpha-1-new) below for more details on argument groups. _Please try this and provide feedback. We can still make changes._ _What do you think of the annotations API? What about the programmatic API? Does it work as expected? Are the input validation error messages correct and clear? Is the documentation clear and complete? Anything you want to change or improve? Any other feedback?_ This release also has support for variable expansion and improved support for Chinese, Japanese and Korean. Many thanks to the picocli community for the contributions! This is the fifty-third public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.0.0-alpha-2-new) * [Fixed issues](#4.0.0-alpha-2-fixes) * [Deprecations](#4.0.0-alpha-2-deprecated) * [Potential breaking changes](#4.0.0-alpha-2-breaking-changes) ## New and Noteworthy ### Argument Groups Many bugfixes for argument groups. ### Variable Interpolation From this release, picocli supports variable interpolation (variable expansion) in annotation attributes as well as in text attributes of the programmatic API. #### Variable Interpolation Example ```java @Command(name = "status", description = "This command logs the status for ${PARENT-COMMAND-NAME}.") class Status { @Option(names = {"${dirOptionName1:--d}", "${dirOptionName2:---directories}"}, // -d or --directories description = {"Specify one or more directories, separated by '${sys:path.separator}'.", "The default is the user home directory (${DEFAULT-VALUE})."}, arity = "${sys:dirOptionArity:-1..*}", defaultValue = "${sys:user.home}", split = "${sys:path.separator}") String[] directories; } ``` #### Predefined Variables The following variables are predefined: * `${DEFAULT-VALUE}`: (since 3.2) - can be used in the description for an option or positional parameter, replaced with the default value for that option or positional parameter * `${COMPLETION-CANDIDATES}`: (since 3.2) - can be used in the description for an option or positional parameter, replaced with the completion candidates for that option or positional parameter * `${COMMAND-NAME}`: (since 4.0) - can be used in any section of the usage help message for a command, replaced with the name of the command * `${COMMAND-FULL-NAME}`: (since 4.0) - can be used in any section of the usage help message for a command, replaced with the fully qualified name of the command (that is, preceded by its parent fully qualified name) * `${PARENT-COMMAND-NAME}`: (since 4.0) - can be used in any section of the usage help message for a command, replaced with the name of its parent command * `${PARENT-COMMAND-FULL-NAME}`: (since 4.0) - can be used in any section of the usage help message for a command, replaced with the fully qualified name of its parent command (that is, preceded by the name(s) of the parent command's ancestor commands) #### Custom Variables In addition, you can define your own variables. Currently the following syntaxes are supported: * `${sys:key}`: system property lookup, replaced by the value of `System.getProperty("key")` * `${env:key}`: environment variable lookup, replaced by the value of `System.getEnv("key")` * `${bundle:key}`: look up the value of `key` in the resource bundle of the command * `${key}`: search all of the above, first system properties, then environment variables, and finally the resource bundle of the command #### Default Values for Custom Variables You can specify a default value to use when no value is found for a custom variable. The syntax for specifying a default is `${a:-b}`, where `a` is the variable name and `b` is the default value to use if `a` is not found. So, for the individual lookups, this looks like this: ``` ${key:-defaultValue} ${sys:key:-defaultValue} ${env:key:-defaultValue} ${bundle:key:-defaultValue} ``` The default value may contain other custom variables. For example: ``` ${bundle:a:-${env:b:-${sys:c:-X}}} ``` The above variable is expanded as follows. First, try to find key `a` in the command's resource bundle. If `a` is not found in the resource bundle, get the value of environment variable `b`. If no environment variable `b` exists, get the value of system property `c`. Finally, no system property `c` exists, the value of the expression becomes `X`. #### Escaping Variables Sometimes you want to show a string like `"${VAR}"` in a description. A `$` character can be escaped with another `$` character. Therefore, `$${VAR}` will not be interpreted as a `VAR` variable, but will be replaced by `${VAR}` instead. #### Switching Off Variable Interpolation Variable interpolation can be switched off for the full command hierarchy by calling `CommandLine.setInterpolateVariables(false)`, or for a particular command by calling `CommandSpec.interpolateVariables(false)`. #### Limitations of Variable Interpolation Some attribute values need to be resolved early, when the model is constructed from the annotation values. Specifically: * command names and aliases, option names, mixin names * `arity` (for options and positional parameters) * `index` (for positional parameters) * `separator` (for commands) It is possible for these attributes to contain variables, but be aware of the limitations. If these attributes have variables, and the variables get a different value after the model is constructed, the change will not be reflected in the model. ### Improved Support for Chinese, Japanese and Korean Picocli will align the usage help message to fit within some user-defined width (80 columns by default). A number of characters in Chinese, Japanese and Korean (CJK) are wider than others. If those characters are treated to have the same width as other characters, the usage help message may extend past the right margin. From this release, picocli will use 2 columns for these wide characters when calculating where to put line breaks, resulting in better usage help message text. This can be switched off with `CommandLine.setAdjustLineBreaksForWideCJKCharacters(false)`. ## Fixed issues - [#495] Publish picocli as a JPMS module in a new artifact `picocli-core-module`. Thanks to [Warkdev](https://github.com/Warkdev) for the pull request. - [#21] Count double-width Asian characters as two characters for line-breaking purposes. - [#526] Add support for variable interpolation in message strings. Thanks to [Bob Tiernay](https://github.com/bobtiernay-okta) for the suggestion. - [#660] Added `@java.lang.annotation.Inherited` to the `@picocli.CommandLine.Command` annotation. Thanks to [Devin Smith](https://github.com/devinrsmith) for the suggestion. - [#661] Bugfix for stack overflow when option in an argument group had a default value. Thanks to [Andreas Deininger](https://github.com/deining) for reporting this. - [#656] Bugfix for issue where synopsis for composite argument groups did not expand for n..* (n > 1). Thanks to Arno Tuomainen for finding this issue. - [#654] Bugfix: argument group heading text was not retrieved from ResourceBundle. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. - [#635] Bugfix in argument group validation: did not show an error if some but not all parts of a co-occurring group were specified. Thanks to [Philipp Hanslovsky](https://github.com/hanslovsky) for the pull request. - [#653] Bugfix: argument group validation should be skipped if help was requested. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. - [#655] Bugfix: argument group validation silently accepts missing subgroup with multiplicity=1. - [#652] Documentation: fixes in user manual. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. - [#651] Documentation: fixes in user manual. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. ## Deprecations No features were deprecated in this release. ## Potential breaking changes The following classes and methods introduced in 4.0.0-alpha-1 have been renamed: Classes: * `picocli.CommandLine.ParseResult.MatchedGroup` -> `picocli.CommandLine.ParseResult.GroupMatchContainer` * `picocli.CommandLine.ParseResult.MatchedGroupMultiple` -> `picocli.CommandLine.ParseResult.GroupMatch` Methods: * `ParseResult::getMatchedGroupMultiples` has been renamed to `ParseResult::getGroupMatches` * `ParseResult::findMatchedGroup(ArgGroupSpec)` has been renamed to `ParseResult::findMatches(ArgGroupSpec)` Removed: These may be implemented in a future version. * `picocli.CommandLine.Option.excludes()` and `picocli.CommandLine.Parameters.excludes()` * `picocli.CommandLine.Option.needs(()` and `picocli.CommandLine.Parameters.needs(()` # Picocli 3.9.6 The picocli community is pleased to announce picocli 3.9.6. This release improves support for interactive (password) options: * interactive options can now use type `char[]` instead of String, to allow applications to null out the array after use so that sensitive information is no longer resident in memory * interactive options can be optionally interactive if configured with `arity = "0..1"` This is the fifty-second public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.9.6-new) * [Fixed issues](#3.9.6-fixes) * [Deprecations](#3.9.6-deprecated) * [Potential breaking changes](#3.9.6-breaking-changes) ## New and Noteworthy This release improves support for interactive (password) options: * interactive options can now use type `char[]` instead of String, to allow applications to null out the array after use so that sensitive information is no longer resident in memory * interactive options can be optionally interactive if configured with `arity = "0..1"` For example, if an application has these options: ```java @Option(names = "--user") String user; @Option(names = "--password", arity = "0..1", interactive = true) char[] password; ``` With the following input, the `password` field will be initialized to `"123"` without prompting the user for input: ``` --password 123 --user Joe ``` However, if the password is not specified, the user will be prompted to enter a value. In the following example, the password option has no parameter, so the user will be prompted to type in a value on the console: ``` --password --user Joe ``` ## Fixed issues * [#657] Support type `char[]` for interactive options. Thanks to [Lukáš Petrovický](https://github.com/triceo) for raising this issue. * [#536] Support optionally interactive options. Thanks to [Lukas Heumos](https://github.com/Zethson) for raising this issue. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 4.0.0-alpha-1 The picocli community is pleased to announce picocli 4.0.0-alpha-1. This release adds support for argument groups (incubating). Argument groups enable the following: * mutually exclusive options * options that must co-occur (dependent options) * option sections in the usage help message * repeating composite arguments See the [New and Noteworthy section](#4.0.0-alpha-1-new) below for more details. _Please try this and provide feedback. We can still make changes._ _What do you think of the annotations API? What about the programmatic API? Does it work as expected? Are the input validation error messages correct and clear? Is the documentation clear and complete? Anything you want to change or improve? Any other feedback?_ Many thanks to the picocli community members who contributed! This is the fifty-first public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#4.0.0-alpha-1-new) * [Fixed issues](#4.0.0-alpha-1-fixes) * [Deprecations](#4.0.0-alpha-1-deprecated) * [Potential breaking changes](#4.0.0-alpha-1-breaking-changes) ## New and Noteworthy ### Argument Groups (Incubating) This release introduces a new `@ArgGroup` annotation and its `ArgGroupSpec` programmatic equivalent. Argument Groups can be used to define: * mutually exclusive options * options that must co-occur (dependent options) * option sections in the usage help message * repeating composite arguments To create a group using the annotations API, annotate a field or method with `@ArgGroup`. The field's type refers to the class containing the options and positional parameters in the group. (For annotated interface methods this would be the return type, for annotated setter methods in a concrete class this would be the setter's parameter type.) Picocli will instantiate this class as necessary to capture command line argument values in the `@Option` and `@Parameters`-annotated fields and methods of this class. #### Mutually Exclusive Options Annotate a field or method with `@ArgGroup(exclusive = true)` to create a group of mutually exclusive options and positional parameters. For example: ```java @Command(name = "exclusivedemo") public class MutuallyExclusiveOptionsDemo { @ArgGroup(exclusive = true, multiplicity = "1") Exclusive exclusive; static class Exclusive { @Option(names = "-a", required = true) int a; @Option(names = "-b", required = true) int b; @Option(names = "-c", required = true) int c; } } ``` The above example defines a command with mutually exclusive options `-a`, `-b` and `-c`. The group itself has a `multiplicity` attribute that defines how many times the group may be specified within the command. The default is `multiplicity = "0..1"`, meaning that by default a group may be omitted or specified once. In this example the group has `multiplicity = "1"`, so the group must occur once: one of the exclusive options must occur on the command line. The synopsis of this command is `exclusivedemo (-a= | -b= | -c=)`. Note that the options are defined as `required = true`; this means required _within the group_, not required within the command. Picocli will validate the arguments and throw a `MutuallyExclusiveArgsException` if multiple mutually exclusive arguments were specified. For example: ```java MutuallyExclusiveOptionsDemo example = new MutuallyExclusiveOptionsDemo(); CommandLine cmd = new CommandLine(example); try { cmd.parseArgs("-a=1", "-b=2"); } catch (MutuallyExclusiveArgsException ex) { assert "Error: -a=, -b= are mutually exclusive (specify only one)" .equals(ex.getMessage()); } ``` For the above group, only one of the options can be specified. Any other combination of options, or the absence of options, is invalid. #### Co-occurring (Dependent) Options Annotate a field or method with `@ArgGroup(exclusive = false)` to create a group of dependent options and positional parameters that must co-occur. For example: ```java @Command(name = "co-occur") public class DependentOptionsDemo { @ArgGroup(exclusive = false) Dependent dependent; static class Dependent { @Option(names = "-a", required = true) int a; @Option(names = "-b", required = true) int b; @Option(names = "-c", required = true) int c; } } ``` The above example defines a command with dependent options `-a`, `-b` and `-c` that must co-occur. The group itself has a `multiplicity` attribute that defines how many times the group may be specified within the command. In this example the group uses the default multiplicity, `multiplicity = "0..1"`, meaning that the group may be omitted or specified once. The synopsis of this command is `co-occur [-a= -b= -c=]`. Note that the options are defined as `required = true`; this means required _within the group_, not required within the command. Picocli will validate the arguments and throw a `MissingParameterException` if not all dependent arguments were specified. For example: ```java DependentOptionsDemo example = new DependentOptionsDemo(); CommandLine cmd = new CommandLine(example); try { cmd.parseArgs("-a=1", "-b=2"); } catch (MissingParameterException ex) { assert "Error: Missing required argument(s): -c=".equals(ex.getMessage()); } ``` #### Option Sections in Usage Help The example below uses groups to define options sections in the usage help. When a group has a non-null `heading` (or `headingKey`), the options in the group are given the specified heading in the usage help message. The `headingKey` attribute can be used to get the heading text from the command's resource bundle. This works for mutually exclusive or co-occurring groups, but it is also possible to define a group that does no validation but only creates an option section in the usage help. Annotate a field or method with `@ArgGroup(validate = false)` to create a group for display purposes only. For example: ```java @Command(name = "sectiondemo", description = "Section demo") public class OptionSectionDemo { @ArgGroup(validate = false, heading = "This is the first section%n") Section1 section1; static class Section1 { @Option(names = "-a", description = "Option A") int a; @Option(names = "-b", description = "Option B") int b; @Option(names = "-c", description = "Option C") int c; } @ArgGroup(validate = false, heading = "This is the second section%n") Section2 section2; static class Section2 { @Option(names = "-x", description = "Option X") int x; @Option(names = "-y", description = "Option Y") int y; @Option(names = "-z", description = "Option X") int z; } public static void main(String[] args) { new CommandLine(new OptionSectionDemo()).usage(System.out); } } ``` This prints the following usage help message: ``` Usage: sectiondemo [-a=] [-b=] [-c=] [-x=] [-y=] [-z=] Section demo This is the first section -a= Option A -b= Option B -c= Option C This is the second section -x= Option X -y= Option Y -z= Option X ``` Note that the heading text must end with `%n` to insert a newline between the heading text and the first option. This is for consistency with other headings in the usage help, like `@Command(headerHeading = "Usage:%n", optionListHeading = "%nOptions:%n")`. #### Repeating Composite Argument Groups The below example shows how groups can be composed of other groups, and how arrays and collections can be used to capture repeating groups (with a `multiplicity` greater than one): ```java public class CompositeGroupDemo { @ArgGroup(exclusive = false, multiplicity = "1..*") List composites; static class Composite { @ArgGroup(exclusive = false, multiplicity = "1") Dependent dependent; @ArgGroup(exclusive = true, multiplicity = "1") Exclusive exclusive; } static class Dependent { @Option(names = "-a", required = true) int a; @Option(names = "-b", required = true) int b; @Option(names = "-c", required = true) int c; } static class Exclusive { @Option(names = "-x", required = true) boolean x; @Option(names = "-y", required = true) boolean y; @Option(names = "-z", required = true) boolean z; } } ``` In the above example, the annotated `composites` field defines a composite group that must be specified at least once, and may be specified many times, on the command line. Each time the group is matched, picocli creates an instance of the `Composite` class and adds it to the `composites` list. The `Composite` class itself contains two groups: a group of dependent options that must co-occur, and another group of mutually exclusive options. Both of these subgroups have `multiplicity = "1"`, so they can occur exactly once for each multiple of the `Composite` group. The below example illustrates: ```java CompositeGroupDemo example = new CompositeGroupDemo(); CommandLine cmd = new CommandLine(example); cmd.parseArgs("-x", "-a=1", "-b=1", "-c=1", "-a=2", "-b=2", "-c=2", "-y"); assert example.composites.size() == 2; Composite c1 = example.composites.get(0); assert c1.exclusive.x; assert c1.dependent.a == 1; assert c1.dependent.b == 1; assert c1.dependent.c == 1; Composite c2 = example.composites.get(1); assert c2.exclusive.y; assert c2.dependent.a == 2; assert c2.dependent.b == 2; assert c2.dependent.c == 2; ``` #### Positional Parameters When a `@Parameters` positional parameter is part of a group, its `index` is the index _within the group_, not within the command. #### Limitations and Points of Caution * Options with the same name cannot be defined in multiple groups. Similarly, it is not possible to define an option outside of a group with the same name as a different option that is part of a group. * Positional parameters in a single group work fine, but take care (or avoid) defining positional parameters in multiple groups or positional parameters in a group as well as outside a group. Positional parameters are matched by index, and while the index of a group is reset when a new group multiple is encountered, the index of positional parameters outside a group only increases and is never reset. ## Fixed issues - [#643] Change `%` to `%%` when using `${DEFAULT-VALUE}` in option description. Thanks to [Steffen Rehberg](https://github.com/StefRe) for the pull request. - [#638] Document fallback descriptionKey for options and parameters in user manual. Thanks to [Mikusch](https://github.com/Mikusch) for the suggestion. - [#199] mutually exclusive options - [#295] options that must co-occur (dependent options) - [#450] option grouping in the usage help message - [#358] (also [#635]) repeating composite arguments (this should also cover the use cases presented in #454 and #434 requests for repeatable subcommands) ## Deprecations No features were deprecated in this release. ## Potential breaking changes No breaking changes in this release. # Picocli 3.9.5 The picocli community is pleased to announce picocli 3.9.5. This release contains a critical workaround to protect against JVM crashes when running on RedHat Linux 3.10.0-327.44.2.el7.x86_64. Picocli 3.9.0 introduced a change in the heuristics for emitting ANSI escape characters. As part of this change, picocli may load the `org.fusesource.jansi.AnsiConsole` class from the JAnsi library when not running on Windows. This may crash the JVM (see [fusesource/jansi-native#17](https://github.com/fusesource/jansi-native/issues/17)). The workaround in this release is to only load the `AnsiConsole` class when running on Windows. Users using 3.9.0 and higher are strongly recommended to upgrade to 3.9.5 or later. This is the fiftieth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.9.5-new) * [Fixed issues](#3.9.5-fixes) * [Deprecations](#3.9.5-deprecated) * [Potential breaking changes](#3.9.5-breaking-changes) ## New and Noteworthy ## Fixed issues - [#630] Avoid loading `org.fusesource.jansi.AnsiConsole` when not running on Windows to avoid JVM crashes on non-Windows platforms. - [#632] ReflectionConfigGenerator now specifies the `allowWrite = true` attribute for final fields. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 3.9.4 The picocli community is pleased to announce picocli 3.9.4. This release contains bugfixes and enhancements. From this release, `enum`-typed options and positional parameters that are multi-value can be stored in `EnumSet` collections (in addition to other Collections, arrays and Maps). Also, a better error message is now shown when unknown options are encountered while processing clustered short options. The new error message includes both the failing part and the original command line argument. Bugfixes: * `ReflectionConfigGenerator` incorrectly listed superclass fields as fields of the concrete subclass, causing "GraalVM error: Error parsing reflection configuration in json" when creating a native image. * Method subcommands in commands that subclass another command caused `InitializationException`. This is the forty-ninth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.9.4-new) * [Fixed issues](#3.9.4-fixes) * [Deprecations](#3.9.4-deprecated) * [Potential breaking changes](#3.9.4-breaking-changes) ## New and Noteworthy ## Fixed issues - [#628] Add support for collecting `enum` multi-value options and positional parameters in `EnumSet<>` collections. Thanks to [Lee Atkinson](https://github.com/leeatkinson) for raising this. - [#619] Bugfix: Method subcommands in commands that subclass another command caused `InitializationException`: "Another subcommand named 'method' already exists...". Thanks to [PorygonZRocks](https://github.com/PorygonZRocks) for the bug report. - [#622] Bugfix: `ReflectionConfigGenerator` incorrectly listed superclass fields as fields of the concrete subclass, causing "GraalVM error: Error parsing reflection configuration in json". Thanks to [Sebastian Thomschke](https://github.com/sebthom) for the bug report. - [#623] `ReflectionConfigGenerator` now generates json in alphabetic order. - [#627] Improve error message for unknown options when processing clustered short options. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 3.9.3 The picocli community is pleased to announce picocli 3.9.3. This release contains bugfixes and enhancements. This is the forty-eight public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.9.3-new) * [Fixed issues](#3.9.3-fixes) * [Deprecations](#3.9.3-deprecated) * [Potential breaking changes](#3.9.3-breaking-changes) ## New and Noteworthy ## Fixed issues - [#613] Enhancement: Improve picocli heuristics for unmatched options: single-character arguments that don't exactly match options (like `-`) should be considered positional parameters. Thanks to [Oliver Weiler](https://github.com/helpermethod) for the bug report. - [#615] Bugfix: Opaque stacktrace for "%" in Option description. Thanks to [petermr](https://github.com/petermr) for the bug report. - [#616] Bugfix: showDefaultValues=true with defaultValueProvider did not render defaultValues in usage help. Thanks to [Sebastian Thomschke](https://github.com/sebthom) for the bug report. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 3.9.2 The picocli community is pleased to announce picocli 3.9.2. This release contains bugfixes and enhancements. Picocli now has a mailing list `picocli at googlegroups dot com`. Alternatively visit the [picocli Google group](https://groups.google.com/d/forum/picocli) web interface. The user manual has improved documentation for internationalization and localization, and the section on Dependency Injection now has a Spring Boot example and link to the Micronaut user manual. Bugfixes: `AutoComplete` now uses the specified `IFactory` correctly for `CommandLine`; defaulting `usageHelp` or `versionHelp` options no longer prevents validation of required options; and usage help for booleans options with `arity = "1"` now correctly show the option parameter in the synopsis. Many thanks to the many members of the picocli community who contributed pull requests, bug reports and participated in discussions! This is the forty-seventh public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.9.2-new) * [Fixed issues](#3.9.2-fixes) * [Deprecations](#3.9.2-deprecated) * [Potential breaking changes](#3.9.2-breaking-changes) ## New and Noteworthy Picocli now has a mailing list `picocli at googlegroups dot com`. Alternatively visit the [picocli Google group](https://groups.google.com/d/forum/picocli) web interface. The user manual has improved documentation for internationalization and localization. Dependency Injection is now a top-level section and now has a Spring Boot example and link to the Micronaut user manual. ## Fixed issues - [#602] Make `CommandLine` in `AutoComplete` use correct `IFactory` implementation. Thanks to [MikoÅ‚aj Krzyżanowski](https://github.com/MikolajK) for the pull request. - [#608] Bugfix: defaulting `usageHelp` or `versionHelp` options incorrectly prevented validation of required options and positional parameters. Thanks to [Pietro Braione](https://github.com/pietrobraione) for the bug report. - [#612] Bugfix: Usage help for booleans options with `arity = "1"` now correctly show the option parameter in synopsis. Thanks to [prewersk](https://github.com/prewersk) for the bug report. - [#606] Doc: Added subcommand example. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. - [#605] Doc: Improved documentation for internationalization and localization. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. - [#604] Doc: Improve user manual section on Dependency Injection: add Spring Boot example. Thanks to [Alistair Rutherford](https://github.com/alistairrutherford) for the example code. - [#610] Build: add JDKs to Travis CI build. - [#609] Created mailing list `picocli at googlegroups dot com`: [picocli Google group](https://groups.google.com/d/forum/picocli). ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 3.9.1 The picocli community is pleased to announce picocli 3.9.1. The `picocli.AutoComplete` application no longer calls `System.exit()` unless requested by setting system property `picocli.autocomplete.systemExitOnError` or `picocli.autocomplete.systemExitOnSuccess` to any value other than `false`. Applications that rely on the exit codes introduced in picocli 3.9.0 need to set these system properties. This release adds support for quoted map keys with embedded '=' characters. This release contains bugfixes and enhancements. This is the forty-sixth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.9.1-new) * [Fixed issues](#3.9.1-fixes) * [Deprecations](#3.9.1-deprecated) * [Potential breaking changes](#3.9.1-breaking-changes) ## New and Noteworthy ## Fixed issues - [#592] Error message now shows `enum` constant names, not `toString()` values, after value mismatch. Thanks to [startewho](https://github.com/startewho) for the bug report. - [#591] Replace some String concatenation in `picocli.AutoComplete` with StringBuilder. Thanks to [Sergio Escalante](https://github.com/sergioescala) for the pull request. - [#594] Add support for quoted map keys with embedded '=' characters. Thanks to [Pubudu Fernando](https://github.com/pubudu91) for the suggestion. - [#596] `picocli.AutoComplete` should not call `System.exit()` unless requested. Thanks to [Markus Heiden](https://github.com/markusheiden), [Bob Tiernay](https://github.com/bobtiernay-okta) and [RobertZenz](https://github.com/RobertZenz) for analysis and ideas contributing to the solution. - [#593] Use Gradle Bintray Plugin to publish artifacts to Bintray. ## Deprecations No features were deprecated in this release. ## Potential breaking changes The `picocli.AutoComplete` application no longer calls `System.exit()` unless requested by setting system property `picocli.autocomplete.systemExitOnError` or `picocli.autocomplete.systemExitOnSuccess` to any value other than `false`. Applications that rely on the exit codes introduced in picocli 3.9.0 need to set these system properties. The new support for quoted map keys with embedded '=' characters [#594] may inpact some existing applications. If `CommandLine::setTrimQuotes()` is set to `true`, quotes are now removed from map keys and map values. This did not use to be the case. For example: ```java class App { @Option(names = "-p") Map map; } ``` When `CommandLine::setTrimQuotes()` was set to `true`, given input like the below: ``` -p AppOptions="-Da=b -Dx=y" ``` The above used to result in a map with key `AppOptions` and value `"-Da=b -Dx=y"` (including the quotes), but the same program and input now results in a map with key `AppOptions` and value `-Da=b -Dx=y` (without quotes). Also, when `CommandLine::setTrimQuotes()` is `false` (the default), input like the below will now cause a `ParameterException` ("value should be in KEY=VALUE format"): ``` -p "AppOptions=-Da=b -Dx=y" ``` Prior to this release, the above was silently ignored (no errors but also no key-value pairs in the resulting map). # Picocli 3.9.0 The picocli community is pleased to announce picocli 3.9.0. This release contains bugfixes and enhancements in the main picocli module, and adds a new module: `picocli-shell-jline3`. The new module Picocli Shell JLine3 (`picocli-shell-jline3`) contains components and documentation for building interactive shell command line applications with JLine 3 and picocli. This release contains API enhancements to allow customization of the usage help message: * help section renderers can be added, replaced or removed * help section keys to reorder sections in the usage help message * help factory to create custom `Help` instances * option order attribute to reorder options in the usage help message option list This release also has improved heuristics to decide whether ANSI escape codes should be emitted or not. The simplified @-file (argument file) format is now fully compatible with JCommander: empty lines are ignored and comments may start with leading whitespace. The `picocli.Autocompletion` application now accepts a parameter specifying a custom factory, and returns a non-zero exit code on error, to facilitate incorporating it into the build. Bug fixes in this release: * `@Command` method options and positional parameter values are now cleared correctly when reusing a `CommandLine` instance * the default exception handler now correctly respects the exit code for all exceptions Finally, this release improves internal quality and robustness by increasing the test code coverage. About 300 tests were added to bring the total to 1300+ tests. This improved line coverage to 98% (was 88%) and complexity coverage to 98% (was 82%). This is the forty-fifth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.9.0-new) * [Fixed issues](#3.9.0-fixes) * [Deprecations](#3.9.0-deprecated) * [Potential breaking changes](#3.9.0-breaking-changes) ## New and Noteworthy ### Help Section Renderer API This release introduces new API to facilitate customizing the usage help message: `IHelpFactory` allows applications to plug in `Help` subclasses, and `IHelpSectionRenderer` allows applications to add custom sections to the usage help message, or redefine existing sections. The usage help message is no longer hard-coded, but is now constructed from the section renderers defined in `CommandLine::getHelpSectionMap` (or `UsageMessageSpec::sectionMap` for a single `CommandSpec`). By default this map contains the predefined section renderers: ```java // The default section renderers delegate to methods in Help for their implementation // (using Java 8 lambda notation for brevity): Map map = new HashMap<>(); map.put(SECTION_KEY_HEADER_HEADING, help -> help.headerHeading()); map.put(SECTION_KEY_HEADER, help -> help.header()); //e.g. Usage: map.put(SECTION_KEY_SYNOPSIS_HEADING, help -> help.synopsisHeading()); //e.g. [OPTIONS] [COMMAND-OPTIONS] [ARGUMENTS] map.put(SECTION_KEY_SYNOPSIS, help -> help.synopsis(help.synopsisHeadingLength())); //e.g. %nDescription:%n%n map.put(SECTION_KEY_DESCRIPTION_HEADING, help -> help.descriptionHeading()); //e.g. {"Converts foos to bars.", "Use options to control conversion mode."} map.put(SECTION_KEY_DESCRIPTION, help -> help.description()); //e.g. %nPositional parameters:%n%n map.put(SECTION_KEY_PARAMETER_LIST_HEADING, help -> help.parameterListHeading()); //e.g. [FILE...] the files to convert map.put(SECTION_KEY_PARAMETER_LIST, help -> help.parameterList()); //e.g. %nOptions:%n%n map.put(SECTION_KEY_OPTION_LIST_HEADING, help -> help.optionListHeading()); //e.g. -h, --help displays this help and exits map.put(SECTION_KEY_OPTION_LIST, help -> help.optionList()); //e.g. %nCommands:%n%n map.put(SECTION_KEY_COMMAND_LIST_HEADING, help -> help.commandListHeading()); //e.g. add adds the frup to the frooble map.put(SECTION_KEY_COMMAND_LIST, help -> help.commandList()); map.put(SECTION_KEY_FOOTER_HEADING, help -> help.footerHeading()); map.put(SECTION_KEY_FOOTER, help -> help.footer()); ``` Applications can add, remove or replace sections in this map. The `CommandLine::getHelpSectionKeys` method (or `UsageMessageSpec::sectionKeys` for a single `CommandSpec`) returns the section keys in the order that the usage help message should render the sections. The default keys are (in order): 1. SECTION_KEY_HEADER_HEADING 1. SECTION_KEY_HEADER 1. SECTION_KEY_SYNOPSIS_HEADING 1. SECTION_KEY_SYNOPSIS 1. SECTION_KEY_DESCRIPTION_HEADING 1. SECTION_KEY_DESCRIPTION 1. SECTION_KEY_PARAMETER_LIST_HEADING 1. SECTION_KEY_PARAMETER_LIST 1. SECTION_KEY_OPTION_LIST_HEADING 1. SECTION_KEY_OPTION_LIST 1. SECTION_KEY_COMMAND_LIST_HEADING 1. SECTION_KEY_COMMAND_LIST 1. SECTION_KEY_FOOTER_HEADING 1. SECTION_KEY_FOOTER This ordering may be modified with the `CommandLine::setHelpSectionKeys` setter method (or `UsageMessageSpec::sectionKeys(List)` for a single `CommandSpec`). ### Option `order` Attribute Options are sorted alphabetically by default, but this can be switched off by specifying `@Command(sortOptions = false)` on the command declaration. This displays options in the order they are declared. However, when mixing `@Option` methods and `@Option` fields, options do not reliably appear in declaration order. The `@Option(order = )` attribute can be used to explicitly control the position in the usage help message at which the option should be shown. Options with a lower number are shown before options with a higher number. ### New Module `picocli-shell-jline3` Picocli Shell JLine3 contains components and documentation for building interactive shell command line applications with JLine 3 and picocli. This release contains the `picocli.shell.jline3.PicocliJLineCompleter` class. `PicocliJLineCompleter` is a small component that generates completion candidates to allow users to get command line TAB auto-completion for a picocli-based application running in a JLine 3 shell. It is similar to the class with the same name in the `picocli.shell.jline2` package in the `picocli-shell-jline2` module. See the module's [README](https://github.com/remkop/picocli/blob/master/picocli-shell-jline3/README.md) for more details. ### Improved ANSI Heuristics This release has improved heuristics to decide whether ANSI escape codes should be emitted or not. Support was added for the following environment variables to control enabling ANSI: * [`NO_COLOR`](https://no-color.org/) * [`CLICOLOR_FORCE`](https://bixense.com/clicolors/) * [`CLICOLOR`](https://bixense.com/clicolors/) * [`ConEmuANSI`](https://conemu.github.io/en/AnsiEscapeCodes.html#Environment_variable) * [`ANSICON`](https://github.com/adoxa/ansicon/blob/master/readme.txt) ## Fixed issues - [#574] Add `picocli-shell-jline3` module. Thanks to [mattirn](https://github.com/mattirn) for the pull request. - [#587] Enhance `picocli-shell-jline3` example by using JLine's `DefaultParser` to split lines into arguments. Thanks to [mattirn](https://github.com/mattirn) for the pull request. - [#567] Usage message customization API initial implementation. Thanks to [Christian Helmer](https://github.com/SysLord) for the pull request. - [#530] Added API for easily customizing the usage help message. Thanks to [stechio](https://github.com/stechio) for raising the request and productive discussions. - [#569] Facilitate customization of the synopsis: split `Help.detailedSynopsis()` into protected methods. - [#508] Annotation API: added `@Option(order = )` attribute to allow explicit control of option ordering in the usage help message; useful when mixing methods and fields with `@Option` annotation. - [#588] Added method `CommandSpec.names` returning both `name` and `aliases`. - [#578] Add API for simplified @files argument files. - [#573] Make simplified @files JCommander-compatible: ignore empty lines and comments starting with whitespace. Thanks to [Lukáš Petrovický](https://github.com/triceo) for the pull request with test to reproduce the issue. - [#572] `CommandSpec.addMethodSubcommands` now throws `picocli.CommandLine.InitializationException` instead of `java.lang.UnsupportedOperationException` when the user object of the parent command is a `java.lang.reflect.Method`. - [#581] Added support for ConEmu, ANSICON and other environment variables to improve the ANSI heuristics. Documented the heuristics in the user manual. - [#579] Improved `AutoComplete` error message when not overwriting existing files. - [#585] `picocli.AutoComplete` now accepts a parameter specifying a custom `IFactory` implementation. Thanks to [Bob Tiernay](https://github.com/bobtiernay-okta) for the suggestion. - [#582] `picocli.AutoComplete` now returns a non-zero return code on error. Thanks to [Bob Tiernay](https://github.com/bobtiernay-okta) for the suggestion. - [#570] Bugfix: Command method options and positional parameter Object values are now cleared correctly when reusing CommandLine. Thanks to [Christian Helmer](https://github.com/SysLord) for the pull request. - [#576] Bugfix: fixed StringIndexOutOfBoundsException in shell-jline2 completion when cursor was before `=` when option parameter was attached to option name. - [#583] Bugfix: Default exception handler now exits on exception if exitCode was set, regardless of exception type. - [#584] Add documentation for generating autocompletion script during a Maven build. Thanks to [Bob Tiernay](https://github.com/bobtiernay-okta). - [#586] Replace Ansi.Text.clone() with copy constructor. - [#571] Improve test code coverage. Added ~300 tests to bring the total to 1300+ tests. Improved line coverage to 98% (was 88%) and complexity coverage to 98% (was 82%). - [#590] Fail the build if test coverage falls below minimum threshold. - [#589] Fix index.adoc to eliminate warnings; suppress javadoc warnings. - [#566] Add example showing how to customize the usage help message to show the full command tree including nested subcommands. Thanks to [lgawron](https://github.com/lgawron) for the request. ## Deprecations No features were deprecated in this release. ## Potential breaking changes `CommandSpec.addMethodSubcommands` now throws `InitializationException` instead of `java.lang.UnsupportedOperationException` when the user object of the parent command is a `java.lang.reflect.Method`. AutoComplete application now prints different error message when not overwriting existing script files. This may break tests that verify the console output. # Picocli 3.8.2 The picocli community is pleased to announce picocli 3.8.2. This release contains bugfixes only. When running a native image with Graal, ANSI colors are now shown correctly. This is the forty-forth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.8.2-new) * [Fixed issues](#3.8.2-fixes) * [Deprecations](#3.8.2-deprecated) * [Potential breaking changes](#3.8.2-breaking-changes) ## New and Noteworthy ## Fixed issues - [#557] Bugfix: No colors are shown when compiling to a native image with Graal on MacOS. Thanks to [Oliver Weiler](https://github.com/helpermethod) for the bug report. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This is a patch release and has no breaking changes. # Picocli 3.8.1 The picocli community is pleased to announce picocli 3.8.1. This release contains bugfixes and minor enhancements. Command methods explicitly throwing a `ParametersException` is now correctly handled by picocli, showing the error message and the usage help message. This release adds support for JCommander-style argument files (one argument per line, no quoting) and better tracing. Many thanks to the many members of the picocli community who contributed! This is the forty-third public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.8.1-new) * [Fixed issues](#3.8.1-fixes) * [Deprecations](#3.8.1-deprecated) * [Potential breaking changes](#3.8.1-breaking-changes) ## New and Noteworthy ### Simplified Argument Files In this argument file format every line (except comment lines) is interpreted as a single argument. Arguments containing whitespace do not need to be quoted, but it is not possible to have arguments with embedded newlines. Set system property `picocli.useSimplifiedAtFiles` without a value or with value `"true"` (case-insensitive) to enable this simpler argument file format. This format is similar to the way JCommander processes argument files, which makes it easier for command line applications to migrate from JCommander to picocli. ### Improved Tracing The following information has been added to the tracing output in this release: * Version information (picocli version, java version, os version), logged at INFO level * ANSI enabled status, logged at DEBUG level * Log at DEBUG level when a Map or Collection binding for an option or positional parameter is initialized with a new instance * Log at DEBUG level when parameters are being split (into how many parts, show resulting parts) ## Fixed issues - [#551] Enhancement: Add support for JCommander-style argument files (one argument per line, no quoting). Thanks to [Lukáš Petrovický](https://github.com/triceo) for the bug report and unit tests. - [#562] Enhancement: Allow for enabling quote trimming via system property `picocli.trimQuotes`. Thanks to [Lukáš Petrovický](https://github.com/triceo) for the pull request. - [#560] Enhancement: Better tracing. - [#554] Bugfix: Convenience method error handling was broken for command methods that explicitly throw an ParameterException: InvocationTargetException hides the ParameterException. Thanks to [SysLord](https://github.com/SysLord) for the bug report. - [#553] Doc: Fix broken link to CommandLine.java source code. Thanks to [Simon Legner](https://github.com/simon04) for the pull request. - [#563] Doc: Improve documentation for explicitly showing usage help from subcommands. Thanks to [Steve Johnson](https://github.com/Blatwurst) for raising this issue. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This is a patch release and has no breaking changes. # Picocli 3.8.0 The picocli community is pleased to announce picocli 3.8.0. This release contains bugfixes and minor enhancements. `@Command` methods now support `@Mixin` parameters. `OverwrittenOptionException` now has an accessor for the `ArgSpec` that was overwritten. The `ReflectionConfigGenerator` tool in the `picocli-codegen` module now correctly generates configuration for `@Mixin` fields. Many thanks to the many members of the picocli community who contributed! This is the forty-second public release. Picocli follows [semantic versioning](http://semver.org/). (This release could have been called 3.7.1 except that it has a minor additional API change, which means it cannot be called a patch release by semver rules.) ## Table of Contents * [New and noteworthy](#3.8.0-new) * [Fixed issues](#3.8.0-fixes) * [Deprecations](#3.8.0-deprecated) * [Potential breaking changes](#3.8.0-breaking-changes) ## New and Noteworthy ### Mixin Support in `@Command` Methods `@Command` methods now accept `@Mixin` parameters. All options and positional parameters defined in the mixin class are added to the command. Example: ```java class CommonParams { @Option(names = "-x") int x; @Option(names = "-y") int y; } class App { @Command public void doit(@Mixin CommonParams params, @Option(names = "-z") int z) {} } ``` In the above example, the `-x` and `-y` options are added to the other options of the `doit` command. ## Fixed issues - [#525] Enhancement: Allow `@Mixin` parameters in `@Command` methods. Thanks to [Paul Horn](https://github.com/knutwalker) for the pull request. - [#532] Enhancement: `OverwrittenOptionException` now has an accessor for the `ArgSpec` that was overwritten. Thanks to [Steven Fontaine](https://github.com/acid1103) for the pull request. - [#524] Enhancement/Bugfix: `ReflectionConfigGenerator` in `picocli-codegen` should generate configuration for `@Mixin` fields. Thanks to [Paul Horn](https://github.com/knutwalker) for the pull request. - [#301] Enhancement/Bugfix: The subcommand listing now correctly renders `%n` as line breaks in the brief description for each subcommand. Thanks to [Vlad Topala](https://github.com/topalavlad) for the pull request. - [#523] Bugfix: Array should be initialized before calling setter method. Thanks to [Paul Horn](https://github.com/knutwalker) for the pull request. - [#527] Bugfix: Quoting logic did not work for some Unicode code points. - [#531] Bugfix: Usage help should not show space between short option name and parameter (for options that only have a short name). - [#538] Bugfix: Command methods and interface methods should pass `null` for unmatched primitive wrapper options. - [#547] Bugfix: Fix infinite loop when print help. Thanks to [Patrick Kuo](https://github.com/patrickkuo) for the pull request. - [#528] Doc: Javadoc for xxxHandler API referred to non-existant prototypeReturnValue. - [#545] Doc: Include mention of command methods for options using collections. Thanks to [Bob Tiernay](https://github.com/bobtiernay-okta) for the pull request. ## Deprecations No features were deprecated in this release. ## Potential breaking changes ### Help Layout The usage help no longer shows a space between short option names and the parameter (for options that only have a short name). This may break tests that rely on the exact output format. Before: ``` Usage: times [-l=] [-r=] -l= -r= ``` After: ``` Usage: times [-l=] [-r=] -l= -r= ``` ### Unmatched Primitive Wrapper Type Options Another behavioral change is that command methods now pass in `null` for primitive wrapper options that were not matched on the command line. This impacts methods annotated with `@Command`, and interface methods annotated with `@Option`. Classes annotated with `@Command` already behaved like this and this has not changed. This behaviour is now consistent for all annotation-based and programmatic ways of defining commands. # Picocli 3.7.0 The picocli community is pleased to announce picocli 3.7.0. This release contains bugfixes and enhancements in the main picocli module, and adds two new modules: `picocli-codegen` and `picocli-shell-jline2`. Picocli Code Generation (`picocli-codegen`) contains tools for generating source code, documentation and configuration files for picocli-based applications. Picocli Shell JLine2 (`picocli-shell-jline2`) contains components and documentation for building interactive shell command line applications with JLine 2 and picocli. Many thanks to the many members of the picocli community who contributed! This is the forty-first public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.7.0-new) * [Fixed issues](#3.7.0-fixes) * [Deprecations](#3.7.0-deprecated) * [Potential breaking changes](#3.7.0-breaking-changes) ## New and Noteworthy ### Improved Parsing of Quoted Values This release improves parser behaviour of quoted arguments: * Quotes around command line parameters are now preserved by default (previously they were removed). This can be configured with `CommandLine::setTrimQuotes`. * When [splitting](https://picocli.info/#_split_regex) parameters, quoted strings are no longer split. This can be configured with `CommandLine::setSplitQuotedStrings`. Example: ``` @Option(names = "-x", split = ",") String[] parts; ``` Given input like below: ``` -x a,b,"c,d,e",f,"xxx,yyy" ``` This results in the `parts` array having the following values: ``` a b "c,d,e" f "xxx,yyy" ``` ### New Module `picocli-codegen` Picocli Code Generation contains tools for generating source code, documentation and configuration files for picocli-based applications. This release contains the `ReflectionConfigGenerator` class. `ReflectionConfigGenerator` generates a JSON String with the program elements that will be accessed reflectively in a picocli-based application, in order to compile this application ahead-of-time into a native executable with GraalVM. The output of `ReflectionConfigGenerator` is intended to be passed to the `-H:ReflectionConfigurationFiles=/path/to/reflectconfig` option of the `native-image` GraalVM utility. This allows picocli-based applications to be compiled to a native image. See [Picocli on GraalVM: Blazingly Fast Command Line Apps](https://github.com/remkop/picocli/wiki/Picocli-on-GraalVM:-Blazingly-Fast-Command-Line-Apps) for details. The module's [README](https://github.com/remkop/picocli/blob/master/picocli-codegen/README.md) explains how to configure your build to generate the configuration file automatically as part of your build. ### New Module `picocli-shell-jline2` Picocli Shell JLine2 contains components and documentation for building interactive shell command line applications with JLine 2 and picocli. This release contains the `PicocliJLineCompleter` class. `PicocliJLineCompleter` is a small component that generates completion candidates to allow users to get command line TAB auto-completion for a picocli-based application running in a JLine 2 shell. See the module's [README](https://github.com/remkop/picocli/blob/master/picocli-shell-jline2/README.md) for more details. ## Fixed issues - [#503] Build: Upgrade to gradle 4.10.2. - [#497] add module `picocli-shell-jline2` for components and documentation for building interactive shell command line applications with JLine 2 and picocli. - [#499] add module `picocli-codegen` for tools to generate documentation, configuration, source code and other files from a picocli model - [#410] add `ReflectionConfigGenerator` class for GraalVM `native-image` - [#513] Enhancement: Simplify AutoCompletion script generator code. - [#481] Enhancement: Add `@Command(usageHelpWidth = )` annotation attribute. - [#379] Option with split property should not split quoted strings. Thanks to [Markus Kramer](https://github.com/MarkusKramer) for the feature request. - [#514] Bugfix/Enhancement: picocli no longer removes opening and closing quotes around arguments by default. This is configurable with `CommandLine::setTrimQuotes`. Thanks to [mshatalov](https://github.com/mshatalov) for the bug report. - [#509] Bugfix: Long boolean options with arity 0 should not allow parameters. Thanks to [Adam Zegelin](https://github.com/zegelin) for the bug report. - [#510] Documentation: Fix broken link for moved example files. Thanks to [Anthony Keenan](https://github.com/anthonykeenan) for the pull request. - [#24] Documentation: Added Chinese translations of "Picocli 2.0 Do More With Less" and "Picocli 2.0 Groovy Scripts on Steroids". ## Deprecations No features were deprecated in this release. ## Potential breaking changes From this release, picocli no longer removes opening and closing quotes around arguments by default. This is configurable with `CommandLine::setTrimQuotes`. # Picocli 3.6.1 The picocli community is pleased to announce picocli 3.6.1. This release contains bugfixes, minor enhancements and documentation improvements. ANSI is automatically enabled on Windows if Jansi's `AnsiConsole` has been installed. It is now possible to selectively avoid loading type converters with reflection. Bugfix: Enum values were not rendered in `${COMPLETION-CANDIDATES}` for collection type options. Many thanks to the many members of the picocli community who contributed! This is the fortieth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.6.1-new) * [Fixed issues](#3.6.1-fixes) * [Deprecations](#3.6.1-deprecated) * [Potential breaking changes](#3.6.1-breaking-changes) ## New and Noteworthy ## Fixed issues - [#487] Enhancement: Auto-completion script should return from `generateOptionsSwitch` immediately if there is nothing to generate. Thanks to [David Walluck](https://github.com/dwalluck) for the pull request. - [#483][#486] Enhancement: Improve `Help.Ansi.AUTO`: automatically enable ANSI on Windows if Jansi's `AnsiConsole` has been installed. Thanks to [Philippe Charles](https://github.com/charphi) for the pull request. - [#491] Enhancement: Improve `Help.Ansi.AUTO` cygwin/msys detection on Windows. - [#451] Enhancement: Selectively disable reflective type converter registration. Thanks to [Paolo Di Tommaso](https://github.com/pditommaso) for the suggestion. - [#488] Doc: Clarify in user manual that `CommandLine.setPosixClusteredShortOptionsAllowed(false)` means that option parameters cannot be attached to the option name. Thanks to [Maryam Ziyad](https://github.com/MaryamZi) for raising this. - [#492][#493] Doc: Add section on `@Command(aliases)` attribute to user manual. Thanks to [marinier](https://github.com/marinier) for the pull request. - [#494] Bugfix: Enum values were not rendered in `${COMPLETION-CANDIDATES}` for collection type options. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 3.6.0 The picocli community is pleased to announce picocli 3.6.0. This release contains new features, bugfixes and enhancements. New interface: `IDefaultProvider` allows you to get default values from a configuration file or some other central place. `@Command` Methods: From this release, methods can be annotated with `@Command`. The method parameters provide the command options and parameters. Internationalization: from this release, usage help message sections and the description for options and positional parameters can be specified in a resource bundle. A resource bundle can be set via annotations and programmatically. The error message on invalid user input has been improved. This release also contains various improvements the the bash/zsh completion script generation to be more consistent with standard completion on these shells. Many thanks to the many members of the picocli community who raised issues and contributed solutions! This is the thirty-ninth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.6.0-new) * [Fixed issues](#3.6.0-fixes) * [Deprecations](#3.6.0-deprecated) * [Potential breaking changes](#3.6.0-breaking-changes) ## New and Noteworthy ### Default Provider This release allows you to specify a default provider in the `@Command` annotation: ```java @Command(defaultValueProvider = MyDefaultProvider.class) class MyCommand // ... ``` The default provider allows you to get default values from a configuration file or some other central place. Default providers need to implement the `picocli.CommandLine.IDefaultValueProvider` interface: ```java public interface IDefaultValueProvider { /** * Returns the default value for an option or positional parameter or {@code null}. * The returned value is converted to the type of the option/positional parameter * via the same type converter used when populating this option/positional * parameter from a command line argument. * * @param argSpec the option or positional parameter, never {@code null} * @return the default value for the option or positional parameter, or {@code null} if * this provider has no default value for the specified option or positional parameter * @throws Exception when there was a problem obtaining the default value */ String defaultValue(ArgSpec argSpec) throws Exception; } ``` ### `@Command` Methods From picocli 3.6, methods can be annotated with `@Command`. The method parameters provide the command options and parameters. For example: ```java class Cat { public static void main(String[] args) { CommandLine.invoke("cat", Cat.class, args); } @Command(description = "Concatenate FILE(s) to standard output.", mixinStandardHelpOptions = true, version = "3.6.0") void cat(@Option(names = {"-E", "--show-ends"}) boolean showEnds, @Option(names = {"-n", "--number"}) boolean number, @Option(names = {"-T", "--show-tabs"}) boolean showTabs, @Option(names = {"-v", "--show-nonprinting"}) boolean showNonPrinting, @Parameters(paramLabel = "FILE") File[] files) { // process files } } ``` The usage help of the above command looks like this: ``` Usage: cat [-EhnTvV] [FILE...] Concatenate FILE(s) to standard output. [FILE...] -E, --show-ends -h, --help Show this help message and exit. -n, --number -T, --show-tabs -v, --show-nonprinting -V, --version Print version information and exit. ``` See below for an example that uses a resource bundle to define usage help descriptions outside the code. For positional parameters, the `@Parameters` annotation may be omitted on method parameters. TIP: If compiled with the `-parameters` flag on Java 8 or higher, the `paramLabel` of positional parameters is obtained from the method parameter name using reflection instead of the generic arg0, arg1, etc. #### Subcommand Methods If the enclosing class is annotated with `@Command`, method commands are added as subcommands to the class command, unless the class command has attribute `@Command(addMethodSubcommands = false)`. For example: ```java @Command(name = "git", mixinStandardHelpOptions = true, version = "picocli-3.6.0") class Git { @Option(names = "--git-dir", descriptionKey = "GITDIR") Path path; @Command void commit(@Option(names = {"-m", "--message"}) String commitMessage, @Option(names = "--squash", paramLabel = "") String squash, @Parameters(paramLabel = "") File[] files) { // ... implement business logic } } ``` Use `@Command(addMethodSubcommands = false)` on the class `@Command` annotation if the `@Command`-annotated methods in this class should not be added as subcommands. The usage help of the `git commit` command looks like this: ``` Usage: git commit [--squash=] [-m=] [...] [...] --squash= -m, --message= ``` ### Internationalization From version 3.6, usage help message sections and the description for options and positional parameters can be specified in a resource bundle. A resource bundle can be set via annotations and programmatically. Annotation example: ```java @Command(name = "i18n-demo", resourceBundle = "my.org.I18nDemo_Messages") class I18nDemo {} ``` Programmatic example: ```java @Command class I18nDemo2 {} CommandLine cmd = new CommandLine(new I18nDemo2()); cmd.setResourceBundle(ResourceBundle.getBundle("my.org.I18nDemo2_Messages")); ``` Resources for multiple commands can be specified in a single ResourceBundle. Keys and their value can be shared by multiple commands (so you don't need to repeat them for every command), but keys can be prefixed with `fully qualified command name + "."` to specify different values for different commands. The most specific key wins. This is especially convenient for `@Command` methods where long description annotations would make the code less easy to read. You can use a resource bundle to move the descriptions out of the code: ``` # shared between all commands help = Show this help message and exit. version = Print version information and exit. # command-specific strings git.usage.description = Version control system git.GITDIR = Set the path to the repository git.commit.usage.description = Record changes to the repository git.commit.message = Use the given as the commit message. git.commit.squash = Construct a commit message for use with rebase --autosquash. git.commit.[0..*] = The files to commit. ``` With this resource bundle, the usage help for the above `git commit` command looks like this: ``` Usage: git commit [--squash=] [-m=] [...] Record changes to the repository [...] The files to commit. --squash= Construct a commit message for use with rebase --autosquash. -m, --message= Use the given as the commit message. ``` ### Improved Error Messages The error messages on invalid input have been improved. For example: Previously, if an argument could not be converted to a primitive type, the error looked like this: `Could not convert 'abc' to int for option '-num': java.lang.NumberFormatException: For input string: \"abc\"` The new error message for primitive types looks like this: `Invalid value for option '-num': 'abc' is not an int` Previously, if an argument could not be converted to an enum, the error looked like this: `Could not convert 'xyz' to TimeUnit for option '-timeUnit': java.lang.IllegalArgumentException: No enum constant java.util.concurrent.TimeUnit.xyz` The new error message for enums looks like this: `Invalid value for option '-timeUnit': expected one of [NANOSECONDS, MILLISECONDS, MICROSECONDS, SECONDS, MINUTES, HOURS, DAYS] but was 'xyz'` ## Fixed issues - [#321] API: Add support for IDefaultValueProvider. Thanks to [Nicolas MASSART](https://github.com/NicolasMassart) for the pull request. - [#416] API: Added support for `@Command` annotation on methods (in addition to classes). Thanks to [illes](https://github.com/illes) for the pull request. - [#433] API: Added method `printHelpIfRequested` that accepts a `ColorScheme` parameter. Thanks to [Benny Bottema](https://github.com/bbottema) for the suggestion. - [#441] API: Added `hideParamSyntax` attribute to `@Option` and `@Parameters` to allow suppressing usage syntax decorations around the param label. Thanks to [Benny Bottema](https://github.com/bbottema) for the pull request. - [#22], [#415], [#436] API: Added internationalization and localization support via resource bundles. - [#473] Enhancement: Improved error messages for invalid input. - [#461] Bugfix: Script auto-completion only suggests options and never default bash completions. Thanks to [David Walluck](https://github.com/dwalluck) for the pull request. - [#466] Bugfix: Script auto-completion should not generate suggestions for options with arguments that have no known completions. Thanks to [David Walluck](https://github.com/dwalluck) for the pull request. - [#470] Bugfix: Script auto-completion should generate suggestions for short options with arguments. Thanks to [David Walluck](https://github.com/dwalluck) for the pull request. - [#444] Bugfix: Usage help shows duplicate aliases if registered with same alias multiple times. - [#452] Doc: Add UML class diagrams to picocli Javadoc. - [#475] Doc: Renamed module `examples` to `picocli-examples`. - [#478] Doc: Add convenience API example to `CommandLine` class Javadoc. ## Deprecations No features were deprecated in this release. ## Potential breaking changes The error message displayed on invalid input is different from previous releases. This may break unit tests that expect an exact error message. # Picocli 3.5.2 The picocli community is pleased to announce picocli 3.5.2. This is a bugfix release that fixes an issue where subcommand aliases were not recognized in some cases. This is the thirty-eighth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.5.2-new) * [Promoted features](#3.5.2-promoted) * [Fixed issues](#3.5.2-fixes) * [Deprecations](#3.5.2-deprecated) * [Potential breaking changes](#3.5.2-breaking-changes) ## New and Noteworthy ## Promoted Features Promoted features are features that were incubating in previous versions of picocli but are now supported and subject to backwards compatibility. No features have been promoted in this picocli release. ## Fixed issues - [#443] Bugfix: Subcommand aliases were not recognized in some cases. Thanks to [K. Alex Mills](https://github.com/kalexmills) for the bug report. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 3.5.1 The picocli community is pleased to announce picocli 3.5.1. This is a bugfix release that fixes an issue where CommandSpec injected into Mixins had a `null` CommandLine. This is the thirty-seventh public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.5.1-new) * [Promoted features](#3.5.1-promoted) * [Fixed issues](#3.5.1-fixes) * [Deprecations](#3.5.1-deprecated) * [Potential breaking changes](#3.5.1-breaking-changes) ## New and Noteworthy ## Promoted Features Promoted features are features that were incubating in previous versions of picocli but are now supported and subject to backwards compatibility. No features have been promoted in this picocli release. ## Fixed issues - [#439] Bugfix: CommandSpec injected into Mixins had a `null` CommandLine. Thanks to [Adam Zegelin](https://github.com/zegelin) for the bug report. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 3.5.0 The picocli community is pleased to announce picocli 3.5.0. This release contains new features, bugfixes and enhancements. Password support: for options and positional parameters marked as `interactive`, the user is prompted to enter a value on the console. When running on Java 6 or higher, picocli will use the Console.readPassword API so that user input is not echoed to the console. Client code can now perform simple validation in annotated setter methods by throwing a `ParameterException` on invalid input. Also, from this release, the comment character in @-files (argument files) and the end-of-options delimiter (`--` by default) are configurable. This is the thirty-sixth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.5.0-new) * [Promoted features](#3.5.0-promoted) * [Fixed issues](#3.5.0-fixes) * [Deprecations](#3.5.0-deprecated) * [Potential breaking changes](#3.5.0-breaking-changes) ## New and Noteworthy ### `Interactive` Options for Passwords or Passphrases This release introduces password support: for options and positional parameters marked as `interactive`, the user is prompted to enter a value on the console. When running on Java 6 or higher, picocli will use the Console.readPassword API so that user input is not echoed to the console. Example usage: ```java class Login implements Callable { @Option(names = {"-u", "--user"}, description = "User name") String user; @Option(names = {"-p", "--password"}, description = "Passphrase", interactive = true) String password; public Object call() throws Exception { MessageDigest md = MessageDigest.getInstance("SHA-256"); md.update(password.getBytes()); System.out.printf("Hi %s, your passphrase is hashed to %s.%n", user, base64(md.digest())); return null; } private String base64(byte[] arr) { /* ... */ } } ``` When this command is invoked like this: ```java CommandLine.call(new Login(), "-u", "user123", "-p"); ``` Then the user will be prompted to enter a value: ``` Enter value for --password (Passphrase): ``` When running on Java 6 or higher, the user input is not echoed to the console. After the user enters a value and presses enter, the `call()` method is invoked, which prints the following: ```bash Hi user123, your passphrase is hashed to 75K3eLr+dx6JJFuJ7LwIpEpOFmwGZZkRiB84PURz6U8=. ``` ### Simple Validation in Setter Methods Methods annotated with `@Option` and `@Parameters` can do simple input validation by throwing a `ParameterException` when invalid values are specified on the command line. ```java class ValidationExample { private Map properties = new LinkedHashMap<>(); @Spec private CommandSpec spec; // injected by picocli @Option(names = {"-D", "--property"}, paramLabel = "KEY=VALUE") public void setProperty(Map map) { for (String key : map.keySet()) { String newValue = map.get(key); validateUnique(key, newValue); properties.put(key, newValue); } } private void validateUnique(String key, String newValue) { String existing = properties.get(key); if (existing != null && !existing.equals(newValue)) { throw new ParameterException(spec.commandLine(), String.format("Duplicate key '%s' for values '%s' and '%s'.", key, existing, newValue)); } } } ``` Prior to this release, the exception thrown from the method was wrapped in a `java.lang.reflect.InvocationTargetException`, which in turn was wrapped in a `PicocliException`, and finally in another `ParameterException`. By following the recipe above and throwing a `ParameterException` on invalid input, all these intermediate exceptions are skipped. ## Promoted Features Promoted features are features that were incubating in previous versions of picocli but are now supported and subject to backwards compatibility. No features have been promoted in this picocli release. ## Fixed issues - [#430] Bugfix: formatting was incorrect (did not break on embedded newlines) in the subcommands list descriptions. Thanks to [Benny Bottema](https://github.com/bbottema) for the bug report. - [#431] Better support for validation in setter methods: cleaner stack trace. - [#432] Make comment character in @-files (argument files) configurable. - [#359] Make end-of-options delimiter configurable. - [#82] Support reading passwords from the console with echoing disabled. ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 3.4.0 The picocli community is pleased to announce picocli 3.4.0. This release contains new features, bugfixes and enhancements. The parser can now ignore case when parsing arguments for an Enum option or positional parameter. New methods `Help.Ansi.text(String)` and `Help.Ansi.string(String)` assist client code in easily creating ANSI messages outside usage help and version help. This is the thirty-fifth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.4.0-new) * [Promoted features](#3.4.0-promoted) * [Fixed issues](#3.4.0-fixes) * [Deprecations](#3.4.0-deprecated) * [Potential breaking changes](#3.4.0-breaking-changes) ## New and Noteworthy ## Promoted Features Promoted features are features that were incubating in previous versions of picocli but are now supported and subject to backwards compatibility. No features have been promoted in this picocli release. ## Fixed issues - [#14] New API: Support enum values to be parsed in an case-insensitive way. - [#376] New API: `Help.Ansi.text(String)` and `Help.Ansi.string(String)` help client code easily create ANSI messages outside usage help and version help. - [#412] Enhancement: Enum constant names are now returned from `ArgSpec::completionCandidates()`. Thanks to [Radovan Panák](https://github.com/rpanak). - [#417] Enhancement: Ensure bash scripts have correct line separators. Thanks to [Holger Stenger](https://github.com/stengerh). - [#425] Enhancement: Fix autocomplete script errors in zsh. Thanks to [Anthony Keenan](https://github.com/anthonykeenan). - [#419] Bugfix: Default value for arrays was not rendered correctly with `@{DEFAULT-VALUE}`. - [#418] Doc: Improve installation instructions for autocompletion scripts. - [#420] Doc: Added a Quick Guide ## Deprecations No features were deprecated in this release. ## Potential breaking changes This release has no breaking changes. # Picocli 3.3.0 The picocli community is pleased to announce picocli 3.3.0. This release contains a bugfix for the JLine TAB completion support and improves the error messages for missing required parameters and unmatched arguments. This is the thirty-fourth public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.3.0-new) * [Promoted features](#3.3.0-promoted) * [Fixed issues](#3.3.0-fixes) * [Deprecations](#3.3.0-deprecated) * [Potential breaking changes](#3.3.0-breaking-changes) ## New and Noteworthy ### `UnmatchedArgumentException` Improvements The `UnmatchedArgumentException` class now has several methods that allow an application to offer suggestions for fixes to the end user. For example: ```java class App { @Option(names = "--file") File[] files; @Option(names = "--find") String pattern; public static void main(String[] args) { App app = new App(); try { new CommandLine(app).parse(args); // ... } catch (ParameterException ex) { System.err.println(ex.getMessage()); if (!UnmatchedArgumentException.printSuggestions(ex, System.err)) { // new API ex.getCommandLine().usage(System.err, ansi); } } } } ``` If you run this class with an invalid option that is similar to an actual option, the `UnmatchedArgumentException.printSuggestions` method will show the actual options. For example: ``` -fi ``` Prints this output: ``` Unknown option: -fi Possible solutions: --file, --find ``` This is the behaviour for the `CommandLine` convenience methods `run`, `call` and `parseWithHandlers`. Note that if possible fixes are found, the usage help message is not displayed. ## Promoted Features Promoted features are features that were incubating in previous versions of picocli but are now supported and subject to backwards compatibility. No features have been promoted in this picocli release. ## Fixed issues - [#411] Bugfix: Completion candidates were only generated for the first option, not for subsequent options. - [#409] Enhancement: Improve error message for missing required positional parameters. Thanks to [MÄrtiņš KalvÄns](https://github.com/sisidra) and [Olle Lundberg](https://github.com/lndbrg). - [#298] Enhancement: Add help for mistyped commands and options. Added new API to `UnmatchedArgumentException`. Thanks to [Philippe Charles](https://github.com/charphi). ## Deprecations No features were deprecated in this release. ## Potential breaking changes The error message format has changed. This may impact client tests that expect a specific error message. # Picocli 3.2.0 The picocli community is pleased to announce picocli 3.2.0. This release contains new features and enhancements: * Improved support for Dependency Injection * Methods can now be annotated with `@Option` and `@Parameters` * Support for JLine-based interactive command line interfaces (`completionCandidates` attribute on `@Option` and `@Parameters`, and the `AutoComplete.complete` method) * New `@Spec` annotation for injecting a command with its `CommandSpec` This is the thirty-third public release. Picocli follows [semantic versioning](http://semver.org/). ## Table of Contents * [New and noteworthy](#3.2.0-new) * [Promoted features](#3.2.0-promoted) * [Fixed issues](#3.2.0-fixes) * [Deprecations](#3.2.0-deprecated) * [Potential breaking changes](#3.2.0-breaking-changes) ## New and Noteworthy ### Dependency Injection This release makes integration with Dependency Injection containers extremely easy: * `CommandLine` constructor now accepts a `Class` instance as the user object, and will delegate to the `IFactory` to get an instance. * New `CommandLine.run(Class, IFactory, ...)` and `CommandLine.call(Class, IFactory, ...)` methods. These work the same as the existing `run` and `call` methods except that the `Runnable` or `Callable` instance is created by the factory. The below example shows how to create an `IFactory` implementation with a Guice `Injector`: ```java import com.google.inject.*; import picocli.CommandLine.IFactory; public class GuiceFactory implements IFactory { private final Injector injector = Guice.createInjector(new DemoModule()); @Override public K create(Class aClass) throws Exception { return injector.getInstance(aClass); } static class DemoModule extends AbstractModule { @Override protected void configure() { bind(java.util.List.class).to(java.util.LinkedList.class); bind(Runnable.class).to(InjectionDemo.class); } } } ``` Use the custom factory when creating a `CommandLine` instance, or when invoking the `run` or `call` convenience methods: ```java import javax.inject.Inject; @Command(name = "di-demo") public class InjectionDemo implements Runnable { @Inject java.util.List list; @Option(names = "-x") int x; public static void main(String[] args) { CommandLine.run(Runnable.class, new GuiceFactory(), args); } @Override public void run() { assert list instanceof java.util.LinkedList; } } ``` ### Annotated Methods From this release, `@Option` and `@Parameter` annotations can be added to methods as well as fields of a class. For concrete classes, annotate "setter" methods (methods that accept a parameter) and when the option is specified on the command line, picocli will invoke the method with the value specified on the command line, converted to the type of the method parameter. Alternatively, you may annotate "getter-like" methods (methods that return a value) on an interface, and picocli will create an instance of the interface that returns the values specified on the command line, converted to the method return type. This feature is inspired by [Jewel CLI](https://github.com/lexicalscope/jewelcli). #### Annotating Methods of an Interface The `@Option` and `@Parameters` annotations can be used on methods of an interface that return a value. For example: ```java interface Counter { @Option(names = "--count") int getCount(); } ``` You use it by specifying the class of the interface: ```java CommandLine cmd = new CommandLine(Counter.class); // specify a class String[] args = new String[] {"--count", "3"}; cmd.parse(args); Counter counter = cmd.getCommand(); // picocli created an instance assert counter.getCount() == 3; // method returns command line value ``` #### Annotating Methods of a Concrete Class The `@Option` and `@Parameters` annotations can be used on methods of a class that accept a parameter. For example: ```java class Counter { int count; @Option(names = "--count") void setCount(int count) { this.count = count; } } ``` You use it by passing an instance of the class: ```java Counter counter = new Counter(); // the instance to populate CommandLine cmd = new CommandLine(counter); String[] args = new String[] {"--count", "3"}; cmd.parse(args); assert counter.count == 3; // method was invoked with command line value ``` ### JLine Tab-Completion Support This release adds support for JLine Tab-Completion. [Jline 2.x](https://github.com/jline/jline2) and [3.x](https://github.com/jline/jline3) is a Java library for handling console input, often used to create interactive shell applications. Command line applications based on picocli can generate completion candidates for the command line in the JLine shell. The generated completion candidates are context sensitive, so once a subcommand is specified, only the options for that subcommand are shown, and once an option is specified, only parameters for that option are shown. Below is an example picocli `Completer` implementation for JLine 2.x: ```java import jline.console.completer.ArgumentCompleter; import jline.console.completer.Completer; import picocli.AutoComplete; import picocli.CommandLine; import picocli.CommandLine.Model.CommandSpec; import java.util.List; public class PicocliJLineCompleter implements Completer { private final CommandSpec spec; public PicocliJLineCompleter(CommandSpec spec) { this.spec = spec; } @Override public int complete(String buffer, int cursor, List candidates) { // use the jline internal parser to split the line into tokens ArgumentCompleter.ArgumentList list = new ArgumentCompleter.WhitespaceArgumentDelimiter().delimit(buffer, cursor); // let picocli generate completion candidates for the token where the cursor is at return AutoComplete.complete(spec, list.getArguments(), list.getCursorArgumentIndex(), list.getArgumentPosition(), cursor, candidates); } } ``` ### Completion Candidates From this release, `@Options` and `@Parameters` have a new `completionCandidates` attribute that can be used to generate a list of completions for this option or positional parameter. For example: ```java static class MyAbcCandidates extends ArrayList { MyAbcCandidates() { super(Arrays.asList("A", "B", "C")); } } class ValidValuesDemo { @Option(names = "-o", completionCandidates = MyAbcCandidates.class) String option; } ``` This will generate completion option values `A`, `B` and `C` in the generated bash auto-completion script and in JLine. ### `${DEFAULT-VALUE}` Variable From picocli 3.2, it is possible to embed the default values in the description for an option or positional parameter by specifying the variable `${DEFAULT-VALUE}` in the description text. Picocli uses reflection to get the default values from the annotated fields. The variable is replaced with the default value regardless of the `@Command(showDefaultValues)` attribute and regardless of the `@Option(showDefaultValues)` or `@Parameters(showDefaultValues)` attribute. ```java class DefaultValues { @Option(names = {"-f", "--file"}, description = "the file to use (default: ${DEFAULT-VALUE})") File file = new File("config.xml"); } CommandLine.usage(new DefaultValues(), System.out); ``` This produces the following usage help: ```text Usage:
-f= -f, --file= the file to use (default: config.xml) ``` ### `${COMPLETION-CANDIDATES}` Variable Similarly, it is possible to embed the completion candidates in the description for an option or positional parameter by specifying the variable `${COMPLETION-CANDIDATES}` in the description text. This works for java `enum` classes and for options or positional parameters of non-enum types for which completion candidates are specified. ```java enum Lang { java, groovy, kotlin, javascript, frege, clojure } static class MyAbcCandidates extends ArrayList { MyAbcCandidates() { super(Arrays.asList("A", "B", "C")); } } class ValidValuesDemo { @Option(names = "-l", description = "Enum. Values: ${COMPLETION-CANDIDATES}") Lang lang = null; @Option(names = "-o", completionCandidates = MyAbcCandidates.class, description = "Candidates: ${COMPLETION-CANDIDATES}") String option; } CommandLine.usage(new ValidValuesDemo(), System.out); ``` This produces the following usage help: ```text Usage:
-l= -o=