Compare commits

...

37 Commits

Author SHA1 Message Date
Calvin Cheung
29c6bf23fb 8346457: AOT cache creation crashes with "assert(pair_at(i).match() < pair_at(i+1).match()) failed: unsorted table entries"
Reviewed-by: iklam
Backport-of: 8d388ccd9e
2025-01-08 23:30:52 +00:00
SendaoYan
c3b52089f6 8346965: Multiple compiler/ciReplay test fails with -XX:+SegmentedCodeCache
Reviewed-by: epeter
Backport-of: cf3e48e771
2025-01-08 15:24:09 +00:00
Per Minborg
860b30ddf9 8347047: Cleanup action passed to MemorySegment::reinterpret keeps old segment alive
Reviewed-by: shade
Backport-of: b0c935c03e
2025-01-08 10:16:28 +00:00
Tobias Hartmann
256856a5a1 8343747: C2: TestReplicateAtConv.java crashes with -XX:MaxVectorSize=8
Reviewed-by: chagedorn
Backport-of: 874d68a96c
2025-01-07 09:49:56 +00:00
William Kemper
cc7c293bce 8345970: pthread_getcpuclockid related crashes in shenandoah tests
Reviewed-by: shade
Backport-of: 2ce53e8848
2025-01-06 18:24:37 +00:00
Sorna Sarathi N
33971ecb6e 8346069: Add missing Classpath exception statements
Reviewed-by: kcr, iris, amitkumar
Backport-of: 09c29d1d42
2025-01-06 13:27:11 +00:00
Amit Kumar
4254e99ce2 8346847: [s390x] minimal build failure
Reviewed-by: clanger
Backport-of: 807f6f7fb8
2024-12-31 06:26:39 +00:00
Nizar Benalla
05c3769986 8337111: Bad HTML checker for generated documentation
8337113: Bad character checker for generated documentation
8337116: Internal links checker for generated documentation
8337114: DocType checker for generated documentation
8337117: External links checker for generated documentation

Reviewed-by: prappo
Backport-of: ed292318a9
2024-12-30 11:26:02 +00:00
Nizar Benalla
ab78b04cf6 8346667: Doccheck: warning about missing </span> before <h2>
Reviewed-by: prappo
Backport-of: 054c644ea6
2024-12-30 10:59:08 +00:00
Sorna Sarathi N
bed040191b 8344611: Add missing classpath exception
Reviewed-by: iris
Backport-of: 458979d83a
2024-12-20 18:13:13 +00:00
Patricio Chilano Mateo
5d138cbba0 8345266: java/util/concurrent/locks/StampedLock/OOMEInStampedLock.java JTREG_TEST_THREAD_FACTORY=Virtual fails with OOME
Reviewed-by: dholmes, alanb
Backport-of: 572ce269d0
2024-12-20 15:26:22 +00:00
Nizar Benalla
63aa68a7c6 8346128: Comparison build fails due to difference in LabelTarget.html
Reviewed-by: hannesw, liach
Backport-of: 2a68f74188
2024-12-20 15:05:22 +00:00
Justin Lu
f0ada9f34e 8345327: JDK 24 RDP1 L10n resource files update
Reviewed-by: naoto, dnguyen
Backport-of: fd0207d593
2024-12-19 22:08:57 +00:00
Hamlin Li
303736b038 8345669: RISC-V: fix client build failure due to AlignVector after JDK-8343827
Reviewed-by: fyang
Backport-of: a24b08fcb0
2024-12-19 09:27:16 +00:00
David Holmes
2c336299aa 8321818: vmTestbase/nsk/stress/strace/strace015.java failed with 'Cannot read the array length because "<local4>" is null'
Reviewed-by: lmesnik
Backport-of: ea50c54a14
2024-12-19 07:50:02 +00:00
SendaoYan
4aec2d4ef9 8338714: vmTestbase/nsk/jdb/kill/kill001/kill001.java fails with JTREG_TEST_THREAD_FACTORY=Virtual
Reviewed-by: dholmes
Backport-of: 414eb6bb83
2024-12-19 02:47:52 +00:00
Daniel Fuchs
b8249c5d90 8346017: Socket.connect specified to throw UHE for unresolved address is problematic for SOCKS V5 proxy
Reviewed-by: alanb
Backport-of: 9e8aa855fe
2024-12-18 18:05:16 +00:00
Paul Sandoz
0225372e0b 8346174: UMAX/UMIN are missing from XXXVector::reductionOperations
Reviewed-by: jbhateja
Backport-of: 31c3b19174
2024-12-18 17:23:51 +00:00
Jan Lahoda
2cc14faa21 8344647: Make java.se participate in the preview language feature requires transitive java.base
Reviewed-by: liach, vromero
Backport-of: d50b725ac0
2024-12-18 13:45:44 +00:00
Lance Andersen
f703b6e7b1 8346202: Correct typo in SQLPermission
Reviewed-by: iris
Backport-of: ab1dbd4089
2024-12-16 17:07:28 +00:00
Albert Mingkun Yang
297b21fb60 8345323: Parallel GC does not handle UseLargePages and UseNUMA gracefully
Reviewed-by: sjohanss
Backport-of: a9a5f7cb0a
2024-12-16 14:57:34 +00:00
Maurizio Cimadamore
67b8251679 8345944: JEP 492: extending local class in a different static context should not be allowed
8345953: JEP 492: instantiating local classes in a different static context should not be allowed

Reviewed-by: vromero
Backport-of: 0ad64234e2
2024-12-16 10:17:28 +00:00
Severin Gehwolf
6e8aad1ad4 8345573: Module dependencies not resolved from run-time image when --limit-module is being used
Reviewed-by: mchung
Backport-of: 11cd639842
2024-12-16 09:41:59 +00:00
Ioi Lam
4d6eccd9fc 8346159: Disable CDS AOTClassLinking tests for JVMCI due to JDK-8345635
Reviewed-by: ccheung
Backport-of: c2f0ef5f48
2024-12-16 06:17:11 +00:00
Nizar Benalla
6bc14d6b77 8345888: Broken links in the JDK 24 JavaDoc API documentation, build 27
Reviewed-by: psadhukhan
Backport-of: 9bd70ec806
2024-12-13 11:25:56 +00:00
Coleen Phillimore
897a8abecc 8346040: Zero interpreter build on Linux Aarch64 is broken
Reviewed-by: kbarrett
Backport-of: ef6e987a00
2024-12-12 22:24:36 +00:00
Roger Riggs
3b53ed7fb0 8345818: Fix SM cleanup of parsing of System property resource.bundle.debug
Reviewed-by: lancea
Backport-of: 4f855d1342
2024-12-12 17:27:54 +00:00
Adam Sotona
6fdfa72996 8345773: Class-File API debug printing capability
Reviewed-by: liach
Backport-of: f88c1c6ff8
2024-12-12 13:37:00 +00:00
Coleen Phillimore
950c8adfd7 8340212: -Xshare:off -XX:CompressedClassSpaceBaseAddress=0x40001000000 crashes on macos-aarch64
Reviewed-by: iklam
Backport-of: a6277bb521
2024-12-11 17:16:13 +00:00
Chen Liang
03bdee0f75 8342469: Improve API documentation for java.lang.classfile.instruction
Reviewed-by: asotona
Backport-of: 0f035545e5
2024-12-11 16:06:40 +00:00
Kevin Driver
4ecb28ccdc 8344924: Default CA certificates loaded despite request to use custom keystore
Reviewed-by: mullan
Backport-of: 4c39e9faa0
2024-12-10 21:14:37 +00:00
Michael McMahon
ba02e0bd1b 8345794: Backout doc change introduced by JDK-8235786
Reviewed-by: dfuchs
Backport-of: eff20a38c7
2024-12-10 16:58:13 +00:00
Per Minborg
253030a6d4 8345465: Fix performance regression on x64 after JDK-8345120
Reviewed-by: jvernee
Backport-of: 06c44dd568
2024-12-10 14:22:42 +00:00
Chen Liang
a81325433d 8334733: Remove obsolete @enablePreview from tests after JDK-8334714
Reviewed-by: mchung
Backport-of: 4966419550
2024-12-09 18:35:16 +00:00
Magnus Ihse Bursie
203422a8ed 8345424: Move FindDebuginfoFiles out of FileUtils.gmk
Reviewed-by: erikj
Backport-of: 5f30a8d90c
2024-12-09 15:57:55 +00:00
Fernando Guallini
8e9ba788ae 8345414: Google CAInterop test failures
Reviewed-by: rhalade
2024-12-06 18:41:47 +00:00
Matias Saavedra Silva
3aa07dbf14 8343890: SEGV crash in RunTimeClassInfo::klass
Reviewed-by: ccheung
Backport-of: bf0debc023
2024-12-05 22:01:31 +00:00
583 changed files with 10926 additions and 1884 deletions

View File

@@ -29,6 +29,7 @@ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk
include DebugInfoUtils.gmk
include Execute.gmk
include Modules.gmk
include Utils.gmk

View File

@@ -29,6 +29,7 @@ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk
include DebugInfoUtils.gmk
include Modules.gmk
include modules/LauncherCommon.gmk

View File

@@ -0,0 +1,58 @@
#
# 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. 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.
#
ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including DebugInfoUtils.gmk)
endif
################################################################################
#
# Common debuginfo utility functions
#
################################################################################
################################################################################
# Find native debuginfo files in a directory
#
# Param 1 - dir to find debuginfo files in
FindDebuginfoFiles = \
$(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \
$(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \
$(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES)))
# Pick the correct debug info files to copy, either zipped or not.
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
DEBUGINFO_SUFFIXES += .diz
else
DEBUGINFO_SUFFIXES := .debuginfo .pdb .map
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
# dirs.
ifeq ($(call isTargetOs, macosx), true)
$(call FillFindCache, \
$(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)
FindDebuginfoFiles = \
$(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1)))
endif
endif

View File

@@ -307,26 +307,3 @@ ifeq ($(DISABLE_CACHE_FIND), true)
else
FindFiles = $(CacheFindFiles)
endif
# Find native debuginfo files in a directory
#
# Param 1 - dir to find debuginfo files in
FindDebuginfoFiles = \
$(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \
$(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \
$(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES)))
# Pick the correct debug info files to copy, either zipped or not.
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
DEBUGINFO_SUFFIXES += .diz
else
DEBUGINFO_SUFFIXES := .debuginfo .pdb .map
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
# dirs.
ifeq ($(call isTargetOs, macosx), true)
$(call FillFindCache, \
$(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)
FindDebuginfoFiles = \
$(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1)))
endif
endif

View File

