Improve generator scripts invoking `Spp`: - Avoid leaving untracked files. - Fix undefined variable problems. - Fix arithmetic expression problems. - Add missing copyright headers. - Update scripts to allow invocation from an outside directory. - Move changes incorrectly landed on generated files back to their associated templates. (See `test/jdk/java/util/Formatter/Basic-X.java.template` changes in f8acb204.) - Some generator scripts were updated, but not run, hence their target content was missing changes. Introduce these missing changes. (See `test/jdk/jdk/incubator/vector/gen-tests.sh` changes in b211c0b7.)
Changes are split in multiple contextual commits for review convenience. `test/micro/org/openjdk/bench/java/nio/ByteBuffers.java` should receive a copyright year update due to touched `genBuffers.sh` in the same directory. I've omitted this, since `ByteBuffers.java` will be modified soon in [JDK-8394658](https://bugs.openjdk.org/browse/JDK-8394658). --------- - [X] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - Fix `test/micro/org/openjdk/bench/java/nio/genBuffers.sh` - Fix `test/jdk/jdk/incubator/vector/gen-tests.sh` et al. - Fix `test/jdk/java/util/Formatter/Basic-X.java.template` - Fix `test/jdk/java/util/Formatter/genBasic.sh` - Fix `test/jdk/java/nio/Buffer/genOrder.sh` - Fix `test/jdk/java/nio/Buffer/genCopyDirectMemory.sh` - Fix `test/jdk/java/nio/Buffer/genBasic.sh` - Fix `test/jdk/java/lang/invoke/VarHandles/generate-vh-tests.sh` - Fix `test/hotspot/jtreg/compiler/unsafe/generate-unsafe-access-tests.sh` - Fix `src/jdk.incubator.vector/share/classes/jdk/incubator/vector/gen-src.sh` Changes: https://git.openjdk.org/jdk/pull/33631/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33631&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8396047 Stats: 326 lines in 61 files changed: 172 ins; 59 del; 95 mod Patch: https://git.openjdk.org/jdk/pull/33631.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33631/head:pull/33631 PR: https://git.openjdk.org/jdk/pull/33631