@@ -24,12 +24,14 @@
*/
#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/macroAssembler.hpp"
#include "logging/log.hpp"
#include "oops/compressedKlass.hpp"
#include "memory/metaspace.hpp"
#include "runtime/java.hpp"
#include "runtime/os.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/formatBuffer.hpp"
// Helper function; reserve at an address that is compatible with EOR
static char* reserve_at_eor_compatible_address(size_t size, bool aslr) {
@@ -79,6 +81,7 @@ static char* reserve_at_eor_compatible_address(size_t size, bool aslr) {
}
return result;
}
char* CompressedKlassPointers::reserve_address_space_for_compressed_classes(size_t size, bool aslr, bool optimize_for_zero_base) {
char* result = nullptr;
@@ -117,3 +120,12 @@ char* CompressedKlassPointers::reserve_address_space_for_compressed_classes(size
return result;
}
bool CompressedKlassPointers::check_klass_decode_mode(address base, int shift, const size_t range) {
return MacroAssembler::check_klass_decode_mode(base, shift, range);
}
bool CompressedKlassPointers::set_klass_decode_mode() {
const size_t range = klass_range_end() - base();
return MacroAssembler::set_klass_decode_mode(_base, _shift, range);
}

View File

@@ -5291,32 +5291,47 @@ void MacroAssembler::decode_heap_oop_not_null(Register dst, Register src) {
MacroAssembler::KlassDecodeMode MacroAssembler::_klass_decode_mode(KlassDecodeNone);
MacroAssembler::KlassDecodeMode MacroAssembler::klass_decode_mode() {
assert(UseCompressedClassPointers, "not using compressed class pointers");
assert(Metaspace::initialized(), "metaspace not initialized yet");
assert(_klass_decode_mode != KlassDecodeNone, "should be initialized");
return _klass_decode_mode;
}
if (_klass_decode_mode != KlassDecodeNone) {
return _klass_decode_mode;
}
MacroAssembler::KlassDecodeMode MacroAssembler::klass_decode_mode(address base, int shift, const size_t range) {
assert(UseCompressedClassPointers, "not using compressed class pointers");
if (CompressedKlassPointers::base() == nullptr) {
return (_klass_decode_mode = KlassDecodeZero);
// KlassDecodeMode shouldn't be set already.
assert(_klass_decode_mode == KlassDecodeNone, "set once");
if (base == nullptr) {
return KlassDecodeZero;
}
if (operand_valid_for_logical_immediate(
/*is32*/false, (uint64_t)CompressedKlassPointers::base())) {
const size_t range = CompressedKlassPointers::klass_range_end() - CompressedKlassPointers::base();
/*is32*/false, (uint64_t)base)) {
const uint64_t range_mask = right_n_bits(log2i_ceil(range));
if (((uint64_t)CompressedKlassPointers::base() & range_mask) == 0) {
return (_klass_decode_mode = KlassDecodeXor);
if (((uint64_t)base & range_mask) == 0) {
return KlassDecodeXor;
}
}
const uint64_t shifted_base =
(uint64_t)CompressedKlassPointers::base() >> CompressedKlassPointers::shift();
guarantee((shifted_base & 0xffff0000ffffffff) == 0,
"compressed class base bad alignment");
(uint64_t)base >> shift;
if ((shifted_base & 0xffff0000ffffffff) == 0) {
return KlassDecodeMovk;
}
return (_klass_decode_mode = KlassDecodeMovk);
// No valid encoding.
return KlassDecodeNone;
}
// Check if one of the above decoding modes will work for given base, shift and range.
bool MacroAssembler::check_klass_decode_mode(address base, int shift, const size_t range) {
return klass_decode_mode(base, shift, range) != KlassDecodeNone;
}
bool MacroAssembler::set_klass_decode_mode(address base, int shift, const size_t range) {
_klass_decode_mode = klass_decode_mode(base, shift, range);
return _klass_decode_mode != KlassDecodeNone;
}
void MacroAssembler::encode_klass_not_null(Register dst, Register src) {

View File

@@ -94,11 +94,22 @@ class MacroAssembler: public Assembler {
KlassDecodeMovk
};
KlassDecodeMode klass_decode_mode();
// Calculate decoding mode based on given parameters, used for checking then ultimately setting.
static KlassDecodeMode klass_decode_mode(address base, int shift, const size_t range);
private:
static KlassDecodeMode _klass_decode_mode;
// Returns above setting with asserts
static KlassDecodeMode klass_decode_mode();
public:
// Checks the decode mode and returns false if not compatible with preferred decoding mode.
static bool check_klass_decode_mode(address base, int shift, const size_t range);
// Sets the decode mode and returns false if cannot be set.
static bool set_klass_decode_mode(address base, int shift, const size_t range);
public:
MacroAssembler(CodeBuffer* code) : Assembler(code) {}

View File

@@ -154,10 +154,6 @@ void VM_Version::common_initialize() {
unaligned_access.value() != MISALIGNED_FAST);
}
if (FLAG_IS_DEFAULT(AlignVector)) {
FLAG_SET_DEFAULT(AlignVector, AvoidUnalignedAccesses);
}
// See JDK-8026049
// This machine has fast unaligned memory accesses
if (FLAG_IS_DEFAULT(UseUnalignedAccesses)) {
@@ -440,6 +436,10 @@ void VM_Version::c2_initialize() {
warning("AES/CTR intrinsics are not available on this CPU");
FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false);
}
if (FLAG_IS_DEFAULT(AlignVector)) {
FLAG_SET_DEFAULT(AlignVector, AvoidUnalignedAccesses);
}
}
#endif // COMPILER2

View File

@@ -308,6 +308,12 @@ void VM_Version::initialize() {
if (FLAG_IS_DEFAULT(UseMontgomerySquareIntrinsic)) {
FLAG_SET_DEFAULT(UseMontgomerySquareIntrinsic, true);
}
// The OptoScheduling information is not maintained in s390.ad.
if (OptoScheduling) {
warning("OptoScheduling is not supported on this CPU.");
FLAG_SET_DEFAULT(OptoScheduling, false);
}
#endif
if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
FLAG_SET_DEFAULT(UsePopCountInstruction, true);
@@ -323,12 +329,6 @@ void VM_Version::initialize() {
if (FLAG_IS_DEFAULT(UseUnalignedAccesses)) {
FLAG_SET_DEFAULT(UseUnalignedAccesses, true);
}
// The OptoScheduling information is not maintained in s390.ad.
if (OptoScheduling) {
warning("OptoScheduling is not supported on this CPU.");
FLAG_SET_DEFAULT(OptoScheduling, false);
}
}

View File

@@ -145,15 +145,16 @@ size_t MetaspaceShared::core_region_alignment() {
}
static bool shared_base_valid(char* shared_base) {
// We check user input for SharedBaseAddress at dump time. We must weed out values
// we already know to be invalid later.
// We check user input for SharedBaseAddress at dump time.
// At CDS runtime, "shared_base" will be the (attempted) mapping start. It will also
// be the encoding base, since the the headers of archived base objects (and with Lilliput,
// the prototype mark words) carry pre-computed narrow Klass IDs that refer to the mapping
// start as base.
//
// Therefore, "shared_base" must be later usable as encoding base.
// On AARCH64, The "shared_base" may not be later usable as encoding base, depending on the
// total size of the reserved area and the precomputed_narrow_klass_shift. This is checked
// before reserving memory. Here we weed out values already known to be invalid later.
return AARCH64_ONLY(is_aligned(shared_base, 4 * G)) NOT_AARCH64(true);
}
@@ -985,8 +986,10 @@ bool MetaspaceShared::try_link_class(JavaThread* current, InstanceKlass* ik) {
ik->external_name());
CLEAR_PENDING_EXCEPTION;
SystemDictionaryShared::set_class_has_failed_verification(ik);
} else {
assert(!SystemDictionaryShared::has_class_failed_verification(ik), "sanity");
ik->compute_has_loops_flag_for_methods();
}
ik->compute_has_loops_flag_for_methods();
BytecodeVerificationLocal = saved;
return true;
} else {
@@ -1486,6 +1489,15 @@ char* MetaspaceShared::reserve_address_space_for_archives(FileMapInfo* static_ma
const size_t total_range_size =
archive_space_size + gap_size + class_space_size;
// Test that class space base address plus shift can be decoded by aarch64, when restored.
const int precomputed_narrow_klass_shift = ArchiveBuilder::precomputed_narrow_klass_shift();
if (!CompressedKlassPointers::check_klass_decode_mode(base_address, precomputed_narrow_klass_shift,
total_range_size)) {
log_info(cds)("CDS initialization: Cannot use SharedBaseAddress " PTR_FORMAT " with precomputed shift %d.",
p2i(base_address), precomputed_narrow_klass_shift);
use_archive_base_addr = false;
}
assert(total_range_size > ccs_begin_offset, "must be");
if (use_windows_memory_mapping() && use_archive_base_addr) {
if (base_address != nullptr) {
@@ -1525,7 +1537,7 @@ char* MetaspaceShared::reserve_address_space_for_archives(FileMapInfo* static_ma
}
// Paranoid checks:
assert(base_address == nullptr || (address)total_space_rs.base() == base_address,
assert(!use_archive_base_addr || (address)total_space_rs.base() == base_address,
"Sanity (" PTR_FORMAT " vs " PTR_FORMAT ")", p2i(base_address), p2i(total_space_rs.base()));
assert(is_aligned(total_space_rs.base(), base_address_alignment), "Sanity");
assert(total_space_rs.size() == total_range_size, "Sanity");

View File

@@ -76,10 +76,13 @@ void RunTimeClassInfo::init(DumpTimeClassInfo& info) {
}
InstanceKlass* RunTimeClassInfo::klass() const {
if (ArchiveBuilder::is_active() && ArchiveBuilder::current()->is_in_buffer_space((address)this)) {
return ArchiveBuilder::current()->offset_to_buffered<InstanceKlass*>(_klass_offset);
} else {
if (MetaspaceShared::is_in_shared_metaspace(this)) {
// <this> is inside a mmaped CDS archive.
return ArchiveUtils::offset_to_archived_address<InstanceKlass*>(_klass_offset);
} else {
// <this> is a temporary copy of a RunTimeClassInfo that's being initialized
// by the ArchiveBuilder.
return ArchiveBuilder::current()->offset_to_buffered<InstanceKlass*>(_klass_offset);
}
}

View File

@@ -37,7 +37,11 @@ size_t MinNewSize = 0;
size_t MinOldSize = 0;
size_t MaxOldSize = 0;
size_t OldSize = 0;
// If InitialHeapSize or MinHeapSize is not set on cmdline, this variable,
// together with NewSize, is used to derive them.
// Using the same value when it was a configurable flag to avoid breakage.
// See more in JDK-8346005
size_t OldSize = ScaleForWordSize(4*M);
size_t GenAlignment = 0;

View File

@@ -180,8 +180,8 @@ void ShenandoahGenerationalHeap::gc_threads_do(ThreadClosure* tcl) const {
}
void ShenandoahGenerationalHeap::stop() {
regulator_thread()->stop();
ShenandoahHeap::stop();
regulator_thread()->stop();
}
void ShenandoahGenerationalHeap::evacuate_collection_set(bool concurrent) {

View File

@@ -538,7 +538,6 @@ ShenandoahHeap::ShenandoahHeap(ShenandoahCollectorPolicy* policy) :
_pacer(nullptr),
_verifier(nullptr),
_phase_timings(nullptr),
_mmu_tracker(),
_monitoring_support(nullptr),
_memory_pool(nullptr),
_stw_memory_manager("Shenandoah Pauses"),
@@ -632,6 +631,8 @@ public:
void ShenandoahHeap::post_initialize() {
CollectedHeap::post_initialize();
// Schedule periodic task to report on gc thread CPU utilization
_mmu_tracker.initialize();
MutexLocker ml(Threads_lock);
@@ -2084,6 +2085,9 @@ void ShenandoahHeap::stop() {
// Step 0. Notify policy to disable event recording and prevent visiting gc threads during shutdown
_shenandoah_policy->record_shutdown();
// Step 0a. Stop reporting on gc thread cpu utilization
mmu_tracker()->stop();
// Step 1. Notify control thread that we are in shutdown.
// Note that we cannot do that with stop(), because stop() is blocking and waits for the actual shutdown.
// Doing stop() here would wait for the normal GC cycle to complete, never falling through to cancel below.

View File

@@ -48,6 +48,7 @@ class ThreadTimeAccumulator : public ThreadClosure {
size_t total_time;
ThreadTimeAccumulator() : total_time(0) {}
void do_thread(Thread* thread) override {
assert(!thread->has_terminated(), "Cannot get cpu time for terminated thread: " UINTX_FORMAT, thread->osthread()->thread_id_for_printing());
total_time += os::thread_cpu_time(thread);
}
};
@@ -65,7 +66,6 @@ ShenandoahMmuTracker::ShenandoahMmuTracker() :
}
ShenandoahMmuTracker::~ShenandoahMmuTracker() {
_mmu_periodic_task->disenroll();
delete _mmu_periodic_task;
}
@@ -175,6 +175,10 @@ void ShenandoahMmuTracker::report() {
log_debug(gc)("Periodic Sample: GCU = %.3f%%, MU = %.3f%% during most recent %.1fs", gcu * 100, mu * 100, time_delta);
}
void ShenandoahMmuTracker::stop() const {
_mmu_periodic_task->disenroll();
}
void ShenandoahMmuTracker::initialize() {
// initialize static data
_active_processors = os::initial_active_processor_count();

View File

@@ -101,6 +101,10 @@ public:
// GCPauseIntervalMillis and defaults to 5 seconds. This method computes
// the MMU over the elapsed interval and records it in a running average.
void report();
// Unenrolls the periodic task that collects CPU utilization for GC threads. This must happen _before_ the
// gc threads are stopped and terminated.
void stop() const;
};
#endif //SHARE_GC_SHENANDOAH_SHENANDOAHMMUTRACKER_HPP

View File

@@ -30,6 +30,7 @@
#include "runtime/java.hpp"
#include "runtime/os.hpp"
#include "utilities/debug.hpp"
#include "utilities/formatBuffer.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/ostream.hpp"
@@ -176,6 +177,12 @@ void CompressedKlassPointers::initialize_for_given_encoding(address addr, size_t
calc_lowest_highest_narrow_klass_id();
// This has already been checked for SharedBaseAddress and if this fails, it's a bug in the allocation code.
if (!set_klass_decode_mode()) {
fatal("base=" PTR_FORMAT " given with shift %d, cannot be used to encode class pointers",
p2i(_base), _shift);
}
DEBUG_ONLY(sanity_check_after_initialization();)
}
@@ -267,6 +274,20 @@ void CompressedKlassPointers::initialize(address addr, size_t len) {
calc_lowest_highest_narrow_klass_id();
// Initialize klass decode mode and check compability with decode instructions
if (!set_klass_decode_mode()) {
// Give fatal error if this is a specified address
if ((address)CompressedClassSpaceBaseAddress == _base) {
vm_exit_during_initialization(
err_msg("CompressedClassSpaceBaseAddress=" PTR_FORMAT " given with shift %d, cannot be used to encode class pointers",
CompressedClassSpaceBaseAddress, _shift));
} else {
// If this fails, it's a bug in the allocation code.
fatal("CompressedClassSpaceBaseAddress=" PTR_FORMAT " given with shift %d, cannot be used to encode class pointers",
p2i(_base), _shift);
}
}
#ifdef ASSERT
sanity_check_after_initialization();
#endif

View File

@@ -258,6 +258,15 @@ public:
is_aligned(addr, klass_alignment_in_bytes());
}
#if defined(AARCH64) && !defined(ZERO)
// Check that with the given base, shift and range, aarch64 code can encode and decode the klass pointer.
static bool check_klass_decode_mode(address base, int shift, const size_t range);
// Called after initialization.
static bool set_klass_decode_mode();
#else
static bool check_klass_decode_mode(address base, int shift, const size_t range) { return true; }
static bool set_klass_decode_mode() { return true; }
#endif
};
#endif // SHARE_OOPS_COMPRESSEDKLASS_HPP

View File

@@ -1637,8 +1637,9 @@ bool LibraryCallKit::inline_vector_reduction() {
int opc = VectorSupport::vop2ideal(opr->get_con(), elem_bt);
int sopc = ReductionNode::opcode(opc, elem_bt);
// Ensure reduction operation for lanewise operation
// When using mask, mask use type needs to be VecMaskUseLoad.
if (!arch_supports_vector(sopc, num_elem, elem_bt, is_masked_op ? VecMaskUseLoad : VecMaskNotUsed)) {
if (sopc == opc || !arch_supports_vector(sopc, num_elem, elem_bt, is_masked_op ? VecMaskUseLoad : VecMaskNotUsed)) {
log_if_needed(" ** not supported: arity=1 op=%d/reduce vlen=%d etype=%s is_masked_op=%d",
sopc, num_elem, type2name(elem_bt), is_masked_op ? 1 : 0);
return false;

View File

@@ -1466,6 +1466,9 @@ bool VectorCastNode::implemented(int opc, uint vlen, BasicType src_type, BasicTy
if (is_java_primitive(dst_type) &&
is_java_primitive(src_type) &&
(vlen > 1) && is_power_of_2(vlen) &&
// In rare case, the input to the VectorCast could be a Replicate node. We need to make sure creating is supported:
// check the src_type:
VectorNode::vector_size_supported_auto_vectorization(src_type, vlen) &&
VectorNode::vector_size_supported_auto_vectorization(dst_type, vlen)) {
int vopc = VectorCastNode::opcode(opc, src_type);
return vopc > 0 && Matcher::match_rule_supported_auto_vectorization(vopc, vlen, dst_type);

View File

@@ -60,14 +60,14 @@ JVM_END
#if INCLUDE_JVMTI
class JvmtiUnmountBeginMark : public StackObj {
Handle _vthread;
JavaThread* _target;
JavaThread* _current;
freeze_result _result;
bool _failed;
public:
JvmtiUnmountBeginMark(JavaThread* t) :
_vthread(t, t->vthread()), _target(t), _result(freeze_pinned_native), _failed(false) {
assert(!_target->is_in_VTMS_transition(), "must be");
_vthread(t, t->vthread()), _current(t), _result(freeze_pinned_native), _failed(false) {
assert(!_current->is_in_VTMS_transition(), "must be");
if (JvmtiVTMSTransitionDisabler::VTMS_notify_jvmti_events()) {
JvmtiVTMSTransitionDisabler::VTMS_vthread_unmount((jthread)_vthread.raw_value(), true);
@@ -75,26 +75,26 @@ class JvmtiUnmountBeginMark : public StackObj {
// Don't preempt if there is a pending popframe or earlyret operation. This can
// be installed in start_VTMS_transition() so we need to check it here.
if (JvmtiExport::can_pop_frame() || JvmtiExport::can_force_early_return()) {
JvmtiThreadState* state = _target->jvmti_thread_state();
if (_target->has_pending_popframe() || (state != nullptr && state->is_earlyret_pending())) {
JvmtiThreadState* state = _current->jvmti_thread_state();
if (_current->has_pending_popframe() || (state != nullptr && state->is_earlyret_pending())) {
_failed = true;
}
}
// Don't preempt in case there is an async exception installed since
// we would incorrectly throw it during the unmount logic in the carrier.
if (_target->has_async_exception_condition()) {
if (_current->has_async_exception_condition()) {
_failed = true;
}
} else {
_target->set_is_in_VTMS_transition(true);
_current->set_is_in_VTMS_transition(true);
java_lang_Thread::set_is_in_VTMS_transition(_vthread(), true);
}
}
~JvmtiUnmountBeginMark() {
assert(!_target->is_suspended(), "must be");
assert(!_current->is_suspended(), "must be");
assert(_target->is_in_VTMS_transition(), "must be");
assert(_current->is_in_VTMS_transition(), "must be");
assert(java_lang_Thread::is_in_VTMS_transition(_vthread()), "must be");
// Read it again since for late binding agents the flag could have
@@ -106,7 +106,7 @@ class JvmtiUnmountBeginMark : public StackObj {
if (jvmti_present) {
JvmtiVTMSTransitionDisabler::VTMS_vthread_mount((jthread)_vthread.raw_value(), false);
} else {
_target->set_is_in_VTMS_transition(false);
_current->set_is_in_VTMS_transition(false);
java_lang_Thread::set_is_in_VTMS_transition(_vthread(), false);
}
}
@@ -115,51 +115,59 @@ class JvmtiUnmountBeginMark : public StackObj {
bool failed() { return _failed; }
};
static bool is_vthread_safe_to_preempt_for_jvmti(JavaThread* target) {
if (target->is_in_VTMS_transition()) {
// We caught target at the end of a mount transition.
static bool is_vthread_safe_to_preempt_for_jvmti(JavaThread* current) {
if (current->is_in_VTMS_transition()) {
// We are at the end of a mount transition.
return false;
}
return true;
}
#endif // INCLUDE_JVMTI
static bool is_vthread_safe_to_preempt(JavaThread* target, oop vthread) {
static bool is_vthread_safe_to_preempt(JavaThread* current, oop vthread) {
assert(java_lang_VirtualThread::is_instance(vthread), "");
if (java_lang_VirtualThread::state(vthread) != java_lang_VirtualThread::RUNNING) { // inside transition
return false;
}
return JVMTI_ONLY(is_vthread_safe_to_preempt_for_jvmti(target)) NOT_JVMTI(true);
return JVMTI_ONLY(is_vthread_safe_to_preempt_for_jvmti(current)) NOT_JVMTI(true);
}
typedef freeze_result (*FreezeContFnT)(JavaThread*, intptr_t*);
static void verify_preempt_preconditions(JavaThread* target, oop continuation) {
assert(target == JavaThread::current(), "no support for external preemption");
assert(target->has_last_Java_frame(), "");
assert(!target->preempting(), "");
assert(target->last_continuation() != nullptr, "");
assert(target->last_continuation()->cont_oop(target) == continuation, "");
static void verify_preempt_preconditions(JavaThread* current, oop continuation) {
assert(current == JavaThread::current(), "no support for external preemption");
assert(current->has_last_Java_frame(), "");
assert(!current->preempting(), "");
assert(current->last_continuation() != nullptr, "");
assert(current->last_continuation()->cont_oop(current) == continuation, "");
assert(Continuation::continuation_scope(continuation) == java_lang_VirtualThread::vthread_scope(), "");
assert(!target->has_pending_exception(), "");
assert(!current->has_pending_exception(), "");
}
freeze_result Continuation::try_preempt(JavaThread* target, oop continuation) {
verify_preempt_preconditions(target, continuation);
freeze_result Continuation::try_preempt(JavaThread* current, oop continuation) {
verify_preempt_preconditions(current, continuation);
if (LockingMode == LM_LEGACY) {
return freeze_unsupported;
}
if (!is_vthread_safe_to_preempt(target, target->vthread())) {
if (!is_vthread_safe_to_preempt(current, current->vthread())) {
return freeze_pinned_native;
}
JVMTI_ONLY(JvmtiUnmountBeginMark jubm(target);)
JVMTI_ONLY(JvmtiUnmountBeginMark jubm(current);)
JVMTI_ONLY(if (jubm.failed()) return freeze_pinned_native;)
freeze_result res = CAST_TO_FN_PTR(FreezeContFnT, freeze_preempt_entry())(target, target->last_Java_sp());
freeze_result res = CAST_TO_FN_PTR(FreezeContFnT, freeze_preempt_entry())(current, current->last_Java_sp());
log_trace(continuations, preempt)("try_preempt: %d", res);
JVMTI_ONLY(jubm.set_result(res);)
if (current->has_pending_exception()) {
assert(res == freeze_exception, "expecting an exception result from freeze");
// We don't want to throw exceptions, especially when returning
// from monitorenter since the compiler does not expect one. We
// just ignore the exception and pin the vthread to the carrier.
current->clear_pending_exception();
}
return res;
}

View File

@@ -32,6 +32,8 @@ import java.lang.classfile.attribute.ModuleAttribute;
import java.lang.classfile.constantpool.ClassEntry;
import java.lang.classfile.constantpool.ConstantPoolBuilder;
import java.lang.classfile.constantpool.Utf8Entry;
import java.lang.classfile.instruction.BranchInstruction;
import java.lang.classfile.instruction.DiscontinuedInstruction;
import java.lang.classfile.instruction.ExceptionCatch;
import java.lang.constant.ClassDesc;
import java.lang.reflect.AccessFlag;
@@ -230,17 +232,35 @@ public sealed interface ClassFile
/**
* Option describing whether to automatically rewrite short jumps to
* long when necessary.
* Default is {@code FIX_SHORT_JUMPS} to automatically rewrite jump
* Default is {@link #FIX_SHORT_JUMPS} to automatically rewrite jump
* instructions.
* <p>
* Due to physical restrictions, some types of instructions cannot encode
* certain jump targets with bci offsets less than -32768 or greater than
* 32767, as they use a {@code s2} to encode such an offset. (The maximum
* length of the {@code code} array is 65535.) These types of instructions
* are called "short jumps".
*
* @see BranchInstruction
* @see DiscontinuedInstruction.JsrInstruction
* @since 24
*/
enum ShortJumpsOption implements Option {
/** Automatically convert short jumps to long when necessary */
/**
* Automatically convert short jumps to long when necessary.
* <p>
* For an invalid instruction model, a {@link CodeBuilder} may generate
* another or a few other instructions to accomplish the same effect.
*/
FIX_SHORT_JUMPS,
/** Fail if short jump overflows */
/**
* Fail with an {@link IllegalArgumentException} if short jump overflows.
* <p>
* This is useful to ensure the physical accuracy of a generated {@code
* class} file.
*/
FAIL_ON_SHORT_JUMPS
}

View File

@@ -51,7 +51,7 @@ import static jdk.internal.classfile.impl.BytecodeHelpers.handleDescToHandleInfo
* #with(ClassFileElement)} or concretely by calling the various {@code withXxx}
* methods.
*
* <h2>Instruction Factories</h2>
* <h2 id="instruction-factories">Instruction Factories</h2>
* {@code CodeBuilder} provides convenience methods to create instructions (See
* JVMS {@jvms 6.5} Instructions) by their mnemonic, taking necessary operands.
* <ul>

View File

@@ -34,6 +34,8 @@ import java.util.function.Consumer;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import jdk.internal.classfile.components.ClassPrinter;
/**
* A {@link ClassFileElement} that has complex structure defined in terms of
* other classfile elements, such as a method, field, method body, or entire
@@ -92,4 +94,14 @@ public sealed interface CompoundElement<E extends ClassFileElement>
return Collections.unmodifiableList(list);
}
/**
* {@return a text representation of the compound element and its contents for debugging purposes}
*
* The format, structure and exact contents of the returned string are not specified and may change at any time in the future.
*/
default String toDebugString() {
StringBuilder text = new StringBuilder();
ClassPrinter.toYaml(this, ClassPrinter.Verbosity.TRACE_ALL, text::append);
return text.toString();
}
}

View File

@@ -25,13 +25,20 @@
package java.lang.classfile;
import java.lang.classfile.attribute.CodeAttribute;
import java.lang.classfile.instruction.*;
import jdk.internal.classfile.impl.AbstractInstruction;
/**
* Models an executable instruction in a method body.
* Models an executable instruction in the {@code code} array of the {@link
* CodeAttribute Code} attribute of a method.
* <p>
* The {@link #opcode() opcode} identifies the operation of an instruction.
* Each {@linkplain Opcode#kind() kind} of opcode has its own modeling interface
* for instructions.
*
* @sealedGraph
* @since 24
*/
public sealed interface Instruction extends CodeElement
@@ -46,12 +53,14 @@ public sealed interface Instruction extends CodeElement
ThrowInstruction, TypeCheckInstruction, AbstractInstruction {
/**
* {@return the opcode of this instruction}
* {@return the operation of this instruction}
*/
Opcode opcode();
/**
* {@return the size in bytes of this instruction}
* This value is equal to {@link Opcode#sizeIfFixed()
* opcode().sizeIfFixed()} if it is not {@code -1}.
*/
int sizeInBytes();
}

View File

@@ -24,21 +24,60 @@
*/
package java.lang.classfile;
import java.lang.classfile.attribute.CodeAttribute;
import java.lang.classfile.instruction.LabelTarget;
import java.util.ListIterator;
import jdk.internal.classfile.impl.LabelImpl;
/**
* A marker for a position within the instructions of a method body. The
* association between a label's identity and the position it represents is
* managed by the entity managing the method body (a {@link CodeModel} or {@link
* CodeBuilder}), not the label itself; this allows the same label to have a
* meaning both in an existing method (as managed by a {@linkplain CodeModel})
* and in the transformation of that method (as managed by a {@linkplain
* CodeBuilder}), while corresponding to different positions in each. When
* traversing the elements of a {@linkplain CodeModel}, {@linkplain Label}
* markers will be delivered at the position to which they correspond. A label
* can be bound to the current position within a {@linkplain CodeBuilder} via
* {@link CodeBuilder#labelBinding(Label)} or {@link CodeBuilder#with(ClassFileElement)}.
* position is a cursor position in the list of instructions, similar to that
* of a {@link ListIterator}.
*
* <h2 id="reading">Reading Labels</h2>
* Labels read from {@code class} files represent positions in the {@code code}
* array of a {@link CodeAttribute Code} attribute. It is associated with a
* <dfn>{@index bci}</dfn> (bytecode index), also known as <dfn>{@index pc}</dfn>
* (program counter), the index into the {@code code} array; the actual cursor
* position is immediately before the given index, so a label at the beginning
* of the instructions has bci {@code 0}, and a label at the end of the
* instructions has bci {@link CodeAttribute#codeLength codeLength() + 1}. The
* bci can be inspected through {@link CodeAttribute#labelToBci
* CodeAttribute::labelToBci}.
* <p>
* In generic {@link CodeModel}s, a label may not have a bci value; the position
* of a label can be found by searching for the corresponding {@link LabelTarget}
* within that model.
*
* <h2 id="writing">Writing Labels</h2>
* Many models in {@link java.lang.classfile} refer to labels. To write a
* label, a label must be obtained, it must be bound to a {@link CodeBuilder}.
* <p>
* To obtain a label:
* <ul>
* <li>Use a label read from other models.
* <li>Use pre-defined labels from a {@link CodeBuilder}, such as {@link
* CodeBuilder#startLabel() CodeBuilder::startLabel}, {@link CodeBuilder#endLabel
* CodeBuilder::endLabel}, or {@link CodeBuilder.BlockCodeBuilder#breakLabel
* BlockCodeBuilder::breakLabel}. They are already bound.
* <li>Create labels with {@link CodeBuilder#newLabel CodeBuilder::newLabel} or
* {@link CodeBuilder#newBoundLabel CodeBuilder::newBoundLabel}.
* </ul>
* <p>
* A label must be bound exactly once in the {@code CodeBuilder} where it is
* used; otherwise, writing fails. To bind an unbound label:
* <ul>
* <li>Send a read {@link LabelTarget} to a {@code CodeBuilder}.
* <li>Use {@link CodeBuilder#labelBinding CodeBuilder::labelBinding}.
* </ul>
* Note that a label read from another model is not automatically bound in a
* {@code CodeBuilder}; they are separate entities and the label is bound to
* different positions in them.
*
* @see CodeAttribute#labelToBci CodeAttribute::labelToBci
* @see CodeBuilder#newLabel CodeBuilder::newLabel
* @see CodeBuilder#labelBinding CodeBuilder::labelBinding
* @since 24
*/
public sealed interface Label

File diff suppressed because it is too large Load Diff

View File

@@ -26,6 +26,9 @@
package java.lang.classfile;
import java.lang.classfile.instruction.DiscontinuedInstruction;
import java.lang.classfile.instruction.LoadInstruction;
import java.lang.classfile.instruction.NewPrimitiveArrayInstruction;
import java.lang.classfile.instruction.StoreInstruction;
import java.lang.constant.ClassDesc;
import java.lang.constant.ConstantDescs;
import java.lang.invoke.TypeDescriptor;
@@ -33,13 +36,17 @@ import java.lang.invoke.TypeDescriptor;
import jdk.internal.vm.annotation.Stable;
/**
* Describes the data types Java Virtual Machine operates on.
* This omits {@code returnAddress} (JVMS {@jvms 2.3.3}),
* which is only used by discontinued {@link
* DiscontinuedInstruction.JsrInstruction jsr} and {@link
* DiscontinuedInstruction.RetInstruction ret} instructions,
* and includes {@link #VOID void} (JVMS {@jvms 4.3.3}), which
* appears as a method return type.
* Describes the data types Java Virtual Machine operates on. This omits {@code
* returnAddress} (JVMS {@jvms 2.3.3}) and includes {@link #VOID void} (JVMS
* {@jvms 4.3.3}), which appears as a method return type.
* <p>
* The <code>{@index returnAddress}</code> type is only used by discontinued
* {@linkplain DiscontinuedInstruction.JsrInstruction jump subroutine} and
* {@linkplain DiscontinuedInstruction.RetInstruction return from subroutine}
* instructions. Jump subroutine instructions push {@code returnAddress} to the
* operand stack; {@link StoreInstruction astore} instructions store {@code
* returnAddress} from the operand stack to local variables; return from
* subroutine instructions load {@code returnAddress} from local variables.
*
* <h2 id="computational-type">Computational Type</h2>
* In the {@code class} file format, local variables (JVMS {@jvms 2.6.1}),
@@ -164,7 +171,10 @@ public enum TypeKind {
/**
* {@return the code used by the {@link Opcode#NEWARRAY newarray} instruction to create an array
* of this component type, or {@code -1} if this type is not supported by {@code newarray}}
* @jvms 6.5.newarray <i>newarray</i>
*
* @jvms 6.5.newarray <em>newarray</em>
* @see NewPrimitiveArrayInstruction
* @see #fromNewarrayCode(int) fromNewarrayCode(int)
*/
public int newarrayCode() {
return newarrayCode;
@@ -175,6 +185,7 @@ public enum TypeKind {
* This is also the category of this type for instructions operating on the operand stack without
* regard to type (JVMS {@jvms 2.11.1}), such as {@link Opcode#POP pop} versus {@link Opcode#POP2
* pop2}.
*
* @jvms 2.6.1 Local Variables
* @jvms 2.6.2 Operand Stacks
*/
@@ -185,6 +196,9 @@ public enum TypeKind {
/**
* {@return the {@linkplain ##computational-type computational type} for this type, or {@link #VOID void}
* for {@code void}}
*
* @see LoadInstruction
* @see StoreInstruction
*/
public TypeKind asLoadable() {
return ordinal() < 4 ? INT : this;
@@ -193,9 +207,12 @@ public enum TypeKind {
/**
* {@return the component type described by the array code used as an operand to {@link Opcode#NEWARRAY
* newarray}}
*
* @param newarrayCode the operand of the {@code newarray} instruction
* @throws IllegalArgumentException if the code is invalid
* @jvms 6.5.newarray <i>newarray</i>
* @jvms 6.5.newarray <em>newarray</em>
* @see NewPrimitiveArrayInstruction
* @see #newarrayCode() newarrayCode()
*/
public static TypeKind fromNewarrayCode(int newarrayCode) {
return switch (newarrayCode) {

View File

@@ -24,6 +24,7 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
@@ -35,18 +36,29 @@ import jdk.internal.classfile.impl.Util;
/**
* Models an array load instruction in the {@code code} array of a {@code Code}
* attribute. Corresponding opcodes will have a {@code kind} of {@link
* Opcode.Kind#ARRAY_LOAD}. Delivered as a {@link CodeElement} when
* attribute. Corresponding opcodes have a {@linkplain Opcode#kind() kind}
* of {@link Opcode.Kind#ARRAY_LOAD}. Delivered as a {@link CodeElement} when
* traversing the elements of a {@link CodeModel}.
* <p>
* An array load instruction is composite:
* {@snippet lang=text :
* // @link substring="ArrayLoadInstruction" target="CodeBuilder#arrayLoad(TypeKind)" :
* ArrayLoadInstruction(TypeKind typeKind) // @link substring="typeKind" target="#typeKind"
* }
* where {@code typeKind} is not {@link TypeKind#VOID void}, and {@link
* TypeKind#BOOLEAN boolean} is converted to {@link TypeKind#BYTE byte}.
*
* @see Opcode.Kind#ARRAY_LOAD
* @see CodeBuilder#arrayLoad CodeBuilder::arrayLoad
* @since 24
*/
public sealed interface ArrayLoadInstruction extends Instruction
permits AbstractInstruction.UnboundArrayLoadInstruction {
/**
* {@return the component type of the array} The {@link TypeKind#BYTE byte}
* {@return the component type of the array} The {@link TypeKind#BYTE byte}
* type load instruction {@link Opcode#BALOAD baload} also operates on
* {@link TypeKind#BOOLEAN boolean} arrays.
* {@link TypeKind#BOOLEAN boolean} arrays, so this never returns
* {@code boolean}.
*/
TypeKind typeKind();
@@ -56,7 +68,7 @@ public sealed interface ArrayLoadInstruction extends Instruction
* @param op the opcode for the specific type of array load instruction,
* which must be of kind {@link Opcode.Kind#ARRAY_LOAD}
* @throws IllegalArgumentException if the opcode kind is not
* {@link Opcode.Kind#ARRAY_LOAD}.
* {@link Opcode.Kind#ARRAY_LOAD}
*/
static ArrayLoadInstruction of(Opcode op) {
Util.checkKind(op, Opcode.Kind.ARRAY_LOAD);

View File

@@ -24,6 +24,7 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
@@ -35,18 +36,29 @@ import jdk.internal.classfile.impl.Util;
/**
* Models an array store instruction in the {@code code} array of a {@code Code}
* attribute. Corresponding opcodes will have a {@code kind} of {@link
* Opcode.Kind#ARRAY_STORE}. Delivered as a {@link CodeElement} when
* attribute. Corresponding opcodes have a {@linkplain Opcode#kind() kind}
* of {@link Opcode.Kind#ARRAY_STORE}. Delivered as a {@link CodeElement} when
* traversing the elements of a {@link CodeModel}.
* <p>
* An array store instruction is composite:
* {@snippet lang=text :
* // @link substring="ArrayStoreInstruction" target="CodeBuilder#arrayStore(TypeKind)" :
* ArrayStoreInstruction(TypeKind typeKind) // @link substring="typeKind" target="#typeKind"
* }
* where {@code typeKind} is not {@link TypeKind#VOID void}, and {@link
* TypeKind#BOOLEAN boolean} is converted to {@link TypeKind#BYTE byte}.
*
* @see Opcode.Kind#ARRAY_STORE
* @see CodeBuilder#arrayStore CodeBuilder::arrayStore
* @since 24
*/
public sealed interface ArrayStoreInstruction extends Instruction
permits AbstractInstruction.UnboundArrayStoreInstruction {
/**
* {@return the component type of the array} The {@link TypeKind#BYTE byte}
* {@return the component type of the array} The {@link TypeKind#BYTE byte}
* type store instruction {@link Opcode#BASTORE bastore} also operates on
* {@link TypeKind#BOOLEAN boolean} arrays.
* {@link TypeKind#BOOLEAN boolean} arrays, so this never returns
* {@code boolean}.
*/
TypeKind typeKind();
@@ -56,7 +68,7 @@ public sealed interface ArrayStoreInstruction extends Instruction
* @param op the opcode for the specific type of array store instruction,
* which must be of kind {@link Opcode.Kind#ARRAY_STORE}
* @throws IllegalArgumentException if the opcode kind is not
* {@link Opcode.Kind#ARRAY_STORE}.
* {@link Opcode.Kind#ARRAY_STORE}
*/
static ArrayStoreInstruction of(Opcode op) {
Util.checkKind(op, Opcode.Kind.ARRAY_STORE);

View File

@@ -24,28 +24,41 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
import java.lang.classfile.Label;
import java.lang.classfile.Opcode;
import java.lang.classfile.*;
import jdk.internal.classfile.impl.AbstractInstruction;
import jdk.internal.classfile.impl.Util;
/**
* Models a branching instruction (conditional or unconditional) in the {@code
* code} array of a {@code Code} attribute. Corresponding opcodes will have a
* {@code kind} of {@link Opcode.Kind#BRANCH}. Delivered as a {@link
* CodeElement} when traversing the elements of a {@link CodeModel}.
* code} array of a {@code Code} attribute. Corresponding opcodes have a
* {@linkplain Opcode#kind() kind} of {@link Opcode.Kind#BRANCH}. Delivered as
* a {@link CodeElement} when traversing the elements of a {@link CodeModel}.
* <p>
* A branch instruction is composite:
* {@snippet lang=text :
* // @link substring="BranchInstruction" target="#of":
* BranchInstruction(
* Opcode opcode, // @link substring="opcode" target="#opcode()"
* Label target // @link substring="target" target="#target()"
* )
* }
* <p>
* Due to physical restrictions, some types of instructions cannot encode labels
* too far away in the list of code elements. In such cases, the {@link
* ClassFile.ShortJumpsOption} controls how an invalid branch instruction model
* is written by a {@link CodeBuilder}.
*
* @see Opcode.Kind#BRANCH
* @see CodeBuilder#branch CodeBuilder::branch
* @see ClassFile.ShortJumpsOption
* @since 24
*/
public sealed interface BranchInstruction extends Instruction
permits AbstractInstruction.BoundBranchInstruction,
AbstractInstruction.UnboundBranchInstruction {
/**
* {@return the target of the branch}
* {@return the branch target of this instruction}
*/
Label target();
@@ -56,7 +69,7 @@ public sealed interface BranchInstruction extends Instruction
* which must be of kind {@link Opcode.Kind#BRANCH}
* @param target the target of the branch
* @throws IllegalArgumentException if the opcode kind is not
* {@link Opcode.Kind#BRANCH}.
* {@link Opcode.Kind#BRANCH}
*/
static BranchInstruction of(Opcode op, Label target) {
Util.checkKind(op, Opcode.Kind.BRANCH);

View File

@@ -25,6 +25,7 @@
package java.lang.classfile.instruction;
import java.lang.classfile.ClassFile;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Label;
@@ -36,11 +37,31 @@ import jdk.internal.classfile.impl.AbstractPseudoInstruction;
import jdk.internal.classfile.impl.BoundCharacterRange;
/**
* A pseudo-instruction which models a single entry in the
* {@link CharacterRangeTableAttribute}. Delivered as a {@link CodeElement}
* during traversal of the elements of a {@link CodeModel}, according to
* the setting of the {@link ClassFile.DebugElementsOption} option.
* A pseudo-instruction which models a single entry in the {@link
* CharacterRangeTableAttribute CharacterRangeTable} attribute. Delivered as a
* {@link CodeElement} during traversal of the elements of a {@link CodeModel},
* according to the setting of the {@link ClassFile.DebugElementsOption} option.
* <p>
* A character range entry is composite:
* {@snippet lang=text :
* // @link substring="CharacterRange" target="#of":
* CharacterRange(
* Label startScope, // @link substring="startScope" target="#startScope"
* Label endScope, // @link substring="endScope" target="#endScope"
* int characterRangeStart, // @link substring="characterRangeStart" target="#characterRangeStart"
* int characterRangeEnd, // @link substring="characterRangeEnd" target="#characterRangeEnd"
* int flags // @link substring="flags" target="#flags"
* )
* }
* <p>
* Another model, {@link CharacterRangeInfo}, also models a character range
* entry; it has no dependency on a {@code CodeModel} and represents of bci
* values as {@code int}s instead of {@code Label}s, and is used as components
* of a {@link CharacterRangeTableAttribute}.
*
* @see CharacterRangeInfo
* @see CodeBuilder#characterRange CodeBuilder::characterRange
* @see ClassFile.DebugElementsOption
* @since 24
*/
public sealed interface CharacterRange extends PseudoInstruction
@@ -114,7 +135,7 @@ public sealed interface CharacterRange extends PseudoInstruction
* <li>{@link #FLAG_BRANCH_FALSE}
* </ul>
*
* @see java.lang.classfile.attribute.CharacterRangeInfo#flags()
* @see CharacterRangeInfo#flags()
*
* @return the flags
*/

View File

@@ -24,6 +24,7 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
@@ -38,12 +39,22 @@ import jdk.internal.classfile.impl.Util;
/**
* Models a constant-load instruction in the {@code code} array of a {@code
* Code} attribute, including "intrinsic constant" instructions (e.g., {@code
* iconst_0}), "argument constant" instructions (e.g., {@code bipush}), and "load
* constant" instructions (e.g., {@code LDC}). Corresponding opcodes will have
* a {@code kind} of {@link Opcode.Kind#CONSTANT}. Delivered as a {@link
* CodeElement} when traversing the elements of a {@link CodeModel}.
* Code} attribute, including {@linkplain IntrinsicConstantInstruction
* "intrinsic"}, {@linkplain ArgumentConstantInstruction "argument"}, and
* {@linkplain LoadConstantInstruction "load"} constant instructions.
* Corresponding opcodes have a {@linkplain Opcode#kind() kind} of {@link
* Opcode.Kind#CONSTANT}. Delivered as a {@link CodeElement} when traversing
* the elements of a {@link CodeModel}.
* <p>
* The loaded constant value is symbolically represented as a {@link ConstantDesc}:
* {@snippet lang=text :
* // @link substring="ConstantInstruction" target="CodeBuilder#loadConstant(ConstantDesc)" :
* ConstantInstruction(ConstantDesc constantValue) // @link substring="constantValue" target="#constantValue()"
* }
*
* @see Opcode.Kind#CONSTANT
* @see CodeBuilder#loadConstant(ConstantDesc) CodeBuilder::loadConstant
* @sealedGraph
* @since 24
*/
public sealed interface ConstantInstruction extends Instruction {
@@ -54,22 +65,36 @@ public sealed interface ConstantInstruction extends Instruction {
ConstantDesc constantValue();
/**
* {@return the type of the constant}
* {@return the {@linkplain TypeKind##computational-type computational type} of the constant}
* This is derived from the {@link #constantValue() constantValue}.
*/
TypeKind typeKind();
/**
* Models an "intrinsic constant" instruction (e.g., {@code
* iconst_0}).
* Models an "intrinsic constant" instruction, which encodes
* the constant value in its opcode. Examples include {@link
* Opcode#ACONST_NULL aconst_null} and {@link
* Opcode#ICONST_0 iconst_0}.
* <p>
* An intrinsic constant instruction is composite:
* {@snippet lang=text :
* // @link substring="IntrinsicConstantInstruction" target="#ofIntrinsic" :
* IntrinsicConstantInstruction(Opcode opcode) // @link substring="opcode" target="#opcode()"
* }
* where:
* <dl>
* <dt>{@link #opcode() opcode}</dt>
* <dd>Must be of the constant kind and have a {@linkplain
* Opcode#sizeIfFixed() fixed size} of 1.</dd>
* </dl>
*
* @see Opcode.Kind#CONSTANT
* @see ConstantInstruction#ofIntrinsic ConstantInstruction::ofIntrinsic
* @since 24
*/
sealed interface IntrinsicConstantInstruction extends ConstantInstruction
permits AbstractInstruction.UnboundIntrinsicConstantInstruction {
/**
* {@return the type of the constant}
*/
@Override
default TypeKind typeKind() {
return BytecodeHelpers.intrinsicConstantType(opcode());
@@ -77,9 +102,31 @@ public sealed interface ConstantInstruction extends Instruction {
}
/**
* Models an "argument constant" instruction (e.g., {@code
* bipush}).
* Models an "argument constant" instruction, which encodes the
* constant value in the instruction directly. Includes {@link
* Opcode#BIPUSH bipush} and {@link Opcode#SIPUSH sipush} instructions.
* <p>
* An argument constant instruction is composite:
* {@snippet lang=text :
* // @link substring="ArgumentConstantInstruction" target="#ofArgument" :
* ArgumentConstantInstruction(
* Opcode opcode, // @link substring="opcode" target="#opcode()"
* int constantValue // @link substring="constantValue" target="#constantValue()"
* )
* }
* where:
* <ul>
* <li>{@code opcode} must be one of {@code bipush} or {@code sipush}.
* <li>{@code constantValue} must be in the range of {@code byte}, {@code
* [-128, 127]}, for {@code bipush}, and in the range of {@code short},
* {@code [-32768, 32767]}, for {@code sipush}.
* </ul>
*
* @see Opcode.Kind#CONSTANT
* @see ConstantInstruction#ofArgument ConstantInstruction::ofArgument
* @see CodeBuilder#loadConstant(int) CodeBuilder::loadConstant(int)
* @see CodeBuilder#bipush CodeBuilder::bipush
* @see CodeBuilder#sipush CodeBuilder::sipush
* @since 24
*/
sealed interface ArgumentConstantInstruction extends ConstantInstruction
@@ -89,9 +136,6 @@ public sealed interface ConstantInstruction extends Instruction {
@Override
Integer constantValue();
/**
* {@return the type of the constant}
*/
@Override
default TypeKind typeKind() {
return TypeKind.INT;
@@ -99,9 +143,24 @@ public sealed interface ConstantInstruction extends Instruction {
}
/**
* Models a "load constant" instruction (e.g., {@code
* ldc}).
* Models a "load constant" instruction, which encodes the constant value
* in the constant pool. Includes {@link Opcode#LDC ldc} and {@link
* Opcode#LDC_W ldc_w}, and {@link Opcode#LDC2_W ldc2_w} instructions.
* <p>
* A load constant instruction is composite:
* {@snippet lang=text :
* // @link substring="LoadConstantInstruction" target="CodeBuilder#ldc(LoadableConstantEntry)" :
* LoadConstantInstruction(LoadableConstantEntry constantEntry) // @link substring="constantEntry" target="#constantEntry()"
* }
* <p>
* A "load constant" instruction can load any constant value supported by
* other constant-load instructions. However, other instructions are
* usually more optimized, avoiding extra constant pool entries and being
* smaller.
*
* @see Opcode.Kind#CONSTANT
* @see ConstantInstruction#ofLoad ConstantInstruction::ofLoad
* @see CodeBuilder#ldc CodeBuilder::ldc
* @since 24
*/
sealed interface LoadConstantInstruction extends ConstantInstruction
@@ -113,9 +172,6 @@ public sealed interface ConstantInstruction extends Instruction {
*/
LoadableConstantEntry constantEntry();
/**
* {@return the type of the constant}
*/
@Override
default TypeKind typeKind() {
return constantEntry().typeKind();
@@ -139,6 +195,10 @@ public sealed interface ConstantInstruction extends Instruction {
/**
* {@return an argument constant instruction}
* <p>
* {@code value} must be in the range of {@code byte}, {@code [-128, 127]},
* for {@link Opcode#BIPUSH}, and in the range of {@code short}, {@code
* [-32768, 32767]}, for {@link Opcode#SIPUSH}.
*
* @param op the opcode for the specific type of argument constant instruction,
* which must be {@link Opcode#BIPUSH} or {@link Opcode#SIPUSH}

View File

@@ -24,6 +24,7 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
@@ -36,10 +37,27 @@ import jdk.internal.classfile.impl.Util;
/**
* Models a primitive conversion instruction in the {@code code} array of a
* {@code Code} attribute, such as {@code i2l}. Corresponding opcodes will have
* a {@code kind} of {@link Opcode.Kind#CONVERT}. Delivered as a {@link
* CodeElement} when traversing the elements of a {@link CodeModel}.
* {@code Code} attribute, such as {@link Opcode#I2L i2l}. Corresponding opcodes
* have a {@linkplain Opcode#kind() kind} of {@link Opcode.Kind#CONVERT}.
* Delivered as a {@link CodeElement} when traversing the elements of a {@link CodeModel}.
* <p>
* A primitive conversion instruction is composite:
* {@snippet lang=text :
* // @link substring="ConvertInstruction" target="#of(TypeKind, TypeKind)" :
* ConvertInstruction(
* TypeKind fromType, // @link substring="fromType" target="#fromType"
* TypeKind toType // @link substring="toType" target="#toType"
* )
* }
* where these conversions are valid:
* <ul>
* <li>Between {@code int}, {@code long}, {@code float}, and {@code double}, where
* {@code fromType != toType};
* <li>From {@code int} to {@code byte}, {@code char}, and {@code short}.
* </ul>
*
* @see Opcode.Kind#CONVERT
* @see CodeBuilder#conversion CodeBuilder::conversion
* @since 24
*/
public sealed interface ConvertInstruction extends Instruction
@@ -55,10 +73,16 @@ public sealed interface ConvertInstruction extends Instruction
TypeKind toType();
/**
* {@return A conversion instruction}
* {@return a conversion instruction} Valid conversions are:
* <ul>
* <li>Between {@code int}, {@code long}, {@code float}, and {@code double},
* where {@code fromType != toType};
* <li>From {@code int} to {@code byte}, {@code char}, and {@code short}.
* </ul>
*
* @param fromType the type to convert from
* @param toType the type to convert to
* @throws IllegalArgumentException if this is not a valid conversion
*/
static ConvertInstruction of(TypeKind fromType, TypeKind toType) {
return of(BytecodeHelpers.convertOpcode(fromType, toType));

View File

@@ -24,32 +24,54 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
import java.lang.classfile.Label;
import java.lang.classfile.Opcode;
import java.lang.classfile.*;
import jdk.internal.classfile.impl.AbstractInstruction;
import jdk.internal.classfile.impl.BytecodeHelpers;
import jdk.internal.classfile.impl.Util;
/**
* Models instruction discontinued from the {@code code} array of a {@code Code}
* attribute. Delivered as a {@link CodeElement} when traversing the elements of
* a {@link CodeModel}.
* Marker interface for instruction discontinued from the {@code code} array of
* a {@code Code} attribute. Delivered as a {@link CodeElement} when traversing
* the elements of a {@link CodeModel}.
*
* @apiNote
* While most instructions have convenience factory methods in {@link
* CodeBuilder}, discontinued instructions can only be supplied to code builders
* explicitly with {@link CodeBuilder#with CodeBuilder::with} to discourage
* their use.
*
* @jvms 4.9.1 Static Constraints
* @sealedGraph
* @since 24
*/
public sealed interface DiscontinuedInstruction extends Instruction {
/**
* Models JSR and JSR_W instructions discontinued from the {@code code}
* array of a {@code Code} attribute since class file version 51.0.
* Corresponding opcodes will have a {@code kind} of
* {@link Opcode.Kind#DISCONTINUED_JSR}. Delivered as a {@link CodeElement}
* when traversing the elements of a {@link CodeModel}.
* Models jump subroutine instructions discontinued from the {@code code}
* array of a {@code Code} attribute since class file major version {@value
* ClassFile#JAVA_7_VERSION} (JVMS {@jvms 4.9.1}). Corresponding opcodes
* have a {@linkplain Opcode#kind() kind} of {@link Opcode.Kind#DISCONTINUED_JSR}.
* Delivered as a {@link CodeElement} when traversing the elements of a
* {@link CodeModel}.
* <p>
* A jump subroutine instruction is composite:
* {@snippet lang=text :
* // @link substring="JsrInstruction" target="#of(Label)" :
* JsrInstruction(Label target) // @link substring="target" target="#target()"
* }
* <p>
* Due to physical restrictions, {@link Opcode#JSR jsr} instructions cannot
* encode labels too far away in the list of code elements. In such cases,
* the {@link ClassFile.ShortJumpsOption} controls how an invalid {@code jsr}
* instruction model is written by a {@link CodeBuilder}.
* <p>
* Jump subroutine instructions push a {@link TypeKind##returnAddress
* returnAddress} value to the operand stack, and {@link StoreInstruction
* astore} series of instructions can then store this value to a local
* variable slot.
*
* @see Opcode.Kind#DISCONTINUED_JSR
* @since 24
*/
sealed interface JsrInstruction extends DiscontinuedInstruction
@@ -57,14 +79,18 @@ public sealed interface DiscontinuedInstruction extends Instruction {
AbstractInstruction.UnboundJsrInstruction {
/**
* {@return the target of the JSR instruction}
* {@return the target of the jump subroutine instruction}
*/
Label target();
/**
* {@return a JSR instruction}
* {@return a jump subroutine instruction}
*
* @param op the opcode for the specific type of JSR instruction,
* @apiNote
* The explicit {@code op} argument allows creating {@link Opcode#JSR_W
* jsr_w} instructions to avoid short jumps.
*
* @param op the opcode for the specific type of jump subroutine instruction,
* which must be of kind {@link Opcode.Kind#DISCONTINUED_JSR}
* @param target target label of the subroutine
* @throws IllegalArgumentException if the opcode kind is not
@@ -76,7 +102,7 @@ public sealed interface DiscontinuedInstruction extends Instruction {
}
/**
* {@return a JSR instruction}
* {@return a jump subroutine instruction}
*
* @param target target label of the subroutine
*/
@@ -86,12 +112,26 @@ public sealed interface DiscontinuedInstruction extends Instruction {
}
/**
* Models RET and RET_W instructions discontinued from the {@code code}
* array of a {@code Code} attribute since class file version 51.0.
* Corresponding opcodes will have a {@code kind} of
* Models return from subroutine instructions discontinued from the {@code
* code} array of a {@code Code} attribute since class file major version
* {@value ClassFile#JAVA_7_VERSION} (JVMS {@jvms 4.9.1}).
* Corresponding opcodes have a {@linkplain Opcode#kind() kind} of
* {@link Opcode.Kind#DISCONTINUED_RET}. Delivered as a {@link CodeElement}
* when traversing the elements of a {@link CodeModel}.
* <p>
* A return from subroutine instruction is composite:
* {@snippet lang=text :
* // @link substring="RetInstruction" target="#of(int)" :
* RetInstruction(int slot) // @link substring="slot" target="#slot()"
* }
* where {@code slot} must be within {@code [0, 65535]}.
* <p>
* {@link StoreInstruction astore} series of instructions store a {@link
* TypeKind##returnAddress returnAddress} value to a local variable slot,
* making the slot usable by a return from subroutine instruction.
*
* @jvms 6.5.ret <em>ret</em>
* @see Opcode.Kind#DISCONTINUED_RET
* @since 24
*/
sealed interface RetInstruction extends DiscontinuedInstruction
@@ -100,13 +140,23 @@ public sealed interface DiscontinuedInstruction extends Instruction {
/**
* {@return the local variable slot with return address}
* The value is within {@code [0, 65535]}.
*/
int slot();
/**
* {@return a RET or RET_W instruction}
* {@return a return from subroutine instruction}
* <p>
* {@code slot} must be in the closed range of {@code [0, 255]} for
* {@link Opcode#RET ret}, or within {@code [0, 65535]} for {@link
* Opcode#RET_W wide ret}.
*
* @param op the opcode for the specific type of RET instruction,
* @apiNote
* The explicit {@code op} argument allows creating {@code wide ret}
* instructions with {@code slot} in the range of regular {@code ret}
* instructions.
*
* @param op the opcode for the specific type of return from subroutine instruction,
* which must be of kind {@link Opcode.Kind#DISCONTINUED_RET}
* @param slot the local variable slot to load return address from
* @throws IllegalArgumentException if the opcode kind is not
@@ -118,7 +168,9 @@ public sealed interface DiscontinuedInstruction extends Instruction {
}
/**
* {@return a RET instruction}
* {@return a return from subroutine instruction}
* <p>
* {@code slot} must be within {@code [0, 65535]}.
*
* @param slot the local variable slot to load return address from
* @throws IllegalArgumentException if {@code slot} is out of range

View File

@@ -24,23 +24,37 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Label;
import java.lang.classfile.PseudoInstruction;
import java.lang.classfile.attribute.CodeAttribute;
import java.lang.classfile.constantpool.ClassEntry;
import java.util.Optional;
import jdk.internal.classfile.impl.AbstractPseudoInstruction;
/**
* A pseudo-instruction modeling an entry in the exception table of a code
* attribute. Entries in the exception table model catch and finally blocks.
* Delivered as a {@link CodeElement} when traversing the contents
* of a {@link CodeModel}.
*
* @see PseudoInstruction
* A pseudo-instruction modeling an entry in the {@code exception_table} array
* of a {@link CodeAttribute Code} attribute. Catch (JVMS {@jvms 3.12}) and
* finally (JVMS {@jvms 3.14}) blocks in Java source code compile to exception
* table entries. Delivered as a {@link CodeElement} when traversing the
* contents of a {@link CodeModel}.
* <p>
* An exception table entry is composite:
* {@snippet lang=text :
* // @link substring="ExceptionCatch" target="#of(Label, Label, Label, Optional)" :
* ExceptionCatch(
* Label handler, // @link substring="handler" target="#handler"
* Label tryStart, // @link substring="tryStart" target="#tryStart"
* Label tryEnd, // @link substring="tryEnd" target="#tryEnd"
* Optional<ClassEntry> catchType // @link substring="catchType" target="#catchType"
* )
* }
*
* @see CodeBuilder#exceptionCatch CodeBuilder::exceptionCatch
* @jvms 4.7.3 The {@code Code} Attribute
* @since 24
*/
public sealed interface ExceptionCatch extends PseudoInstruction
@@ -61,8 +75,8 @@ public sealed interface ExceptionCatch extends PseudoInstruction
Label tryEnd();
/**
* {@return the type of the exception to catch, or empty if this handler is
* unconditional}
* {@return the type of the exception to catch, or empty if this handler
* catches everything}
*/
Optional<ClassEntry> catchType();
@@ -80,10 +94,10 @@ public sealed interface ExceptionCatch extends PseudoInstruction
}
/**
* {@return an exception table pseudo-instruction for an unconditional handler}
* {@return an exception table pseudo-instruction to catch everything}
* @param handler the handler for the exception
* @param tryStart the beginning of the instruction range for the gaurded instructions
* @param tryEnd the end of the instruction range for the gaurded instructions
* @param tryStart the beginning of the instruction range for the guarded instructions
* @param tryEnd the end of the instruction range for the guarded instructions
*/
static ExceptionCatch of(Label handler, Label tryStart, Label tryEnd) {
return new AbstractPseudoInstruction.ExceptionCatchImpl(handler, tryStart, tryEnd, (ClassEntry) null);

View File

@@ -24,6 +24,7 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
@@ -40,10 +41,21 @@ import jdk.internal.classfile.impl.Util;
/**
* Models a field access instruction in the {@code code} array of a {@code Code}
* attribute. Corresponding opcodes will have a {@code kind} of {@link
* Opcode.Kind#FIELD_ACCESS}. Delivered as a {@link CodeElement} when
* attribute. Corresponding opcodes have a {@linkplain Opcode#kind() kind}
* of {@link Opcode.Kind#FIELD_ACCESS}. Delivered as a {@link CodeElement} when
* traversing the elements of a {@link CodeModel}.
* <p>
* A field access instruction is composite:
* {@snippet lang=text :
* // @link substring="FieldInstruction" target="#of(Opcode, FieldRefEntry)" :
* FieldInstruction(
* Opcode opcode, // @link substring="opcode" target="#opcode()"
* FieldRefEntry field, // @link substring="field" target="#field()"
* )
* }
*
* @see Opcode.Kind#FIELD_ACCESS
* @see CodeBuilder#fieldAccess CodeBuilder::fieldAccess
* @since 24
*/
public sealed interface FieldInstruction extends Instruction
@@ -68,7 +80,11 @@ public sealed interface FieldInstruction extends Instruction
}
/**
* {@return the field descriptor of the field}
* {@return the field descriptor string of the field}
*
* @apiNote
* A symbolic descriptor for the type of the field is available through
* {@link #typeSymbol() typeSymbol()}.
*/
default Utf8Entry type() {
return field().nameAndType().type();
@@ -103,6 +119,8 @@ public sealed interface FieldInstruction extends Instruction
* @param owner the class holding the field
* @param name the name of the field
* @param type the field descriptor
* @throws IllegalArgumentException if the opcode kind is not
* {@link Opcode.Kind#FIELD_ACCESS}.
*/
static FieldInstruction of(Opcode op,
ClassEntry owner,
@@ -118,6 +136,8 @@ public sealed interface FieldInstruction extends Instruction
* which must be of kind {@link Opcode.Kind#FIELD_ACCESS}
* @param owner the class holding the field
* @param nameAndType the name and field descriptor of the field
* @throws IllegalArgumentException if the opcode kind is not
* {@link Opcode.Kind#FIELD_ACCESS}.
*/
static FieldInstruction of(Opcode op,
ClassEntry owner,

View File

@@ -24,6 +24,7 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
@@ -33,10 +34,27 @@ import jdk.internal.classfile.impl.AbstractInstruction;
/**
* Models a local variable increment instruction in the {@code code} array of a
* {@code Code} attribute. Corresponding opcodes will have a {@code kind} of
* {@link Opcode.Kind#INCREMENT}. Delivered as a {@link CodeElement} when
* {@code Code} attribute. Corresponding opcodes have a {@linkplain Opcode#kind()
* kind} of {@link Opcode.Kind#INCREMENT}. Delivered as a {@link CodeElement} when
* traversing the elements of a {@link CodeModel}.
* <p>
* A local variable increment instruction is composite:
* {@snippet lang=text :
* // @link substring="IncrementInstruction" target="#of" :
* IncrementInstruction(
* int slot, // @link substring="slot" target="#slot()"
* int constant // @link substring="constant" target="#constant()"
* )
* }
* where
* <ul>
* <li>{@code slot} must be within {@code [0, 65535]}.
* <li>{@code constant} must be within {@code [-32768, 32767]}.
* </ul>
*
* @see Opcode.Kind#INCREMENT
* @see CodeBuilder#iinc CodeBuilder::iinc
* @jvms 6.5.iinc <em>iinc</em>
* @since 24
*/
public sealed interface IncrementInstruction extends Instruction
@@ -54,6 +72,10 @@ public sealed interface IncrementInstruction extends Instruction
/**
* {@return an increment instruction}
* <ul>
* <li>{@code slot} must be within {@code [0, 65535]}.
* <li>{@code constant} must be within {@code [-32768, 32767]}.
* </ul>
*
* @param slot the local variable slot to increment
* @param constant the value to increment by

View File

@@ -24,9 +24,11 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
import java.lang.classfile.Opcode;
import java.lang.classfile.constantpool.InvokeDynamicEntry;
import java.lang.classfile.constantpool.LoadableConstantEntry;
import java.lang.classfile.constantpool.Utf8Entry;
@@ -40,10 +42,20 @@ import jdk.internal.classfile.impl.AbstractInstruction;
import jdk.internal.classfile.impl.Util;
/**
* Models an {@code invokedynamic} instruction in the {@code code} array of a
* {@code Code} attribute. Delivered as a {@link CodeElement} when traversing
* the elements of a {@link CodeModel}.
* Models a dynamically-computed call site invocation instruction in the
* {@code code} array of a {@code Code} attribute. The corresponding opcode is
* {@link Opcode#INVOKEDYNAMIC invokedynamic}. Delivered as a {@link
* CodeElement} when traversing the elements of a {@link CodeModel}.
* <p>
* A dynamically-computed call site invocation instruction is composite:
* {@snippet lang=text :
* // @link substring="InvokeDynamicInstruction" target="#of" :
* InvokeDynamicInstruction(InvokeDynamicEntry invokedynamic) // @link substring="invokedynamic" target="#invokedynamic()"
* }
*
* @see Opcode.Kind#INVOKE_DYNAMIC
* @see CodeBuilder#invokedynamic CodeBuilder::invokedynamic
* @jvms 6.5.invokedynamic <em>invokedynamic</em>
* @since 24
*/
public sealed interface InvokeDynamicInstruction extends Instruction
@@ -62,6 +74,10 @@ public sealed interface InvokeDynamicInstruction extends Instruction
/**
* {@return the invocation type of the call site}
*
* @apiNote
* A symbolic descriptor for the invocation typeis available through {@link
* #typeSymbol() typeSymbol()}.
*/
default Utf8Entry type() {
return invokedynamic().type();

View File

@@ -24,10 +24,12 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
import java.lang.classfile.Opcode;
import java.lang.classfile.TypeKind;
import java.lang.classfile.constantpool.ClassEntry;
import java.lang.classfile.constantpool.InterfaceMethodRefEntry;
import java.lang.classfile.constantpool.MemberRefEntry;
@@ -42,10 +44,26 @@ import jdk.internal.classfile.impl.Util;
/**
* Models a method invocation instruction in the {@code code} array of a {@code
* Code} attribute, other than {@code invokedynamic}. Corresponding opcodes
* will have a {@code kind} of {@link Opcode.Kind#INVOKE}. Delivered as a
* {@link CodeElement} when traversing the elements of a {@link CodeModel}.
* Code} attribute, other than {@link InvokeDynamicInstruction invokedynamic}.
* Corresponding opcodes have a {@linkplain Opcode#kind() kind} of {@link Opcode.Kind#INVOKE}.
* Delivered as a {@link CodeElement} when traversing the elements of a {@link CodeModel}.
* <p>
* A method invocation instruction is composite:
* {@snippet lang=text :
* // @link substring="InvokeInstruction" target="#of(Opcode, MemberRefEntry)" :
* InvokeInstruction(
* Opcode opcode, // @link substring="opcode" target="#opcode()"
* MethodRefEntry | InterfaceMethodRefEntry method) // @link substring="method" target="#method()"
* )
* }
* where {@code method} must be an {@code InterfaceMethodRefEntry} for {@link
* Opcode#INVOKEINTERFACE invokeinterface} opcode, and must be a {@code
* MethodRefEntry} for {@link Opcode#INVOKEVIRTUAL invokevirtual} opcode.
* {@link Opcode#INVOKESTATIC invokestatic} and {@link Opcode#INVOKESPECIAL
* invokespecial} can have either type of entry for {@code method}.
*
* @see Opcode.Kind#INVOKE
* @see CodeBuilder#invoke CodeBuilder::invoke
* @since 24
*/
public sealed interface InvokeInstruction extends Instruction
@@ -57,18 +75,25 @@ public sealed interface InvokeInstruction extends Instruction
MemberRefEntry method();
/**
* {@return whether the class holding the method is an interface}
* {@return whether the class or interface holding the method is an interface}
*/
boolean isInterface();
/**
* {@return the {@code count} value of an {@code invokeinterface} instruction, as defined in JVMS {@jvms 6.5}
* or {@code 0} for {@code invokespecial}, {@code invokestatic} and {@code invokevirtual} instructions}
* {@return the {@code count} value of an {@code invokeinterface} instruction,
* or {@code 0} for other instructions}
* <p>
* For an {@code invokeinterface} instruction, this value must be equivalent
* to the sum of {@linkplain TypeKind#slotSize() slot sizes} of all arguments
* plus one, which is equal to the number of operand stack depth consumed by
* this interface method invocation instruction.
*
* @jvms 6.5.invokeinterface <em>invokeinterface</em>
*/
int count();
/**
* {@return the class holding the method}
* {@return the class or interface holding the method}
*/
default ClassEntry owner() {
return method().owner();
@@ -82,7 +107,11 @@ public sealed interface InvokeInstruction extends Instruction
}
/**
* {@return the method descriptor of the method}
* {@return the method descriptor string of the method}
*
* @apiNote
* A symbolic descriptor for the type of the method is available through
* {@link #typeSymbol() typeSymbol()}.
*/
default Utf8Entry type() {
return method().nameAndType().type();
@@ -95,7 +124,6 @@ public sealed interface InvokeInstruction extends Instruction
return Util.methodTypeSymbol(method().type());
}
/**
* {@return an invocation instruction}
*
@@ -103,7 +131,7 @@ public sealed interface InvokeInstruction extends Instruction
* which must be of kind {@link Opcode.Kind#INVOKE}
* @param method a constant pool entry describing the method
* @throws IllegalArgumentException if the opcode kind is not
* {@link Opcode.Kind#INVOKE}.
* {@link Opcode.Kind#INVOKE}
*/
static InvokeInstruction of(Opcode op, MemberRefEntry method) {
Util.checkKind(op, Opcode.Kind.INVOKE);
@@ -119,6 +147,8 @@ public sealed interface InvokeInstruction extends Instruction
* @param name the name of the method
* @param type the method descriptor
* @param isInterface whether the class holding the method is an interface
* @throws IllegalArgumentException if the opcode kind is not
* {@link Opcode.Kind#INVOKE}
*/
static InvokeInstruction of(Opcode op,
ClassEntry owner,
@@ -136,6 +166,8 @@ public sealed interface InvokeInstruction extends Instruction
* @param owner the class holding the method
* @param nameAndType the name and type of the method
* @param isInterface whether the class holding the method is an interface
* @throws IllegalArgumentException if the opcode kind is not
* {@link Opcode.Kind#INVOKE}
*/
static InvokeInstruction of(Opcode op,
ClassEntry owner,

View File

@@ -24,10 +24,13 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.CodeTransform;
import java.lang.classfile.Label;
import java.lang.classfile.PseudoInstruction;
import java.lang.classfile.attribute.CodeAttribute;
import jdk.internal.classfile.impl.LabelImpl;
@@ -35,9 +38,28 @@ import jdk.internal.classfile.impl.LabelImpl;
* A pseudo-instruction which indicates that the specified label corresponds to
* the current position in the {@code Code} attribute. Delivered as a {@link
* CodeElement} during traversal of the elements of a {@link CodeModel}.
* <p>
* This can be used to inspect the target position of labels across {@linkplain
* CodeTransform transformations}, as {@linkplain CodeAttribute#labelToBci bci}
* is not stable.
* <p>
* When passed to a {@link CodeBuilder}, this pseudo-instruction sets the
* specified label to be bound at the current position in the builder.
* <p>
* By design, {@code LabelTarget} cannot be created by users and can only be
* read from a code model. Use {@link CodeBuilder#labelBinding
* CodeBuilder::labelBinding} to bind arbitrary labels to a {@code CodeBuilder}.
* <p>
* For a {@code CodeBuilder cob}, a {@code LabelTarget lt}, these two calls are
* equivalent:
* {@snippet lang=java :
* cob.with(lt); // @link substring="with" target="CodeBuilder#with"
* // @link substring="labelBinding" target="CodeBuilder#labelBinding" :
* cob.labelBinding(lt.label()); // @link regex="label(?=\()" target="#label"
* }
*
* @see PseudoInstruction
*
* @see Label
* @see CodeBuilder#labelBinding CodeBuilder::labelBinding
* @since 24
*/
public sealed interface LabelTarget extends PseudoInstruction

View File

@@ -25,21 +25,42 @@
package java.lang.classfile.instruction;
import java.lang.classfile.ClassFile;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.PseudoInstruction;
import java.lang.classfile.attribute.CodeAttribute;
import java.lang.classfile.attribute.LineNumberInfo;
import java.lang.classfile.attribute.LineNumberTableAttribute;
import jdk.internal.classfile.impl.LineNumberImpl;
/**
* A pseudo-instruction which models a single entry in the
* {@link LineNumberTableAttribute}. Delivered as a {@link CodeElement}
* during traversal of the elements of a {@link CodeModel}, according to
* the setting of the {@link ClassFile.LineNumbersOption} option.
* A pseudo-instruction which indicates the code for a given line number starts
* after the current position in a {@link CodeAttribute Code} attribute. This
* models a single entry in the {@link LineNumberTableAttribute LineNumberTable}
* attribute. Delivered as a {@link CodeElement} during traversal of the
* elements of a {@link CodeModel}, according to the setting of the {@link
* ClassFile.LineNumbersOption} option.
* <p>
* A line number entry is composite:
* {@snippet lang=text :
* // @link substring="LineNumber" target="#of" :
* LineNumber(int line) // @link substring="int line" target="#line"
* }
* <p>
* Another model, {@link LineNumberInfo}, also models a line number entry; it
* has no dependency on a {@code CodeModel} and represents of bci values as
* {@code int}s instead of order of pseudo-instructions in the elements of a
* {@code CodeModel}, and is used as components of a {@link LineNumberTableAttribute}.
*
* @see PseudoInstruction
* @apiNote
* Line numbers are represented with custom pseudo-instructions to avoid using
* labels, which usually indicate branching targets for the control flow.
*
* @see LineNumberInfo
* @see CodeBuilder#lineNumber CodeBuilder::lineNumber
* @see ClassFile.LineNumbersOption
* @since 24
*/
public sealed interface LineNumber extends PseudoInstruction

View File

@@ -24,6 +24,7 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
@@ -36,10 +37,23 @@ import jdk.internal.classfile.impl.Util;
/**
* Models a local variable load instruction in the {@code code} array of a
* {@code Code} attribute. Corresponding opcodes will have a {@code kind} of
* {@link Opcode.Kind#LOAD}. Delivered as a {@link CodeElement} when
* traversing the elements of a {@link CodeModel}.
* {@code Code} attribute. Corresponding opcodes have a {@linkplain
* Opcode#kind() kind} of {@link Opcode.Kind#LOAD}. Delivered as a {@link
* CodeElement} when traversing the elements of a {@link CodeModel}.
* <p>
* A local variable load instruction is composite:
* {@snippet lang=text :
* // @link substring="LoadInstruction" target="#of(TypeKind, int)" :
* LoadInstruction(
* TypeKind typeKind, // @link substring="typeKind" target="#typeKind"
* int slot // @link substring="slot" target="#slot"
* )
* }
* where {@code TypeKind} is {@linkplain TypeKind##computational-type
* computational}, and {@code slot} is within {@code [0, 65535]}.
*
* @see Opcode.Kind#LOAD
* @see CodeBuilder#loadLocal CodeBuilder::loadLocal
* @since 24
*/
public sealed interface LoadInstruction extends Instruction
@@ -48,16 +62,21 @@ public sealed interface LoadInstruction extends Instruction
/**
* {@return the local variable slot to load from}
* The value is within {@code [0, 65535]}.
*/
int slot();
/**
* {@return the type of the value to be loaded}
* {@return the {@linkplain TypeKind##computational-type computational type}
* of the value to be loaded}
*/
TypeKind typeKind();
/**
* {@return a local variable load instruction}
* {@code kind} is {@linkplain TypeKind#asLoadable() converted} to its
* computational type.
* {@code slot} must be within {@code [0, 65535]}.
*
* @param kind the type of the value to be loaded
* @param slot the local variable slot to load from
@@ -71,6 +90,20 @@ public sealed interface LoadInstruction extends Instruction
/**
* {@return a local variable load instruction}
* <p>
* The range of {@code slot} is restricted by the {@code op} and its
* {@linkplain Opcode#sizeIfFixed() size}:
* <ul>
* <li>If {@code op} has size 1, {@code slot} must be exactly the slot value
* implied by the opcode.
* <li>If {@code op} has size 2, {@code slot} must be within {@code [0, 255]}.
* <li>If {@code op} has size 4, {@code slot} must be within {@code [0, 65535]}.
* </ul>
*
* @apiNote
* The explicit {@code op} argument allows creating {@code wide} or
* regular load instructions when the {@code slot} can be encoded
* with more optimized load instructions.
*
* @param op the opcode for the specific type of load instruction,
* which must be of kind {@link Opcode.Kind#LOAD}

View File

@@ -25,10 +25,12 @@
package java.lang.classfile.instruction;
import java.lang.classfile.ClassFile;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Label;
import java.lang.classfile.PseudoInstruction;
import java.lang.classfile.attribute.LocalVariableInfo;
import java.lang.classfile.attribute.LocalVariableTableAttribute;
import java.lang.classfile.constantpool.Utf8Entry;
import java.lang.constant.ClassDesc;
@@ -39,19 +41,45 @@ import jdk.internal.classfile.impl.TemporaryConstantPool;
import jdk.internal.classfile.impl.Util;
/**
* A pseudo-instruction which models a single entry in the
* {@link LocalVariableTableAttribute}. Delivered as a {@link CodeElement}
* during traversal of the elements of a {@link CodeModel}, according to
* the setting of the {@link ClassFile.DebugElementsOption} option.
* A pseudo-instruction which models a single entry in the {@link
* LocalVariableTableAttribute LocalVariableTable} attribute. Delivered as a
* {@link CodeElement} during traversal of the elements of a {@link CodeModel},
* according to the setting of the {@link ClassFile.DebugElementsOption} option.
* <p>
* A local variable entry is composite:
* {@snippet lang=text :
* // @link substring="LocalVariable" target="#of(int, String, ClassDesc, Label, Label)" :
* LocalVariable(
* int slot, // @link substring="slot" target="#slot"
* String name, // @link substring="name" target="#name"
* ClassDesc type, // @link substring="type" target="#type"
* Label startScope, // @link substring="startScope" target="#startScope"
* Label endScope // @link substring="endScope" target="#endScope"
* )
* }
* Where {@code slot} is within {@code [0, 65535]}.
* <p>
* Another model, {@link LocalVariableInfo}, also models a local variable
* entry; it has no dependency on a {@code CodeModel} and represents of bci
* values as {@code int}s instead of {@code Label}s, and is used as components
* of a {@link LocalVariableTableAttribute}.
*
* @see PseudoInstruction
* @apiNote
* {@code LocalVariable} is used for all local variables in Java source code.
* If a local variable has a parameterized type, a type argument, or an array
* type of one of the previous types, a {@link LocalVariableType} should be
* created for that local variable as well.
*
* @see LocalVariableInfo
* @see CodeBuilder#localVariable CodeBuilder::localVariable
* @see ClassFile.DebugElementsOption
* @since 24
*/
public sealed interface LocalVariable extends PseudoInstruction
permits AbstractPseudoInstruction.UnboundLocalVariable, BoundLocalVariable {
/**
* {@return the local variable slot}
* The value is within {@code [0, 65535]}.
*/
int slot();
@@ -61,7 +89,11 @@ public sealed interface LocalVariable extends PseudoInstruction
Utf8Entry name();
/**
* {@return the local variable field descriptor}
* {@return the local variable field descriptor string}
*
* @apiNote
* A symbolic descriptor for the type of the local variable is available
* through {@link #typeSymbol() typeSymbol()}.
*/
Utf8Entry type();
@@ -84,6 +116,7 @@ public sealed interface LocalVariable extends PseudoInstruction
/**
* {@return a local variable pseudo-instruction}
* {@code slot} must be within {@code [0, 65535]}.
*
* @param slot the local variable slot
* @param nameEntry the local variable name
@@ -99,6 +132,7 @@ public sealed interface LocalVariable extends PseudoInstruction
/**
* {@return a local variable pseudo-instruction}
* {@code slot} must be within {@code [0, 65535]}.
*
* @param slot the local variable slot
* @param name the local variable name

View File

@@ -24,12 +24,8 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.ClassFile;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Label;
import java.lang.classfile.PseudoInstruction;
import java.lang.classfile.Signature;
import java.lang.classfile.*;
import java.lang.classfile.attribute.LocalVariableTypeInfo;
import java.lang.classfile.attribute.LocalVariableTypeTableAttribute;
import java.lang.classfile.constantpool.Utf8Entry;
@@ -39,16 +35,44 @@ import jdk.internal.classfile.impl.TemporaryConstantPool;
/**
* A pseudo-instruction which models a single entry in the {@link
* LocalVariableTypeTableAttribute}. Delivered as a {@link CodeElement} during
* traversal of the elements of a {@link CodeModel}, according to the setting of
* the {@link ClassFile.DebugElementsOption} option.
* LocalVariableTypeTableAttribute LocalVariableTypeTable} attribute. Delivered
* as a {@link CodeElement} during traversal of the elements of a {@link CodeModel},
* according to the setting of the {@link ClassFile.DebugElementsOption} option.
* <p>
* A local variable type entry is composite:
* {@snippet lang=text :
* // @link substring="LocalVariableType" target="#of(int, String, Signature, Label, Label)" :
* LocalVariableType(
* int slot, // @link substring="slot" target="#slot"
* String name, // @link substring="name" target="#name"
* Signature signature, // @link substring="signature" target="#signatureSymbol"
* Label startScope, // @link substring="startScope" target="#startScope"
* Label endScope // @link substring="endScope" target="#endScope"
* )
* }
* Where {@code slot} is within {@code [0, 65535]}.
* <p>
* Another model, {@link LocalVariableTypeInfo}, also models a local variable
* type entry; it has no dependency on a {@code CodeModel} and represents of bci
* values as {@code int}s instead of {@code Label}s, and is used as components
* of a {@link LocalVariableTypeTableAttribute}.
*
* @apiNote
* {@code LocalVariableType} is used if a local variable has a parameterized
* type, a type argument, or an array type of one of the previous types as its
* type. A {@link LocalVariable} with the erased type should still be created
* for that local variable.
*
* @see LocalVariableTypeInfo
* @see CodeBuilder#localVariableType CodeBuilder::localVariableType
* @see ClassFile.DebugElementsOption
* @since 24
*/
public sealed interface LocalVariableType extends PseudoInstruction
permits AbstractPseudoInstruction.UnboundLocalVariableType, BoundLocalVariableType {
/**
* {@return the local variable slot}
* The value is within {@code [0, 65535]}.
*/
int slot();
@@ -58,12 +82,16 @@ public sealed interface LocalVariableType extends PseudoInstruction
Utf8Entry name();
/**
* {@return the local variable signature}
* {@return the local variable generic signature string}
*
* @apiNote
* A symbolic generic signature of the local variable is available
* through {@link #signatureSymbol() signatureSymbol()}.
*/
Utf8Entry signature();
/**
* {@return the local variable signature}
* {@return the local variable generic signature}
*/
default Signature signatureSymbol() {
return Signature.parseFrom(signature().stringValue());
@@ -81,6 +109,7 @@ public sealed interface LocalVariableType extends PseudoInstruction
/**
* {@return a local variable type pseudo-instruction}
* {@code slot} must be within {@code [0, 65535]}.
*
* @param slot the local variable slot
* @param nameEntry the local variable name
@@ -96,6 +125,7 @@ public sealed interface LocalVariableType extends PseudoInstruction
/**
* {@return a local variable type pseudo-instruction}
* {@code slot} must be within {@code [0, 65535]}.
*
* @param slot the local variable slot
* @param name the local variable name

View File

@@ -24,19 +24,36 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
import java.lang.classfile.Label;
import java.lang.classfile.Opcode;
import java.util.List;
import jdk.internal.classfile.impl.AbstractInstruction;
/**
* Models a {@code lookupswitch} instruction in the {@code code} array of a
* {@code Code} attribute. Delivered as a {@link CodeElement} when traversing
* the elements of a {@link CodeModel}.
* Models a {@link Opcode#LOOKUPSWITCH lookupswitch} instruction in the {@code
* code} array of a {@code Code} attribute. Delivered as a {@link CodeElement}
* when traversing the elements of a {@link CodeModel}.
* <p>
* A lookup switch instruction is composite:
* {@snippet lang=text :
* // @link substring="LookupSwitchInstruction" target="#of" :
* LookupSwitchInstruction(
* Label defaultTarget, // @link substring="defaultTarget" target="#defaultTarget"
* List<SwitchCase> cases // @link substring="cases" target="#cases()"
* )
* }
* If elements in {@code cases} are not sorted ascending by their {@link
* SwitchCase#caseValue caseValue}, a sorted version of the {@code cases} list
* will be written instead.
*
* @see Opcode.Kind#LOOKUP_SWITCH
* @see CodeBuilder#lookupswitch CodeBuilder::lookupswitch
* @jvms 6.5.lookupswitch <em>lookupswitch</em>
* @since 24
*/
public sealed interface LookupSwitchInstruction extends Instruction

View File

@@ -24,6 +24,7 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
@@ -33,9 +34,17 @@ import jdk.internal.classfile.impl.AbstractInstruction;
import jdk.internal.classfile.impl.Util;
/**
* Models a {@code monitorenter} or {@code monitorexit} instruction in the
* {@code code} array of a {@code Code} attribute. Delivered as a {@link
* CodeElement} when traversing the elements of a {@link CodeModel}.
* Models a {@link Opcode#MONITORENTER monitorenter} or {@link Opcode#MONITOREXIT
* monitorexit} instruction in the {@code code} array of a {@code Code} attribute.
* Corresponding opcodes have a {@linkplain Opcode#kind() kind} of {@link
* Opcode.Kind#MONITOR}. Delivered as a {@link CodeElement} when traversing the
* elements of a {@link CodeModel}.
* <p>
* A monitor instruction is composite:
* {@snippet lang=text :
* // @link substring="MonitorInstruction" target="#of(Opcode)" :
* MonitorInstruction(Opcode opcode) // @link substring="opcode" target="#opcode"
* }
*
* @since 24
*/

View File

@@ -24,19 +24,34 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
import java.lang.classfile.Opcode;
import java.lang.classfile.constantpool.ClassEntry;
import jdk.internal.classfile.impl.AbstractInstruction;
import jdk.internal.classfile.impl.BytecodeHelpers;
/**
* Models a {@code multianewarray} invocation instruction in the {@code code}
* Models a {@link Opcode#MULTIANEWARRAY multianewarray} instruction in the {@code code}
* array of a {@code Code} attribute. Delivered as a {@link CodeElement}
* when traversing the elements of a {@link CodeModel}.
* <p>
* A new multi-dimensional array instruction is composite:
* {@snippet lang=text :
* // @link substring="NewMultiArrayInstruction" target="#of" :
* NewMultiArrayInstruction(
* ClassEntry arrayType, // @link substring="arrayType" target="#arrayType"
* int dimensions // @link substring="dimensions" target="#dimensions"
* )
* }
* where the {@code arrayType} is an array class.
*
* @see Opcode.Kind#NEW_MULTI_ARRAY
* @see CodeBuilder#multianewarray CodeBuilder::multianewarray
* @jvms 6.5.multianewarray <em>multianewarray</em>
* @since 24
*/
public sealed interface NewMultiArrayInstruction extends Instruction
@@ -44,7 +59,7 @@ public sealed interface NewMultiArrayInstruction extends Instruction
AbstractInstruction.UnboundNewMultidimensionalArrayInstruction {
/**
* {@return the type of the array, as a symbolic descriptor}
* {@return the type of the array}
*/
ClassEntry arrayType();

View File

@@ -24,18 +24,30 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
import java.lang.classfile.Opcode;
import java.lang.classfile.constantpool.ClassEntry;
import jdk.internal.classfile.impl.AbstractInstruction;
/**
* Models a {@code new} instruction in the {@code code} array of a {@code Code}
* Models a {@link Opcode#NEW new} instruction in the {@code code} array of a {@code Code}
* attribute. Delivered as a {@link CodeElement} when traversing the elements
* of a {@link CodeModel}.
* <p>
* A new object instruction is composite:
* {@snippet lang=text :
* // @link substring="NewObjectInstruction" target="#of" :
* NewObjectInstruction(ClassEntry className) // @link substring="className" target="#className"
* }
* where the {@code className} is a non-abstract class.
*
* @see Opcode.Kind#NEW_OBJECT
* @see CodeBuilder#new_ CodeBuilder::new_
* @jvms 6.5.new <em>new</em>
* @since 24
*/
public sealed interface NewObjectInstruction extends Instruction

View File

@@ -24,18 +24,30 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
import java.lang.classfile.Opcode;
import java.lang.classfile.TypeKind;
import jdk.internal.classfile.impl.AbstractInstruction;
/**
* Models a {@code newarray} invocation instruction in the {@code code}
* Models a {@link Opcode#NEWARRAY newarray} instruction in the {@code code}
* array of a {@code Code} attribute. Delivered as a {@link CodeElement}
* when traversing the elements of a {@link CodeModel}.
* <p>
* A new primitive array instruction is composite:
* {@snippet lang=text :
* // @link substring="NewPrimitiveArrayInstruction" target="#of" :
* NewPrimitiveArrayInstruction(TypeKind typeKind) // @link substring="typeKind" target="#typeKind"
* }
* where {@code typeKind} is primitive and not {@code void}.
*
* @see Opcode.Kind#NEW_PRIMITIVE_ARRAY
* @see CodeBuilder#newarray CodeBuilder::newarray
* @jvms 6.5.newarray <em>newarray</em>
* @since 24
*/
public sealed interface NewPrimitiveArrayInstruction extends Instruction
@@ -43,6 +55,10 @@ public sealed interface NewPrimitiveArrayInstruction extends Instruction
AbstractInstruction.UnboundNewPrimitiveArrayInstruction {
/**
* {@return the component type of the array}
*
* @apiNote
* The backing array code for this instruction is available through
* {@link TypeKind#newarrayCode() typeKind().newarrayCode()}.
*/
TypeKind typeKind();
@@ -50,8 +66,9 @@ public sealed interface NewPrimitiveArrayInstruction extends Instruction
* {@return a new primitive array instruction}
*
* @param typeKind the component type of the array
* @throws IllegalArgumentException when the {@code typeKind} is not a legal
* primitive array component type
* @throws IllegalArgumentException when {@code typeKind} is not primitive
* or is {@code void}
* @see TypeKind#fromNewarrayCode(int) TypeKind::fromNewarrayCode
*/
static NewPrimitiveArrayInstruction of(TypeKind typeKind) {
// Implicit null-check:

View File

@@ -24,18 +24,29 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
import java.lang.classfile.Opcode;
import java.lang.classfile.constantpool.ClassEntry;
import jdk.internal.classfile.impl.AbstractInstruction;
/**
* Models a {@code anewarray} invocation instruction in the {@code code}
* Models a {@link Opcode#ANEWARRAY anewarray} instruction in the {@code code}
* array of a {@code Code} attribute. Delivered as a {@link CodeElement}
* when traversing the elements of a {@link CodeModel}.
* <p>
* A new reference array instruction is composite:
* {@snippet lang=text :
* // @link substring="NewReferenceArrayInstruction" target="#of" :
* NewReferenceArrayInstruction(ClassEntry componentType) // @link substring="componentType" target="#componentType"
* }
*
* @see Opcode.Kind#NEW_REF_ARRAY
* @see CodeBuilder#newarray CodeBuilder::anewarray
* @jvms 6.5.anewarray <em>anewarray</em>
* @since 24
*/
public sealed interface NewReferenceArrayInstruction extends Instruction

View File

@@ -24,17 +24,23 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
import java.lang.classfile.Opcode;
import jdk.internal.classfile.impl.AbstractInstruction;
/**
* Models a {@code nop} invocation instruction in the {@code code}
* Models a {@link Opcode#NOP nop} instruction in the {@code code}
* array of a {@code Code} attribute. Delivered as a {@link CodeElement}
* when traversing the elements of a {@link CodeModel}.
* <p>
* A no-op instruction has no visible state.
*
* @see CodeBuilder#nop CodeBuilder::nop
* @jvms 6.5.nop <em>nop</em>
* @since 24
*/
public sealed interface NopInstruction extends Instruction

View File

@@ -35,23 +35,31 @@ import jdk.internal.classfile.impl.Util;
/**
* Models an arithmetic operator instruction in the {@code code} array of a
* {@code Code} attribute. Corresponding opcodes will have a {@code kind} of
* {@code Code} attribute. Corresponding opcodes have a {@linkplain Opcode#kind() kind} of
* {@link Opcode.Kind#OPERATOR}. Delivered as a {@link CodeElement} when
* traversing the elements of a {@link CodeModel}.
* <p>
* An operator instruction is composite:
* {@snippet lang=text :
* // @link substring="OperatorInstruction" target="#of" :
* OperatorInstruction(Opcode opcode) // @link substring="opcode" target="#opcode()"
* }
*
* @see Opcode.Kind#OPERATOR
* @since 24
*/
public sealed interface OperatorInstruction extends Instruction
permits AbstractInstruction.UnboundOperatorInstruction {
/**
* {@return the operand type of the instruction}
* This is derived from the {@link #opcode opcode}.
*/
TypeKind typeKind();
/**
* {@return an operator instruction}
*
* @param op the opcode for the specific type of array load instruction,
* @param op the opcode for the specific type of operator instruction,
* which must be of kind {@link Opcode.Kind#OPERATOR}
* @throws IllegalArgumentException if the opcode kind is not
* {@link Opcode.Kind#OPERATOR}.

View File

@@ -24,6 +24,7 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
@@ -36,22 +37,35 @@ import jdk.internal.classfile.impl.Util;
/**
* Models a return-from-method instruction in the {@code code} array of a
* {@code Code} attribute. Corresponding opcodes will have a {@code kind} of
* {@code Code} attribute. Corresponding opcodes have a {@linkplain Opcode#kind() kind} of
* {@link Opcode.Kind#RETURN}. Delivered as a {@link CodeElement} when
* traversing the elements of a {@link CodeModel}.
* <p>
* A return-from-method instruction is composite:
* {@snippet lang=text :
* // @link substring="ReturnInstruction" target="#of(TypeKind)" :
* ReturnInstruction(TypeKind typeKind) // @link substring="typeKind" target="#typeKind()"
* }
* where {@code typeKind} is {@linkplain TypeKind##computational-type
* computational} or {@link TypeKind#VOID void}.
*
* @see Opcode.Kind#RETURN
* @see CodeBuilder#return_(TypeKind) CodeBuilder::return_
* @since 24
*/
public sealed interface ReturnInstruction extends Instruction
permits AbstractInstruction.UnboundReturnInstruction {
/**
* {@return the type of the return instruction}
* {@return the {@linkplain TypeKind##computational-type computational type}, including
* {@link TypeKind#VOID void}, of the return instruction}
*/
TypeKind typeKind();
/**
* {@return a return instruction}
* {@code typeKind} is {@linkplain TypeKind#asLoadable() converted} to its
* computational type.
*
* @param typeKind the type of the return instruction
*/

View File

@@ -34,10 +34,17 @@ import jdk.internal.classfile.impl.Util;
/**
* Models a stack manipulation instruction in the {@code code} array of a
* {@code Code} attribute. Corresponding opcodes will have a {@code kind} of
* {@code Code} attribute. Corresponding opcodes have a {@linkplain Opcode#kind() kind} of
* {@link Opcode.Kind#STACK}. Delivered as a {@link CodeElement} when
* traversing the elements of a {@link CodeModel}.
* <p>
* A stack manipulation instruction is composite:
* {@snippet lang=text :
* // @link substring="StackInstruction" target="#of" :
* StackInstruction(Opcode opcode) // @link substring="opcode" target="#opcode()"
* }
*
* @see Opcode.Kind#STACK
* @since 24
*/
public sealed interface StackInstruction extends Instruction

View File

@@ -24,6 +24,7 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
@@ -36,10 +37,28 @@ import jdk.internal.classfile.impl.Util;
/**
* Models a local variable store instruction in the {@code code} array of a
* {@code Code} attribute. Corresponding opcodes will have a {@code kind} of
* {@code Code} attribute. Corresponding opcodes have a {@linkplain Opcode#kind() kind} of
* {@link Opcode.Kind#STORE}. Delivered as a {@link CodeElement} when
* traversing the elements of a {@link CodeModel}.
* <p>
* A local variable store instruction is composite:
* {@snippet lang=text :
* // @link substring="StoreInstruction" target="#of(TypeKind, int)" :
* StoreInstruction(
* TypeKind typeKind, // @link substring="typeKind" target="#typeKind"
* int slot // @link substring="slot" target="#slot"
* )
* }
* where {@code TypeKind} is {@linkplain TypeKind##computational-type
* computational}, and {@code slot} is within {@code [0, 65535]}.
* <p>
* {@code astore} series of instructions, or {@code reference} type store
* instructions, can also operate on the {@link TypeKind##returnAddress
* returnAddress} type from discontinued {@linkplain
* DiscontinuedInstruction.JsrInstruction jump subroutine instructions}.
*
* @see Opcode.Kind#STORE
* @see CodeBuilder#storeLocal CodeBuilder::storeLocal
* @since 24
*/
public sealed interface StoreInstruction extends Instruction
@@ -47,16 +66,23 @@ public sealed interface StoreInstruction extends Instruction
/**
* {@return the local variable slot to store to}
* The value is within {@code [0, 65535]}.
*/
int slot();
/**
* {@return the type of the value to be stored}
* {@return the {@linkplain TypeKind##computational-type computational type}
* of the value to be stored} The {@link TypeKind#REFERENCE reference}
* type store instructions also operate on the {@code returnAddress} type,
* which does not apply to {@code reference} type load instructions.
*/
TypeKind typeKind();
/**
* {@return a local variable store instruction}
* {@code kind} is {@linkplain TypeKind#asLoadable() converted} to its
* computational type.
* {@code slot} must be within {@code [0, 65535]}.
*
* @param kind the type of the value to be stored
* @param slot the local variable slot to store to
@@ -70,6 +96,20 @@ public sealed interface StoreInstruction extends Instruction
/**
* {@return a local variable store instruction}
* <p>
* The range of {@code slot} is restricted by the {@code op} and its
* {@linkplain Opcode#sizeIfFixed() size}:
* <ul>
* <li>If {@code op} has size 1, {@code slot} must be exactly the slot value
* implied by the opcode.
* <li>If {@code op} has size 2, {@code slot} must be within {@code [0, 255]}.
* <li>If {@code op} has size 4, {@code slot} must be within {@code [0, 65535]}.
* </ul>
*
* @apiNote
* The explicit {@code op} argument allows creating {@code wide} or
* regular store instructions when the {@code slot} can be encoded
* with more optimized store instructions.
*
* @param op the opcode for the specific type of store instruction,
* which must be of kind {@link Opcode.Kind#STORE}

View File

@@ -29,12 +29,20 @@ import java.lang.classfile.Label;
import jdk.internal.classfile.impl.AbstractInstruction;
/**
* Models a single case in a {@code lookupswitch} or {@code tableswitch}
* instruction.
* Models a single case in a {@link LookupSwitchInstruction lookupswitch} or
* {@link TableSwitchInstruction tableswitch} instruction.
* <p>
* A switch case is composite:
* {@snippet lang=text :
* // @link substring="SwitchCase" target="#of" :
* SwitchCase(
* int caseValue, // @link substring="caseValue" target="#caseValue"
* Label target // @link substring="target" target="#target"
* )
* }
*
* @see LookupSwitchInstruction
* @see TableSwitchInstruction
*
* @since 24
*/
public sealed interface SwitchCase
@@ -47,11 +55,10 @@ public sealed interface SwitchCase
Label target();
/**
* Create a {@linkplain SwitchCase}
* {@return a new switch case}
*
* @param caseValue the integer value for the case
* @param target the branch target for the case
* @return the {@linkplain SwitchCase}
*/
static SwitchCase of(int caseValue, Label target) {
return new AbstractInstruction.SwitchCaseImpl(caseValue, target);

View File

@@ -24,19 +24,45 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
import java.lang.classfile.Label;
import java.lang.classfile.Opcode;
import java.util.List;
import jdk.internal.classfile.impl.AbstractInstruction;
/**
* Models a {@code tableswitch} instruction in the {@code code} array of a
* Models a {@link Opcode#TABLESWITCH tableswitch} instruction in the {@code code} array of a
* {@code Code} attribute. Delivered as a {@link CodeElement} when traversing
* the elements of a {@link CodeModel}.
* <p>
* A table switch instruction is composite:
* {@snippet lang=text :
* // @link substring="TableSwitchInstruction" target="#of" :
* TableSwitchInstruction(
* int lowValue, // @link substring="int lowValue" target="#lowValue"
* int highValue, // @link substring="int highValue" target="#highValue"
* Label defaultTarget, // @link substring="defaultTarget" target="#defaultTarget"
* List<SwitchCase> cases // @link substring="cases" target="#cases()"
* )
* }
* <p>
* When read from {@code class} files, the {@code cases} may omit cases that
* duplicate the default target. The list is sorted ascending by the {@link
* SwitchCase#caseValue() caseValue}.
* <p>
* When writing to {@code class} file, the order in the {@code cases} list does
* not matter, as there is only one valid order in the physical representation
* of table switch entries. Treatment of elements in {@code cases} whose value
* is less than {@code lowValue} or greater than {@code highValue}, and elements
* whose value duplicates that of another, is not specified.
*
* @see Opcode.Kind#TABLE_SWITCH
* @see CodeBuilder#tableswitch CodeBuilder::tableswitch
* @jvms 6.5.tableswitch <em>tableswitch</em>
* @since 24
*/
public sealed interface TableSwitchInstruction extends Instruction
@@ -67,7 +93,8 @@ public sealed interface TableSwitchInstruction extends Instruction
* @param lowValue the low value of the switch target range, inclusive
* @param highValue the high value of the switch target range, inclusive
* @param defaultTarget the default target of the switch
* @param cases the cases of the switch
* @param cases the cases of the switch; duplicate or out of bound case
* handling is not specified
*/
static TableSwitchInstruction of(int lowValue, int highValue, Label defaultTarget, List<SwitchCase> cases) {
return new AbstractInstruction.UnboundTableSwitchInstruction(lowValue, highValue, defaultTarget, cases);

View File

@@ -24,17 +24,23 @@
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
import java.lang.classfile.Instruction;
import java.lang.classfile.Opcode;
import jdk.internal.classfile.impl.AbstractInstruction;
/**
* Models an {@code athrow} instruction in the {@code code} array of a
* Models an {@link Opcode#ATHROW athrow} instruction in the {@code code} array of a
* {@code Code} attribute. Delivered as a {@link CodeElement} when traversing
* the elements of a {@link CodeModel}.
* <p>
* A throw instruction has no visible state.
*
* @see Opcode.Kind#THROW_EXCEPTION
* @see CodeBuilder#athrow CodeBuiler::athrow
* @since 24
*/
public sealed interface ThrowInstruction extends Instruction

View File

@@ -36,9 +36,24 @@ import jdk.internal.classfile.impl.TemporaryConstantPool;
import jdk.internal.classfile.impl.Util;
/**
* Models an {@code instanceof} or {@code checkcast} instruction in the {@code
* code} array of a {@code Code} attribute. Delivered as a {@link CodeElement}
* when traversing the elements of a {@link CodeModel}.
* Models an {@link Opcode#INSTANCEOF instanceof} or a {@link Opcode#CHECKCAST checkcast}
* instruction in the {@code code} array of a {@code Code} attribute. Corresponding
* opcodes have a {@linkplain Opcode#kind() kind} of {@link Opcode.Kind#TYPE_CHECK}.
* Delivered as a {@link CodeElement} when traversing the elements of a {@link CodeModel}.
* <p>
* An {@code instanceof} checks the type and pushes an integer to the operand stack.
* A {@code checkcast} checks the type and throws a {@link ClassCastException} if
* the check fails. {@code instanceof} treat the {@code null} reference as a
* failure, while {@code checkcast} treat the {@code null} reference as a success.
* <p>
* A type check instruction is composite:
* {@snippet lang=text :
* // @link substring="TypeCheckInstruction" target="#of(Opcode, ClassEntry)" :
* TypeCheckInstruction(
* Opcode opcode, // @link substring="opcode" target="#opcode"
* ClassEntry type // @link substring="type" target="#type"
* )
* }
*
* @since 24
*/
@@ -47,7 +62,7 @@ public sealed interface TypeCheckInstruction extends Instruction
AbstractInstruction.UnboundTypeCheckInstruction {
/**
* {@return the type against which the instruction checks or casts}
* {@return the type against which the instruction checks}
*/
ClassEntry type();
@@ -58,7 +73,7 @@ public sealed interface TypeCheckInstruction extends Instruction
* which must be of kind {@link Opcode.Kind#TYPE_CHECK}
* @param type the type against which to check or cast
* @throws IllegalArgumentException if the opcode kind is not
* {@link Opcode.Kind#TYPE_CHECK}.
* {@link Opcode.Kind#TYPE_CHECK}
*/
static TypeCheckInstruction of(Opcode op, ClassEntry type) {
Util.checkKind(op, Opcode.Kind.TYPE_CHECK);
@@ -71,6 +86,8 @@ public sealed interface TypeCheckInstruction extends Instruction
* @param op the opcode for the specific type of type check instruction,
* which must be of kind {@link Opcode.Kind#TYPE_CHECK}
* @param type the type against which to check or cast
* @throws IllegalArgumentException if the opcode kind is not
* {@link Opcode.Kind#TYPE_CHECK}, or if {@code type} is primitive
*/
static TypeCheckInstruction of(Opcode op, ClassDesc type) {
return of(op, TemporaryConstantPool.INSTANCE.classEntry(type));

View File

@@ -26,9 +26,45 @@
/**
* <h2>Provides interfaces describing code instructions for the {@link java.lang.classfile} library.</h2>
*
* The {@code java.lang.classfile.attribute} package contains interfaces describing code instructions.
* The {@code java.lang.classfile.instruction} package contains interfaces describing code instructions.
* Implementations of these interfaces are immutable.
* <p>
* Unless otherwise specified, passing {@code null} or an array or collection containing a {@code null} element as an
* argument to a constructor or method of any Class-File API class or interface will cause a {@link NullPointerException}
* to be thrown.
*
* <h2 id="reading">Reading of instructions</h2>
* Instructions and pseudo-instructions are usually accessed from a {@link CodeModel}, such as {@link CodeModel#forEach
* CodeModel::forEach}, and categorized by pattern-matching.
* <p>
* When read from {@code class} files, instructions are lazily inflated; the contents of these instructions, besides the
* bare structure, are not evaluated to speed up parsing. Instructions to users interest, such as those filtered by the
* pattern matching, have their contents read on demand, to avoid unnecessary reading of unrelated instructions in a code
* array.
* <p>
* Due to the lazy nature of {@code class} file parsing, {@link IllegalArgumentException} indicating malformed
* {@code class} file data can be thrown at any method invocation. For example, an instruction object for a {@link
* TypeCheckInstruction} may be obtained from a {@code CodeModel}, but the subsequent invocation of {@link
* TypeCheckInstruction#type() .type()} may fail with {@code IllegalArgumentException} because the instruction refers
* to a bad constant pool index.
*
* <h2 id="writing">Writing of instructions</h2>
* Writing of instructions happen on {@link CodeBuilder}. The most basic way to write instructions is to pass an
* instruction object to {@link CodeBuilder#with CodeBuilder::with}, which supports all valid instructions.
* Yet, {@code CodeBuilder} provides a lot of {@linkplain CodeBuilder##instruction-factories convenience factory methods}
* for easy creation of instructions, named by their mnemonic. These accessors are more concise, and often more
* efficient at run-time than passing instruction objects.
* <p>
* Due to restrictions in the {@code class} file format, some instructions may not be representable in a {@code CodeBuilder}.
* In some scenarios, such as for {@link BranchInstruction}, Class-File API options control if alternatives can be used
* in code generation instead. Otherwise, they can be configured to fail-fast to ensure the parity of {@code CodeBuilder}
* commands with the generated {@code code} array data.
*
* @jvms 6.5 Instructions
* @since 24
*/
package java.lang.classfile.instruction;
import java.lang.classfile.CodeBuilder;
import java.lang.classfile.CodeModel;

View File

@@ -569,9 +569,8 @@ public class Socket implements java.io.Closeable {
/**
* Connects this socket to the server.
*
* <p> If the endpoint is an unresolved {@link InetSocketAddress}, or the
* connection cannot be established, then the socket is closed, and an
* {@link IOException} is thrown.
* <p> If the connection cannot be established, then the socket is closed,
* and an {@link IOException} is thrown.
*
* <p> This method is {@linkplain Thread#interrupt() interruptible} in the
* following circumstances:
@@ -591,8 +590,8 @@ public class Socket implements java.io.Closeable {
* @param endpoint the {@code SocketAddress}
* @throws IOException if an error occurs during the connection, the socket
* is already connected or the socket is closed
* @throws UnknownHostException if the endpoint is an unresolved
* {@link InetSocketAddress}
* @throws UnknownHostException if the connection could not be established
* because the endpoint is an unresolved {@link InetSocketAddress}
* @throws java.nio.channels.IllegalBlockingModeException
* if this socket has an associated channel,
* and the channel is in non-blocking mode
@@ -609,9 +608,8 @@ public class Socket implements java.io.Closeable {
* A timeout of zero is interpreted as an infinite timeout. The connection
* will then block until established or an error occurs.
*
* <p> If the endpoint is an unresolved {@link InetSocketAddress}, the
* connection cannot be established, or the timeout expires before the
* connection is established, then the socket is closed, and an
* <p> If the connection cannot be established, or the timeout expires
* before the connection is established, then the socket is closed, and an
* {@link IOException} is thrown.
*
* <p> This method is {@linkplain Thread#interrupt() interruptible} in the
@@ -634,8 +632,8 @@ public class Socket implements java.io.Closeable {
* @throws IOException if an error occurs during the connection, the socket
* is already connected or the socket is closed
* @throws SocketTimeoutException if timeout expires before connecting
* @throws UnknownHostException if the endpoint is an unresolved
* {@link InetSocketAddress}
* @throws UnknownHostException if the connection could not be established
* because the endpoint is an unresolved {@link InetSocketAddress}
* @throws java.nio.channels.IllegalBlockingModeException
* if this socket has an associated channel,
* and the channel is in non-blocking mode
@@ -660,12 +658,6 @@ public class Socket implements java.io.Closeable {
if (!(endpoint instanceof InetSocketAddress epoint))
throw new IllegalArgumentException("Unsupported address type");
if (epoint.isUnresolved()) {
var uhe = new UnknownHostException(epoint.getHostName());
closeSuppressingExceptions(uhe);
throw uhe;
}
InetAddress addr = epoint.getAddress();
checkAddress(addr, "connect");

View File

@@ -3654,8 +3654,7 @@ public abstract class ResourceBundle {
}
private static final boolean TRACE_ON = Boolean.getBoolean(
System.getProperty("resource.bundle.debug", "false"));
private static final boolean TRACE_ON = Boolean.getBoolean("resource.bundle.debug");
private static void trace(String format, Object... params) {
if (TRACE_ON)

View File

@@ -145,12 +145,17 @@ public abstract sealed class AbstractMemorySegmentImpl
Reflection.ensureNativeAccess(callerClass, MemorySegment.class, "reinterpret", false);
Utils.checkNonNegativeArgument(newSize, "newSize");
if (!isNative()) throw new UnsupportedOperationException("Not a native segment");
Runnable action = cleanup != null ?
() -> cleanup.accept(SegmentFactories.makeNativeSegmentUnchecked(address(), newSize)) :
null;
Runnable action = cleanupAction(address(), newSize, cleanup);
return SegmentFactories.makeNativeSegmentUnchecked(address(), newSize, scope, readOnly, action);
}
// Using a static helper method ensures there is no unintended lambda capturing of `this`
private static Runnable cleanupAction(long address, long newSize, Consumer<MemorySegment> cleanup) {
return cleanup != null ?
() -> cleanup.accept(SegmentFactories.makeNativeSegmentUnchecked(address, newSize)) :
null;
}
private AbstractMemorySegmentImpl asSliceNoCheck(long offset, long newSize) {
return dup(offset, newSize, readOnly, scope);
}

View File

@@ -130,8 +130,8 @@ public final class StringSupport {
final long toOffset) {
final long length = toOffset - fromOffset;
segment.checkBounds(fromOffset, length);
if (length == 0) {
// The state has to be checked explicitly for zero-length segments
if (length < Byte.BYTES) {
// There can be no null terminator present
segment.scope.checkValidState();
throw nullNotFound(segment, fromOffset, toOffset);
}
@@ -164,7 +164,8 @@ public final class StringSupport {
final long toOffset) {
final long length = toOffset - fromOffset;
segment.checkBounds(fromOffset, length);
if (length == 0) {
if (length < Short.BYTES) {
// There can be no null terminator present
segment.scope.checkValidState();
throw nullNotFound(segment, fromOffset, toOffset);
}
@@ -199,19 +200,23 @@ public final class StringSupport {
final long toOffset) {
final long length = toOffset - fromOffset;
segment.checkBounds(fromOffset, length);
if (length == 0) {
if (length < Integer.BYTES) {
// There can be no null terminator present
segment.scope.checkValidState();
throw nullNotFound(segment, fromOffset, toOffset);
}
final long longBytes = length & LONG_MASK;
final long longLimit = fromOffset + longBytes;
long offset = fromOffset;
for (; offset < longLimit; offset += Long.BYTES) {
long val = SCOPED_MEMORY_ACCESS.getLongUnaligned(segment.sessionImpl(), segment.unsafeGetBase(), segment.unsafeGetOffset() + offset, !Architecture.isLittleEndian());
if (mightContainZeroInt(val)) {
for (int j = 0; j < Long.BYTES; j += Integer.BYTES) {
if (SCOPED_MEMORY_ACCESS.getIntUnaligned(segment.sessionImpl(), segment.unsafeGetBase(), segment.unsafeGetOffset() + offset + j, !Architecture.isLittleEndian()) == 0) {
return requireWithinStringSize(offset + j - fromOffset, segment, fromOffset, toOffset);
// For quad byte strings, it does not pay off to use long scanning on x64
if (!Architecture.isX64()) {
final long longBytes = length & LONG_MASK;
final long longLimit = fromOffset + longBytes;
for (; offset < longLimit; offset += Long.BYTES) {
long val = SCOPED_MEMORY_ACCESS.getLongUnaligned(segment.sessionImpl(), segment.unsafeGetBase(), segment.unsafeGetOffset() + offset, !Architecture.isLittleEndian());
if (mightContainZeroInt(val)) {
for (int j = 0; j < Long.BYTES; j += Integer.BYTES) {
if (SCOPED_MEMORY_ACCESS.getIntUnaligned(segment.sessionImpl(), segment.unsafeGetBase(), segment.unsafeGetOffset() + offset + j, !Architecture.isLittleEndian()) == 0) {
return requireWithinStringSize(offset + j - fromOffset, segment, fromOffset, toOffset);
}
}
}
}

View File

@@ -155,7 +155,6 @@ module java.base {
exports jdk.internal.javac to
java.compiler,
java.desktop, // for ScopedValue
java.se, // for ParticipatesInPreview
jdk.compiler,
jdk.incubator.vector, // participates in preview features
jdk.jartool, // participates in preview features

View File

@@ -24,22 +24,25 @@
#
# Translators please note do not translate the options themselves
java.launcher.opt.header = Verwendung: {0} [Optionen] <Hauptklasse> [args...]\n (zur Ausführung einer Klasse)\n oder {0} [Optionen] -jar <JAR-Datei> [args...]\n (zur Ausführung einer JAR-Datei)\n oder {0} [Optionen] -m <Modul>[/<Hauptklasse>] [args...]\n {0} [Optionen] --module <Modul>[/<Hauptklasse>] [args...]\n (zur Ausführung der Hauptklasse in einem Modul)\n oder {0} [Optionen] <Quelldatei> [args]\n (zur Ausführung eines Programms mit einer Quelldatei)\n\n Argumente, die auf die Hauptklasse, die Quelldatei, -jar <JAR-Datei>, -m oder --module\n <Modul>/<Hauptklasse> folgen, werden als Argumente für die\nHauptklasse übergeben.\n\n Dabei umfasst "Optionen" Folgendes:\n\n
java.launcher.opt.header = Verwendung: {0} [Optionen] <Hauptklasse> [Argumente...]\n (zur Ausführung einer Klasse)\n oder {0} [Optionen] -jar <JAR-Datei>.jar [Argumente...]\n (zur Ausführung einer JAR-Datei)\n oder {0} [Optionen] -m <Modul>[/<Hauptklasse>] [Argumente...]\n {0} [Optionen] --module <Modul>[/<Hauptklasse>] [Argumente...]\n (zur Ausführung der Hauptklasse in einem Modul)\n oder {0} [Optionen] <Quelldatei>.java [Argumente]\n (zur Ausführung eines Programms mit einer Quelldatei)\n\n Argumente, die auf die Hauptklasse, die Quelldatei, -jar <JAR-Datei>.jar, -m oder --module\n <Modul>/<Hauptklasse> folgen, werden als Argumente für die\nHauptklasse übergeben.\n\n Dabei umfasst "Optionen" Folgendes:\n\n
java.launcher.opt.vmselect =\ {0}\t zur Auswahl der "{1}" VM\n
java.launcher.opt.hotspot =\ {0}\t ist ein Synonym für die "{1}" VM [verworfen]\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer = \ -cp <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n -classpath <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n --class-path <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven, in denen nach Klassendateien gesucht wird.\n -p <Modulpfad>\n --module-path <Modulpfad>...\n Eine durch {0} getrennte Liste mit Elementen, von denen jedes Element ein Dateipfad\n zu einem Modul oder einem Verzeichnis mit Modulen ist. Jedes Modul ist entweder\n ein modulares JAR oder ein entpacktes Modulverzeichnis.\n --upgrade-module-path <Modulpfad>...\n Eine durch {0} getrennte Liste mit Elementen, von denen jedes Element ein Dateipfad\n zu einem Modul oder einem Verzeichnis mit Modulen ist,\n um upgradefähige Module im Laufzeitimage zu ersetzen. Jedes Modul ist entweder\n ein modulares JAR oder ein entpacktes Modulverzeichnis.\n --add-modules <Modulname>[,<Modulname>...]\n Root-Module, die zusätzlich zum anfänglichen Modul aufgelöst werden sollen.\n <Modulname> kann auch wie folgt lauten: ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --enable-native-access <Modulname>[,<Modulname>...]\n Damit kann der Code in Modulen auf Code und Daten außerhalb der JRE zugreifen.\n <Modulname> kann auch ALL-UNNAMED sein, um den Code im Classpath anzugeben.\n --list-modules\n Listet beobachtbare Module auf und beendet den Vorgang\n -d <Modulname>\n --describe-module <Modulname>\n Beschreibt ein Modul und beendet den Vorgang\n --dry-run Erstellt eine VM und lädt die Hauptklasse, führt aber nicht die Hauptmethode aus.\n Die Option "--dry-run" kann nützlich sein, um die\n Befehlszeilenoptionen, wie die Modulsystemkonfiguration, zu validieren.\n --validate-modules\n Validiert alle Module und beendet den Vorgang\n Die Option "--validate-modules" kann nützlich sein, um\n Konflikte und andere Fehler mit Modulen auf dem Modulpfad zu ermitteln.\n -D<Name>=<Wert>\n Legt eine Systemeigenschaft fest\n -verbose:[class|module|gc|jni]\n Aktiviert die Verbose-Ausgabe für das angegebene Subsystem\n -version Gibt die Produktversion an den Fehlerstream aus und beendet den Vorgang\n --version Gibt die Produktversion an den Outputstream aus und beendet den Vorgang\n -showversion Gibt die Produktversion an den Fehlerstream aus und setzt den Vorgang fort\n --show-version\n Gibt die Produktversion an den Outputstream aus und setzt den Vorgang fort\n --show-module-resolution\n Zeigt die Modulauflösungsausgabe beim Start an\n -? -h -help\n Gibt diese Hilfemeldung an den Fehlerstream aus\n --help Gibt diese Hilfemeldung an den Outputstream aus\n -X Gibt Hilfe zu zusätzlichen Optionen an den Fehlerstream aus\n --help-extra Gibt Hilfe zu zusätzlichen Optionen an den Outputstream aus\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n Aktiviert Assertions mit angegebener Granularität\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n Deaktiviert Assertions mit angegebener Granularität\n -esa | -enablesystemassertions\n Aktiviert System-Assertions\n -dsa | -disablesystemassertions\n Deaktiviert System-Assertions\n -agentlib:<libname>[=<options>]\n Lädt die \
native Agent Library <libname>. Beispiel: -agentlib:jdwp\n siehe auch -agentlib:jdwp=help\n -agentpath:<pathname>[=<options>]\n Lädt die native Agent Library mit dem vollständigen Pfadnamen\n -javaagent:<jarpath>[=<options>]\n Lädt den Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:<imagepath>\n Zeigt den Startbildschirm mit einem angegebenen Bild an\n Skalierte HiDPI-Bilder werden automatisch unterstützt und verwendet,\n falls verfügbar. Der nicht skalierte Bilddateiname (Beispiel: image.ext)\n muss immer als Argument an die Option "-splash" übergeben werden.\n Das am besten geeignete angegebene skalierte Bild wird\n automatisch ausgewählt.\n Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API\n @argument files\n Eine oder mehrere Argumentdateien mit Optionen\n --disable-@files\n Verhindert die weitere Erweiterung von Argumentdateien\n --enable-preview\n Lässt zu, das Klassen von Vorschaufeatures dieses Release abhängig sind\nUm ein Argument für eine lange Option anzugeben, können Sie --<Name>=<Wert> oder\n--<Name> <Wert> verwenden.\n
java.launcher.opt.footer = \ -cp <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n -classpath <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n --class-path <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n Eine durch "{0}" getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven, in denen nach Klassendateien gesucht wird.\n -p <Modulpfad>\n --module-path <Modulpfad>...\n Eine durch "{0}" getrennte Liste mit Elementen, von denen jedes Element ein Dateipfad ist\n zu einem Modul oder einem Verzeichnis mit Modulen ist. Jedes Modul ist entweder\n ein modulares JAR oder ein entpacktes Modulverzeichnis.\n --upgrade-module-path <Modulpfad>...\n Eine durch "{0}" getrennte Liste mit Elementen, von denen jedes Element ein Dateipfad ist\n zu einem Modul oder einem Verzeichnis mit Modulen ist,\n um upgradefähige Module im Laufzeitimage zu ersetzen. Jedes Modul ist entweder\n ein modulares JAR oder ein entpacktes Modulverzeichnis.\n --add-modules <Modulname>[,<Modulname>...]\n Root-Module, die zusätzlich zum anfänglichen Modul aufgelöst werden sollen.\n <Modulname> kann auch wie folgt lauten: ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --enable-native-access <Modulname>[,<Modulname>...]\n Damit kann der Code in Modulen auf Code und Daten außerhalb der JRE zugreifen.\n <Modulname> kann auch ALL-UNNAMED sein, um den Code im Classpath anzugeben.\n --illegal-native-access=<Wert>\n Zugriff auf Code und Daten außerhalb der JRE\n durch Code in Modulen zulassen oder verweigern, für die der native Zugriff nicht explizit aktiviert ist.\n <Wert> ist "deny", "warn" oder "allow". Der Standardwert ist "warn".\n Diese Option wird in einem zukünftigen Release entfernt.\n --list-modules\n Listet beobachtbare Module auf und beendet den Vorgang\n -d <Modulname>\n --describe-module <Modulname>\n Beschreibt ein Modul und beendet den Vorgang\n --dry-run Erstellt eine VM und lädt die Hauptklasse, führt aber nicht die Hauptmethode aus.\n Die Option "--dry-run" kann nützlich sein, um die\n Befehlszeilenoptionen, wie die Modulsystemkonfiguration, zu validieren.\n --validate-modules\n Validiert alle Module und beendet den Vorgang\n Die Option "--validate-modules" kann nützlich sein, um\n Konflikte und andere Fehler mit Modulen auf dem Modulpfad zu ermitteln.\n -D<Name>=<Wert>\n Legt eine Systemeigenschaft fest\n -verbose:[class|module|gc|jni]\n Aktiviert die Verbose-Ausgabe für das angegebene Subsystem\n -version Gibt die Produktversion an den Fehlerstream aus und beendet den Vorgang\n --version Gibt die Produktversion an den Outputstream aus und beendet den Vorgang\n -showversion Gibt die Produktversion an den Fehlerstream aus und setzt den Vorgang fort\n --show-version\n Gibt die Produktversion an den Outputstream aus und setzt den Vorgang fort\n --show-module-resolution\n Zeigt die Modulauflösungsausgabe beim Start an\n -? -h -help\n Gibt diese Hilfemeldung an den Fehlerstream aus\n --help Gibt diese Hilfemeldung an den Outputstream aus\n -X Gibt Hilfe zu zusätzlichen Optionen an den Fehlerstream aus\n --help-extra Gibt Hilfe zu zusätzlichen Optionen an den Outputstream aus\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n Aktiviert Assertions mit angegebener \
Granularität\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n Deaktiviert Assertions mit angegebener Granularität\n -esa | -enablesystemassertions\n Aktiviert System-Assertions\n -dsa | -disablesystemassertions\n Deaktiviert System-Assertions\n -agentlib:<libname>[=<options>]\n Lädt die native Agent Library <libname>. Beispiel: -agentlib:jdwp\n siehe auch -agentlib:jdwp=help\n -agentpath:<pathname>[=<options>]\n Lädt die native Agent Library mit dem vollständigen Pfadnamen\n -javaagent:<jarpath>[=<options>]\n Lädt den Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:<imagepath>\n Zeigt den Startbildschirm mit einem angegebenen Bild an\n Skalierte HiDPI-Bilder werden automatisch unterstützt und verwendet,\n falls verfügbar. Der nicht skalierte Bilddateiname (Beispiel: image.ext)\n muss immer als Argument an die Option "-splash" übergeben werden.\n Das am besten geeignete angegebene skalierte Bild wird\n automatisch ausgewählt.\n Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API\n @argument files\n Eine oder mehrere Argumentdateien mit Optionen\n --disable-@files\n Verhindert die weitere Erweiterung von Argumentdateien\n --enable-preview\n Lässt zu, das Klassen von Vorschaufeatures dieses Release abhängig sind\nUm ein Argument für eine lange Option anzugeben, können Sie --<Name>=<Wert> oder\n--<Name> <Wert> verwenden.\n
# Translators please note do not translate the options themselves
java.launcher.X.usage=\n -Xbatch Deaktiviert die Hintergrundkompilierung\n -Xbootclasspath/a:<durch {0} getrennte Verzeichnisse und ZIP-/JAR-Dateien>\n An das Ende des Bootstrap Classpaths anhängen\n -Xcheck:jni Führt zusätzliche Prüfungen für JNI-Funktionen aus\n -Xcomp Erzwingt die Kompilierung von Methoden beim ersten Aufruf\n -Xdebug Führt keine Aktion aus. Ist veraltet und wird in einem zukünftigen Release entfernt.\n -Xdiag Zeigt zusätzliche Diagnosemeldungen an\n -Xfuture Aktiviert strengste Prüfungen, als möglicher zukünftiger Standardwert erwartet.\n Diese Option ist veraltet und kann in einem\n zukünftigen Release entfernt werden.\n -Xint Nur Ausführung im interpretierten Modus\n -Xinternalversion\n Zeigt detailliertere JVM-Versionsinformationen an als die\n Option -version\n -Xlog:<Optionen> Konfiguriert oder aktiviert Logging mit dem einheitlichen Java Virtual\n Machine-(JVM-)Logging-Framework. Verwenden Sie -Xlog:help\n für weitere Einzelheiten.\n -Xloggc:<Datei> Protokolliert den GC-Status in einer Datei mit Zeitstempeln.\n Diese Option ist veraltet und kann in einem\n zukünftigen Release entfernt werden. Wird durch -Xlog:gc:<Datei> ersetzt.\n -Xmixed Ausführung im gemischten Modus (Standard)\n -Xmn<Größe> Legt die anfängliche und maximale Größe (in Byte) des Heaps\n für die Young Generation (Nursery) fest\n -Xms<Größe> Legt die anfängliche Java-Heap-Größe fest\n -Xmx<Größe> Legt die maximale Java-Heap-Größe fest\n -Xnoclassgc Deaktiviert die Klassen-Garbage Collection\n -Xrs Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xshare:auto Verwendet freigegebene Klassendaten, wenn möglich (Standard)\n -Xshare:off Versucht nicht, freigegebene Klassendaten zu verwenden\n -Xshare:on Erfordert die Verwendung freigegebener Klassendaten, verläuft sonst nicht erfolgreich.\n Diese Testoption kann zeitweise zu\n Fehlern führen. Sie darf nicht in Produktionsumgebungen verwendet werden.\n -XshowSettings Zeigt alle Einstellungen an und fährt fort\n -XshowSettings:all\n Zeigt alle Einstellungen als Verbose-Ausgabe an und fährt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen an und fährt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen an und fährt fort\n -XshowSettings:vm\n Zeigt alle VM-bezogenen Einstellungen an und fährt fort\n -XshowSettings:security\n Zeigt alle Sicherheitseinstellungen an und fährt fort\n -XshowSettings:security:all\n Zeigt alle Sicherheitseinstellungen an und fährt fort\n -XshowSettings:security:properties\n Zeigt Sicherheitseigenschaften an und fährt fort\n -XshowSettings:security:providers\n Zeigt statische Sicherheitsprovidereinstellungen an und fährt fort\n -XshowSettings:security:tls\n Zeigt TLS-bezogene Sicherheitseinstellungen an und fährt fort\n -XshowSettings:system\n (Nur Linux) Zeigt die Konfiguration des Hostsystems oder Containers an\n und fährt fort\n -Xss<Größe> Legt die Stackgröße des Java-Threads fest\n Die tatsächliche \
Größe kann auf ein Vielfaches der\n Systemseitengröße aufgerundet werden, wenn für das Betriebssystem erforderlich.\n -Xverify Legt den Modus der Bytecodeverifizierung fest\n Beachten Sie, dass die Option -Xverify:none veraltet ist und\n in einem zukünftigen Release entfernt werden kann.\n --add-reads <Modul>=<Zielmodul>(,<Zielmodul>)*\n Aktualisiert <Modul>, damit <Zielmodul> gelesen wird, ungeachtet\n der Moduldeklaration. \n <Zielmodul> kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n Aktualisiert <Modul>, um <Package> in <Zielmodul> zu exportieren,\n ungeachtet der Moduldeklaration.\n <Zielmodul> kann ALL-UNNAMED sein, um in alle\n unbenannten Module zu exportieren.\n --add-opens <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n Aktualisiert <Modul>, um <Package> in\n <Zielmodul> zu öffnen, ungeachtet der Moduldeklaration.\n --limit-modules <Modulname>[,<Modulname>...]\n Grenzt die Gesamtmenge der beobachtbaren Module ein\n --patch-module <Modul>=<Datei>({0}<Datei>)*\n Überschreibt oder erweitert ein Modul mit Klassen und Ressourcen\n in JAR-Dateien oder Verzeichnissen.\n --source <Version>\n Legt die Version der Quelle im Quelldateimodus fest.\n --finalization=<Wert>\n Steuert, ob die JVM Objekte finalisiert.\n Dabei ist <Wert> entweder "enabled" oder "disabled".\n Die Finalisierung ist standardmäßig aktiviert.\n --sun-misc-unsafe-memory-access=<value>\n Verwendung der nicht unterstützten API sun.misc.Unsafe zulassen oder verweigern\n <value> ist "allow", "warn", "debug" oder "deny".\n Der Standardwert ist "allow".\n\nDiese zusätzlichen Optionen können jederzeit ohne vorherige Ankündigung geändert werden.\n
java.launcher.X.usage=\n -Xbatch Deaktiviert die Hintergrundkompilierung\n -Xbootclasspath/a:<durch {0} getrennte Verzeichnisse und ZIP-/JAR-Dateien>\n An das Ende des Bootstrap Classpaths anhängen\n -Xcheck:jni Führt zusätzliche Prüfungen für JNI-Funktionen aus\n -Xcomp Erzwingt die Kompilierung von Methoden beim ersten Aufruf\n -Xdebug Führt keine Aktion aus. Ist veraltet und wird in einem zukünftigen Release entfernt.\n -Xdiag Zeigt zusätzliche Diagnosemeldungen an\n -Xint Nur Ausführung im interpretierten Modus\n -Xinternalversion\n Zeigt detailliertere JVM-Versionsinformationen an als die\n Option -version\n -Xlog:<Optionen> Konfiguriert oder aktiviert Logging mit dem einheitlichen Java Virtual\n Machine-(JVM-)Logging-Framework. Verwenden Sie -Xlog:help\n für weitere Einzelheiten.\n -Xloggc:<Datei> Protokolliert den GC-Status in einer Datei mit Zeitstempeln.\n Diese Option ist veraltet und kann in einem\n zukünftigen Release entfernt werden. Wird durch -Xlog:gc:<Datei> ersetzt.\n -Xmixed Ausführung im gemischten Modus (Standard)\n -Xmn<Größe> Legt die anfängliche und maximale Größe (in Byte) des Heaps\n für die Young Generation (Nursery) fest\n -Xms<Größe> Legt die anfängliche Java-Heap-Größe fest\n -Xmx<Größe> Legt die maximale Java-Heap-Größe fest\n -Xnoclassgc Deaktiviert die Klassen-Garbage Collection\n -Xrs Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xshare:auto Verwendet freigegebene Klassendaten, wenn möglich (Standard)\n -Xshare:off Versucht nicht, freigegebene Klassendaten zu verwenden\n -Xshare:on Erfordert die Verwendung freigegebener Klassendaten, verläuft sonst nicht erfolgreich.\n Diese Testoption kann zeitweise zu\n Fehlern führen. Sie darf nicht in Produktionsumgebungen verwendet werden.\n -XshowSettings Zeigt alle Einstellungen an und fährt fort\n -XshowSettings:all\n Zeigt alle Einstellungen als Verbose-Ausgabe an und fährt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen an und fährt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen an und fährt fort\n -XshowSettings:vm\n Zeigt alle VM-bezogenen Einstellungen an und fährt fort\n -XshowSettings:security\n Zeigt alle Sicherheitseinstellungen an und fährt fort\n -XshowSettings:security:all\n Zeigt alle Sicherheitseinstellungen an und fährt fort\n -XshowSettings:security:properties\n Zeigt Sicherheitseigenschaften an und fährt fort\n -XshowSettings:security:providers\n Zeigt statische Sicherheitsprovidereinstellungen an und fährt fort\n -XshowSettings:security:tls\n Zeigt TLS-bezogene Sicherheitseinstellungen an und fährt fort\n -XshowSettings:system\n (Nur Linux) Zeigt die Konfiguration des Hostsystems oder Containers an\n und fährt fort\n -Xss<Größe> Legt die Stackgröße des Java-Threads fest\n Die tatsächliche Größe kann auf ein Vielfaches der\n Systemseitengröße aufgerundet werden, wenn für das Betriebssystem erforderlich.\n -Xverify Legt den Modus der Bytecodeverifizierung fest\n \
Beachten Sie, dass die Option -Xverify:none veraltet ist und\n in einem zukünftigen Release entfernt werden kann.\n --add-reads <Modul>=<Zielmodul>(,<Zielmodul>)*\n Aktualisiert <Modul>, damit <Zielmodul> gelesen wird, ungeachtet\n der Moduldeklaration. \n <Zielmodul> kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n Aktualisiert <Modul>, um <Package> in <Zielmodul> zu exportieren,\n ungeachtet der Moduldeklaration.\n <Zielmodul> kann ALL-UNNAMED sein, um in alle\n unbenannten Module zu exportieren.\n --add-opens <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n Aktualisiert <Modul>, um <Package> in\n <Zielmodul> zu öffnen, ungeachtet der Moduldeklaration.\n --limit-modules <Modulname>[,<Modulname>...]\n Grenzt die Gesamtmenge der beobachtbaren Module ein\n --patch-module <Modul>=<Datei>({0}<Datei>)*\n Überschreibt oder erweitert ein Modul mit Klassen und Ressourcen\n in JAR-Dateien oder Verzeichnissen.\n --source <Version>\n Legt die Version der Quelle im Quelldateimodus fest.\n --finalization=<Wert>\n Steuert, ob die JVM Objekte finalisiert.\n Dabei ist <Wert> entweder "enabled" oder "disabled".\n Die Finalisierung ist standardmäßig aktiviert.\n --sun-misc-unsafe-memory-access=<value>\n Verwendung der nicht unterstützten API sun.misc.Unsafe zulassen oder verweigern\n <value> ist "allow", "warn", "debug" oder "deny".\n Der Standardwert ist "warn".\n\nDiese zusätzlichen Optionen können jederzeit ohne vorherige Ankündigung geändert werden.\n
# Translators please note do not translate the options themselves
java.launcher.X.macosx.usage=\nDie folgenden Optionen sind für macOS spezifisch:\n -XstartOnFirstThread\n Führt die main()-Methode für den ersten (AppKit-)Thread aus\n -Xdock:name=<Anwendungsname>\n Setzt den im Dock angezeigten Standardanwendungsnamen außer Kraft\n -Xdock:icon=<Pfad zu Symboldatei>\n Setzt das im Dock angezeigte Standardsymbol außer Kraft\n\n
# Translators please note do not translate the options themselves
java.launcher.opt.concise.header = Verwendung: java [Java-Optionen...] <Anwendung> [Anwendungsargumente...]\n\nDabei ist <Anwendung> einer der folgenden Werte:\n <Hauptklasse> Zum Ausführen der Hauptmethode einer kompilierten Hauptklasse\n -jar <JAR-Datei>.jar Zum Ausführen der Hauptklasse eines JAR-Archivs\n -m <Modul>[/<Hauptklasse>] Zum Ausführen der Hauptklasse eines Moduls\n <Quelldatei>.java Zum Kompilieren und Ausführen eines Quelldateiprogramms\n\nDabei sind die folgenden wichtigen Java-Optionen verfügbar:\n --class-path <Classpath>\n <Classpath> ist eine durch "{0}" getrennte Liste der Verzeichnisse und JAR-Archive, in denen nach Klassendateien gesucht werden soll\n --module-path <Modulpfad>\n <Modulpfad> ist eine durch "{0}" getrennte Liste der Verzeichnisse und JAR-Archive, in denen nach Modulen gesucht werden soll\n -version\n Zum Ausgeben der Produktversion in den Fehlerstream und Beenden des Vorgangs\n\nFür weitere Verwendungshilfe: java --help\nFür eine interaktive Java-Umgebung: jshell
java.launcher.bad.option=\nNicht erkannte showSettings-Option: {0}\nGültige Werte: "all", "locale", "properties", "security", "system"(nur Linux), "vm"\nGültige Werte für Unteroption "security": "all", "properties", "providers", "tls"\nSiehe "java -X"\n
java.launcher.cls.error1=Fehler: Hauptklasse {0} konnte nicht gefunden oder geladen werden\nUrsache: {1}: {2}
java.launcher.cls.error2=Fehler: Hauptmethode in Klasse {0} nicht gefunden. Definieren Sie die Hauptmethode als:\n public static void main(String[] args):\noder eine JavaFX-Anwendung muss {1} erweitern

View File

@@ -24,24 +24,27 @@
#
# Translators please note do not translate the options themselves
java.launcher.opt.header = 使用方法: {0} [options] <mainclass> [args...]\n (クラスを実行する場合)\n または {0} [options] -jar <jarfile> [args...]\n (jarファイルを実行する場合)\n または {0} [options] -m <module>[/<mainclass>] [args...]\n {0} [options] --module <module>[/<mainclass>] [args...]\n (モジュールのメイン・クラスを実行する場合)\n または {0} [options] <sourcefile> [args]\n (ソースファイル・プログラムを実行する場合)\n\n メイン・クラス、ソース・ファイル、-jar <jarfile>、\n -mまたは--module <module>/<mainclass>に続く引数は、メイン・クラスへの引数として\n 渡されます。\n\n オプションは次のとおりです:\n\n
java.launcher.opt.header = 使用方法: {0} [options] <mainclass> [args...]\n (クラスを実行する場合)\n または {0} [options] -jar <jarfile>.jar [args...]\n (jarファイルを実行する場合)\n または {0} [options] -m <module>[/<mainclass>] [args...]\n {0} [options] --module <module>[/<mainclass>] [args...]\n (モジュールのメイン・クラスを実行する場合)\n または {0} [options] <sourcefile>.java [args]\n (ソースファイル・プログラムを実行する場合)\n\n メイン・クラス、ソース・ファイル、-jar <jarfile>.jar、\n-mまたは--module <module>/<mainclass>に続く引数は、メイン・クラスへの引数として\n渡されます。\n\n オプションは次のとおりです:\n\n
java.launcher.opt.vmselect =\ {0}\t "{1}" VMを選択する場合\n
java.launcher.opt.hotspot =\ {0}\t は"{1}" VMのシニムです [非推奨]\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer = \ -cp <ディレクトリおよびzip/jarファイルのクラス検索パス>\n -classpath <ディレクトリおよびzip/jarファイルのクラス検索パス>\n --class-path <ディレクトリおよびzip/jarファイルのクラス検索パス>\n {0}区切りリスト(ディレクトリ、JARアーカイブ、\n ZIPアーカイブ)で、クラス・ファイルの検索用。\n -p <module path>\n --module-path <module path>...\n 要素を{0}で区切ったリストで、各要素は次へのファイル・パスです:\n モジュール、またはモジュールが格納されているディレクトリ。各モジュールは次のいずれかです:\n モジュラJARまたは展開形式のモジュール・ディレクトリ。\n --upgrade-module-path <module path>...\n 要素を{0}で区切ったリストで、各要素は次へのファイル・パスです:\n モジュール、またはモジュールが格納されているディレクトリで、次のものを置き換えます:\n ランタイム・イメージのアップグレード可能なモジュール。各モジュールは次のいずれかです:\n モジュラJARまたは展開形式のモジュール・ディレクトリ。\n --add-modules <module name>[,<module name>...]\n 初期モジュールに加えて解決するルート・モジュール。\n <module name>には次も指定できます: ALL-DEFAULT、ALL-SYSTEM、\n ALL-MODULE-PATH.\n --enable-native-access <module name>[,<module name>...]\n モジュール内のコードをJavaランタイムの外のコードおよびデータにアクセスさせることができます。\n <module name>は、クラス・パス上のコードを指定するためにALL-UNNAMEDにもできます。\n --list-modules\n 参照可能なモジュールをリストし終了します\n -d <module name>\n --describe-module <module name>\n モジュールを説明し終了します\n --dry-run VMを作成しメイン・クラスをロードしますが、メイン・メソッドは実行しません。\n \
--dry-runオプションは、次の検証に役立つ場合があります:\n モジュール・システム構成などのコマンド行オプション。\n --validate-modules\n すべてのモジュールを検証し終了します\n --validate-modulesオプションは、次の検索に役立つ場合があります:\n モジュール・パス上のモジュールでの競合およびその他のエラー。\n -D<name>=<value>\n システム・プロパティを設定します\n -verbose:[class|module|gc|jni]\n 特定のサブシステムで詳細出力を有効にする\n -version 製品バージョンをエラー・ストリームに出力して終了します\n --version 製品バージョンを出力ストリームに出力して終了します\n -showversion 製品バージョンをエラー・ストリームに出力して続行します\n --show-version\n 製品バージョンを出力ストリームに出力して続行します\n --show-module-resolution\n 起動時にモジュール解決出力を表示します\n -? -h -help\n このヘルプ・メッセージをエラー・ストリームに出力します\n --help このヘルプ・メッセージを出力ストリームに出力します\n -X 追加オプションのヘルプをエラー・ストリームに出力します\n --help-extra 追加オプションのヘルプを出力ストリームに出力します\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n 指定した粒度でアサーションを有効にします\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n 指定した粒度でアサーションを無効にします\n -esa | -enablesystemassertions\n システム・アサーションを有効にします\n -dsa | -disablesystemassertions\n システム・アサーションを無効にします\n -agentlib:<libname>[=<options>]\n ネイティブ・エージェント・ライブラリ<libname>をロードします。例: -agentlib:jdwp\n -agentlib:jdwp=helpも参照してください\n -agentpath:<pathname>[=<options>]\n \
フルパス名を使用して、ネイティブ・エージェント・ライブラリをロードします\n -javaagent:<jarpath>[=<options>]\n Javaプログラミング言語エージェントをロードします。java.lang.instrumentを参照してください\n -splash:<imagepath>\n 指定されたイメージを含むスプラッシュ画面を表示します\n HiDPIスケールのイメージが自動的にサポートされて使用されます\n (可能な場合)。スケーリングされないイメージのファイル名(image.extなど)を\n 引数として-splashオプションに必ず渡す必要があります。\n 指定された最も適切なスケーリング済イメージが選択されます\n (自動的)。\n 詳細は、SplashScreen APIのドキュメントを参照してください\n @argumentファイル\n オプションを含む1つ以上の引数ファイル\n --disable-@files\n さらなる引数ファイル拡張を無効にします\n --enable-preview\n クラスをこのリリースのプレビュー機能に依存させることができます\n長いオプションの引数を指定する場合、--<name>=<value>または\n--<name> <value>を使用できます。\n
java.launcher.opt.footer = \ -cp <ディレクトリおよびzip/jarファイルのクラス検索パス>\n -classpath <ディレクトリおよびzip/jarファイルのクラス検索パス>\n --class-path <ディレクトリおよびzip/jarファイルのクラス検索パス>\n "{0}"区切りリスト(ディレクトリ、JARアーカイブ、\n ZIPアーカイブ)で、クラス・ファイルの検索用。\n -p <module path>\n --module-path <module path>...\n 要素を"{0}"で区切ったリストで、各要素は次へのファイル・パスです:\n モジュール、またはモジュールが格納されているディレクトリ。各モジュールは次のいずれかです:\n モジュラJARまたは展開形式のモジュール・ディレクトリ。\n --upgrade-module-path <module path>...\n 要素を"{0}"で区切ったリストで、各要素は次へのファイル・パスです:\n モジュール、またはモジュールが格納されているディレクトリで、次のものを置き換えます:\n ランタイム・イメージのアップグレード可能なモジュール。各モジュールは次のいずれかです:\n モジュラJARまたは展開形式のモジュール・ディレクトリ。\n --add-modules <module name>[,<module name>...]\n 初期モジュールに加えて解決するルート・モジュール。\n <module name>には次も指定できます: ALL-DEFAULT、ALL-SYSTEM、\n ALL-MODULE-PATH.\n --enable-native-access <module name>[,<module name>...]\n モジュール内のコードをJavaランタイムの外のコードおよびデータにアクセスさせることができます。\n <module name>は、クラス・パス上のコードを指定するためにALL-UNNAMEDにもできます。\n --illegal-native-access=<value>\n Javaランタイムの外のコードおよびデータへのアクセスを許可または拒否します\n (ネイティブ・アクセスが明示的に有効化されていないモジュール内のコードによる)。\n \
<value>は、"deny"、"warn"または"allow"のいずれかです。デフォルト値は"warn"です。\n このオプションは、将来のリリースで削除される予定です。\n --list-modules\n 参照可能なモジュールをリストし終了します\n -d <module name>\n --describe-module <module name>\n モジュールを説明し終了します\n --dry-run VMを作成しメイン・クラスをロードしますが、メイン・メソッドは実行しません。\n --dry-runオプションは、次の検証に役立つ場合があります:\n モジュール・システム構成などのコマンド行オプション。\n --validate-modules\n すべてのモジュールを検証し終了します\n --validate-modulesオプションは、次の検索に役立つ場合があります:\n モジュール・パス上のモジュールでの競合およびその他のエラー。\n -D<name>=<value>\n システム・プロパティを設定します\n -verbose:[class|module|gc|jni]\n 特定のサブシステムで詳細出力を有効にする\n -version 製品バージョンをエラー・ストリームに出力して終了します\n --version 製品バージョンを出力ストリームに出力して終了します\n -showversion 製品バージョンをエラー・ストリームに出力して続行します\n --show-version\n 製品バージョンを出力ストリームに出力して続行します\n --show-module-resolution\n 起動時にモジュール解決出力を表示します\n -? -h -help\n このヘルプ・メッセージをエラー・ストリームに出力します\n --help このヘルプ・メッセージを出力ストリームに出力します\n -X 追加オプションのヘルプをエラー・ストリームに出力します\n --help-extra 追加オプションのヘルプを出力ストリームに出力します\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n 指定した粒度でアサーションを有効にします\n -da[:<packagename>...|:<classname>]\n \
-disableassertions[:<packagename>...|:<classname>]\n 指定した粒度でアサーションを無効にします\n -esa | -enablesystemassertions\n システム・アサーションを有効にします\n -dsa | -disablesystemassertions\n システム・アサーションを無効にします\n -agentlib:<libname>[=<options>]\n ネイティブ・エージェント・ライブラリ<libname>をロードします。例: -agentlib:jdwp\n -agentlib:jdwp=helpも参照してください\n -agentpath:<pathname>[=<options>]\n フルパス名を使用して、ネイティブ・エージェント・ライブラリをロードします\n -javaagent:<jarpath>[=<options>]\n Javaプログラミング言語エージェントをロードします。java.lang.instrumentを参照してください\n -splash:<imagepath>\n 指定されたイメージを含むスプラッシュ画面を表示します\n HiDPIスケールのイメージが自動的にサポートされて使用されます\n (可能な場合)。スケーリングされないイメージのファイル名(image.extなど)を\n 引数として-splashオプションに必ず渡す必要があります。\n 指定された最も適切なスケーリング済イメージが選択されます\n (自動的)。\n 詳細は、SplashScreen APIのドキュメントを参照してください\n @argumentファイル\n オプションを含む1つ以上の引数ファイル\n --disable-@files\n さらなる引数ファイル拡張を無効にします\n --enable-preview\n クラスをこのリリースのプレビュー機能に依存させることができます\n長いオプションの引数を指定する場合、--<name>=<value>または\n--<name> <value>を使用できます。\n
# Translators please note do not translate the options themselves
java.launcher.X.usage=\n -Xbatch バックグラウンド・コンパイルを無効にします\n -Xbootclasspath/a:<directories and zip/jar files separated by {0}>\n ブートストラップ・クラス・パスの最後に追加します\n -Xcheck:jni JNI関数に対する追加のチェックを実行します\n -Xcomp 初回呼出し時にメソッドのコンパイルを強制します\n -Xdebug 何も実行されません。将来のリリースで削除されるため、非推奨になりました。\n -Xdiag 追加の診断メッセージを表示します\n -Xfuture 将来のデフォルトを見越して、最も厳密なチェックを有効にします\n このオプションは非推奨であり、将来のリリースで削除される\n 可能性があります。\n -Xint インタプリタ・モードの実行のみ\n -Xinternalversion\n -versionオプションより詳細なJVMバージョン情報を\n 表示します\n -Xlog:<opts> Java Virtual Machine (JVM)統合ロギング・フレームワークでの\n ロギングを構成または有効化します。詳細は、-Xlog:helpを\n 使用してください。\n -Xloggc:<file> タイムスタンプが付いたファイルにGCステータスのログを記録します\n このオプションは非推奨であり、将来のリリースで削除される\n 可能性があります。-Xlog:gc:<file>で置換されています。\n -Xmixed 混合モードの実行(デフォルト)\n -Xmn<size> 若い世代(ナーサリ)のヒープの初期サイズおよび最大サイズ\n (バイト単位)を設定します\n -Xms<size> Javaの初期ヒープ・サイズを設定します\n -Xmx<size> Javaの最大ヒープ・サイズを設定します\n -Xnoclassgc クラスのガベージ・コレクションを無効にします\n -Xrs Java/VMによるOSシグナルの使用を削減します(ドキュメントを参照)\n -Xshare:auto 可能であれば共有クラス・データを使用します(デフォルト)\n -Xshare:off \
共有クラス・データの使用を試みません\n -Xshare:on 共有クラス・データの使用を必須にし、できなければ失敗します。\n これはテスト・オプションであり、断続的な失敗につながる\n 可能性があります。本番環境では使用しないでください。\n -XshowSettings すべての設定を表示して続行します\n -XshowSettings:all\n すべての設定を詳細に表示して続行します\n -XshowSettings:locale\n すべてのロケール関連の設定を表示して続行します\n -XshowSettings:properties\n すべてのプロパティ設定を表示して続行します\n -XshowSettings:vm\n すべてのVM関連の設定を表示して続行します\n -XshowSettings:security\n すべてのセキュリティ設定を表示して続行します\n -XshowSettings:security:all\n すべてのセキュリティ設定を表示して続行します\n -XshowSettings:security:properties\n セキュリティ・プロパティを表示して続行します\n -XshowSettings:security:providers\n 静的セキュリティ・プロバイダ設定を表示して続行します\n -XshowSettings:security:tls\n TLS関連のセキュリティ設定を表示して続行します\n -XshowSettings:system\n (Linuxのみ)ホスト・システムまたはコンテナを表示します\n 構成して続行します\n -Xss<size> javaスレッドのスタック・サイズを設定します\n 実際のサイズは、次の倍数に切り上げられる場合があります: \n オペレーティング・システムの要件に応じたシステム・ページ・サイズ。\n -Xverify バイトコード・ベリファイアのモードを設定します\n オプション-Xverify:noneは非推奨になり、\n 将来のリリースで削除される可能性があります。\n --add-reads <module>=<target-module>(,<target-module>)*\n モジュール宣言に関係なく、<module>を更新して<target-module>を\n \
読み取ります。 \n <target-module>をALL-UNNAMEDに設定すると、すべての名前のないモジュールを\n 読み取ることができます。\n --add-exports <module>/<package>=<target-module>(,<target-module>)*\n モジュール宣言に関係なく、<module>を更新して<package>を<target-module>に\n エクスポートします。\n <target-module>をALL-UNNAMEDに設定すると、すべての名前のないモジュールに\n エクスポートできます。\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n モジュール宣言に関係なく、<module>を更新して<package>を\n <target-module>に開きます。\n --limit-modules <module name>[,<module name>...]\n 参照可能なモジュールの領域を制限します\n --patch-module <module>=<file>({0}<file>)*\n JARファイルまたはディレクトリのクラスおよびリソースで\n モジュールをオーバーライドまたは拡張します。\n --source <version>\n ソースファイル・モードでソースのバージョンを設定します。\n --finalization=<value>\n JVMがオブジェクトのファイナライズを実行するかどうかを制御します\n <value>は"enabled"または"disabled"のいずれかです。\n ファイナライズはデフォルトで有効になっています。\n --sun-misc-unsafe-memory-access=<value>\n サポートされていないAPI sun.misc.Unsafeの使用を許可または拒否します\n <value>は"allow"、"warn"、"debug"または"deny"のいずれかです。\n デフォルト値は、"allow"です。\n\nこの追加オプションは予告なしに変更されることがあります。\n
java.launcher.X.usage=\n -Xbatch バックグラウンド・コンパイルを無効にします\n -Xbootclasspath/a:<directories and zip/jar files separated by {0}>\n ブートストラップ・クラス・パスの最後に追加します\n -Xcheck:jni JNI関数に対する追加のチェックを実行します\n -Xcomp 初回呼出し時にメソッドのコンパイルを強制します\n -Xdebug 何も実行されません。将来のリリースで削除されるため、非推奨になりました。\n -Xdiag 追加の診断メッセージを表示します\n -Xint インタプリタ・モードの実行のみ\n -Xinternalversion\n -versionオプションより詳細なJVMバージョン情報を\n 表示します\n -Xlog:<opts> Java Virtual Machine (JVM)統合ロギング・フレームワークでの\n ロギングを構成または有効化します。詳細は、-Xlog:helpを\n 使用してください。\n -Xloggc:<file> タイムスタンプが付いたファイルにGCステータスのログを記録します\n このオプションは非推奨であり、将来のリリースで削除される\n 可能性があります。-Xlog:gc:<file>で置換されています。\n -Xmixed 混合モードの実行(デフォルト)\n -Xmn<size> 若い世代(ナーサリ)のヒープの初期サイズおよび最大サイズ\n (バイト単位)を設定します\n -Xms<size> Javaの初期ヒープ・サイズを設定します\n -Xmx<size> Javaの最大ヒープ・サイズを設定します\n -Xnoclassgc クラスのガベージ・コレクションを無効にします\n -Xrs Java/VMによるOSシグナルの使用を削減します(ドキュメントを参照)\n -Xshare:auto 可能であれば共有クラス・データを使用します(デフォルト)\n -Xshare:off 共有クラス・データの使用を試みません\n -Xshare:on 共有クラス・データの使用を必須にし、できなければ失敗します。\n \
これはテスト・オプションであり、断続的な失敗につながる\n 可能性があります。本番環境では使用しないでください。\n -XshowSettings すべての設定を表示して続行します\n -XshowSettings:all\n すべての設定を詳細に表示して続行します\n -XshowSettings:locale\n すべてのロケール関連の設定を表示して続行します\n -XshowSettings:properties\n すべてのプロパティ設定を表示して続行します\n -XshowSettings:vm\n すべてのVM関連の設定を表示して続行します\n -XshowSettings:security\n すべてのセキュリティ設定を表示して続行します\n -XshowSettings:security:all\n すべてのセキュリティ設定を表示して続行します\n -XshowSettings:security:properties\n セキュリティ・プロパティを表示して続行します\n -XshowSettings:security:providers\n 静的セキュリティ・プロバイダ設定を表示して続行します\n -XshowSettings:security:tls\n TLS関連のセキュリティ設定を表示して続行します\n -XshowSettings:system\n (Linuxのみ)ホスト・システムまたはコンテナを表示します\n 構成して続行します\n -Xss<size> javaスレッドのスタック・サイズを設定します\n 実際のサイズは、次の倍数に切り上げられる場合があります: \n オペレーティング・システムの要件に応じたシステム・ページ・サイズ。\n -Xverify バイトコード・ベリファイアのモードを設定します\n オプション-Xverify:noneは非推奨になり、\n 将来のリリースで削除される可能性があります。\n --add-reads <module>=<target-module>(,<target-module>)*\n モジュール宣言に関係なく、<module>を更新して<target-module>を\n 読み取ります。 \n <target-module>をALL-UNNAMEDに設定すると、すべての名前のないモジュールを\n 読み取ることができます。\n --add-exports \
<module>/<package>=<target-module>(,<target-module>)*\n モジュール宣言に関係なく、<module>を更新して<package>を<target-module>に\n エクスポートします。\n <target-module>をALL-UNNAMEDに設定すると、すべての名前のないモジュールに\n エクスポートできます。\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n モジュール宣言に関係なく、<module>を更新して<package>を\n <target-module>に開きます。\n --limit-modules <module name>[,<module name>...]\n 参照可能なモジュールの領域を制限します\n --patch-module <module>=<file>({0}<file>)*\n JARファイルまたはディレクトリのクラスおよびリソースで\n モジュールをオーバーライドまたは拡張します。\n --source <version>\n ソースファイル・モードでソースのバージョンを設定します。\n --finalization=<value>\n JVMがオブジェクトのファイナライズを実行するかどうかを制御します\n <value>は"enabled"または"disabled"のいずれかです。\n ファイナライズはデフォルトで有効になっています。\n --sun-misc-unsafe-memory-access=<value>\n サポートされていないAPI sun.misc.Unsafeの使用を許可または拒否します\n <value>は"allow"、"warn"、"debug"または"deny"のいずれかです。\n デフォルト値は"warn"です。\n\nこの追加オプションは予告なしに変更されることがあります。\n
# Translators please note do not translate the options themselves
java.launcher.X.macosx.usage=\n次のオプションはmacOS固有です:\n -XstartOnFirstThread\n main()メソッドを最初(AppKit)のスレッドで実行する\n -Xdock:name=<application name>\n Dockに表示されるデフォルト・アプリケーション名をオーバーライドする\n -Xdock:icon=<path to icon file>\n Dockに表示されるデフォルト・アイコンをオーバーライドする\n\n
# Translators please note do not translate the options themselves
java.launcher.opt.concise.header = 使用方法: java [java options...] <application> [application arguments...]\n\n<application>は次のいずれかです:\n <mainclass> コンパイルされたメイン・クラスのメイン・メソッドを実行します\n -jar <jarfile>.jar JARアーカイブのメイン・クラスを実行します\n -m <module>[/<mainclass>] モジュールのメイン・クラスを実行します\n <sourcefile>.java ソースファイル・プログラムをコンパイルおよび実行します\n\n主要なjavaオプションには次が含まれます:\n --class-path <class path>\n <class path>は、クラス・ファイルを検索するためのディレクトリおよびJARアーカイブのリストであり、"{0}"で区切られます\n --module-path <module path>\n <module path>は、モジュールを検索するためのディレクトリおよびJARアーカイブのリストであり、"{0}"で区切られます\n -version\n 製品バージョンをエラー・ストリームに出力し終了します\n\n使用方法についての追加のヘルプの場合: java --help\n対話型のJava環境の場合: jshell
java.launcher.bad.option=\n認識されないshowSettingsオプション: {0}\n有効な値は"all"、"locale"、"properties"、"security"、"system"(Linuxのみ)、"vm"\n有効な"security"サブオプションの値は"all"、"properties"、"providers"、"tls"\n"java -X"を参照してください\n
java.launcher.cls.error1=エラー: メイン・クラス{0}を検出およびロードできませんでした\n原因: {1}: {2}
java.launcher.cls.error2=エラー: メイン・メソッドがクラス{0}で見つかりません。次のようにメイン・メソッドを定義してください。\n public static void main(String[] args)\nまたはJavaFXアプリケーション・クラスは{1}を拡張する必要があります

View File

@@ -24,22 +24,25 @@
#
# Translators please note do not translate the options themselves
java.launcher.opt.header = 用法:{0} [options] <mainclass> [args...]\n (执行类)\n 或 {0} [options] -jar <jarfile> [args...]\n (执行 jar 文件)\n 或 {0} [options] -m <module>[/<mainclass>] [args...]\n {0} [options] --module <module>[/<mainclass>] [args...]\n (执行模块中的主类)\n 或 {0} [options] <sourcefile> [args]\n (执行源文件程序)\n\n 将主类、源文件、-jar <jarfile>、-m 或\n --module <module>/<mainclass> 后的参数作为参数\n 传递到主类。\n\n 其中,选项包括:\n\n
java.launcher.opt.header = 用法:{0} [options] <mainclass> [args...]\n (执行类)\n 或 {0} [options] -jar <jarfile>.jar [args...]\n (执行 jar 文件)\n 或 {0} [options] -m <module>[/<mainclass>] [args...]\n {0} [options] --module <module>[/<mainclass>] [args...]\n (执行模块中的主类)\n 或 {0} [options] <sourcefile>.java [args]\n (执行源文件程序)\n\n 将主类、源文件、-jar <jarfile>.jar、-m 或\n --module <module>/<mainclass> 后的参数作为参数\n 传递到主类。\n\n 其中,选项包括:\n\n
java.launcher.opt.vmselect =\ {0}\t 选择 "{1}" VM\n
java.launcher.opt.hotspot =\ {0}\t 是 "{1}" VM 的同义词 [已过时]\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer = \ -cp <目录和 zip/jar 文件的类搜索路径>\n -classpath <目录和 zip/jar 文件的类搜索路径>\n --class-path <目录和 zip/jar 文件的类搜索路径>\n 使用 {0} 分隔的, 用于搜索类文件的目录, JAR 档案\n 和 ZIP 档案列表。\n -p <模块路径>\n --module-path <模块路径>...\n {0} 分隔的元素列表,每个元素都是\n 模块或包含模块的目录的文件路径。每个模块都是\n 模块化 JAR 或展开的模块目录。\n --upgrade-module-path <模块路径>...\n {0} 分隔的元素列表,每个元素都是\n 模块或包含模块(用于替换运行时映像中的\n 可升级模块)的目录的文件路径。每个模块都是\n 模块化 JAR 或展开的模块目录。\n --add-modules <模块名称>[,<模块名称>...]\n 除了初始模块之外要解析的根模块。\n <模块名称> 还可以为 ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --enable-native-access <module name>[,<module name>...]\n 允许模块中的代码访问 Java 运行时之外的代码和数据。\n <module name> 也可以是 ALL-UNNAMED以指示类路径上的代码。\n --list-modules\n 列出可观察模块并退出\n -d <module name>\n --describe-module <模块名称>\n 描述模块并退出\n --dry-run 创建 VM 并加载主类, 但不执行 main 方法。\n 此 --dry-run 选项对于验证诸如\n 模块系统配置这样的命令行选项可能非常有用。\n --validate-modules\n 验证所有模块并退出\n --validate-modules 选项对于查找\n 模块路径中模块的冲突及其他错误可能非常有用。\n -D<名称>=<值>\n 设置系统属性\n -verbose:[class|module|gc|jni]\n 为给定子系统启用详细输出\n -version 将产品版本输出到错误流并退出\n --version 将产品版本输出到输出流并退出\n -showversion 将产品版本输出到错误流并继续\n --show-version\n 将产品版本输出到输出流并继续\n --show-module-resolution\n 在启动过程中显示模块解析输出\n -? -h -help\n 将此帮助消息输出到错误流\n --help \
将此帮助消息输出到输出流\n -X 将额外选项的帮助输出到错误流\n --help-extra 将额外选项的帮助输出到输出流\n -ea[:<程序包名称>...|:<类名>]\n -enableassertions[:<程序包名称>...|:<类名>]\n 按指定的粒度启用断言\n -da[:<程序包名称>...|:<类名>]\n -disableassertions[:<程序包名称>...|:<类名>]\n 按指定的粒度禁用断言\n -esa | -enablesystemassertions\n 启用系统断言\n -dsa | -disablesystemassertions\n 禁用系统断言\n -agentlib:<库名>[=<选项>]\n 加载本机代理库 <库名>, 例如 -agentlib:jdwp\n 另请参阅 -agentlib:jdwp=help\n -agentpath:<路径名>[=<选项>]\n 按完整路径名加载本机代理库\n -javaagent:<jar 路径>[=<选项>]\n 加载 Java 编程语言代理, 请参阅 java.lang.instrument\n -splash:<图像路径>\n 使用指定的图像显示启动屏幕\n 自动支持和使用 HiDPI 缩放图像\n (如果可用)。应始终将未缩放的图像文件名 (例如, image.ext)\n 作为参数传递给 -splash 选项。\n 将自动选取提供的最合适的缩放\n 图像。\n 有关详细信息, 请参阅 SplashScreen API 文档\n @argument 文件\n 一个或多个包含选项的参数文件\n --disable-@files\n 阻止进一步扩展参数文件\n --enable-preview\n 允许类依赖于此发行版的预览功能\n要为长选项指定参数, 可以使用 --<名称>=<值> 或\n--<名称> <值>。\n
java.launcher.opt.footer = \ -cp <目录和 zip/jar 文件的类搜索路径>\n -classpath <目录和 zip/jar 文件的类搜索路径>\n --class-path <目录和 zip/jar 文件的类搜索路径>\n 以 "{0}" 分隔的用于搜索类文件的目录JAR 档案\n 和 ZIP 档案列表。\n -p <模块路径>\n --module-path <模块路径>...\n 以 "{0}" 分隔的元素列表,每个元素都是\n 模块或包含模块的目录的文件路径。每个模块都是\n 模块化 JAR 或展开的模块目录。\n --upgrade-module-path <模块路径>...\n 以 "{0}" 分隔的元素列表,每个元素都是\n 模块或包含模块(用于替换运行时映像中的\n 可升级模块)的目录的文件路径。每个模块都是\n 模块化 JAR 或展开的模块目录。\n --add-modules <模块名称>[,<模块名称>...]\n 除了初始模块之外要解析的根模块。\n <模块名称> 还可以为 ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --enable-native-access <module name>[,<module name>...]\n 允许模块中的代码访问 Java 运行时之外的代码和数据。\n <module name> 也可以是 ALL-UNNAMED以指示类路径上的代码。\n --illegal-native-access=<value>\n 允许或拒绝模块中没有明确为其启用本机访问的\n 代码访问 Java 运行时之外的代码和数据。\n <value> 为 "deny"、"warn" 或 "allow" 之一。默认值为 "warn"。\n 此选项将在未来发行版中删除。\n --list-modules\n 列出可观察模块并退出\n -d <module name>\n --describe-module <模块名称>\n 描述模块并退出\n --dry-run 创建 VM 并加载主类, 但不执行 main 方法。\n 此 --dry-run 选项对于验证诸如\n 模块系统配置这样的命令行选项可能非常有用。\n --validate-modules\n 验证所有模块并退出\n --validate-modules 选项对于查找\n 模块路径中模块的冲突及其他错误可能非常有用。\n -D<名称>=<值>\n 设置系统属性\n -verbose:[class|module|gc|jni]\n 为给定子系统启用详细输出\n -version 将产品版本输出到错误流并退出\n --version \
产品版本输出到输出流并退出\n -showversion 将产品版本输出到错误流并继续\n --show-version\n 将产品版本输出到输出流并继续\n --show-module-resolution\n 在启动过程中显示模块解析输出\n -? -h -help\n 将此帮助消息输出到错误流\n --help 将此帮助消息输出到输出流\n -X 将额外选项的帮助输出到错误流\n --help-extra 将额外选项的帮助输出到输出流\n -ea[:<程序包名称>...|:<类名>]\n -enableassertions[:<程序包名称>...|:<类名>]\n 按指定的粒度启用断言\n -da[:<程序包名称>...|:<类名>]\n -disableassertions[:<程序包名称>...|:<类名>]\n 按指定的粒度禁用断言\n -esa | -enablesystemassertions\n 启用系统断言\n -dsa | -disablesystemassertions\n 禁用系统断言\n -agentlib:<库名>[=<选项>]\n 加载本机代理库 <库名>, 例如 -agentlib:jdwp\n 另请参阅 -agentlib:jdwp=help\n -agentpath:<路径名>[=<选项>]\n 按完整路径名加载本机代理库\n -javaagent:<jar 路径>[=<选项>]\n 加载 Java 编程语言代理, 请参阅 java.lang.instrument\n -splash:<图像路径>\n 使用指定的图像显示启动屏幕\n 自动支持和使用 HiDPI 缩放图像\n (如果可用)。应始终将未缩放的图像文件名 (例如, image.ext)\n 作为参数传递给 -splash 选项。\n 将自动选取提供的最合适的缩放\n 图像。\n 有关详细信息, 请参阅 SplashScreen API 文档\n @argument 文件\n 一个或多个包含选项的参数文件\n --disable-@files\n 阻止进一步扩展参数文件\n --enable-preview\n 允许类依赖于此发行版的预览功能\n要为长选项指定参数, 可以使用 --<名称>=<值> 或\n--<名称> <值>。\n
# Translators please note do not translate the options themselves
java.launcher.X.usage=\n -Xbatch 禁用后台编译\n -Xbootclasspath/a:<以 {0} 分隔的目录和 zip/jar 文件>\n 附加在引导类路径末尾\n -Xcheck:jni 对 JNI 函数执行其他检查\n -Xcomp 强制在首次调用时编译方法\n -Xdebug 不执行任何操作;已过时,将在未来发行版中删除。\n -Xdiag 显示附加诊断消息\n -Xfuture 启用最严格的检查,预期将来的默认值。\n 此选项已过时,可能会在\n 未来发行版中删除。\n -Xint 仅解释模式执行\n -Xinternalversion\n 显示比 -version 选项更详细的\n JVM 版本信息\n -Xlog:<opts> 配置或启用采用 Java 虚拟\n 机 (Java Virtual Machine, JVM) 统一记录框架进行事件记录。使用 -Xlog:help\n 可了解详细信息。\n -Xloggc:<file> 将 GC 状态记录在文件中(带时间戳)。\n 此选项已过时,可能会在\n 将来的发行版中删除。它将替换为 -Xlog:gc:<file>。\n -Xmixed 混合模式执行(默认值)\n -Xmn<size> 为年轻代(新生代)设置初始和最大堆大小\n (以字节为单位)\n -Xms<size> 设置初始 Java 堆大小\n -Xmx<size> 设置最大 Java 堆大小\n -Xnoclassgc 禁用类垃圾收集\n -Xrs 减少 Java/VM 对操作系统信号的使用(请参见文档)\n -Xshare:auto 在可能的情况下使用共享类数据(默认值)\n -Xshare:off 不尝试使用共享类数据\n -Xshare:on 要求使用共享类数据,否则将失败。\n 这是一个测试选项,可能导致间歇性\n 故障。不应在生产环境中使用它。\n -XshowSettings 显示所有设置并继续\n -XshowSettings:all\n 详细显示所有设置并继续\n -XshowSettings:locale\n 显示所有与区域设置相关的设置并继续\n -XshowSettings:properties\n 显示所有属性设置并继续\n -XshowSettings:vm\n 显示所有与 vm 相关的设置并继续\n -XshowSettings:security\n 显示所有安全设置并继续\n -XshowSettings:security:all\n 显示所有安全设置并继续\n -XshowSettings:security:properties\n \
显示安全属性并继续\n -XshowSettings:security:providers\n 显示静态安全提供方设置并继续\n -XshowSettings:security:tls\n 显示与 TLS 相关的安全设置并继续\n -XshowSettings:system\n (仅 Linux显示主机系统或容器\n 配置并继续\n -Xss<size> 设置 Java 线程堆栈大小\n 实际大小可以舍入到\n 操作系统要求的系统页面大小的倍数。\n -Xverify 设置字节码验证器的模式\n 请注意,选项 -Xverify:none 已过时,\n 可能会在未来发行版中删除。\n --add-reads <module>=<target-module>(,<target-module>)*\n 更新 <module> 以读取 <target-module>,而无论\n 模块如何声明。 \n <target-module> 可以是 ALL-UNNAMED将读取所有未命名\n 模块。\n --add-exports <module>/<package>=<target-module>(,<target-module>)*\n 更新 <module> 以将 <package> 导出到 <target-module>\n 而无论模块如何声明。\n <target-module> 可以是 ALL-UNNAMED将导出到所有\n 未命名模块。\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n 更新 <module> 以在 <target-module> 中打开\n <package>,而无论模块如何声明。\n --limit-modules <module name>[,<module name>...]\n 限制可观察模块的领域\n --patch-module <module>=<file>({0}<file>)*\n 使用 JAR 文件或目录中的类和资源\n 覆盖或增强模块。\n --source <version>\n 设置源文件模式中源的版本。\n --finalization=<value>\n 控制 JVM 是否执行对象最终处理,\n 其中 <value> 为 "enabled" 或 "disabled" 之一。\n 默认情况下,最终处理处于启用状态。\n --sun-misc-unsafe-memory-access=<value>\n 允许或拒绝使用不受支持的 API sun.misc.Unsafe\n <value> 为 "allow"、"warn"、"debug" 或 "deny" 之一。\n 默认值为 "allow"。\n\n这些额外选项如有更改, 恕不另行通知。\n
java.launcher.X.usage=\n -Xbatch 禁用后台编译\n -Xbootclasspath/a:<以 {0} 分隔的目录和 zip/jar 文件>\n 附加在引导类路径末尾\n -Xcheck:jni 对 JNI 函数执行其他检查\n -Xcomp 强制在首次调用时编译方法\n -Xdebug 不执行任何操作;已过时,将在未来发行版中删除。\n -Xdiag 显示附加诊断消息\n -Xint 仅解释模式执行\n -Xinternalversion\n 显示比 -version 选项更详细的\n JVM 版本信息\n -Xlog:<opts> 配置或启用采用 Java 虚拟\n 机 (Java Virtual Machine, JVM) 统一记录框架进行事件记录。使用 -Xlog:help\n 可了解详细信息。\n -Xloggc:<file> 将 GC 状态记录在文件中(带时间戳)。\n 此选项已过时,可能会在\n 将来的发行版中删除。它将替换为 -Xlog:gc:<file>。\n -Xmixed 混合模式执行(默认值)\n -Xmn<size> 为年轻代(新生代)设置初始和最大堆大小\n (以字节为单位)\n -Xms<size> 设置初始 Java 堆大小\n -Xmx<size> 设置最大 Java 堆大小\n -Xnoclassgc 禁用类垃圾收集\n -Xrs 减少 Java/VM 对操作系统信号的使用(请参见文档)\n -Xshare:auto 在可能的情况下使用共享类数据(默认值)\n -Xshare:off 不尝试使用共享类数据\n -Xshare:on 要求使用共享类数据,否则将失败。\n 这是一个测试选项,可能导致间歇性\n 故障。不应在生产环境中使用它。\n -XshowSettings 显示所有设置并继续\n -XshowSettings:all\n 详细显示所有设置并继续\n -XshowSettings:locale\n 显示所有与区域设置相关的设置并继续\n -XshowSettings:properties\n 显示所有属性设置并继续\n -XshowSettings:vm\n 显示所有与 vm 相关的设置并继续\n -XshowSettings:security\n 显示所有安全设置并继续\n -XshowSettings:security:all\n 显示所有安全设置并继续\n -XshowSettings:security:properties\n 显示安全属性并继续\n -XshowSettings:security:providers\n 显示静态安全提供方设置并继续\n -XshowSettings:security:tls\n 显示与 TLS \
相关的安全设置并继续\n -XshowSettings:system\n (仅 Linux显示主机系统或容器\n 配置并继续\n -Xss<size> 设置 Java 线程堆栈大小\n 实际大小可以舍入到\n 操作系统要求的系统页面大小的倍数。\n -Xverify 设置字节码验证器的模式\n 请注意,选项 -Xverify:none 已过时,\n 可能会在未来发行版中删除。\n --add-reads <module>=<target-module>(,<target-module>)*\n 更新 <module> 以读取 <target-module>,而无论\n 模块如何声明。 \n <target-module> 可以是 ALL-UNNAMED将读取所有未命名\n 模块。\n --add-exports <module>/<package>=<target-module>(,<target-module>)*\n 更新 <module> 以将 <package> 导出到 <target-module>\n 而无论模块如何声明。\n <target-module> 可以是 ALL-UNNAMED将导出到所有\n 未命名模块。\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n 更新 <module> 以在 <target-module> 中打开\n <package>,而无论模块如何声明。\n --limit-modules <module name>[,<module name>...]\n 限制可观察模块的领域\n --patch-module <module>=<file>({0}<file>)*\n 使用 JAR 文件或目录中的类和资源\n 覆盖或增强模块。\n --source <version>\n 设置源文件模式中源的版本。\n --finalization=<value>\n 控制 JVM 是否执行对象最终处理,\n 其中 <value> 为 "enabled" 或 "disabled" 之一。\n 默认情况下,最终处理处于启用状态。\n --sun-misc-unsafe-memory-access=<value>\n 允许或拒绝使用不受支持的 API sun.misc.Unsafe\n <value> 为 "allow"、"warn"、"debug" 或 "deny" 之一。\n 默认值为 "warn"。\n\n这些额外选项如有更改, 恕不另行通知。\n
# Translators please note do not translate the options themselves
java.launcher.X.macosx.usage=\n以下选项是特定于 macOS 的选项:\n -XstartOnFirstThread\n 在第一个 (AppKit) 线程上运行 main() 方法\n -Xdock:name=<application name>\n 覆盖停靠栏中显示的默认应用程序名称\n -Xdock:icon=<path to icon file>\n 覆盖停靠栏中显示的默认图标\n\n
# Translators please note do not translate the options themselves
java.launcher.opt.concise.header = 用法java [java options...] <application> [application arguments...]\n\n其中<application> 为以下项之一:\n <mainclass> 执行编译的主类的 main 方法\n -jar <jarfile>.jar 执行 JAR 档案的主类\n -m <module>[/<mainclass>] 执行模块的主类\n <sourcefile>.java 编译和执行源文件程序\n\n其中主要的 java 选项包括:\n --class-path <class path>\n 其中,<class path> 是用于搜索类文件的目录和 JAR 档案列表(以 "{0}" 分隔)\n --module-path <module path>\n 其中,<module path> 是用于搜索模块的目录和 JAR 档案列表(以 "{0}" 分隔)\n -version\n 将产品版本输出到错误流并退出\n\n获取有关用法的其他帮助 java --help\n获取交互式 Java 环境: jshell
java.launcher.bad.option=\n无法识别的 showSettings 选项:{0}\n有效值为 "all"、"locale"、"properties"、"security"、"system"(仅 Linux、"vm"\n有效的 "security" 子选项值为 "all"、"properties"、"providers"、"tls"\n请参见 "java -X"\n
java.launcher.cls.error1=错误: 找不到或无法加载主类 {0}\n原因: {1}: {2}
java.launcher.cls.error2=错误: 在类 {0} 中找不到 main 方法, 请将 main 方法定义为:\n public static void main(String[] args)\n否则 JavaFX 应用程序类必须扩展{1}

View File

@@ -25,7 +25,6 @@
package sun.security.ssl;
import java.lang.invoke.MethodHandles;
import java.net.Socket;
import java.security.*;
import java.security.cert.*;
@@ -52,15 +51,6 @@ import sun.security.validator.*;
final class X509TrustManagerImpl extends X509ExtendedTrustManager
implements X509TrustManager {
static {
// eagerly initialize to avoid pinning virtual thread during TLS handshake
try {
MethodHandles.lookup().ensureInitialized(AnchorCertificates.class);
} catch (IllegalAccessException e) {
throw new ExceptionInInitializerError(e);
}
}
private final String validatorType;
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 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
@@ -59,8 +59,6 @@ public class Resources_de extends java.util.ListResourceBundle {
// javax.security.auth.Subject
{"NEWLINE", "\n"},
{"invalid.null.AccessControlContext.provided",
"Ung\u00FCltiger Nullwert f\u00FCr AccessControlContext angegeben"},
{"invalid.null.action.provided", "Ung\u00FCltige Nullaktion angegeben"},
{"invalid.null.Class.provided", "Ung\u00FCltige Nullklasse angegeben"},
{"Subject.", "Subjekt:\n"},
@@ -90,40 +88,9 @@ public class Resources_de extends java.util.ListResourceBundle {
{"Login.Failure.all.modules.ignored",
"Anmeldefehler: Alle Module werden ignoriert"},
// sun.security.provider.PolicyFile
{"java.security.policy.error.parsing.policy.message",
"java.security.policy: Fehler beim Parsen von {0}:\n\t{1}"},
{"java.security.policy.error.adding.Permission.perm.message",
"java.security.policy: Fehler beim Hinzuf\u00FCgen von Berechtigung, {0}:\n\t{1}"},
{"java.security.policy.error.adding.Entry.message",
"java.security.policy: Fehler beim Hinzuf\u00FCgen von Eintrag:\n\t{0}"},
{"alias.name.not.provided.pe.name.", "Aliasname nicht angegeben ({0})"},
{"unable.to.perform.substitution.on.alias.suffix",
"Substitution f\u00FCr Alias {0} kann nicht ausgef\u00FChrt werden"},
{"substitution.value.prefix.unsupported",
"Substitutionswert {0} nicht unterst\u00FCtzt"},
{"SPACE", " "},
{"LPARAM", "("},
{"RPARAM", ")"},
{"type.can.t.be.null","Typ kann nicht null sein"},
// sun.security.provider.PolicyParser
{"keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore",
"keystorePasswordURL kann nicht ohne Keystore angegeben werden"},
{"expected.keystore.type", "Keystore-Typ erwartet"},
{"expected.keystore.provider", "Keystore-Provider erwartet"},
{"multiple.Codebase.expressions",
"mehrere Codebase-Ausdr\u00FCcke"},
{"multiple.SignedBy.expressions","mehrere SignedBy-Ausdr\u00FCcke"},
{"duplicate.keystore.domain.name","Keystore-Domainname doppelt vorhanden: {0}"},
{"duplicate.keystore.name","Keystore-Name doppelt vorhanden: {0}"},
{"SignedBy.has.empty.alias","Leerer Alias in SignedBy"},
{"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
"Principal kann nicht mit einer Platzhalterklasse ohne Platzhalternamen angegeben werden"},
{"expected.codeBase.or.SignedBy.or.Principal",
"codeBase oder SignedBy oder Principal erwartet"},
{"expected.permission.entry", "Berechtigungseintrag erwartet"},
{"number.", "Nummer "},
{"expected.expect.read.end.of.file.",
"[{0}] erwartet, [Dateiende] gelesen"},
@@ -132,8 +99,6 @@ public class Resources_de extends java.util.ListResourceBundle {
{"line.number.msg", "Zeile {0}: {1}"},
{"line.number.expected.expect.found.actual.",
"Zeile {0}: [{1}] erwartet, [{2}] gefunden"},
{"null.principalClass.or.principalName",
"principalClass oder principalName null"},
// sun.security.pkcs11.SunPKCS11
{"PKCS11.Token.providerName.Password.",

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 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
@@ -59,8 +59,6 @@ public class Resources_ja extends java.util.ListResourceBundle {
// javax.security.auth.Subject
{"NEWLINE", "\n"},
{"invalid.null.AccessControlContext.provided",
"\u7121\u52B9\u306Anull AccessControlContext\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F"},
{"invalid.null.action.provided", "\u7121\u52B9\u306Anull\u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F"},
{"invalid.null.Class.provided", "\u7121\u52B9\u306Anull\u30AF\u30E9\u30B9\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F"},
{"Subject.", "\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8:\n"},
@@ -90,40 +88,9 @@ public class Resources_ja extends java.util.ListResourceBundle {
{"Login.Failure.all.modules.ignored",
"\u30ED\u30B0\u30A4\u30F3\u5931\u6557: \u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u306F\u7121\u8996\u3055\u308C\u307E\u3059"},
// sun.security.provider.PolicyFile
{"java.security.policy.error.parsing.policy.message",
"java.security.policy: {0}\u306E\u69CB\u6587\u89E3\u6790\u30A8\u30E9\u30FC:\n\t{1}"},
{"java.security.policy.error.adding.Permission.perm.message",
"java.security.policy: \u30A2\u30AF\u30BB\u30B9\u6A29{0}\u306E\u8FFD\u52A0\u30A8\u30E9\u30FC:\n\t{1}"},
{"java.security.policy.error.adding.Entry.message",
"java.security.policy: \u30A8\u30F3\u30C8\u30EA\u306E\u8FFD\u52A0\u30A8\u30E9\u30FC:\n\t{0}"},
{"alias.name.not.provided.pe.name.", "\u5225\u540D\u306E\u6307\u5B9A\u304C\u3042\u308A\u307E\u305B\u3093({0})"},
{"unable.to.perform.substitution.on.alias.suffix",
"\u5225\u540D{0}\u306B\u5BFE\u3057\u3066\u7F6E\u63DB\u64CD\u4F5C\u304C\u3067\u304D\u307E\u305B\u3093"},
{"substitution.value.prefix.unsupported",
"\u7F6E\u63DB\u5024{0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
{"SPACE", " "},
{"LPARAM", "("},
{"RPARAM", ")"},
{"type.can.t.be.null","\u5165\u529B\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
// sun.security.provider.PolicyParser
{"keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore",
"\u30AD\u30FC\u30B9\u30C8\u30A2\u3092\u6307\u5B9A\u3057\u306A\u3044\u5834\u5408\u3001keystorePasswordURL\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093"},
{"expected.keystore.type", "\u4E88\u60F3\u3055\u308C\u305F\u30AD\u30FC\u30B9\u30C8\u30A2\u30FB\u30BF\u30A4\u30D7"},
{"expected.keystore.provider", "\u4E88\u60F3\u3055\u308C\u305F\u30AD\u30FC\u30B9\u30C8\u30A2\u30FB\u30D7\u30ED\u30D0\u30A4\u30C0"},
{"multiple.Codebase.expressions",
"\u8907\u6570\u306ECodebase\u5F0F"},
{"multiple.SignedBy.expressions","\u8907\u6570\u306ESignedBy\u5F0F"},
{"duplicate.keystore.domain.name","\u91CD\u8907\u3059\u308B\u30AD\u30FC\u30B9\u30C8\u30A2\u30FB\u30C9\u30E1\u30A4\u30F3\u540D: {0}"},
{"duplicate.keystore.name","\u91CD\u8907\u3059\u308B\u30AD\u30FC\u30B9\u30C8\u30A2\u540D: {0}"},
{"SignedBy.has.empty.alias","SignedBy\u306F\u7A7A\u306E\u5225\u540D\u3092\u4FDD\u6301\u3057\u307E\u3059"},
{"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
"\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u540D\u306E\u306A\u3044\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u30FB\u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u3066\u3001\u30D7\u30EA\u30F3\u30B7\u30D1\u30EB\u3092\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
{"expected.codeBase.or.SignedBy.or.Principal",
"\u4E88\u60F3\u3055\u308C\u305FcodeBase\u3001SignedBy\u307E\u305F\u306FPrincipal"},
{"expected.permission.entry", "\u4E88\u60F3\u3055\u308C\u305F\u30A2\u30AF\u30BB\u30B9\u6A29\u30A8\u30F3\u30C8\u30EA"},
{"number.", "\u6570 "},
{"expected.expect.read.end.of.file.",
"[{0}]\u3067\u306F\u306A\u304F[\u30D5\u30A1\u30A4\u30EB\u306E\u7D42\u308F\u308A]\u304C\u8AAD\u307F\u8FBC\u307E\u308C\u307E\u3057\u305F"},
@@ -132,8 +99,6 @@ public class Resources_ja extends java.util.ListResourceBundle {
{"line.number.msg", "\u884C{0}: {1}"},
{"line.number.expected.expect.found.actual.",
"\u884C{0}: [{1}]\u3067\u306F\u306A\u304F[{2}]\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F"},
{"null.principalClass.or.principalName",
"null\u306EprincipalClass\u307E\u305F\u306FprincipalName"},
// sun.security.pkcs11.SunPKCS11
{"PKCS11.Token.providerName.Password.",

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 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
@@ -59,8 +59,6 @@ public class Resources_zh_CN extends java.util.ListResourceBundle {
// javax.security.auth.Subject
{"NEWLINE", "\n"},
{"invalid.null.AccessControlContext.provided",
"\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A AccessControlContext"},
{"invalid.null.action.provided", "\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A\u64CD\u4F5C"},
{"invalid.null.Class.provided", "\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A\u7C7B"},
{"Subject.", "\u4E3B\u4F53: \n"},
@@ -90,40 +88,9 @@ public class Resources_zh_CN extends java.util.ListResourceBundle {
{"Login.Failure.all.modules.ignored",
"\u767B\u5F55\u5931\u8D25: \u5FFD\u7565\u6240\u6709\u6A21\u5757"},
// sun.security.provider.PolicyFile
{"java.security.policy.error.parsing.policy.message",
"java.security.policy: \u89E3\u6790{0}\u65F6\u51FA\u9519:\n\t{1}"},
{"java.security.policy.error.adding.Permission.perm.message",
"java.security.policy: \u6DFB\u52A0\u6743\u9650{0}\u65F6\u51FA\u9519:\n\t{1}"},
{"java.security.policy.error.adding.Entry.message",
"java.security.policy: \u6DFB\u52A0\u6761\u76EE\u65F6\u51FA\u9519:\n\t{0}"},
{"alias.name.not.provided.pe.name.", "\u672A\u63D0\u4F9B\u522B\u540D ({0})"},
{"unable.to.perform.substitution.on.alias.suffix",
"\u65E0\u6CD5\u5728\u522B\u540D {0} \u4E0A\u6267\u884C\u66FF\u4EE3"},
{"substitution.value.prefix.unsupported",
"\u66FF\u4EE3\u503C{0}\u4E0D\u53D7\u652F\u6301"},
{"SPACE", " "},
{"LPARAM", "("},
{"RPARAM", ")"},
{"type.can.t.be.null","\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A\u503C"},
// sun.security.provider.PolicyParser
{"keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore",
"\u4E0D\u6307\u5B9A\u5BC6\u94A5\u5E93\u65F6\u65E0\u6CD5\u6307\u5B9A keystorePasswordURL"},
{"expected.keystore.type", "\u5E94\u4E3A\u5BC6\u94A5\u5E93\u7C7B\u578B"},
{"expected.keystore.provider", "\u5E94\u4E3A\u5BC6\u94A5\u5E93\u63D0\u4F9B\u65B9"},
{"multiple.Codebase.expressions",
"\u591A\u4E2A\u4EE3\u7801\u5E93\u8868\u8FBE\u5F0F"},
{"multiple.SignedBy.expressions","\u591A\u4E2A SignedBy \u8868\u8FBE\u5F0F"},
{"duplicate.keystore.domain.name","\u5BC6\u94A5\u5E93\u57DF\u540D\u91CD\u590D: {0}"},
{"duplicate.keystore.name","\u5BC6\u94A5\u5E93\u540D\u79F0\u91CD\u590D: {0}"},
{"SignedBy.has.empty.alias","SignedBy \u6709\u7A7A\u522B\u540D"},
{"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
"\u6CA1\u6709\u901A\u914D\u7B26\u540D\u79F0, \u65E0\u6CD5\u4F7F\u7528\u901A\u914D\u7B26\u7C7B\u6307\u5B9A\u4E3B\u7528\u6237"},
{"expected.codeBase.or.SignedBy.or.Principal",
"\u5E94\u4E3A codeBase, SignedBy \u6216\u4E3B\u7528\u6237"},
{"expected.permission.entry", "\u5E94\u4E3A\u6743\u9650\u6761\u76EE"},
{"number.", "\u7F16\u53F7 "},
{"expected.expect.read.end.of.file.",
"\u5E94\u4E3A [{0}], \u8BFB\u53D6\u7684\u662F [\u6587\u4EF6\u7ED3\u5C3E]"},
@@ -132,8 +99,6 @@ public class Resources_zh_CN extends java.util.ListResourceBundle {
{"line.number.msg", "\u5217{0}: {1}"},
{"line.number.expected.expect.found.actual.",
"\u884C\u53F7 {0}: \u5E94\u4E3A [{1}], \u627E\u5230 [{2}]"},
{"null.principalClass.or.principalName",
"principalClass \u6216 principalName \u4E3A\u7A7A\u503C"},
// sun.security.pkcs11.SunPKCS11
{"PKCS11.Token.providerName.Password.",

View File

@@ -5,7 +5,9 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
* 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

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 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
@@ -43,7 +43,7 @@ import javax.print.attribute.PrintRequestAttribute;
* <p>
* <b>IPP Compatibility:</b> This attribute is not an IPP 1.1 attribute; it is
* an attribute in the Production Printing Extension
* (<a href="ftp://ftp.pwg.org/pub/pwg/standards/temp_archive/pwg5100.3.pdf">
* (<a href="https://ftp.pwg.org/pub/pwg/standards/temp_archive/pwg5100.3.pdf">
* PDF</a>) of IPP 1.1. The category name returned by {@code getName()} is the
* IPP attribute name. The enumeration's integer value is the IPP enum value.
* The {@code toString()} method returns the IPP string representation of the

View File

@@ -23,8 +23,6 @@
* questions.
*/
import jdk.internal.javac.ParticipatesInPreview;
/**
* Defines the API of the Java SE Platform.
*
@@ -40,7 +38,6 @@ import jdk.internal.javac.ParticipatesInPreview;
* @moduleGraph
* @since 9
*/
@ParticipatesInPreview
module java.se {
requires transitive java.base;
requires transitive java.compiler;

View File

@@ -32,7 +32,7 @@ import java.security.*;
* A {@code SQLPermission} object contains
* a name (also referred to as a "target name") but no actions
* list; there is either a named permission or there is not.
* The target name is the name of the permission (see below). The
* The target name is the name of the permission. The
* naming convention follows the hierarchical property naming convention.
* In addition, an asterisk
* may appear at the end of the name, following a ".", or by itself, to

View File

@@ -315,8 +315,8 @@
# Implementation limits
EntityExpansionLimit=JAXP00010001: Der Parser hat mehr als {0} Entityerweiterungen in diesem Dokument gefunden. Dies ist der von JDK vorgeschriebene Grenzwert.
ElementAttributeLimit=JAXP00010002: Element "{0}" hat mehr als {1} Attribute. "{1}" ist der von JDK vorgeschriebene Grenzwert.
EntityExpansionLimit=JAXP00010001: Der Parser hat mehr als {0} Entityerweiterungen in diesem Dokument gefunden. Das ist der von "{1}" vorgeschriebene Grenzwert.
ElementAttributeLimit=JAXP00010002: Element "{0}" hat mehr als {1} Attribute. "{1}" ist der von "{2}" vorgeschriebene Grenzwert.
MaxEntitySizeLimit=JAXP00010003: Die Länge von Entity "{0}" ist "{1}" und überschreitet den Grenzwert "{2}", der von "{3}" festgelegt wurde.
TotalEntitySizeLimit=JAXP00010004: Die akkumulierte Größe von Entitys ist "{0}" und überschreitet den Grenzwert "{1}", der von "{2}" festgelegt wurde.
MaxXMLNameLimit=JAXP00010005: Die Länge von Entity "{0}" ist "{1}" und überschreitet den Grenzwert "{2}", der von "{3}" festgelegt wurde.

View File

@@ -315,8 +315,8 @@
# Implementation limits
EntityExpansionLimit=JAXP00010001: パーサーによって、このドキュメント内で"{0}"を超えるエンティティ拡張が検出されました。これは、JDKによる制限です。
ElementAttributeLimit=JAXP00010002: 要素"{0}"に"{1}"を超える属性が存在します。"{1}"は、JDKによる制限です。
EntityExpansionLimit=JAXP00010001: パーサーによって、このドキュメント内で"{0}"を超えるエンティティ拡張が検出されました。これは、"{1}"による制限です。
ElementAttributeLimit=JAXP00010002: 要素"{0}"に"{1}"を超える属性が存在します。"{1}"は、"{2}"で設定された制限です。
MaxEntitySizeLimit=JAXP00010003: エンティティ"{0}"の長さは"{1}"で、"{3}"で設定された制限"{2}"を超えています。
TotalEntitySizeLimit=JAXP00010004: エンティティの累積サイズ"{0}"は、"{2}"で設定された制限"{1}"を超えました。
MaxXMLNameLimit=JAXP00010005: エンティティ"{0}"の長さは"{1}"で、"{3}"で設定された制限"{2}"を超えています。

View File

@@ -315,8 +315,8 @@
# Implementation limits
EntityExpansionLimit=JAXP00010001: 解析器在此文档中遇到多个 "{0}" 实体扩展; 这是 JDK 施加的限制。
ElementAttributeLimit=JAXP00010002: 元素 "{0}" 具有多个 "{1}" 属性, "{1}" 是 JDK 施加的限制。
EntityExpansionLimit=JAXP00010001解析器在此文档中遇到多个 "{0}" 实体扩展这是 "{1}" 施加的限制。
ElementAttributeLimit=JAXP00010002元素 "{0}" 具有多个 "{1}" 属性"{1}" 是 "{2}" 设置的限制。
MaxEntitySizeLimit=JAXP00010003: 实体 "{0}" 的长度为 "{1}", 超过了 "{3}" 设置的 "{2}" 限制。
TotalEntitySizeLimit=JAXP00010004: 实体的累计大小为 "{0}", 超过了 "{2}" 设置的 "{1}" 限制。
MaxXMLNameLimit=JAXP00010005: 实体 "{0}" 的长度为 "{1}", 超过了 "{3}" 设置的 "{2}" 限制。

View File

@@ -76,7 +76,7 @@ public abstract class Directive implements ModuleElement.Directive {
@Override
public String toString() {
return String.format("ACC_%s (0x%04x", name(), value);
return String.format("ACC_%s (0x%04x)", name(), value);
}
}

View File

@@ -150,7 +150,9 @@ public class Preview {
// s participates in the preview API
return syms.java_base.exports.stream()
.filter(ed -> ed.packge.fullname == names.jdk_internal_javac)
.anyMatch(ed -> ed.modules.contains(m));
.anyMatch(ed -> ed.modules.contains(m)) ||
//the specification lists the java.se module as participating in preview:
m.name == names.java_se;
}
/**

View File

@@ -2587,10 +2587,6 @@ public class Attr extends JCTree.Visitor {
chk.checkRefType(qualifier.pos(),
attribExpr(qualifier, localEnv,
encl));
} else if (methName == names._super) {
// qualifier omitted; check for existence
// of an appropriate implicit qualifier.
checkNewInnerClass(tree.meth.pos(), localEnv, site, true);
}
} else if (tree.meth.hasTag(SELECT)) {
log.error(tree.meth.pos(),
@@ -2598,6 +2594,15 @@ public class Attr extends JCTree.Visitor {
attribExpr(((JCFieldAccess) tree.meth).selected, localEnv, site);
}
if (tree.meth.hasTag(IDENT)) {
// non-qualified super(...) call; check whether explicit constructor
// invocation is well-formed. If the super class is an inner class,
// make sure that an appropriate implicit qualifier exists. If the super
// class is a local class, make sure that the current class is defined
// in the same context as the local class.
checkNewInnerClass(tree.meth.pos(), localEnv, site, true);
}
// if we're calling a java.lang.Enum constructor,
// prefix the implicit String and int parameters
if (site.tsym == syms.enumSym)
@@ -3065,7 +3070,7 @@ public class Attr extends JCTree.Visitor {
}
void checkNewInnerClass(DiagnosticPosition pos, Env<AttrContext> env, Type type, boolean isSuper) {
boolean isLocal = type.tsym.owner.kind == MTH;
boolean isLocal = type.tsym.owner.kind == VAR || type.tsym.owner.kind == MTH;
if ((type.tsym.flags() & (INTERFACE | ENUM | RECORD)) != 0 ||
(!isLocal && !type.tsym.isInner()) ||
(isSuper && env.enclClass.sym.isAnonymous())) {

View File

@@ -3834,7 +3834,7 @@ public class Resolve {
*/
Symbol findLocalClassOwner(Env<AttrContext> env, TypeSymbol c) {
Symbol owner = c.owner;
Assert.check(owner.kind == MTH);
Assert.check(owner.kind == MTH || owner.kind == VAR);
Env<AttrContext> env1 = env;
boolean staticOnly = false;
while (env1.outer != null) {
@@ -3846,7 +3846,9 @@ public class Resolve {
if (isStatic(env1)) staticOnly = true;
env1 = env1.outer;
}
return methodNotFound;
return owner.kind == MTH ?
methodNotFound :
varNotFound;
}
/**

View File

@@ -3245,6 +3245,7 @@ compiler.misc.feature.flexible.constructors=\
compiler.misc.feature.module.imports=\
module imports
# L10N: do not localize: transitive
compiler.misc.feature.java.base.transitive=\
transitive modifier for java.base
@@ -3770,7 +3771,7 @@ compiler.misc.cant.resolve.modules=\
cannot resolve modules
compiler.misc.bad.requires.flag=\
bad requires flag: {0}
invalid flag for "requires java.base": {0}
# 0: string
compiler.err.invalid.module.specifier=\

View File

@@ -635,6 +635,9 @@ compiler.err.limit.stack=Code erfordert zu viel Stack
compiler.err.limit.string=Konstantenzeichenfolge zu lang
# 0: symbol
compiler.err.annotation.array.too.large=Annotationsarrayelement zu groß in "{0}"
# 0: string
compiler.err.limit.string.overflow=UTF8-Darstellung für Zeichenfolge "{0}..." ist zu lang für den Konstantenpool
@@ -656,9 +659,6 @@ compiler.misc.unexpected.ret.val=Unerwarteter Rückgabewert
# 0: set of flag
compiler.err.mod.not.allowed.here=Modifikator {0} hier nicht zulässig
# 0: name
compiler.err.modifier.not.allowed.here=Modifikator {0} hier nicht zulässig
compiler.err.intf.not.allowed.here=Schnittstelle hier nicht zulässig
# 0: symbol, 1: symbol
@@ -781,9 +781,6 @@ compiler.err.not.def.access.class.intf.cant.access.reason={1}.{0} in Package {2}
# 0: symbol, 1: symbol, 2: symbol, 3: message segment
compiler.misc.not.def.access.class.intf.cant.access.reason={1}.{0} in Package {2} ist nicht zugänglich\n({3})
# 0: symbol, 1: list of type, 2: type
compiler.misc.cant.access.inner.cls.constr=Zugriff auf Konstruktor {0}({1}) nicht möglich\nEinschließende Instanz vom Typ {2} ist nicht im Geltungsbereich
# 0: symbol, 1: symbol
compiler.err.not.def.public.cant.access={0} ist nicht öffentlich in {1}. Zugriff von externem Package nicht möglich
@@ -1148,6 +1145,10 @@ compiler.err.file.sb.on.source.or.patch.path.for.module=Datei muss sich im Quell
compiler.err.no.java.lang=Package java.lang kann in Plattformklassen nicht gefunden werden
compiler.err.statement.not.expected=Anweisungen werden außerhalb von Methoden und Initializern nicht erwartet
compiler.err.class.method.or.field.expected=Klasse, Schnittstelle, Annotationstyp, Enumeration, Datensatz, Methode oder Feld erwartet
#####
# Fatal Errors
@@ -1589,6 +1590,7 @@ compiler.warn.proc.duplicate.option.name=Doppelte unterstützte Option "{0}" von
# 0: string, 1: string
compiler.warn.proc.duplicate.supported.annotation=Doppelte unterstützte Annotationsschnittstelle "{0}" von Annotationsprozessor "{1}" zurückgegeben
# 0: string
compiler.warn.proc.redundant.types.with.wildcard=Annotationsprozessor "{0}" unterstützt redundant sowohl "*" als auch andere Annotationsschnittstellen
@@ -1671,6 +1673,9 @@ compiler.warn.annotation.method.not.found=Annotationsmethode "{1}()" kann nicht
# 0: type, 1: name, 2: message segment
compiler.warn.annotation.method.not.found.reason=Annotationsmethode "{1}()" kann nicht in Typ "{0}" gefunden werden: {2}
# 0: list of annotation, 1: symbol, 2: name, 3: message segment
compiler.err.cant.attach.type.annotations=Typannotationen {0} können nicht an {1}.{2} angehängt werden:\n{3}
# 0: file object, 1: symbol, 2: name
compiler.warn.unknown.enum.constant=Unbekannte Enum-Konstante {1}.{2}
@@ -1806,7 +1811,11 @@ compiler.misc.bad.enclosing.class=Ungültige einschließende Klasse für {0}: {1
# 0: symbol
compiler.misc.bad.enclosing.method=Ungültiges einschließendes Methodenattribut für Klasse {0}
compiler.misc.bad.runtime.invisible.param.annotations=Ungültiges RuntimeInvisibleParameterAnnotations-Attribut: {0}
# 0: file name
compiler.warn.runtime.visible.invisible.param.annotations.mismatch=Die Längen der Parameter im RuntimeVisibleParameterAnnotations-Attribut und RuntimeInvisibleParameterAnnotations-Attribut in {0} stimmen nicht überein. Beide Attribute werden ignoriert
# 0: file name
compiler.warn.runtime.invisible.parameter.annotations=Die Attribute RuntimeVisibleParameterAnnotations und RuntimeInvisibleParameterAnnotations in {0} können nicht den Parametern der Methode zugeordnet werden
compiler.misc.bad.const.pool.tag=Ungültiges Konstantenpooltag: {0}
@@ -2038,6 +2047,10 @@ compiler.err.abstract.cant.be.accessed.directly={0} {1} in {2} ist abstrakt und
# 0: symbol kind, 1: symbol
compiler.err.non-static.cant.be.ref={0} {1} ist nicht statisch und kann nicht aus einem statischen Kontext referenziert werden
## The first argument ({0}) is a "kindname".
# 0: symbol kind, 1: symbol
compiler.err.local.cant.be.inst.static={0} {1} ist lokal und kann nicht aus einem statischen Kontext instanziiert werden
# 0: symbol kind, 1: symbol
compiler.misc.bad.static.method.in.unbound.lookup=Unerwartete statische {0} {1} in ungebundenem Lookup gefunden
@@ -2286,6 +2299,9 @@ compiler.misc.feature.flexible.constructors=Flexible Konstruktoren
compiler.misc.feature.module.imports=Modulimporte
# L10N: do not localize: transitive
compiler.misc.feature.java.base.transitive=transitive Modifikator für java.base
compiler.warn.underscore.as.identifier=Ab Release 9 ist "_" ein Schlüsselwort und kann nicht als ID verwendet werden
compiler.err.underscore.as.identifier=Ab Release 9 ist "_" ein Schlüsselwort und kann nicht als ID verwendet werden

View File

@@ -635,6 +635,9 @@ compiler.err.limit.stack=コードが要求するスタックが多すぎます
compiler.err.limit.string=定数文字列が長すぎます
# 0: symbol
compiler.err.annotation.array.too.large="{0}"の注釈配列要素が大きすぎます
# 0: string
compiler.err.limit.string.overflow=文字列"{0}..."のUTF8表現が、定数プールに対して長すぎます
@@ -656,9 +659,6 @@ compiler.misc.unexpected.ret.val=予期しない戻り値
# 0: set of flag
compiler.err.mod.not.allowed.here=修飾子{0}をここで使用することはできません
# 0: name
compiler.err.modifier.not.allowed.here=修飾子{0}をここで使用することはできません
compiler.err.intf.not.allowed.here=ここではインタフェースは許可されません
# 0: symbol, 1: symbol
@@ -781,9 +781,6 @@ compiler.err.not.def.access.class.intf.cant.access.reason=パッケージ{2}の{
# 0: symbol, 1: symbol, 2: symbol, 3: message segment
compiler.misc.not.def.access.class.intf.cant.access.reason=パッケージ{2}の{1}.{0}にはアクセスできません\n({3})
# 0: symbol, 1: list of type, 2: type
compiler.misc.cant.access.inner.cls.constr=コンストラクタ{0}({1})にアクセスできません\n内部クラスを囲む型{2}のインスタンスがスコープ内にありません
# 0: symbol, 1: symbol
compiler.err.not.def.public.cant.access={1}の{0}はpublicではありません。パッケージ外からはアクセスできません
@@ -1148,6 +1145,10 @@ compiler.err.file.sb.on.source.or.patch.path.for.module=ファイルは、ソー
compiler.err.no.java.lang=プラットフォーム・クラスでパッケージjava.langを検出できません
compiler.err.statement.not.expected=文はメソッドおよびイニシャライザの外では必要ありません
compiler.err.class.method.or.field.expected=クラス、インタフェース、注釈型、列挙、レコード、メソッドまたはフィールドが必要です
#####
# Fatal Errors
@@ -1589,6 +1590,7 @@ compiler.warn.proc.duplicate.option.name=重複するサポート対象オプシ
# 0: string, 1: string
compiler.warn.proc.duplicate.supported.annotation=重複するサポート対象注釈インタフェース''{0}''が注釈プロセッサ''{1}''によって返されました
# 0: string
compiler.warn.proc.redundant.types.with.wildcard=注釈プロセッサ''{0}''は''*''と他の注釈インタフェースを重複してサポートします
@@ -1671,6 +1673,9 @@ compiler.warn.annotation.method.not.found=タイプ''{0}''内に注釈メソッ
# 0: type, 1: name, 2: message segment
compiler.warn.annotation.method.not.found.reason=タイプ''{0}''内に注釈メソッド''{1}()''が見つかりません: {2}
# 0: list of annotation, 1: symbol, 2: name, 3: message segment
compiler.err.cant.attach.type.annotations=タイプ注釈{0}を{1}.{2}に添付できません:\n{3}
# 0: file object, 1: symbol, 2: name
compiler.warn.unknown.enum.constant=不明な列挙型定数です{1}.{2}
@@ -1806,7 +1811,11 @@ compiler.misc.bad.enclosing.class={0}の内部クラスが不正です: {1}
# 0: symbol
compiler.misc.bad.enclosing.method=クラス{0}の囲んでいるメソッド属性が不正です
compiler.misc.bad.runtime.invisible.param.annotations=RuntimeInvisibleParameterAnnotations属性が不正です: {0}
# 0: file name
compiler.warn.runtime.visible.invisible.param.annotations.mismatch={0}内のRuntimeVisibleParameterAnnotations属性およびRuntimeInvisibleParameterAnnotations属性内のパラメータの長さが一致しません。両方の属性を無視します
# 0: file name
compiler.warn.runtime.invisible.parameter.annotations={0}内のRuntimeVisibleParameterAnnotationsおよびRuntimeInvisibleParameterAnnotations属性をメソッドのパラメータにマップできません
compiler.misc.bad.const.pool.tag=定数プール・タグ{0}が不正です
@@ -2038,6 +2047,10 @@ compiler.err.abstract.cant.be.accessed.directly=抽象{0}である{1}({2}内)に
# 0: symbol kind, 1: symbol
compiler.err.non-static.cant.be.ref=staticでない{0} {1}をstaticコンテキストから参照することはできません
## The first argument ({0}) is a "kindname".
# 0: symbol kind, 1: symbol
compiler.err.local.cant.be.inst.static=ローカル{0} {1}をstaticコンテキストからインスタンス化できません
# 0: symbol kind, 1: symbol
compiler.misc.bad.static.method.in.unbound.lookup=非バインド検索で予期しない静的な{0} {1}が見つかりました
@@ -2286,6 +2299,9 @@ compiler.misc.feature.flexible.constructors=柔軟なコンストラクタ
compiler.misc.feature.module.imports=モジュール・インポート
# L10N: do not localize: transitive
compiler.misc.feature.java.base.transitive=java.baseの推移的修飾子
compiler.warn.underscore.as.identifier=リリース9から''_''はキーワードなので識別子として使用することはできません
compiler.err.underscore.as.identifier=リリース9から''_''はキーワードなので識別子として使用することはできません

View File

@@ -635,6 +635,9 @@ compiler.err.limit.stack=代码需要过多堆栈
compiler.err.limit.string=常量字符串过长
# 0: symbol
compiler.err.annotation.array.too.large="{0}" 中的批注数组元素太大
# 0: string
compiler.err.limit.string.overflow=对于常量池来说, 字符串 "{0}..." 的 UTF8 表示过长
@@ -656,9 +659,6 @@ compiler.misc.unexpected.ret.val=意外的返回值
# 0: set of flag
compiler.err.mod.not.allowed.here=此处不允许使用修饰符{0}
# 0: name
compiler.err.modifier.not.allowed.here=此处不允许使用修饰符{0}
compiler.err.intf.not.allowed.here=此处不允许使用接口
# 0: symbol, 1: symbol
@@ -781,9 +781,6 @@ compiler.err.not.def.access.class.intf.cant.access.reason=程序包 {2} 中的 {
# 0: symbol, 1: symbol, 2: symbol, 3: message segment
compiler.misc.not.def.access.class.intf.cant.access.reason=程序包 {2} 中的 {1}.{0} 不可访问\n({3})
# 0: symbol, 1: list of type, 2: type
compiler.misc.cant.access.inner.cls.constr=无法访问构造器 {0}({1})\n作用域中没有类型为{2}的封闭实例
# 0: symbol, 1: symbol
compiler.err.not.def.public.cant.access={0}在{1}中不是公共的; 无法从外部程序包中对其进行访问
@@ -1148,6 +1145,10 @@ compiler.err.file.sb.on.source.or.patch.path.for.module=文件应在源路径或
compiler.err.no.java.lang=在平台类中找不到程序包 java.lang
compiler.err.statement.not.expected=语句不应在方法和初始化程序外部
compiler.err.class.method.or.field.expected=需要类、接口、批注类型、枚举、记录、方法或字段
#####
# Fatal Errors
@@ -1589,6 +1590,7 @@ compiler.warn.proc.duplicate.option.name=批注处理程序 ''{1}'' 返回重复
# 0: string, 1: string
compiler.warn.proc.duplicate.supported.annotation=批注处理程序 ''{1}'' 返回重复的受支持批注接口 ''{0}''
# 0: string
compiler.warn.proc.redundant.types.with.wildcard=批注处理程序 ''{0}'' 重复支持 ''*'' 和其他批注接口
@@ -1671,6 +1673,9 @@ compiler.warn.annotation.method.not.found=无法找到类型 ''{0}'' 的批注
# 0: type, 1: name, 2: message segment
compiler.warn.annotation.method.not.found.reason=无法找到类型 ''{0}'' 的批注方法 ''{1}()'': {2}
# 0: list of annotation, 1: symbol, 2: name, 3: message segment
compiler.err.cant.attach.type.annotations=无法将类型批注 {0} 附加到 {1}.{2}\n{3}
# 0: file object, 1: symbol, 2: name
compiler.warn.unknown.enum.constant=未知的枚举常量 {1}.{2}
@@ -1806,7 +1811,11 @@ compiler.misc.bad.enclosing.class={0}的封闭类错误: {1}
# 0: symbol
compiler.misc.bad.enclosing.method=类 {0} 的封闭方法属性错误
compiler.misc.bad.runtime.invisible.param.annotations=错误的 RuntimeInvisibleParameterAnnotations 属性: {0}
# 0: file name
compiler.warn.runtime.visible.invisible.param.annotations.mismatch={0} 中 RuntimeVisibleParameterAnnotations 属性和 RuntimeInvisibleParameterAnnotations 属性中的参数长度不匹配,将忽略这两个属性
# 0: file name
compiler.warn.runtime.invisible.parameter.annotations={0} 中的 RuntimeVisibleParameterAnnotations 属性和 RuntimeInvisibleParameterAnnotations 属性无法映射到方法的参数
compiler.misc.bad.const.pool.tag=错误的常量池标记: {0}
@@ -2038,6 +2047,10 @@ compiler.err.abstract.cant.be.accessed.directly=无法直接访问{2}中的抽
# 0: symbol kind, 1: symbol
compiler.err.non-static.cant.be.ref=无法从静态上下文中引用非静态 {0} {1}
## The first argument ({0}) is a "kindname".
# 0: symbol kind, 1: symbol
compiler.err.local.cant.be.inst.static=无法从静态上下文实例化本地 {0} {1}
# 0: symbol kind, 1: symbol
compiler.misc.bad.static.method.in.unbound.lookup=在未绑定查找中找到意外的静态 {0} {1}
@@ -2286,6 +2299,9 @@ compiler.misc.feature.flexible.constructors=灵活构造器
compiler.misc.feature.module.imports=模块导入
# L10N: do not localize: transitive
compiler.misc.feature.java.base.transitive=java.base 的过渡修饰符
compiler.warn.underscore.as.identifier=从发行版 9 开始, ''_'' 为关键字, 不能用作标识符
compiler.err.underscore.as.identifier=从发行版 9 开始, ''_'' 为关键字, 不能用作标识符
@@ -2738,7 +2754,7 @@ compiler.misc.local=本地
# errors related to records
# record components
compiler.err.record.cant.declare.field.modifiers=记录组件不能具有限定
compiler.err.record.cant.declare.field.modifiers=记录组件不能具有修饰
# 0: symbol
compiler.err.illegal.record.component.name=记录组件名称 {0} 非法

View File

@@ -102,7 +102,7 @@ javac.opt.Xlint.all=Alle Warnungen aktivieren
javac.opt.Xlint.none=Alle Warnungen deaktivieren
#L10N: do not localize: -Xlint
javac.opt.arg.Xlint=<Schlüssel>(,<Schlüssel>)*
javac.opt.Xlint.custom=Warnungen, die aktiviert oder deaktiviert werden sollen, durch Komma getrennt.\nStellen Sie einem Schlüssel "-" voran, um die angegebene Warnung zu deaktivieren.\nVerwenden Sie --help-lint, um die unterstützten Schlüssel zu sehen.
javac.opt.Xlint.custom=Warnungen, die aktiviert oder deaktiviert werden sollen, durch Komma getrennt.\nStellen Sie einem Schlüssel "-" voran, um die angegebene Warnung zu deaktivieren.\nVerwenden Sie "--help-lint", um die unterstützten Schlüssel anzuzeigen.
javac.opt.Xlint.desc.auxiliaryclass=Warnt vor Auxiliary-Klassen, die in einer Quelldatei verborgen sind und aus anderen Dateien heraus verwendet werden.
javac.opt.Xlint.desc.cast=Warnt vor unnötigen Umwandlungen mit Cast.
@@ -187,7 +187,7 @@ javac.opt.Xdoclint.custom=Aktiviert oder deaktiviert bestimmte Prüfungen auf Pr
javac.opt.Xdoclint.package.args = [-]<Packages>(,[-]<Package>)*
javac.opt.Xdoclint.package.desc=Aktiviert oder deaktiviert Prüfungen in bestimmten Packages. Jedes <Package> ist entweder der\nqualifizierte Name eines Packages oder ein Packagenamenspräfix, gefolgt von ".*",\ndas sich auf alle Subpackages des angegebenen Packages bezieht. Jedem <Package>\nkann "-" vorangestellt werden, um Prüfungen für die angegebenen Packages zu deaktivieren.
javac.opt.Xdoclint.package.desc=Aktiviert oder deaktiviert Prüfungen in bestimmten Packages. Jedes <Package> ist entweder\nein qualifizierter Packagename oder ein Packagenamenspräfix, gefolgt von ".*",\ndas sich auf alle Subpackages des angegebenen Packages bezieht. Jedem <Package>\nkann "-" vorangestellt werden, um Prüfungen für die angegebenen Packages zu deaktivieren.
javac.opt.Xstdout=Leitet die Standardausgabe um
javac.opt.X=Gibt Hilfe zu zusätzlichen Optionen aus

View File

@@ -102,7 +102,7 @@ javac.opt.Xlint.all=すべての警告を有効にします
javac.opt.Xlint.none=すべての警告を無効にします
#L10N: do not localize: -Xlint
javac.opt.arg.Xlint=<key>(,<key>)*
javac.opt.Xlint.custom=有効または無効にする警告(カンマ区切り)。\n指定した警告を無効にするには、キーの前に'-'を指定します。\nサポートされているキーを表示するには--help-lintを使用します。
javac.opt.Xlint.custom=有効または無効にする警告(カンマ区切り)。\n指定した警告を無効にするには、キーの前に''-''を指定します。\nサポートされているキーを表示するには--help-lintを使用します。
javac.opt.Xlint.desc.auxiliaryclass=ソース・ファイルで非表示になっているが他のファイルから使用されている補助クラスについて警告します。
javac.opt.Xlint.desc.cast=不要なキャストの使用について警告します。
@@ -187,7 +187,7 @@ javac.opt.Xdoclint.custom=javadocコメントの問題に関する特定のチ
javac.opt.Xdoclint.package.args = [-]<packages>(,[-]<package>)*
javac.opt.Xdoclint.package.desc=特定のパッケージのチェックを有効または無効にします。各<package>は、\nパッケージの修飾された名前、またはパッケージ名の接頭辞の後に'.*'を\n指定(指定したパッケージのすべてのサブパッケージに拡張)したものです。各<package>\nの前に'-'を指定すると、指定した1つ以上のパッケージに関するチェックを無効にできます。
javac.opt.Xdoclint.package.desc=特定のパッケージのチェックを有効または無効にします。各<package>は、\n修飾されたパッケージ名、またはパッケージ名の接頭辞の後に''.*''を\n指定(指定したパッケージのすべてのサブパッケージに拡張)したものです。各<package>\nの前に''-''を指定すると、指定した1つ以上のパッケージに関するチェックを無効にできます。
javac.opt.Xstdout=標準出力をリダイレクトする
javac.opt.X=追加オプションのヘルプを出力します
@@ -216,7 +216,7 @@ javac.opt.module.version=コンパイルするモジュールのバージョン
javac.opt.arg.module.version=<バージョン>
javac.opt.inherit_runtime_environment=実行時環境からモジュール・システム構成オプションを継承します。
javac.opt.default.module.for.created.files=何も指定されていないか、推定型の場合、注釈プロセッサによって作成されるファイルのターゲット・モジュールをフォールバックします。
javac.opt.lineDocComments='///'で行を開始すると、ドキュメンテーション・コメントのサポートが無効化されます
javac.opt.lineDocComments=''///''で行を開始すると、ドキュメンテーション・コメントのサポートが無効化されます
## messages

View File

@@ -87,7 +87,7 @@ javac.opt.arg.default.module.for.created.files=<module-name>
javac.opt.maxerrs=设置要输出的错误的最大数目
javac.opt.maxwarns=设置要输出的警告的最大数目
javac.opt.nogj=语言不接受泛型
javac.opt.nogj=语言不接受泛型
javac.opt.moreinfo=输出类型变量的扩展信息
javac.opt.printsearch=输出有关搜索类文件的位置的信息
javac.opt.prompt=在每次出错后停止
@@ -101,8 +101,8 @@ javac.opt.Xlint=启用建议的警告
javac.opt.Xlint.all=启用所有警告
javac.opt.Xlint.none=禁用所有警告
#L10N: do not localize: -Xlint
javac.opt.arg.Xlint=<密钥>(,<密钥>)*
javac.opt.Xlint.custom=要启用或禁用的警告,使用逗号分隔。\n在关键字前面加上 '-' 可禁用指定的警告。\n使用 --help-lint 可查看受支持的关键字。
javac.opt.arg.Xlint=<key>(,<key>)*
javac.opt.Xlint.custom=要启用或禁用的警告(以逗号分隔。\n在关键字前面加上 ''-'' 可禁用指定的警告。\n使用 --help-lint 可查看受支持的关键字。
javac.opt.Xlint.desc.auxiliaryclass=有关辅助类在源文件中隐藏, 但在其他文件中使用的警告。
javac.opt.Xlint.desc.cast=有关使用了不必要转换的警告。
@@ -187,7 +187,7 @@ javac.opt.Xdoclint.custom=为 javadoc 注释中的问题启用或禁用特定检
javac.opt.Xdoclint.package.args = [-]<程序包>(,[-]<程序包>)*
javac.opt.Xdoclint.package.desc=在特定的程序包中启用或禁用检查。每个 <程序包> 是\n程序包的限定名称,或程序包名称前缀后跟 '.*'\n这将扩展到给定程序包的所有子程序包。在每个 <程序包>\n前面加上 '-' 可以为指定程序包禁用检查。
javac.opt.Xdoclint.package.desc=在特定的程序包中启用或禁用检查。每个 <程序包> 是\n限定的程序包名称,或程序包名称前缀后跟 ''.*''\n这将扩展到给定程序包的所有子程序包。在每个 <程序包>\n前面加上 ''-'' 可指定程序包禁用检查。
javac.opt.Xstdout=重定向标准输出
javac.opt.X=输出额外选项的帮助
@@ -216,7 +216,7 @@ javac.opt.module.version=指定正在编译的模块版本
javac.opt.arg.module.version=<版本>
javac.opt.inherit_runtime_environment=从运行时环境继承模块系统配置选项。
javac.opt.default.module.for.created.files=由批注处理程序创建的文件的备用目标模块 (如果未指定或推断任何模块)。
javac.opt.lineDocComments=禁用对带有以 '///' 开头的行的文档注释的支持
javac.opt.lineDocComments=禁用对带有以 ''///'' 开头的行的文档注释的支持
## messages

View File

@@ -127,6 +127,7 @@ public class Names {
// module names
public final Name java_base;
public final Name java_se;
public final Name jdk_unsupported;
// attribute names
@@ -315,6 +316,7 @@ public class Names {
// module names
java_base = fromString("java.base");
java_se = fromString("java.se");
jdk_unsupported = fromString("jdk.unsupported");
// attribute names

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@@ -233,29 +233,22 @@ public abstract class HttpExchange implements AutoCloseable, Request {
public abstract String getProtocol();
/**
* Returns the attribute's value from this exchange's
* {@linkplain HttpContext#getAttributes() context attributes}.
*
* @apiNote {@link Filter} modules may store arbitrary objects as attributes through
* {@code HttpExchange} instances as an out-of-band communication mechanism. Other filters
* {@link Filter} modules may store arbitrary objects with {@code HttpExchange}
* instances as an out-of-band communication mechanism. Other filters
* or the exchange handler may then access these objects.
*
* <p> Each {@code Filter} class will document the attributes which they make
* available.
*
* @param name the name of the attribute to retrieve
* @return the attribute's value or {@code null} if either the attribute isn't set
* or the attribute value is {@code null}
* @return the attribute object, or {@code null} if it does not exist
* @throws NullPointerException if name is {@code null}
*/
public abstract Object getAttribute(String name);
/**
* Sets an attribute with the given {@code name} and {@code value} in this exchange's
* {@linkplain HttpContext#getAttributes() context attributes}.
*
* @apiNote {@link Filter} modules may store arbitrary objects as attributes through
* {@code HttpExchange} instances as an out-of-band communication mechanism. Other filters
* {@link Filter} modules may store arbitrary objects with {@code HttpExchange}
* instances as an out-of-band communication mechanism. Other filters
* or the exchange handler may then access these objects.
*
* <p> Each {@code Filter} class will document the attributes which they make

View File

@@ -4,7 +4,9 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
* 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

View File

@@ -4,7 +4,9 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
* 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

View File

@@ -4,7 +4,9 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
* 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

View File

@@ -2869,6 +2869,10 @@ public abstract class ByteVector extends AbstractVector<Byte> {
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (byte) Math.min(a, b)));
case VECTOR_OP_MAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (byte) Math.max(a, b)));
case VECTOR_OP_UMIN: return (v, m) ->
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (byte) VectorMath.minUnsigned(a, b)));
case VECTOR_OP_UMAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (byte) VectorMath.maxUnsigned(a, b)));
case VECTOR_OP_AND: return (v, m) ->
toBits(v.rOp((byte)-1, m, (i, a, b) -> (byte)(a & b)));
case VECTOR_OP_OR: return (v, m) ->

View File

@@ -2854,6 +2854,10 @@ public abstract class IntVector extends AbstractVector<Integer> {
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (int) Math.min(a, b)));
case VECTOR_OP_MAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (int) Math.max(a, b)));
case VECTOR_OP_UMIN: return (v, m) ->
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (int) VectorMath.minUnsigned(a, b)));
case VECTOR_OP_UMAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (int) VectorMath.maxUnsigned(a, b)));
case VECTOR_OP_AND: return (v, m) ->
toBits(v.rOp((int)-1, m, (i, a, b) -> (int)(a & b)));
case VECTOR_OP_OR: return (v, m) ->

View File

@@ -2720,6 +2720,10 @@ public abstract class LongVector extends AbstractVector<Long> {
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (long) Math.min(a, b)));
case VECTOR_OP_MAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (long) Math.max(a, b)));
case VECTOR_OP_UMIN: return (v, m) ->
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (long) VectorMath.minUnsigned(a, b)));
case VECTOR_OP_UMAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (long) VectorMath.maxUnsigned(a, b)));
case VECTOR_OP_AND: return (v, m) ->
toBits(v.rOp((long)-1, m, (i, a, b) -> (long)(a & b)));
case VECTOR_OP_OR: return (v, m) ->

View File

@@ -2870,6 +2870,10 @@ public abstract class ShortVector extends AbstractVector<Short> {
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (short) Math.min(a, b)));
case VECTOR_OP_MAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (short) Math.max(a, b)));
case VECTOR_OP_UMIN: return (v, m) ->
toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (short) VectorMath.minUnsigned(a, b)));
case VECTOR_OP_UMAX: return (v, m) ->
toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (short) VectorMath.maxUnsigned(a, b)));
case VECTOR_OP_AND: return (v, m) ->
toBits(v.rOp((short)-1, m, (i, a, b) -> (short)(a & b)));
case VECTOR_OP_OR: return (v, m) ->

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