diff --git a/closed/openjdk-tag.gmk b/closed/openjdk-tag.gmk index b87d54ccdc4..d3113d061be 100644 --- a/closed/openjdk-tag.gmk +++ b/closed/openjdk-tag.gmk @@ -1 +1 @@ -OPENJDK_TAG := jdk-23+19 +OPENJDK_TAG := jdk-23+21 diff --git a/closed/src/java.base/share/classes/jdk/crypto/jniprovider/NativeCrypto.java b/closed/src/java.base/share/classes/jdk/crypto/jniprovider/NativeCrypto.java index a920446155a..c8358b4b4d5 100644 --- a/closed/src/java.base/share/classes/jdk/crypto/jniprovider/NativeCrypto.java +++ b/closed/src/java.base/share/classes/jdk/crypto/jniprovider/NativeCrypto.java @@ -416,6 +416,19 @@ public final native int PBEDerive(byte[] password, int id, int hashAlgorithm); + /* Native ECDSA interfaces. */ + public final native int ECDSASign(long key, + byte[] digest, + int digestLen, + byte[] signature, + int sigLen); + + public final native int ECDSAVerify(long key, + byte[] digest, + int digestLen, + byte[] signature, + int sigLen); + /* Native XDH (X25519, X448) interfaces. */ public final native int XDHCreateKeys(byte[] privateKey, int privateKeyLength, diff --git a/closed/src/java.base/share/classes/sun/security/ec/NativeECDSASignature.java b/closed/src/java.base/share/classes/sun/security/ec/NativeECDSASignature.java new file mode 100644 index 00000000000..68e8ca953ac --- /dev/null +++ b/closed/src/java.base/share/classes/sun/security/ec/NativeECDSASignature.java @@ -0,0 +1,722 @@ +/* + * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved + * =========================================================================== + */ + +package sun.security.ec; + +import java.nio.ByteBuffer; +import java.security.AlgorithmParameters; +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidKeyException; +import java.security.InvalidParameterException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.ProviderException; +import java.security.PublicKey; +import java.security.SecureRandom; +import java.security.SignatureException; +import java.security.SignatureSpi; +import java.security.interfaces.ECKey; +import java.security.interfaces.ECPrivateKey; +import java.security.interfaces.ECPublicKey; +import java.security.spec.AlgorithmParameterSpec; +import java.security.spec.ECParameterSpec; +import java.security.spec.ECPoint; +import java.util.Optional; + +import jdk.crypto.jniprovider.NativeCrypto; +import sun.security.provider.Sun; +import sun.security.util.ECUtil; + +/** + * ECDSA signature implementation. This class currently supports the + * following algorithm names: + * + * + * + * @since 1.7 + */ +abstract class NativeECDSASignature extends SignatureSpi { + + private static NativeCrypto nativeCrypto; + private static final boolean nativeCryptTrace = NativeCrypto.isTraceEnabled(); + + // message digest implementation we use + private final MessageDigest messageDigest; + + // supplied entropy + private SecureRandom random; + + // flag indicating whether the digest has been reset + private boolean needsReset; + + // private key, if initialized for signing + private ECPrivateKey privateKey; + + // private key impl, if initialized for signing + private ECPrivateKeyImpl privateKeyImpl; + + // public key, if initialized for verifying + private ECPublicKey publicKey; + + // public key impl, if initialized for verifying + private ECPublicKeyImpl publicKeyImpl; + + // the format (i.e., true for the IEEE P1363 format and false for ASN.1) + private final boolean p1363Format; + + // the Java implementation, if needed + private ECDSASignature javaImplementation; + + /** + * Constructs a new NativeECDSASignature. + * + * @exception ProviderException if the native ECC library is unavailable. + */ + NativeECDSASignature() { + this(false); + } + + /** + * Constructs a new NativeECDSASignature that will use the specified + * signature format. {@code p1363Format} should be {@code true} to + * use the IEEE P1363 format. If {@code p1363Format} is {@code false}, + * the DER-encoded ASN.1 format will be used. This constructor is + * used by the RawECDSA subclasses. + */ + NativeECDSASignature(boolean p1363Format) { + this.messageDigest = null; + this.p1363Format = p1363Format; + } + + /** + * Constructs a new NativeECDSASignature. Used by subclasses. + */ + NativeECDSASignature(String digestName) { + this(digestName, false); + } + + /** + * Constructs a new NativeECDSASignature that will use the specified + * digest and signature format. {@code p1363Format} should be + * {@code true} to use the IEEE P1363 format. If {@code p1363Format} + * is {@code false}, the DER-encoded ASN.1 format will be used. This + * constructor is used by subclasses. + */ + NativeECDSASignature(String digestName, boolean p1363Format) { + try { + this.messageDigest = MessageDigest.getInstance(digestName); + } catch (NoSuchAlgorithmException e) { + throw new ProviderException(e); + } + this.needsReset = false; + this.p1363Format = p1363Format; + } + + // Class for Raw ECDSA signatures. + static class RawECDSA extends NativeECDSASignature { + + // the longest supported digest is 512 bits (SHA-512) + private static final int RAW_ECDSA_MAX = 64; + + private final byte[] precomputedDigest; + private int offset; + + RawECDSA(boolean p1363Format) { + super(p1363Format); + precomputedDigest = new byte[RAW_ECDSA_MAX]; + } + + // Stores the precomputed message digest value. + @Override + protected void engineUpdate(byte b) throws SignatureException { + if (offset >= precomputedDigest.length) { + offset = RAW_ECDSA_MAX + 1; + return; + } + precomputedDigest[offset++] = b; + } + + // Stores the precomputed message digest value. + @Override + protected void engineUpdate(byte[] b, int off, int len) + throws SignatureException { + if (offset >= precomputedDigest.length) { + offset = RAW_ECDSA_MAX + 1; + return; + } + System.arraycopy(b, off, precomputedDigest, offset, len); + offset += len; + } + + // Stores the precomputed message digest value. + @Override + protected void engineUpdate(ByteBuffer byteBuffer) { + int len = byteBuffer.remaining(); + if (len <= 0) { + return; + } + if (len >= (precomputedDigest.length - offset)) { + offset = RAW_ECDSA_MAX + 1; + return; + } + byteBuffer.get(precomputedDigest, offset, len); + offset += len; + } + + @Override + protected void resetDigest() { + offset = 0; + } + + // Returns the precomputed message digest value. + @Override + protected byte[] getDigestValue() throws SignatureException { + if (offset > RAW_ECDSA_MAX) { + throw new SignatureException("Message digest is too long"); + + } + byte[] result = new byte[offset]; + System.arraycopy(precomputedDigest, 0, result, 0, offset); + offset = 0; + + return result; + } + } + + // Nested class for NONEwithECDSA signatures. + public static final class Raw extends RawECDSA { + public Raw() { + super(false); + } + } + + // Nested class for NONEwithECDSAinP1363Format signatures. + public static final class RawinP1363Format extends RawECDSA { + public RawinP1363Format() { + super(true); + } + } + + // Nested class for SHA1withECDSA signatures. + public static final class SHA1 extends NativeECDSASignature { + public SHA1() { + super("SHA1"); + } + } + + // Nested class for SHA1withECDSAinP1363Format signatures. + public static final class SHA1inP1363Format extends NativeECDSASignature { + public SHA1inP1363Format() { + super("SHA1", true); + } + } + + // Nested class for SHA224withECDSA signatures. + public static final class SHA224 extends NativeECDSASignature { + public SHA224() { + super("SHA-224"); + } + } + + // Nested class for SHA224withECDSAinP1363Format signatures. + public static final class SHA224inP1363Format extends NativeECDSASignature { + public SHA224inP1363Format() { + super("SHA-224", true); + } + } + + // Nested class for SHA256withECDSA signatures. + public static final class SHA256 extends NativeECDSASignature { + public SHA256() { + super("SHA-256"); + } + } + + // Nested class for SHA256withECDSAinP1363Format signatures. + public static final class SHA256inP1363Format extends NativeECDSASignature { + public SHA256inP1363Format() { + super("SHA-256", true); + } + } + + // Nested class for SHA384withECDSA signatures. + public static final class SHA384 extends NativeECDSASignature { + public SHA384() { + super("SHA-384"); + } + } + + // Nested class for SHA384withECDSAinP1363Format signatures. + public static final class SHA384inP1363Format extends NativeECDSASignature { + public SHA384inP1363Format() { + super("SHA-384", true); + } + } + + // Nested class for SHA512withECDSA signatures. + public static final class SHA512 extends NativeECDSASignature { + public SHA512() { + super("SHA-512"); + } + } + + // Nested class for SHA512withECDSAinP1363Format signatures. + public static final class SHA512inP1363Format extends NativeECDSASignature { + public SHA512inP1363Format() { + super("SHA-512", true); + } + } + + // Nested class for SHA3_224withECDSA signatures. + public static final class SHA3_224 extends NativeECDSASignature { + public SHA3_224() { + super("SHA3-224"); + } + } + + // Nested class for SHA3_224withECDSAinP1363Format signatures. + public static final class SHA3_224inP1363Format extends NativeECDSASignature { + public SHA3_224inP1363Format() { + super("SHA3-224", true); + } + } + + // Nested class for SHA3_256withECDSA signatures. + public static final class SHA3_256 extends NativeECDSASignature { + public SHA3_256() { + super("SHA3-256"); + } + } + + // Nested class for SHA3_256withECDSAinP1363Format signatures. + public static final class SHA3_256inP1363Format extends NativeECDSASignature { + public SHA3_256inP1363Format() { + super("SHA3-256", true); + } + } + + // Nested class for SHA3_384withECDSA signatures. + public static final class SHA3_384 extends NativeECDSASignature { + public SHA3_384() { + super("SHA3-384"); + } + } + + // Nested class for SHA3_384withECDSAinP1363Format signatures. + public static final class SHA3_384inP1363Format extends NativeECDSASignature { + public SHA3_384inP1363Format() { + super("SHA3-384", true); + } + } + + // Nested class for SHA3_512withECDSA signatures. + public static final class SHA3_512 extends NativeECDSASignature { + public SHA3_512() { + super("SHA3-512"); + } + } + + // Nested class for SHA3_512withECDSAinP1363Format signatures. + public static final class SHA3_512inP1363Format extends NativeECDSASignature { + public SHA3_512inP1363Format() { + super("SHA3-512", true); + } + } + + // Initialize for verification. See JCA doc. + @Override + protected void engineInitVerify(PublicKey publicKey) + throws InvalidKeyException { + ECPublicKey key = (ECPublicKey) ECKeyFactory.toECKey(publicKey); + // Should check that the supplied key is appropriate for signature + // algorithm (e.g. P-256 for SHA256withECDSA). + this.publicKey = key; + this.privateKey = null; + resetDigest(); + + if (key instanceof ECPublicKeyImpl keyImpl) { + this.publicKeyImpl = keyImpl; + this.privateKeyImpl = null; + this.javaImplementation = null; + if (nativeCryptTrace) { + System.err.println("InitVerify: Using native crypto implementation for verifying signature."); + } + } else { + this.javaImplementation = getJavaInstance(); + this.javaImplementation.engineInitVerify(publicKey); + } + } + + // Initialize for signing. See JCA doc. + @Override + protected void engineInitSign(PrivateKey privateKey) + throws InvalidKeyException { + engineInitSign(privateKey, null); + } + + // Initialize for signing. See JCA doc. + @Override + protected void engineInitSign(PrivateKey privateKey, SecureRandom random) + throws InvalidKeyException { + if (random == null) { + if (nativeCryptTrace) { + System.err.println("No SecureRandom implementation was provided during" + + " initialization. Using OpenSSL."); + } + } else if ((random.getProvider() instanceof Sun) + && ("NativePRNG".equals(random.getAlgorithm()) || "DRBG".equals(random.getAlgorithm())) + ) { + if (nativeCryptTrace) { + System.err.println("Default SecureRandom implementation was provided during" + + " initialization. Using OpenSSL."); + } + } else { + if (nativeCryptTrace) { + System.err.println("SecureRandom implementation was provided during" + + " initialization. Using Java implementation instead of OpenSSL."); + } + this.javaImplementation = getJavaInstance(); + this.javaImplementation.engineInitSign(privateKey, random); + return; + } + + ECPrivateKey key = (ECPrivateKey) ECKeyFactory.toECKey(privateKey); + ECUtil.checkPrivateKey(key); + // Should check that the supplied key is appropriate for signature + // algorithm (e.g. P-256 for SHA256withECDSA). + this.privateKey = key; + this.publicKey = null; + this.random = random; + resetDigest(); + + if (key instanceof ECPrivateKeyImpl keyImpl) { + this.publicKeyImpl = null; + this.privateKeyImpl = keyImpl; + this.javaImplementation = null; + if (nativeCryptTrace) { + System.err.println("InitSign: Using native crypto implementation for verifying signature."); + } + } else { + this.javaImplementation = getJavaInstance(); + this.javaImplementation.engineInitSign(privateKey, random); + } + } + + /** + * Resets the message digest if needed. + */ + protected void resetDigest() { + if (needsReset) { + if (messageDigest != null) { + messageDigest.reset(); + } + needsReset = false; + } + } + + /** + * Returns the message digest value. + */ + protected byte[] getDigestValue() throws SignatureException { + needsReset = false; + return messageDigest.digest(); + } + + // Update the signature with the plaintext data. See JCA doc. + @Override + protected void engineUpdate(byte b) throws SignatureException { + if (this.javaImplementation != null) { + this.javaImplementation.engineUpdate(b); + } else { + messageDigest.update(b); + needsReset = true; + } + } + + // Update the signature with the plaintext data. See JCA doc. + @Override + protected void engineUpdate(byte[] b, int off, int len) + throws SignatureException { + if (this.javaImplementation != null) { + this.javaImplementation.engineUpdate(b, off, len); + } else { + messageDigest.update(b, off, len); + needsReset = true; + } + } + + // Update the signature with the plaintext data. See JCA doc. + @Override + protected void engineUpdate(ByteBuffer byteBuffer) { + if (this.javaImplementation != null) { + this.javaImplementation.engineUpdate(byteBuffer); + } else { + int len = byteBuffer.remaining(); + if (len <= 0) { + return; + } + + messageDigest.update(byteBuffer); + needsReset = true; + } + } + + // Sign the data and return the signature. See JCA doc. + @Override + protected byte[] engineSign() throws SignatureException { + if (this.javaImplementation != null) { + return this.javaImplementation.engineSign(); + } + + long nativePrivateKey = privateKeyImpl.getNativePtr(); + byte[] digest = getDigestValue(); + int digestLen = digest.length; + ECParameterSpec params = privateKey.getParams(); + int sigLen = ((params.getOrder().bitLength() + 7) / 8) * 2; + byte[] sig = new byte[sigLen]; + + ECDSAOperations.forParameters(params) + .orElseThrow(() -> new SignatureException("Curve not supported: " + params)); + + if (nativePrivateKey == -1) { + throw new ProviderException("Keys could not be converted to native OpenSSL format"); + } + if (nativeCryptTrace) { + System.err.println("Sign: Keys were successfully converted to native OpenSSL format."); + } + + if (nativeCrypto == null) { + nativeCrypto = NativeCrypto.getNativeCrypto(); + } + + int ret; + synchronized (this.privateKey) { + ret = nativeCrypto.ECDSASign(nativePrivateKey, digest, digestLen, sig, sig.length); + } + if (ret == -1) { + throw new ProviderException("An error occured when creating signature"); + } + + if (nativeCryptTrace) { + System.err.println("Sign: Signature was successfully created."); + } + + if (p1363Format) { + return sig; + } else { + return ECUtil.encodeSignature(sig); + } + } + + // Verify the data and return the result. See JCA doc. + @Override + protected boolean engineVerify(byte[] signature) throws SignatureException { + if (this.javaImplementation != null) { + return this.javaImplementation.engineVerify(signature); + } + + ECPoint w = publicKey.getW(); + ECParameterSpec params = publicKey.getParams(); + + // Partial public key validation. + try { + ECUtil.validatePublicKey(w, params); + } catch (InvalidKeyException e) { + return false; + } + + ECDSAOperations ops = ECDSAOperations.forParameters(params) + .orElseThrow(() -> new SignatureException("Curve not supported: " + params)); + + // Full public key validation, only necessary when h != 1. + if (params.getCofactor() != 1) { + if (!ops.getEcOperations().checkOrder(w)) { + return false; + } + } + + long nativePublicKey = publicKeyImpl.getNativePtr(); + if (nativePublicKey == -1) { + throw new ProviderException("Could not convert keys to native format"); + } + if (nativeCryptTrace) { + System.err.println("Verify: Keys were successfully converted to native OpenSSL format."); + } + + if (nativeCrypto == null) { + nativeCrypto = NativeCrypto.getNativeCrypto(); + } + + byte[] sig; + if (p1363Format) { + sig = signature; + } else { + sig = ECUtil.decodeSignature(signature); + } + + byte[] digest = getDigestValue(); + int digestLen = digest.length; + + int ret; + synchronized (this.publicKey) { + ret = nativeCrypto.ECDSAVerify(nativePublicKey, digest, digestLen, sig, sig.length); + } + + if (ret == 1) { + if (nativeCryptTrace) { + System.err.println("Verify: Signature was successfully verified."); + } + return true; + } else if (ret == 0) { + if (nativeCryptTrace) { + System.err.println("Verify: Signature verification was unsuccessful."); + } + return false; + } else { + throw new ProviderException("An error occured when verifying signature"); + } + } + + // Set parameter, not supported. See JCA doc. + @Deprecated + @Override + protected void engineSetParameter(String param, Object value) + throws InvalidParameterException { + throw new UnsupportedOperationException("setParameter() not supported"); + } + + @Override + protected void engineSetParameter(AlgorithmParameterSpec params) + throws InvalidAlgorithmParameterException { + // Interop: some certificates include parameters in an ECDSA + // algorithm identifier. We only accept one matching the key. + if (params == null) { + return; + } + if (!(params instanceof ECParameterSpec ecparams)) { + throw new InvalidAlgorithmParameterException( + "Parameters must be of type ECParameterSpec"); + } + ECKey key = (this.privateKey == null? this.publicKey : this.privateKey); + if ((key != null) && !ECUtil.equals(ecparams, key.getParams())) { + throw new InvalidAlgorithmParameterException + ("Signature params does not match key params"); + } + } + + // Get parameter, not supported. See JCA doc. + @Deprecated + @Override + protected Object engineGetParameter(String param) + throws InvalidParameterException { + throw new UnsupportedOperationException("getParameter() not supported"); + } + + @Override + protected AlgorithmParameters engineGetParameters() { + // Always return null even if setParameter is called before. + // According to RFC 3279 2.2.3 and RFC 5758 3.2, no parameters is + // defined for ECDSA AlgorithmIdentifiers. + return null; + } + + private ECDSASignature getJavaInstance() { + if (this.messageDigest == null) { + return this.p1363Format + ? new ECDSASignature.RawinP1363Format() + : new ECDSASignature.Raw(); + } else { + String mdAlgo = messageDigest.getAlgorithm(); + switch (mdAlgo) { + case "SHA1": + return this.p1363Format + ? new ECDSASignature.SHA1inP1363Format() + : new ECDSASignature.SHA1(); + case "SHA-224": + return this.p1363Format + ? new ECDSASignature.SHA224inP1363Format() + : new ECDSASignature.SHA224(); + case "SHA-256": + return this.p1363Format + ? new ECDSASignature.SHA256inP1363Format() + : new ECDSASignature.SHA256(); + case "SHA-384": + return this.p1363Format + ? new ECDSASignature.SHA384inP1363Format() + : new ECDSASignature.SHA384(); + case "SHA-512": + return this.p1363Format + ? new ECDSASignature.SHA512inP1363Format() + : new ECDSASignature.SHA512(); + case "SHA3-224": + return this.p1363Format + ? new ECDSASignature.SHA3_224inP1363Format() + : new ECDSASignature.SHA3_224(); + case "SHA3-256": + return this.p1363Format + ? new ECDSASignature.SHA3_256inP1363Format() + : new ECDSASignature.SHA3_256(); + case "SHA3-384": + return this.p1363Format + ? new ECDSASignature.SHA3_384inP1363Format() + : new ECDSASignature.SHA3_384(); + case "SHA3-512": + return this.p1363Format + ? new ECDSASignature.SHA3_512inP1363Format() + : new ECDSASignature.SHA3_512(); + default: + throw new ProviderException("Unexpected algorithm: " + mdAlgo); + } + } + } +} diff --git a/closed/src/java.base/share/native/libjncrypto/NativeCrypto.c b/closed/src/java.base/share/native/libjncrypto/NativeCrypto.c index 4a9f9d8af26..8d660f7e873 100644 --- a/closed/src/java.base/share/native/libjncrypto/NativeCrypto.c +++ b/closed/src/java.base/share/native/libjncrypto/NativeCrypto.c @@ -155,6 +155,14 @@ typedef int OSSL_EC_KEY_check_key_t(const EC_KEY *); typedef int EC_set_public_key_t(EC_KEY *, BIGNUM *, BIGNUM *, int); typedef const BIGNUM *OSSL_EC_KEY_get0_private_key_t(const EC_KEY *); +typedef ECDSA_SIG *OSSL_ECDSA_do_sign_t(const unsigned char *, int, EC_KEY *); +typedef int OSSL_ECDSA_do_verify_t(const unsigned char *, int, const ECDSA_SIG *, EC_KEY *); +typedef ECDSA_SIG *OSSL_ECDSA_SIG_new_t(void); +typedef void OSSL_ECDSA_SIG_free_t(ECDSA_SIG *); +typedef const BIGNUM *OSSL_ECDSA_SIG_get0_r_t(const ECDSA_SIG *); +typedef const BIGNUM *OSSL_ECDSA_SIG_get0_s_t(const ECDSA_SIG *); +typedef int OSSL_ECDSA_SIG_set0_t(ECDSA_SIG *, BIGNUM *, BIGNUM *); + typedef EVP_PKEY_CTX *OSSL_EVP_PKEY_CTX_new_t(EVP_PKEY *, ENGINE *); typedef EVP_PKEY_CTX *OSSL_EVP_PKEY_CTX_new_id_t(int, ENGINE *); typedef int OSSL_EVP_PKEY_keygen_init_t(EVP_PKEY_CTX *); @@ -282,6 +290,15 @@ OSSL_EC_KEY_check_key_t* OSSL_EC_KEY_check_key; EC_set_public_key_t* EC_set_public_key; OSSL_EC_KEY_get0_private_key_t *OSSL_EC_KEY_get0_private_key; +/* Define pointers for OpenSSL functions to handle ECDSA algorithm. */ +OSSL_ECDSA_do_sign_t *OSSL_ECDSA_do_sign; +OSSL_ECDSA_do_verify_t *OSSL_ECDSA_do_verify; +OSSL_ECDSA_SIG_new_t *OSSL_ECDSA_SIG_new; +OSSL_ECDSA_SIG_free_t *OSSL_ECDSA_SIG_free; +OSSL_ECDSA_SIG_get0_r_t *OSSL_ECDSA_SIG_get0_r; +OSSL_ECDSA_SIG_get0_s_t *OSSL_ECDSA_SIG_get0_s; +OSSL_ECDSA_SIG_set0_t *OSSL_ECDSA_SIG_set0; + /* Define pointers for OpenSSL functions to handle XDH algorithm. */ OSSL_EVP_PKEY_CTX_new_t *OSSL_EVP_PKEY_CTX_new; OSSL_EVP_PKEY_CTX_new_id_t *OSSL_EVP_PKEY_CTX_new_id; @@ -566,7 +583,7 @@ JNIEXPORT jlong JNICALL Java_jdk_crypto_jniprovider_NativeCrypto_loadCrypto OSSL_ECGF2M = JNI_TRUE; } - /* Load the functions symbols for OpenSSL XDH algorithm. (Need OpenSSL 1.1.x or above). */ + /* Load the functions symbols for OpenSSL XDH and ECDSA algorithms. (Need OpenSSL 1.1.x or above). */ if (ossl_ver >= OPENSSL_VERSION_1_1_1) { OSSL_EVP_PKEY_CTX_new = (OSSL_EVP_PKEY_CTX_new_t *)find_crypto_symbol(crypto_library, "EVP_PKEY_CTX_new"); OSSL_EVP_PKEY_CTX_new_id = (OSSL_EVP_PKEY_CTX_new_id_t *)find_crypto_symbol(crypto_library, "EVP_PKEY_CTX_new_id"); @@ -581,6 +598,14 @@ JNIEXPORT jlong JNICALL Java_jdk_crypto_jniprovider_NativeCrypto_loadCrypto OSSL_EVP_PKEY_derive_set_peer = (OSSL_EVP_PKEY_derive_set_peer_t *)find_crypto_symbol(crypto_library, "EVP_PKEY_derive_set_peer"); OSSL_EVP_PKEY_derive = (OSSL_EVP_PKEY_derive_t *)find_crypto_symbol(crypto_library, "EVP_PKEY_derive"); OSSL_EVP_PKEY_free = (OSSL_EVP_PKEY_free_t *)find_crypto_symbol(crypto_library, "EVP_PKEY_free"); + + OSSL_ECDSA_do_sign = (OSSL_ECDSA_do_sign_t *)find_crypto_symbol(crypto_library, "ECDSA_do_sign"); + OSSL_ECDSA_do_verify = (OSSL_ECDSA_do_verify_t *)find_crypto_symbol(crypto_library, "ECDSA_do_verify"); + OSSL_ECDSA_SIG_new = (OSSL_ECDSA_SIG_new_t *)find_crypto_symbol(crypto_library, "ECDSA_SIG_new"); + OSSL_ECDSA_SIG_free = (OSSL_ECDSA_SIG_free_t *)find_crypto_symbol(crypto_library, "ECDSA_SIG_free"); + OSSL_ECDSA_SIG_get0_r = (OSSL_ECDSA_SIG_get0_r_t *)find_crypto_symbol(crypto_library, "ECDSA_SIG_get0_r"); + OSSL_ECDSA_SIG_get0_s = (OSSL_ECDSA_SIG_get0_s_t *)find_crypto_symbol(crypto_library, "ECDSA_SIG_get0_s"); + OSSL_ECDSA_SIG_set0 = (OSSL_ECDSA_SIG_set0_t *)find_crypto_symbol(crypto_library, "ECDSA_SIG_set0"); } else { OSSL_EVP_PKEY_CTX_new = NULL; OSSL_EVP_PKEY_CTX_new_id = NULL; @@ -595,6 +620,14 @@ JNIEXPORT jlong JNICALL Java_jdk_crypto_jniprovider_NativeCrypto_loadCrypto OSSL_EVP_PKEY_derive_set_peer = NULL; OSSL_EVP_PKEY_derive = NULL; OSSL_EVP_PKEY_free = NULL; + + OSSL_ECDSA_do_sign = NULL; + OSSL_ECDSA_do_verify = NULL; + OSSL_ECDSA_SIG_new = NULL; + OSSL_ECDSA_SIG_free = NULL; + OSSL_ECDSA_SIG_get0_r = NULL; + OSSL_ECDSA_SIG_get0_s = NULL; + OSSL_ECDSA_SIG_set0 = NULL; } /* Load the functions symbols for OpenSSL PBE algorithm. */ @@ -679,7 +712,14 @@ JNIEXPORT jlong JNICALL Java_jdk_crypto_jniprovider_NativeCrypto_loadCrypto (NULL == OSSL_EVP_PKEY_derive_init) || (NULL == OSSL_EVP_PKEY_derive_set_peer) || (NULL == OSSL_EVP_PKEY_derive) || - (NULL == OSSL_EVP_PKEY_free))) || + (NULL == OSSL_EVP_PKEY_free) || + (NULL == OSSL_ECDSA_do_sign) || + (NULL == OSSL_ECDSA_do_verify) || + (NULL == OSSL_ECDSA_SIG_new) || + (NULL == OSSL_ECDSA_SIG_free) || + (NULL == OSSL_ECDSA_SIG_get0_r) || + (NULL == OSSL_ECDSA_SIG_get0_s) || + (NULL == OSSL_ECDSA_SIG_set0))) || /* Check symbols that are only available in OpenSSL 1.1.x and above */ ((ossl_ver >= OPENSSL_VERSION_1_1_0) && ((NULL == OSSL_chacha20) || (NULL == OSSL_chacha20_poly1305))) || /* Check symbols that are only available in OpenSSL 1.0.x and above */ @@ -3101,6 +3141,137 @@ Java_jdk_crypto_jniprovider_NativeCrypto_PBEDerive return ret; } +/* Create an ECDSA Signature + * + * Class: jdk_crypto_jniprovider_NativeCrypto + * Method: ECDSASign + * Signature: (J[BI[B)I + */ +JNIEXPORT jint JNICALL +Java_jdk_crypto_jniprovider_NativeCrypto_ECDSASign + (JNIEnv *env, jclass obj, jlong key, jbyteArray digest, jint digestLen, jbyteArray sig, jint sigLen) +{ + jint ret = -1; + + unsigned char *nativeDigest = NULL; + unsigned char *nativeSig = NULL; + EC_KEY *privateKey = (EC_KEY *)(intptr_t)key; + ECDSA_SIG *signature = NULL; + const BIGNUM *rBN = NULL; + const BIGNUM *sBN = NULL; + + nativeDigest = (unsigned char *)((*env)->GetPrimitiveArrayCritical(env, digest, 0)); + if (NULL == nativeDigest) { + goto cleanup; + } + + signature = (*OSSL_ECDSA_do_sign)(nativeDigest, digestLen, privateKey); + if (NULL == signature) { + printf("Failed to create an ECDSA Signature.\n"); + goto cleanup; + } + + rBN = (*OSSL_ECDSA_SIG_get0_r)(signature); + sBN = (*OSSL_ECDSA_SIG_get0_s)(signature); + + nativeSig = (unsigned char *)((*env)->GetPrimitiveArrayCritical(env, sig, 0)); + if (NULL == nativeSig) { + goto cleanup; + } + + ret = getArrayFromBN(rBN, nativeSig, sigLen / 2); + if (-1 == ret) { + goto cleanup; + } + + ret = getArrayFromBN(sBN, &nativeSig[sigLen / 2], sigLen / 2); + if (-1 == ret) { + goto cleanup; + } + + ret = sigLen; + +cleanup: + if (NULL != nativeSig) { + (*env)->ReleasePrimitiveArrayCritical(env, sig, nativeSig, 0); + } + + if (NULL != signature) { + (*OSSL_ECDSA_SIG_free)(signature); + } + + if (NULL != nativeDigest) { + (*env)->ReleasePrimitiveArrayCritical(env, digest, nativeDigest, JNI_ABORT); + } + + return ret; +} + +/* Verify an ECDSA Signature + * + * Class: jdk_crypto_jniprovider_NativeCrypto + * Method: ECDSAVerify + * Signature: (J[BI[B)I + */ +JNIEXPORT jint JNICALL +Java_jdk_crypto_jniprovider_NativeCrypto_ECDSAVerify + (JNIEnv *env, jclass obj, jlong key, jbyteArray digest, jint digestLen, jbyteArray sig, jint sigLen) +{ + jint ret = -1; + + unsigned char *nativeDigest = NULL; + unsigned char *nativeSig = NULL; + EC_KEY *publicKey = (EC_KEY *)(intptr_t)key; + ECDSA_SIG *signature = NULL; + BIGNUM *rBN = NULL; + BIGNUM *sBN = NULL; + + nativeSig = (unsigned char *)((*env)->GetPrimitiveArrayCritical(env, sig, 0)); + if (NULL == nativeSig) { + goto cleanup; + } + + rBN = (*OSSL_BN_bin2bn)(nativeSig, sigLen / 2, NULL); + sBN = (*OSSL_BN_bin2bn)(&nativeSig[sigLen / 2], sigLen / 2, NULL); + signature = (*OSSL_ECDSA_SIG_new)(); + if (0 == (*OSSL_ECDSA_SIG_set0)(signature, rBN, sBN)) { + goto cleanup; + } + + nativeDigest = (unsigned char *)((*env)->GetPrimitiveArrayCritical(env, digest, 0)); + if (NULL == nativeDigest) { + goto cleanup; + } + + ret = (*OSSL_ECDSA_do_verify)(nativeDigest, digestLen, signature, publicKey); + +cleanup: + if (NULL != nativeDigest) { + (*env)->ReleasePrimitiveArrayCritical(env, digest, nativeDigest, JNI_ABORT); + } + + if (NULL != signature) { + // The BIGNUM structs will be freed by the signature. + sBN = NULL; + rBN = NULL; + (*OSSL_ECDSA_SIG_free)(signature); + } + + // In case the BIGNUM structs weren't freed by the signature. + if (NULL != sBN) { + (*OSSL_BN_free)(sBN); + } + if (NULL != rBN) { + (*OSSL_BN_free)(rBN); + } + + if (NULL != nativeSig) { + (*env)->ReleasePrimitiveArrayCritical(env, sig, nativeSig, JNI_ABORT); + } + + return ret; +} + /* Create a pair of private and public keys for XDH Key Agreement. * * Class: jdk_crypto_jniprovider_NativeCrypto diff --git a/doc/testing.html b/doc/testing.html index 25147580849..f907ef3a838 100644 --- a/doc/testing.html +++ b/doc/testing.html @@ -179,8 +179,9 @@

Test selection

The test specifications given in TEST is parsed into fully qualified test descriptors, which clearly and unambigously show which tests will be run. As an example, :tier1 will expand -to -jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1. +to include all subcomponent test directories that define `tier1`, +for example: +jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 .... You can always submit a list of fully qualified test descriptors in the TEST variable if you want to shortcut the parser.

Common Test Groups

diff --git a/doc/testing.md b/doc/testing.md index 63a869bfc1c..9a45283a98b 100644 --- a/doc/testing.md +++ b/doc/testing.md @@ -103,11 +103,11 @@ test runs, the `test TEST="x"` solution needs to be used. The test specifications given in `TEST` is parsed into fully qualified test descriptors, which clearly and unambigously show which tests will be run. As an -example, `:tier1` will expand to `jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 -jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 -jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1`. You can -always submit a list of fully qualified test descriptors in the `TEST` variable -if you want to shortcut the parser. +example, `:tier1` will expand to include all subcomponent test directories +that define `tier1`, for example: `jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 +jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 ...`. You +can always submit a list of fully qualified test descriptors in the `TEST` +variable if you want to shortcut the parser. ### Common Test Groups diff --git a/get_source.sh b/get_source.sh index 3d39994548f..e8271466a4f 100644 --- a/get_source.sh +++ b/get_source.sh @@ -22,9 +22,6 @@ # exit immediately if any unexpected error occurs set -e -openssloptions="" -DOWNLOAD_OPENSSL=false - # These maps are keyed by the prefix of option names (e.g. openj9, omr). declare -A source_branch # branch or tag declare -A source_folder # local working directory @@ -168,7 +165,7 @@ process_options() { if [[ "$arg" =~ -([A-Za-z0-9]+)-(branch|reference|repo|sha)=.* ]] ; then local key="${BASH_REMATCH[1]}" if [ -z "${source_folder[${key}]}" ] ; then - fail "Unknown option: $arg" + fail "Unknown option: '$arg'" fi local value="${arg#*=}" @@ -197,7 +194,7 @@ process_options() { break ;; *) - # bad option + fail "Unknown option: '$arg'" usage ;; esac @@ -234,7 +231,7 @@ clone_or_update_repos() { cd - > /dev/null else echo - echo "Clone repository: $folder" + echo "Cloning $folder version $branch from $url" echo git clone \ diff --git a/make/CompileDemos.gmk b/make/CompileDemos.gmk index 9339250c4fb..599ce9842e4 100644 --- a/make/CompileDemos.gmk +++ b/make/CompileDemos.gmk @@ -216,7 +216,7 @@ $(eval $(call SetupBuildDemo, SampleTree, \ )) $(eval $(call SetupBuildDemo, TableExample, \ - DISABLED_WARNINGS := rawtypes unchecked deprecation this-escape, \ + DISABLED_WARNINGS := rawtypes unchecked deprecation this-escape dangling-doc-comments, \ DEMO_SUBDIR := jfc, \ )) diff --git a/make/CompileToolsJdk.gmk b/make/CompileToolsJdk.gmk index 50ffe73a096..feba5d8a902 100644 --- a/make/CompileToolsJdk.gmk +++ b/make/CompileToolsJdk.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 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 @@ -55,7 +55,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \ build/tools/depend \ , \ BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \ - DISABLED_WARNINGS := options, \ + DISABLED_WARNINGS := dangling-doc-comments options, \ JAVAC_FLAGS := \ --add-exports java.desktop/sun.awt=ALL-UNNAMED \ --add-exports java.base/sun.text=ALL-UNNAMED \ diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk index e7d6962fb79..576bc4190b9 100644 --- a/make/GenerateLinkOptData.gmk +++ b/make/GenerateLinkOptData.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 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,6 +43,7 @@ $(eval $(call SetupJavaCompilation, CLASSLIST_JAR, \ SMALL_JAVA := false, \ SRC := $(TOPDIR)/make/jdk/src/classes, \ INCLUDES := build/tools/classlist, \ + DISABLED_WARNINGS := dangling-doc-comments, \ BIN := $(BUILDTOOLS_OUTPUTDIR)/classlist_classes, \ JAR := $(SUPPORT_OUTPUTDIR)/classlist.jar, \ )) diff --git a/make/Main.gmk b/make/Main.gmk index 0158688bac0..c029f9b7f89 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -1272,7 +1272,7 @@ all-docs-bundles: docs-jdk-bundles docs-javase-bundles docs-reference-bundles # This target builds the test image test-image: prepare-test-image test-image-jdk-jtreg-native \ test-image-demos-jdk test-image-libtest-jtreg-native \ - test-image-lib test-image-lib-native + test-image-lib-native ifneq ($(JVM_TEST_IMAGE_TARGETS), ) # If JVM_TEST_IMAGE_TARGETS is externally defined, use it instead of the diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4 index a27855d6af1..635e25ffe63 100644 --- a/make/autoconf/jdk-options.m4 +++ b/make/autoconf/jdk-options.m4 @@ -491,7 +491,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER], [ # GCC reports lots of likely false positives for stringop-truncation and format-overflow. # Silence them for now. - UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base" + UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment" UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER" UBSAN_LDFLAGS="$UBSAN_CHECKS" UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED, diff --git a/make/data/cldr/LICENSE.txt b/make/data/cldr/LICENSE similarity index 95% rename from make/data/cldr/LICENSE.txt rename to make/data/cldr/LICENSE index 4c6a432d713..99bd0beafbb 100644 --- a/make/data/cldr/LICENSE.txt +++ b/make/data/cldr/LICENSE @@ -1,8 +1,8 @@ -UNICODE LICENSE V3 +UNICODE LICENSE V3 COPYRIGHT AND PERMISSION NOTICE -Copyright © 2019-2023 Unicode, Inc. +Copyright © 1991-2024 Unicode, Inc. NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR @@ -37,3 +37,5 @@ Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. + +SPDX-License-Identifier: Unicode-3.0 diff --git a/make/data/cldr/README b/make/data/cldr/README deleted file mode 100644 index 16cb6ba56c7..00000000000 --- a/make/data/cldr/README +++ /dev/null @@ -1,4 +0,0 @@ -CLDR - Unicode Common Locale Data Repository -http://cldr.unicode.org - -CLDR version installed: 44 diff --git a/make/data/cldr/README-common.md b/make/data/cldr/README-common.md new file mode 100644 index 00000000000..cadf839fb26 --- /dev/null +++ b/make/data/cldr/README-common.md @@ -0,0 +1,10 @@ +# CLDR Common Data + +This zipfile contains [CLDR](http://cldr.unicode.org) Common Data. + +## LICENSE + +See [LICENSE.txt](./LICENSE.txt) + +>Copyright © 2019-2022 Unicode, Inc. All rights reserved. +>Distributed under the Terms of Use in https://www.unicode.org/copyright.html \ No newline at end of file diff --git a/make/data/cldr/common/bcp47/collation.xml b/make/data/cldr/common/bcp47/collation.xml index afbfa0079fd..bb51229ede1 100644 --- a/make/data/cldr/common/bcp47/collation.xml +++ b/make/data/cldr/common/bcp47/collation.xml @@ -21,7 +21,7 @@ For terms of use, see http://www.unicode.org/copyright.html - + diff --git a/make/data/cldr/common/bcp47/currency.xml b/make/data/cldr/common/bcp47/currency.xml index f357a38dd2f..7b291fba785 100644 --- a/make/data/cldr/common/bcp47/currency.xml +++ b/make/data/cldr/common/bcp47/currency.xml @@ -291,6 +291,7 @@ For terms of use, see http://www.unicode.org/copyright.html + diff --git a/make/data/cldr/common/dtd/ldml.dtd b/make/data/cldr/common/dtd/ldml.dtd index 9b9b7b60cac..d968a6962d5 100644 --- a/make/data/cldr/common/dtd/ldml.dtd +++ b/make/data/cldr/common/dtd/ldml.dtd @@ -1,7 +1,7 @@ @@ -42,7 +42,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic - + diff --git a/make/data/cldr/common/dtd/ldml.xsd b/make/data/cldr/common/dtd/ldml.xsd index 56a64a730a8..92a0f548286 100644 --- a/make/data/cldr/common/dtd/ldml.xsd +++ b/make/data/cldr/common/dtd/ldml.xsd @@ -5,9 +5,9 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file --> @@ -128,10 +128,10 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file - + - + diff --git a/make/data/cldr/common/dtd/ldmlBCP47.dtd b/make/data/cldr/common/dtd/ldmlBCP47.dtd index 14ddc68d72f..f608a6e8a60 100644 --- a/make/data/cldr/common/dtd/ldmlBCP47.dtd +++ b/make/data/cldr/common/dtd/ldmlBCP47.dtd @@ -1,7 +1,7 @@ @@ -12,7 +12,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic - + diff --git a/make/data/cldr/common/dtd/ldmlBCP47.xsd b/make/data/cldr/common/dtd/ldmlBCP47.xsd index b38e4566df4..39d6cd2d2c6 100644 --- a/make/data/cldr/common/dtd/ldmlBCP47.xsd +++ b/make/data/cldr/common/dtd/ldmlBCP47.xsd @@ -5,9 +5,9 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file --> @@ -24,10 +24,10 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file - + - + diff --git a/make/data/cldr/common/dtd/ldmlICU.dtd b/make/data/cldr/common/dtd/ldmlICU.dtd index e8abdedcbab..c6058c4c3b2 100644 --- a/make/data/cldr/common/dtd/ldmlICU.dtd +++ b/make/data/cldr/common/dtd/ldmlICU.dtd @@ -1,7 +1,7 @@ diff --git a/make/data/cldr/common/dtd/ldmlSupplemental.dtd b/make/data/cldr/common/dtd/ldmlSupplemental.dtd index 7841782b878..864e696e030 100644 --- a/make/data/cldr/common/dtd/ldmlSupplemental.dtd +++ b/make/data/cldr/common/dtd/ldmlSupplemental.dtd @@ -1,21 +1,21 @@ - + - + - + @@ -75,12 +75,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic + + - - + + + + + + @@ -388,6 +394,23 @@ CLDR data files are interpreted according to the LDML specification (http://unic + + + + + + + + + + + + + + + + @@ -432,6 +455,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic + + + @@ -912,12 +938,15 @@ CLDR data files are interpreted according to the LDML specification (http://unic - - + + + + + diff --git a/make/data/cldr/common/dtd/ldmlSupplemental.xsd b/make/data/cldr/common/dtd/ldmlSupplemental.xsd index 7c07d2b1b9e..2aeeecf1084 100644 --- a/make/data/cldr/common/dtd/ldmlSupplemental.xsd +++ b/make/data/cldr/common/dtd/ldmlSupplemental.xsd @@ -5,9 +5,9 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file --> @@ -28,6 +28,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file + @@ -63,17 +64,17 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file - + - + - + - + @@ -209,9 +210,11 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file + - + + @@ -251,6 +254,10 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file + + + + @@ -919,6 +926,32 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file + + + + + + + + + + + + + + + + + + + + + + + @@ -976,6 +1009,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file + @@ -991,6 +1025,8 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file + + @@ -2049,19 +2085,22 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file - + + + + diff --git a/make/data/cldr/common/main/aa.xml b/make/data/cldr/common/main/aa.xml index 9e4fba43ed0..bb823863fa4 100644 --- a/make/data/cldr/common/main/aa.xml +++ b/make/data/cldr/common/main/aa.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/aa_DJ.xml b/make/data/cldr/common/main/aa_DJ.xml index f8f3194a14f..e5e7af3d720 100644 --- a/make/data/cldr/common/main/aa_DJ.xml +++ b/make/data/cldr/common/main/aa_DJ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/aa_ER.xml b/make/data/cldr/common/main/aa_ER.xml index ea1daef97dc..d1d87be1704 100644 --- a/make/data/cldr/common/main/aa_ER.xml +++ b/make/data/cldr/common/main/aa_ER.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/aa_ET.xml b/make/data/cldr/common/main/aa_ET.xml index 6ccfb6dad6b..3a8f936daf9 100644 --- a/make/data/cldr/common/main/aa_ET.xml +++ b/make/data/cldr/common/main/aa_ET.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ab.xml b/make/data/cldr/common/main/ab.xml index 748b80ce388..0a0bf6d526e 100644 --- a/make/data/cldr/common/main/ab.xml +++ b/make/data/cldr/common/main/ab.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/af_ZA.xml b/make/data/cldr/common/main/af_ZA.xml index caa5bc3f19f..5d04978a1e8 100644 --- a/make/data/cldr/common/main/af_ZA.xml +++ b/make/data/cldr/common/main/af_ZA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/agq.xml b/make/data/cldr/common/main/agq.xml index 29048780424..29ca92bb633 100644 --- a/make/data/cldr/common/main/agq.xml +++ b/make/data/cldr/common/main/agq.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/agq_CM.xml b/make/data/cldr/common/main/agq_CM.xml index 8bba291e7b3..4ed8914f419 100644 --- a/make/data/cldr/common/main/agq_CM.xml +++ b/make/data/cldr/common/main/agq_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ak.xml b/make/data/cldr/common/main/ak.xml index 57e67d88f2f..210bde48f91 100644 --- a/make/data/cldr/common/main/ak.xml +++ b/make/data/cldr/common/main/ak.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ak_GH.xml b/make/data/cldr/common/main/ak_GH.xml index d93cf2563fd..820e726a52c 100644 --- a/make/data/cldr/common/main/ak_GH.xml +++ b/make/data/cldr/common/main/ak_GH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/am.xml b/make/data/cldr/common/main/am.xml index c0f69016a30..d8ed339d21c 100644 --- a/make/data/cldr/common/main/am.xml +++ b/make/data/cldr/common/main/am.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/an.xml b/make/data/cldr/common/main/an.xml index 52a1d5be479..58d722c1821 100644 --- a/make/data/cldr/common/main/an.xml +++ b/make/data/cldr/common/main/an.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/an_ES.xml b/make/data/cldr/common/main/an_ES.xml index 03e10f9bda6..7e83c2651ea 100644 --- a/make/data/cldr/common/main/an_ES.xml +++ b/make/data/cldr/common/main/an_ES.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ann.xml b/make/data/cldr/common/main/ann.xml index 2be454cafbf..49486a7f08f 100644 --- a/make/data/cldr/common/main/ann.xml +++ b/make/data/cldr/common/main/ann.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ann_NG.xml b/make/data/cldr/common/main/ann_NG.xml index 30d805cf192..66709ee4860 100644 --- a/make/data/cldr/common/main/ann_NG.xml +++ b/make/data/cldr/common/main/ann_NG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/apc.xml b/make/data/cldr/common/main/apc.xml index 91484788d5a..1db7a71aa2d 100644 --- a/make/data/cldr/common/main/apc.xml +++ b/make/data/cldr/common/main/apc.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar.xml b/make/data/cldr/common/main/ar.xml index 25dbef48553..9d980918278 100644 --- a/make/data/cldr/common/main/ar.xml +++ b/make/data/cldr/common/main/ar.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_AE.xml b/make/data/cldr/common/main/ar_AE.xml index 0c13c9f3469..16529b39227 100644 --- a/make/data/cldr/common/main/ar_AE.xml +++ b/make/data/cldr/common/main/ar_AE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_BH.xml b/make/data/cldr/common/main/ar_BH.xml index 4fbcabf7767..c105c640666 100644 --- a/make/data/cldr/common/main/ar_BH.xml +++ b/make/data/cldr/common/main/ar_BH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_DJ.xml b/make/data/cldr/common/main/ar_DJ.xml index 9b56d7ed107..434afd02fac 100644 --- a/make/data/cldr/common/main/ar_DJ.xml +++ b/make/data/cldr/common/main/ar_DJ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_DZ.xml b/make/data/cldr/common/main/ar_DZ.xml index 41c22b3822e..75594030bb0 100644 --- a/make/data/cldr/common/main/ar_DZ.xml +++ b/make/data/cldr/common/main/ar_DZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_EG.xml b/make/data/cldr/common/main/ar_EG.xml index 2959ab81a78..d135bfe0085 100644 --- a/make/data/cldr/common/main/ar_EG.xml +++ b/make/data/cldr/common/main/ar_EG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_EH.xml b/make/data/cldr/common/main/ar_EH.xml index f52fba4d9e3..881bb4af655 100644 --- a/make/data/cldr/common/main/ar_EH.xml +++ b/make/data/cldr/common/main/ar_EH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_ER.xml b/make/data/cldr/common/main/ar_ER.xml index e1952f9336f..954a1c05d9b 100644 --- a/make/data/cldr/common/main/ar_ER.xml +++ b/make/data/cldr/common/main/ar_ER.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_IL.xml b/make/data/cldr/common/main/ar_IL.xml index 0e5f1f1561b..5fed505dbd6 100644 --- a/make/data/cldr/common/main/ar_IL.xml +++ b/make/data/cldr/common/main/ar_IL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_IQ.xml b/make/data/cldr/common/main/ar_IQ.xml index 0d2f1923a1f..0520aec07df 100644 --- a/make/data/cldr/common/main/ar_IQ.xml +++ b/make/data/cldr/common/main/ar_IQ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_JO.xml b/make/data/cldr/common/main/ar_JO.xml index 76beed59cf6..59e71c756c8 100644 --- a/make/data/cldr/common/main/ar_JO.xml +++ b/make/data/cldr/common/main/ar_JO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_KM.xml b/make/data/cldr/common/main/ar_KM.xml index 543b940a627..ddb79577b6d 100644 --- a/make/data/cldr/common/main/ar_KM.xml +++ b/make/data/cldr/common/main/ar_KM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_KW.xml b/make/data/cldr/common/main/ar_KW.xml index b6614a87d18..845b88f9b7f 100644 --- a/make/data/cldr/common/main/ar_KW.xml +++ b/make/data/cldr/common/main/ar_KW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_LB.xml b/make/data/cldr/common/main/ar_LB.xml index ac3f61017fe..c048345b83f 100644 --- a/make/data/cldr/common/main/ar_LB.xml +++ b/make/data/cldr/common/main/ar_LB.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_LY.xml b/make/data/cldr/common/main/ar_LY.xml index 1d8cd68a28b..cdae03aa3fb 100644 --- a/make/data/cldr/common/main/ar_LY.xml +++ b/make/data/cldr/common/main/ar_LY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_MA.xml b/make/data/cldr/common/main/ar_MA.xml index dc7b40ddcda..2db269ed2bf 100644 --- a/make/data/cldr/common/main/ar_MA.xml +++ b/make/data/cldr/common/main/ar_MA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_MR.xml b/make/data/cldr/common/main/ar_MR.xml index 3c5b1f2bf33..1d027ddd2b0 100644 --- a/make/data/cldr/common/main/ar_MR.xml +++ b/make/data/cldr/common/main/ar_MR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_OM.xml b/make/data/cldr/common/main/ar_OM.xml index 1471e968423..aba4c2d718d 100644 --- a/make/data/cldr/common/main/ar_OM.xml +++ b/make/data/cldr/common/main/ar_OM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_PS.xml b/make/data/cldr/common/main/ar_PS.xml index 3b42f22e1bd..8d815fa7aea 100644 --- a/make/data/cldr/common/main/ar_PS.xml +++ b/make/data/cldr/common/main/ar_PS.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_QA.xml b/make/data/cldr/common/main/ar_QA.xml index 1c2c8febfa9..bf6acd6b0c4 100644 --- a/make/data/cldr/common/main/ar_QA.xml +++ b/make/data/cldr/common/main/ar_QA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_SA.xml b/make/data/cldr/common/main/ar_SA.xml index d93264e55b5..067dfa747a4 100644 --- a/make/data/cldr/common/main/ar_SA.xml +++ b/make/data/cldr/common/main/ar_SA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_SD.xml b/make/data/cldr/common/main/ar_SD.xml index e604376d98d..ca321a31d40 100644 --- a/make/data/cldr/common/main/ar_SD.xml +++ b/make/data/cldr/common/main/ar_SD.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_SO.xml b/make/data/cldr/common/main/ar_SO.xml index 0c1a603dd71..f5ff04ffce6 100644 --- a/make/data/cldr/common/main/ar_SO.xml +++ b/make/data/cldr/common/main/ar_SO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_SS.xml b/make/data/cldr/common/main/ar_SS.xml index 2760e390bb4..a48c8164978 100644 --- a/make/data/cldr/common/main/ar_SS.xml +++ b/make/data/cldr/common/main/ar_SS.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_SY.xml b/make/data/cldr/common/main/ar_SY.xml index 1cbd30b84d1..08c412f9ba0 100644 --- a/make/data/cldr/common/main/ar_SY.xml +++ b/make/data/cldr/common/main/ar_SY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_TD.xml b/make/data/cldr/common/main/ar_TD.xml index 97a3ea99b88..e3e3a7d22a4 100644 --- a/make/data/cldr/common/main/ar_TD.xml +++ b/make/data/cldr/common/main/ar_TD.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_TN.xml b/make/data/cldr/common/main/ar_TN.xml index 853b0e52fec..d62cfba3157 100644 --- a/make/data/cldr/common/main/ar_TN.xml +++ b/make/data/cldr/common/main/ar_TN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ar_YE.xml b/make/data/cldr/common/main/ar_YE.xml index 8345af2df5b..453fd471a92 100644 --- a/make/data/cldr/common/main/ar_YE.xml +++ b/make/data/cldr/common/main/ar_YE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/arn.xml b/make/data/cldr/common/main/arn.xml index cbbc0837e2f..ad324bf5568 100644 --- a/make/data/cldr/common/main/arn.xml +++ b/make/data/cldr/common/main/arn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/arn_CL.xml b/make/data/cldr/common/main/arn_CL.xml index 105e0609de8..25b3f50ca37 100644 --- a/make/data/cldr/common/main/arn_CL.xml +++ b/make/data/cldr/common/main/arn_CL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/as.xml b/make/data/cldr/common/main/as.xml index 7b3ffc64abb..a86c2f45454 100644 --- a/make/data/cldr/common/main/as.xml +++ b/make/data/cldr/common/main/as.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/asa.xml b/make/data/cldr/common/main/asa.xml index f684a84d704..b7359144dc9 100644 --- a/make/data/cldr/common/main/asa.xml +++ b/make/data/cldr/common/main/asa.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/asa_TZ.xml b/make/data/cldr/common/main/asa_TZ.xml index c1434d96272..9b70fcded72 100644 --- a/make/data/cldr/common/main/asa_TZ.xml +++ b/make/data/cldr/common/main/asa_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ast.xml b/make/data/cldr/common/main/ast.xml index d7d254866b7..aa3a3d6f652 100644 --- a/make/data/cldr/common/main/ast.xml +++ b/make/data/cldr/common/main/ast.xml @@ -1,8 +1,8 @@ - @@ -1208,7 +1208,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic orde de clasificación chinu simplificáu - GB2312 orde de clasificación de llista telefónica orde de clasificación pinyin - orde de clasificación reformáu gueta xeneral gueta por consonante Hangul d’aniciu orde de clasificación estándar @@ -3377,9 +3376,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Hora de {0} Hora braniega de {0} Hora estándar de {0} - - Santa Isabel - Hora coordinada universal @@ -3406,9 +3402,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Adelaida - - Currie - Bakú @@ -4370,11 +4363,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Hora braniega de Macáu - - - Hora de la Islla Macquarie - - Hora de Magadán @@ -4414,13 +4402,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Hora de Mawson - - - Hora del noroeste de Méxicu - Hora estándar del noroeste de Méxicu - Hora braniega del noroeste de Méxicu - - Hora del Pacíficu de Méxicu diff --git a/make/data/cldr/common/main/ast_ES.xml b/make/data/cldr/common/main/ast_ES.xml index 72d7634fed8..476f1892a4c 100644 --- a/make/data/cldr/common/main/ast_ES.xml +++ b/make/data/cldr/common/main/ast_ES.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/az.xml b/make/data/cldr/common/main/az.xml index 08cd6d60b21..2eb5a1769ef 100644 --- a/make/data/cldr/common/main/az.xml +++ b/make/data/cldr/common/main/az.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/az_Arab_IQ.xml b/make/data/cldr/common/main/az_Arab_IQ.xml index 27d806cf2a0..8445320375e 100644 --- a/make/data/cldr/common/main/az_Arab_IQ.xml +++ b/make/data/cldr/common/main/az_Arab_IQ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/az_Arab_IR.xml b/make/data/cldr/common/main/az_Arab_IR.xml index cc9305ae009..7ffa77c8b7b 100644 --- a/make/data/cldr/common/main/az_Arab_IR.xml +++ b/make/data/cldr/common/main/az_Arab_IR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/az_Arab_TR.xml b/make/data/cldr/common/main/az_Arab_TR.xml index 45d76176e2d..f6fd51e08a8 100644 --- a/make/data/cldr/common/main/az_Arab_TR.xml +++ b/make/data/cldr/common/main/az_Arab_TR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/az_Cyrl.xml b/make/data/cldr/common/main/az_Cyrl.xml index 906f8e7d0f2..1cc1e2beb92 100644 --- a/make/data/cldr/common/main/az_Cyrl.xml +++ b/make/data/cldr/common/main/az_Cyrl.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/az_Cyrl_AZ.xml b/make/data/cldr/common/main/az_Cyrl_AZ.xml index 0c23a7fc30c..0f167dc4f75 100644 --- a/make/data/cldr/common/main/az_Cyrl_AZ.xml +++ b/make/data/cldr/common/main/az_Cyrl_AZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/az_Latn.xml b/make/data/cldr/common/main/az_Latn.xml index 69a2891e01c..81c4777cdc4 100644 --- a/make/data/cldr/common/main/az_Latn.xml +++ b/make/data/cldr/common/main/az_Latn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/az_Latn_AZ.xml b/make/data/cldr/common/main/az_Latn_AZ.xml index f23b99aa94c..ceaf9de3eff 100644 --- a/make/data/cldr/common/main/az_Latn_AZ.xml +++ b/make/data/cldr/common/main/az_Latn_AZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ba.xml b/make/data/cldr/common/main/ba.xml index 372127a9384..e4fd7353647 100644 --- a/make/data/cldr/common/main/ba.xml +++ b/make/data/cldr/common/main/ba.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ba_RU.xml b/make/data/cldr/common/main/ba_RU.xml index 177674d93cf..b835b6839f7 100644 --- a/make/data/cldr/common/main/ba_RU.xml +++ b/make/data/cldr/common/main/ba_RU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bal.xml b/make/data/cldr/common/main/bal.xml index a5cd9ad9dd1..4b1b1f16696 100644 --- a/make/data/cldr/common/main/bal.xml +++ b/make/data/cldr/common/main/bal.xml @@ -1,8 +1,8 @@ - @@ -426,11 +426,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic لۆرڈ هئو اُسترالیائے گرماگی ساهت - - - ماکواریئے گیشّتگێن ساهت - - مَگَدَنئے ساهت @@ -438,13 +433,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic مَگَدَنئے گرماگی ساهت - - - شمالی مِکسیکۆئے ساهت - شمالی مِکسیکۆئے گیشّتگێن ساهت - شمالی مِکسیکۆئے گرماگی ساهت - - آرامزِری مِکسیکۆئے ساهت diff --git a/make/data/cldr/common/main/bal_Arab.xml b/make/data/cldr/common/main/bal_Arab.xml index a6fb072f7ef..9872b379b45 100644 --- a/make/data/cldr/common/main/bal_Arab.xml +++ b/make/data/cldr/common/main/bal_Arab.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bal_Arab_PK.xml b/make/data/cldr/common/main/bal_Arab_PK.xml index 0c75544898b..78d2338d90e 100644 --- a/make/data/cldr/common/main/bal_Arab_PK.xml +++ b/make/data/cldr/common/main/bal_Arab_PK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bal_Latn.xml b/make/data/cldr/common/main/bal_Latn.xml index 78bcb0e66a2..68f2f264bae 100644 --- a/make/data/cldr/common/main/bal_Latn.xml +++ b/make/data/cldr/common/main/bal_Latn.xml @@ -1,8 +1,8 @@ - @@ -419,11 +419,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Ástréliáay, Ládhaway garmági wahd - - - Makwáriay anjári wahd - - Mágadánay wahd @@ -431,13 +426,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mágadánay garmági wahd - - - Shemálrónendi Meksikóay wahd - Górichánrónendi Meksikóay anjári wahd - Shemálrónendi Meksikóay garmági wahd - - Árámzeri Meksikóay wahd diff --git a/make/data/cldr/common/main/bal_Latn_PK.xml b/make/data/cldr/common/main/bal_Latn_PK.xml index 9bfffa1f977..4d8bb32b570 100644 --- a/make/data/cldr/common/main/bal_Latn_PK.xml +++ b/make/data/cldr/common/main/bal_Latn_PK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bas.xml b/make/data/cldr/common/main/bas.xml index 1e3a4fc4964..923b500ae36 100644 --- a/make/data/cldr/common/main/bas.xml +++ b/make/data/cldr/common/main/bas.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bas_CM.xml b/make/data/cldr/common/main/bas_CM.xml index 76905e9ea31..b3766fa7fe3 100644 --- a/make/data/cldr/common/main/bas_CM.xml +++ b/make/data/cldr/common/main/bas_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/be.xml b/make/data/cldr/common/main/be.xml index 200ac68cfe6..8c1ed8788d2 100644 --- a/make/data/cldr/common/main/be.xml +++ b/make/data/cldr/common/main/be.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/be_TARASK.xml b/make/data/cldr/common/main/be_TARASK.xml index 550857a75eb..e39083692d7 100644 --- a/make/data/cldr/common/main/be_TARASK.xml +++ b/make/data/cldr/common/main/be_TARASK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bem_ZM.xml b/make/data/cldr/common/main/bem_ZM.xml index a76f60b95ee..82360f3f853 100644 --- a/make/data/cldr/common/main/bem_ZM.xml +++ b/make/data/cldr/common/main/bem_ZM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bew.xml b/make/data/cldr/common/main/bew.xml index abad9435a21..30adaac310e 100644 --- a/make/data/cldr/common/main/bew.xml +++ b/make/data/cldr/common/main/bew.xml @@ -1,8 +1,8 @@ - @@ -3009,27 +3009,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic Darussalam - - Usgorod - Kiip Akmesjid - - Saporijiah - Midwé Wék - - Jonsten - Angkorèt @@ -3652,11 +3643,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Waktu Musim Pentèr Makao - - - Waktu Pulo Macquarie - - Waktu Magadan @@ -3696,13 +3682,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Waktu Mawson - - - Waktu Mèksiko Lor-kulon - Waktu Pakem Mèksiko Lor-kulon - Waktu Musim Pentèr Mèksiko Lor-kulon - - Waktu Mèksiko Teduh diff --git a/make/data/cldr/common/main/bew_ID.xml b/make/data/cldr/common/main/bew_ID.xml index 14b6c21f07c..ce5a2c288b4 100644 --- a/make/data/cldr/common/main/bew_ID.xml +++ b/make/data/cldr/common/main/bew_ID.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bez.xml b/make/data/cldr/common/main/bez.xml index 8ed4b4ecf59..1ca290667bc 100644 --- a/make/data/cldr/common/main/bez.xml +++ b/make/data/cldr/common/main/bez.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bez_TZ.xml b/make/data/cldr/common/main/bez_TZ.xml index b9d80fc3684..d587ae72662 100644 --- a/make/data/cldr/common/main/bez_TZ.xml +++ b/make/data/cldr/common/main/bez_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bg.xml b/make/data/cldr/common/main/bg.xml index bb303d52d57..57e2140549b 100644 --- a/make/data/cldr/common/main/bg.xml +++ b/make/data/cldr/common/main/bg.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bgc.xml b/make/data/cldr/common/main/bgc.xml index 74cfb591f55..c34f081a1a8 100644 --- a/make/data/cldr/common/main/bgc.xml +++ b/make/data/cldr/common/main/bgc.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bgc_IN.xml b/make/data/cldr/common/main/bgc_IN.xml index 5cc169e31d1..5d19790f3e9 100644 --- a/make/data/cldr/common/main/bgc_IN.xml +++ b/make/data/cldr/common/main/bgc_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bgn.xml b/make/data/cldr/common/main/bgn.xml index fd2220ce03f..9d1daad06c6 100644 --- a/make/data/cldr/common/main/bgn.xml +++ b/make/data/cldr/common/main/bgn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bgn_AE.xml b/make/data/cldr/common/main/bgn_AE.xml index 773bfd72b56..b9cb9a052d4 100644 --- a/make/data/cldr/common/main/bgn_AE.xml +++ b/make/data/cldr/common/main/bgn_AE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bgn_AF.xml b/make/data/cldr/common/main/bgn_AF.xml index 53cc222ffaa..be65d4d117d 100644 --- a/make/data/cldr/common/main/bgn_AF.xml +++ b/make/data/cldr/common/main/bgn_AF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bgn_IR.xml b/make/data/cldr/common/main/bgn_IR.xml index e4eea64176d..83f9ac9da11 100644 --- a/make/data/cldr/common/main/bgn_IR.xml +++ b/make/data/cldr/common/main/bgn_IR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bgn_OM.xml b/make/data/cldr/common/main/bgn_OM.xml index 0155f7d6fb1..87fe449558c 100644 --- a/make/data/cldr/common/main/bgn_OM.xml +++ b/make/data/cldr/common/main/bgn_OM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bgn_PK.xml b/make/data/cldr/common/main/bgn_PK.xml index 456d8df2f1f..9b449ca80a5 100644 --- a/make/data/cldr/common/main/bgn_PK.xml +++ b/make/data/cldr/common/main/bgn_PK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bho.xml b/make/data/cldr/common/main/bho.xml index 03792404f48..a2fbfa63dfb 100644 --- a/make/data/cldr/common/main/bho.xml +++ b/make/data/cldr/common/main/bho.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bho_IN.xml b/make/data/cldr/common/main/bho_IN.xml index b57dc460653..650d36cc8e2 100644 --- a/make/data/cldr/common/main/bho_IN.xml +++ b/make/data/cldr/common/main/bho_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/blo.xml b/make/data/cldr/common/main/blo.xml index 868fc968dcf..f4f72e94d43 100644 --- a/make/data/cldr/common/main/blo.xml +++ b/make/data/cldr/common/main/blo.xml @@ -1,8 +1,8 @@ - @@ -1489,9 +1489,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Krɛstɔn - - Yɛloonaɩf - Ɛɖmɔntɔn @@ -1510,27 +1507,15 @@ CLDR data files are interpreted according to the LDML specification (http://unic Rɛsoluut - - Rɛɩni Riifa - Raŋkɩn Ɩnlɛɛtɩ - - Sanɖɛɛr Baɩ - - - Nipigɔn - Torɔntoo Ikaluwiit - - Panyɩrtʊʊŋ - Mɔŋtɔn @@ -2323,15 +2308,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic Ɖarɛsalaam - - Usgɔrɔɖ - Kiyɛf - - Sapɔrɔsɩyɛ - Kampalaa @@ -2344,9 +2323,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Aɖak - - Jɔnstɔn - Aŋkɔraajɩ @@ -2996,11 +2972,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic akawoo kaakɔŋkɔŋɔ̀ gafʊbaka - - - Makarii kaAtukǝltǝna kaakɔŋkɔŋɔ̀ - - Magaɖan kaakɔŋkɔŋɔ̀ @@ -3040,13 +3011,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mɔsɔn kaakɔŋkɔŋɔ̀ - - - Mɛsik gʊpɛnɛ na gɩteŋshilelaŋ kʊfɔɔ nɩ kaakɔŋkɔŋɔ̀ - Mɛsik gʊpɛnɛ na gɩteŋshilelaŋ kʊfɔɔ nɩ kaakɔŋkɔŋɔ̀ ɖeiɖei - Mɛsik gʊpɛnɛ na gɩteŋshilelaŋ kʊfɔɔ nɩ kaakɔŋkɔŋɔ̀ gafʊbaka - - Mɛsik kapasifika kaakɔŋkɔŋɔ̀ diff --git a/make/data/cldr/common/main/blo_BJ.xml b/make/data/cldr/common/main/blo_BJ.xml index dd6e8ba598e..6c98cd14af3 100644 --- a/make/data/cldr/common/main/blo_BJ.xml +++ b/make/data/cldr/common/main/blo_BJ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/blt.xml b/make/data/cldr/common/main/blt.xml index bc085ab3822..d794eb40b47 100644 --- a/make/data/cldr/common/main/blt.xml +++ b/make/data/cldr/common/main/blt.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/blt_VN.xml b/make/data/cldr/common/main/blt_VN.xml index 1746f69fb20..1b88b04e88c 100644 --- a/make/data/cldr/common/main/blt_VN.xml +++ b/make/data/cldr/common/main/blt_VN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bm.xml b/make/data/cldr/common/main/bm.xml index 116de1e5c4b..72c8c9915f8 100644 --- a/make/data/cldr/common/main/bm.xml +++ b/make/data/cldr/common/main/bm.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bm_ML.xml b/make/data/cldr/common/main/bm_ML.xml index 5536dc98f6d..0bea4c7f333 100644 --- a/make/data/cldr/common/main/bm_ML.xml +++ b/make/data/cldr/common/main/bm_ML.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bm_Nkoo.xml b/make/data/cldr/common/main/bm_Nkoo.xml index 1f4e1d5157b..2bc069dded5 100644 --- a/make/data/cldr/common/main/bm_Nkoo.xml +++ b/make/data/cldr/common/main/bm_Nkoo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bm_Nkoo_ML.xml b/make/data/cldr/common/main/bm_Nkoo_ML.xml index 3951e5f06a7..1154ba21bfb 100644 --- a/make/data/cldr/common/main/bm_Nkoo_ML.xml +++ b/make/data/cldr/common/main/bm_Nkoo_ML.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bn.xml b/make/data/cldr/common/main/bn.xml index 3d547b72ae7..8aaaeb16221 100644 --- a/make/data/cldr/common/main/bn.xml +++ b/make/data/cldr/common/main/bn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bn_IN.xml b/make/data/cldr/common/main/bn_IN.xml index ea2750e0af9..692ec6e7bc7 100644 --- a/make/data/cldr/common/main/bn_IN.xml +++ b/make/data/cldr/common/main/bn_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bo.xml b/make/data/cldr/common/main/bo.xml index 80cd0b7f928..cc6e160d830 100644 --- a/make/data/cldr/common/main/bo.xml +++ b/make/data/cldr/common/main/bo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bo_CN.xml b/make/data/cldr/common/main/bo_CN.xml index 8727c700111..468941b265b 100644 --- a/make/data/cldr/common/main/bo_CN.xml +++ b/make/data/cldr/common/main/bo_CN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bo_IN.xml b/make/data/cldr/common/main/bo_IN.xml index a2ed0e678d2..a9190c3a051 100644 --- a/make/data/cldr/common/main/bo_IN.xml +++ b/make/data/cldr/common/main/bo_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/br.xml b/make/data/cldr/common/main/br.xml index 39d71cd9f09..c299b613822 100644 --- a/make/data/cldr/common/main/br.xml +++ b/make/data/cldr/common/main/br.xml @@ -1,8 +1,8 @@ - @@ -1155,7 +1155,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic urzh rummañ sinaek eeunaet - GB2312 urzh rummañ al levr-pellgomz urzh rummañ pinyin - urzh rummañ adreizhet enklask hollek urzh rummañ standart urzh rummañ an tresoù @@ -3708,11 +3707,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic eur hañv Macau - - - eur Enez Macquarie - - eur Magadan @@ -3752,13 +3746,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic eur Mawson - - - eur Gwalarn Mecʼhiko - eur cʼhoañv Gwalarn Mecʼhiko - eur hañv Gwalarn Mecʼhiko - - eur an Habask mecʼhikan diff --git a/make/data/cldr/common/main/br_FR.xml b/make/data/cldr/common/main/br_FR.xml index b3c069557cd..38985b58329 100644 --- a/make/data/cldr/common/main/br_FR.xml +++ b/make/data/cldr/common/main/br_FR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/brx.xml b/make/data/cldr/common/main/brx.xml index de79ea76c86..e9a622735d1 100644 --- a/make/data/cldr/common/main/brx.xml +++ b/make/data/cldr/common/main/brx.xml @@ -1,8 +1,8 @@ - @@ -2078,9 +2078,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic मेलबौर्न - - करी - हबार्ट @@ -2234,9 +2231,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic क्रेस्टन - - येल्ल’नाईफ - एडमन्टन @@ -2255,30 +2249,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic रेजल्युत - - रैनी रिभार - रेनकिन इनलेट आतिककान - - थान्डार गाथोन - - - निपिग’न - टरन्ट’ इकालुईत - - पांग्नीरटुं - मक्ट’न @@ -3089,18 +3071,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic दार एस सलाम - - ऊज्ह’र’ड - कीभ सिम्फेर’प’ल - - झाप’र’झ्ये - काम्पाला @@ -3119,9 +3095,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic हनलुलु - - ज’नस्ट’न - एंकरेज @@ -3819,11 +3792,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic माकाऊ समर टाईम - - - माक्वारी द्वीप सम - - मागादान सम @@ -3863,13 +3831,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic मौसन सम - - - साहा-सोनाब मेक्सिक’ सम - साहा-सोनाब मेक्सिक’ थाखोआरि सम - साहा-सोनाब मेक्सिक’ सानारि सम - - मेक्सिक’नि पेसिफिक सम diff --git a/make/data/cldr/common/main/brx_IN.xml b/make/data/cldr/common/main/brx_IN.xml index 830883f22bc..1e20219d4e8 100644 --- a/make/data/cldr/common/main/brx_IN.xml +++ b/make/data/cldr/common/main/brx_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bs.xml b/make/data/cldr/common/main/bs.xml index 27bf53c54c2..5662ea08033 100644 --- a/make/data/cldr/common/main/bs.xml +++ b/make/data/cldr/common/main/bs.xml @@ -1,8 +1,8 @@ - @@ -2650,9 +2650,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Мелбурн - - Курие - Хобарт @@ -2806,9 +2803,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Крестон - - Јелоунајф - Едмонтон @@ -2827,30 +2821,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic Ресолут - - Рејни Ривер - Ранкин Инлет Атикокан - - Тандер Беј - - - Нипигон - Торонто Иквалуит - - Пангниртунг - Монктон @@ -3658,18 +3640,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic Дар-ес-Салам - - Ужгород - Кијев Симферопољ - - Запорожје - Кампала @@ -3688,9 +3664,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Хонолулу - - Џонстон - Енкориџ @@ -4385,11 +4358,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Макао летње рачунање вемена - - - Макверијско вријеме - - Магадан вријеме @@ -4429,13 +4397,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Мосон вријеме - - - Сјеверномексичко вријеме - Сјеверномексичко стандардно вријеме - Сјеверномексичко љетње рачунање времена - - Мексичко пацифичко вријеме diff --git a/make/data/cldr/common/main/bs_Cyrl_BA.xml b/make/data/cldr/common/main/bs_Cyrl_BA.xml index eb1ae35df4b..051a01c7e9c 100644 --- a/make/data/cldr/common/main/bs_Cyrl_BA.xml +++ b/make/data/cldr/common/main/bs_Cyrl_BA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bs_Latn.xml b/make/data/cldr/common/main/bs_Latn.xml index 96bb934703e..a48060f5de6 100644 --- a/make/data/cldr/common/main/bs_Latn.xml +++ b/make/data/cldr/common/main/bs_Latn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bs_Latn_BA.xml b/make/data/cldr/common/main/bs_Latn_BA.xml index 459f3d269c0..eb8626bd891 100644 --- a/make/data/cldr/common/main/bs_Latn_BA.xml +++ b/make/data/cldr/common/main/bs_Latn_BA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bss.xml b/make/data/cldr/common/main/bss.xml index d908632183b..509605db1b4 100644 --- a/make/data/cldr/common/main/bss.xml +++ b/make/data/cldr/common/main/bss.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/bss_CM.xml b/make/data/cldr/common/main/bss_CM.xml index be5edffb7d1..fa49ba19698 100644 --- a/make/data/cldr/common/main/bss_CM.xml +++ b/make/data/cldr/common/main/bss_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/byn.xml b/make/data/cldr/common/main/byn.xml index 35c3a7b783b..0eec9bde36e 100644 --- a/make/data/cldr/common/main/byn.xml +++ b/make/data/cldr/common/main/byn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/byn_ER.xml b/make/data/cldr/common/main/byn_ER.xml index 508caef4825..ff33c7038ab 100644 --- a/make/data/cldr/common/main/byn_ER.xml +++ b/make/data/cldr/common/main/byn_ER.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ca.xml b/make/data/cldr/common/main/ca.xml index 7e4253d90fd..cd7cc403042 100644 --- a/make/data/cldr/common/main/ca.xml +++ b/make/data/cldr/common/main/ca.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ca_ES.xml b/make/data/cldr/common/main/ca_ES.xml index 296b05a0264..85b7785b1cc 100644 --- a/make/data/cldr/common/main/ca_ES.xml +++ b/make/data/cldr/common/main/ca_ES.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ca_ES_VALENCIA.xml b/make/data/cldr/common/main/ca_ES_VALENCIA.xml index d0fce06ed8e..9c0482f08ab 100644 --- a/make/data/cldr/common/main/ca_ES_VALENCIA.xml +++ b/make/data/cldr/common/main/ca_ES_VALENCIA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ca_FR.xml b/make/data/cldr/common/main/ca_FR.xml index 0ec859c10f3..5291f34d629 100644 --- a/make/data/cldr/common/main/ca_FR.xml +++ b/make/data/cldr/common/main/ca_FR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ca_IT.xml b/make/data/cldr/common/main/ca_IT.xml index 071a3ad5e54..4220b903733 100644 --- a/make/data/cldr/common/main/ca_IT.xml +++ b/make/data/cldr/common/main/ca_IT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cad.xml b/make/data/cldr/common/main/cad.xml index 66628cd5dd5..ff354198818 100644 --- a/make/data/cldr/common/main/cad.xml +++ b/make/data/cldr/common/main/cad.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cad_US.xml b/make/data/cldr/common/main/cad_US.xml index 1ca1eff9b5a..f3a8b989566 100644 --- a/make/data/cldr/common/main/cad_US.xml +++ b/make/data/cldr/common/main/cad_US.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cch.xml b/make/data/cldr/common/main/cch.xml index 03223204d2e..1dcd468a6fe 100644 --- a/make/data/cldr/common/main/cch.xml +++ b/make/data/cldr/common/main/cch.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cch_NG.xml b/make/data/cldr/common/main/cch_NG.xml index 9f11c337973..b703402cb08 100644 --- a/make/data/cldr/common/main/cch_NG.xml +++ b/make/data/cldr/common/main/cch_NG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ccp.xml b/make/data/cldr/common/main/ccp.xml index faae1ebd256..10a56431c72 100644 --- a/make/data/cldr/common/main/ccp.xml +++ b/make/data/cldr/common/main/ccp.xml @@ -1,8 +1,8 @@ - @@ -1042,7 +1042,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𑄜𑄮𑄚𑄴𑄝𑄪𑄇𑄴 𑄥𑄎𑄚 𑄢𑄳𑄦𑄧 𑄝𑄬𑄭𑄣𑄧𑄚 𑄛𑄨𑄚𑄨𑄚𑄴 𑄥𑄎𑄚 - 𑄢𑄨𑄜𑄧𑄟𑄴𑄓𑄨 𑄝𑄬𑄭𑄣𑄧𑄚 𑄃𑄧𑄎𑄧𑄃𑄧𑄌𑄴-𑄅𑄪𑄘𑄨𑄌𑄴𑄥𑄳𑄠 𑄖𑄮𑄉𑄚 𑄦𑄋𑄴𑄉𑄪𑄣𑄴 𑄛𑄧𑄖𑄴𑄗𑄧𑄟𑄴 𑄝𑄧𑄣𑄬𑄟𑄖𑄳𑄠𑄬 𑄦𑄧𑄢𑄧𑄇𑄴 𑄘𑄨𑄚𑄬𑄭 𑄖𑄮𑄉𑄚 𑄉𑄧𑄟𑄴 𑄘𑄮𑄣𑄴 𑄝𑄬𑄭𑄣𑄧𑄚 @@ -1932,9 +1931,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic {0} 𑄃𑄧𑄇𑄴𑄖𑄧 {0} 𑄘𑄨𑄝𑄪𑄌𑄴𑄎𑄳𑄠 𑄃𑄧𑄇𑄴𑄖𑄧𑄖𑄴 {0} 𑄟𑄚𑄧𑄇𑄴 𑄃𑄧𑄇𑄴𑄖𑄧𑄖𑄴 - - 𑄥𑄚𑄴𑄖 𑄃𑄨𑄥𑄝𑄬𑄣𑄴 - 𑄘𑄇𑄴𑄘𑄨𑄠 𑄛𑄨𑄖𑄴𑄗𑄨𑄟𑄨𑄢𑄴 𑄃𑄧𑄇𑄴𑄖𑄧 @@ -2057,9 +2053,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𑄟𑄬𑄣𑄴𑄝𑄢𑄴𑄚𑄴 - - 𑄇𑄨𑄃𑄪𑄢𑄨 - 𑄦𑄮𑄝𑄢𑄴𑄑𑄴 @@ -2213,9 +2206,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𑄇𑄳𑄢𑄨𑄌𑄴𑄑𑄚𑄴 - - 𑄃𑄨𑄠𑄬𑄣𑄮𑄚𑄭𑄜𑄴 - 𑄃𑄬𑄓𑄴𑄟𑄧𑄚𑄴𑄑𑄮𑄚𑄴 @@ -2234,30 +2224,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𑄢𑄬𑄥𑄮𑄣𑄪𑄑𑄴 - - 𑄣𑄬𑄭𑄚𑄨 𑄢𑄨𑄞𑄢𑄴 - 𑄢𑄳𑄠𑄋𑄴𑄇𑄨𑄚𑄴 𑄃𑄨𑄚𑄴𑄣𑄬𑄑𑄴 𑄇𑄮𑄢𑄣𑄴 𑄦𑄢𑄴𑄝𑄢𑄴 - - 𑄐𑄚𑄴𑄓𑄢𑄴 𑄝𑄬 - - - 𑄚𑄨𑄛𑄨𑄉𑄮𑄚𑄴 - 𑄑𑄮𑄢𑄧𑄚𑄴𑄑𑄮 𑄃𑄨𑄇𑄱𑄣𑄪𑄃𑄨𑄑𑄴 - - 𑄛𑄳𑄠𑄋𑄴𑄉𑄧𑄚𑄨𑄢𑄴𑄑𑄪𑄁 - 𑄟𑄧𑄋𑄴𑄑𑄮𑄚𑄴 @@ -3050,18 +3028,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𑄘𑄢𑄴 𑄃𑄬𑄌𑄴 𑄥𑄣𑄟𑄴 - - 𑄅𑄪𑄏𑄴𑄉𑄮𑄢𑄮𑄓𑄴 - 𑄇𑄨𑄠𑄬𑄞𑄴 𑄥𑄨𑄟𑄴𑄜𑄬𑄢𑄮𑄛𑄮𑄣𑄴 - - 𑄎𑄬𑄛𑄮𑄢𑄮𑄎𑄭𑄠𑄭 - 𑄇𑄟𑄴𑄛𑄣 @@ -3080,9 +3052,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𑄦𑄧𑄚𑄮𑄣𑄪𑄣𑄪 - - 𑄎𑄧𑄚𑄴𑄥𑄳𑄑𑄧𑄚𑄴 - 𑄃𑄬𑄚𑄴𑄇𑄮𑄢𑄬𑄌𑄴 @@ -3773,11 +3742,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𑄟𑄇𑄃𑄮 𑄉𑄧𑄢𑄧𑄟𑄴𑄇𑄣𑄧𑄢𑄴 𑄃𑄧𑄇𑄴𑄖𑄧 - - - 𑄟𑄳𑄠𑄇𑄴𑄇𑄪𑄢𑄨 𑄉𑄭 𑄉𑄭 𑄞𑄬𑄘 𑄃𑄧𑄇𑄴𑄖𑄧 - - 𑄟𑄳𑄠𑄉𑄓𑄚𑄴 𑄃𑄧𑄇𑄴𑄖𑄧 @@ -3817,13 +3781,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𑄟𑄧𑄥𑄳𑄦𑄧𑄚𑄴 𑄃𑄧𑄇𑄴𑄖𑄧 - - - 𑄃𑄪𑄖𑄴𑄖𑄮𑄢𑄴 𑄛𑄧𑄏𑄨𑄟𑄴 𑄟𑄬𑄇𑄴𑄥𑄨𑄇𑄮𑄢𑄴 𑄃𑄧𑄇𑄴𑄖𑄧 - 𑄃𑄪𑄖𑄴𑄖𑄮𑄢𑄴 𑄛𑄧𑄏𑄨𑄟𑄴 𑄟𑄬𑄇𑄴𑄥𑄨𑄇𑄮𑄢𑄴 𑄟𑄚𑄧𑄇𑄴 𑄃𑄧𑄇𑄴𑄖𑄧 - 𑄃𑄪𑄖𑄴𑄖𑄮𑄢𑄴 𑄛𑄧𑄏𑄨𑄟𑄴 𑄟𑄬𑄇𑄴𑄥𑄨𑄇𑄮𑄢𑄴 𑄘𑄨𑄚𑄮𑄢𑄴 𑄃𑄧𑄇𑄴𑄖𑄧 - - 𑄟𑄬𑄇𑄴𑄥𑄨𑄇𑄚𑄴 𑄛𑄳𑄢𑄧𑄥𑄚𑄴𑄖𑄧 𑄟𑄧𑄦𑄥𑄉𑄧𑄢𑄧𑄢𑄴 𑄃𑄧𑄇𑄴𑄖𑄧 diff --git a/make/data/cldr/common/main/ccp_BD.xml b/make/data/cldr/common/main/ccp_BD.xml index 6c8cde12e61..4fbec9f8503 100644 --- a/make/data/cldr/common/main/ccp_BD.xml +++ b/make/data/cldr/common/main/ccp_BD.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ccp_IN.xml b/make/data/cldr/common/main/ccp_IN.xml index 6950d8f5c29..8d2ca5ea261 100644 --- a/make/data/cldr/common/main/ccp_IN.xml +++ b/make/data/cldr/common/main/ccp_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ce.xml b/make/data/cldr/common/main/ce.xml index 26e0494c036..6a0fcd64320 100644 --- a/make/data/cldr/common/main/ce.xml +++ b/make/data/cldr/common/main/ce.xml @@ -1,8 +1,8 @@ - @@ -1250,9 +1250,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic - - Санта-Изабел - Йоьвзуш йоцу гӀала @@ -1370,9 +1367,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Мельбурн - - Керри - Хобарт @@ -1526,9 +1520,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Крестон - - Йеллоунайф - Эдмонтон @@ -1547,30 +1538,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic Резолют - - Рейни-Ривер - Ранкин-Инлет Корал-Харбор - - Тандер-Бей - - - Нипигон - Торонто Икалуит - - Пангниртанг - Монктон @@ -2375,18 +2354,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic Дар-эс-Салам - - Ужгород - Киев Симферополь - - Запорожье - Кампала @@ -2405,9 +2378,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Гонолулу - - Джонстон - Анкоридж @@ -3043,11 +3013,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Лорд-Хау, аьхкенан хан - - - Маккуори - - Магадан @@ -3087,13 +3052,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Моусон - - - Къилбаседа Американ Мексикан хан - Къилбаседа Американ Мексикан стандартан хан - Къилбаседа Американ Мексикан аьхкенан хан - - Тийна океанан Мексикан хан diff --git a/make/data/cldr/common/main/ce_RU.xml b/make/data/cldr/common/main/ce_RU.xml index 486fd760833..98ee73d5435 100644 --- a/make/data/cldr/common/main/ce_RU.xml +++ b/make/data/cldr/common/main/ce_RU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ceb.xml b/make/data/cldr/common/main/ceb.xml index 562381cbf94..814a72dfd44 100644 --- a/make/data/cldr/common/main/ceb.xml +++ b/make/data/cldr/common/main/ceb.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cgg.xml b/make/data/cldr/common/main/cgg.xml index 17a257a2f97..ce3e6c1724e 100644 --- a/make/data/cldr/common/main/cgg.xml +++ b/make/data/cldr/common/main/cgg.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cgg_UG.xml b/make/data/cldr/common/main/cgg_UG.xml index c2c29625833..be094e50917 100644 --- a/make/data/cldr/common/main/cgg_UG.xml +++ b/make/data/cldr/common/main/cgg_UG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cho.xml b/make/data/cldr/common/main/cho.xml index 4d3cb27ada6..b82979f63cd 100644 --- a/make/data/cldr/common/main/cho.xml +++ b/make/data/cldr/common/main/cho.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cho_US.xml b/make/data/cldr/common/main/cho_US.xml index 7d860d2bed7..545a93f54a1 100644 --- a/make/data/cldr/common/main/cho_US.xml +++ b/make/data/cldr/common/main/cho_US.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/chr.xml b/make/data/cldr/common/main/chr.xml index 61d4fbe9c43..36c2aaad4c1 100644 --- a/make/data/cldr/common/main/chr.xml +++ b/make/data/cldr/common/main/chr.xml @@ -1,8 +1,8 @@ - @@ -2149,9 +2149,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ᎺᎵᏉᏁ - - ᎫᎵ - ᎰᏆᏘ @@ -2305,9 +2302,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ᏞᏍᏔᏂ - - ᏓᎶᏂᎨ ᎭᏰᏍᏗ - ᎡᏗᎹᏂᏔᏂ @@ -2326,30 +2320,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic ᎴᏐᎷᏘ - - ᎠᎦᏍᎦ ᎤᏪᏴ - ᎴᏂᎩᏂ ᎢᏂᎴᏘ ᎠᏘᎪᎦᏂ - - ᎠᏴᏓᏆᎶᏍᎦ ᎡᏉᏄᎸᏗ - - - ᏂᏈᎪᏂ - ᏙᎳᎾᏙ ᎢᏆᎷᏱᏘ - - ᏆᏂᏂᏚᏂᎦ - ᎹᎾᏔᏂ @@ -3163,18 +3145,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic Ꮣ ᎡᏏ ᏌᎳᎻ - - ᎤᏍᎪᎶᏗ - ᎩᏫ ᏏᎻᏪᎶᏉᎵ - - ᏌᏉᎶᏌᏱ - ᎧᎻᏆᎳ @@ -3198,9 +3174,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ᎭᏃᎷᎷ - - ᏣᏂᏏᏂ - ᎠᏂᎪᎴᏥ @@ -3871,11 +3844,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ᎤᎬᏫᏳᎯ ᎭᏫ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒ - - - ᎹᏇᎵ ᎤᎦᏚᏛᎢ ᎠᏟᎢᎵᏒ - - ᎹᎦᏓᏂ ᎠᏟᎢᎵᏒ @@ -3915,13 +3883,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ᎹᏌᏂ ᎠᏟᎢᎵᏒ - - - ᏧᏴᏢ ᏭᏕᎵᎬ ᎠᏂᏍᏆᏂ ᎠᏟᎢᎵᏒ - ᏧᏴᏢ ᏭᏕᎵᎬ ᎠᏂᏍᏆᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ - ᏧᏴᏢ ᏭᏕᎵᎬ ᎠᏂᏍᏆᏂ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒ - - ᎠᏂᏍᏆᏂ ᏭᏕᎵᎬ ᎠᏟᎢᎵᏒ diff --git a/make/data/cldr/common/main/chr_US.xml b/make/data/cldr/common/main/chr_US.xml index 753f7ad5e50..c4765608100 100644 --- a/make/data/cldr/common/main/chr_US.xml +++ b/make/data/cldr/common/main/chr_US.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cic.xml b/make/data/cldr/common/main/cic.xml index 3714110a8c3..19ef45c939e 100644 --- a/make/data/cldr/common/main/cic.xml +++ b/make/data/cldr/common/main/cic.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cic_US.xml b/make/data/cldr/common/main/cic_US.xml index 3eaf1b33792..06358d5e3a9 100644 --- a/make/data/cldr/common/main/cic_US.xml +++ b/make/data/cldr/common/main/cic_US.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ckb.xml b/make/data/cldr/common/main/ckb.xml index dc05102053f..e657cfdd359 100644 --- a/make/data/cldr/common/main/ckb.xml +++ b/make/data/cldr/common/main/ckb.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ckb_IQ.xml b/make/data/cldr/common/main/ckb_IQ.xml index 867fc0f702b..d5566668311 100644 --- a/make/data/cldr/common/main/ckb_IQ.xml +++ b/make/data/cldr/common/main/ckb_IQ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ckb_IR.xml b/make/data/cldr/common/main/ckb_IR.xml index 3baaa3bafb0..82e50bf7ebe 100644 --- a/make/data/cldr/common/main/ckb_IR.xml +++ b/make/data/cldr/common/main/ckb_IR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/co.xml b/make/data/cldr/common/main/co.xml index d4d846700fa..c3dc3a138e3 100644 --- a/make/data/cldr/common/main/co.xml +++ b/make/data/cldr/common/main/co.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/co_FR.xml b/make/data/cldr/common/main/co_FR.xml index b70e6839dce..7ec66b708a1 100644 --- a/make/data/cldr/common/main/co_FR.xml +++ b/make/data/cldr/common/main/co_FR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cs.xml b/make/data/cldr/common/main/cs.xml index b9d607310da..2b12c2e7923 100644 --- a/make/data/cldr/common/main/cs.xml +++ b/make/data/cldr/common/main/cs.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/csw.xml b/make/data/cldr/common/main/csw.xml index 0c69a7d45b3..aa49f5eb224 100644 --- a/make/data/cldr/common/main/csw.xml +++ b/make/data/cldr/common/main/csw.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/csw_CA.xml b/make/data/cldr/common/main/csw_CA.xml index 28baa8fd8e0..8b68feb93f8 100644 --- a/make/data/cldr/common/main/csw_CA.xml +++ b/make/data/cldr/common/main/csw_CA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cu.xml b/make/data/cldr/common/main/cu.xml index fec2d5afa47..bd6ba061339 100644 --- a/make/data/cldr/common/main/cu.xml +++ b/make/data/cldr/common/main/cu.xml @@ -1,8 +1,8 @@ - @@ -492,18 +492,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic а҆на́дырь - - ᲂу҆́жградъ - кі́евъ сѷмферꙋ́поль - - запра́жїе - среднеамерїка́нское вре́мѧ diff --git a/make/data/cldr/common/main/cu_RU.xml b/make/data/cldr/common/main/cu_RU.xml index 120c8710823..746300296e0 100644 --- a/make/data/cldr/common/main/cu_RU.xml +++ b/make/data/cldr/common/main/cu_RU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cv.xml b/make/data/cldr/common/main/cv.xml index b91b17d85b0..ef9e1f2245a 100644 --- a/make/data/cldr/common/main/cv.xml +++ b/make/data/cldr/common/main/cv.xml @@ -1,8 +1,8 @@ - @@ -1257,9 +1257,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Крестон - - Йеллоунайф - Эдмонтон @@ -1278,30 +1275,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic Резольют - - Рейни-Ривер - Ранкин-Инлет Корал-Харбор - - Тандер-Бей - - - Нипигон - Торонто Икалуит - - Пангниртанг - Монктон @@ -2109,18 +2094,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic Дар-эс-Салам - - Ужгород - Киев Симферополь - - Запорожье - Кампала @@ -2136,9 +2115,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Ном - - Джонстон - Анкоридж @@ -2774,11 +2750,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Лорд-Хау ҫуллахи вӑхӑчӗ - - - Маккуори вӑхӑчӗ - - Магадан вӑхӑчӗ @@ -2818,13 +2789,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Моусон вӑхӑчӗ - - - Ҫурҫӗр-анӑҫ Мексика вӑхӑчӗ - Ҫурҫӗр-анӑҫ Мексика стандартлӑ вӑхӑчӗ - Ҫурҫӗр-анӑҫ Мексика ҫуллахи вӑхӑчӗ - - Мексика Лӑпкӑ океан вӑхӑчӗ diff --git a/make/data/cldr/common/main/cv_RU.xml b/make/data/cldr/common/main/cv_RU.xml index 79e419ecd2e..042cde46b8a 100644 --- a/make/data/cldr/common/main/cv_RU.xml +++ b/make/data/cldr/common/main/cv_RU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/cy.xml b/make/data/cldr/common/main/cy.xml index 5cb956fede0..d9883189a70 100644 --- a/make/data/cldr/common/main/cy.xml +++ b/make/data/cldr/common/main/cy.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/da.xml b/make/data/cldr/common/main/da.xml index 80277259bd2..1bb32216e19 100644 --- a/make/data/cldr/common/main/da.xml +++ b/make/data/cldr/common/main/da.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/da_GL.xml b/make/data/cldr/common/main/da_GL.xml index e61cbdb9568..290f091331f 100644 --- a/make/data/cldr/common/main/da_GL.xml +++ b/make/data/cldr/common/main/da_GL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/dav.xml b/make/data/cldr/common/main/dav.xml index d5be35b12fe..7cd6e77a1c7 100644 --- a/make/data/cldr/common/main/dav.xml +++ b/make/data/cldr/common/main/dav.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/dav_KE.xml b/make/data/cldr/common/main/dav_KE.xml index 15c94ce0e94..b317e2e51e7 100644 --- a/make/data/cldr/common/main/dav_KE.xml +++ b/make/data/cldr/common/main/dav_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/de.xml b/make/data/cldr/common/main/de.xml index 5d7b3515abe..da9426b79f0 100644 --- a/make/data/cldr/common/main/de.xml +++ b/make/data/cldr/common/main/de.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/de_BE.xml b/make/data/cldr/common/main/de_BE.xml index b9f95deb36d..65168659e95 100644 --- a/make/data/cldr/common/main/de_BE.xml +++ b/make/data/cldr/common/main/de_BE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/de_CH.xml b/make/data/cldr/common/main/de_CH.xml index 7ab945a0a7b..db148685303 100644 --- a/make/data/cldr/common/main/de_CH.xml +++ b/make/data/cldr/common/main/de_CH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/de_DE.xml b/make/data/cldr/common/main/de_DE.xml index 6b538e156d2..215f3071fb5 100644 --- a/make/data/cldr/common/main/de_DE.xml +++ b/make/data/cldr/common/main/de_DE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/de_IT.xml b/make/data/cldr/common/main/de_IT.xml index 4c9900f4619..c02cf2d054a 100644 --- a/make/data/cldr/common/main/de_IT.xml +++ b/make/data/cldr/common/main/de_IT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/de_LI.xml b/make/data/cldr/common/main/de_LI.xml index a088c592f08..f9d02706ab8 100644 --- a/make/data/cldr/common/main/de_LI.xml +++ b/make/data/cldr/common/main/de_LI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/de_LU.xml b/make/data/cldr/common/main/de_LU.xml index d6b0047899b..3090319548c 100644 --- a/make/data/cldr/common/main/de_LU.xml +++ b/make/data/cldr/common/main/de_LU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/dje.xml b/make/data/cldr/common/main/dje.xml index e65a81575f7..72c95576a9e 100644 --- a/make/data/cldr/common/main/dje.xml +++ b/make/data/cldr/common/main/dje.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/dje_NE.xml b/make/data/cldr/common/main/dje_NE.xml index a348258a672..8cbabd42fdb 100644 --- a/make/data/cldr/common/main/dje_NE.xml +++ b/make/data/cldr/common/main/dje_NE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/doi.xml b/make/data/cldr/common/main/doi.xml index 58c92dd73a6..025c806eff5 100644 --- a/make/data/cldr/common/main/doi.xml +++ b/make/data/cldr/common/main/doi.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/doi_IN.xml b/make/data/cldr/common/main/doi_IN.xml index 5618f0f6ba2..941eaa5fda2 100644 --- a/make/data/cldr/common/main/doi_IN.xml +++ b/make/data/cldr/common/main/doi_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/dsb.xml b/make/data/cldr/common/main/dsb.xml index a47e5c68f2b..e36b50c2e4d 100644 --- a/make/data/cldr/common/main/dsb.xml +++ b/make/data/cldr/common/main/dsb.xml @@ -1,8 +1,8 @@ - @@ -2536,15 +2536,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic Daressalam - - Užgorod - Kiew - - Saporižja - Taškent @@ -3075,11 +3069,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic lěśojski cas kupy Lord-Howe - - - cas kupy Macquarie - - Magadański cas @@ -3119,13 +3108,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mawson cas - - - Mexiski dłujkowjacorny cas - Mexiski dłujkowjacorny standardny cas - Mexiski dłujkowjacorny lěśojski cas - - Mexiski pacifiski cas diff --git a/make/data/cldr/common/main/dsb_DE.xml b/make/data/cldr/common/main/dsb_DE.xml index f43aa71ad41..312a235443e 100644 --- a/make/data/cldr/common/main/dsb_DE.xml +++ b/make/data/cldr/common/main/dsb_DE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/dua.xml b/make/data/cldr/common/main/dua.xml index 1377547fbe3..0162040d704 100644 --- a/make/data/cldr/common/main/dua.xml +++ b/make/data/cldr/common/main/dua.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/dua_CM.xml b/make/data/cldr/common/main/dua_CM.xml index c69387b038d..83e862a0269 100644 --- a/make/data/cldr/common/main/dua_CM.xml +++ b/make/data/cldr/common/main/dua_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/dv.xml b/make/data/cldr/common/main/dv.xml index 278e2f1b802..c169fd9eb73 100644 --- a/make/data/cldr/common/main/dv.xml +++ b/make/data/cldr/common/main/dv.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/dv_MV.xml b/make/data/cldr/common/main/dv_MV.xml index 7d07ed90b72..3518ac6f4b2 100644 --- a/make/data/cldr/common/main/dv_MV.xml +++ b/make/data/cldr/common/main/dv_MV.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/dyo.xml b/make/data/cldr/common/main/dyo.xml index c52eaf64850..43cc0b41066 100644 --- a/make/data/cldr/common/main/dyo.xml +++ b/make/data/cldr/common/main/dyo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/dyo_SN.xml b/make/data/cldr/common/main/dyo_SN.xml index 12d37238e29..28753759b12 100644 --- a/make/data/cldr/common/main/dyo_SN.xml +++ b/make/data/cldr/common/main/dyo_SN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/dz.xml b/make/data/cldr/common/main/dz.xml index 5a58b42de98..b22ebf6b4cd 100644 --- a/make/data/cldr/common/main/dz.xml +++ b/make/data/cldr/common/main/dz.xml @@ -1,8 +1,8 @@ - @@ -1197,27 +1197,15 @@ CLDR data files are interpreted according to the LDML specification (http://unic རི་སོ་ལིའུཊ - - རཱེ་ནི་རི་ཝར - རེན་ཀིན་ ཨིན་ལེཊ ཨ་ཏི་ཀོ་ཀཱན - - ཐན་ཌར་ བའེ - - - ནི་པི་གཱོན - ཊོ་རོན་ཊོ - - པེང་ནིར་ཏུང - མཱོངཀ་ཊོན @@ -1551,9 +1539,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ཝེཀ - - ཇཱོནསི་ཊོན - ཡ་ཀུ་ཏཏ diff --git a/make/data/cldr/common/main/dz_BT.xml b/make/data/cldr/common/main/dz_BT.xml index 9c159da4d70..b75cafed863 100644 --- a/make/data/cldr/common/main/dz_BT.xml +++ b/make/data/cldr/common/main/dz_BT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ebu.xml b/make/data/cldr/common/main/ebu.xml index 30c61237f80..5bccad8ed18 100644 --- a/make/data/cldr/common/main/ebu.xml +++ b/make/data/cldr/common/main/ebu.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ebu_KE.xml b/make/data/cldr/common/main/ebu_KE.xml index 2d28398e8be..1be6fdd248f 100644 --- a/make/data/cldr/common/main/ebu_KE.xml +++ b/make/data/cldr/common/main/ebu_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ee.xml b/make/data/cldr/common/main/ee.xml index 4bf0edbd2bc..81b7f9cab68 100644 --- a/make/data/cldr/common/main/ee.xml +++ b/make/data/cldr/common/main/ee.xml @@ -1,8 +1,8 @@ - @@ -736,7 +736,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic chinagbe yeye ƒe ɖoɖomɔ nu fonegbalẽ me ɖoɖomɔ nu pinyin ɖoɖomɔ nu - nugbugbɔtoɖo ƒe ɖoɖomɔ nu nudidi hena zazã gbadza nudidi le hangul ƒe ɖoɖo gbãtɔ nu stroke ɖoɖomɔ nu @@ -1892,9 +1891,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Du manya - - Currie - British dzomeŋɔli gaƒoƒo me @@ -2493,11 +2489,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Makau ŋkekeme gaƒoƒome - - - Macquarie Island gaƒoƒo me - - Magadan gaƒoƒo me @@ -2537,13 +2528,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mawson gaƒoƒo me - - - Northwest Mexico gaƒoƒo me - Northwest Mexico nutome gaƒoƒo me - Northwest Mexico kele gaƒoƒo me - - Mexican Pacific gaƒoƒo me diff --git a/make/data/cldr/common/main/ee_GH.xml b/make/data/cldr/common/main/ee_GH.xml index 0bfd4e337d8..452647d5bd0 100644 --- a/make/data/cldr/common/main/ee_GH.xml +++ b/make/data/cldr/common/main/ee_GH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ee_TG.xml b/make/data/cldr/common/main/ee_TG.xml index 7ce3b1f73d7..4da0b5e63db 100644 --- a/make/data/cldr/common/main/ee_TG.xml +++ b/make/data/cldr/common/main/ee_TG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/el.xml b/make/data/cldr/common/main/el.xml index 4a521ac829c..9ad122deba5 100644 --- a/make/data/cldr/common/main/el.xml +++ b/make/data/cldr/common/main/el.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/el_GR.xml b/make/data/cldr/common/main/el_GR.xml index 63856dd3a15..486102f53d6 100644 --- a/make/data/cldr/common/main/el_GR.xml +++ b/make/data/cldr/common/main/el_GR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/el_POLYTON.xml b/make/data/cldr/common/main/el_POLYTON.xml index f1e4021e335..4ddfe8295c3 100644 --- a/make/data/cldr/common/main/el_POLYTON.xml +++ b/make/data/cldr/common/main/el_POLYTON.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en.xml b/make/data/cldr/common/main/en.xml index a2f2412d11a..3b65dba4424 100644 --- a/make/data/cldr/common/main/en.xml +++ b/make/data/cldr/common/main/en.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_AE.xml b/make/data/cldr/common/main/en_AE.xml index c4c26388be8..a06ca32f9d7 100644 --- a/make/data/cldr/common/main/en_AE.xml +++ b/make/data/cldr/common/main/en_AE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_AI.xml b/make/data/cldr/common/main/en_AI.xml index 44d2da10caa..570253439bb 100644 --- a/make/data/cldr/common/main/en_AI.xml +++ b/make/data/cldr/common/main/en_AI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_AS.xml b/make/data/cldr/common/main/en_AS.xml index e7fcacd23d7..da6ad816ab3 100644 --- a/make/data/cldr/common/main/en_AS.xml +++ b/make/data/cldr/common/main/en_AS.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_AT.xml b/make/data/cldr/common/main/en_AT.xml index 552756c4412..f9ed67e12eb 100644 --- a/make/data/cldr/common/main/en_AT.xml +++ b/make/data/cldr/common/main/en_AT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_AU.xml b/make/data/cldr/common/main/en_AU.xml index a5ab40fba87..bc112f81d07 100644 --- a/make/data/cldr/common/main/en_AU.xml +++ b/make/data/cldr/common/main/en_AU.xml @@ -1,8 +1,8 @@ - @@ -218,9 +218,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic midday - am midday - pm midday diff --git a/make/data/cldr/common/main/en_BB.xml b/make/data/cldr/common/main/en_BB.xml index 8ecf506cbde..a42ddcee867 100644 --- a/make/data/cldr/common/main/en_BB.xml +++ b/make/data/cldr/common/main/en_BB.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_BE.xml b/make/data/cldr/common/main/en_BE.xml index 200aea4694f..4f11b35c416 100644 --- a/make/data/cldr/common/main/en_BE.xml +++ b/make/data/cldr/common/main/en_BE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_BI.xml b/make/data/cldr/common/main/en_BI.xml index d32eb2e11f1..08c66ea876a 100644 --- a/make/data/cldr/common/main/en_BI.xml +++ b/make/data/cldr/common/main/en_BI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_BM.xml b/make/data/cldr/common/main/en_BM.xml index 4cd252a7a60..2751a7e6adb 100644 --- a/make/data/cldr/common/main/en_BM.xml +++ b/make/data/cldr/common/main/en_BM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_BS.xml b/make/data/cldr/common/main/en_BS.xml index b469a2612bc..606935e8738 100644 --- a/make/data/cldr/common/main/en_BS.xml +++ b/make/data/cldr/common/main/en_BS.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_BW.xml b/make/data/cldr/common/main/en_BW.xml index 25b55e6c3d3..029a68bd483 100644 --- a/make/data/cldr/common/main/en_BW.xml +++ b/make/data/cldr/common/main/en_BW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_BZ.xml b/make/data/cldr/common/main/en_BZ.xml index d1a20602fea..bf6cd9c6cd1 100644 --- a/make/data/cldr/common/main/en_BZ.xml +++ b/make/data/cldr/common/main/en_BZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_CA.xml b/make/data/cldr/common/main/en_CA.xml index b2d5234f201..f5e62a7157c 100644 --- a/make/data/cldr/common/main/en_CA.xml +++ b/make/data/cldr/common/main/en_CA.xml @@ -1,8 +1,8 @@ - @@ -413,7 +413,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic mid - a.m. + am pm mor aft @@ -1350,13 +1350,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic MVT - - - Northwest Mexico Time - Northwest Mexico Standard Time - Northwest Mexico Daylight Saving Time - - Mexican Pacific Time @@ -1529,7 +1522,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic US$ - US$ unknown currency diff --git a/make/data/cldr/common/main/en_CC.xml b/make/data/cldr/common/main/en_CC.xml index 0418a03b451..d7c89cceb05 100644 --- a/make/data/cldr/common/main/en_CC.xml +++ b/make/data/cldr/common/main/en_CC.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_CH.xml b/make/data/cldr/common/main/en_CH.xml index 8de22161bb1..eb4b4052e0a 100644 --- a/make/data/cldr/common/main/en_CH.xml +++ b/make/data/cldr/common/main/en_CH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_CK.xml b/make/data/cldr/common/main/en_CK.xml index 927f073e02b..6b90814a581 100644 --- a/make/data/cldr/common/main/en_CK.xml +++ b/make/data/cldr/common/main/en_CK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_CM.xml b/make/data/cldr/common/main/en_CM.xml index 6c317a5cf58..9e88b643c8e 100644 --- a/make/data/cldr/common/main/en_CM.xml +++ b/make/data/cldr/common/main/en_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_CX.xml b/make/data/cldr/common/main/en_CX.xml index 9fa1fa250ef..f74d58fae8d 100644 --- a/make/data/cldr/common/main/en_CX.xml +++ b/make/data/cldr/common/main/en_CX.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_CY.xml b/make/data/cldr/common/main/en_CY.xml index 68e24327a4b..246e69e27a7 100644 --- a/make/data/cldr/common/main/en_CY.xml +++ b/make/data/cldr/common/main/en_CY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_DE.xml b/make/data/cldr/common/main/en_DE.xml index a23fa9e950a..e0a78572fb7 100644 --- a/make/data/cldr/common/main/en_DE.xml +++ b/make/data/cldr/common/main/en_DE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_DG.xml b/make/data/cldr/common/main/en_DG.xml index 3450900d046..afedbcd68f1 100644 --- a/make/data/cldr/common/main/en_DG.xml +++ b/make/data/cldr/common/main/en_DG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_DK.xml b/make/data/cldr/common/main/en_DK.xml index b8bfa5dadc7..7cfe98003a3 100644 --- a/make/data/cldr/common/main/en_DK.xml +++ b/make/data/cldr/common/main/en_DK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_DM.xml b/make/data/cldr/common/main/en_DM.xml index 4ac17acab51..4865025f358 100644 --- a/make/data/cldr/common/main/en_DM.xml +++ b/make/data/cldr/common/main/en_DM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_Dsrt.xml b/make/data/cldr/common/main/en_Dsrt.xml index 3c720f8498e..4bbce7fe942 100644 --- a/make/data/cldr/common/main/en_Dsrt.xml +++ b/make/data/cldr/common/main/en_Dsrt.xml @@ -1,8 +1,8 @@ - @@ -709,9 +709,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𐐐𐐪𐑌𐐲𐑊𐐭𐑊𐐭 - - 𐐖𐐪𐑌𐑅𐐻𐐲𐑌 - 𐐁𐑍𐐿𐐲𐑉𐐮𐐾 diff --git a/make/data/cldr/common/main/en_Dsrt_US.xml b/make/data/cldr/common/main/en_Dsrt_US.xml index f5d45057f16..1f5f650afba 100644 --- a/make/data/cldr/common/main/en_Dsrt_US.xml +++ b/make/data/cldr/common/main/en_Dsrt_US.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_ER.xml b/make/data/cldr/common/main/en_ER.xml index 5f7dd967eb6..73eb1839023 100644 --- a/make/data/cldr/common/main/en_ER.xml +++ b/make/data/cldr/common/main/en_ER.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_FI.xml b/make/data/cldr/common/main/en_FI.xml index d1ea9bc084b..c5bd77f0004 100644 --- a/make/data/cldr/common/main/en_FI.xml +++ b/make/data/cldr/common/main/en_FI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_FJ.xml b/make/data/cldr/common/main/en_FJ.xml index 1b31f0bcef6..150d4c97926 100644 --- a/make/data/cldr/common/main/en_FJ.xml +++ b/make/data/cldr/common/main/en_FJ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_FK.xml b/make/data/cldr/common/main/en_FK.xml index 95fdee069c6..0043263afab 100644 --- a/make/data/cldr/common/main/en_FK.xml +++ b/make/data/cldr/common/main/en_FK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_FM.xml b/make/data/cldr/common/main/en_FM.xml index f7563fc16eb..302122d86b9 100644 --- a/make/data/cldr/common/main/en_FM.xml +++ b/make/data/cldr/common/main/en_FM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_GB.xml b/make/data/cldr/common/main/en_GB.xml index c633f865fa8..80f1237b319 100644 --- a/make/data/cldr/common/main/en_GB.xml +++ b/make/data/cldr/common/main/en_GB.xml @@ -1,8 +1,8 @@ - @@ -96,14 +96,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic - - - - am - pm - - - diff --git a/make/data/cldr/common/main/en_GD.xml b/make/data/cldr/common/main/en_GD.xml index c0b98e3aa57..ab54007ecca 100644 --- a/make/data/cldr/common/main/en_GD.xml +++ b/make/data/cldr/common/main/en_GD.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_GG.xml b/make/data/cldr/common/main/en_GG.xml index 7ac45fdb4b5..f5f305f14d7 100644 --- a/make/data/cldr/common/main/en_GG.xml +++ b/make/data/cldr/common/main/en_GG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_GH.xml b/make/data/cldr/common/main/en_GH.xml index b59605c6760..360a5852f96 100644 --- a/make/data/cldr/common/main/en_GH.xml +++ b/make/data/cldr/common/main/en_GH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_GI.xml b/make/data/cldr/common/main/en_GI.xml index e93b1ad6da1..86ebcd6d140 100644 --- a/make/data/cldr/common/main/en_GI.xml +++ b/make/data/cldr/common/main/en_GI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_GM.xml b/make/data/cldr/common/main/en_GM.xml index ae5521a7a63..e56a540ba5b 100644 --- a/make/data/cldr/common/main/en_GM.xml +++ b/make/data/cldr/common/main/en_GM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_GU.xml b/make/data/cldr/common/main/en_GU.xml index dbd7ef0561d..2da80b51ca7 100644 --- a/make/data/cldr/common/main/en_GU.xml +++ b/make/data/cldr/common/main/en_GU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_GY.xml b/make/data/cldr/common/main/en_GY.xml index 9434494aaee..01cae4613e8 100644 --- a/make/data/cldr/common/main/en_GY.xml +++ b/make/data/cldr/common/main/en_GY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_HK.xml b/make/data/cldr/common/main/en_HK.xml index fa80af6f140..55efa60afe4 100644 --- a/make/data/cldr/common/main/en_HK.xml +++ b/make/data/cldr/common/main/en_HK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_ID.xml b/make/data/cldr/common/main/en_ID.xml index dd1ef0173c2..d8967d4d32e 100644 --- a/make/data/cldr/common/main/en_ID.xml +++ b/make/data/cldr/common/main/en_ID.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_IE.xml b/make/data/cldr/common/main/en_IE.xml index c44748d4fdd..4d0cb66f64f 100644 --- a/make/data/cldr/common/main/en_IE.xml +++ b/make/data/cldr/common/main/en_IE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_IL.xml b/make/data/cldr/common/main/en_IL.xml index dc7b6dd7270..64e6712abf6 100644 --- a/make/data/cldr/common/main/en_IL.xml +++ b/make/data/cldr/common/main/en_IL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_IM.xml b/make/data/cldr/common/main/en_IM.xml index 298dc2119c4..e0cebdc97d7 100644 --- a/make/data/cldr/common/main/en_IM.xml +++ b/make/data/cldr/common/main/en_IM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_IN.xml b/make/data/cldr/common/main/en_IN.xml index 8a3de0b3eea..e92b09a0f35 100644 --- a/make/data/cldr/common/main/en_IN.xml +++ b/make/data/cldr/common/main/en_IN.xml @@ -1,8 +1,8 @@ - @@ -156,14 +156,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic - - - - am - pm - - - @@ -348,10 +340,10 @@ CLDR data files are interpreted according to the LDML specification (http://unic - 0T - 0T - 00T - 00T + 0K + 0K + 00K + 00K 0L 0L 00L @@ -362,10 +354,10 @@ CLDR data files are interpreted according to the LDML specification (http://unic 00Cr 000Cr 000Cr - 0TCr - 0TCr - 00TCr - 00TCr + 0KCr + 0KCr + 00KCr + 00KCr 0LCr 0LCr 00LCr @@ -392,14 +384,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic - ¤0T - ¤ 0T - ¤0T - ¤ 0T - ¤00T - ¤ 00T - ¤00T - ¤ 00T ¤0L ¤ 0L ¤0L @@ -420,14 +404,14 @@ CLDR data files are interpreted according to the LDML specification (http://unic ¤ 000Cr ¤000Cr ¤ 000Cr - ¤0TCr - ¤ 0TCr - ¤0TCr - ¤ 0TCr - ¤00TCr - ¤ 00TCr - ¤00TCr - ¤ 00TCr + ¤0KCr + ¤ 0KCr + ¤0KCr + ¤ 0KCr + ¤00KCr + ¤ 00KCr + ¤00KCr + ¤ 00KCr ¤0LCr ¤ 0LCr ¤0LCr diff --git a/make/data/cldr/common/main/en_IO.xml b/make/data/cldr/common/main/en_IO.xml index 32bbc146b16..92a48e14017 100644 --- a/make/data/cldr/common/main/en_IO.xml +++ b/make/data/cldr/common/main/en_IO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_JE.xml b/make/data/cldr/common/main/en_JE.xml index 175301c5a9c..bb034325375 100644 --- a/make/data/cldr/common/main/en_JE.xml +++ b/make/data/cldr/common/main/en_JE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_JM.xml b/make/data/cldr/common/main/en_JM.xml index 7b7a8a906db..95d0f7ff446 100644 --- a/make/data/cldr/common/main/en_JM.xml +++ b/make/data/cldr/common/main/en_JM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_KE.xml b/make/data/cldr/common/main/en_KE.xml index 676869a71b1..1bf5307c0fa 100644 --- a/make/data/cldr/common/main/en_KE.xml +++ b/make/data/cldr/common/main/en_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_KI.xml b/make/data/cldr/common/main/en_KI.xml index 641b0c7b763..d0e791a7af9 100644 --- a/make/data/cldr/common/main/en_KI.xml +++ b/make/data/cldr/common/main/en_KI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_KN.xml b/make/data/cldr/common/main/en_KN.xml index 29f593b7cbc..e42abe1b6ca 100644 --- a/make/data/cldr/common/main/en_KN.xml +++ b/make/data/cldr/common/main/en_KN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_KY.xml b/make/data/cldr/common/main/en_KY.xml index c03f9e247ea..63702387fea 100644 --- a/make/data/cldr/common/main/en_KY.xml +++ b/make/data/cldr/common/main/en_KY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_LC.xml b/make/data/cldr/common/main/en_LC.xml index 8fd621102ee..e1f26e6c5f8 100644 --- a/make/data/cldr/common/main/en_LC.xml +++ b/make/data/cldr/common/main/en_LC.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_LR.xml b/make/data/cldr/common/main/en_LR.xml index 4675a76a383..eb4bd35354e 100644 --- a/make/data/cldr/common/main/en_LR.xml +++ b/make/data/cldr/common/main/en_LR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_LS.xml b/make/data/cldr/common/main/en_LS.xml index 5f1b55ceb8d..1eae8537fa8 100644 --- a/make/data/cldr/common/main/en_LS.xml +++ b/make/data/cldr/common/main/en_LS.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_MG.xml b/make/data/cldr/common/main/en_MG.xml index db4d89f73ef..64b115b5eee 100644 --- a/make/data/cldr/common/main/en_MG.xml +++ b/make/data/cldr/common/main/en_MG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_MH.xml b/make/data/cldr/common/main/en_MH.xml index 40f6bc0876e..6796e9192e0 100644 --- a/make/data/cldr/common/main/en_MH.xml +++ b/make/data/cldr/common/main/en_MH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_MO.xml b/make/data/cldr/common/main/en_MO.xml index 2409398a4b0..d8d7f8b4c9a 100644 --- a/make/data/cldr/common/main/en_MO.xml +++ b/make/data/cldr/common/main/en_MO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_MP.xml b/make/data/cldr/common/main/en_MP.xml index 0a5498907f7..7dc20583a0c 100644 --- a/make/data/cldr/common/main/en_MP.xml +++ b/make/data/cldr/common/main/en_MP.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_MS.xml b/make/data/cldr/common/main/en_MS.xml index a51583748b7..8b050edc400 100644 --- a/make/data/cldr/common/main/en_MS.xml +++ b/make/data/cldr/common/main/en_MS.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_MT.xml b/make/data/cldr/common/main/en_MT.xml index 21e101d9b5d..c5a59d467ee 100644 --- a/make/data/cldr/common/main/en_MT.xml +++ b/make/data/cldr/common/main/en_MT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_MU.xml b/make/data/cldr/common/main/en_MU.xml index ca5d10c48ee..415c9633f85 100644 --- a/make/data/cldr/common/main/en_MU.xml +++ b/make/data/cldr/common/main/en_MU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_MV.xml b/make/data/cldr/common/main/en_MV.xml index c235cdf9290..ef0f012484e 100644 --- a/make/data/cldr/common/main/en_MV.xml +++ b/make/data/cldr/common/main/en_MV.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_MW.xml b/make/data/cldr/common/main/en_MW.xml index 0106749d3a4..a082ea1e795 100644 --- a/make/data/cldr/common/main/en_MW.xml +++ b/make/data/cldr/common/main/en_MW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_MY.xml b/make/data/cldr/common/main/en_MY.xml index 260e4fabb8b..b781aba1310 100644 --- a/make/data/cldr/common/main/en_MY.xml +++ b/make/data/cldr/common/main/en_MY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_NA.xml b/make/data/cldr/common/main/en_NA.xml index 6c466db1778..a805dda6fe4 100644 --- a/make/data/cldr/common/main/en_NA.xml +++ b/make/data/cldr/common/main/en_NA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_NF.xml b/make/data/cldr/common/main/en_NF.xml index b8985e4780b..f0abbefd4a5 100644 --- a/make/data/cldr/common/main/en_NF.xml +++ b/make/data/cldr/common/main/en_NF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_NG.xml b/make/data/cldr/common/main/en_NG.xml index 1cdbe002048..cfee35b5967 100644 --- a/make/data/cldr/common/main/en_NG.xml +++ b/make/data/cldr/common/main/en_NG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_NL.xml b/make/data/cldr/common/main/en_NL.xml index 50e7cdf0e9f..ad11fd2356e 100644 --- a/make/data/cldr/common/main/en_NL.xml +++ b/make/data/cldr/common/main/en_NL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_NR.xml b/make/data/cldr/common/main/en_NR.xml index 759f3d4e049..461a309c8e6 100644 --- a/make/data/cldr/common/main/en_NR.xml +++ b/make/data/cldr/common/main/en_NR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_NU.xml b/make/data/cldr/common/main/en_NU.xml index 98e4b89097e..e1f57eb64b7 100644 --- a/make/data/cldr/common/main/en_NU.xml +++ b/make/data/cldr/common/main/en_NU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_NZ.xml b/make/data/cldr/common/main/en_NZ.xml index 7f81af30aa9..9fd2ea95156 100644 --- a/make/data/cldr/common/main/en_NZ.xml +++ b/make/data/cldr/common/main/en_NZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_PG.xml b/make/data/cldr/common/main/en_PG.xml index 97e223eac5c..0f630a113de 100644 --- a/make/data/cldr/common/main/en_PG.xml +++ b/make/data/cldr/common/main/en_PG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_PH.xml b/make/data/cldr/common/main/en_PH.xml index 26299daf2c6..5c556175331 100644 --- a/make/data/cldr/common/main/en_PH.xml +++ b/make/data/cldr/common/main/en_PH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_PK.xml b/make/data/cldr/common/main/en_PK.xml index ff0180fc0f8..3707a36e215 100644 --- a/make/data/cldr/common/main/en_PK.xml +++ b/make/data/cldr/common/main/en_PK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_PN.xml b/make/data/cldr/common/main/en_PN.xml index 2979154e92a..41dfaf5a2bc 100644 --- a/make/data/cldr/common/main/en_PN.xml +++ b/make/data/cldr/common/main/en_PN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_PR.xml b/make/data/cldr/common/main/en_PR.xml index c12e1a39ec6..c2a0b54bac2 100644 --- a/make/data/cldr/common/main/en_PR.xml +++ b/make/data/cldr/common/main/en_PR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_PW.xml b/make/data/cldr/common/main/en_PW.xml index 8edce18f4bf..0e6fc103956 100644 --- a/make/data/cldr/common/main/en_PW.xml +++ b/make/data/cldr/common/main/en_PW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_RW.xml b/make/data/cldr/common/main/en_RW.xml index 43c09b5c2cb..16cec039043 100644 --- a/make/data/cldr/common/main/en_RW.xml +++ b/make/data/cldr/common/main/en_RW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_SB.xml b/make/data/cldr/common/main/en_SB.xml index 7f38a06f935..f7d8a49d231 100644 --- a/make/data/cldr/common/main/en_SB.xml +++ b/make/data/cldr/common/main/en_SB.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_SC.xml b/make/data/cldr/common/main/en_SC.xml index 3dfdfda7e60..80db50ef2ca 100644 --- a/make/data/cldr/common/main/en_SC.xml +++ b/make/data/cldr/common/main/en_SC.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_SD.xml b/make/data/cldr/common/main/en_SD.xml index 50bfa1cf5b7..9e937732564 100644 --- a/make/data/cldr/common/main/en_SD.xml +++ b/make/data/cldr/common/main/en_SD.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_SE.xml b/make/data/cldr/common/main/en_SE.xml index 7b05ba2e60e..2864cd90b2b 100644 --- a/make/data/cldr/common/main/en_SE.xml +++ b/make/data/cldr/common/main/en_SE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_SG.xml b/make/data/cldr/common/main/en_SG.xml index ec7df565a7a..970adc78ac2 100644 --- a/make/data/cldr/common/main/en_SG.xml +++ b/make/data/cldr/common/main/en_SG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_SH.xml b/make/data/cldr/common/main/en_SH.xml index e446a3d42da..70acafc3aaf 100644 --- a/make/data/cldr/common/main/en_SH.xml +++ b/make/data/cldr/common/main/en_SH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_SI.xml b/make/data/cldr/common/main/en_SI.xml index 07e78e09328..3a1d997b448 100644 --- a/make/data/cldr/common/main/en_SI.xml +++ b/make/data/cldr/common/main/en_SI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_SL.xml b/make/data/cldr/common/main/en_SL.xml index 3352baab3c4..f4a944bcf93 100644 --- a/make/data/cldr/common/main/en_SL.xml +++ b/make/data/cldr/common/main/en_SL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_SS.xml b/make/data/cldr/common/main/en_SS.xml index 6aa773e99cf..c45a113af4b 100644 --- a/make/data/cldr/common/main/en_SS.xml +++ b/make/data/cldr/common/main/en_SS.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_SX.xml b/make/data/cldr/common/main/en_SX.xml index 414c9953914..c73851eb280 100644 --- a/make/data/cldr/common/main/en_SX.xml +++ b/make/data/cldr/common/main/en_SX.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_SZ.xml b/make/data/cldr/common/main/en_SZ.xml index c3cb2fbd804..085aa49bd18 100644 --- a/make/data/cldr/common/main/en_SZ.xml +++ b/make/data/cldr/common/main/en_SZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_Shaw.xml b/make/data/cldr/common/main/en_Shaw.xml index d5fc8c91d57..39f2e23af19 100644 --- a/make/data/cldr/common/main/en_Shaw.xml +++ b/make/data/cldr/common/main/en_Shaw.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_Shaw_GB.xml b/make/data/cldr/common/main/en_Shaw_GB.xml index f5d1e58a311..2766c6c6ce2 100644 --- a/make/data/cldr/common/main/en_Shaw_GB.xml +++ b/make/data/cldr/common/main/en_Shaw_GB.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_TC.xml b/make/data/cldr/common/main/en_TC.xml index 799d960c545..716b6c0dfa5 100644 --- a/make/data/cldr/common/main/en_TC.xml +++ b/make/data/cldr/common/main/en_TC.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_TK.xml b/make/data/cldr/common/main/en_TK.xml index eea518c3b1e..2b4933cd43d 100644 --- a/make/data/cldr/common/main/en_TK.xml +++ b/make/data/cldr/common/main/en_TK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_TO.xml b/make/data/cldr/common/main/en_TO.xml index 46bf208ee24..3471fd370bc 100644 --- a/make/data/cldr/common/main/en_TO.xml +++ b/make/data/cldr/common/main/en_TO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_TT.xml b/make/data/cldr/common/main/en_TT.xml index a7997c035e8..f2cdc18acf0 100644 --- a/make/data/cldr/common/main/en_TT.xml +++ b/make/data/cldr/common/main/en_TT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_TV.xml b/make/data/cldr/common/main/en_TV.xml index 961d8bed22c..477b1b1edf8 100644 --- a/make/data/cldr/common/main/en_TV.xml +++ b/make/data/cldr/common/main/en_TV.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_TZ.xml b/make/data/cldr/common/main/en_TZ.xml index 10dfceecf00..1fb9d69f076 100644 --- a/make/data/cldr/common/main/en_TZ.xml +++ b/make/data/cldr/common/main/en_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_UG.xml b/make/data/cldr/common/main/en_UG.xml index 7c0b4340b8a..ffa4e478f08 100644 --- a/make/data/cldr/common/main/en_UG.xml +++ b/make/data/cldr/common/main/en_UG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_UM.xml b/make/data/cldr/common/main/en_UM.xml index be570e817df..90e040619f9 100644 --- a/make/data/cldr/common/main/en_UM.xml +++ b/make/data/cldr/common/main/en_UM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_US.xml b/make/data/cldr/common/main/en_US.xml index 9b090e68cd3..1098f0a192b 100644 --- a/make/data/cldr/common/main/en_US.xml +++ b/make/data/cldr/common/main/en_US.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_US_POSIX.xml b/make/data/cldr/common/main/en_US_POSIX.xml index 7b494c78f44..5a7864a4513 100644 --- a/make/data/cldr/common/main/en_US_POSIX.xml +++ b/make/data/cldr/common/main/en_US_POSIX.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_VC.xml b/make/data/cldr/common/main/en_VC.xml index e23f496b8af..5ced8633069 100644 --- a/make/data/cldr/common/main/en_VC.xml +++ b/make/data/cldr/common/main/en_VC.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_VG.xml b/make/data/cldr/common/main/en_VG.xml index 10604d44a59..bff76dad8b9 100644 --- a/make/data/cldr/common/main/en_VG.xml +++ b/make/data/cldr/common/main/en_VG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_VI.xml b/make/data/cldr/common/main/en_VI.xml index 069b002404b..2d5800e3980 100644 --- a/make/data/cldr/common/main/en_VI.xml +++ b/make/data/cldr/common/main/en_VI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_VU.xml b/make/data/cldr/common/main/en_VU.xml index 7660e9cd47f..8d072e673b2 100644 --- a/make/data/cldr/common/main/en_VU.xml +++ b/make/data/cldr/common/main/en_VU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_WS.xml b/make/data/cldr/common/main/en_WS.xml index 8e2e243fd05..c0881e59da8 100644 --- a/make/data/cldr/common/main/en_WS.xml +++ b/make/data/cldr/common/main/en_WS.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_ZA.xml b/make/data/cldr/common/main/en_ZA.xml index 20fce438ca2..7bc2afaeaba 100644 --- a/make/data/cldr/common/main/en_ZA.xml +++ b/make/data/cldr/common/main/en_ZA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_ZM.xml b/make/data/cldr/common/main/en_ZM.xml index f784a772a7b..31d055396d6 100644 --- a/make/data/cldr/common/main/en_ZM.xml +++ b/make/data/cldr/common/main/en_ZM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/en_ZW.xml b/make/data/cldr/common/main/en_ZW.xml index 094ee09e5aa..415f5896a78 100644 --- a/make/data/cldr/common/main/en_ZW.xml +++ b/make/data/cldr/common/main/en_ZW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/eo.xml b/make/data/cldr/common/main/eo.xml index 11c4191eb7f..4373940cfca 100644 --- a/make/data/cldr/common/main/eo.xml +++ b/make/data/cldr/common/main/eo.xml @@ -1,8 +1,8 @@ - @@ -2690,18 +2690,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic Daresalamo - - Uĵhorodo - Kievo Simferopolo - - Zaporiĵo - Kampalo @@ -3231,11 +3225,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Lord Howe (somera tempo) - - - makvor-insula tempo - - magadana tempo @@ -3255,13 +3244,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic maŭricia somera tempo - - - nordokcidenta meksika tempo - nordokcidenta meksika norma tempo - nordokcidenta meksika somera tempo - - pacifika meksika tempo diff --git a/make/data/cldr/common/main/eo_001.xml b/make/data/cldr/common/main/eo_001.xml index 74f71a9d7da..3092db7a06a 100644 --- a/make/data/cldr/common/main/eo_001.xml +++ b/make/data/cldr/common/main/eo_001.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es.xml b/make/data/cldr/common/main/es.xml index 2da0419dcac..b868d6c957b 100644 --- a/make/data/cldr/common/main/es.xml +++ b/make/data/cldr/common/main/es.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_BO.xml b/make/data/cldr/common/main/es_BO.xml index f807fb53906..b6090433440 100644 --- a/make/data/cldr/common/main/es_BO.xml +++ b/make/data/cldr/common/main/es_BO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_BR.xml b/make/data/cldr/common/main/es_BR.xml index 5bcd1e703fc..c98cd1291a4 100644 --- a/make/data/cldr/common/main/es_BR.xml +++ b/make/data/cldr/common/main/es_BR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_BZ.xml b/make/data/cldr/common/main/es_BZ.xml index 1ca6d551f1e..33864498795 100644 --- a/make/data/cldr/common/main/es_BZ.xml +++ b/make/data/cldr/common/main/es_BZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_CL.xml b/make/data/cldr/common/main/es_CL.xml index edfe0d580d0..f61c3a21a3d 100644 --- a/make/data/cldr/common/main/es_CL.xml +++ b/make/data/cldr/common/main/es_CL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_CO.xml b/make/data/cldr/common/main/es_CO.xml index 67783e7a7fc..431c17d8ca9 100644 --- a/make/data/cldr/common/main/es_CO.xml +++ b/make/data/cldr/common/main/es_CO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_CR.xml b/make/data/cldr/common/main/es_CR.xml index a4c7dbefc79..84375254780 100644 --- a/make/data/cldr/common/main/es_CR.xml +++ b/make/data/cldr/common/main/es_CR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_CU.xml b/make/data/cldr/common/main/es_CU.xml index b6688a39c12..13f190f8d8b 100644 --- a/make/data/cldr/common/main/es_CU.xml +++ b/make/data/cldr/common/main/es_CU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_DO.xml b/make/data/cldr/common/main/es_DO.xml index 56812b66e88..d5d68e617aa 100644 --- a/make/data/cldr/common/main/es_DO.xml +++ b/make/data/cldr/common/main/es_DO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_EA.xml b/make/data/cldr/common/main/es_EA.xml index dd6744aaa56..1de5b4a13c4 100644 --- a/make/data/cldr/common/main/es_EA.xml +++ b/make/data/cldr/common/main/es_EA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_EC.xml b/make/data/cldr/common/main/es_EC.xml index dabeb20239f..d2eb9494c2c 100644 --- a/make/data/cldr/common/main/es_EC.xml +++ b/make/data/cldr/common/main/es_EC.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_ES.xml b/make/data/cldr/common/main/es_ES.xml index eb8bfa7e24a..0df424e4a51 100644 --- a/make/data/cldr/common/main/es_ES.xml +++ b/make/data/cldr/common/main/es_ES.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_GQ.xml b/make/data/cldr/common/main/es_GQ.xml index 1ddebd650aa..15c1dfd26ce 100644 --- a/make/data/cldr/common/main/es_GQ.xml +++ b/make/data/cldr/common/main/es_GQ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_GT.xml b/make/data/cldr/common/main/es_GT.xml index 861f3c8b026..c24654ffe71 100644 --- a/make/data/cldr/common/main/es_GT.xml +++ b/make/data/cldr/common/main/es_GT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_HN.xml b/make/data/cldr/common/main/es_HN.xml index 35fdf1bde92..781e326acdd 100644 --- a/make/data/cldr/common/main/es_HN.xml +++ b/make/data/cldr/common/main/es_HN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_IC.xml b/make/data/cldr/common/main/es_IC.xml index ded49b4e780..2f9d5b339e0 100644 --- a/make/data/cldr/common/main/es_IC.xml +++ b/make/data/cldr/common/main/es_IC.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_MX.xml b/make/data/cldr/common/main/es_MX.xml index b220b771097..6ff5d758521 100644 --- a/make/data/cldr/common/main/es_MX.xml +++ b/make/data/cldr/common/main/es_MX.xml @@ -1,8 +1,8 @@ - @@ -587,11 +587,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic hora de las Islas Gilbert - - - hora de la isla Macquarie - - hora de las Islas Marshall diff --git a/make/data/cldr/common/main/es_NI.xml b/make/data/cldr/common/main/es_NI.xml index 30e62addfaa..c232a99bbd3 100644 --- a/make/data/cldr/common/main/es_NI.xml +++ b/make/data/cldr/common/main/es_NI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_PA.xml b/make/data/cldr/common/main/es_PA.xml index cb5e8a1bce5..033d71b624a 100644 --- a/make/data/cldr/common/main/es_PA.xml +++ b/make/data/cldr/common/main/es_PA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_PE.xml b/make/data/cldr/common/main/es_PE.xml index 1be590a4ba3..36da049e783 100644 --- a/make/data/cldr/common/main/es_PE.xml +++ b/make/data/cldr/common/main/es_PE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_PH.xml b/make/data/cldr/common/main/es_PH.xml index 1d022d74fd5..5ad142f2182 100644 --- a/make/data/cldr/common/main/es_PH.xml +++ b/make/data/cldr/common/main/es_PH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_PR.xml b/make/data/cldr/common/main/es_PR.xml index 2db1ea0bd47..21eec4a4930 100644 --- a/make/data/cldr/common/main/es_PR.xml +++ b/make/data/cldr/common/main/es_PR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_PY.xml b/make/data/cldr/common/main/es_PY.xml index 74af58fe04b..14a760ceef0 100644 --- a/make/data/cldr/common/main/es_PY.xml +++ b/make/data/cldr/common/main/es_PY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_SV.xml b/make/data/cldr/common/main/es_SV.xml index 1dae8dd6824..f1f72ef262a 100644 --- a/make/data/cldr/common/main/es_SV.xml +++ b/make/data/cldr/common/main/es_SV.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_US.xml b/make/data/cldr/common/main/es_US.xml index 330f5434fc7..192cd37c949 100644 --- a/make/data/cldr/common/main/es_US.xml +++ b/make/data/cldr/common/main/es_US.xml @@ -1,8 +1,8 @@ - @@ -530,11 +530,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic hora del Océano Índico - - - hora de la isla Macquarie - - hora de las islas Marquesas diff --git a/make/data/cldr/common/main/es_UY.xml b/make/data/cldr/common/main/es_UY.xml index df6ce01a60f..9413f6ad750 100644 --- a/make/data/cldr/common/main/es_UY.xml +++ b/make/data/cldr/common/main/es_UY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/es_VE.xml b/make/data/cldr/common/main/es_VE.xml index 3da59310136..790b39dc6ce 100644 --- a/make/data/cldr/common/main/es_VE.xml +++ b/make/data/cldr/common/main/es_VE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/et.xml b/make/data/cldr/common/main/et.xml index e0f3c46f7ca..d592b9a84ea 100644 --- a/make/data/cldr/common/main/et.xml +++ b/make/data/cldr/common/main/et.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/eu.xml b/make/data/cldr/common/main/eu.xml index f32831ffc88..05a24b1cd26 100644 --- a/make/data/cldr/common/main/eu.xml +++ b/make/data/cldr/common/main/eu.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ewo.xml b/make/data/cldr/common/main/ewo.xml index 9d4eddd2827..b0aa0bd21bb 100644 --- a/make/data/cldr/common/main/ewo.xml +++ b/make/data/cldr/common/main/ewo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ewo_CM.xml b/make/data/cldr/common/main/ewo_CM.xml index ca40dbef826..c1ca412bec0 100644 --- a/make/data/cldr/common/main/ewo_CM.xml +++ b/make/data/cldr/common/main/ewo_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fa.xml b/make/data/cldr/common/main/fa.xml index 85f69c4d042..70b2b6af840 100644 --- a/make/data/cldr/common/main/fa.xml +++ b/make/data/cldr/common/main/fa.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fa_IR.xml b/make/data/cldr/common/main/fa_IR.xml index f1c736a2708..6bd954fe747 100644 --- a/make/data/cldr/common/main/fa_IR.xml +++ b/make/data/cldr/common/main/fa_IR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff.xml b/make/data/cldr/common/main/ff.xml index a5d227fc334..d49da7dd73a 100644 --- a/make/data/cldr/common/main/ff.xml +++ b/make/data/cldr/common/main/ff.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Adlm.xml b/make/data/cldr/common/main/ff_Adlm.xml index afd050cd485..397938de91c 100644 --- a/make/data/cldr/common/main/ff_Adlm.xml +++ b/make/data/cldr/common/main/ff_Adlm.xml @@ -1,8 +1,8 @@ - @@ -710,7 +710,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𞤄𞤢𞤸𞤢𞤥𞤢𞥄𞤧 𞤄𞤵𞥅𞤼𞤢𞥄𞤲 𞤅𞤵𞤪𞤭𞥅𞤪𞤫 𞤄𞤵𞥅𞤾𞤫𞥅 - ‮𞤄𞤮𞤼𞤧𞤵𞤱𞤢𞥄𞤲𞤢 + 𞤄𞤮𞤼𞤧𞤵𞤱𞤢𞥄𞤲𞤢 𞤄𞤫𞤤𞤢𞤪𞤵𞥅𞤧 𞤄𞤫𞤤𞤭𞥅𞥁 𞤑𞤢𞤲𞤢𞤣𞤢𞥄 @@ -3392,9 +3392,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𞤃𞤫𞤤𞤦𞤵𞥅𞤪𞤲𞤵 - - 𞤑𞤵𞥅𞤪𞤭𞥅 - 𞤖𞤵𞥅𞤦𞤢𞤪𞤼𞤵 @@ -3548,9 +3545,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𞤑𞤪𞤫𞤧𞤼𞤮𞤲 - - 𞤒𞤫𞤤𞤮𞥅𞤲𞤢𞤴𞤬 - 𞤉𞤣𞤥𞤮𞤲𞤼𞤮𞤲 @@ -3569,30 +3563,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𞤈𞤭𞤧𞤮𞤤𞤵𞥅𞤼 - - 𞤈𞤫𞤲𞤭𞥅-𞤈𞤭𞤾𞤮𞥅 - 𞤈𞤢𞤲𞤳𞤭𞤲 𞤋𞤲𞤤𞤫𞤼 𞤀𞤼𞤭𞤳𞤮𞥅𞤳𞤢𞤲 - - 𞤚𞤵𞤲𞤣𞤮𞥅 𞤄𞤫𞥅 - - - 𞤐𞤭𞤨𞤭𞤺𞤮𞤲 - 𞤚𞤮𞤪𞤮𞤲𞤼𞤮𞥅 𞤋𞤳𞤢𞤤𞤵𞤱𞤭𞤼 - - 𞤆𞤢𞤲𞤺 - 𞤃𞤮𞤲𞤳𞤼𞤮𞥅𞤲 @@ -3789,7 +3771,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𞤐𞤵𞥅𞤳 - ‮𞤋𞤼𞥆𞤮𞤳𞤮𞤪𞤼𞤮𞥅𞤪𞤥𞤭𞥅𞤼 + 𞤋𞤼𞥆𞤮𞤳𞤮𞤪𞤼𞤮𞥅𞤪𞤥𞤭𞥅𞤼 𞤁𞤢𞥄𞤲𞤥𞤢𞤪𞤳𞥃𞤢𞥄𞤾𞤲 @@ -4403,18 +4385,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𞤁𞤢𞥄𞤪𞤫-𞤅𞤢𞤤𞤢𞥄𞤥𞤵 - - 𞤓𞥅𞤶𞤢𞤪𞤵𞥅𞤣𞤵 - 𞤑𞤭𞤴𞤫𞥅𞤾 𞤅𞤭𞤥𞤬𞤫𞤪𞤨𞤮𞥅𞤤 - - 𞤟𞤢𞤨𞤮𞤪𞤵𞥅𞥁 - 𞤑𞤢𞤥𞤨𞤢𞤤𞤢 @@ -4437,9 +4413,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𞤑𞤕𞤖 - - 𞤔𞤮𞤲𞤧𞤼𞤮𞤲 - 𞤀𞤲𞤧𞤮𞤪𞤢𞥄𞤶𞤵 @@ -5127,11 +5100,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𞤑𞤭𞤶𞤮𞥅𞤪𞤫 𞤕𞤫𞥅𞤯𞤵 𞤃𞤢𞤳𞤢𞤱𞤮𞥅 - - - 𞤑𞤭𞤶𞤮𞥅𞤪𞤫 𞤅𞤵𞤪𞤭𞥅𞤪𞤫 𞤃𞤢𞤳𞤢𞥄𞤪𞤭 - - 𞤑𞤭𞤶𞤮𞥅𞤪𞤫 𞤃𞤢𞤺𞤢𞤣𞤢𞤲 @@ -5171,13 +5139,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 𞤑𞤭𞤶𞤮𞥅𞤪𞤫 𞤃𞤢𞤱𞤧𞤮𞤲 - - - 𞤑𞤭𞤶𞤮𞥅𞤪𞤫 𞤐𞤢𞤲𞤮-𞤸𞤭𞥅𞤪𞤲𞤢𞥄𞤲𞤺𞤫 𞤃𞤫𞤳𞤧𞤭𞤳𞤮𞥅 - 𞤑𞤭𞤶𞤮𞥅𞤪𞤫 𞤖𞤢𞤱𞤪𞤵𞤲𞥋𞤣𞤫 𞤐𞤢𞤲𞤮-𞤸𞤭𞥅𞤪𞤲𞤢𞥄𞤲𞤺𞤫 𞤃𞤫𞤳𞤧𞤭𞤳𞤮𞥅 - 𞤑𞤭𞤶𞤮𞥅𞤪𞤫 𞤕𞤫𞥅𞤯𞤵 𞤐𞤢𞤲𞤮-𞤸𞤭𞥅𞤪𞤲𞤢𞥄𞤲𞤺𞤫 𞤃𞤫𞤳𞤧𞤭𞤳𞤮𞥅 - - 𞤑𞤭𞤶𞤮𞥅𞤪𞤫 𞤁𞤫𞤰𞥆𞤮 𞤃𞤫𞤳𞤧𞤭𞤳𞤮𞥅 diff --git a/make/data/cldr/common/main/ff_Adlm_BF.xml b/make/data/cldr/common/main/ff_Adlm_BF.xml index 3e9e0627b1e..90be5631993 100644 --- a/make/data/cldr/common/main/ff_Adlm_BF.xml +++ b/make/data/cldr/common/main/ff_Adlm_BF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Adlm_CM.xml b/make/data/cldr/common/main/ff_Adlm_CM.xml index 3fde1300b30..3761a7efe1d 100644 --- a/make/data/cldr/common/main/ff_Adlm_CM.xml +++ b/make/data/cldr/common/main/ff_Adlm_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Adlm_GH.xml b/make/data/cldr/common/main/ff_Adlm_GH.xml index 038a168fdd0..c3477d0486e 100644 --- a/make/data/cldr/common/main/ff_Adlm_GH.xml +++ b/make/data/cldr/common/main/ff_Adlm_GH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Adlm_GM.xml b/make/data/cldr/common/main/ff_Adlm_GM.xml index bcf7075379d..35fafdbe790 100644 --- a/make/data/cldr/common/main/ff_Adlm_GM.xml +++ b/make/data/cldr/common/main/ff_Adlm_GM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Adlm_GN.xml b/make/data/cldr/common/main/ff_Adlm_GN.xml index e3c897c0e99..d8c3db1a6ac 100644 --- a/make/data/cldr/common/main/ff_Adlm_GN.xml +++ b/make/data/cldr/common/main/ff_Adlm_GN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Adlm_GW.xml b/make/data/cldr/common/main/ff_Adlm_GW.xml index 91f2cd631fe..17ce40babac 100644 --- a/make/data/cldr/common/main/ff_Adlm_GW.xml +++ b/make/data/cldr/common/main/ff_Adlm_GW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Adlm_LR.xml b/make/data/cldr/common/main/ff_Adlm_LR.xml index 35e42c9f3d9..b6c231d0808 100644 --- a/make/data/cldr/common/main/ff_Adlm_LR.xml +++ b/make/data/cldr/common/main/ff_Adlm_LR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Adlm_MR.xml b/make/data/cldr/common/main/ff_Adlm_MR.xml index e3e8053e345..0887f910fe8 100644 --- a/make/data/cldr/common/main/ff_Adlm_MR.xml +++ b/make/data/cldr/common/main/ff_Adlm_MR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Adlm_NE.xml b/make/data/cldr/common/main/ff_Adlm_NE.xml index b87cd3b98ad..27ba7a82479 100644 --- a/make/data/cldr/common/main/ff_Adlm_NE.xml +++ b/make/data/cldr/common/main/ff_Adlm_NE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Adlm_NG.xml b/make/data/cldr/common/main/ff_Adlm_NG.xml index 2049af21619..2c41f8227de 100644 --- a/make/data/cldr/common/main/ff_Adlm_NG.xml +++ b/make/data/cldr/common/main/ff_Adlm_NG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Adlm_SL.xml b/make/data/cldr/common/main/ff_Adlm_SL.xml index 0e74f05fe3f..9f82db107c5 100644 --- a/make/data/cldr/common/main/ff_Adlm_SL.xml +++ b/make/data/cldr/common/main/ff_Adlm_SL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Adlm_SN.xml b/make/data/cldr/common/main/ff_Adlm_SN.xml index 685b6f6923c..c40e32bd727 100644 --- a/make/data/cldr/common/main/ff_Adlm_SN.xml +++ b/make/data/cldr/common/main/ff_Adlm_SN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn.xml b/make/data/cldr/common/main/ff_Latn.xml index d3c7025d8e5..935b75f4483 100644 --- a/make/data/cldr/common/main/ff_Latn.xml +++ b/make/data/cldr/common/main/ff_Latn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn_BF.xml b/make/data/cldr/common/main/ff_Latn_BF.xml index 6a7679a921a..e7e67942819 100644 --- a/make/data/cldr/common/main/ff_Latn_BF.xml +++ b/make/data/cldr/common/main/ff_Latn_BF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn_CM.xml b/make/data/cldr/common/main/ff_Latn_CM.xml index e65cdd47bb1..58cb7f2cbbf 100644 --- a/make/data/cldr/common/main/ff_Latn_CM.xml +++ b/make/data/cldr/common/main/ff_Latn_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn_GH.xml b/make/data/cldr/common/main/ff_Latn_GH.xml index d51d6a2845a..e41b64f1fd1 100644 --- a/make/data/cldr/common/main/ff_Latn_GH.xml +++ b/make/data/cldr/common/main/ff_Latn_GH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn_GM.xml b/make/data/cldr/common/main/ff_Latn_GM.xml index 8e29e3085c2..201a089c5a9 100644 --- a/make/data/cldr/common/main/ff_Latn_GM.xml +++ b/make/data/cldr/common/main/ff_Latn_GM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn_GN.xml b/make/data/cldr/common/main/ff_Latn_GN.xml index 05c35ae80e2..d24fcded069 100644 --- a/make/data/cldr/common/main/ff_Latn_GN.xml +++ b/make/data/cldr/common/main/ff_Latn_GN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn_GW.xml b/make/data/cldr/common/main/ff_Latn_GW.xml index bd4cc979d2a..86129370658 100644 --- a/make/data/cldr/common/main/ff_Latn_GW.xml +++ b/make/data/cldr/common/main/ff_Latn_GW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn_LR.xml b/make/data/cldr/common/main/ff_Latn_LR.xml index c4ae1b5cd00..54833258e68 100644 --- a/make/data/cldr/common/main/ff_Latn_LR.xml +++ b/make/data/cldr/common/main/ff_Latn_LR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn_MR.xml b/make/data/cldr/common/main/ff_Latn_MR.xml index ed5cf9f5711..410874c3384 100644 --- a/make/data/cldr/common/main/ff_Latn_MR.xml +++ b/make/data/cldr/common/main/ff_Latn_MR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn_NE.xml b/make/data/cldr/common/main/ff_Latn_NE.xml index dde07b1844e..36982866935 100644 --- a/make/data/cldr/common/main/ff_Latn_NE.xml +++ b/make/data/cldr/common/main/ff_Latn_NE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn_NG.xml b/make/data/cldr/common/main/ff_Latn_NG.xml index d6c5f4bb5ce..5816f40592c 100644 --- a/make/data/cldr/common/main/ff_Latn_NG.xml +++ b/make/data/cldr/common/main/ff_Latn_NG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn_SL.xml b/make/data/cldr/common/main/ff_Latn_SL.xml index c4589017208..0cbb05f7425 100644 --- a/make/data/cldr/common/main/ff_Latn_SL.xml +++ b/make/data/cldr/common/main/ff_Latn_SL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ff_Latn_SN.xml b/make/data/cldr/common/main/ff_Latn_SN.xml index 92d54286e83..af236d68ca2 100644 --- a/make/data/cldr/common/main/ff_Latn_SN.xml +++ b/make/data/cldr/common/main/ff_Latn_SN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fi.xml b/make/data/cldr/common/main/fi.xml index 6ad756f2dfe..137ee13e624 100644 --- a/make/data/cldr/common/main/fi.xml +++ b/make/data/cldr/common/main/fi.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fil.xml b/make/data/cldr/common/main/fil.xml index 7959c590d7b..3ab1ed46273 100644 --- a/make/data/cldr/common/main/fil.xml +++ b/make/data/cldr/common/main/fil.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fo.xml b/make/data/cldr/common/main/fo.xml index 8d58f498685..ecb45b9a457 100644 --- a/make/data/cldr/common/main/fo.xml +++ b/make/data/cldr/common/main/fo.xml @@ -1,8 +1,8 @@ - @@ -2033,9 +2033,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic {0} tíð {0} summartíð {0} vanlig tíð - - Santa Isabel - Samskipað heimstíð @@ -2047,9 +2044,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Wien - - Currie - Bruxelles @@ -2186,9 +2180,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic São Tomé - - Uzhhorod - Kiev @@ -2704,11 +2695,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Lord Howe summartíð - - - Macquariesoyggj tíð - - Magadan tíð @@ -2748,13 +2734,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mawson tíð - - - Northwest Mexico tíð - Northwest Mexico vanlig tíð - Northwest Mexico summartíð - - Mexican Pacific tíð diff --git a/make/data/cldr/common/main/fo_DK.xml b/make/data/cldr/common/main/fo_DK.xml index 474d7251214..7a060794f54 100644 --- a/make/data/cldr/common/main/fo_DK.xml +++ b/make/data/cldr/common/main/fo_DK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fo_FO.xml b/make/data/cldr/common/main/fo_FO.xml index c44b292d792..0d8f10b4dba 100644 --- a/make/data/cldr/common/main/fo_FO.xml +++ b/make/data/cldr/common/main/fo_FO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr.xml b/make/data/cldr/common/main/fr.xml index 4563ac55fb6..d5ace55980e 100644 --- a/make/data/cldr/common/main/fr.xml +++ b/make/data/cldr/common/main/fr.xml @@ -1,8 +1,8 @@ - @@ -16,7 +16,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic franco-provençal ancien haut-allemand gujarati - ao Îles Géorgie du Sud et Sandwich du Sud diff --git a/make/data/cldr/common/main/fr_BF.xml b/make/data/cldr/common/main/fr_BF.xml index 04b86314676..147d05e30e0 100644 --- a/make/data/cldr/common/main/fr_BF.xml +++ b/make/data/cldr/common/main/fr_BF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_BI.xml b/make/data/cldr/common/main/fr_BI.xml index 171c8bfe69d..621d814c755 100644 --- a/make/data/cldr/common/main/fr_BI.xml +++ b/make/data/cldr/common/main/fr_BI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_BJ.xml b/make/data/cldr/common/main/fr_BJ.xml index 4a69b82e63f..10ab208c340 100644 --- a/make/data/cldr/common/main/fr_BJ.xml +++ b/make/data/cldr/common/main/fr_BJ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_BL.xml b/make/data/cldr/common/main/fr_BL.xml index 1378fbf1afa..313cdfa6439 100644 --- a/make/data/cldr/common/main/fr_BL.xml +++ b/make/data/cldr/common/main/fr_BL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_CA.xml b/make/data/cldr/common/main/fr_CA.xml index fab1d94773f..f4a523c6939 100644 --- a/make/data/cldr/common/main/fr_CA.xml +++ b/make/data/cldr/common/main/fr_CA.xml @@ -1,8 +1,8 @@ - @@ -152,7 +152,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ordre de tri chinois simplifié - GB2312 ordre de tri de l’annuaire ordre de tri pinyin - ordre de tri réformé Rechercher par consonne initiale en hangeul ordre de tri des traits ordre de tri traditionnel @@ -1526,13 +1525,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic heure avancée de Maurice - - - heure du Nord-Ouest du Mexique - heure normale du Nord-Ouest du Mexique - heure avancée du Nord-Ouest du Mexique - - heure du Pacifique mexicain @@ -2677,10 +2669,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic {0} cal {0} cal - - {0} kcal - {0} kcal - {0} kJ {0} kJ diff --git a/make/data/cldr/common/main/fr_CD.xml b/make/data/cldr/common/main/fr_CD.xml index 85c1c16bb9d..2f522cc844f 100644 --- a/make/data/cldr/common/main/fr_CD.xml +++ b/make/data/cldr/common/main/fr_CD.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_CF.xml b/make/data/cldr/common/main/fr_CF.xml index 63196bbe9fe..9cb186d2952 100644 --- a/make/data/cldr/common/main/fr_CF.xml +++ b/make/data/cldr/common/main/fr_CF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_CG.xml b/make/data/cldr/common/main/fr_CG.xml index 7a45a8376ae..e1a3b4a716a 100644 --- a/make/data/cldr/common/main/fr_CG.xml +++ b/make/data/cldr/common/main/fr_CG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_CH.xml b/make/data/cldr/common/main/fr_CH.xml index aec5ac678ae..5a168c97697 100644 --- a/make/data/cldr/common/main/fr_CH.xml +++ b/make/data/cldr/common/main/fr_CH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_CI.xml b/make/data/cldr/common/main/fr_CI.xml index 9ae53e7370e..90208c36bc6 100644 --- a/make/data/cldr/common/main/fr_CI.xml +++ b/make/data/cldr/common/main/fr_CI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_CM.xml b/make/data/cldr/common/main/fr_CM.xml index 6b087f5c2d1..6b436ac139c 100644 --- a/make/data/cldr/common/main/fr_CM.xml +++ b/make/data/cldr/common/main/fr_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_DJ.xml b/make/data/cldr/common/main/fr_DJ.xml index d746ae22152..1fc0c5046d9 100644 --- a/make/data/cldr/common/main/fr_DJ.xml +++ b/make/data/cldr/common/main/fr_DJ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_DZ.xml b/make/data/cldr/common/main/fr_DZ.xml index 64d90983297..f807f785bee 100644 --- a/make/data/cldr/common/main/fr_DZ.xml +++ b/make/data/cldr/common/main/fr_DZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_FR.xml b/make/data/cldr/common/main/fr_FR.xml index b9ec553a9fc..aa2e0e5c0dd 100644 --- a/make/data/cldr/common/main/fr_FR.xml +++ b/make/data/cldr/common/main/fr_FR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_GA.xml b/make/data/cldr/common/main/fr_GA.xml index f8a10a73af3..71b364d15fa 100644 --- a/make/data/cldr/common/main/fr_GA.xml +++ b/make/data/cldr/common/main/fr_GA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_GF.xml b/make/data/cldr/common/main/fr_GF.xml index 0ac69d58128..5ede4983f33 100644 --- a/make/data/cldr/common/main/fr_GF.xml +++ b/make/data/cldr/common/main/fr_GF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_GN.xml b/make/data/cldr/common/main/fr_GN.xml index 4bedd27acc7..21062f9a659 100644 --- a/make/data/cldr/common/main/fr_GN.xml +++ b/make/data/cldr/common/main/fr_GN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_GP.xml b/make/data/cldr/common/main/fr_GP.xml index 9daf12c7950..60d21f8a045 100644 --- a/make/data/cldr/common/main/fr_GP.xml +++ b/make/data/cldr/common/main/fr_GP.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_GQ.xml b/make/data/cldr/common/main/fr_GQ.xml index 3b4d9ba6870..bd4a2e57271 100644 --- a/make/data/cldr/common/main/fr_GQ.xml +++ b/make/data/cldr/common/main/fr_GQ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_HT.xml b/make/data/cldr/common/main/fr_HT.xml index 9264d4b22d6..67376463b43 100644 --- a/make/data/cldr/common/main/fr_HT.xml +++ b/make/data/cldr/common/main/fr_HT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_KM.xml b/make/data/cldr/common/main/fr_KM.xml index 4b4929d8ed9..4f37867f6b8 100644 --- a/make/data/cldr/common/main/fr_KM.xml +++ b/make/data/cldr/common/main/fr_KM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_LU.xml b/make/data/cldr/common/main/fr_LU.xml index 7d105961792..a4b2da9658b 100644 --- a/make/data/cldr/common/main/fr_LU.xml +++ b/make/data/cldr/common/main/fr_LU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_MA.xml b/make/data/cldr/common/main/fr_MA.xml index da0ec56f128..9a6291f72f6 100644 --- a/make/data/cldr/common/main/fr_MA.xml +++ b/make/data/cldr/common/main/fr_MA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_MC.xml b/make/data/cldr/common/main/fr_MC.xml index bfd995edf61..b0c3a56dbd4 100644 --- a/make/data/cldr/common/main/fr_MC.xml +++ b/make/data/cldr/common/main/fr_MC.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_MF.xml b/make/data/cldr/common/main/fr_MF.xml index ac2e8c17aaf..8e8faa565f2 100644 --- a/make/data/cldr/common/main/fr_MF.xml +++ b/make/data/cldr/common/main/fr_MF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_MG.xml b/make/data/cldr/common/main/fr_MG.xml index 773cf447a34..24f4c01fd03 100644 --- a/make/data/cldr/common/main/fr_MG.xml +++ b/make/data/cldr/common/main/fr_MG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_ML.xml b/make/data/cldr/common/main/fr_ML.xml index b3ce944479a..92baa844d7b 100644 --- a/make/data/cldr/common/main/fr_ML.xml +++ b/make/data/cldr/common/main/fr_ML.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_MQ.xml b/make/data/cldr/common/main/fr_MQ.xml index bfae71f5147..b0843cdfc3f 100644 --- a/make/data/cldr/common/main/fr_MQ.xml +++ b/make/data/cldr/common/main/fr_MQ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_MR.xml b/make/data/cldr/common/main/fr_MR.xml index 1b1b0325eae..c28494b741b 100644 --- a/make/data/cldr/common/main/fr_MR.xml +++ b/make/data/cldr/common/main/fr_MR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_MU.xml b/make/data/cldr/common/main/fr_MU.xml index 19280b8a7ae..a34ad049263 100644 --- a/make/data/cldr/common/main/fr_MU.xml +++ b/make/data/cldr/common/main/fr_MU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_NC.xml b/make/data/cldr/common/main/fr_NC.xml index a2d43be981d..5b37c39a95b 100644 --- a/make/data/cldr/common/main/fr_NC.xml +++ b/make/data/cldr/common/main/fr_NC.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_NE.xml b/make/data/cldr/common/main/fr_NE.xml index 0a5a7940a89..e9326af410d 100644 --- a/make/data/cldr/common/main/fr_NE.xml +++ b/make/data/cldr/common/main/fr_NE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_PF.xml b/make/data/cldr/common/main/fr_PF.xml index 5586e2f523e..96285e8276e 100644 --- a/make/data/cldr/common/main/fr_PF.xml +++ b/make/data/cldr/common/main/fr_PF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_PM.xml b/make/data/cldr/common/main/fr_PM.xml index 55d4d1670d8..40ffe3e536e 100644 --- a/make/data/cldr/common/main/fr_PM.xml +++ b/make/data/cldr/common/main/fr_PM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_RE.xml b/make/data/cldr/common/main/fr_RE.xml index 4f33c169aae..f86d81a11e6 100644 --- a/make/data/cldr/common/main/fr_RE.xml +++ b/make/data/cldr/common/main/fr_RE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_RW.xml b/make/data/cldr/common/main/fr_RW.xml index 82baf8660ed..8040bdfa162 100644 --- a/make/data/cldr/common/main/fr_RW.xml +++ b/make/data/cldr/common/main/fr_RW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_SC.xml b/make/data/cldr/common/main/fr_SC.xml index ea5cc52cd57..c4cb4cf1788 100644 --- a/make/data/cldr/common/main/fr_SC.xml +++ b/make/data/cldr/common/main/fr_SC.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_SN.xml b/make/data/cldr/common/main/fr_SN.xml index 124a6fc3d40..89343236f3f 100644 --- a/make/data/cldr/common/main/fr_SN.xml +++ b/make/data/cldr/common/main/fr_SN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_SY.xml b/make/data/cldr/common/main/fr_SY.xml index 6551fe91d4a..1dab23168f1 100644 --- a/make/data/cldr/common/main/fr_SY.xml +++ b/make/data/cldr/common/main/fr_SY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_TD.xml b/make/data/cldr/common/main/fr_TD.xml index 3c7a3996d34..eb5ab733d98 100644 --- a/make/data/cldr/common/main/fr_TD.xml +++ b/make/data/cldr/common/main/fr_TD.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_TG.xml b/make/data/cldr/common/main/fr_TG.xml index 1d0e1469873..a01e06a4909 100644 --- a/make/data/cldr/common/main/fr_TG.xml +++ b/make/data/cldr/common/main/fr_TG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_TN.xml b/make/data/cldr/common/main/fr_TN.xml index 7b7beb64b29..fed2ed7807f 100644 --- a/make/data/cldr/common/main/fr_TN.xml +++ b/make/data/cldr/common/main/fr_TN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_VU.xml b/make/data/cldr/common/main/fr_VU.xml index 6299c4b0c89..f9eb38f20a3 100644 --- a/make/data/cldr/common/main/fr_VU.xml +++ b/make/data/cldr/common/main/fr_VU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_WF.xml b/make/data/cldr/common/main/fr_WF.xml index 8b3ed1a9676..e644869fdc3 100644 --- a/make/data/cldr/common/main/fr_WF.xml +++ b/make/data/cldr/common/main/fr_WF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fr_YT.xml b/make/data/cldr/common/main/fr_YT.xml index 43842e13fac..134c877e30c 100644 --- a/make/data/cldr/common/main/fr_YT.xml +++ b/make/data/cldr/common/main/fr_YT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/frr.xml b/make/data/cldr/common/main/frr.xml index 20fbfe261d8..71e59e401e4 100644 --- a/make/data/cldr/common/main/frr.xml +++ b/make/data/cldr/common/main/frr.xml @@ -1,8 +1,8 @@ - @@ -1900,15 +1900,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic Taipee - - Uschhorod - Kiew - - Saporischja - Beulah, Nuurd Dakota @@ -2433,11 +2427,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Lord Howe Somertidj - - - Macquarie Eilun Tidj - - Magadan Tidj @@ -2477,13 +2466,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mawson Tidj - - - Nuurdwaast Meksiko Tidj - Nuurdwaast Meksiko Standard Tidj - Nuurdwaast Meksiko Somertidj - - Meksiko Pasiifik Tidj diff --git a/make/data/cldr/common/main/frr_DE.xml b/make/data/cldr/common/main/frr_DE.xml index e5cebfe7e3e..e4dd611312f 100644 --- a/make/data/cldr/common/main/frr_DE.xml +++ b/make/data/cldr/common/main/frr_DE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fur.xml b/make/data/cldr/common/main/fur.xml index ec137e51b12..5f2858e9bd0 100644 --- a/make/data/cldr/common/main/fur.xml +++ b/make/data/cldr/common/main/fur.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fur_IT.xml b/make/data/cldr/common/main/fur_IT.xml index cf04181644d..fcc1dfb18b4 100644 --- a/make/data/cldr/common/main/fur_IT.xml +++ b/make/data/cldr/common/main/fur_IT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/fy.xml b/make/data/cldr/common/main/fy.xml index b83df95b056..1e47da09297 100644 --- a/make/data/cldr/common/main/fy.xml +++ b/make/data/cldr/common/main/fy.xml @@ -1,8 +1,8 @@ - @@ -2308,12 +2308,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Istanboel - - Oezjhorod - - - Zaporizja - Beulah, Noard-Dakota @@ -2900,11 +2894,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Macause simmertiid - - - Macquarie-eilânske tiid - - Magadan-tiid diff --git a/make/data/cldr/common/main/fy_NL.xml b/make/data/cldr/common/main/fy_NL.xml index 5cbe6c0bfc6..db5f697c8a3 100644 --- a/make/data/cldr/common/main/fy_NL.xml +++ b/make/data/cldr/common/main/fy_NL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ga.xml b/make/data/cldr/common/main/ga.xml index d1402226e4b..a4ee7b2efbd 100644 --- a/make/data/cldr/common/main/ga.xml +++ b/make/data/cldr/common/main/ga.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ga_IE.xml b/make/data/cldr/common/main/ga_IE.xml index 8fde2cd1280..3a7250e9763 100644 --- a/make/data/cldr/common/main/ga_IE.xml +++ b/make/data/cldr/common/main/ga_IE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gaa.xml b/make/data/cldr/common/main/gaa.xml index a48870a699a..83ffd48e86e 100644 --- a/make/data/cldr/common/main/gaa.xml +++ b/make/data/cldr/common/main/gaa.xml @@ -1,8 +1,8 @@ - @@ -900,9 +900,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Ŋmeŋme Ni Ekumɔ - - Kurrie - Makwarie @@ -927,24 +924,15 @@ CLDR data files are interpreted according to the LDML specification (http://unic Kreston - - Kakla Wuɔfɔ - Swift Karɛnt Kambridge Ŋshɔnine Bibioo - - Faa Ni Nɛɔ - Rankin Ŋshɔnine - - Sarawa Ŋshɔnine Bibioo - Ikaluit @@ -1276,13 +1264,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mauritius Be Yɛ Latsa Beiaŋ - - - Meziko Kooyi-Anaigbɛ Be - Meziko Kooyi-Anaigbɛ Be Yɛ Fɛi Beiaŋ - Meziko Kooyi-Anaigbɛ Be Yɛ Latsa Beiaŋ - - Meziko Pasifik Be diff --git a/make/data/cldr/common/main/gaa_GH.xml b/make/data/cldr/common/main/gaa_GH.xml index 94f9d0dd6d5..84715929253 100644 --- a/make/data/cldr/common/main/gaa_GH.xml +++ b/make/data/cldr/common/main/gaa_GH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gd.xml b/make/data/cldr/common/main/gd.xml index 5c8144a7ea1..fb8f5039aa2 100644 --- a/make/data/cldr/common/main/gd.xml +++ b/make/data/cldr/common/main/gd.xml @@ -1,8 +1,8 @@ - @@ -1321,7 +1321,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Òrdugh seòrsachaidh na Sìnise Simplichte - GB2312 Òrdugh seòrsachaidh nan leabhraichean-fòn Òrdugh seòrsachaidh Pinyin - Òrdugh seòrsachaidh ath-leasaichte Lorg coitcheann Lorg leis a’ chiad chonnrag Hangul Òrdugh seòrsachaidh stannardach @@ -3240,9 +3239,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Tìde samhraidh: {0} Bun-àm: {0} - - Santa Isabel - Àm Uile-choitcheann Co-òrdanaichte @@ -3269,9 +3265,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Córdoba - - Currie - Sidni @@ -3332,9 +3325,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Kangiqliniq - - Pangniqtuuq - Glasbaidh @@ -4278,11 +4268,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Tìde samhraidh Macàthu - - - Àm Eilein MhicGuaire - - Àm Magadan @@ -4322,13 +4307,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Àm Mhawson - - - Àm Mheagsago an Iar-thuath - Bun-àm Mheagsago an Iar-thuath - Tìde samhraidh Mheagsago an Iar-thuath - - Àm a’ Chuain Sèimh Mheagsago diff --git a/make/data/cldr/common/main/gd_GB.xml b/make/data/cldr/common/main/gd_GB.xml index 8ff9f1b50d3..1b81536ed80 100644 --- a/make/data/cldr/common/main/gd_GB.xml +++ b/make/data/cldr/common/main/gd_GB.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gez.xml b/make/data/cldr/common/main/gez.xml index 30774449c23..bb405dabb87 100644 --- a/make/data/cldr/common/main/gez.xml +++ b/make/data/cldr/common/main/gez.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gez_ER.xml b/make/data/cldr/common/main/gez_ER.xml index c8df591a28e..f5b9ae7497e 100644 --- a/make/data/cldr/common/main/gez_ER.xml +++ b/make/data/cldr/common/main/gez_ER.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gez_ET.xml b/make/data/cldr/common/main/gez_ET.xml index 84c9083021c..c9250811ec8 100644 --- a/make/data/cldr/common/main/gez_ET.xml +++ b/make/data/cldr/common/main/gez_ET.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gl.xml b/make/data/cldr/common/main/gl.xml index 3666f14c540..cd29e464b50 100644 --- a/make/data/cldr/common/main/gl.xml +++ b/make/data/cldr/common/main/gl.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gn.xml b/make/data/cldr/common/main/gn.xml index 9b385539ee7..a1a3df585db 100644 --- a/make/data/cldr/common/main/gn.xml +++ b/make/data/cldr/common/main/gn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gn_PY.xml b/make/data/cldr/common/main/gn_PY.xml index 03fbf31e5f8..87af65ad1c6 100644 --- a/make/data/cldr/common/main/gn_PY.xml +++ b/make/data/cldr/common/main/gn_PY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gsw.xml b/make/data/cldr/common/main/gsw.xml index ade9ff1fd05..0047e032028 100644 --- a/make/data/cldr/common/main/gsw.xml +++ b/make/data/cldr/common/main/gsw.xml @@ -1,8 +1,8 @@ - @@ -1701,15 +1701,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic Daressalam - - Uschgorod - Kiew - - Saporischja - Knox diff --git a/make/data/cldr/common/main/gsw_CH.xml b/make/data/cldr/common/main/gsw_CH.xml index 85465412257..8740af7b759 100644 --- a/make/data/cldr/common/main/gsw_CH.xml +++ b/make/data/cldr/common/main/gsw_CH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gsw_FR.xml b/make/data/cldr/common/main/gsw_FR.xml index a1c1009ee47..d90c3ea2e51 100644 --- a/make/data/cldr/common/main/gsw_FR.xml +++ b/make/data/cldr/common/main/gsw_FR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gsw_LI.xml b/make/data/cldr/common/main/gsw_LI.xml index b827f1bd238..e7eba946b71 100644 --- a/make/data/cldr/common/main/gsw_LI.xml +++ b/make/data/cldr/common/main/gsw_LI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gu.xml b/make/data/cldr/common/main/gu.xml index 0c4eaad1cce..4f33a197050 100644 --- a/make/data/cldr/common/main/gu.xml +++ b/make/data/cldr/common/main/gu.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/guz.xml b/make/data/cldr/common/main/guz.xml index 81031de1e73..6e2b253a5d3 100644 --- a/make/data/cldr/common/main/guz.xml +++ b/make/data/cldr/common/main/guz.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/guz_KE.xml b/make/data/cldr/common/main/guz_KE.xml index f18f51b51ad..f7c8d95d03d 100644 --- a/make/data/cldr/common/main/guz_KE.xml +++ b/make/data/cldr/common/main/guz_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gv.xml b/make/data/cldr/common/main/gv.xml index 7644a2aec30..344a82417c2 100644 --- a/make/data/cldr/common/main/gv.xml +++ b/make/data/cldr/common/main/gv.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/gv_IM.xml b/make/data/cldr/common/main/gv_IM.xml index f684c49d148..6a8d0ac45cc 100644 --- a/make/data/cldr/common/main/gv_IM.xml +++ b/make/data/cldr/common/main/gv_IM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ha.xml b/make/data/cldr/common/main/ha.xml index edb9c6d4fa1..554c18da427 100644 --- a/make/data/cldr/common/main/ha.xml +++ b/make/data/cldr/common/main/ha.xml @@ -1,8 +1,8 @@ - @@ -2097,11 +2097,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Lokacin Rana na Vote Lord Howe - - - Lokacin Macquarie Island - - Lokacin Magadan @@ -2141,13 +2136,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Lokacin Mawson - - - Lokacin Arewa Maso Yammacin Mekziko - Tsayayyen Lokacin Arewa Maso Yammacin Mekziko - Lokacin Rana na Arewa Maso Yammacin Mekziko - - Lokacin Mekziko Pacific diff --git a/make/data/cldr/common/main/ha_Arab.xml b/make/data/cldr/common/main/ha_Arab.xml index 99c65685221..06b6eafd72f 100644 --- a/make/data/cldr/common/main/ha_Arab.xml +++ b/make/data/cldr/common/main/ha_Arab.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ha_Arab_NG.xml b/make/data/cldr/common/main/ha_Arab_NG.xml index d46dbd178e4..de44776f657 100644 --- a/make/data/cldr/common/main/ha_Arab_NG.xml +++ b/make/data/cldr/common/main/ha_Arab_NG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ha_Arab_SD.xml b/make/data/cldr/common/main/ha_Arab_SD.xml index 6c1c8acb348..d36a89d5e5f 100644 --- a/make/data/cldr/common/main/ha_Arab_SD.xml +++ b/make/data/cldr/common/main/ha_Arab_SD.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ha_GH.xml b/make/data/cldr/common/main/ha_GH.xml index 2d08c6b4045..f93141c71b4 100644 --- a/make/data/cldr/common/main/ha_GH.xml +++ b/make/data/cldr/common/main/ha_GH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ha_NE.xml b/make/data/cldr/common/main/ha_NE.xml index 53191fe4796..68391655af9 100644 --- a/make/data/cldr/common/main/ha_NE.xml +++ b/make/data/cldr/common/main/ha_NE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ha_NG.xml b/make/data/cldr/common/main/ha_NG.xml index eac780a4c92..1a42e43793a 100644 --- a/make/data/cldr/common/main/ha_NG.xml +++ b/make/data/cldr/common/main/ha_NG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/haw.xml b/make/data/cldr/common/main/haw.xml index 87a71e5c146..dadea206071 100644 --- a/make/data/cldr/common/main/haw.xml +++ b/make/data/cldr/common/main/haw.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/haw_US.xml b/make/data/cldr/common/main/haw_US.xml index fc32a964cdd..5a37f908c1c 100644 --- a/make/data/cldr/common/main/haw_US.xml +++ b/make/data/cldr/common/main/haw_US.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/he.xml b/make/data/cldr/common/main/he.xml index fc7396f4f80..d64c80493ef 100644 --- a/make/data/cldr/common/main/he.xml +++ b/make/data/cldr/common/main/he.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/hi.xml b/make/data/cldr/common/main/hi.xml index 533d1fd4fb3..33facd56c3b 100644 --- a/make/data/cldr/common/main/hi.xml +++ b/make/data/cldr/common/main/hi.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/hi_Latn.xml b/make/data/cldr/common/main/hi_Latn.xml index d2fd01e2e3e..935ec8e26b2 100644 --- a/make/data/cldr/common/main/hi_Latn.xml +++ b/make/data/cldr/common/main/hi_Latn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/hnj.xml b/make/data/cldr/common/main/hnj.xml index 671bf4da2a6..6492ca8dc35 100644 --- a/make/data/cldr/common/main/hnj.xml +++ b/make/data/cldr/common/main/hnj.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/hnj_Hmnp.xml b/make/data/cldr/common/main/hnj_Hmnp.xml index 0572f3ad943..edf19bb8cdc 100644 --- a/make/data/cldr/common/main/hnj_Hmnp.xml +++ b/make/data/cldr/common/main/hnj_Hmnp.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/hnj_Hmnp_US.xml b/make/data/cldr/common/main/hnj_Hmnp_US.xml index f49ef827699..34ff522c1fe 100644 --- a/make/data/cldr/common/main/hnj_Hmnp_US.xml +++ b/make/data/cldr/common/main/hnj_Hmnp_US.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/hr.xml b/make/data/cldr/common/main/hr.xml index 3fe00831421..f028c3424bf 100644 --- a/make/data/cldr/common/main/hr.xml +++ b/make/data/cldr/common/main/hr.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/hr_HR.xml b/make/data/cldr/common/main/hr_HR.xml index b0239a0cc51..34f898cb40d 100644 --- a/make/data/cldr/common/main/hr_HR.xml +++ b/make/data/cldr/common/main/hr_HR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/hsb.xml b/make/data/cldr/common/main/hsb.xml index dbb0a470f2f..25fa9ffc62b 100644 --- a/make/data/cldr/common/main/hsb.xml +++ b/make/data/cldr/common/main/hsb.xml @@ -1,8 +1,8 @@ - @@ -2598,15 +2598,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic Daressalam - - Užgorod - Kiew - - Zaporižžja - Beulah, Sewjerna Dakota @@ -3146,11 +3140,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic lětni čas kupy Lord-Howe - - - čas kupy Macquarie - - Magadanski čas @@ -3190,13 +3179,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mawsonski čas - - - mexiski sewjerozapadny čas - mexiski sewjerozapadny standardny čas - mexiski sewjerozapadny lětni čas - - mexiski pacifiski čas diff --git a/make/data/cldr/common/main/hsb_DE.xml b/make/data/cldr/common/main/hsb_DE.xml index e09bb1ca4d9..76e15d557b5 100644 --- a/make/data/cldr/common/main/hsb_DE.xml +++ b/make/data/cldr/common/main/hsb_DE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/hu.xml b/make/data/cldr/common/main/hu.xml index 440cb73512e..878aeb9a439 100644 --- a/make/data/cldr/common/main/hu.xml +++ b/make/data/cldr/common/main/hu.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/hy.xml b/make/data/cldr/common/main/hy.xml index b3da8cbdd09..91ecf144eaf 100644 --- a/make/data/cldr/common/main/hy.xml +++ b/make/data/cldr/common/main/hy.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ia.xml b/make/data/cldr/common/main/ia.xml index 8cb66c6c102..ce130ba71f2 100644 --- a/make/data/cldr/common/main/ia.xml +++ b/make/data/cldr/common/main/ia.xml @@ -1,8 +1,8 @@ - @@ -2607,11 +2607,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic hora estive de Lord Howe - - - hora del Insula Macquarie - - hora de Magadan @@ -2651,13 +2646,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic hora de Mawson - - - hora del nordwest de Mexico - hora normal del nordwest de Mexico - hora estive del nordwest de Mexico - - hora del Pacifico mexican diff --git a/make/data/cldr/common/main/ia_001.xml b/make/data/cldr/common/main/ia_001.xml index f38e98dad8d..54b31c5a82e 100644 --- a/make/data/cldr/common/main/ia_001.xml +++ b/make/data/cldr/common/main/ia_001.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/id.xml b/make/data/cldr/common/main/id.xml index 3221f9e10d0..db130766d0f 100644 --- a/make/data/cldr/common/main/id.xml +++ b/make/data/cldr/common/main/id.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ie.xml b/make/data/cldr/common/main/ie.xml index a2171c229a1..e40e8fad0c7 100644 --- a/make/data/cldr/common/main/ie.xml +++ b/make/data/cldr/common/main/ie.xml @@ -1,8 +1,8 @@ - @@ -1869,15 +1869,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic Cambridge-Bay - - Rainy-River - Rankin-Inlet - - Thunder-Bay - Goose-Bay @@ -2245,11 +2239,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic témpor estival del Insul Lord-Howe - - - témpor del Insul Macquarie - - témpor del Marquesas @@ -2260,13 +2249,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic témpor del Insules Marshall - - - mexican nordwest témpor - mexican nordwest standard témpor - mexican nordwest estival témpor - - mexican pacific témpor diff --git a/make/data/cldr/common/main/ie_EE.xml b/make/data/cldr/common/main/ie_EE.xml index 8e986db8d87..5faf8528d1c 100644 --- a/make/data/cldr/common/main/ie_EE.xml +++ b/make/data/cldr/common/main/ie_EE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ig.xml b/make/data/cldr/common/main/ig.xml index 64a39d80003..4727e79a5fb 100644 --- a/make/data/cldr/common/main/ig.xml +++ b/make/data/cldr/common/main/ig.xml @@ -1,8 +1,8 @@ - @@ -1965,11 +1965,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Oge Ihe Lord Howe - - - Oge Macquarie Island - - Oge Magadan @@ -2009,13 +2004,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Oge Mawson - - - Oge Northwest Mexico - Oge Izugbe Northwest Mexico - Oge Ihe Northwest Mexico - - Oge Mexican Pacific diff --git a/make/data/cldr/common/main/ig_NG.xml b/make/data/cldr/common/main/ig_NG.xml index 981d0776e01..7704ec263eb 100644 --- a/make/data/cldr/common/main/ig_NG.xml +++ b/make/data/cldr/common/main/ig_NG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ii.xml b/make/data/cldr/common/main/ii.xml index 667876e03b0..36a24a5f767 100644 --- a/make/data/cldr/common/main/ii.xml +++ b/make/data/cldr/common/main/ii.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ii_CN.xml b/make/data/cldr/common/main/ii_CN.xml index d2e5e59adec..478dc23f82f 100644 --- a/make/data/cldr/common/main/ii_CN.xml +++ b/make/data/cldr/common/main/ii_CN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/io.xml b/make/data/cldr/common/main/io.xml index 7315536f016..f960e028b81 100644 --- a/make/data/cldr/common/main/io.xml +++ b/make/data/cldr/common/main/io.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/io_001.xml b/make/data/cldr/common/main/io_001.xml index 4057f84f647..b7b5f851ab2 100644 --- a/make/data/cldr/common/main/io_001.xml +++ b/make/data/cldr/common/main/io_001.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/is.xml b/make/data/cldr/common/main/is.xml index f491c68bf8f..ef7d71d4f7f 100644 --- a/make/data/cldr/common/main/is.xml +++ b/make/data/cldr/common/main/is.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/it.xml b/make/data/cldr/common/main/it.xml index 3056b4a77f0..0dce0245bf4 100644 --- a/make/data/cldr/common/main/it.xml +++ b/make/data/cldr/common/main/it.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/it_IT.xml b/make/data/cldr/common/main/it_IT.xml index 8afb7169c20..5f3342415d8 100644 --- a/make/data/cldr/common/main/it_IT.xml +++ b/make/data/cldr/common/main/it_IT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/it_SM.xml b/make/data/cldr/common/main/it_SM.xml index 447d74116b7..b30f7e0df51 100644 --- a/make/data/cldr/common/main/it_SM.xml +++ b/make/data/cldr/common/main/it_SM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/it_VA.xml b/make/data/cldr/common/main/it_VA.xml index 716bc0e0fc8..4ceb6fc0bff 100644 --- a/make/data/cldr/common/main/it_VA.xml +++ b/make/data/cldr/common/main/it_VA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/iu.xml b/make/data/cldr/common/main/iu.xml index 8878d2aef85..dbd87621f8c 100644 --- a/make/data/cldr/common/main/iu.xml +++ b/make/data/cldr/common/main/iu.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/iu_CA.xml b/make/data/cldr/common/main/iu_CA.xml index e7fa1a5adb6..4e4a6931d38 100644 --- a/make/data/cldr/common/main/iu_CA.xml +++ b/make/data/cldr/common/main/iu_CA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/iu_Latn.xml b/make/data/cldr/common/main/iu_Latn.xml index c206d730238..51be22c08a1 100644 --- a/make/data/cldr/common/main/iu_Latn.xml +++ b/make/data/cldr/common/main/iu_Latn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/iu_Latn_CA.xml b/make/data/cldr/common/main/iu_Latn_CA.xml index 5a51d0264eb..2ea5fc82a1c 100644 --- a/make/data/cldr/common/main/iu_Latn_CA.xml +++ b/make/data/cldr/common/main/iu_Latn_CA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ja.xml b/make/data/cldr/common/main/ja.xml index 711868e7356..7a43fd77aba 100644 --- a/make/data/cldr/common/main/ja.xml +++ b/make/data/cldr/common/main/ja.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/jbo.xml b/make/data/cldr/common/main/jbo.xml index c3a346d762c..6f1a7601a5c 100644 --- a/make/data/cldr/common/main/jbo.xml +++ b/make/data/cldr/common/main/jbo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/jbo_001.xml b/make/data/cldr/common/main/jbo_001.xml index 53bfbc897c3..ad6bd6ce3f9 100644 --- a/make/data/cldr/common/main/jbo_001.xml +++ b/make/data/cldr/common/main/jbo_001.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/jgo.xml b/make/data/cldr/common/main/jgo.xml index f59811848c6..8fb4a321436 100644 --- a/make/data/cldr/common/main/jgo.xml +++ b/make/data/cldr/common/main/jgo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/jgo_CM.xml b/make/data/cldr/common/main/jgo_CM.xml index c52e5776daa..28bcebccf52 100644 --- a/make/data/cldr/common/main/jgo_CM.xml +++ b/make/data/cldr/common/main/jgo_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/jmc.xml b/make/data/cldr/common/main/jmc.xml index 3fa938326e5..d6f948f0e39 100644 --- a/make/data/cldr/common/main/jmc.xml +++ b/make/data/cldr/common/main/jmc.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/jmc_TZ.xml b/make/data/cldr/common/main/jmc_TZ.xml index ca2a45bd09f..b0748810276 100644 --- a/make/data/cldr/common/main/jmc_TZ.xml +++ b/make/data/cldr/common/main/jmc_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/jv.xml b/make/data/cldr/common/main/jv.xml index b88d100392c..23fc8fdb8be 100644 --- a/make/data/cldr/common/main/jv.xml +++ b/make/data/cldr/common/main/jv.xml @@ -1,8 +1,8 @@ - @@ -1827,9 +1827,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Kordoba - - Currie - Santa Barthelemy @@ -1851,12 +1848,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Teluk Cambridge - - Kali Rainy - - - Teluk Gludhug - Halifak @@ -2562,11 +2553,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Wektu Ketigo Lord Howe - - - Wektu Pulo Macquarie - - Wektu Magadan @@ -2606,13 +2592,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Wektu Mawson - - - Wektu Meksiko Lor-Kulon - Wektu Standar Meksiko Lor-Kulon - Wektu Ketigo Meksiko Lor-Kulon - - Wektu Pasifik Meksiko diff --git a/make/data/cldr/common/main/jv_ID.xml b/make/data/cldr/common/main/jv_ID.xml index 7888dba6d9d..95d195ca0fe 100644 --- a/make/data/cldr/common/main/jv_ID.xml +++ b/make/data/cldr/common/main/jv_ID.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ka.xml b/make/data/cldr/common/main/ka.xml index 0b03ecb2529..1d6f9f3d17d 100644 --- a/make/data/cldr/common/main/ka.xml +++ b/make/data/cldr/common/main/ka.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kab.xml b/make/data/cldr/common/main/kab.xml index afb43b18870..3ea9ec2647c 100644 --- a/make/data/cldr/common/main/kab.xml +++ b/make/data/cldr/common/main/kab.xml @@ -1,8 +1,8 @@ - @@ -2013,9 +2013,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Malburn - - Currie - Sidni @@ -3101,11 +3098,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Akud n Unebdu n Lord Howe - - - Akud n Markari - - Akud n Magadan @@ -3145,13 +3137,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Akud n Mawsun - - - Akud n ugafa amalu n Miksik - Akud amezday n ugafa amalu n Miksik - Akud n unebdu n ugafa amalu n Miksik - - Akud amelwi n Miksik diff --git a/make/data/cldr/common/main/kab_DZ.xml b/make/data/cldr/common/main/kab_DZ.xml index 5e66bcc2d06..9c5e9f6f9c1 100644 --- a/make/data/cldr/common/main/kab_DZ.xml +++ b/make/data/cldr/common/main/kab_DZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kaj.xml b/make/data/cldr/common/main/kaj.xml index 188cc0683c2..dd2f2d48a3b 100644 --- a/make/data/cldr/common/main/kaj.xml +++ b/make/data/cldr/common/main/kaj.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kaj_NG.xml b/make/data/cldr/common/main/kaj_NG.xml index 7c0b4540f6e..446af581cde 100644 --- a/make/data/cldr/common/main/kaj_NG.xml +++ b/make/data/cldr/common/main/kaj_NG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kam.xml b/make/data/cldr/common/main/kam.xml index 9c3a2a56b00..655615f74d0 100644 --- a/make/data/cldr/common/main/kam.xml +++ b/make/data/cldr/common/main/kam.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kam_KE.xml b/make/data/cldr/common/main/kam_KE.xml index aefe5a4576b..f77693e6a7d 100644 --- a/make/data/cldr/common/main/kam_KE.xml +++ b/make/data/cldr/common/main/kam_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kcg.xml b/make/data/cldr/common/main/kcg.xml index 77dd7ef0930..c5ac5715b48 100644 --- a/make/data/cldr/common/main/kcg.xml +++ b/make/data/cldr/common/main/kcg.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kcg_NG.xml b/make/data/cldr/common/main/kcg_NG.xml index a9fe0f9c2b8..354b2ab3b37 100644 --- a/make/data/cldr/common/main/kcg_NG.xml +++ b/make/data/cldr/common/main/kcg_NG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kde.xml b/make/data/cldr/common/main/kde.xml index af759fb88c7..fb03f22a83d 100644 --- a/make/data/cldr/common/main/kde.xml +++ b/make/data/cldr/common/main/kde.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kde_TZ.xml b/make/data/cldr/common/main/kde_TZ.xml index 5c9ef9697a0..ae70dc44043 100644 --- a/make/data/cldr/common/main/kde_TZ.xml +++ b/make/data/cldr/common/main/kde_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kea.xml b/make/data/cldr/common/main/kea.xml index 048b61a318f..04bcbe2209f 100644 --- a/make/data/cldr/common/main/kea.xml +++ b/make/data/cldr/common/main/kea.xml @@ -1,8 +1,8 @@ - @@ -1872,13 +1872,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Ora di Veron di Avaí i Aleutas - - - Ora di Noroesti di Méxiku - Ora Padron di Noroesti di Méxiku - Ora di Veron di Noroesti di Méxiku - - Ora di Pasífiku Mexikanu diff --git a/make/data/cldr/common/main/kea_CV.xml b/make/data/cldr/common/main/kea_CV.xml index d089484b892..59bcc9a2ad2 100644 --- a/make/data/cldr/common/main/kea_CV.xml +++ b/make/data/cldr/common/main/kea_CV.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ken.xml b/make/data/cldr/common/main/ken.xml index 422b5d48a52..580019ec00e 100644 --- a/make/data/cldr/common/main/ken.xml +++ b/make/data/cldr/common/main/ken.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ken_CM.xml b/make/data/cldr/common/main/ken_CM.xml index e44002dbe2e..1e19cade921 100644 --- a/make/data/cldr/common/main/ken_CM.xml +++ b/make/data/cldr/common/main/ken_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kgp.xml b/make/data/cldr/common/main/kgp.xml index 8a53e582637..324afedcf68 100644 --- a/make/data/cldr/common/main/kgp.xml +++ b/make/data/cldr/common/main/kgp.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/khq.xml b/make/data/cldr/common/main/khq.xml index d75167023cf..b06fba711b4 100644 --- a/make/data/cldr/common/main/khq.xml +++ b/make/data/cldr/common/main/khq.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/khq_ML.xml b/make/data/cldr/common/main/khq_ML.xml index 0eff5232416..5087d6d1fdd 100644 --- a/make/data/cldr/common/main/khq_ML.xml +++ b/make/data/cldr/common/main/khq_ML.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ki.xml b/make/data/cldr/common/main/ki.xml index 6585f0fe811..f129f2e46d9 100644 --- a/make/data/cldr/common/main/ki.xml +++ b/make/data/cldr/common/main/ki.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ki_KE.xml b/make/data/cldr/common/main/ki_KE.xml index 7cf6f1d1695..c764864fc45 100644 --- a/make/data/cldr/common/main/ki_KE.xml +++ b/make/data/cldr/common/main/ki_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kk.xml b/make/data/cldr/common/main/kk.xml index 5150fb0accc..ae489aaef5a 100644 --- a/make/data/cldr/common/main/kk.xml +++ b/make/data/cldr/common/main/kk.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kkj.xml b/make/data/cldr/common/main/kkj.xml index 793b56e869d..a99945b5c0b 100644 --- a/make/data/cldr/common/main/kkj.xml +++ b/make/data/cldr/common/main/kkj.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kkj_CM.xml b/make/data/cldr/common/main/kkj_CM.xml index 7b5c801a4e6..19bd6fd1d94 100644 --- a/make/data/cldr/common/main/kkj_CM.xml +++ b/make/data/cldr/common/main/kkj_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kl.xml b/make/data/cldr/common/main/kl.xml index c8778848f02..187beece7db 100644 --- a/make/data/cldr/common/main/kl.xml +++ b/make/data/cldr/common/main/kl.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kl_GL.xml b/make/data/cldr/common/main/kl_GL.xml index f4e119ea34c..26a85b6f95c 100644 --- a/make/data/cldr/common/main/kl_GL.xml +++ b/make/data/cldr/common/main/kl_GL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kln.xml b/make/data/cldr/common/main/kln.xml index 13ddba1c162..d882d25f75e 100644 --- a/make/data/cldr/common/main/kln.xml +++ b/make/data/cldr/common/main/kln.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kln_KE.xml b/make/data/cldr/common/main/kln_KE.xml index 22f9e2b5ef8..1b9cc26e504 100644 --- a/make/data/cldr/common/main/kln_KE.xml +++ b/make/data/cldr/common/main/kln_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/km.xml b/make/data/cldr/common/main/km.xml index 7e3266de618..5d34b428948 100644 --- a/make/data/cldr/common/main/km.xml +++ b/make/data/cldr/common/main/km.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kn.xml b/make/data/cldr/common/main/kn.xml index 7271c4da0b7..70d0994060e 100644 --- a/make/data/cldr/common/main/kn.xml +++ b/make/data/cldr/common/main/kn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ko.xml b/make/data/cldr/common/main/ko.xml index b9045c2d750..a50bf67f3f8 100644 --- a/make/data/cldr/common/main/ko.xml +++ b/make/data/cldr/common/main/ko.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ko_KP.xml b/make/data/cldr/common/main/ko_KP.xml index 3aa3e56b043..888b2928e53 100644 --- a/make/data/cldr/common/main/ko_KP.xml +++ b/make/data/cldr/common/main/ko_KP.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ko_KR.xml b/make/data/cldr/common/main/ko_KR.xml index 2b53ca45df1..087699e3d87 100644 --- a/make/data/cldr/common/main/ko_KR.xml +++ b/make/data/cldr/common/main/ko_KR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kok.xml b/make/data/cldr/common/main/kok.xml index 09a4979d066..f7dc54d0c5a 100644 --- a/make/data/cldr/common/main/kok.xml +++ b/make/data/cldr/common/main/kok.xml @@ -1,8 +1,8 @@ - @@ -1837,9 +1837,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic मेलबर्न - - क्युरी - होबार्ट @@ -1993,9 +1990,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic क्रेस्टोन - - यलोक्नायफ - ऍडमोंटन @@ -2014,30 +2008,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic रिसोल्युट - - पावसाळी न्हंय - रँकिन इनलॅट अतिकोकॉन - - थंडर बे - - - निपिगोन - टॉरंटो इकालुयीट - - पंगनिर्टुंग - मोंक्टॉन @@ -2851,18 +2833,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic दार इ सलाम - - उझगोरोड - कीव सिमफरोपोल - - झापोरोझे - काम्पाला @@ -2878,9 +2854,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic नोमे - - जॉन्स्टन - ऐंकरज @@ -3519,11 +3492,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic लॉर्ड होवे डेलायट वेळ - - - मॅक्वेरी आयलँड वेळ - - मगादान वेळ @@ -3563,13 +3531,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic मॉसन वेळ - - - वायव्य मेक्सिको वेळ - वायव्य मेक्सिको प्रमाणीत वेळ - वायव्य मेक्सिको डेलायट वेळ - - मेक्सिकन प्रशांत वेळ diff --git a/make/data/cldr/common/main/kok_IN.xml b/make/data/cldr/common/main/kok_IN.xml index 82baeca7fff..3703cee56b6 100644 --- a/make/data/cldr/common/main/kok_IN.xml +++ b/make/data/cldr/common/main/kok_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kpe.xml b/make/data/cldr/common/main/kpe.xml index 18f4623a160..8bceeab6893 100644 --- a/make/data/cldr/common/main/kpe.xml +++ b/make/data/cldr/common/main/kpe.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kpe_GN.xml b/make/data/cldr/common/main/kpe_GN.xml index 6bf6f082de0..520baa5999f 100644 --- a/make/data/cldr/common/main/kpe_GN.xml +++ b/make/data/cldr/common/main/kpe_GN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kpe_LR.xml b/make/data/cldr/common/main/kpe_LR.xml index c014fb185f4..cf2c35b0450 100644 --- a/make/data/cldr/common/main/kpe_LR.xml +++ b/make/data/cldr/common/main/kpe_LR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ks.xml b/make/data/cldr/common/main/ks.xml index 479d8703aa4..626e06c784d 100644 --- a/make/data/cldr/common/main/ks.xml +++ b/make/data/cldr/common/main/ks.xml @@ -1,8 +1,8 @@ - @@ -37,7 +37,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic ایرو کونِیَن اَراپاہو اَراوَک - اسٲمۍ + اسٲمؠ ایسٹوٗریَن اَوارِک اَوَدی @@ -57,7 +57,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic بِنی سِکسِکا بَمبارا - بَنگٲلۍ + بَنگٲلؠ تِبتی بریٹَن برج @@ -113,14 +113,14 @@ CLDR data files are interpreted according to the LDML specification (http://unic ایکاجُک یوٗنٲنی ایلامایِٹ - اَنگیٖزۍ - آسٹریلیَن اَنگریٖزۍ - کینَڈِیٲیی اَنگریٖزۍ - بَرطانوی اَنگریٖزۍ - UK اَنٛگریٖزۍ - امریٖکی اَنٛگریٖزۍ - US اَنٛگریٖزۍ - وَسطی اَنگریٖزۍ + اَنگیٖزؠ + آسٹریلیَن اَنگریٖزؠ + کینَڈِیٲیی اَنگریٖزؠ + بَرطانوی اَنگریٖزؠ + UK اَنٛگریٖزؠ + امریٖکی اَنٛگریٖزؠ + US اَنٛگریٖزؠ + وَسطی اَنگریٖزؠ ایسپَرینٹو ہسپانوی لاطیٖنی امریٖکی ہسپانوی @@ -170,7 +170,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic ہاوسا ہَیدا ہوایِیَن - عبرٲنۍ + عبرٲنؠ ہِندی ہِلیٖگینَن ہِتایِت @@ -196,7 +196,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic آیِسلینڈِک اِطالوی اِنُکتِتوٗ - جاپٲنۍ + جاپٲنؠ لوجبان جوڈیو فارسی جوڈیو عربی @@ -278,7 +278,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic مَنیپوٗری موہاک موسی - مَرٲٹھۍ + مَرٲٹھؠ مَلَے مَلتیٖس واریاہ زبان @@ -292,7 +292,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic ناروییَن بوکمال شُمال ڈَبیل بۆنِم جٔرمَن - نیپٲلۍ + نیپٲلؠ نیواری ڈونگا نِیاس @@ -320,7 +320,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic اۆسیٹِک اۆسیج اوٹومَن تُرکِش - پَنجٲبۍ + پَنجٲبؠ پَنگاسِنَن پَہلَوی پَمپَنگا @@ -337,7 +337,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic برازیٖلی پُرتَگیٖز یوٗرپی پُرتَگیٖز کُویشُوا - راجِستھٲنۍ + راجِستھٲنؠ رَپانوی رَروٹونگَن رومانش @@ -423,7 +423,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic اُگارتِک یوٗکرینیٲیی یُمبُندوٗ - اَنزٲنۍ یا نَہ لَگہٕہار زبان + اَنزٲنؠ یا نَہ لَگہٕہار زبان اُردوٗ اُزبیک واے @@ -463,7 +463,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic - + @@ -491,13 +491,13 @@ CLDR data files are interpreted according to the LDML specification (http://unic - + - + - + @@ -728,7 +728,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic اسرا ییل آیِل آف مین ہِندوستان - برطانوی بحرِ ہِندۍ علاقہٕ + برطانوی بحرِ ہِندؠ علاقہٕ ایٖراق ایٖران اَیِسلینڑ @@ -804,7 +804,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic پاکِستان پولینڈ سینٹ پیٖری تہٕ موکیلِیَن - پِٹکیرٕنۍ جٔزیٖرٕ + پِٹکیرٕنؠ جٔزیٖرٕ پٔرٹو رِکو فلسطینی علاقٕہ فلسطین @@ -890,22 +890,22 @@ CLDR data files are interpreted according to the LDML specification (http://unic بعد وَقت وَسطی فرانس پؠٹھ ۱۶٠۶ تام مَشرِقی اَمریٖکا جٔمع کٔرِتھ تُرکی لاطیٖنی اَچھر - سین جارجِیو/بِلا بوٗلۍ + سین جارجِیو/بِلا بوٗلؠ آوازیات یوٗ پی اے آوازِیات - روٗسی زَبانہِ ہِنز لِپوواز بوٗلۍ + روٗسی زَبانہِ ہِنز لِپوواز بوٗلؠ اَکٔے لہجہٕ واجؠن زَبان - نؠٹِسون بوٗلۍ - نیجِوا بوٗلۍ - اُشیکو/اوسوجین بوٗلۍ + نؠٹِسون بوٗلؠ + نیجِوا بوٗلؠ + اُشیکو/اوسوجین بوٗلؠ واریاہ لہجہٕ واجؠن زَبان کَمپیوٗٹَر دُبارٕ دۄہراونہٕ آمُت عِلمہِ ہِجا روٗسی سوہو - سُکاٹِش مَیعٲری اَنگریٖزۍ + سُکاٹِش مَیعٲری اَنگریٖزؠ سِکوس - ثٹولوِزا/سولبِکا بوٗلۍ + ثٹولوِزا/سولبِکا بوٗلؠ تاراسکیٖوِکا علمہ ہِجاِ @@ -921,7 +921,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic اِسلٲمی کیلنڑَر اِسلٲمی اِجتمٲیی کیلنڑَر ISO-8601 کیلنڈر - جاپٲنۍ کیلنڑَر + جاپٲنؠ کیلنڑَر جموٗریٲتی چیٖنی کیلَنڑَر رؠوٲتی چیٖنی تِرتیٖب فون بُک تَرتیٖب @@ -951,7 +951,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic - [ء آ أ ٲ ؤ ا ب پ ت ث ٹ ج چ ح خ د ذ ڈ ر ز ڑ ژ س ش ص ض ط ظ ع غ ف ق ک گ ل م ن ں ھ ہ و ۄ ۆ ی ۍ ؠ ے] + [ء آ أ ٲ ؤ ا ب پ ت ث ٹ ج چ ح خ د ذ ڈ ر ز ڑ ژ س ش ص ض ط ظ ع غ ف ق ک گ ل م ن ں ھ ہ و ۄ ۆ ی ؠ ے] [\u200E\u200F َ ُ ِ ٔ ٕ ٟ ٖ ٗ ئ] [\u200E \- ‑ , ٫ ٬ . % ‰ + 0۰ 1۱ 2۲ 3۳ 4۴ 5۵ 6۶ 7۷ 8۸ 9۹] [\- ‐‑ – — , ; \: ! ? . … '‘’ "“” ( ) \[ \] § @ * / \& # † ‡ ′ ″] @@ -989,7 +989,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic {1}, {0} - {0} پٮ۪ٹھۍ {1} + {0} پٮ۪ٹھؠ {1} @@ -997,7 +997,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic {1}, {0} - {0} پٮ۪ٹھۍ {1} + {0} پٮ۪ٹھؠ {1} @@ -1338,7 +1338,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic {1}, {0} - {0} پٮ۪ٹھۍ {1} + {0} پٮ۪ٹھؠ {1} @@ -1346,7 +1346,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic {1}, {0} - {0} پٮ۪ٹھۍ {1} + {0} پٮ۪ٹھؠ {1} @@ -1523,9 +1523,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic رؠتھ - پٔتِم ریتھۍ - یٕہ ریتھۍ - نو ریتھۍ + پٔتِم ریتھؠ + یٕہ ریتھؠ + نو ریتھؠ ہفتہٕ @@ -1683,9 +1683,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic مؠلبعارن - - کیوٗری - حۄبٲٹ @@ -1836,9 +1833,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic کریسٹن - - یؠلو نایِف - اؠڈمَنٹَن @@ -1857,30 +1851,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic رِسولیوٗٹ - - رینی رِوَر - رینکِن اِنلؠٹ اٹی کوکنٍ - - تھَنڈر خلیٖج - - - نِپِگَن - ٹورونٹو اِقالیوٗیِت - - پَنگنِرٹَنگ - مونکٹٕن @@ -2685,18 +2667,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic دارالسلام - - اُزگورود - کیٖو سِمفیروپول - - زَپوروزَے - کَمپالا @@ -2715,9 +2691,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ہونولو لو - - جانسٹَن - اَنکوراج @@ -3289,7 +3262,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic - ہِندوستٲنۍ اوشَن ٹائم + ہِندوستٲنؠ اوشَن ٹائم @@ -3314,8 +3287,8 @@ CLDR data files are interpreted according to the LDML specification (http://unic - اِیٖرٲنۍ ٹایِم - اِیٖرٲنۍ سٹینڑاڑ ٹایِم + اِیٖرٲنؠ ٹایِم + اِیٖرٲنؠ سٹینڑاڑ ٹایِم اِیٖرٲنی سَمَر ٹایِم @@ -3335,9 +3308,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic - جاپٲنۍ ٹایِم - جاپٲنۍ سٹینڈرڈ ٹایِم - جاپٲنۍ ڑےلایِٔٹ ٹایِم + جاپٲنؠ ٹایِم + جاپٲنؠ سٹینڈرڈ ٹایِم + جاپٲنؠ ڑےلایِٔٹ ٹایِم @@ -3444,13 +3417,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ماسَن ٹایِم - - - شُمال مغربی میکسیکو ٹائم - شُمال مغربی میکسیکو سٹینڈرڈ ٹائم - شُمال مغربی میکسیکو ڈے لائٹ ٹائم - - میکسیکن پیسیفک ٹائم @@ -3484,7 +3450,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic - نؠپٲلۍ ٹایِم + نؠپٲلؠ ٹایِم @@ -4114,10 +4080,10 @@ CLDR data files are interpreted according to the LDML specification (http://unic اِزرٲیِلی پاونڑ - اِزرٲیِلی نٔوۍ شؠقٕل + اِزرٲیِلی نٔوؠ شؠقٕل - ہِندُستٲنۍ رۄپَے + ہِندُستٲنؠ رۄپَے ایٖراقُک دیٖنار @@ -4324,7 +4290,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic پھِلِپایِٔن پؠسو - پاکِستٲنۍ رۄپَے + پاکِستٲنؠ رۄپَے پولِش زلوٹی diff --git a/make/data/cldr/common/main/ks_Arab.xml b/make/data/cldr/common/main/ks_Arab.xml index 4b51c1b6075..2a340e770c1 100644 --- a/make/data/cldr/common/main/ks_Arab.xml +++ b/make/data/cldr/common/main/ks_Arab.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ks_Arab_IN.xml b/make/data/cldr/common/main/ks_Arab_IN.xml index 383884fe755..6edd11a8d28 100644 --- a/make/data/cldr/common/main/ks_Arab_IN.xml +++ b/make/data/cldr/common/main/ks_Arab_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ks_Deva.xml b/make/data/cldr/common/main/ks_Deva.xml index a505f877ff1..9c7a3804207 100644 --- a/make/data/cldr/common/main/ks_Deva.xml +++ b/make/data/cldr/common/main/ks_Deva.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ks_Deva_IN.xml b/make/data/cldr/common/main/ks_Deva_IN.xml index 6c84915c0e7..4227f7302fc 100644 --- a/make/data/cldr/common/main/ks_Deva_IN.xml +++ b/make/data/cldr/common/main/ks_Deva_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ksb.xml b/make/data/cldr/common/main/ksb.xml index db35fd872d9..f2df1369f13 100644 --- a/make/data/cldr/common/main/ksb.xml +++ b/make/data/cldr/common/main/ksb.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ksb_TZ.xml b/make/data/cldr/common/main/ksb_TZ.xml index 9f90a8eba63..da76ac63cf1 100644 --- a/make/data/cldr/common/main/ksb_TZ.xml +++ b/make/data/cldr/common/main/ksb_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ksf.xml b/make/data/cldr/common/main/ksf.xml index e864e5aa9c2..4b0c73375eb 100644 --- a/make/data/cldr/common/main/ksf.xml +++ b/make/data/cldr/common/main/ksf.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ksf_CM.xml b/make/data/cldr/common/main/ksf_CM.xml index 095c2470c3b..08ed3a551ae 100644 --- a/make/data/cldr/common/main/ksf_CM.xml +++ b/make/data/cldr/common/main/ksf_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ksh.xml b/make/data/cldr/common/main/ksh.xml index a1928457fce..91c2227d0b4 100644 --- a/make/data/cldr/common/main/ksh.xml +++ b/make/data/cldr/common/main/ksh.xml @@ -1,8 +1,8 @@ - @@ -1558,12 +1558,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Istambul - - Uschjorod - - - Saporischschja - Honululu diff --git a/make/data/cldr/common/main/ksh_DE.xml b/make/data/cldr/common/main/ksh_DE.xml index fbbfae22929..b18a18bfc47 100644 --- a/make/data/cldr/common/main/ksh_DE.xml +++ b/make/data/cldr/common/main/ksh_DE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ku.xml b/make/data/cldr/common/main/ku.xml index eae730476ba..25b83ac71d2 100644 --- a/make/data/cldr/common/main/ku.xml +++ b/make/data/cldr/common/main/ku.xml @@ -1,8 +1,8 @@ - @@ -1033,9 +1033,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic G d'ê' MMM'a' y'an' – d'ê' MMM'a' y'an' - G d'ê' MMM'a' y'an' E  – d'ê' MMM'a' y'an' E - G d'ê' MMM'a' y'an' E  – d'ê' MMM'a' y'an' E - G d'ê' MMM'a' y'an' E  – d'ê' MMM'a' y'an' E + G d'ê' MMM'a' y'an' E – d'ê' MMM'a' y'an' E + G d'ê' MMM'a' y'an' E – d'ê' MMM'a' y'an' E + G d'ê' MMM'a' y'an' E – d'ê' MMM'a' y'an' E G MMMM – MMMM y @@ -1393,9 +1393,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic d'ê' MMM'a' y'an' – d'ê' MMM'a' y'an' - d'ê' MMM'a' y'an' E  – d'ê' MMM'a' y'an' E - d'ê' MMM'a' y'an' E  – d'ê' MMM'a' y'an' E - d'ê' MMM'a' y'an' E  – d'ê' MMM'a' y'an' E + d'ê' MMM'a' y'an' E – d'ê' MMM'a' y'an' E + d'ê' MMM'a' y'an' E – d'ê' MMM'a' y'an' E + d'ê' MMM'a' y'an' E – d'ê' MMM'a' y'an' E MMMM – MMMM y @@ -1991,15 +1991,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic Daruselam - - Ujgorod - Kîev - - Zaporojye - Beûlah, Dakotaya Bakur @@ -2577,11 +2571,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Saeta Havînê ya Lord Howeyê - - - Saeta Girava Macquarieyê - - Saeta Magadanê @@ -2621,29 +2610,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic Saeta Mawsonê - - - Saeta Meksîkoya Bakurrojava - Saeta Standard a Meksîkoya Bakurrojava - Saeta Havînê ya Meksîkoya Bakurrojava - - - SMBR - SSMBR - SHMBR - - Saeta Pasîfîka Meksîkayê Saeta Standard a Pasîfîka Meksîkayê Saeta Havînê ya Pasîfîka Meksîkayê - - SPM - SSPM - SHPM - @@ -2782,11 +2754,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Saeta Standard a Saint Pierre û Miquelonê Saeta Havînê ya Saint Pierre û Miquelonê - - SSPM - SSSPM - SHSPM - diff --git a/make/data/cldr/common/main/ku_TR.xml b/make/data/cldr/common/main/ku_TR.xml index 73d2460200c..852a953e7a4 100644 --- a/make/data/cldr/common/main/ku_TR.xml +++ b/make/data/cldr/common/main/ku_TR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kw.xml b/make/data/cldr/common/main/kw.xml index 86d19c29d24..08ea8631d58 100644 --- a/make/data/cldr/common/main/kw.xml +++ b/make/data/cldr/common/main/kw.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kw_GB.xml b/make/data/cldr/common/main/kw_GB.xml index 03eb5bb3666..271dc8fbdfd 100644 --- a/make/data/cldr/common/main/kw_GB.xml +++ b/make/data/cldr/common/main/kw_GB.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kxv.xml b/make/data/cldr/common/main/kxv.xml index 8682339f2dd..94057d326aa 100644 --- a/make/data/cldr/common/main/kxv.xml +++ b/make/data/cldr/common/main/kxv.xml @@ -1,8 +1,8 @@ - @@ -1135,9 +1135,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic kresṭon - - yellonaip - eḍmonṭon @@ -1156,30 +1153,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic rejalyuṭ - - reni rivr - rankin inledṭ eṭikoken - - tanḍr be - - - nipigen - ṭoronṭo ikaluiṭ - - pangnirtung - monkṭon @@ -1987,18 +1972,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic dar es salaam - - ujhorod - kiyv simperopol - - japorjye - kmpala @@ -2014,9 +1993,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic nom - - johnsṭon - ankoraj @@ -2652,11 +2628,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic laṛ hawe ḍelāiṭ belā - - - makwārī dīp belā - - māgādan belā @@ -2696,13 +2667,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic māwosn belā - - - utar weḍā kūṇpū meksik belā - utar weḍā kūṇpū meksik mānānka belā - utar weḍā kūṇpū meksik ḍelāiṭ belā - - meksikān pesipic belā diff --git a/make/data/cldr/common/main/kxv_Deva.xml b/make/data/cldr/common/main/kxv_Deva.xml index ce4fd9a0462..70a746e6a45 100644 --- a/make/data/cldr/common/main/kxv_Deva.xml +++ b/make/data/cldr/common/main/kxv_Deva.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kxv_Deva_IN.xml b/make/data/cldr/common/main/kxv_Deva_IN.xml index c48747ae4f3..06f9b2a11ec 100644 --- a/make/data/cldr/common/main/kxv_Deva_IN.xml +++ b/make/data/cldr/common/main/kxv_Deva_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kxv_Latn.xml b/make/data/cldr/common/main/kxv_Latn.xml index 80edfd74b7b..d96d9162905 100644 --- a/make/data/cldr/common/main/kxv_Latn.xml +++ b/make/data/cldr/common/main/kxv_Latn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kxv_Latn_IN.xml b/make/data/cldr/common/main/kxv_Latn_IN.xml index d76e6982ae7..fb1044bcca8 100644 --- a/make/data/cldr/common/main/kxv_Latn_IN.xml +++ b/make/data/cldr/common/main/kxv_Latn_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kxv_Orya.xml b/make/data/cldr/common/main/kxv_Orya.xml index 2e80de7ee33..948e43892dd 100644 --- a/make/data/cldr/common/main/kxv_Orya.xml +++ b/make/data/cldr/common/main/kxv_Orya.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kxv_Orya_IN.xml b/make/data/cldr/common/main/kxv_Orya_IN.xml index 590073986f7..cedd119b862 100644 --- a/make/data/cldr/common/main/kxv_Orya_IN.xml +++ b/make/data/cldr/common/main/kxv_Orya_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kxv_Telu.xml b/make/data/cldr/common/main/kxv_Telu.xml index c7b3dd3fabe..349281b4273 100644 --- a/make/data/cldr/common/main/kxv_Telu.xml +++ b/make/data/cldr/common/main/kxv_Telu.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/kxv_Telu_IN.xml b/make/data/cldr/common/main/kxv_Telu_IN.xml index 31c2167ca3f..efd968cf3d1 100644 --- a/make/data/cldr/common/main/kxv_Telu_IN.xml +++ b/make/data/cldr/common/main/kxv_Telu_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ky.xml b/make/data/cldr/common/main/ky.xml index 8c5abd4c2c2..60781875fb6 100644 --- a/make/data/cldr/common/main/ky.xml +++ b/make/data/cldr/common/main/ky.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/la.xml b/make/data/cldr/common/main/la.xml index 186fdabaf64..ac6303dcfee 100644 --- a/make/data/cldr/common/main/la.xml +++ b/make/data/cldr/common/main/la.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/la_VA.xml b/make/data/cldr/common/main/la_VA.xml index c14b6ed224e..882936a2d11 100644 --- a/make/data/cldr/common/main/la_VA.xml +++ b/make/data/cldr/common/main/la_VA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lag.xml b/make/data/cldr/common/main/lag.xml index 2da4f1f861a..c24bb2857fe 100644 --- a/make/data/cldr/common/main/lag.xml +++ b/make/data/cldr/common/main/lag.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lag_TZ.xml b/make/data/cldr/common/main/lag_TZ.xml index 0f06bad908e..bbada3821da 100644 --- a/make/data/cldr/common/main/lag_TZ.xml +++ b/make/data/cldr/common/main/lag_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lb.xml b/make/data/cldr/common/main/lb.xml index a681ff1b741..3088a99f343 100644 --- a/make/data/cldr/common/main/lb.xml +++ b/make/data/cldr/common/main/lb.xml @@ -1,8 +1,8 @@ - @@ -1128,7 +1128,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Vereinfacht Chinesesch - GB2312 Telefonsbuch-Zortéierung Pinyin-Zortéierregelen - Reforméiert Zortéierreiefolleg Allgemeng Sich Sich no Ufanksbuschtawen aus dem koreaneschen Alphabet Standard Zortéierreiefolleg @@ -2342,15 +2341,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic Taipeh - - Uschgorod - Kiew - - Saporischschja - Taschkent @@ -2887,11 +2880,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Lord-Howe-Summerzäit - - - Macquarieinsel-Zäit - - Magadan-Zäit @@ -2931,13 +2919,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mawson-Zäit - - - Nordwest-Mexiko-Zäit - Nordwest-Mexiko-Normalzäit - Nordwest-Mexiko-Summerzäit - - Mexikanesch Pazifikzäit diff --git a/make/data/cldr/common/main/lb_LU.xml b/make/data/cldr/common/main/lb_LU.xml index ea9fafdce7e..80db736f391 100644 --- a/make/data/cldr/common/main/lb_LU.xml +++ b/make/data/cldr/common/main/lb_LU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lg.xml b/make/data/cldr/common/main/lg.xml index e59e727aaf6..968e74f542d 100644 --- a/make/data/cldr/common/main/lg.xml +++ b/make/data/cldr/common/main/lg.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lg_UG.xml b/make/data/cldr/common/main/lg_UG.xml index 9f794c81e5d..cb4923685dd 100644 --- a/make/data/cldr/common/main/lg_UG.xml +++ b/make/data/cldr/common/main/lg_UG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lij.xml b/make/data/cldr/common/main/lij.xml index d69c2e99c27..5ab1baa0174 100644 --- a/make/data/cldr/common/main/lij.xml +++ b/make/data/cldr/common/main/lij.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lkt_US.xml b/make/data/cldr/common/main/lkt_US.xml index 415769eea87..4351b161d3f 100644 --- a/make/data/cldr/common/main/lkt_US.xml +++ b/make/data/cldr/common/main/lkt_US.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lmo.xml b/make/data/cldr/common/main/lmo.xml index 3ca0e5c6e1d..b50fb89c66b 100644 --- a/make/data/cldr/common/main/lmo.xml +++ b/make/data/cldr/common/main/lmo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lmo_IT.xml b/make/data/cldr/common/main/lmo_IT.xml index ecc417479a4..6f3d11658bc 100644 --- a/make/data/cldr/common/main/lmo_IT.xml +++ b/make/data/cldr/common/main/lmo_IT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ln.xml b/make/data/cldr/common/main/ln.xml index 35d08f6c23b..6f6222fad2a 100644 --- a/make/data/cldr/common/main/ln.xml +++ b/make/data/cldr/common/main/ln.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ln_AO.xml b/make/data/cldr/common/main/ln_AO.xml index 6b2faf65b5c..09b1c3d2ea4 100644 --- a/make/data/cldr/common/main/ln_AO.xml +++ b/make/data/cldr/common/main/ln_AO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ln_CD.xml b/make/data/cldr/common/main/ln_CD.xml index 38c201d1ef3..7d2f2b7ed93 100644 --- a/make/data/cldr/common/main/ln_CD.xml +++ b/make/data/cldr/common/main/ln_CD.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ln_CF.xml b/make/data/cldr/common/main/ln_CF.xml index ebe27cdaf37..694908121f5 100644 --- a/make/data/cldr/common/main/ln_CF.xml +++ b/make/data/cldr/common/main/ln_CF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ln_CG.xml b/make/data/cldr/common/main/ln_CG.xml index de4c31b22e9..51c8a9a07f8 100644 --- a/make/data/cldr/common/main/ln_CG.xml +++ b/make/data/cldr/common/main/ln_CG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lo.xml b/make/data/cldr/common/main/lo.xml index a7dd2f4db09..4bad8dcdf54 100644 --- a/make/data/cldr/common/main/lo.xml +++ b/make/data/cldr/common/main/lo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lrc.xml b/make/data/cldr/common/main/lrc.xml index c4799a2e68f..fc5ef7c2fe8 100644 --- a/make/data/cldr/common/main/lrc.xml +++ b/make/data/cldr/common/main/lrc.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lrc_IQ.xml b/make/data/cldr/common/main/lrc_IQ.xml index 522e4775657..28c931d4b5b 100644 --- a/make/data/cldr/common/main/lrc_IQ.xml +++ b/make/data/cldr/common/main/lrc_IQ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lrc_IR.xml b/make/data/cldr/common/main/lrc_IR.xml index b081c2bba42..ba23a13e760 100644 --- a/make/data/cldr/common/main/lrc_IR.xml +++ b/make/data/cldr/common/main/lrc_IR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lt.xml b/make/data/cldr/common/main/lt.xml index 46cc9da0f69..3e2e2951e0a 100644 --- a/make/data/cldr/common/main/lt.xml +++ b/make/data/cldr/common/main/lt.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lu.xml b/make/data/cldr/common/main/lu.xml index dc6a9e6a394..94e964dd36f 100644 --- a/make/data/cldr/common/main/lu.xml +++ b/make/data/cldr/common/main/lu.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lu_CD.xml b/make/data/cldr/common/main/lu_CD.xml index 7ba972ca5a5..826ad6749cd 100644 --- a/make/data/cldr/common/main/lu_CD.xml +++ b/make/data/cldr/common/main/lu_CD.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/luo.xml b/make/data/cldr/common/main/luo.xml index 8b6f5d669c5..b60480e457a 100644 --- a/make/data/cldr/common/main/luo.xml +++ b/make/data/cldr/common/main/luo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/luo_KE.xml b/make/data/cldr/common/main/luo_KE.xml index 32ea5aee9da..053db7388d7 100644 --- a/make/data/cldr/common/main/luo_KE.xml +++ b/make/data/cldr/common/main/luo_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/luy.xml b/make/data/cldr/common/main/luy.xml index df6bd7d76ec..a3ec56ed28f 100644 --- a/make/data/cldr/common/main/luy.xml +++ b/make/data/cldr/common/main/luy.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/luy_KE.xml b/make/data/cldr/common/main/luy_KE.xml index 3721de263f0..e5b25757a59 100644 --- a/make/data/cldr/common/main/luy_KE.xml +++ b/make/data/cldr/common/main/luy_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/lv.xml b/make/data/cldr/common/main/lv.xml index 1c175ffc3a9..c8009e5b1dd 100644 --- a/make/data/cldr/common/main/lv.xml +++ b/make/data/cldr/common/main/lv.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mai.xml b/make/data/cldr/common/main/mai.xml index 88234fe368c..2920468139f 100644 --- a/make/data/cldr/common/main/mai.xml +++ b/make/data/cldr/common/main/mai.xml @@ -1,8 +1,8 @@ - @@ -1733,9 +1733,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic क्रेस्टन - - येलोनाइफ - एडमोंटोन @@ -1754,30 +1751,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic रेसालूत - - रेनी रिवर - रेंकिन इनलेट अटिकोकन - - थंडर बे - - - निपिगान - टोरंटो इकालविट - - पैंगनिरटंग - मान्कटान @@ -2501,18 +2486,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic डारे सलाम - - उझोरोद - कीव सिम्फेरोपोल - - जपोरोजाए - कमपाला @@ -3092,11 +3071,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic लार्ड होबे डेलाइट टाइम - - - मेक्वैरी द्वीप टाइम - - मगादान टाइम @@ -3121,13 +3095,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic मारीशस समर टाइम - - - उत्तर-पश्चिमी मैक्सिको टाइम - उत्तर-पश्चिमी मैक्सिको मानक टाइम - उत्तर-पश्चिमी मैक्सिको डेलाइट टाइम - - मैक्सिकन पेसिफिक टाइम diff --git a/make/data/cldr/common/main/mai_IN.xml b/make/data/cldr/common/main/mai_IN.xml index 0a7af5039e4..5723c4896b9 100644 --- a/make/data/cldr/common/main/mai_IN.xml +++ b/make/data/cldr/common/main/mai_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mas.xml b/make/data/cldr/common/main/mas.xml index 23cb44b716d..3c9a16ba879 100644 --- a/make/data/cldr/common/main/mas.xml +++ b/make/data/cldr/common/main/mas.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mas_KE.xml b/make/data/cldr/common/main/mas_KE.xml index 5e2b2829a32..8fd05e37ceb 100644 --- a/make/data/cldr/common/main/mas_KE.xml +++ b/make/data/cldr/common/main/mas_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mas_TZ.xml b/make/data/cldr/common/main/mas_TZ.xml index 521840ff22f..9614975030f 100644 --- a/make/data/cldr/common/main/mas_TZ.xml +++ b/make/data/cldr/common/main/mas_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mdf.xml b/make/data/cldr/common/main/mdf.xml index e7b7651901f..23a1e567eab 100644 --- a/make/data/cldr/common/main/mdf.xml +++ b/make/data/cldr/common/main/mdf.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mdf_RU.xml b/make/data/cldr/common/main/mdf_RU.xml index e48359e322f..63f14c8e264 100644 --- a/make/data/cldr/common/main/mdf_RU.xml +++ b/make/data/cldr/common/main/mdf_RU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mer.xml b/make/data/cldr/common/main/mer.xml index 105b8d97b2a..d4bcbd8c1eb 100644 --- a/make/data/cldr/common/main/mer.xml +++ b/make/data/cldr/common/main/mer.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mer_KE.xml b/make/data/cldr/common/main/mer_KE.xml index 403ce5bca9b..6a9bf6854df 100644 --- a/make/data/cldr/common/main/mer_KE.xml +++ b/make/data/cldr/common/main/mer_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mfe.xml b/make/data/cldr/common/main/mfe.xml index 8a2f3072522..a7c8df749a7 100644 --- a/make/data/cldr/common/main/mfe.xml +++ b/make/data/cldr/common/main/mfe.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mfe_MU.xml b/make/data/cldr/common/main/mfe_MU.xml index c9cbc6f68e6..bc6821ba085 100644 --- a/make/data/cldr/common/main/mfe_MU.xml +++ b/make/data/cldr/common/main/mfe_MU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mg.xml b/make/data/cldr/common/main/mg.xml index 68cb2113a40..0174d0ea16a 100644 --- a/make/data/cldr/common/main/mg.xml +++ b/make/data/cldr/common/main/mg.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mg_MG.xml b/make/data/cldr/common/main/mg_MG.xml index 21a1a7681c1..fc8aa9874fd 100644 --- a/make/data/cldr/common/main/mg_MG.xml +++ b/make/data/cldr/common/main/mg_MG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mgh.xml b/make/data/cldr/common/main/mgh.xml index ad70d89e373..5799a350ee5 100644 --- a/make/data/cldr/common/main/mgh.xml +++ b/make/data/cldr/common/main/mgh.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mgh_MZ.xml b/make/data/cldr/common/main/mgh_MZ.xml index e59981df532..c220df1088f 100644 --- a/make/data/cldr/common/main/mgh_MZ.xml +++ b/make/data/cldr/common/main/mgh_MZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mgo.xml b/make/data/cldr/common/main/mgo.xml index 9ab489ad71d..66ac0625620 100644 --- a/make/data/cldr/common/main/mgo.xml +++ b/make/data/cldr/common/main/mgo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mgo_CM.xml b/make/data/cldr/common/main/mgo_CM.xml index c39835e66f6..493705ed806 100644 --- a/make/data/cldr/common/main/mgo_CM.xml +++ b/make/data/cldr/common/main/mgo_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mi.xml b/make/data/cldr/common/main/mi.xml index 75c01090e75..f06a7132a63 100644 --- a/make/data/cldr/common/main/mi.xml +++ b/make/data/cldr/common/main/mi.xml @@ -1,8 +1,8 @@ - @@ -1829,9 +1829,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Kemureti Pei - - Whaitiri Pei - Tāroto @@ -2602,11 +2599,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Wā Lord Howe Awatea - - - Wā o Te Moutere Makoare - - Wā Magadan @@ -2646,13 +2638,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Wā Mawson - - - Wā Mēhiko ki te uru-mā-raki - Wā Arowhānui o Mēhiko ki te uru-mā-raki - Wā Awatea o Mēhiko ki te uru-mā-raki - - Wā Mēhiko Kiwa diff --git a/make/data/cldr/common/main/mi_NZ.xml b/make/data/cldr/common/main/mi_NZ.xml index bd33d3b7ada..93e252d8726 100644 --- a/make/data/cldr/common/main/mi_NZ.xml +++ b/make/data/cldr/common/main/mi_NZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mic.xml b/make/data/cldr/common/main/mic.xml index 5f65b3dd38c..55f82bd7442 100644 --- a/make/data/cldr/common/main/mic.xml +++ b/make/data/cldr/common/main/mic.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mic_CA.xml b/make/data/cldr/common/main/mic_CA.xml index 5b8852c7943..cbe2e9e703b 100644 --- a/make/data/cldr/common/main/mic_CA.xml +++ b/make/data/cldr/common/main/mic_CA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mk.xml b/make/data/cldr/common/main/mk.xml index f40588a7fec..638e9972a4b 100644 --- a/make/data/cldr/common/main/mk.xml +++ b/make/data/cldr/common/main/mk.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ml.xml b/make/data/cldr/common/main/ml.xml index 63a5082b080..f71f5745bf8 100644 --- a/make/data/cldr/common/main/ml.xml +++ b/make/data/cldr/common/main/ml.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mn.xml b/make/data/cldr/common/main/mn.xml index b5085945472..23d8dc9c83c 100644 --- a/make/data/cldr/common/main/mn.xml +++ b/make/data/cldr/common/main/mn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mn_Mong.xml b/make/data/cldr/common/main/mn_Mong.xml index 2fa8326078a..252ac0d5a1a 100644 --- a/make/data/cldr/common/main/mn_Mong.xml +++ b/make/data/cldr/common/main/mn_Mong.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mn_Mong_CN.xml b/make/data/cldr/common/main/mn_Mong_CN.xml index 9879d57fc7e..84aa98185f0 100644 --- a/make/data/cldr/common/main/mn_Mong_CN.xml +++ b/make/data/cldr/common/main/mn_Mong_CN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mn_Mong_MN.xml b/make/data/cldr/common/main/mn_Mong_MN.xml index f8b90fe6e11..d512403c7e1 100644 --- a/make/data/cldr/common/main/mn_Mong_MN.xml +++ b/make/data/cldr/common/main/mn_Mong_MN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mni.xml b/make/data/cldr/common/main/mni.xml index 811c2753be3..345427427f6 100644 --- a/make/data/cldr/common/main/mni.xml +++ b/make/data/cldr/common/main/mni.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mni_Beng.xml b/make/data/cldr/common/main/mni_Beng.xml index 4f6e71f8810..9efb5c5a59c 100644 --- a/make/data/cldr/common/main/mni_Beng.xml +++ b/make/data/cldr/common/main/mni_Beng.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mni_Beng_IN.xml b/make/data/cldr/common/main/mni_Beng_IN.xml index 880999fbe30..bf54e2ee0b5 100644 --- a/make/data/cldr/common/main/mni_Beng_IN.xml +++ b/make/data/cldr/common/main/mni_Beng_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mni_Mtei.xml b/make/data/cldr/common/main/mni_Mtei.xml index a92604804c7..c3f491dffb6 100644 --- a/make/data/cldr/common/main/mni_Mtei.xml +++ b/make/data/cldr/common/main/mni_Mtei.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mni_Mtei_IN.xml b/make/data/cldr/common/main/mni_Mtei_IN.xml index 40c5a7b54c6..7691ca713f2 100644 --- a/make/data/cldr/common/main/mni_Mtei_IN.xml +++ b/make/data/cldr/common/main/mni_Mtei_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/moh.xml b/make/data/cldr/common/main/moh.xml index dce1422a3d7..13db5330ce9 100644 --- a/make/data/cldr/common/main/moh.xml +++ b/make/data/cldr/common/main/moh.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/moh_CA.xml b/make/data/cldr/common/main/moh_CA.xml index ed26e0c99fe..9f977507b81 100644 --- a/make/data/cldr/common/main/moh_CA.xml +++ b/make/data/cldr/common/main/moh_CA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mr.xml b/make/data/cldr/common/main/mr.xml index 26fc360e1d7..d19b803f5ce 100644 --- a/make/data/cldr/common/main/mr.xml +++ b/make/data/cldr/common/main/mr.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ms.xml b/make/data/cldr/common/main/ms.xml index be6a9762eba..c1382176e51 100644 --- a/make/data/cldr/common/main/ms.xml +++ b/make/data/cldr/common/main/ms.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ms_Arab_BN.xml b/make/data/cldr/common/main/ms_Arab_BN.xml index cfac2af9bcd..03b60d8dc3a 100644 --- a/make/data/cldr/common/main/ms_Arab_BN.xml +++ b/make/data/cldr/common/main/ms_Arab_BN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ms_Arab_MY.xml b/make/data/cldr/common/main/ms_Arab_MY.xml index 31478d27c4a..bddd3315cb2 100644 --- a/make/data/cldr/common/main/ms_Arab_MY.xml +++ b/make/data/cldr/common/main/ms_Arab_MY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ms_BN.xml b/make/data/cldr/common/main/ms_BN.xml index d8561e0bc36..d156f483167 100644 --- a/make/data/cldr/common/main/ms_BN.xml +++ b/make/data/cldr/common/main/ms_BN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ms_ID.xml b/make/data/cldr/common/main/ms_ID.xml index 197b758147e..0ca7f5756c9 100644 --- a/make/data/cldr/common/main/ms_ID.xml +++ b/make/data/cldr/common/main/ms_ID.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ms_MY.xml b/make/data/cldr/common/main/ms_MY.xml index 90b29f926c8..dda1253cdb5 100644 --- a/make/data/cldr/common/main/ms_MY.xml +++ b/make/data/cldr/common/main/ms_MY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ms_SG.xml b/make/data/cldr/common/main/ms_SG.xml index 4182f9d6c8b..f799e1eef9e 100644 --- a/make/data/cldr/common/main/ms_SG.xml +++ b/make/data/cldr/common/main/ms_SG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mt.xml b/make/data/cldr/common/main/mt.xml index 90630a2de8d..b9d33c5e0c7 100644 --- a/make/data/cldr/common/main/mt.xml +++ b/make/data/cldr/common/main/mt.xml @@ -1,8 +1,8 @@ - @@ -1720,9 +1720,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Vjenna - - Currie - Brussell diff --git a/make/data/cldr/common/main/mt_MT.xml b/make/data/cldr/common/main/mt_MT.xml index 1b7a403ebc2..b58fe9e5526 100644 --- a/make/data/cldr/common/main/mt_MT.xml +++ b/make/data/cldr/common/main/mt_MT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mua.xml b/make/data/cldr/common/main/mua.xml index ba906c36deb..da45b0d679b 100644 --- a/make/data/cldr/common/main/mua.xml +++ b/make/data/cldr/common/main/mua.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mua_CM.xml b/make/data/cldr/common/main/mua_CM.xml index 8af56d08795..caad2d7cc70 100644 --- a/make/data/cldr/common/main/mua_CM.xml +++ b/make/data/cldr/common/main/mua_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mus.xml b/make/data/cldr/common/main/mus.xml index 5aa33c03b94..c25ac4b0d9a 100644 --- a/make/data/cldr/common/main/mus.xml +++ b/make/data/cldr/common/main/mus.xml @@ -1,8 +1,8 @@ - @@ -19,8 +19,8 @@ CLDR data files are interpreted according to the LDML specification (http://unic - [a c e f h i k l m n o p r s t u v w y ʼ] - [b d ē g j q z] + [a c eē f h i k l m n o p r s t u v w y ʼ] + [b d g j q z] [A C E F H I K L M N O P R S T U V W Y] [\- ‐‑ – — , ; \: ! ? . … '‘’ "“” ( ) \[ \] § @ * / \& # † ‡ ′ ″] @@ -73,13 +73,13 @@ CLDR data files are interpreted according to the LDML specification (http://unic - Nettv Cako + Nettvʼcako Enhvteceskv Enhvteceskv Enhvyvtke Ennvrkvpv Ennvrkvpv Enhvyvtke Nak Okkoskv Nettv - Nettv Cakcuse + Nettv Cakʼcuse @@ -142,7 +142,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic Hvse - Nettv Cako + Nettvcako Nettv diff --git a/make/data/cldr/common/main/mus_US.xml b/make/data/cldr/common/main/mus_US.xml index 1f8591ec072..3c4734e80a6 100644 --- a/make/data/cldr/common/main/mus_US.xml +++ b/make/data/cldr/common/main/mus_US.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/my.xml b/make/data/cldr/common/main/my.xml index 84c3e543fd9..7fb0996ea9c 100644 --- a/make/data/cldr/common/main/my.xml +++ b/make/data/cldr/common/main/my.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/myv.xml b/make/data/cldr/common/main/myv.xml index c02306f8503..58c41e016ae 100644 --- a/make/data/cldr/common/main/myv.xml +++ b/make/data/cldr/common/main/myv.xml @@ -1,8 +1,8 @@ - @@ -508,18 +508,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic Тайпей - - Ужгород - Киев Симферополь - - Запорожье - Бойси diff --git a/make/data/cldr/common/main/myv_RU.xml b/make/data/cldr/common/main/myv_RU.xml index da3bfc9a168..d14f2711c19 100644 --- a/make/data/cldr/common/main/myv_RU.xml +++ b/make/data/cldr/common/main/myv_RU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mzn.xml b/make/data/cldr/common/main/mzn.xml index 76e938f2196..599f5d52656 100644 --- a/make/data/cldr/common/main/mzn.xml +++ b/make/data/cldr/common/main/mzn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/mzn_IR.xml b/make/data/cldr/common/main/mzn_IR.xml index acda126e168..86f4ea58065 100644 --- a/make/data/cldr/common/main/mzn_IR.xml +++ b/make/data/cldr/common/main/mzn_IR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/naq.xml b/make/data/cldr/common/main/naq.xml index c2d393e7355..de8df9f5c99 100644 --- a/make/data/cldr/common/main/naq.xml +++ b/make/data/cldr/common/main/naq.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/naq_NA.xml b/make/data/cldr/common/main/naq_NA.xml index 2e4c49f5d0c..cfc526d85fb 100644 --- a/make/data/cldr/common/main/naq_NA.xml +++ b/make/data/cldr/common/main/naq_NA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nb.xml b/make/data/cldr/common/main/nb.xml index 5aa284e5240..e976bed763b 100644 --- a/make/data/cldr/common/main/nb.xml +++ b/make/data/cldr/common/main/nb.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nb_NO.xml b/make/data/cldr/common/main/nb_NO.xml index d7d07ed5600..884d9ab3fec 100644 --- a/make/data/cldr/common/main/nb_NO.xml +++ b/make/data/cldr/common/main/nb_NO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nb_SJ.xml b/make/data/cldr/common/main/nb_SJ.xml index a6e024c7f95..c4a140911c4 100644 --- a/make/data/cldr/common/main/nb_SJ.xml +++ b/make/data/cldr/common/main/nb_SJ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nd.xml b/make/data/cldr/common/main/nd.xml index e2bd7af01bd..090794fb3fa 100644 --- a/make/data/cldr/common/main/nd.xml +++ b/make/data/cldr/common/main/nd.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nd_ZW.xml b/make/data/cldr/common/main/nd_ZW.xml index d311aada9fb..11463f23aa7 100644 --- a/make/data/cldr/common/main/nd_ZW.xml +++ b/make/data/cldr/common/main/nd_ZW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nds.xml b/make/data/cldr/common/main/nds.xml index 3e0ae0bea9e..9f827f0337d 100644 --- a/make/data/cldr/common/main/nds.xml +++ b/make/data/cldr/common/main/nds.xml @@ -1,8 +1,8 @@ - @@ -1554,12 +1554,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Kamschatka - - Uschgorod - - - Saporoschje - New Salem, Noord-Dakota diff --git a/make/data/cldr/common/main/nds_DE.xml b/make/data/cldr/common/main/nds_DE.xml index 437a10b5387..b8080c1b38f 100644 --- a/make/data/cldr/common/main/nds_DE.xml +++ b/make/data/cldr/common/main/nds_DE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nds_NL.xml b/make/data/cldr/common/main/nds_NL.xml index 8f4ab54077a..c8b33f0cbb9 100644 --- a/make/data/cldr/common/main/nds_NL.xml +++ b/make/data/cldr/common/main/nds_NL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ne.xml b/make/data/cldr/common/main/ne.xml index f40f2e6bdc0..d48508040b6 100644 --- a/make/data/cldr/common/main/ne.xml +++ b/make/data/cldr/common/main/ne.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ne_NP.xml b/make/data/cldr/common/main/ne_NP.xml index 5bd9f42df74..47c6ac59d74 100644 --- a/make/data/cldr/common/main/ne_NP.xml +++ b/make/data/cldr/common/main/ne_NP.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nl.xml b/make/data/cldr/common/main/nl.xml index faec9f164eb..8ff890e6dd5 100644 --- a/make/data/cldr/common/main/nl.xml +++ b/make/data/cldr/common/main/nl.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nl_BE.xml b/make/data/cldr/common/main/nl_BE.xml index 6aa80bb5ba6..36e44b41bc0 100644 --- a/make/data/cldr/common/main/nl_BE.xml +++ b/make/data/cldr/common/main/nl_BE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nl_BQ.xml b/make/data/cldr/common/main/nl_BQ.xml index f6a7ff1ed45..fb89bec8b13 100644 --- a/make/data/cldr/common/main/nl_BQ.xml +++ b/make/data/cldr/common/main/nl_BQ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nl_CW.xml b/make/data/cldr/common/main/nl_CW.xml index 356769980c2..11c3f1a2f65 100644 --- a/make/data/cldr/common/main/nl_CW.xml +++ b/make/data/cldr/common/main/nl_CW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nl_NL.xml b/make/data/cldr/common/main/nl_NL.xml index c1029d8f90a..1a40318fdf1 100644 --- a/make/data/cldr/common/main/nl_NL.xml +++ b/make/data/cldr/common/main/nl_NL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nl_SR.xml b/make/data/cldr/common/main/nl_SR.xml index 4d87212fdbc..c3ae94252dd 100644 --- a/make/data/cldr/common/main/nl_SR.xml +++ b/make/data/cldr/common/main/nl_SR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nl_SX.xml b/make/data/cldr/common/main/nl_SX.xml index 362f8d5c9c1..e750bc82886 100644 --- a/make/data/cldr/common/main/nl_SX.xml +++ b/make/data/cldr/common/main/nl_SX.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nmg.xml b/make/data/cldr/common/main/nmg.xml index 340245d3698..1b0e1530bd7 100644 --- a/make/data/cldr/common/main/nmg.xml +++ b/make/data/cldr/common/main/nmg.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nmg_CM.xml b/make/data/cldr/common/main/nmg_CM.xml index c31e6dc2d55..7cdc4c81e89 100644 --- a/make/data/cldr/common/main/nmg_CM.xml +++ b/make/data/cldr/common/main/nmg_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nn.xml b/make/data/cldr/common/main/nn.xml index 5e395043c29..3bdbc291fa5 100644 --- a/make/data/cldr/common/main/nn.xml +++ b/make/data/cldr/common/main/nn.xml @@ -1,8 +1,8 @@ - @@ -1422,13 +1422,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic mauritisk sommartid - - - tidssone for nordvestlege Mexico - normaltid for nordvestlege Mexico - sommartid for nordvestlege Mexico - - tidssone for den meksikanske stillehavskysten diff --git a/make/data/cldr/common/main/nn_NO.xml b/make/data/cldr/common/main/nn_NO.xml index c84a0bb5c90..8d15a18fed9 100644 --- a/make/data/cldr/common/main/nn_NO.xml +++ b/make/data/cldr/common/main/nn_NO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nnh.xml b/make/data/cldr/common/main/nnh.xml index c4998898298..9d7b4ab82e1 100644 --- a/make/data/cldr/common/main/nnh.xml +++ b/make/data/cldr/common/main/nnh.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nnh_CM.xml b/make/data/cldr/common/main/nnh_CM.xml index f40f38c3363..e4be7d0bed3 100644 --- a/make/data/cldr/common/main/nnh_CM.xml +++ b/make/data/cldr/common/main/nnh_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/no.xml b/make/data/cldr/common/main/no.xml index 3546bb19b62..d92734444e5 100644 --- a/make/data/cldr/common/main/no.xml +++ b/make/data/cldr/common/main/no.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nqo_GN.xml b/make/data/cldr/common/main/nqo_GN.xml index 3bde714a333..18820b62e57 100644 --- a/make/data/cldr/common/main/nqo_GN.xml +++ b/make/data/cldr/common/main/nqo_GN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nr.xml b/make/data/cldr/common/main/nr.xml index b6a2e502f2c..12f2badb7a9 100644 --- a/make/data/cldr/common/main/nr.xml +++ b/make/data/cldr/common/main/nr.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nr_ZA.xml b/make/data/cldr/common/main/nr_ZA.xml index b009779e64c..a3d30e250b9 100644 --- a/make/data/cldr/common/main/nr_ZA.xml +++ b/make/data/cldr/common/main/nr_ZA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nso.xml b/make/data/cldr/common/main/nso.xml index b783dfa44aa..2861eaab685 100644 --- a/make/data/cldr/common/main/nso.xml +++ b/make/data/cldr/common/main/nso.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nso_ZA.xml b/make/data/cldr/common/main/nso_ZA.xml index ae90284ca6b..dcb283d3b2c 100644 --- a/make/data/cldr/common/main/nso_ZA.xml +++ b/make/data/cldr/common/main/nso_ZA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nus.xml b/make/data/cldr/common/main/nus.xml index e6244ed4d3f..fef478634ee 100644 --- a/make/data/cldr/common/main/nus.xml +++ b/make/data/cldr/common/main/nus.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nus_SS.xml b/make/data/cldr/common/main/nus_SS.xml index 57dc90e0f6f..8aa24a11103 100644 --- a/make/data/cldr/common/main/nus_SS.xml +++ b/make/data/cldr/common/main/nus_SS.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nv.xml b/make/data/cldr/common/main/nv.xml index af444dad979..311f0fa810b 100644 --- a/make/data/cldr/common/main/nv.xml +++ b/make/data/cldr/common/main/nv.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nv_US.xml b/make/data/cldr/common/main/nv_US.xml index fb4fee38263..09914927cd4 100644 --- a/make/data/cldr/common/main/nv_US.xml +++ b/make/data/cldr/common/main/nv_US.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ny.xml b/make/data/cldr/common/main/ny.xml index 3493063fb5d..54f19ee0fd1 100644 --- a/make/data/cldr/common/main/ny.xml +++ b/make/data/cldr/common/main/ny.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ny_MW.xml b/make/data/cldr/common/main/ny_MW.xml index acd7b467f2e..e8ac1b7925a 100644 --- a/make/data/cldr/common/main/ny_MW.xml +++ b/make/data/cldr/common/main/ny_MW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nyn.xml b/make/data/cldr/common/main/nyn.xml index f9f3867d0b5..cdb3cc3aa85 100644 --- a/make/data/cldr/common/main/nyn.xml +++ b/make/data/cldr/common/main/nyn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/nyn_UG.xml b/make/data/cldr/common/main/nyn_UG.xml index 5e90288970e..0594d79bfe9 100644 --- a/make/data/cldr/common/main/nyn_UG.xml +++ b/make/data/cldr/common/main/nyn_UG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/oc.xml b/make/data/cldr/common/main/oc.xml index 4f73324d5c5..9112d362b15 100644 --- a/make/data/cldr/common/main/oc.xml +++ b/make/data/cldr/common/main/oc.xml @@ -1,8 +1,8 @@ - @@ -1711,11 +1711,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ora d’estiu de Lord Howe - - - ora de l’illa Macquarie - - ora de Magadan @@ -1755,13 +1750,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ora de Mawson - - - ora del nòrd-èst de Mexic - ora estandarda del nòrd-èst de Mexic - ora d’estiu del nòrd-èst de Mexic - - ora del Pacific Mexican diff --git a/make/data/cldr/common/main/oc_ES.xml b/make/data/cldr/common/main/oc_ES.xml index 7553860522f..98fc4cca45e 100644 --- a/make/data/cldr/common/main/oc_ES.xml +++ b/make/data/cldr/common/main/oc_ES.xml @@ -1,8 +1,8 @@ - @@ -1230,9 +1230,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Simferòpol - - Zaporiyia - Beulah, Dakota deth Nòrd @@ -1671,11 +1668,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ora des Espòrades Equatorials - - - ora dera Isla Macquarie - - ora de Magadan @@ -1700,13 +1692,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ora d’estiu de Maurici - - - ora deth nòrd-èst de Mexic - ora estandard deth nòrd-èst de Mexic - ora d’estiu deth nòrd-èst de Mexic - - ora deth Pacífic de Mexic diff --git a/make/data/cldr/common/main/oc_FR.xml b/make/data/cldr/common/main/oc_FR.xml index bd648173ca5..6018774650a 100644 --- a/make/data/cldr/common/main/oc_FR.xml +++ b/make/data/cldr/common/main/oc_FR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/om.xml b/make/data/cldr/common/main/om.xml index 42cf179b2fa..673379b1e8a 100644 --- a/make/data/cldr/common/main/om.xml +++ b/make/data/cldr/common/main/om.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/om_ET.xml b/make/data/cldr/common/main/om_ET.xml index a307367f36b..c4215878f67 100644 --- a/make/data/cldr/common/main/om_ET.xml +++ b/make/data/cldr/common/main/om_ET.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/om_KE.xml b/make/data/cldr/common/main/om_KE.xml index e9708ebea4c..5a9d5b20192 100644 --- a/make/data/cldr/common/main/om_KE.xml +++ b/make/data/cldr/common/main/om_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/or.xml b/make/data/cldr/common/main/or.xml index 24fb73de49b..a5680dfbb82 100644 --- a/make/data/cldr/common/main/or.xml +++ b/make/data/cldr/common/main/or.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/os.xml b/make/data/cldr/common/main/os.xml index a6e7e64b641..347fec989fa 100644 --- a/make/data/cldr/common/main/os.xml +++ b/make/data/cldr/common/main/os.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/os_GE.xml b/make/data/cldr/common/main/os_GE.xml index 20e78f85dba..fd327c6700d 100644 --- a/make/data/cldr/common/main/os_GE.xml +++ b/make/data/cldr/common/main/os_GE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/os_RU.xml b/make/data/cldr/common/main/os_RU.xml index 94c09c446ce..3653ce1d58b 100644 --- a/make/data/cldr/common/main/os_RU.xml +++ b/make/data/cldr/common/main/os_RU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/osa.xml b/make/data/cldr/common/main/osa.xml index 5527aacfb9e..43fc58c2334 100644 --- a/make/data/cldr/common/main/osa.xml +++ b/make/data/cldr/common/main/osa.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/osa_US.xml b/make/data/cldr/common/main/osa_US.xml index 9056a39064d..961506955d0 100644 --- a/make/data/cldr/common/main/osa_US.xml +++ b/make/data/cldr/common/main/osa_US.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pa.xml b/make/data/cldr/common/main/pa.xml index 4336c600b8d..7e4c316934e 100644 --- a/make/data/cldr/common/main/pa.xml +++ b/make/data/cldr/common/main/pa.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pa_Arab_PK.xml b/make/data/cldr/common/main/pa_Arab_PK.xml index 14d9e8cb434..b5fbaba6dd5 100644 --- a/make/data/cldr/common/main/pa_Arab_PK.xml +++ b/make/data/cldr/common/main/pa_Arab_PK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pa_Guru.xml b/make/data/cldr/common/main/pa_Guru.xml index 4481adce1bf..7404e53d47e 100644 --- a/make/data/cldr/common/main/pa_Guru.xml +++ b/make/data/cldr/common/main/pa_Guru.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pa_Guru_IN.xml b/make/data/cldr/common/main/pa_Guru_IN.xml index 6feaf212303..0373b1e6094 100644 --- a/make/data/cldr/common/main/pa_Guru_IN.xml +++ b/make/data/cldr/common/main/pa_Guru_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pap.xml b/make/data/cldr/common/main/pap.xml index 25f47f85795..c3fd361f473 100644 --- a/make/data/cldr/common/main/pap.xml +++ b/make/data/cldr/common/main/pap.xml @@ -1,8 +1,8 @@ - @@ -331,7 +331,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic E, d MMM – d MMM y G - E, d MMM y G  – E, d MMM y G + E, d MMM y G – E, d MMM y G E, d MMM – E, d MMM y G E, d MMM y – E, d MMM y G @@ -616,7 +616,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic d–d MMM - d MMM  – d MMM + d MMM – d MMM E, d MMM – E, d MMM diff --git a/make/data/cldr/common/main/pap_AW.xml b/make/data/cldr/common/main/pap_AW.xml index 0b4b9f459e8..fe75adea332 100644 --- a/make/data/cldr/common/main/pap_AW.xml +++ b/make/data/cldr/common/main/pap_AW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pap_CW.xml b/make/data/cldr/common/main/pap_CW.xml index d3e92b3856d..30f9b0a6471 100644 --- a/make/data/cldr/common/main/pap_CW.xml +++ b/make/data/cldr/common/main/pap_CW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pcm.xml b/make/data/cldr/common/main/pcm.xml index f8db8811623..c35230097e0 100644 --- a/make/data/cldr/common/main/pcm.xml +++ b/make/data/cldr/common/main/pcm.xml @@ -1,8 +1,8 @@ - @@ -1779,9 +1779,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mẹ́lbọn - - Kọ́ri - Hóbat @@ -1926,9 +1923,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Krẹ́stọn - - Yẹ́lónaif - Ẹ́dmọ́ntọn @@ -1947,30 +1941,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic Rẹ́zólut - - Réní Ríva - Ránkín Ínlẹt Atíkókan - - Tọ́nda Bè - - - Nípígọn - Torónto Ikáluit - - Pangnírtung - Mọ́nktọn @@ -2748,18 +2730,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic Dar ẹ́s Salam - - Ọ́zhọrọd - Kiẹv Símfẹrópol - - Zaporózhia - Kampála @@ -2775,9 +2751,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Noom - - Jọ́nstun - Ánkọ́rej @@ -3410,11 +3383,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Lọd Haú Délaít Taim - - - Makwuéí Aíland Taim - - Mágádan Taim @@ -3454,13 +3422,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mọ́sọn Taim - - - Nọ́twẹ́st Mẹ́ksíko Taim - Nọ́twẹ́st Mẹ́ksíko Fíksd Taim - Nọ́twẹ́st Mẹ́ksíko Délaít Taim - - Mẹ́ksíkó Pasífík Taim diff --git a/make/data/cldr/common/main/pcm_NG.xml b/make/data/cldr/common/main/pcm_NG.xml index 5d1bbae805a..83ecba1e4aa 100644 --- a/make/data/cldr/common/main/pcm_NG.xml +++ b/make/data/cldr/common/main/pcm_NG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pis.xml b/make/data/cldr/common/main/pis.xml index af211ba9a39..65d4c579ca4 100644 --- a/make/data/cldr/common/main/pis.xml +++ b/make/data/cldr/common/main/pis.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pis_SB.xml b/make/data/cldr/common/main/pis_SB.xml index 72e14ac3578..0463fa6cd0c 100644 --- a/make/data/cldr/common/main/pis_SB.xml +++ b/make/data/cldr/common/main/pis_SB.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pl.xml b/make/data/cldr/common/main/pl.xml index e77d953415e..81ae0f081be 100644 --- a/make/data/cldr/common/main/pl.xml +++ b/make/data/cldr/common/main/pl.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/prg.xml b/make/data/cldr/common/main/prg.xml index 50fc4ff3893..2be8a674c6a 100644 --- a/make/data/cldr/common/main/prg.xml +++ b/make/data/cldr/common/main/prg.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/prg_PL.xml b/make/data/cldr/common/main/prg_PL.xml index 6ac9dba73df..95506f645ed 100644 --- a/make/data/cldr/common/main/prg_PL.xml +++ b/make/data/cldr/common/main/prg_PL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ps.xml b/make/data/cldr/common/main/ps.xml index 4b6d562e084..6ab37082d49 100644 --- a/make/data/cldr/common/main/ps.xml +++ b/make/data/cldr/common/main/ps.xml @@ -1,8 +1,8 @@ - @@ -1859,9 +1859,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic میلبورن - - کرري - هوبارټ @@ -2015,9 +2012,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic کرسټون - - يلونايف - ایډمونټن @@ -2036,30 +2030,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic ريسالوټ - - د باران باران - رينکن انلټ اتیکوکن - - تنډر بی - - - نیپګون - ټورنټو اقلیټ - - پينګنرچونګ - مونکټون @@ -2870,18 +2852,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic دار السلام - - یوژورډ - کیف سیمفروپول - - زاپوروژی - کمپاله @@ -2900,9 +2876,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic هینولولو - - جانسټن - اینکریج @@ -3538,11 +3511,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic لارډ هوي د ورځې روښانه وخت - - - مکواري ټاپو وخت - - ميګډان وخت @@ -3582,13 +3550,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ماوسن وخت - - - د شمال لویدیځ مکسیکو وخت - د شمال لویدیځ مکسیکو معیاري وخت - د شمال لویدیځ مکسیکو رڼا ورځې وخت - - مکسیکن پیسفک وخت diff --git a/make/data/cldr/common/main/ps_AF.xml b/make/data/cldr/common/main/ps_AF.xml index 03565b354ce..ba7f778fdc9 100644 --- a/make/data/cldr/common/main/ps_AF.xml +++ b/make/data/cldr/common/main/ps_AF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ps_PK.xml b/make/data/cldr/common/main/ps_PK.xml index 38a7c4d0ef7..ef66321643b 100644 --- a/make/data/cldr/common/main/ps_PK.xml +++ b/make/data/cldr/common/main/ps_PK.xml @@ -1,8 +1,8 @@ - @@ -202,11 +202,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic رب هاو د ورځے د رڼا وخت - - - د شمال لویدیځ مکسیکو رڼا ورځے وخت - - مکسیکن پیسفک رڼا ورځے وخت diff --git a/make/data/cldr/common/main/pt.xml b/make/data/cldr/common/main/pt.xml index 3386faf6bda..83930b83c24 100644 --- a/make/data/cldr/common/main/pt.xml +++ b/make/data/cldr/common/main/pt.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pt_BR.xml b/make/data/cldr/common/main/pt_BR.xml index 7b33b1da354..d56d9554f77 100644 --- a/make/data/cldr/common/main/pt_BR.xml +++ b/make/data/cldr/common/main/pt_BR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pt_CH.xml b/make/data/cldr/common/main/pt_CH.xml index a55d5c546b7..5b8ad6f5143 100644 --- a/make/data/cldr/common/main/pt_CH.xml +++ b/make/data/cldr/common/main/pt_CH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pt_CV.xml b/make/data/cldr/common/main/pt_CV.xml index 27562ab33b0..1d9d5db0e2d 100644 --- a/make/data/cldr/common/main/pt_CV.xml +++ b/make/data/cldr/common/main/pt_CV.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pt_GQ.xml b/make/data/cldr/common/main/pt_GQ.xml index 859448ceb3b..b9d78e6a6f1 100644 --- a/make/data/cldr/common/main/pt_GQ.xml +++ b/make/data/cldr/common/main/pt_GQ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pt_GW.xml b/make/data/cldr/common/main/pt_GW.xml index 39a465e162c..bb9b77b7d96 100644 --- a/make/data/cldr/common/main/pt_GW.xml +++ b/make/data/cldr/common/main/pt_GW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pt_LU.xml b/make/data/cldr/common/main/pt_LU.xml index 60c6bb06fb6..c4ca53f2af2 100644 --- a/make/data/cldr/common/main/pt_LU.xml +++ b/make/data/cldr/common/main/pt_LU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pt_MO.xml b/make/data/cldr/common/main/pt_MO.xml index 5982c44b432..a5806b02ca4 100644 --- a/make/data/cldr/common/main/pt_MO.xml +++ b/make/data/cldr/common/main/pt_MO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pt_MZ.xml b/make/data/cldr/common/main/pt_MZ.xml index 6c9a3b16690..b056c0ac5d5 100644 --- a/make/data/cldr/common/main/pt_MZ.xml +++ b/make/data/cldr/common/main/pt_MZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pt_PT.xml b/make/data/cldr/common/main/pt_PT.xml index 32345e1c47e..54bbe87de2a 100644 --- a/make/data/cldr/common/main/pt_PT.xml +++ b/make/data/cldr/common/main/pt_PT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/pt_TL.xml b/make/data/cldr/common/main/pt_TL.xml index 32f76a2743b..488246ffbde 100644 --- a/make/data/cldr/common/main/pt_TL.xml +++ b/make/data/cldr/common/main/pt_TL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/qu.xml b/make/data/cldr/common/main/qu.xml index c6b3e71d36b..f6994d2832b 100644 --- a/make/data/cldr/common/main/qu.xml +++ b/make/data/cldr/common/main/qu.xml @@ -1,8 +1,8 @@ - @@ -1505,9 +1505,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Adelaida - - Currie - Sidney @@ -2271,11 +2268,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Hora de Verano de Lord Howe - - - Hora de Isla Macquarie - - Hora de Magadan @@ -2315,13 +2307,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Hora de Mawson - - - Hora Estandar de Verano de México - Hora Estandar del Noroeste de México - Hora de Verano del Noroeste de México - - Hora del Pacífico Mexicano diff --git a/make/data/cldr/common/main/qu_BO.xml b/make/data/cldr/common/main/qu_BO.xml index cdfcca85645..7eba6f91da0 100644 --- a/make/data/cldr/common/main/qu_BO.xml +++ b/make/data/cldr/common/main/qu_BO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/qu_EC.xml b/make/data/cldr/common/main/qu_EC.xml index 754bb8c91e3..2cfdf0b5e0a 100644 --- a/make/data/cldr/common/main/qu_EC.xml +++ b/make/data/cldr/common/main/qu_EC.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/qu_PE.xml b/make/data/cldr/common/main/qu_PE.xml index 534932b04b8..7018e5d4942 100644 --- a/make/data/cldr/common/main/qu_PE.xml +++ b/make/data/cldr/common/main/qu_PE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/quc.xml b/make/data/cldr/common/main/quc.xml index 9a33eca95db..a30a30b9b7e 100644 --- a/make/data/cldr/common/main/quc.xml +++ b/make/data/cldr/common/main/quc.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/quc_GT.xml b/make/data/cldr/common/main/quc_GT.xml index 2c64b467b7d..1a1549c4b9b 100644 --- a/make/data/cldr/common/main/quc_GT.xml +++ b/make/data/cldr/common/main/quc_GT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/raj.xml b/make/data/cldr/common/main/raj.xml index d3286df9f9b..55569ec849c 100644 --- a/make/data/cldr/common/main/raj.xml +++ b/make/data/cldr/common/main/raj.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/raj_IN.xml b/make/data/cldr/common/main/raj_IN.xml index 37d9b4cbc5d..a2e6c9c10c5 100644 --- a/make/data/cldr/common/main/raj_IN.xml +++ b/make/data/cldr/common/main/raj_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rhg.xml b/make/data/cldr/common/main/rhg.xml index 530c8f0be75..f100e9155f2 100644 --- a/make/data/cldr/common/main/rhg.xml +++ b/make/data/cldr/common/main/rhg.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rhg_Rohg.xml b/make/data/cldr/common/main/rhg_Rohg.xml index 351938d4f6d..f88501c90b1 100644 --- a/make/data/cldr/common/main/rhg_Rohg.xml +++ b/make/data/cldr/common/main/rhg_Rohg.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rhg_Rohg_BD.xml b/make/data/cldr/common/main/rhg_Rohg_BD.xml index 9cd4f6428ba..97fcdfdc9fd 100644 --- a/make/data/cldr/common/main/rhg_Rohg_BD.xml +++ b/make/data/cldr/common/main/rhg_Rohg_BD.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rhg_Rohg_MM.xml b/make/data/cldr/common/main/rhg_Rohg_MM.xml index 1a5e3a3b9d8..516f2632466 100644 --- a/make/data/cldr/common/main/rhg_Rohg_MM.xml +++ b/make/data/cldr/common/main/rhg_Rohg_MM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rif.xml b/make/data/cldr/common/main/rif.xml index 5fc7882b682..f76062cca82 100644 --- a/make/data/cldr/common/main/rif.xml +++ b/make/data/cldr/common/main/rif.xml @@ -1,8 +1,8 @@ - @@ -1288,13 +1288,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic akud n uzil n haway-alucyan - - - akud n sennej i lɣerb n miksiku - akud anaway n sennej i lɣerb n miksiku - akud n uzil n sennej i lɣerb n miksiku - - akud n pasifik amiksikan diff --git a/make/data/cldr/common/main/rif_MA.xml b/make/data/cldr/common/main/rif_MA.xml index b099abe9ca4..cb1758ce486 100644 --- a/make/data/cldr/common/main/rif_MA.xml +++ b/make/data/cldr/common/main/rif_MA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rm.xml b/make/data/cldr/common/main/rm.xml index efabbdb3fd0..0b7bc117042 100644 --- a/make/data/cldr/common/main/rm.xml +++ b/make/data/cldr/common/main/rm.xml @@ -1,8 +1,8 @@ - @@ -2002,12 +2002,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Daressalam - - Uschhorod - - - Saporischja - Alasca diff --git a/make/data/cldr/common/main/rm_CH.xml b/make/data/cldr/common/main/rm_CH.xml index 3fa28bb6ffc..89fa47c46fc 100644 --- a/make/data/cldr/common/main/rm_CH.xml +++ b/make/data/cldr/common/main/rm_CH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rn.xml b/make/data/cldr/common/main/rn.xml index 4e9893319d6..b9863f0374b 100644 --- a/make/data/cldr/common/main/rn.xml +++ b/make/data/cldr/common/main/rn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rn_BI.xml b/make/data/cldr/common/main/rn_BI.xml index 2cc7c75231c..5d22cd47227 100644 --- a/make/data/cldr/common/main/rn_BI.xml +++ b/make/data/cldr/common/main/rn_BI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ro.xml b/make/data/cldr/common/main/ro.xml index 1de4dede84f..633dacc18c1 100644 --- a/make/data/cldr/common/main/ro.xml +++ b/make/data/cldr/common/main/ro.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ro_RO.xml b/make/data/cldr/common/main/ro_RO.xml index afa4e5f5439..ffa86ea3d2d 100644 --- a/make/data/cldr/common/main/ro_RO.xml +++ b/make/data/cldr/common/main/ro_RO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rof.xml b/make/data/cldr/common/main/rof.xml index c69cf20abd3..c174f7f1a01 100644 --- a/make/data/cldr/common/main/rof.xml +++ b/make/data/cldr/common/main/rof.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rof_TZ.xml b/make/data/cldr/common/main/rof_TZ.xml index f5738ee3f34..4edf5689c7e 100644 --- a/make/data/cldr/common/main/rof_TZ.xml +++ b/make/data/cldr/common/main/rof_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/root.xml b/make/data/cldr/common/main/root.xml index 56cf38d18d4..12c883da38f 100644 --- a/make/data/cldr/common/main/root.xml +++ b/make/data/cldr/common/main/root.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ru_KG.xml b/make/data/cldr/common/main/ru_KG.xml index ada0ba6f8de..52d7a7b1999 100644 --- a/make/data/cldr/common/main/ru_KG.xml +++ b/make/data/cldr/common/main/ru_KG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ru_KZ.xml b/make/data/cldr/common/main/ru_KZ.xml index 6bf4132802a..af683f7fe06 100644 --- a/make/data/cldr/common/main/ru_KZ.xml +++ b/make/data/cldr/common/main/ru_KZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ru_MD.xml b/make/data/cldr/common/main/ru_MD.xml index 9640c522c41..f4a39c6903b 100644 --- a/make/data/cldr/common/main/ru_MD.xml +++ b/make/data/cldr/common/main/ru_MD.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ru_RU.xml b/make/data/cldr/common/main/ru_RU.xml index 1e78c6fc019..aa008c5f446 100644 --- a/make/data/cldr/common/main/ru_RU.xml +++ b/make/data/cldr/common/main/ru_RU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ru_UA.xml b/make/data/cldr/common/main/ru_UA.xml index ce9396a0f38..2b45e4bf7fc 100644 --- a/make/data/cldr/common/main/ru_UA.xml +++ b/make/data/cldr/common/main/ru_UA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rw.xml b/make/data/cldr/common/main/rw.xml index c62908a7d75..b2e103528ac 100644 --- a/make/data/cldr/common/main/rw.xml +++ b/make/data/cldr/common/main/rw.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rw_RW.xml b/make/data/cldr/common/main/rw_RW.xml index 89525f3cf27..3884fab8cf2 100644 --- a/make/data/cldr/common/main/rw_RW.xml +++ b/make/data/cldr/common/main/rw_RW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rwk.xml b/make/data/cldr/common/main/rwk.xml index 31977128ac3..9a32f8431e7 100644 --- a/make/data/cldr/common/main/rwk.xml +++ b/make/data/cldr/common/main/rwk.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/rwk_TZ.xml b/make/data/cldr/common/main/rwk_TZ.xml index 12f3bbf8d0d..93a91aee965 100644 --- a/make/data/cldr/common/main/rwk_TZ.xml +++ b/make/data/cldr/common/main/rwk_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sa.xml b/make/data/cldr/common/main/sa.xml index dc6ed4ee206..d65097b3366 100644 --- a/make/data/cldr/common/main/sa.xml +++ b/make/data/cldr/common/main/sa.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sa_IN.xml b/make/data/cldr/common/main/sa_IN.xml index 628f1753f19..dec966c92af 100644 --- a/make/data/cldr/common/main/sa_IN.xml +++ b/make/data/cldr/common/main/sa_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sah.xml b/make/data/cldr/common/main/sah.xml index 1b683a56db4..5d89d39f07b 100644 --- a/make/data/cldr/common/main/sah.xml +++ b/make/data/cldr/common/main/sah.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sah_RU.xml b/make/data/cldr/common/main/sah_RU.xml index 20a8d235330..6ea7810b7bf 100644 --- a/make/data/cldr/common/main/sah_RU.xml +++ b/make/data/cldr/common/main/sah_RU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/saq.xml b/make/data/cldr/common/main/saq.xml index 587b3e8c9ad..8c975679f0f 100644 --- a/make/data/cldr/common/main/saq.xml +++ b/make/data/cldr/common/main/saq.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/saq_KE.xml b/make/data/cldr/common/main/saq_KE.xml index a6de1faba63..f2781b159ac 100644 --- a/make/data/cldr/common/main/saq_KE.xml +++ b/make/data/cldr/common/main/saq_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sat.xml b/make/data/cldr/common/main/sat.xml index 0319b7a4db6..49b72a15b46 100644 --- a/make/data/cldr/common/main/sat.xml +++ b/make/data/cldr/common/main/sat.xml @@ -1,8 +1,8 @@ - @@ -1478,9 +1478,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ᱠᱨᱮᱥᱴᱚᱱ - - ᱭᱮᱞᱚᱱᱟᱭᱤᱯᱷ - ᱮᱰᱢᱚᱱᱴᱚᱱ @@ -1499,30 +1496,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic ᱨᱤᱥᱚᱞᱭᱩᱴ - - ᱨᱚᱱᱤ ᱜᱟᱰᱟ - ᱨᱟᱱᱠᱤᱱ ᱤᱱᱞᱮᱴ ᱟᱴᱤᱠᱚᱠᱟᱱ - - ᱛᱷᱚᱱᱰᱚᱨ ᱵᱮ - - - ᱱᱤᱯᱤᱜᱚᱱ - ᱴᱚᱨᱚᱱᱴᱚ ᱤᱠᱟᱞᱩᱣᱤᱛ - - ᱯᱟᱝᱱᱤᱨᱛᱩᱝ - ᱢᱚᱱᱠᱴᱚᱱ @@ -1874,13 +1859,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ᱦᱟᱣᱟᱭᱤᱼᱟᱞᱮᱣᱴᱤᱭᱟᱱ ᱥᱤᱧᱟᱜ ᱚᱠᱛᱚ - - - ᱮᱛᱚᱢᱯᱟᱪᱮ ᱢᱚᱠᱥᱤᱠᱚ ᱚᱠᱛᱚ - ᱮᱛᱚᱢᱯᱟᱪᱮ ᱢᱚᱠᱥᱤᱠᱚ ᱢᱟᱱᱚᱠ ᱚᱠᱛᱚ - ᱮᱛᱚᱢᱯᱟᱪᱮ ᱢᱚᱠᱥᱤᱠᱚ ᱥᱤᱧᱟᱜ ᱚᱠᱛᱚ - - ᱢᱮᱠᱥᱤᱠᱟᱱ ᱯᱨᱚᱥᱟᱱᱛ ᱚᱠᱛᱚ diff --git a/make/data/cldr/common/main/sat_Deva.xml b/make/data/cldr/common/main/sat_Deva.xml index c8982731025..30961e3dfdc 100644 --- a/make/data/cldr/common/main/sat_Deva.xml +++ b/make/data/cldr/common/main/sat_Deva.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sat_Deva_IN.xml b/make/data/cldr/common/main/sat_Deva_IN.xml index 9b343ae6dcf..be00da78a9a 100644 --- a/make/data/cldr/common/main/sat_Deva_IN.xml +++ b/make/data/cldr/common/main/sat_Deva_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sat_Olck.xml b/make/data/cldr/common/main/sat_Olck.xml index 9f3daa45f22..806495ec77c 100644 --- a/make/data/cldr/common/main/sat_Olck.xml +++ b/make/data/cldr/common/main/sat_Olck.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sat_Olck_IN.xml b/make/data/cldr/common/main/sat_Olck_IN.xml index 8d83f9eac06..5f5bc27ec07 100644 --- a/make/data/cldr/common/main/sat_Olck_IN.xml +++ b/make/data/cldr/common/main/sat_Olck_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sbp.xml b/make/data/cldr/common/main/sbp.xml index f4f989c4bbb..898598f848c 100644 --- a/make/data/cldr/common/main/sbp.xml +++ b/make/data/cldr/common/main/sbp.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sbp_TZ.xml b/make/data/cldr/common/main/sbp_TZ.xml index fb4716fd808..dcab5b8450a 100644 --- a/make/data/cldr/common/main/sbp_TZ.xml +++ b/make/data/cldr/common/main/sbp_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sc.xml b/make/data/cldr/common/main/sc.xml index f3ef123869e..90a1d00f3f5 100644 --- a/make/data/cldr/common/main/sc.xml +++ b/make/data/cldr/common/main/sc.xml @@ -1,8 +1,8 @@ - @@ -1106,7 +1106,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ordinamentu de su tzinesu semplificadu - GB2312 ordinamentu de s’elencu telefònicu ordinamentu pinyin - ordinamentu riformadu chirca genèrica chirca pro consonante hangul initziale ordinamentu istandard @@ -2963,9 +2962,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Tucumán - - Currie - Daca @@ -3834,11 +3830,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Ora legale de Macao - - - Ora de s’Ìsula Macquarie - - Ora de Magadan @@ -3878,13 +3869,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Ora de Mawson - - - Ora de su Mèssicu nord-otzidentale - Ora istandard de su Mèssicu nord-otzidentale - Ora legale de su Mèssicu nord-otzidentale - - Ora de su Patzìficu (Mèssicu) diff --git a/make/data/cldr/common/main/sc_IT.xml b/make/data/cldr/common/main/sc_IT.xml index 6612a65e577..376c0399cca 100644 --- a/make/data/cldr/common/main/sc_IT.xml +++ b/make/data/cldr/common/main/sc_IT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/scn.xml b/make/data/cldr/common/main/scn.xml index cc4c1655aa6..a9a1c3499b3 100644 --- a/make/data/cldr/common/main/scn.xml +++ b/make/data/cldr/common/main/scn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/scn_IT.xml b/make/data/cldr/common/main/scn_IT.xml index fac9de008ce..54c0c33495b 100644 --- a/make/data/cldr/common/main/scn_IT.xml +++ b/make/data/cldr/common/main/scn_IT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sd.xml b/make/data/cldr/common/main/sd.xml index acc7d27ae9a..80e51753dc4 100644 --- a/make/data/cldr/common/main/sd.xml +++ b/make/data/cldr/common/main/sd.xml @@ -1,8 +1,8 @@ - @@ -1642,9 +1642,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ميلبورن - - ڪري - هوبارٽ @@ -1798,9 +1795,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ڪريسٽن - - ييلو نائيف - ايڊمونٽن @@ -1819,30 +1813,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic ريزوليوٽ - - ريني رور - رينڪن انليٽ اٽيڪوڪن - - ٿنڊر بي - - - نپيگان - ٽورنٽو اڪالوئٽ - - پینگنرٽنگ - مانڪٽن @@ -2656,18 +2638,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic دارالسلام - - ازهارڊ - ڪِيو سمفروپول - - زيپروزهايا - ڪمپالا @@ -2686,9 +2662,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic هونو لولو - - جانسٹن - اينڪريج @@ -3324,11 +3297,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic لورڊ هووي جي ڏينهن جو وقت - - - مڪوائري آئي لينڊ جو وقت - - مگادان جو وقت @@ -3368,13 +3336,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic مائوسن جو وقت - - - شمالي مغربي ميڪسيڪو جو وقت - شمالي مغربي ميڪسيڪو جو معياري وقت - شمالي مغربي ميڪسيڪو جي ڏينهن جو وقت - - ميڪسيڪن پيسيفڪ وقت diff --git a/make/data/cldr/common/main/sd_Arab.xml b/make/data/cldr/common/main/sd_Arab.xml index 52b15d2a2fe..1844976e26f 100644 --- a/make/data/cldr/common/main/sd_Arab.xml +++ b/make/data/cldr/common/main/sd_Arab.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sd_Arab_PK.xml b/make/data/cldr/common/main/sd_Arab_PK.xml index d68902c97ba..f123030ec5a 100644 --- a/make/data/cldr/common/main/sd_Arab_PK.xml +++ b/make/data/cldr/common/main/sd_Arab_PK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sd_Deva.xml b/make/data/cldr/common/main/sd_Deva.xml index 4c2a39458d9..741db721386 100644 --- a/make/data/cldr/common/main/sd_Deva.xml +++ b/make/data/cldr/common/main/sd_Deva.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sd_Deva_IN.xml b/make/data/cldr/common/main/sd_Deva_IN.xml index ad3ad7e5f74..6406ca40a47 100644 --- a/make/data/cldr/common/main/sd_Deva_IN.xml +++ b/make/data/cldr/common/main/sd_Deva_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sdh.xml b/make/data/cldr/common/main/sdh.xml index cd72fed82ef..860747bd424 100644 --- a/make/data/cldr/common/main/sdh.xml +++ b/make/data/cldr/common/main/sdh.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sdh_IQ.xml b/make/data/cldr/common/main/sdh_IQ.xml index 3cc33628c03..73b71829b57 100644 --- a/make/data/cldr/common/main/sdh_IQ.xml +++ b/make/data/cldr/common/main/sdh_IQ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sdh_IR.xml b/make/data/cldr/common/main/sdh_IR.xml index bd375ccdb19..7752d73ac19 100644 --- a/make/data/cldr/common/main/sdh_IR.xml +++ b/make/data/cldr/common/main/sdh_IR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/se.xml b/make/data/cldr/common/main/se.xml index 4eab45b582b..343d2d6caa5 100644 --- a/make/data/cldr/common/main/se.xml +++ b/make/data/cldr/common/main/se.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/se_FI.xml b/make/data/cldr/common/main/se_FI.xml index fa0ae699737..2683caed235 100644 --- a/make/data/cldr/common/main/se_FI.xml +++ b/make/data/cldr/common/main/se_FI.xml @@ -1,8 +1,8 @@ - @@ -1674,11 +1674,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Lord Howe geasseáigi - - - MacQuarie sullo áigi - - Magadana áigi @@ -1718,13 +1713,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mawsona áigi - - - Oarjedavvi-Meksiko áigi - Oarjedavvi-Meksiko dálveáigi - Oarjedavvi-Meksiko geasseáigi - - Meksiko Jáskesábi áigi diff --git a/make/data/cldr/common/main/se_NO.xml b/make/data/cldr/common/main/se_NO.xml index ede5d5d5b18..12bdb6a17b9 100644 --- a/make/data/cldr/common/main/se_NO.xml +++ b/make/data/cldr/common/main/se_NO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/se_SE.xml b/make/data/cldr/common/main/se_SE.xml index 47754ec19cf..99d52c3ab3e 100644 --- a/make/data/cldr/common/main/se_SE.xml +++ b/make/data/cldr/common/main/se_SE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/seh.xml b/make/data/cldr/common/main/seh.xml index a25d21db6f9..2815843850f 100644 --- a/make/data/cldr/common/main/seh.xml +++ b/make/data/cldr/common/main/seh.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/seh_MZ.xml b/make/data/cldr/common/main/seh_MZ.xml index 789f9e0805f..857a4e4e0fa 100644 --- a/make/data/cldr/common/main/seh_MZ.xml +++ b/make/data/cldr/common/main/seh_MZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ses.xml b/make/data/cldr/common/main/ses.xml index 49dfccecc71..9189d74e8f3 100644 --- a/make/data/cldr/common/main/ses.xml +++ b/make/data/cldr/common/main/ses.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ses_ML.xml b/make/data/cldr/common/main/ses_ML.xml index 63e4cbb986c..d0fe59700fd 100644 --- a/make/data/cldr/common/main/ses_ML.xml +++ b/make/data/cldr/common/main/ses_ML.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sg.xml b/make/data/cldr/common/main/sg.xml index 43f25cd19bc..c40349f2e99 100644 --- a/make/data/cldr/common/main/sg.xml +++ b/make/data/cldr/common/main/sg.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sg_CF.xml b/make/data/cldr/common/main/sg_CF.xml index 61b2edae564..6318b0fdf4c 100644 --- a/make/data/cldr/common/main/sg_CF.xml +++ b/make/data/cldr/common/main/sg_CF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/shi.xml b/make/data/cldr/common/main/shi.xml index 3246a1bc838..b7b64363ad0 100644 --- a/make/data/cldr/common/main/shi.xml +++ b/make/data/cldr/common/main/shi.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/shi_Latn.xml b/make/data/cldr/common/main/shi_Latn.xml index 175582f02e6..8d762fe15e7 100644 --- a/make/data/cldr/common/main/shi_Latn.xml +++ b/make/data/cldr/common/main/shi_Latn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/shi_Latn_MA.xml b/make/data/cldr/common/main/shi_Latn_MA.xml index 4bb2f4006f4..e28483d26ea 100644 --- a/make/data/cldr/common/main/shi_Latn_MA.xml +++ b/make/data/cldr/common/main/shi_Latn_MA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/shi_Tfng.xml b/make/data/cldr/common/main/shi_Tfng.xml index a56ba98a82c..fa97b50b8c1 100644 --- a/make/data/cldr/common/main/shi_Tfng.xml +++ b/make/data/cldr/common/main/shi_Tfng.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/shi_Tfng_MA.xml b/make/data/cldr/common/main/shi_Tfng_MA.xml index 7ad4ef236b7..63001b5c7fb 100644 --- a/make/data/cldr/common/main/shi_Tfng_MA.xml +++ b/make/data/cldr/common/main/shi_Tfng_MA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/shn.xml b/make/data/cldr/common/main/shn.xml index e13c174e7f0..4235172f367 100644 --- a/make/data/cldr/common/main/shn.xml +++ b/make/data/cldr/common/main/shn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/shn_MM.xml b/make/data/cldr/common/main/shn_MM.xml index 3433e268995..ae944bf3420 100644 --- a/make/data/cldr/common/main/shn_MM.xml +++ b/make/data/cldr/common/main/shn_MM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/shn_TH.xml b/make/data/cldr/common/main/shn_TH.xml index 9a6819b9544..32a425c9b40 100644 --- a/make/data/cldr/common/main/shn_TH.xml +++ b/make/data/cldr/common/main/shn_TH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/si.xml b/make/data/cldr/common/main/si.xml index 3da1a79f82c..86ef2737c6e 100644 --- a/make/data/cldr/common/main/si.xml +++ b/make/data/cldr/common/main/si.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sid.xml b/make/data/cldr/common/main/sid.xml index 3716786521b..a92e68a3459 100644 --- a/make/data/cldr/common/main/sid.xml +++ b/make/data/cldr/common/main/sid.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sid_ET.xml b/make/data/cldr/common/main/sid_ET.xml index f628f2fb25a..29b629c4df4 100644 --- a/make/data/cldr/common/main/sid_ET.xml +++ b/make/data/cldr/common/main/sid_ET.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sk.xml b/make/data/cldr/common/main/sk.xml index be0ac9cb76d..3fbeec27ddb 100644 --- a/make/data/cldr/common/main/sk.xml +++ b/make/data/cldr/common/main/sk.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/skr.xml b/make/data/cldr/common/main/skr.xml index c8687dc4722..88729169b8e 100644 --- a/make/data/cldr/common/main/skr.xml +++ b/make/data/cldr/common/main/skr.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/skr_PK.xml b/make/data/cldr/common/main/skr_PK.xml index 2227710bbc4..b2614bad2be 100644 --- a/make/data/cldr/common/main/skr_PK.xml +++ b/make/data/cldr/common/main/skr_PK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sl.xml b/make/data/cldr/common/main/sl.xml index 3aa91aca4bc..b0fb8038a8b 100644 --- a/make/data/cldr/common/main/sl.xml +++ b/make/data/cldr/common/main/sl.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sma.xml b/make/data/cldr/common/main/sma.xml index 5d902dd5eb8..56337ccc8f4 100644 --- a/make/data/cldr/common/main/sma.xml +++ b/make/data/cldr/common/main/sma.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sma_NO.xml b/make/data/cldr/common/main/sma_NO.xml index 12559efffb3..16ee062d37c 100644 --- a/make/data/cldr/common/main/sma_NO.xml +++ b/make/data/cldr/common/main/sma_NO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sma_SE.xml b/make/data/cldr/common/main/sma_SE.xml index 183903b78aa..600fb9fe6ac 100644 --- a/make/data/cldr/common/main/sma_SE.xml +++ b/make/data/cldr/common/main/sma_SE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/smj.xml b/make/data/cldr/common/main/smj.xml index e17b382a4e3..2f2d71927e9 100644 --- a/make/data/cldr/common/main/smj.xml +++ b/make/data/cldr/common/main/smj.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/smj_NO.xml b/make/data/cldr/common/main/smj_NO.xml index a2dc043987b..c1bfae31c23 100644 --- a/make/data/cldr/common/main/smj_NO.xml +++ b/make/data/cldr/common/main/smj_NO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/smj_SE.xml b/make/data/cldr/common/main/smj_SE.xml index a4187d0be90..2d14ac2865f 100644 --- a/make/data/cldr/common/main/smj_SE.xml +++ b/make/data/cldr/common/main/smj_SE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/smn.xml b/make/data/cldr/common/main/smn.xml index 58388534b73..d6e4b544b1a 100644 --- a/make/data/cldr/common/main/smn.xml +++ b/make/data/cldr/common/main/smn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/smn_FI.xml b/make/data/cldr/common/main/smn_FI.xml index 8c54143bb10..04fc344983a 100644 --- a/make/data/cldr/common/main/smn_FI.xml +++ b/make/data/cldr/common/main/smn_FI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sms.xml b/make/data/cldr/common/main/sms.xml index 7930636d844..8d57359d4c8 100644 --- a/make/data/cldr/common/main/sms.xml +++ b/make/data/cldr/common/main/sms.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sms_FI.xml b/make/data/cldr/common/main/sms_FI.xml index 91056a71a5e..07c7be6f7e8 100644 --- a/make/data/cldr/common/main/sms_FI.xml +++ b/make/data/cldr/common/main/sms_FI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sn.xml b/make/data/cldr/common/main/sn.xml index 50e8b24856f..006c7d0b14b 100644 --- a/make/data/cldr/common/main/sn.xml +++ b/make/data/cldr/common/main/sn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sn_ZW.xml b/make/data/cldr/common/main/sn_ZW.xml index 2883241e470..4aa04059c50 100644 --- a/make/data/cldr/common/main/sn_ZW.xml +++ b/make/data/cldr/common/main/sn_ZW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/so.xml b/make/data/cldr/common/main/so.xml index 724b401732b..f2d5323c230 100644 --- a/make/data/cldr/common/main/so.xml +++ b/make/data/cldr/common/main/so.xml @@ -1,8 +1,8 @@ - @@ -1027,7 +1027,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Isku hagaajinta Farta shiineeska Isku hagaajinta foonbuuga Isku hagaajinta Pinyin - Isku hagaajinta Reformed Raadinta Guud Raadinta Shibanaha Hangul Amarka Kala Soocidda Caadiga ah @@ -2758,9 +2757,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Melboon - - Kuriy - Hubaart @@ -2890,9 +2886,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Karestoon - - Yelowneyf - Iswift Karent @@ -2908,27 +2901,15 @@ CLDR data files are interpreted according to the LDML specification (http://unic Resoluut - - Reyni Rifer - Raankin Inleet Atikokaan - - Tanda Baay - - - Nibiigoon - Iqaaluut - - Bangnirtuung - Moonktoon @@ -3616,27 +3597,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic Daresalaam - - Usgorod - Kiyeef Simferobol - - Saborosey - Kambaala Noom - - Joonston - Anjorage @@ -4316,11 +4288,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Waqtiga Dharaarta ee Lod How - - - Waqtiga Makquwariy Aylaan - - Watiga Magedan @@ -4360,13 +4327,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Waqtiga Mawson - - - Waqtiga Waqooyi-Galbeed Meksiko - Waqtiga Caadiga Ah ee Waqooyi-Galbeed Meksiko - Waqtiga Dharaarta ee Waqooyi-Galbeed Meksiko - - Waqtiga Baasifikada Meksiko diff --git a/make/data/cldr/common/main/so_DJ.xml b/make/data/cldr/common/main/so_DJ.xml index 7b369738b2d..fdcc7fea0e1 100644 --- a/make/data/cldr/common/main/so_DJ.xml +++ b/make/data/cldr/common/main/so_DJ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/so_ET.xml b/make/data/cldr/common/main/so_ET.xml index 2c5f270fd53..8829571b928 100644 --- a/make/data/cldr/common/main/so_ET.xml +++ b/make/data/cldr/common/main/so_ET.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/so_KE.xml b/make/data/cldr/common/main/so_KE.xml index 7c2b020044c..f117c320940 100644 --- a/make/data/cldr/common/main/so_KE.xml +++ b/make/data/cldr/common/main/so_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/so_SO.xml b/make/data/cldr/common/main/so_SO.xml index 5bf9d753c0c..a576aff8c65 100644 --- a/make/data/cldr/common/main/so_SO.xml +++ b/make/data/cldr/common/main/so_SO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sq.xml b/make/data/cldr/common/main/sq.xml index 9c6871e4f93..ccffdff0a04 100644 --- a/make/data/cldr/common/main/sq.xml +++ b/make/data/cldr/common/main/sq.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sq_MK.xml b/make/data/cldr/common/main/sq_MK.xml index 9e98620ffee..1b195b20744 100644 --- a/make/data/cldr/common/main/sq_MK.xml +++ b/make/data/cldr/common/main/sq_MK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sq_XK.xml b/make/data/cldr/common/main/sq_XK.xml index 96570d04036..a876cedc6ae 100644 --- a/make/data/cldr/common/main/sq_XK.xml +++ b/make/data/cldr/common/main/sq_XK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sr.xml b/make/data/cldr/common/main/sr.xml index a92f8ddbffe..3b6e777f96b 100644 --- a/make/data/cldr/common/main/sr.xml +++ b/make/data/cldr/common/main/sr.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sr_Cyrl_BA.xml b/make/data/cldr/common/main/sr_Cyrl_BA.xml index e29c6634342..18516d2272d 100644 --- a/make/data/cldr/common/main/sr_Cyrl_BA.xml +++ b/make/data/cldr/common/main/sr_Cyrl_BA.xml @@ -1,8 +1,8 @@ - @@ -80,7 +80,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic редослијед сортирања у рјечнику подразумијевани Unicode редослијед сортирања фонетски редослијед сортирања - реформисани редослијед сортирања претрага опште намјене стандардни редослијед сортирања редослијед сортирања радикалних потеза @@ -1082,11 +1081,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Лорд Хов, љетње вријеме - - - острво Маквори вријеме - - Магадан вријеме @@ -1126,13 +1120,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Мосон вријеме - - - Сјеверозападни Мексико - Сјеверозападни Мексико, стандардно вријеме - Сјеверозападни Мексико, летње вријеме - - Мексички Пацифик diff --git a/make/data/cldr/common/main/sr_Cyrl_ME.xml b/make/data/cldr/common/main/sr_Cyrl_ME.xml index b6888b6ea04..038894034b8 100644 --- a/make/data/cldr/common/main/sr_Cyrl_ME.xml +++ b/make/data/cldr/common/main/sr_Cyrl_ME.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sr_Cyrl_RS.xml b/make/data/cldr/common/main/sr_Cyrl_RS.xml index 31863ae9d74..7006e981801 100644 --- a/make/data/cldr/common/main/sr_Cyrl_RS.xml +++ b/make/data/cldr/common/main/sr_Cyrl_RS.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sr_Cyrl_XK.xml b/make/data/cldr/common/main/sr_Cyrl_XK.xml index 102831214b2..0d2afec0266 100644 --- a/make/data/cldr/common/main/sr_Cyrl_XK.xml +++ b/make/data/cldr/common/main/sr_Cyrl_XK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sr_Latn.xml b/make/data/cldr/common/main/sr_Latn.xml index 87f6bbf4949..277db9469f7 100644 --- a/make/data/cldr/common/main/sr_Latn.xml +++ b/make/data/cldr/common/main/sr_Latn.xml @@ -1,8 +1,8 @@ - @@ -1115,7 +1115,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic sortiranje kao telefonski imenik fonetski redosled sortiranja pinjin sortiranje - reformisani redosled sortiranja pretraga opšte namene Pretraga prema hangul početnom suglasniku standardni redosled sortiranja @@ -2673,9 +2672,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic {0}, letnje vreme {0}, standardno vreme - - Santa Izabel - Koordinisano univerzalno vreme @@ -2798,9 +2794,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Melburn - - Kari - Hobart @@ -2954,9 +2947,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Kreston - - Jelounajf - Edmonton @@ -2975,30 +2965,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic Resolut - - Rejni River - Rankin Inlet Koral Harbur - - Tander Bej - - - Nipigon - Toronto Ikvaluit - - Pangnirtung - Monkton @@ -3812,18 +3790,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic Dar-es-Salam - - Užgorod - Kijev Simferopolj - - Zaporožje - Kampala @@ -3842,9 +3814,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Honolulu - - Džonston - Enkoridž @@ -4557,11 +4526,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Makao letnje računanje vremena - - - Ostrvo Makveri vreme - - Magadan vreme @@ -4601,13 +4565,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Moson vreme - - - Severozapadni Meksiko - Severozapadni Meksiko, standardno vreme - Severozapadni Meksiko, letnje vreme - - Meksički Pacifik diff --git a/make/data/cldr/common/main/sr_Latn_BA.xml b/make/data/cldr/common/main/sr_Latn_BA.xml index 1bd4f55afe0..9dd83baddbb 100644 --- a/make/data/cldr/common/main/sr_Latn_BA.xml +++ b/make/data/cldr/common/main/sr_Latn_BA.xml @@ -1,8 +1,8 @@ - @@ -80,7 +80,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic redoslijed sortiranja u rječniku podrazumijevani Unicode redoslijed sortiranja fonetski redoslijed sortiranja - reformisani redoslijed sortiranja pretraga opšte namjene standardni redoslijed sortiranja redoslijed sortiranja radikalnih poteza @@ -1082,11 +1081,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Lord Hov, ljetnje vrijeme - - - ostrvo Makvori vrijeme - - Magadan vrijeme @@ -1126,13 +1120,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Moson vrijeme - - - Sjeverozapadni Meksiko - Sjeverozapadni Meksiko, standardno vrijeme - Sjeverozapadni Meksiko, letnje vrijeme - - Meksički Pacifik diff --git a/make/data/cldr/common/main/sr_Latn_ME.xml b/make/data/cldr/common/main/sr_Latn_ME.xml index 5853439f3c6..be0b66fc070 100644 --- a/make/data/cldr/common/main/sr_Latn_ME.xml +++ b/make/data/cldr/common/main/sr_Latn_ME.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sr_Latn_RS.xml b/make/data/cldr/common/main/sr_Latn_RS.xml index aace7e587ab..04102a3a7d6 100644 --- a/make/data/cldr/common/main/sr_Latn_RS.xml +++ b/make/data/cldr/common/main/sr_Latn_RS.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sr_Latn_XK.xml b/make/data/cldr/common/main/sr_Latn_XK.xml index 4d342567f76..f655d5dbe82 100644 --- a/make/data/cldr/common/main/sr_Latn_XK.xml +++ b/make/data/cldr/common/main/sr_Latn_XK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ss.xml b/make/data/cldr/common/main/ss.xml index 37807457ad1..c86a4a9c653 100644 --- a/make/data/cldr/common/main/ss.xml +++ b/make/data/cldr/common/main/ss.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ss_SZ.xml b/make/data/cldr/common/main/ss_SZ.xml index fa930615ead..440f7ef0f89 100644 --- a/make/data/cldr/common/main/ss_SZ.xml +++ b/make/data/cldr/common/main/ss_SZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ss_ZA.xml b/make/data/cldr/common/main/ss_ZA.xml index 9e512c4d8b1..f57011adf51 100644 --- a/make/data/cldr/common/main/ss_ZA.xml +++ b/make/data/cldr/common/main/ss_ZA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ssy.xml b/make/data/cldr/common/main/ssy.xml index 02e4380d812..ec9d3508fe4 100644 --- a/make/data/cldr/common/main/ssy.xml +++ b/make/data/cldr/common/main/ssy.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ssy_ER.xml b/make/data/cldr/common/main/ssy_ER.xml index 33924045617..0953fc3c828 100644 --- a/make/data/cldr/common/main/ssy_ER.xml +++ b/make/data/cldr/common/main/ssy_ER.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/st.xml b/make/data/cldr/common/main/st.xml index 95f066593d2..6ecdf2d3a01 100644 --- a/make/data/cldr/common/main/st.xml +++ b/make/data/cldr/common/main/st.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/st_LS.xml b/make/data/cldr/common/main/st_LS.xml index 5b5f213072e..508573ff653 100644 --- a/make/data/cldr/common/main/st_LS.xml +++ b/make/data/cldr/common/main/st_LS.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/st_ZA.xml b/make/data/cldr/common/main/st_ZA.xml index 8457779ae89..c575262cfe5 100644 --- a/make/data/cldr/common/main/st_ZA.xml +++ b/make/data/cldr/common/main/st_ZA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/su.xml b/make/data/cldr/common/main/su.xml index d3699a0431e..57eec539131 100644 --- a/make/data/cldr/common/main/su.xml +++ b/make/data/cldr/common/main/su.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/su_Latn.xml b/make/data/cldr/common/main/su_Latn.xml index 34ea37e137c..65f70aab8cb 100644 --- a/make/data/cldr/common/main/su_Latn.xml +++ b/make/data/cldr/common/main/su_Latn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/su_Latn_ID.xml b/make/data/cldr/common/main/su_Latn_ID.xml index 1f7b36a1c37..fdac0d2c9e3 100644 --- a/make/data/cldr/common/main/su_Latn_ID.xml +++ b/make/data/cldr/common/main/su_Latn_ID.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sv.xml b/make/data/cldr/common/main/sv.xml index ddaf56ef0e2..72eabf6da6a 100644 --- a/make/data/cldr/common/main/sv.xml +++ b/make/data/cldr/common/main/sv.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sv_FI.xml b/make/data/cldr/common/main/sv_FI.xml index b218456e062..5d651579c59 100644 --- a/make/data/cldr/common/main/sv_FI.xml +++ b/make/data/cldr/common/main/sv_FI.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sv_SE.xml b/make/data/cldr/common/main/sv_SE.xml index c72518baabc..de404ba5273 100644 --- a/make/data/cldr/common/main/sv_SE.xml +++ b/make/data/cldr/common/main/sv_SE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sw.xml b/make/data/cldr/common/main/sw.xml index 01f309baa3d..163277ea1d7 100644 --- a/make/data/cldr/common/main/sw.xml +++ b/make/data/cldr/common/main/sw.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sw_KE.xml b/make/data/cldr/common/main/sw_KE.xml index c37448e8370..cae0a900b0e 100644 --- a/make/data/cldr/common/main/sw_KE.xml +++ b/make/data/cldr/common/main/sw_KE.xml @@ -1,8 +1,8 @@ - @@ -719,11 +719,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Saa za Majira ya Joto za Krasnoyarsk - - - Saa za Makwuarie - - Saa za Magadan @@ -748,13 +743,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Saa za Majira ya Joto za Morisi - - - Saa za Kaskazini Magharibi mwa Meksiko - Saa za Wastani za Kaskazini Magharibi mwa Meksiko - Saa za Mchana za Kaskazini Magharibi mwa Meksiko - - Saa za Ulaanbataar diff --git a/make/data/cldr/common/main/sw_TZ.xml b/make/data/cldr/common/main/sw_TZ.xml index 93bba6d4019..0f77a90f4f2 100644 --- a/make/data/cldr/common/main/sw_TZ.xml +++ b/make/data/cldr/common/main/sw_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/sw_UG.xml b/make/data/cldr/common/main/sw_UG.xml index 9ccb845a124..97567fa2564 100644 --- a/make/data/cldr/common/main/sw_UG.xml +++ b/make/data/cldr/common/main/sw_UG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/syr.xml b/make/data/cldr/common/main/syr.xml index e73f1ba1517..a3c6a63ea11 100644 --- a/make/data/cldr/common/main/syr.xml +++ b/make/data/cldr/common/main/syr.xml @@ -1,8 +1,8 @@ - @@ -932,7 +932,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic ܫܒܘܥܐ w ܕܫܢܬܐ Y - {0}  –  {1} + {0} – {1} y G – y G y – y G @@ -1550,9 +1550,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ܟܪܝܣܬܘܢ - - ܝܠܘܢܝܦ - ܐܕܡܘܢܬܘܢ @@ -1571,30 +1568,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic ܪܝܣܘܠܘܬ - - ܢܗܪܐ ܕܪܥܢܝ - ܪܐܢܟܢ ܐܢܠܝܬ ܐܬܝܟܘܟܐܢ - - ܬܐܢܕܐܪ ܒܐܝ - - - ܢܝܦܝܓܘܢ - ܬܘܪܘܢܬܘ ܐܝܩܠܘܝܬ - - ܦܐܢܓܢܝܪܬܘܢܓ - ܡܘܢܟܬܘܢ @@ -2405,18 +2390,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic ܕܐܪ ܫܠܡܐ - - ܐܘܙܓܘܪܘܕ - ܟܝܝܒ ܣܡܦܪܘܦܠ - - ܙܐܦܘܪܝܓܝ - ܟܐܡܦܐܠܐ @@ -2432,9 +2411,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ܢܘܡ - - ܓܘܢܣܬܘܢ - ܐܢܟܘܪܓ @@ -3134,11 +3110,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ܥܕܢܐ ܕܒܗܪ ܝܘܡܐ ܕܡܐܟܐܘ - - - ܥܕܢܐ ܕܓܙܪܬܐ ܡܐܟܐܘܪܝ - - ܥܕܢܐ ܕܡܐܓܐܕܐܢ @@ -3178,13 +3149,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ܥܕܢܐ ܕܡܐܘܣܘܢ - - - ܥܕܢܐ ܓܪܒܝ ܡܥܪܒ ܡܟܣܝܩܘ - ܥܕܢܐ ܡܫܘܚܬܢܝܬܐ ܓܪܒܝ ܡܥܪܒ ܡܟܣܝܩܘ - ܥܕܢܐ ܕܒܗܪ ܝܘܡܐ ܓܪܒܝ ܡܥܪܒ ܡܟܣܝܩܘ - - ܥܕܢܐ ܕܡܟܣܝܩܘ ܫܝܢܝܬܐ diff --git a/make/data/cldr/common/main/syr_IQ.xml b/make/data/cldr/common/main/syr_IQ.xml index 01741894830..c70f4db66ab 100644 --- a/make/data/cldr/common/main/syr_IQ.xml +++ b/make/data/cldr/common/main/syr_IQ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/syr_SY.xml b/make/data/cldr/common/main/syr_SY.xml index 7a342c7a419..4260f446630 100644 --- a/make/data/cldr/common/main/syr_SY.xml +++ b/make/data/cldr/common/main/syr_SY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/szl.xml b/make/data/cldr/common/main/szl.xml index 3b601e77a3b..232e3f91bb5 100644 --- a/make/data/cldr/common/main/szl.xml +++ b/make/data/cldr/common/main/szl.xml @@ -1,8 +1,8 @@ - @@ -1613,9 +1613,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Wiedyń - - Currie - Maarianhamina @@ -2134,18 +2131,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic Tajpej - - Użgorod - Kijōw Symferopol - - Zaporoże - Beulah, Pōłnocno Dakota @@ -2713,13 +2704,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Wyspy Marshalla - - - Meksyk Pōłnocno-Zachodni - Meksyk Pōłnocno-Zachodni (sztandardowy czas) - Meksyk Pōłnocno-Zachodni (latowy czas) - - Meksyk (czas pacyficzny) diff --git a/make/data/cldr/common/main/szl_PL.xml b/make/data/cldr/common/main/szl_PL.xml index bb8c99c383c..f7d6bb206a8 100644 --- a/make/data/cldr/common/main/szl_PL.xml +++ b/make/data/cldr/common/main/szl_PL.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ta.xml b/make/data/cldr/common/main/ta.xml index 12d1a33cc80..922853f2c13 100644 --- a/make/data/cldr/common/main/ta.xml +++ b/make/data/cldr/common/main/ta.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ta_LK.xml b/make/data/cldr/common/main/ta_LK.xml index fb4f6f1f29d..f6fac9f6b17 100644 --- a/make/data/cldr/common/main/ta_LK.xml +++ b/make/data/cldr/common/main/ta_LK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ta_MY.xml b/make/data/cldr/common/main/ta_MY.xml index 55a55c25d6d..a893525396a 100644 --- a/make/data/cldr/common/main/ta_MY.xml +++ b/make/data/cldr/common/main/ta_MY.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ta_SG.xml b/make/data/cldr/common/main/ta_SG.xml index e274aa65866..9b3acf30d75 100644 --- a/make/data/cldr/common/main/ta_SG.xml +++ b/make/data/cldr/common/main/ta_SG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/te.xml b/make/data/cldr/common/main/te.xml index 22469578916..91e75e220ee 100644 --- a/make/data/cldr/common/main/te.xml +++ b/make/data/cldr/common/main/te.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/teo.xml b/make/data/cldr/common/main/teo.xml index 7cc175b207d..d1a6b911446 100644 --- a/make/data/cldr/common/main/teo.xml +++ b/make/data/cldr/common/main/teo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/teo_KE.xml b/make/data/cldr/common/main/teo_KE.xml index 460b0b12a7c..40e34580b1f 100644 --- a/make/data/cldr/common/main/teo_KE.xml +++ b/make/data/cldr/common/main/teo_KE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/teo_UG.xml b/make/data/cldr/common/main/teo_UG.xml index 2f531c0a412..f2659738cfb 100644 --- a/make/data/cldr/common/main/teo_UG.xml +++ b/make/data/cldr/common/main/teo_UG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tg.xml b/make/data/cldr/common/main/tg.xml index ada229a23d3..b721ac4f440 100644 --- a/make/data/cldr/common/main/tg.xml +++ b/make/data/cldr/common/main/tg.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tg_TJ.xml b/make/data/cldr/common/main/tg_TJ.xml index 096cf9f2a19..6b8d827b269 100644 --- a/make/data/cldr/common/main/tg_TJ.xml +++ b/make/data/cldr/common/main/tg_TJ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/th.xml b/make/data/cldr/common/main/th.xml index 99d8c8a696b..21624f3245b 100644 --- a/make/data/cldr/common/main/th.xml +++ b/make/data/cldr/common/main/th.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ti.xml b/make/data/cldr/common/main/ti.xml index 287ad6ac7dd..cec0852764d 100644 --- a/make/data/cldr/common/main/ti.xml +++ b/make/data/cldr/common/main/ti.xml @@ -1,8 +1,8 @@ - @@ -1615,9 +1615,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic መልበርን - - ኩሪ - ሆባርት @@ -1771,9 +1768,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ክረስተን - - የለውናይፍ - ኤድመንተን @@ -1792,30 +1786,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic ረዞሉት - - ረይኒ ሪቨር - ራንኪን ኢንለት ኣቲኮካን - - ዛንደር በይ - - - ኒፒጎን - ቶሮንቶ ኢቃልዊት - - ፓንግኒርተንግ - ሞንክተን @@ -2629,18 +2611,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic ዳር ኤስ ሳላም - - ኡዝጎሮድ - ክየቭ ሲምፈሮፖል - - ዛፖሪዥያ - ካምፓላ @@ -2659,9 +2635,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ሆኖሉሉ - - ጆንስተን - ኣንኮረጅ diff --git a/make/data/cldr/common/main/ti_ER.xml b/make/data/cldr/common/main/ti_ER.xml index 44e206c8249..4ee2721cf46 100644 --- a/make/data/cldr/common/main/ti_ER.xml +++ b/make/data/cldr/common/main/ti_ER.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ti_ET.xml b/make/data/cldr/common/main/ti_ET.xml index 8aa6cc47d11..ec8c7604eb8 100644 --- a/make/data/cldr/common/main/ti_ET.xml +++ b/make/data/cldr/common/main/ti_ET.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tig.xml b/make/data/cldr/common/main/tig.xml index 2eecec45382..d59e6eb4a68 100644 --- a/make/data/cldr/common/main/tig.xml +++ b/make/data/cldr/common/main/tig.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tig_ER.xml b/make/data/cldr/common/main/tig_ER.xml index 4a946eb9da7..66096312894 100644 --- a/make/data/cldr/common/main/tig_ER.xml +++ b/make/data/cldr/common/main/tig_ER.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tk.xml b/make/data/cldr/common/main/tk.xml index df81503b8ee..f97a3d7b2d7 100644 --- a/make/data/cldr/common/main/tk.xml +++ b/make/data/cldr/common/main/tk.xml @@ -1,8 +1,8 @@ - @@ -2154,9 +2154,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic {0} wagty {0} tomusky wagty {0} standart wagty - - Santa-Izabel - Utgaşdyrylýan ähliumumy wagt @@ -2258,9 +2255,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Melburn - - Kerri - Sidneý @@ -2369,9 +2363,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Kreston - - Ýellounaýf - Swift-Karent @@ -2384,21 +2375,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic Rezolýut - - Reýni-Riwer - Rankin-Inlet - - Tander-Beý - Ikaluit - - Pangnirtang - Monkton @@ -3006,15 +2988,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic Dar-es-Salam - - Užgorod - Kiýew - - Zaporožýe - Midueý @@ -3030,9 +3006,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Gonolulu - - Jonston - Ankoridž @@ -3642,11 +3615,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Lord-Hau tomusky wagty - - - Makkuori adasy wagty - - Magadan wagty @@ -3686,13 +3654,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mouson wagty - - - Demirgazyk-günbatar Meksika wagty - Demirgazyk-günbatar Meksika standart wagty - Demirgazyk-günbatar Meksika tomusky wagty - - Meksikan Ýuwaş umman wagty diff --git a/make/data/cldr/common/main/tk_TM.xml b/make/data/cldr/common/main/tk_TM.xml index 84a74cc655b..4a14ee3ade1 100644 --- a/make/data/cldr/common/main/tk_TM.xml +++ b/make/data/cldr/common/main/tk_TM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tn.xml b/make/data/cldr/common/main/tn.xml index c6f1c4b44d3..7618674e353 100644 --- a/make/data/cldr/common/main/tn.xml +++ b/make/data/cldr/common/main/tn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tn_BW.xml b/make/data/cldr/common/main/tn_BW.xml index 9a07e5f9c3c..ec774774ade 100644 --- a/make/data/cldr/common/main/tn_BW.xml +++ b/make/data/cldr/common/main/tn_BW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tn_ZA.xml b/make/data/cldr/common/main/tn_ZA.xml index d0a698ebd79..a4675dc9514 100644 --- a/make/data/cldr/common/main/tn_ZA.xml +++ b/make/data/cldr/common/main/tn_ZA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/to.xml b/make/data/cldr/common/main/to.xml index da45f39b3e6..841da2c8d95 100644 --- a/make/data/cldr/common/main/to.xml +++ b/make/data/cldr/common/main/to.xml @@ -1,8 +1,8 @@ - @@ -2688,9 +2688,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Taimi {0} {0} Taimi liliu {0} Taimi totonu - - Santa Isabel - taimi fakaemāmani @@ -2711,9 +2708,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Melipoane - - Currie - Senē @@ -2854,9 +2848,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Sao Tomé - - Uzhhorod - Kiev @@ -2874,9 +2865,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Honolulu - - Sionesitoni - Niu ʻIoke @@ -3456,11 +3444,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic houa fakamakau taimi liliu - - - houa fakamotumakuali - - houa fakalūsia-makatani @@ -3500,13 +3483,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic houa fakamausoni - - - houa fakamekisikou-tokelauhihifo - houa fakamekisikou-tokelauhihifo taimi totonu - houa fakamekisikou-tokelauhihifo taimi liliu - - houa fakamekisikou-pasifika diff --git a/make/data/cldr/common/main/to_TO.xml b/make/data/cldr/common/main/to_TO.xml index 901ddb9da91..bc46c596dd2 100644 --- a/make/data/cldr/common/main/to_TO.xml +++ b/make/data/cldr/common/main/to_TO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tok.xml b/make/data/cldr/common/main/tok.xml index 9b0f50216db..65fee38557a 100644 --- a/make/data/cldr/common/main/tok.xml +++ b/make/data/cldr/common/main/tok.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tok_001.xml b/make/data/cldr/common/main/tok_001.xml index 69d31266dd5..d70868f3cff 100644 --- a/make/data/cldr/common/main/tok_001.xml +++ b/make/data/cldr/common/main/tok_001.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tpi.xml b/make/data/cldr/common/main/tpi.xml index 2b2d74642cd..97e55f31e31 100644 --- a/make/data/cldr/common/main/tpi.xml +++ b/make/data/cldr/common/main/tpi.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tpi_PG.xml b/make/data/cldr/common/main/tpi_PG.xml index 59c299a7362..42a5bfe3851 100644 --- a/make/data/cldr/common/main/tpi_PG.xml +++ b/make/data/cldr/common/main/tpi_PG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tr.xml b/make/data/cldr/common/main/tr.xml index c26ea7a401a..e597dbb5cf6 100644 --- a/make/data/cldr/common/main/tr.xml +++ b/make/data/cldr/common/main/tr.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tr_TR.xml b/make/data/cldr/common/main/tr_TR.xml index 87c10bb8eec..b5f4f6b9907 100644 --- a/make/data/cldr/common/main/tr_TR.xml +++ b/make/data/cldr/common/main/tr_TR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/trv.xml b/make/data/cldr/common/main/trv.xml index 3675a5afcea..648691d9274 100644 --- a/make/data/cldr/common/main/trv.xml +++ b/make/data/cldr/common/main/trv.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/trv_TW.xml b/make/data/cldr/common/main/trv_TW.xml index f8194882dcf..a29c48baf71 100644 --- a/make/data/cldr/common/main/trv_TW.xml +++ b/make/data/cldr/common/main/trv_TW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/trw.xml b/make/data/cldr/common/main/trw.xml index 4a63b955632..2226a7d3c3f 100644 --- a/make/data/cldr/common/main/trw.xml +++ b/make/data/cldr/common/main/trw.xml @@ -1,8 +1,8 @@ - @@ -1211,9 +1211,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ملبورن - - کیوری - ہوبارٹ @@ -1367,9 +1364,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic کریسٹون - - ایلو نائف - ایڈمونٹن @@ -1388,30 +1382,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic ریزولیوٹ - - رینی ریور - رینکن انلیٹ اٹیکوکن - - تھنڈر بے - - - نپیگون - ٹورنٹو ایکالوئٹ - - پینگنِرٹنگ - مونکٹن @@ -2219,18 +2201,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic دار السلام - - ازہوراڈ - کیو سمفروپول - - زیپوروزائی - کیمپالا @@ -2246,9 +2222,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic نوم - - جانسٹن - اینکریج @@ -2884,11 +2857,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic لارڈ ہووے ڈے لائٹ ٹائم - - - مکوآری آئلینڈ سی وَخ - - میگیدن ٹائم @@ -2928,13 +2896,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ماؤسن ٹائم - - - شمال مغربی میکسیکو ٹائم - شمال مغربی میکسیکو اسٹینڈرڈ ٹائم - شمال مغربی میکسیکو ڈے لائٹ ٹائم - - میکسیکن پیسفک ٹائم diff --git a/make/data/cldr/common/main/trw_PK.xml b/make/data/cldr/common/main/trw_PK.xml index c7ddcf83557..ac600521497 100644 --- a/make/data/cldr/common/main/trw_PK.xml +++ b/make/data/cldr/common/main/trw_PK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ts.xml b/make/data/cldr/common/main/ts.xml index d7859e46b9c..c9d2049c577 100644 --- a/make/data/cldr/common/main/ts.xml +++ b/make/data/cldr/common/main/ts.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ts_ZA.xml b/make/data/cldr/common/main/ts_ZA.xml index 4cb6219d8d8..7b5b0040d33 100644 --- a/make/data/cldr/common/main/ts_ZA.xml +++ b/make/data/cldr/common/main/ts_ZA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tt.xml b/make/data/cldr/common/main/tt.xml index 8b8f6056fd9..d616a87b68b 100644 --- a/make/data/cldr/common/main/tt.xml +++ b/make/data/cldr/common/main/tt.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tt_RU.xml b/make/data/cldr/common/main/tt_RU.xml index 512891763ae..457e22723e5 100644 --- a/make/data/cldr/common/main/tt_RU.xml +++ b/make/data/cldr/common/main/tt_RU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/twq.xml b/make/data/cldr/common/main/twq.xml index 162b1324198..879b928c211 100644 --- a/make/data/cldr/common/main/twq.xml +++ b/make/data/cldr/common/main/twq.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/twq_NE.xml b/make/data/cldr/common/main/twq_NE.xml index f8d6bfcb8d8..4cd326ae69f 100644 --- a/make/data/cldr/common/main/twq_NE.xml +++ b/make/data/cldr/common/main/twq_NE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tyv.xml b/make/data/cldr/common/main/tyv.xml index 466f67311d5..cb00198bf97 100644 --- a/make/data/cldr/common/main/tyv.xml +++ b/make/data/cldr/common/main/tyv.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tyv_RU.xml b/make/data/cldr/common/main/tyv_RU.xml index 34585945091..1968e81a13a 100644 --- a/make/data/cldr/common/main/tyv_RU.xml +++ b/make/data/cldr/common/main/tyv_RU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tzm.xml b/make/data/cldr/common/main/tzm.xml index 49805934e90..00c6f99b2fd 100644 --- a/make/data/cldr/common/main/tzm.xml +++ b/make/data/cldr/common/main/tzm.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/tzm_MA.xml b/make/data/cldr/common/main/tzm_MA.xml index f91625c497e..bf1595b3bde 100644 --- a/make/data/cldr/common/main/tzm_MA.xml +++ b/make/data/cldr/common/main/tzm_MA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ug.xml b/make/data/cldr/common/main/ug.xml index 487e699b1d4..3b5bab65654 100644 --- a/make/data/cldr/common/main/ug.xml +++ b/make/data/cldr/common/main/ug.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/uk.xml b/make/data/cldr/common/main/uk.xml index 223699ba04e..74b4fe9fd0b 100644 --- a/make/data/cldr/common/main/uk.xml +++ b/make/data/cldr/common/main/uk.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ur.xml b/make/data/cldr/common/main/ur.xml index 9db822ec560..53f27ecf32d 100644 --- a/make/data/cldr/common/main/ur.xml +++ b/make/data/cldr/common/main/ur.xml @@ -1,8 +1,8 @@ - @@ -383,11 +383,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic کرغستان ٹائم - - - مکوآری آئلینڈ ٹائم - - مالدیپ ٹائم diff --git a/make/data/cldr/common/main/ur_PK.xml b/make/data/cldr/common/main/ur_PK.xml index eb15e80ecfa..15a06e36430 100644 --- a/make/data/cldr/common/main/ur_PK.xml +++ b/make/data/cldr/common/main/ur_PK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/uz.xml b/make/data/cldr/common/main/uz.xml index 2f759633d49..647f507ab45 100644 --- a/make/data/cldr/common/main/uz.xml +++ b/make/data/cldr/common/main/uz.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/uz_Arab_AF.xml b/make/data/cldr/common/main/uz_Arab_AF.xml index e1d987d3f17..2811c51a34d 100644 --- a/make/data/cldr/common/main/uz_Arab_AF.xml +++ b/make/data/cldr/common/main/uz_Arab_AF.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/uz_Cyrl.xml b/make/data/cldr/common/main/uz_Cyrl.xml index 84f031b3ba5..e40915dfde9 100644 --- a/make/data/cldr/common/main/uz_Cyrl.xml +++ b/make/data/cldr/common/main/uz_Cyrl.xml @@ -1,8 +1,8 @@ - @@ -1762,11 +1762,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Лорд Хове кундузги вақти - - - Маквари ороли вақти - - Магадан вақти diff --git a/make/data/cldr/common/main/uz_Cyrl_UZ.xml b/make/data/cldr/common/main/uz_Cyrl_UZ.xml index 7275b67c2e3..661662e2a54 100644 --- a/make/data/cldr/common/main/uz_Cyrl_UZ.xml +++ b/make/data/cldr/common/main/uz_Cyrl_UZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/uz_Latn.xml b/make/data/cldr/common/main/uz_Latn.xml index df98fe2f66a..751b7b9ad9d 100644 --- a/make/data/cldr/common/main/uz_Latn.xml +++ b/make/data/cldr/common/main/uz_Latn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/uz_Latn_UZ.xml b/make/data/cldr/common/main/uz_Latn_UZ.xml index f1601335ce8..186352fa45c 100644 --- a/make/data/cldr/common/main/uz_Latn_UZ.xml +++ b/make/data/cldr/common/main/uz_Latn_UZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vai.xml b/make/data/cldr/common/main/vai.xml index 95876167bed..44e89b1a1dd 100644 --- a/make/data/cldr/common/main/vai.xml +++ b/make/data/cldr/common/main/vai.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vai_Latn.xml b/make/data/cldr/common/main/vai_Latn.xml index cfa87ac1fd0..5a3fe8b92d6 100644 --- a/make/data/cldr/common/main/vai_Latn.xml +++ b/make/data/cldr/common/main/vai_Latn.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vai_Latn_LR.xml b/make/data/cldr/common/main/vai_Latn_LR.xml index a346f6da827..35c079808c8 100644 --- a/make/data/cldr/common/main/vai_Latn_LR.xml +++ b/make/data/cldr/common/main/vai_Latn_LR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vai_Vaii.xml b/make/data/cldr/common/main/vai_Vaii.xml index f3dab1614ff..ff8d2dddc32 100644 --- a/make/data/cldr/common/main/vai_Vaii.xml +++ b/make/data/cldr/common/main/vai_Vaii.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vai_Vaii_LR.xml b/make/data/cldr/common/main/vai_Vaii_LR.xml index 1ef82ace8b7..8d2a6a96a83 100644 --- a/make/data/cldr/common/main/vai_Vaii_LR.xml +++ b/make/data/cldr/common/main/vai_Vaii_LR.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ve.xml b/make/data/cldr/common/main/ve.xml index df005fed71e..bba30a59a3d 100644 --- a/make/data/cldr/common/main/ve.xml +++ b/make/data/cldr/common/main/ve.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/ve_ZA.xml b/make/data/cldr/common/main/ve_ZA.xml index d55f653225d..4f4702d3e87 100644 --- a/make/data/cldr/common/main/ve_ZA.xml +++ b/make/data/cldr/common/main/ve_ZA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vec.xml b/make/data/cldr/common/main/vec.xml index 52d35c8a787..73db662b48b 100644 --- a/make/data/cldr/common/main/vec.xml +++ b/make/data/cldr/common/main/vec.xml @@ -1,8 +1,8 @@ - @@ -1763,9 +1763,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Tinpu - - Pang - S. Joani @@ -2215,18 +2212,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic Dar es Salam - - Ùzgorod - Kiev Sinferòpoli - - Zaporija - Kanpala @@ -2236,9 +2227,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Atolo Wake - - Atolo Johnston - Los Àngeles @@ -2811,11 +2799,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Ora d’istà de l’Ìzola Lord Howe - - - Ora de l’Ìzola Macquarie - - Ora de Magadan @@ -2855,13 +2838,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Ora de Mawson - - - Ora de’l Mèsego nord osidentale - Ora normale de’l Mèsego nord osidentale - Ora d’istà de’l Mèsego nord osidentale - - Ora de’l Mèsego de’l Pasìfego diff --git a/make/data/cldr/common/main/vec_IT.xml b/make/data/cldr/common/main/vec_IT.xml index ee6861ddd28..7105959d47a 100644 --- a/make/data/cldr/common/main/vec_IT.xml +++ b/make/data/cldr/common/main/vec_IT.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vi.xml b/make/data/cldr/common/main/vi.xml index 2918de18bcc..29c6d094fb1 100644 --- a/make/data/cldr/common/main/vi.xml +++ b/make/data/cldr/common/main/vi.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vmw.xml b/make/data/cldr/common/main/vmw.xml index 83f19e6428f..659a9e4e4f4 100644 --- a/make/data/cldr/common/main/vmw.xml +++ b/make/data/cldr/common/main/vmw.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vmw_MZ.xml b/make/data/cldr/common/main/vmw_MZ.xml index 8bf4bc264f2..3c6f3b580be 100644 --- a/make/data/cldr/common/main/vmw_MZ.xml +++ b/make/data/cldr/common/main/vmw_MZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vo.xml b/make/data/cldr/common/main/vo.xml index 779ae87acf1..f3ab9dc93e1 100644 --- a/make/data/cldr/common/main/vo.xml +++ b/make/data/cldr/common/main/vo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vo_001.xml b/make/data/cldr/common/main/vo_001.xml index 93848d5accd..489080db299 100644 --- a/make/data/cldr/common/main/vo_001.xml +++ b/make/data/cldr/common/main/vo_001.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vun.xml b/make/data/cldr/common/main/vun.xml index 65f77ebff44..8f618cd9c67 100644 --- a/make/data/cldr/common/main/vun.xml +++ b/make/data/cldr/common/main/vun.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/vun_TZ.xml b/make/data/cldr/common/main/vun_TZ.xml index 7e4002959d9..e7380551a6a 100644 --- a/make/data/cldr/common/main/vun_TZ.xml +++ b/make/data/cldr/common/main/vun_TZ.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/wa.xml b/make/data/cldr/common/main/wa.xml index 09cc554c0d6..cf82dc51b86 100644 --- a/make/data/cldr/common/main/wa.xml +++ b/make/data/cldr/common/main/wa.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/wa_BE.xml b/make/data/cldr/common/main/wa_BE.xml index 1b6bab96e0c..b3851d6d65d 100644 --- a/make/data/cldr/common/main/wa_BE.xml +++ b/make/data/cldr/common/main/wa_BE.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/wae.xml b/make/data/cldr/common/main/wae.xml index 801cb0e21a2..b4f505481b0 100644 --- a/make/data/cldr/common/main/wae.xml +++ b/make/data/cldr/common/main/wae.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/wae_CH.xml b/make/data/cldr/common/main/wae_CH.xml index 074f749dcd1..1476edb9eba 100644 --- a/make/data/cldr/common/main/wae_CH.xml +++ b/make/data/cldr/common/main/wae_CH.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/wal.xml b/make/data/cldr/common/main/wal.xml index 38c85b68f91..a01abdb2fdc 100644 --- a/make/data/cldr/common/main/wal.xml +++ b/make/data/cldr/common/main/wal.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/wal_ET.xml b/make/data/cldr/common/main/wal_ET.xml index 6c199c58faf..7b327c11634 100644 --- a/make/data/cldr/common/main/wal_ET.xml +++ b/make/data/cldr/common/main/wal_ET.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/wbp.xml b/make/data/cldr/common/main/wbp.xml index 6e1003e173f..567d70cc058 100644 --- a/make/data/cldr/common/main/wbp.xml +++ b/make/data/cldr/common/main/wbp.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/wbp_AU.xml b/make/data/cldr/common/main/wbp_AU.xml index 04068cc1078..c4eb9cd398c 100644 --- a/make/data/cldr/common/main/wbp_AU.xml +++ b/make/data/cldr/common/main/wbp_AU.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/wo.xml b/make/data/cldr/common/main/wo.xml index 1eb9bea5abb..fec199e1615 100644 --- a/make/data/cldr/common/main/wo.xml +++ b/make/data/cldr/common/main/wo.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/wo_SN.xml b/make/data/cldr/common/main/wo_SN.xml index 2ccabce5fde..4404a070ba3 100644 --- a/make/data/cldr/common/main/wo_SN.xml +++ b/make/data/cldr/common/main/wo_SN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/xh.xml b/make/data/cldr/common/main/xh.xml index 9d3d8aca861..2f2b457805b 100644 --- a/make/data/cldr/common/main/xh.xml +++ b/make/data/cldr/common/main/xh.xml @@ -1,8 +1,8 @@ - @@ -1180,9 +1180,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic São Tomé - - Uzhhorod - Ho Chi Minh City @@ -1692,11 +1689,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Lord Howe Daylight Time - - - Macquarie Island Time - - Magadan Time @@ -1736,13 +1728,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mawson Time - - - Northwest Mexico Time - Northwest Mexico Standard Time - Northwest Mexico Daylight Time - - Mexican Pacific Time diff --git a/make/data/cldr/common/main/xh_ZA.xml b/make/data/cldr/common/main/xh_ZA.xml index 147e9f55bd6..9b9f1627eb8 100644 --- a/make/data/cldr/common/main/xh_ZA.xml +++ b/make/data/cldr/common/main/xh_ZA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/xnr.xml b/make/data/cldr/common/main/xnr.xml index d4050236532..1869a6f5f8c 100644 --- a/make/data/cldr/common/main/xnr.xml +++ b/make/data/cldr/common/main/xnr.xml @@ -1,8 +1,8 @@ - @@ -1829,11 +1829,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic लॉर्ड होवे दे ध्याड़े दे उजाले दा टैम - - - मक्वारी टापू दा टैम - - मागादान दा टैम @@ -1873,13 +1868,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic माव्सन दा टैम - - - उत्तर पश्चिमी मेक्सिको दा टैम - उत्तर पश्चिमी मेक्सिको दा मानक टैम - उत्तर पश्चिमी मेक्सिको दे ध्याड़े दे उजाले दा टैम - - मेक्सिकन प्रशांत दा टैम diff --git a/make/data/cldr/common/main/xnr_IN.xml b/make/data/cldr/common/main/xnr_IN.xml index c9a676fb782..09931f3aa1b 100644 --- a/make/data/cldr/common/main/xnr_IN.xml +++ b/make/data/cldr/common/main/xnr_IN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/xog.xml b/make/data/cldr/common/main/xog.xml index e9373ae2cba..08454c0f076 100644 --- a/make/data/cldr/common/main/xog.xml +++ b/make/data/cldr/common/main/xog.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/xog_UG.xml b/make/data/cldr/common/main/xog_UG.xml index a1d12dd6af2..0b882fe9ea5 100644 --- a/make/data/cldr/common/main/xog_UG.xml +++ b/make/data/cldr/common/main/xog_UG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/yav.xml b/make/data/cldr/common/main/yav.xml index bbd335e8f90..855051df41d 100644 --- a/make/data/cldr/common/main/yav.xml +++ b/make/data/cldr/common/main/yav.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/yav_CM.xml b/make/data/cldr/common/main/yav_CM.xml index 65036387dee..1539a1e7285 100644 --- a/make/data/cldr/common/main/yav_CM.xml +++ b/make/data/cldr/common/main/yav_CM.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/yi.xml b/make/data/cldr/common/main/yi.xml index c839c8096ac..412fd89a515 100644 --- a/make/data/cldr/common/main/yi.xml +++ b/make/data/cldr/common/main/yi.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/yi_UA.xml b/make/data/cldr/common/main/yi_UA.xml index 2641e12ee71..bf85c1e0b17 100644 --- a/make/data/cldr/common/main/yi_UA.xml +++ b/make/data/cldr/common/main/yi_UA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/yo.xml b/make/data/cldr/common/main/yo.xml index a2a4e3cf453..fc47ed7e251 100644 --- a/make/data/cldr/common/main/yo.xml +++ b/make/data/cldr/common/main/yo.xml @@ -1,8 +1,8 @@ - @@ -1683,9 +1683,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic ìlú Kírẹstọ́ọ̀nù - - ìlú Yelonáfù - ìlú Edmonton @@ -1704,30 +1701,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic ìlú Resolútì - - ìlú Raini Rifà - ìlú Rankin Inlet ìlú àtikọkàn - - ìlú Omi Thunder - - - ìlú Nipigoni - ìlú Toronto ìlú Iqaluit - - ìlú Panituni - ìlú Montoni @@ -2475,11 +2460,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Lord Howe Daylight Time - - - Macquarie Island Time - - Magadan Time @@ -2519,13 +2499,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Mawson Time - - - Àkókò Apá Ìwọ̀ Oorùn Mẹ́ṣíkò - Àkókò Àfẹnukò Apá Ìwọ̀ Oorùn Mẹ́ṣíkò - Àkókò Ojúmọmọ Apá Ìwọ̀ Oorùn Mẹ́ṣíkò - - Àkókò Pásífíìkì Mẹ́ṣíkò diff --git a/make/data/cldr/common/main/yo_BJ.xml b/make/data/cldr/common/main/yo_BJ.xml index db83646cf1b..df46c47d32b 100644 --- a/make/data/cldr/common/main/yo_BJ.xml +++ b/make/data/cldr/common/main/yo_BJ.xml @@ -1,8 +1,8 @@ - @@ -898,13 +898,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic Àkókò Ooru Máríshúshì - - - Àkókò Apá Ìwɔ̀ Oorùn Mɛ́shíkò - Àkókò Àfɛnukò Apá Ìwɔ̀ Oorùn Mɛ́shíkò - Àkókò Ojúmɔmɔ Apá Ìwɔ̀ Oorùn Mɛ́shíkò - - Àkókò Pásífíìkì Mɛ́shíkò diff --git a/make/data/cldr/common/main/yo_NG.xml b/make/data/cldr/common/main/yo_NG.xml index 4c27ff826f4..43a18174b67 100644 --- a/make/data/cldr/common/main/yo_NG.xml +++ b/make/data/cldr/common/main/yo_NG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/yrl.xml b/make/data/cldr/common/main/yrl.xml index bf2340383d0..2d876b6c3c8 100644 --- a/make/data/cldr/common/main/yrl.xml +++ b/make/data/cldr/common/main/yrl.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/yrl_CO.xml b/make/data/cldr/common/main/yrl_CO.xml index 827622c77ce..a0b060a17ab 100644 --- a/make/data/cldr/common/main/yrl_CO.xml +++ b/make/data/cldr/common/main/yrl_CO.xml @@ -1,8 +1,8 @@ - @@ -1258,7 +1258,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 電話簿排序 發音排序 拼音排序 - 改良排序 一般用途搜尋 韓文子音排序 標準排序 @@ -3250,9 +3249,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic {0}時間 {0}夏令時間 {0}標準時間 - - 聖伊薩貝爾 - 協調世界時間 @@ -3375,9 +3371,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 墨爾本 - - 克黎 - 荷巴特 @@ -3531,9 +3524,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 克雷斯頓 - - 耶洛奈夫 - 艾德蒙吞 @@ -3552,30 +3542,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic 羅斯魯特 - - 雨河鎮 - 蘭今灣 阿蒂科肯 - - 珊德灣 - - - 尼皮岡 - 多倫多 伊魁特 - - 潘尼爾東 - 蒙克頓 @@ -4389,18 +4367,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic 沙蘭港 - - 烏茲哥洛 - 基輔 辛非洛浦 - - 札波羅結 - 坎帕拉 @@ -4419,9 +4391,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 檀香山 - - 強斯頓 - 安克拉治 @@ -5121,11 +5090,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 澳門夏令時間 - - - 麥覺理時間 - - 馬加丹時間 @@ -5165,13 +5129,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 莫森時間 - - - 墨西哥西北部時間 - 墨西哥西北部標準時間 - 墨西哥西北部夏令時間 - - 墨西哥太平洋時間 diff --git a/make/data/cldr/common/main/yue_Hans.xml b/make/data/cldr/common/main/yue_Hans.xml index 8c1bbf61819..b730d5cbc84 100644 --- a/make/data/cldr/common/main/yue_Hans.xml +++ b/make/data/cldr/common/main/yue_Hans.xml @@ -1,8 +1,8 @@ - @@ -1259,7 +1259,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 电话簿排序 发音排序 拼音排序 - 改良排序 一般用途搜寻 韩文子音排序 标准排序 @@ -3256,9 +3255,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic {0}时间 - - 圣伊萨贝尔 - 协调世界时间 @@ -3381,9 +3377,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 墨尔本 - - 克黎 - 荷巴特 @@ -3537,9 +3530,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 克雷斯顿 - - 耶洛奈夫 - 艾德蒙吞 @@ -3558,30 +3548,18 @@ CLDR data files are interpreted according to the LDML specification (http://unic 罗斯鲁特 - - 雨河镇 - 兰今湾 阿蒂科肯 - - 珊德湾 - - - 尼皮冈 - 多伦多 伊魁特 - - 潘尼尔东 - 蒙克顿 @@ -4395,18 +4373,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic 沙兰港 - - 乌兹哥洛 - 基辅 辛非洛浦 - - 札波罗结 - 坎帕拉 @@ -4425,9 +4397,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 檀香山 - - 强斯顿 - 安克拉治 @@ -5127,11 +5096,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 澳门夏令时间 - - - 麦觉理时间 - - 马加丹时间 @@ -5171,13 +5135,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 莫森时间 - - - 墨西哥西北部时间 - 墨西哥西北部标准时间 - 墨西哥西北部夏令时间 - - 墨西哥太平洋时间 diff --git a/make/data/cldr/common/main/yue_Hans_CN.xml b/make/data/cldr/common/main/yue_Hans_CN.xml index 2be260a7927..5a0f87470d0 100644 --- a/make/data/cldr/common/main/yue_Hans_CN.xml +++ b/make/data/cldr/common/main/yue_Hans_CN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/yue_Hant.xml b/make/data/cldr/common/main/yue_Hant.xml index 4f24496922e..f34cd5b4287 100644 --- a/make/data/cldr/common/main/yue_Hant.xml +++ b/make/data/cldr/common/main/yue_Hant.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/yue_Hant_HK.xml b/make/data/cldr/common/main/yue_Hant_HK.xml index 56a6841fe58..24920c69cd5 100644 --- a/make/data/cldr/common/main/yue_Hant_HK.xml +++ b/make/data/cldr/common/main/yue_Hant_HK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/za.xml b/make/data/cldr/common/main/za.xml index 7510c24301b..d6b56c0fedd 100644 --- a/make/data/cldr/common/main/za.xml +++ b/make/data/cldr/common/main/za.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/za_CN.xml b/make/data/cldr/common/main/za_CN.xml index 2c53062950f..83256fd63a5 100644 --- a/make/data/cldr/common/main/za_CN.xml +++ b/make/data/cldr/common/main/za_CN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/zgh.xml b/make/data/cldr/common/main/zgh.xml index 785ca3aea00..a2492602028 100644 --- a/make/data/cldr/common/main/zgh.xml +++ b/make/data/cldr/common/main/zgh.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/zgh_MA.xml b/make/data/cldr/common/main/zgh_MA.xml index 239605f578d..d068734cd5f 100644 --- a/make/data/cldr/common/main/zgh_MA.xml +++ b/make/data/cldr/common/main/zgh_MA.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/zh.xml b/make/data/cldr/common/main/zh.xml index 566c10d3d98..1dcdedd1f6c 100644 --- a/make/data/cldr/common/main/zh.xml +++ b/make/data/cldr/common/main/zh.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/zh_Hans_CN.xml b/make/data/cldr/common/main/zh_Hans_CN.xml index d0269d75cc3..fcdea0e9e42 100644 --- a/make/data/cldr/common/main/zh_Hans_CN.xml +++ b/make/data/cldr/common/main/zh_Hans_CN.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/zh_Hans_HK.xml b/make/data/cldr/common/main/zh_Hans_HK.xml index 759b3927384..f94dae7db8c 100644 --- a/make/data/cldr/common/main/zh_Hans_HK.xml +++ b/make/data/cldr/common/main/zh_Hans_HK.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/zh_Hans_MO.xml b/make/data/cldr/common/main/zh_Hans_MO.xml index 1fb246cac5e..16d25d5eeed 100644 --- a/make/data/cldr/common/main/zh_Hans_MO.xml +++ b/make/data/cldr/common/main/zh_Hans_MO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/zh_Hans_SG.xml b/make/data/cldr/common/main/zh_Hans_SG.xml index 8f0eb4b99fe..5c85bf323f1 100644 --- a/make/data/cldr/common/main/zh_Hans_SG.xml +++ b/make/data/cldr/common/main/zh_Hans_SG.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/zh_Hant.xml b/make/data/cldr/common/main/zh_Hant.xml index f266c62ea84..0d2228ccbe1 100644 --- a/make/data/cldr/common/main/zh_Hant.xml +++ b/make/data/cldr/common/main/zh_Hant.xml @@ -1,8 +1,8 @@ - @@ -209,7 +209,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 繁體中文排序 (Big5) 詞典排序 簡體中文排序 (GB2312) - 改革版排序 英制 美制 天城體數字 @@ -1106,9 +1105,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 阿德萊德 - - 卡里 - 荷伯特 @@ -1181,18 +1177,9 @@ CLDR data files are interpreted according to the LDML specification (http://unic 道森灣 - - 黃刀鎮 - 愛民頓 - - 雷灣 - - - 尼皮貢 - 哈利法克斯 @@ -1481,18 +1468,12 @@ CLDR data files are interpreted according to the LDML specification (http://unic 達累斯薩拉姆 - - 烏日哥羅德 - 威克島 埃達克 - - 約翰斯頓環礁 - 安克雷奇 @@ -1660,11 +1641,6 @@ CLDR data files are interpreted according to the LDML specification (http://unic 科斯雷時間 - - - 麥夸里群島時間 - - 馬爾代夫時間 diff --git a/make/data/cldr/common/main/zh_Hant_MO.xml b/make/data/cldr/common/main/zh_Hant_MO.xml index 156b27ece4d..f941bdd6b45 100644 --- a/make/data/cldr/common/main/zh_Hant_MO.xml +++ b/make/data/cldr/common/main/zh_Hant_MO.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/zh_Hant_TW.xml b/make/data/cldr/common/main/zh_Hant_TW.xml index 03fb15fed07..35382c2bf79 100644 --- a/make/data/cldr/common/main/zh_Hant_TW.xml +++ b/make/data/cldr/common/main/zh_Hant_TW.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/main/zu.xml b/make/data/cldr/common/main/zu.xml index 06ac46d877c..94f8e15c8ed 100644 --- a/make/data/cldr/common/main/zu.xml +++ b/make/data/cldr/common/main/zu.xml @@ -1,8 +1,8 @@ - diff --git a/make/data/cldr/common/properties/coverageLevels.txt b/make/data/cldr/common/properties/coverageLevels.txt index fc4a5d31df7..3a2bb78c703 100644 --- a/make/data/cldr/common/properties/coverageLevels.txt +++ b/make/data/cldr/common/properties/coverageLevels.txt @@ -144,7 +144,6 @@ th ; modern ; Thai ti ; basic ; Tigrinya tk ; modern ; Turkmen to ; basic ; Tongan -tok ; basic ; Toki Pona tr ; modern ; Turkish tt ; basic ; Tatar ug ; basic ; Uyghur diff --git a/make/data/cldr/common/supplemental/coverageLevels.xml b/make/data/cldr/common/supplemental/coverageLevels.xml index 81e3af8c00f..457cdc18660 100644 --- a/make/data/cldr/common/supplemental/coverageLevels.xml +++ b/make/data/cldr/common/supplemental/coverageLevels.xml @@ -54,9 +54,9 @@ For terms of use, see http://www.unicode.org/copyright.html - + - + @@ -115,7 +115,6 @@ For terms of use, see http://www.unicode.org/copyright.html - @@ -130,7 +129,7 @@ For terms of use, see http://www.unicode.org/copyright.html - + @@ -262,7 +261,6 @@ For terms of use, see http://www.unicode.org/copyright.html - diff --git a/make/data/cldr/common/supplemental/languageGroup.xml b/make/data/cldr/common/supplemental/languageGroup.xml index fcb764ccb64..1b24bd291e4 100644 --- a/make/data/cldr/common/supplemental/languageGroup.xml +++ b/make/data/cldr/common/supplemental/languageGroup.xml @@ -1,8 +1,8 @@ - @@ -11,7 +11,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic bbh bfw bru brv hre irr kdt ktv kuf mkh mmj mun ncq ngt nyl oog pac phg ply sct sss tth tto zng aal ber btf bvw bxe cdc ckq cop cus glo hdy hig hss hwo jaf kbz kul kvj mes mlw mmf omv sem tdk tsh ttr xdm aaq abe alq arp atj ats bla chy ciw cr crj crk crl crm crr csw del dep etc kic mez mia mic mjy moe nnt nsk oj ojb ojc ojs ojw otw pim pot pqm psy qyp sac sjw unm wam xlb xlo xnt xpq - aaa aab aba abi abm abn abo abr abu acd acp ada ade adj adq adu afn afu agb agc agq aha ahl ahp aik aiy ajg ak akd akf akp aku ala anf ann anv anw any aqd aqk asg asj ass ati ato aug avi avn awc ayb ayg ayi ayu azo bab bad bai bax bba bbk bbp bbs bcb bce bcg bci bcn bcs bcv bcz bda bdj bdt bec beh bes bfd bfl bfo bga bgf bgj bgu bif bim bin biv bjg bjt bju bkc bkm ble blo bly bme bmf bmq bnt bnz boe bok bom bov box bqa bqj brm brt bsc bse bsp bsx btc bud buy buz bvi bvj bwh bwj bwy byb byc byf byj bzv bzw bzz cae cbj cbo cbq ccg cch ccj cfd cib cko cli cll cou cpn cry cwt dag dai dam dbg dbi dbt dbu dbv dbw dds deg deq dga dgb dgd dgi dir djm dmb dmm doh doo dop doy dtk dtm dto dts dtu dur duz dya dyi dym dyo dza ebg ebr ee efa efi ega ego ehu eja eka eke eki ekp ekr elm ema emn enn env enw eot epi erh esm etb ets etu etx evh eza eze fah fak fal fam fap fer ff fir fll fni fod fon fub fue fuf fuh fuj fum fuq fuv gaa gba gbg gbh gbp gbq gbr gbs gbx gby gdi ged gej gel geq gix gjn gke gkn glc gmd gmm gmz gnh gnz gol gox goy grh gsl gso gur guw gux gvm gwa gwx gye gyg hag hhr hoe ibb ibe ibm ibn ibr ich idc ide idr ids idu ig igb igl ihi ijo iki ikk iko ikw ilv iqw ish isi iso isu itm its itw izr izz jab jer jid jmr jms jni juh juk juo juw kaj kbp kcc kcg kcj kdh kdm kdx kdz kef ken kes keu kez kfl kfn kgt khj kia kid kkm kku klc klk klo kma kmi kmy knf knp kou kov kow kph kpk kpl kpo kqg kqk kqm kqs krh kro krp krx ksa kss kub kvm kxb kye kza kzc kzr lan lar las ldg ldh ldm ldq lee lef lgq lia lip lma lmp lns lob lof lro luq mae mbv mcj mcs mcu mdd mea mfc mfd mff mfn mfq mfv mgj mgn mgo mhk mij mkl mko mlo moj mor mos mql mru msj msw mtk mua muc muo mxl myg myj myk mzk mzm mzv mzw naj nat naw nbm nbo nbp nbr nbv nbw ncr ncu ndd ndi ndr ndt ndv ndz ned nfr nfu nga ngb nge ngg nhu nie nin njr nko nkq nku nkz nlu nmj nmr nmz nnu nnw noy nqk nsc nti ntm nuh nup nuv nyb nza nzi nzz obu oda odu ofu ogb ogc ogg ogo ogu okb oke oku opa orx otr pbl pbo pbp pcn pil pmb png pnl pnq pny pnz pug pwb pym res ruy saf sav scv sde sev sfw sha shw shz sig sil snf snj snw soy spp sqm srr ssl swf sxw tbm tbz tcd tde tdl tem tfi tgw tgy thy tik tiq tiv tkq tnr toz tsp tsw ttb tug tui tuz tvd twn uda uiv ukw ula umm urh usk uta uth utr uya vag vit vor vut wbf wci wem wib wlx wo wof wom wrn wss wwa www xab xkb xoc xrb xsm xsn xwe xwl yam yay yaz yba ybj ybl yer yky yng ynq yo zna + aaa aab aba abi abm abn abo abr abu acd acp ada ade adj adq adu afn afu agb agc agq aha ahl ahp aik aiy ajg ak akd akf akp aku ala anf ann anv anw any aqd aqk asg asj ass ati ato aug avi avn awc ayb ayg ayi ayu azo bab bad bai bax bba bbk bbp bbs bcb bce bcg bci bcn bcs bcv bcz bda bdj bdt bec beh bes bfd bfl bfo bga bgf bgj bgu bif bim bin biv bjg bjt bju bkc bkm ble blo bly bme bmf bmq bnt bnz boe bok bom bov box bqa bqj brm brt bsc bse bsp bsx btc bud buy buz bvi bvj bwh bwj bwy byb byc byf byj bzv bzw bzz cae cbj cbo cbq ccg cch ccj cfd cib cko cli cll cou cpn cry cwt dag dai dam dbg dbi dbt dbu dbv dbw dds deg deq dga dgb dgd dgi dir djm dmb dmm doh doo dop doy dtk dtm dto dts dtu dur duz dya dyi dym dyo dza ebg ebr ee efa efi ega ego ehu eja eka eke eki ekp ekr elm ema emn enn env enw eot epi erh esm etb ets etu etx evh eza eze fah fak fal fam fap fer ff fir fll fni fod fon fub fue fuf fuh fuj fum fuq fuv gaa gba gbg gbh gbp gbq gbr gbs gbx gby gdi ged gej gel geq gix gjn gke gkn glc gmd gmm gmz gnh gnz gol gox goy grh gsl gso gur guw gux gvm gwa gwx gye gyg hag hhr hoe ibb ibe ibm ibn ibr ich idc ide idr ids idu ig igb igl ihi ijo iki ikk iko ikw ilv iqw ish isi iso isu itm its itw izr izz jab jer jid jmr jms jni juh juk juo juw kaj kbp kcc kcg kcj kdh kdm kdx kdz kef ken kes keu kez kfl kfn kgt khj kia kid kkm kku klc klk klo kma kmi kmy knf knp kou kov kow kph kpk kpl kpo kqg kqk kqm kqs krh kro krp kss kub kvm kxb kye kza kzc kzr lan lar las ldg ldh ldm ldq lee lef lgq lia lip lma lmp lns lob lof lro luq mae mbv mcj mcs mcu mdd mea mfc mfd mff mfn mfq mfv mgj mgn mgo mhk mij mkl mko mlo moj mor mos mql mru msj msw mtk mua muc muo mxl myg myj myk mzk mzm mzv mzw naj nat naw nbm nbo nbp nbr nbv nbw ncr ncu ndd ndi ndr ndt ndv ndz ned nfr nfu nga ngb nge ngg nhu nie nin njr nko nkq nku nkz nlu nmj nmr nmz nnu nnw noy nqk nsc nti ntm nuh nup nuv nyb nza nzi nzz obu oda odu ofu ogb ogc ogg ogo ogu okb oke oku opa orx otr pbl pbo pbp pcn pil pmb png pnl pnq pny pnz pug pwb pym res rsw ruy saf sav scv sde sev sfw sha shw shz sig sil snf snj snw soy spp sqm srr ssl swf sxw tbm tbz tcd tde tdl tem tfi tgw tgy thy tik tiq tiv tkq tnr toz tsp tsw ttb tug tui tuz tvd twn uda uiv ukw ula umm urh usk uta uth utr uya vag vit vor vut wbf wci wem wib wlx wo wof wom wrn wss wwa www xab xkb xoc xrb xsm xsn xwe xwl yam yay yaz yba ybj ybl yer yky yng ynq yo zna apj apk apl apm apw nv alc alg wiy yur @@ -19,7 +19,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic aht apa bcr bea caf chp clc coq crx den dgr gce gwi haa hup ing kkz koy ktw kuu mvb qwt scs sek srs taa tau tcb tce tfn tgx tht tol ttm tuu txc wlk xup aru cul dny jaa pad swx adg adt aea aer aid alh aly amx amy amz ant ard are avm awg awk axe axl ayd bck bdy bia bjb bjy bpt bxi bxj bxn bym bzr dax dbl dda ddj dhg dhl dhr dhu dhx dif dja djb djd djf dji djr dmd dmw drl dth dwu dwy dyn dyy dze eaa fln gbb gbd gbu gbw gdc gdh gdj gdt ggd gia gih gjm gko gll gni gnl gnn gnr gtu gue guf gvn gvy gwm gwu gyf gyy hrp iin ikr jan jao jay jbi jig jui kbe kdd kgl kgs kjn kkp kky kld ktd ktg kux kuy lby lja ljw lku llj lnj lnw mem mep mpj mvl mwf mwp nam nay nbj ngk nha nhf nji nju nly nmv nnr nrk nrl ntg ntj nwg nwo nxn nys nyt nyx okg olk pit piu pjt pkn pnj pnv pnw pti rbp rit rkw rnr rrt rsm rxd rxw tbh tgz thd tju tjw typ ugb uky umd umg ump urf uwa vka vku vma vmb vml vmu wbp wbt wbv wdj wdk wdu wga wgg wgu wgy wie wig wih wij wik wim wkw wky wmb wmi wmt wnm wnn wrb wrg wrh wri wrl wrm wrw wth wua wyb wyi xbb xbe xbg xbp xby xda xdk xgd xgg xgi xgm xgw xjb xmh xmp xmy xni xnk xnu xny xpa xpj xpt xrd xrg xth xul xut xwd xwj xwk xwt xww xya xyj xyk xyt xyy yda yga yia yii yij yil ylr ynd yrm yry yty yub ywg yww yxg yxl zku zmc zmk zmu zmv - aca ame aox apu arw avo bae brg bvv bwi cab cbb ccc cjo cni cot cox cpc crb cuj gae gqn guc ign inp kav kgm kpc mcb mht mmh mpd mpw mzx not pab pbg pib pio plu pnk rgr sar tae ter tnq trn unk wap wau xir yaw ycn yvt + aca ame aox apu arw avo bae brg bvv bwi cab cbb ccc cjo cni cot cox cpc crb cuj gae gqn guc ign inp kav kpc mcb mht mmh mpd mpw mzx not pab pbg pib pio plu pnk rgr sar tae ter tnq trn unk wap wau xir yaw ycn yvt chl cok com crn cup hch hop lui mfy mnr nah ncx nhi npl ntp ood opt pao par pia ser shh stp tac tar tbu tcu tep thh tla tub twr ute var xaw xgf xpo yaq bjo kuw lna lnl mnh nue tor bbj bko byv fmp jgo nla nnh nnz nwe xmg ybb @@ -31,7 +31,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic arh brn bzd cbg chb cjp cuk gut gym kog kvn mbp mot pay rma sab tbn tfr tnb tnd ab abq ady kbd uby jge ka lzz oge sva xmf - ajw anc ank bcw bcy bde bdm bdn bid bol bta bvf bvh bwr bwu bxq ckl cky cla daa dbb dbq dot dwa fie fkk fli gab gde gdk gdu gea gek gew gid gis giz glw gnd gqa grd gwn ha hed hia hna jeu jie jim jmb jmi juu kai kcs ker kil kna kof kot kpa kqx kso ksq kuh kvf kvi ldd lln lme maf mcn mcw mew mfl mif mkf mlj mmy moz mpg mpi mpk mqb mse msv mug muj muy mxf mxu nbh ndm ngi ngw ngx nja nnc nnn pbi pip piy plj pqa saa say scw sir sok sor sur swq swy tak tan tax tmc trj ubi udl xed xmj zah zaz zbu zim ziz zns zrn zua zuy + ajw anc ank bcw bcy bde bdm bdn bid bol bta bvf bvh bwr bwu bxq ckl cky cla daa dbb dbq dot dwa fie fkk fli gab gde gdk gdu gea gek gew gid gis giz glw gnd gqa grd gwn ha hed hia hna jeu jie jim jmb jmi juu kai kcs ker kil kna kof kot kpa kqx kso ksq kuh kvf kvi ldd lln lme maf mcn mcw mew mfl mif mkf mlj mmy moz mpg mpi mpk mqb mse msv mug muj muy mxf mxu nbh ndm ngi ngw ngx nja nnc nnn pbi pip piy pqa pze saa say scw sir sok sor sur swq swy tak tan tax tmc trj tvi ubi udl xed xmj zah zaz zbu zim ziz zns zrn zuy ari cad kii paw wic br cnx cy ga gd gv kw mga nrc obt oco owl pgl sga sth wlm xbm xcb xce xga xlp xpi ace cja cje cjm hro huq ibh jra ocm rad rgs rog @@ -90,10 +90,10 @@ CLDR data files are interpreted according to the LDML specification (http://unic an ast ca cbk co cpf cpp dlm drc egl es ext fax fr frc frm fro frp fur gl ist it itk lad lij lld lmo mwl mxi nap nrf oc osp pcd pld pln pml pms pro pt rgn rm ro ruo rup ruq sc scn sdc sdn sdt sro vec wa xno zrp blc cea cjh clm col coo cow crd fla hur lil lut nok oka ptw qun sec shs ska slh sno spo squ str thp til twa ach adh alz anu atu bdi bfa bxb byg dau ddd dib din dip diw dks enb eyo jum kdj keo kln koe kpz liu lky loh lot lpx lth luo mas mfz mqu mur muz mym niq njl nnj nsg nub nus oki omt pko saq sgc shj shk soh suq tbi tcc tec teo teq tex toq tuv tuy ukv xel xwg zmo - aao abh acm acq acy aeb aec agj aii ajp akk am amw apc apd ar arc arq ary auz ayl ayn ayp bhm bhn dlk egy fif gdq gez gru har hbo he hoh hrt inm ior jpa jrb jye kqd lhs mey mid mt mvz mys myz oar obm phn rzh sgw shu shv smp sqr sqt syc syr ti tig tru uga wle xaa xeb xha xhd xna xpu xqt xsa yhd zwa + aao abh acm acq acy aeb aec agj aii akk am amw apc apd ar arc arq ary auz ayl ayn ayp bhm bhn dlk egy fif gdq gez gru har hbo he hoh hrt inm ior jpa jrb jye kqd lhs mey mid mt mvz mys myz oar obm phn rzh sgw shu shv smp sqr sqt syc syr ti tig tru uga wle xaa xeb xha xhd xna xpu xqt xsa yhd zwa ncs asb bll chc cmm cro dak hid iow ksk lkt mhq ofo oma osa qua sto tta win xwc - acn aeu ahk aim anm aot aph atb aub bap bfc bgg bgr bhj biu brd bxd byh byo byw bzi cdf cdm cfm ckh ckn clj clk cmr cnc cng cnh cnk csh csj ctd cth ctn cur cuw cvg dao der dhi dis drq dus emg enu ero ers gnb goe gqi grt hle hmr hni hpo ii jee jih jiu jiy jkr jnl jya kac kaf kar kdq kfw kgj kif kip kix kjl kjz kkt kle klr kmm ktp lax lbg lbr lep lgh lhi lhp lhu lif lis lkc llh lmh lov lpo lrr lsh lsi lus lwm mhu mjw mni mpz mrh mro muk mxj my nbe nbi nbu ncd new njb njh njm njn njo nkb nkd nkf nkh nki nma nme nmo nmy nng nnl nnp nos npb npg nph npo npu nre nri nru nsf nsm nty nwc nxq nzm obr pck phh pho phq pkh pmi pmj pmx pub pum pzn qvy qxs raa rab raf rah raq rau rav ria rji rki rmz rtc ruh sch sdp sgk sgp shl sjl slt smh smt ssk suv suz sxg taj tbq tcl tco tcz tdg tdh tge thf tij tji tjs tmk tpe tro trp tvn txg txo ugo usi vap vay weu wme wuh xac ybh ybi ych ycl ycp yig yim yiq yiv ykt ylo ymc ymd ymi ymq ymx ymz yna ypa yph ypn ypo ypp ypz ysd ysp ysy ytl ywl ywq ywt zal zhx zkd zkn zkr zom + acn aeu ahk aim anm aot aph atb aub bap bfc bgg bgr bhj biu brd bxd byh byo byw bzi cdf cdm cfm ckh ckn clj clk cmr cnc cng cnh cnk csh csj ctd cth ctn cur cuw cvg dao der dhi dis drq dus emg enu ero ers gnb goe gqi grt hle hmr hni hpo ii jee jih jiu jiy jkr jnl jya kac kaf kar kdq kfw kgj kif kip kix kjl kjz kkt kle klr kmm ktp lax lbg lbr lep lgh lhi lhp lhu lif lis lkc llh lmh lov lpo lrr lsh lsi lus lwm mhu mjw mni mpz mrh mro muk mxj my nbe nbi nbu ncd new njb njh njm njn njo nkb nkd nkf nkh nki nma nme nmo nmy nng nnl nnp nos npb npg nph npo npu nre nri nru nsf nsm nty nwc nxq nzm obr pck phh pho phq pkh pmi pmj pmx pub pum pzn qvy qxs raa rab raf rah raq rau rav ria rji rki rmz rtc ruh sch sdp sgk sgp shl sjl slt smh smt ssk suv suz sxg taj tbq tcl tco tcz tdg tdh tge thf tij tji tjs tpe tro trp tvn txg txo ugo usi vap vay weu wme wuh xac ybh ybi ych ycl ycp yig yim yiq yiv ykt ylo ymc ymd ymi ymq ymx ymz yna ypa yph ypn ypo ypp ypz ysd ysp ysy ytl ywl ywq ywt zal zhx zkd zkn zkr zom rsk zle zls zlw se sia sjd sje sjk sjt sju sma smj smn sms ddn dje dsq hmb kcy khq ses tda tst twq @@ -101,11 +101,11 @@ CLDR data files are interpreted according to the LDML specification (http://unic enf enh mtm nio sel xas yrk aho aio blt eee kht ksu lo nod nrr nut pdi phk shn soa tdd th thi tnu tpo tsl tyj tyr tyz za zch zeh zln zlq adi adl adx apt bee bft bfu bo bqh bro brx cda cdn cgk chx dka drd dre duu dz dzl ghe ghh ght gro gvr gyo hut jda jna jul kbg kfk kgy khg kkf kte kzq lae lbf lbj lhm lkh loy mrg nbt neh njz nmm npa nun ola ole prx rgk rnp sbu scp scu sgt sip skj spt syw tgf tgj ths tpq tsj tsk ttz twm xct xkf xkz xns xsr xzh zau - aib alt atv az azb ba bgx chg cjs clw crh cv dlg gag ili jct kaa kdr kim kjh kk klj kmz krc kum ky nog ota otk oui qwm qxq sah slq slr sty tk tr tt tyv ug uum uz uzs xbo xpc xqa ybe zkh zkz + aib alt atv az azb ba bgx chg cjs clw crh cv dlg gag ili jct kaa kdr kim kjh kk klj kmz krc kum ky nog ota otk oui qwm qxq sah slr sty tk tr tt tyv ug uum uz uzs xbo xpc xqa ybe zkh zkz aan ait ama api aqz arr arx asn asu aux avv awe awt cin cod eme gn gnw gub gui gun guq gvj gvo gyr jor jua jur kay kgk kpn ktn kuq kyr kyz mav mdz mnd mpu msp myu nhd omg oym paf pah pak pog psm pta pto skf srq sru taf tpj tpk tpn tpr tpw tqb twt urb uru urz wir wyr xaj xiy xmo yrl yuq ain trk xgn xhc zkt eve evn gld juc mnc neg oaa oac orh sjo ude ulc - fiu hu kca mns omk rts syd xcv ykg yux zkb + fiu hu kca mns omk rts syd xcv ykg yux dtd has hei kwk myh nuk dsb hsb bua bxm bxu cmg dta kxs mhj mjg mn mvf peh sce xal xng xwo yuy diff --git a/make/data/cldr/common/supplemental/languageInfo.xml b/make/data/cldr/common/supplemental/languageInfo.xml index 3c550dca0fe..bca787901a0 100644 --- a/make/data/cldr/common/supplemental/languageInfo.xml +++ b/make/data/cldr/common/supplemental/languageInfo.xml @@ -167,7 +167,6 @@ For terms of use, see http://www.unicode.org/copyright.html - diff --git a/make/data/cldr/common/supplemental/likelySubtags.xml b/make/data/cldr/common/supplemental/likelySubtags.xml index 1a13b214fe2..0a60322deef 100644 --- a/make/data/cldr/common/supplemental/likelySubtags.xml +++ b/make/data/cldr/common/supplemental/likelySubtags.xml @@ -1,9 +1,9 @@ - + @@ -1658,9 +1658,9 @@ not be patched by hand, as any changes made in that fashion may be lost. - + - + @@ -1724,9 +1724,9 @@ not be patched by hand, as any changes made in that fashion may be lost. - + - + @@ -1872,9 +1872,9 @@ not be patched by hand, as any changes made in that fashion may be lost. - + - + @@ -2880,7 +2880,6 @@ not be patched by hand, as any changes made in that fashion may be lost. - @@ -5043,7 +5042,6 @@ not be patched by hand, as any changes made in that fashion may be lost. - @@ -5267,7 +5265,6 @@ not be patched by hand, as any changes made in that fashion may be lost. - @@ -6467,7 +6464,6 @@ not be patched by hand, as any changes made in that fashion may be lost. - @@ -6872,7 +6868,6 @@ not be patched by hand, as any changes made in that fashion may be lost. - @@ -6956,7 +6951,6 @@ not be patched by hand, as any changes made in that fashion may be lost. - @@ -7015,6 +7009,7 @@ not be patched by hand, as any changes made in that fashion may be lost. + @@ -7164,6 +7159,7 @@ not be patched by hand, as any changes made in that fashion may be lost. + @@ -7372,7 +7368,6 @@ not be patched by hand, as any changes made in that fashion may be lost. - @@ -7562,7 +7557,6 @@ not be patched by hand, as any changes made in that fashion may be lost. - @@ -7775,7 +7769,6 @@ not be patched by hand, as any changes made in that fashion may be lost. - @@ -7919,6 +7912,7 @@ not be patched by hand, as any changes made in that fashion may be lost. + @@ -8483,7 +8477,6 @@ not be patched by hand, as any changes made in that fashion may be lost. - @@ -8747,7 +8740,6 @@ not be patched by hand, as any changes made in that fashion may be lost. - @@ -8841,7 +8833,6 @@ not be patched by hand, as any changes made in that fashion may be lost. - diff --git a/make/data/cldr/common/supplemental/metaZones.xml b/make/data/cldr/common/supplemental/metaZones.xml index 0beb757cacb..e8098c9c0c8 100644 --- a/make/data/cldr/common/supplemental/metaZones.xml +++ b/make/data/cldr/common/supplemental/metaZones.xml @@ -402,7 +402,8 @@ For terms of use, see http://www.unicode.org/copyright.html - + + @@ -596,9 +597,6 @@ For terms of use, see http://www.unicode.org/copyright.html - - - @@ -626,11 +624,6 @@ For terms of use, see http://www.unicode.org/copyright.html - - - - - @@ -653,9 +646,6 @@ For terms of use, see http://www.unicode.org/copyright.html - - - @@ -679,9 +669,6 @@ For terms of use, see http://www.unicode.org/copyright.html - - - @@ -700,7 +687,8 @@ For terms of use, see http://www.unicode.org/copyright.html - + + @@ -734,9 +722,6 @@ For terms of use, see http://www.unicode.org/copyright.html - - - @@ -759,9 +744,6 @@ For terms of use, see http://www.unicode.org/copyright.html - - - @@ -774,7 +756,12 @@ For terms of use, see http://www.unicode.org/copyright.html - + + + + + + @@ -815,7 +802,8 @@ For terms of use, see http://www.unicode.org/copyright.html - + + @@ -1024,7 +1012,8 @@ For terms of use, see http://www.unicode.org/copyright.html - + + @@ -1156,9 +1145,6 @@ For terms of use, see http://www.unicode.org/copyright.html - - - @@ -1370,10 +1356,6 @@ For terms of use, see http://www.unicode.org/copyright.html - - - - @@ -1398,10 +1380,6 @@ For terms of use, see http://www.unicode.org/copyright.html - - - - @@ -1489,10 +1467,6 @@ For terms of use, see http://www.unicode.org/copyright.html - - - - @@ -1629,7 +1603,6 @@ For terms of use, see http://www.unicode.org/copyright.html - @@ -1776,6 +1749,7 @@ For terms of use, see http://www.unicode.org/copyright.html + @@ -1816,7 +1790,6 @@ For terms of use, see http://www.unicode.org/copyright.html - @@ -1825,7 +1798,6 @@ For terms of use, see http://www.unicode.org/copyright.html - @@ -1962,6 +1934,7 @@ For terms of use, see http://www.unicode.org/copyright.html + @@ -1990,7 +1963,6 @@ For terms of use, see http://www.unicode.org/copyright.html - @@ -1998,7 +1970,6 @@ For terms of use, see http://www.unicode.org/copyright.html - diff --git a/make/data/cldr/common/supplemental/ordinals.xml b/make/data/cldr/common/supplemental/ordinals.xml index fd210e6fa68..58f7b016340 100644 --- a/make/data/cldr/common/supplemental/ordinals.xml +++ b/make/data/cldr/common/supplemental/ordinals.xml @@ -3,7 +3,7 @@ diff --git a/make/data/cldr/common/supplemental/pluralRanges.xml b/make/data/cldr/common/supplemental/pluralRanges.xml index 02161f9cf30..25621072bcd 100644 --- a/make/data/cldr/common/supplemental/pluralRanges.xml +++ b/make/data/cldr/common/supplemental/pluralRanges.xml @@ -3,7 +3,7 @@ diff --git a/make/data/cldr/common/supplemental/subdivisions.xml b/make/data/cldr/common/supplemental/subdivisions.xml index 1a2fe3da176..fbcfb8e2e25 100644 --- a/make/data/cldr/common/supplemental/subdivisions.xml +++ b/make/data/cldr/common/supplemental/subdivisions.xml @@ -3,7 +3,7 @@ - @@ -2874,7 +2875,6 @@ XXX Code for transations where no currency is involved - @@ -3192,7 +3192,7 @@ XXX Code for transations where no currency is involved - + @@ -5423,7 +5423,7 @@ XXX Code for transations where no currency is involved - + @@ -5434,15 +5434,11 @@ XXX Code for transations where no currency is involved - - + - - - diff --git a/make/data/cldr/common/supplemental/supplementalMetadata.xml b/make/data/cldr/common/supplemental/supplementalMetadata.xml index d80cdfa3ab9..971acfaa27b 100644 --- a/make/data/cldr/common/supplemental/supplementalMetadata.xml +++ b/make/data/cldr/common/supplemental/supplementalMetadata.xml @@ -537,6 +537,18 @@ For terms of use, see http://www.unicode.org/copyright.html + + + + + + + + + + + + @@ -1797,6 +1809,16 @@ For terms of use, see http://www.unicode.org/copyright.html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -308,6 +342,8 @@ For terms of use, see http://www.unicode.org/copyright.html + + diff --git a/make/data/cldr/common/supplemental/windowsZones.xml b/make/data/cldr/common/supplemental/windowsZones.xml index b49266ef9e3..a81d0beb83c 100644 --- a/make/data/cldr/common/supplemental/windowsZones.xml +++ b/make/data/cldr/common/supplemental/windowsZones.xml @@ -30,7 +30,6 @@ For terms of use, see http://www.unicode.org/copyright.html - @@ -49,7 +48,7 @@ For terms of use, see http://www.unicode.org/copyright.html - + @@ -75,7 +74,7 @@ For terms of use, see http://www.unicode.org/copyright.html - + @@ -97,7 +96,7 @@ For terms of use, see http://www.unicode.org/copyright.html - + @@ -133,7 +132,7 @@ For terms of use, see http://www.unicode.org/copyright.html - + @@ -421,7 +420,7 @@ For terms of use, see http://www.unicode.org/copyright.html - + @@ -538,7 +537,8 @@ For terms of use, see http://www.unicode.org/copyright.html - + + @@ -570,13 +570,12 @@ For terms of use, see http://www.unicode.org/copyright.html - - + + - @@ -710,7 +709,7 @@ For terms of use, see http://www.unicode.org/copyright.html - + diff --git a/make/devkit/createJMHBundle.sh b/make/devkit/createJMHBundle.sh index c3c97947dab..889b7f914a4 100644 --- a/make/devkit/createJMHBundle.sh +++ b/make/devkit/createJMHBundle.sh @@ -1,6 +1,6 @@ #!/bin/bash -e # -# Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ JMH_VERSION=1.37 COMMONS_MATH3_VERSION=3.6.1 JOPT_SIMPLE_VERSION=5.0.4 +MAVEN_MIRROR=${MAVEN_MIRROR:-https://repo.maven.apache.org/maven2} BUNDLE_NAME=jmh-$JMH_VERSION.tar.gz @@ -41,9 +42,9 @@ cd $JAR_DIR rm -f * fetchJar() { - url="https://repo.maven.apache.org/maven2/$1/$2/$3/$2-$3.jar" + url="${MAVEN_MIRROR}/$1/$2/$3/$2-$3.jar" if command -v curl > /dev/null; then - curl -O --fail $url + curl -OL --fail $url elif command -v wget > /dev/null; then wget $url else diff --git a/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java b/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java index 453b4a83a83..08d170b7ee6 100644 --- a/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java +++ b/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -970,7 +970,7 @@ private void addAttributes(ModuleDescription md, } if (header.moduleMainClass != null) { int attrIdx = addString(cp, Attribute.ModuleMainClass); - int targetIdx = addString(cp, header.moduleMainClass); + int targetIdx = addClassName(cp, header.moduleMainClass); attributes.put(Attribute.ModuleMainClass, new ModuleMainClass_attribute(attrIdx, targetIdx)); } diff --git a/make/modules/java.desktop/Java.gmk b/make/modules/java.desktop/Java.gmk index 66ef88dcf14..7cc9cf47034 100644 --- a/make/modules/java.desktop/Java.gmk +++ b/make/modules/java.desktop/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -23,7 +23,7 @@ # questions. # -DISABLED_WARNINGS_java += lossy-conversions this-escape +DISABLED_WARNINGS_java += dangling-doc-comments lossy-conversions this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' COPY += .gif .png .wav .txt .xml .css .pf diff --git a/make/modules/java.management/Java.gmk b/make/modules/java.management/Java.gmk index 781370b2e18..7a337946cd7 100644 --- a/make/modules/java.management/Java.gmk +++ b/make/modules/java.management/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -23,7 +23,7 @@ # questions. # -DISABLED_WARNINGS_java += this-escape +DISABLED_WARNINGS_java += dangling-doc-comments this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' diff --git a/make/modules/java.naming/Java.gmk b/make/modules/java.naming/Java.gmk index a7ade637af5..207329f5944 100644 --- a/make/modules/java.naming/Java.gmk +++ b/make/modules/java.naming/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -23,7 +23,7 @@ # questions. # -DISABLED_WARNINGS_java += this-escape +DISABLED_WARNINGS_java += dangling-doc-comments this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' diff --git a/make/modules/java.security.jgss/Java.gmk b/make/modules/java.security.jgss/Java.gmk index 781370b2e18..7a337946cd7 100644 --- a/make/modules/java.security.jgss/Java.gmk +++ b/make/modules/java.security.jgss/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -23,7 +23,7 @@ # questions. # -DISABLED_WARNINGS_java += this-escape +DISABLED_WARNINGS_java += dangling-doc-comments this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' diff --git a/make/modules/java.security.sasl/Java.gmk b/make/modules/java.security.sasl/Java.gmk index 269a1195b6a..136b311a827 100644 --- a/make/modules/java.security.sasl/Java.gmk +++ b/make/modules/java.security.sasl/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,4 +23,4 @@ # questions. # -DISABLED_WARNINGS_java += this-escape +DISABLED_WARNINGS_java += dangling-doc-comments this-escape diff --git a/make/modules/java.sql.rowset/Java.gmk b/make/modules/java.sql.rowset/Java.gmk index 2dc60515a1b..9f430a7121b 100644 --- a/make/modules/java.sql.rowset/Java.gmk +++ b/make/modules/java.sql.rowset/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -23,6 +23,8 @@ # questions. # +DISABLED_WARNINGS_java += dangling-doc-comments this-escape + DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' CLEAN_FILES += $(wildcard \ diff --git a/make/modules/java.sql/Java.gmk b/make/modules/java.sql/Java.gmk index 781370b2e18..7a337946cd7 100644 --- a/make/modules/java.sql/Java.gmk +++ b/make/modules/java.sql/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -23,7 +23,7 @@ # questions. # -DISABLED_WARNINGS_java += this-escape +DISABLED_WARNINGS_java += dangling-doc-comments this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' diff --git a/make/modules/java.xml.crypto/Java.gmk b/make/modules/java.xml.crypto/Java.gmk index 53e282aca27..9ee19c8c302 100644 --- a/make/modules/java.xml.crypto/Java.gmk +++ b/make/modules/java.xml.crypto/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -23,7 +23,7 @@ # questions. # -DISABLED_WARNINGS_java += this-escape +DISABLED_WARNINGS_java += dangling-doc-comments this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' diff --git a/make/modules/java.xml/Java.gmk b/make/modules/java.xml/Java.gmk index cf6f1753f1c..22c1dde2c2b 100644 --- a/make/modules/java.xml/Java.gmk +++ b/make/modules/java.xml/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -23,7 +23,7 @@ # questions. # -DISABLED_WARNINGS_java += lossy-conversions this-escape +DISABLED_WARNINGS_java += dangling-doc-comments lossy-conversions this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:$(call CommaList, javax.xml.catalog javax.xml.datatype \ javax.xml.transform javax.xml.validation javax.xml.xpath)' diff --git a/make/modules/jdk.accessibility/Java.gmk b/make/modules/jdk.accessibility/Java.gmk new file mode 100644 index 00000000000..fc8b2f832d7 --- /dev/null +++ b/make/modules/jdk.accessibility/Java.gmk @@ -0,0 +1,26 @@ +# +# 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. +# + +DISABLED_WARNINGS_java += dangling-doc-comments diff --git a/make/modules/jdk.crypto.cryptoki/Java.gmk b/make/modules/jdk.crypto.cryptoki/Java.gmk new file mode 100644 index 00000000000..fc8b2f832d7 --- /dev/null +++ b/make/modules/jdk.crypto.cryptoki/Java.gmk @@ -0,0 +1,26 @@ +# +# 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. +# + +DISABLED_WARNINGS_java += dangling-doc-comments diff --git a/make/modules/jdk.hotspot.agent/Java.gmk b/make/modules/jdk.hotspot.agent/Java.gmk index 52cb0c8d91a..333d28a5aa0 100644 --- a/make/modules/jdk.hotspot.agent/Java.gmk +++ b/make/modules/jdk.hotspot.agent/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -24,5 +24,5 @@ # DISABLED_WARNINGS_java += rawtypes serial cast static overrides \ - fallthrough this-escape + dangling-doc-comments fallthrough this-escape COPY += .gif .png .properties diff --git a/make/modules/jdk.internal.le/Java.gmk b/make/modules/jdk.internal.le/Java.gmk index 75d99b8d2bb..4c952b63574 100644 --- a/make/modules/jdk.internal.le/Java.gmk +++ b/make/modules/jdk.internal.le/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -23,6 +23,6 @@ # questions. # -DISABLED_WARNINGS_java += this-escape +DISABLED_WARNINGS_java += dangling-doc-comments this-escape COPY += .properties .caps .txt diff --git a/make/modules/jdk.internal.vm.ci/Java.gmk b/make/modules/jdk.internal.vm.ci/Java.gmk index 0dd5af1f3ea..6bf8ad5e74c 100644 --- a/make/modules/jdk.internal.vm.ci/Java.gmk +++ b/make/modules/jdk.internal.vm.ci/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -23,7 +23,7 @@ # questions. # -DISABLED_WARNINGS_java += this-escape +DISABLED_WARNINGS_java += dangling-doc-comments this-escape # -parameters provides method's parameters information in class file, # JVMCI compilers make use of that information for various sanity checks. diff --git a/make/modules/jdk.jdi/Java.gmk b/make/modules/jdk.jdi/Java.gmk index 2e7cf805bc0..12ec29986b9 100644 --- a/make/modules/jdk.jdi/Java.gmk +++ b/make/modules/jdk.jdi/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -23,6 +23,8 @@ # questions. # +DISABLED_WARNINGS_java += dangling-doc-comments this-escape + EXCLUDES += \ com/sun/tools/example/debug/bdi \ com/sun/tools/example/debug/event \ diff --git a/make/modules/jdk.jfr/Java.gmk b/make/modules/jdk.jfr/Java.gmk index 207256fde20..d07f9117c2d 100644 --- a/make/modules/jdk.jfr/Java.gmk +++ b/make/modules/jdk.jfr/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 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 @@ -23,6 +23,6 @@ # questions. # -DISABLED_WARNINGS_java += exports +DISABLED_WARNINGS_java += dangling-doc-comments exports COPY := .xsd .xml .dtd .ini JAVAC_FLAGS := -XDstringConcat=inline diff --git a/make/modules/jdk.security.auth/Java.gmk b/make/modules/jdk.security.auth/Java.gmk new file mode 100644 index 00000000000..fc8b2f832d7 --- /dev/null +++ b/make/modules/jdk.security.auth/Java.gmk @@ -0,0 +1,26 @@ +# +# 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. +# + +DISABLED_WARNINGS_java += dangling-doc-comments diff --git a/make/modules/jdk.zipfs/Java.gmk b/make/modules/jdk.zipfs/Java.gmk new file mode 100644 index 00000000000..0771884172f --- /dev/null +++ b/make/modules/jdk.zipfs/Java.gmk @@ -0,0 +1,27 @@ +# +# 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. +# + +DISABLED_WARNINGS_java += dangling-doc-comments + diff --git a/make/test/BuildMicrobenchmark.gmk b/make/test/BuildMicrobenchmark.gmk index bb1e6111baa..3d6ec9950d7 100644 --- a/make/test/BuildMicrobenchmark.gmk +++ b/make/test/BuildMicrobenchmark.gmk @@ -103,6 +103,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \ --add-exports java.base/jdk.internal.event=ALL-UNNAMED \ --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \ --add-exports java.base/jdk.internal.misc=ALL-UNNAMED \ + --add-exports java.base/jdk.internal.util=ALL-UNNAMED \ --add-exports java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED \ --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \ --add-exports java.base/jdk.internal.vm=ALL-UNNAMED \ diff --git a/make/test/BuildTestLib.gmk b/make/test/BuildTestLib.gmk index b4c2ab50be4..ca92d19888d 100644 --- a/make/test/BuildTestLib.gmk +++ b/make/test/BuildTestLib.gmk @@ -64,7 +64,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \ BIN := $(TEST_LIB_SUPPORT)/test-lib_classes, \ HEADERS := $(TEST_LIB_SUPPORT)/test-lib_headers, \ JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \ - DISABLED_WARNINGS := try deprecation rawtypes unchecked serial cast removal preview varargs, \ + DISABLED_WARNINGS := try deprecation rawtypes unchecked serial cast removal preview dangling-doc-comments, \ JAVAC_FLAGS := --add-exports java.base/sun.security.util=ALL-UNNAMED \ --add-exports java.base/jdk.internal.classfile=ALL-UNNAMED \ --add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \ diff --git a/src/hotspot/share/include/jvm.h b/src/hotspot/share/include/jvm.h index ac42efaa45c..b66e406bbdb 100644 --- a/src/hotspot/share/include/jvm.h +++ b/src/hotspot/share/include/jvm.h @@ -1166,9 +1166,6 @@ JVM_VirtualThreadHideFrames(JNIEnv* env, jclass clazz, jboolean hide); JNIEXPORT void JNICALL JVM_VirtualThreadDisableSuspend(JNIEnv* env, jclass clazz, jboolean enter); -JNIEXPORT void JNICALL -JVM_VirtualThreadDisableSuspend(JNIEnv* env, jobject vthread, jboolean enter); - /* * Core reflection support. */ diff --git a/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java b/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java index e13fe4c93f3..cb55932fd7e 100644 --- a/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java +++ b/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -116,11 +116,11 @@ protected int doSelect(Consumer action, long timeout) do { long startTime = timedPoll ? System.nanoTime() : 0; - long comp = Blocker.begin(blocking); + boolean attempted = Blocker.begin(blocking); try { numEntries = EPoll.wait(epfd, pollArrayAddress, NUM_EPOLLEVENTS, to); } finally { - Blocker.end(comp); + Blocker.end(attempted); } if (numEntries == IOStatus.INTERRUPTED && timedPoll) { // timed poll interrupted so need to adjust timeout diff --git a/src/java.base/macosx/classes/apple/security/AppleProvider.java b/src/java.base/macosx/classes/apple/security/AppleProvider.java index 87efda6ebb1..3f584be336b 100644 --- a/src/java.base/macosx/classes/apple/security/AppleProvider.java +++ b/src/java.base/macosx/classes/apple/security/AppleProvider.java @@ -28,7 +28,7 @@ import java.security.*; import static sun.security.util.SecurityConstants.PROVIDER_VER; -/** +/* * The Apple Security Provider. */ diff --git a/src/java.base/macosx/classes/java/net/DefaultInterface.java b/src/java.base/macosx/classes/java/net/DefaultInterface.java index 1901fcb156a..b46de34a7cc 100644 --- a/src/java.base/macosx/classes/java/net/DefaultInterface.java +++ b/src/java.base/macosx/classes/java/net/DefaultInterface.java @@ -25,6 +25,11 @@ package java.net; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.Enumeration; +import java.io.IOException; + /** * Choose a network interface to be the default for * outgoing IPv6 traffic that does not specify a scope_id (and which needs one). @@ -37,11 +42,6 @@ * that returns null. */ -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.Enumeration; -import java.io.IOException; - class DefaultInterface { private static final NetworkInterface defaultInterface = diff --git a/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java b/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java index 714be1cb5d9..6c84984f515 100644 --- a/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java +++ b/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -120,11 +120,11 @@ protected int doSelect(Consumer action, long timeout) do { long startTime = timedPoll ? System.nanoTime() : 0; - long comp = Blocker.begin(blocking); + boolean attempted = Blocker.begin(blocking); try { numEntries = KQueue.poll(kqfd, pollArrayAddress, MAX_KEVENTS, to); } finally { - Blocker.end(comp); + Blocker.end(attempted); } if (numEntries == IOStatus.INTERRUPTED && timedPoll) { // timed poll interrupted so need to adjust timeout diff --git a/src/java.base/macosx/classes/sun/nio/fs/BsdNativeDispatcher.java b/src/java.base/macosx/classes/sun/nio/fs/BsdNativeDispatcher.java index 5a7de593c63..798fed3bd12 100644 --- a/src/java.base/macosx/classes/sun/nio/fs/BsdNativeDispatcher.java +++ b/src/java.base/macosx/classes/sun/nio/fs/BsdNativeDispatcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -25,8 +25,6 @@ package sun.nio.fs; -import jdk.internal.misc.Blocker; - /** * Bsd specific system calls. */ @@ -69,13 +67,7 @@ static int clonefile(UnixPath src, UnixPath dst, int flags) { try (NativeBuffer srcBuffer = copyToNativeBuffer(src); NativeBuffer dstBuffer = copyToNativeBuffer(dst)) { - long comp = Blocker.begin(); - try { - return clonefile0(srcBuffer.address(), dstBuffer.address(), - flags); - } finally { - Blocker.end(comp); - } + return clonefile0(srcBuffer.address(), dstBuffer.address(), flags); } } private static native int clonefile0(long srcAddress, long dstAddress, @@ -90,13 +82,8 @@ static void setattrlist(UnixPath path, int commonattr, long modTime, throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - setattrlist0(buffer.address(), commonattr, modTime, accTime, - createTime, options); - } finally { - Blocker.end(comp); - } + setattrlist0(buffer.address(), commonattr, modTime, accTime, + createTime, options); } } private static native void setattrlist0(long pathAddress, int commonattr, @@ -112,13 +99,7 @@ static void fsetattrlist(int fd, int commonattr, long modTime, long accTime, long createTime, long options) throws UnixException { - long comp = Blocker.begin(); - try { - fsetattrlist0(fd, commonattr, modTime, accTime, - createTime, options); - } finally { - Blocker.end(comp); - } + fsetattrlist0(fd, commonattr, modTime, accTime, createTime, options); } private static native void fsetattrlist0(int fd, int commonattr, long modTime, long accTime, diff --git a/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java b/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java index eba7f577fe1..863ec6e077b 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java @@ -43,7 +43,7 @@ import jdk.internal.util.StaticProperty; import sun.security.action.GetPropertyAction; -/** +/* * The "SunJCE" Cryptographic Service Provider. * * @author Jan Luehe diff --git a/src/java.base/share/classes/java/io/ByteArrayOutputStream.java b/src/java.base/share/classes/java/io/ByteArrayOutputStream.java index 109acce3853..8f5ff41957e 100644 --- a/src/java.base/share/classes/java/io/ByteArrayOutputStream.java +++ b/src/java.base/share/classes/java/io/ByteArrayOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -159,8 +159,16 @@ public void writeBytes(byte[] b) { * @throws NullPointerException if {@code out} is {@code null}. * @throws IOException if an I/O error occurs. */ - public synchronized void writeTo(OutputStream out) throws IOException { - out.write(buf, 0, count); + public void writeTo(OutputStream out) throws IOException { + if (Thread.currentThread().isVirtual()) { + byte[] bytes; + synchronized (this) { + bytes = Arrays.copyOf(buf, count); + } + out.write(bytes); + } else synchronized (this) { + out.write(buf, 0, count); + } } /** diff --git a/src/java.base/share/classes/java/io/FileDescriptor.java b/src/java.base/share/classes/java/io/FileDescriptor.java index c7e638a1675..bdab57c0996 100644 --- a/src/java.base/share/classes/java/io/FileDescriptor.java +++ b/src/java.base/share/classes/java/io/FileDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -207,11 +207,11 @@ public boolean valid() { * @since 1.1 */ public void sync() throws SyncFailedException { - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(); try { sync0(); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } diff --git a/src/java.base/share/classes/java/io/FileInputStream.java b/src/java.base/share/classes/java/io/FileInputStream.java index 1a41048b578..1ed2eb05d37 100644 --- a/src/java.base/share/classes/java/io/FileInputStream.java +++ b/src/java.base/share/classes/java/io/FileInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -27,7 +27,6 @@ import java.nio.channels.FileChannel; import java.util.Arrays; -import jdk.internal.misc.Blocker; import jdk.internal.util.ArraysSupport; import sun.nio.ch.FileChannelImpl; @@ -210,12 +209,7 @@ public FileInputStream(FileDescriptor fdObj) { * @param name the name of the file */ private void open(String name) throws FileNotFoundException { - long comp = Blocker.begin(); - try { - open0(name); - } finally { - Blocker.end(comp); - } + open0(name); } /** @@ -228,12 +222,7 @@ private void open(String name) throws FileNotFoundException { */ @Override public int read() throws IOException { - long comp = Blocker.begin(); - try { - return read0(); - } finally { - Blocker.end(comp); - } + return read0(); } private native int read0() throws IOException; @@ -260,12 +249,7 @@ public int read() throws IOException { */ @Override public int read(byte[] b) throws IOException { - long comp = Blocker.begin(); - try { - return readBytes(b, 0, b.length); - } finally { - Blocker.end(comp); - } + return readBytes(b, 0, b.length); } /** @@ -284,12 +268,7 @@ public int read(byte[] b) throws IOException { */ @Override public int read(byte[] b, int off, int len) throws IOException { - long comp = Blocker.begin(); - try { - return readBytes(b, off, len); - } finally { - Blocker.end(comp); - } + return readBytes(b, off, len); } @Override @@ -396,22 +375,12 @@ public long transferTo(OutputStream out) throws IOException { } private long length() throws IOException { - long comp = Blocker.begin(); - try { - return length0(); - } finally { - Blocker.end(comp); - } + return length0(); } private native long length0() throws IOException; private long position() throws IOException { - long comp = Blocker.begin(); - try { - return position0(); - } finally { - Blocker.end(comp); - } + return position0(); } private native long position0() throws IOException; @@ -441,12 +410,7 @@ private long position() throws IOException { */ @Override public long skip(long n) throws IOException { - long comp = Blocker.begin(); - try { - return skip0(n); - } finally { - Blocker.end(comp); - } + return skip0(n); } private native long skip0(long n) throws IOException; @@ -470,12 +434,7 @@ public long skip(long n) throws IOException { */ @Override public int available() throws IOException { - long comp = Blocker.begin(); - try { - return available0(); - } finally { - Blocker.end(comp); - } + return available0(); } private native int available0() throws IOException; @@ -566,8 +525,8 @@ public FileChannel getChannel() { synchronized (this) { fc = this.channel; if (fc == null) { - this.channel = fc = FileChannelImpl.open(fd, path, true, - false, false, this); + fc = FileChannelImpl.open(fd, path, true, false, false, false, this); + this.channel = fc; if (closed) { try { // possible race with close(), benign since diff --git a/src/java.base/share/classes/java/io/FileOutputStream.java b/src/java.base/share/classes/java/io/FileOutputStream.java index c939ab543c4..2b017080a11 100644 --- a/src/java.base/share/classes/java/io/FileOutputStream.java +++ b/src/java.base/share/classes/java/io/FileOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -28,7 +28,6 @@ import java.nio.channels.FileChannel; import jdk.internal.access.SharedSecrets; import jdk.internal.access.JavaIOFileDescriptorAccess; -import jdk.internal.misc.Blocker; import sun.nio.ch.FileChannelImpl; @@ -286,12 +285,7 @@ private native void open0(String name, boolean append) * @param append whether the file is to be opened in append mode */ private void open(String name, boolean append) throws FileNotFoundException { - long comp = Blocker.begin(); - try { - open0(name, append); - } finally { - Blocker.end(comp); - } + open0(name, append); } /** @@ -313,12 +307,7 @@ private void open(String name, boolean append) throws FileNotFoundException { @Override public void write(int b) throws IOException { boolean append = FD_ACCESS.getAppend(fd); - long comp = Blocker.begin(); - try { - write(b, append); - } finally { - Blocker.end(comp); - } + write(b, append); } /** @@ -343,12 +332,7 @@ private native void writeBytes(byte[] b, int off, int len, boolean append) @Override public void write(byte[] b) throws IOException { boolean append = FD_ACCESS.getAppend(fd); - long comp = Blocker.begin(); - try { - writeBytes(b, 0, b.length, append); - } finally { - Blocker.end(comp); - } + writeBytes(b, 0, b.length, append); } /** @@ -364,12 +348,7 @@ public void write(byte[] b) throws IOException { @Override public void write(byte[] b, int off, int len) throws IOException { boolean append = FD_ACCESS.getAppend(fd); - long comp = Blocker.begin(); - try { - writeBytes(b, off, len, append); - } finally { - Blocker.end(comp); - } + writeBytes(b, off, len, append); } /** @@ -460,8 +439,8 @@ public FileChannel getChannel() { synchronized (this) { fc = this.channel; if (fc == null) { - this.channel = fc = FileChannelImpl.open(fd, path, false, - true, false, this); + fc = FileChannelImpl.open(fd, path, false, true, false, false, this); + this.channel = fc; if (closed) { try { // possible race with close(), benign since diff --git a/src/java.base/share/classes/java/io/FilePermission.java b/src/java.base/share/classes/java/io/FilePermission.java index 7c07c608171..808c4293143 100644 --- a/src/java.base/share/classes/java/io/FilePermission.java +++ b/src/java.base/share/classes/java/io/FilePermission.java @@ -1231,12 +1231,10 @@ public Enumeration elements() { new ObjectStreamField("permissions", Vector.class), }; - /** - * @serialData "permissions" field (a Vector containing the FilePermissions). - */ /** * Writes the contents of the perms field out as a Vector for * serialization compatibility with earlier releases. + * @serialData "permissions" field (a Vector containing the FilePermissions). * * @param out the {@code ObjectOutputStream} to which data is written * @throws IOException if an I/O error occurs diff --git a/src/java.base/share/classes/java/io/ObjectOutputStream.java b/src/java.base/share/classes/java/io/ObjectOutputStream.java index dbc4b365944..dff50fd7be7 100644 --- a/src/java.base/share/classes/java/io/ObjectOutputStream.java +++ b/src/java.base/share/classes/java/io/ObjectOutputStream.java @@ -1033,7 +1033,7 @@ public PutField() {} * calling the {@link java.io.ObjectOutputStream#writeFields()} * method. */ - @Deprecated + @Deprecated(forRemoval = true, since = "1.4") public abstract void write(ObjectOutput out) throws IOException; } diff --git a/src/java.base/share/classes/java/io/ObjectStreamConstants.java b/src/java.base/share/classes/java/io/ObjectStreamConstants.java index d8ebbd23e73..4f06ba7f89e 100644 --- a/src/java.base/share/classes/java/io/ObjectStreamConstants.java +++ b/src/java.base/share/classes/java/io/ObjectStreamConstants.java @@ -139,7 +139,7 @@ public interface ObjectStreamConstants { static final int baseWireHandle = 0x7e0000; - /******************************************************/ + /* ****************************************************/ /* Bit masks for ObjectStreamClass flag.*/ /** diff --git a/src/java.base/share/classes/java/io/RandomAccessFile.java b/src/java.base/share/classes/java/io/RandomAccessFile.java index 5a1c87eb1f7..ee7b90ea71a 100644 --- a/src/java.base/share/classes/java/io/RandomAccessFile.java +++ b/src/java.base/share/classes/java/io/RandomAccessFile.java @@ -71,6 +71,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { private final FileDescriptor fd; private final boolean rw; + private final boolean sync; // O_SYNC or O_DSYNC /** * The path of the referenced file @@ -229,21 +230,25 @@ private RandomAccessFile(File file, String mode, boolean openAndDelete) int imode = -1; boolean rw = false; + boolean sync = false; if (mode.equals("r")) imode = O_RDONLY; else if (mode.startsWith("rw")) { imode = O_RDWR; rw = true; if (mode.length() > 2) { - if (mode.equals("rws")) + if (mode.equals("rws")) { imode |= O_SYNC; - else if (mode.equals("rwd")) + sync = true; + } else if (mode.equals("rwd")) { imode |= O_DSYNC; - else + sync = true; + } else imode = -1; } } this.rw = rw; + this.sync = sync; if (openAndDelete) imode |= O_TEMPORARY; @@ -308,8 +313,8 @@ public final FileChannel getChannel() { synchronized (this) { fc = this.channel; if (fc == null) { - this.channel = fc = FileChannelImpl.open(fd, path, true, - rw, false, this); + fc = FileChannelImpl.open(fd, path, true, rw, sync, false, this); + this.channel = fc; if (closed) { try { fc.close(); @@ -350,12 +355,7 @@ private native void open0(String name, int mode) * defined above */ private void open(String name, int mode) throws FileNotFoundException { - long comp = Blocker.begin(); - try { - open0(name, mode); - } finally { - Blocker.end(comp); - } + open0(name, mode); } // 'Read' primitives @@ -376,12 +376,7 @@ private void open(String name, int mode) throws FileNotFoundException { * end-of-file has been reached. */ public int read() throws IOException { - long comp = Blocker.begin(); - try { - return read0(); - } finally { - Blocker.end(comp); - } + return read0(); } private native int read0() throws IOException; @@ -394,12 +389,7 @@ public int read() throws IOException { * @throws IOException If an I/O error has occurred. */ private int readBytes(byte[] b, int off, int len) throws IOException { - long comp = Blocker.begin(); - try { - return readBytes0(b, off, len); - } finally { - Blocker.end(comp); - } + return readBytes0(b, off, len); } private native int readBytes0(byte[] b, int off, int len) throws IOException; @@ -547,11 +537,11 @@ public int skipBytes(int n) throws IOException { * @throws IOException if an I/O error occurs. */ public void write(int b) throws IOException { - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(sync); try { write0(b); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } @@ -566,11 +556,11 @@ public void write(int b) throws IOException { * @throws IOException If an I/O error has occurred. */ private void writeBytes(byte[] b, int off, int len) throws IOException { - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(sync); try { writeBytes0(b, off, len); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } @@ -630,12 +620,7 @@ public void seek(long pos) throws IOException { if (pos < 0) { throw new IOException("Negative seek offset"); } - long comp = Blocker.begin(); - try { - seek0(pos); - } finally { - Blocker.end(comp); - } + seek0(pos); } private native void seek0(long pos) throws IOException; @@ -647,12 +632,7 @@ public void seek(long pos) throws IOException { * @throws IOException if an I/O error occurs. */ public long length() throws IOException { - long comp = Blocker.begin(); - try { - return length0(); - } finally { - Blocker.end(comp); - } + return length0(); } private native long length0() throws IOException; @@ -684,12 +664,7 @@ public long length() throws IOException { * @since 1.2 */ public void setLength(long newLength) throws IOException { - long comp = Blocker.begin(); - try { - setLength0(newLength); - } finally { - Blocker.end(comp); - } + setLength0(newLength); } private native void setLength0(long newLength) throws IOException; diff --git a/src/java.base/share/classes/java/io/Serializable.java b/src/java.base/share/classes/java/io/Serializable.java index 07836c38e58..cf04ba2e60c 100644 --- a/src/java.base/share/classes/java/io/Serializable.java +++ b/src/java.base/share/classes/java/io/Serializable.java @@ -68,7 +68,7 @@ * *
  * private void writeObject(java.io.ObjectOutputStream out)
- *     throws IOException
+ *     throws IOException;
  * private void readObject(java.io.ObjectInputStream in)
  *     throws IOException, ClassNotFoundException;
  * private void readObjectNoData()
diff --git a/src/java.base/share/classes/java/lang/FdLibm.java b/src/java.base/share/classes/java/lang/FdLibm.java
index dd79ee82863..70d728a16db 100644
--- a/src/java.base/share/classes/java/lang/FdLibm.java
+++ b/src/java.base/share/classes/java/lang/FdLibm.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -3005,7 +3005,6 @@ static double compute(double x) {
 
             hx  = __HI(x);  // high word of x
             xsb = hx & SIGN_BIT;                 // sign bit of x
-            y = Math.abs(x);
             hx &= EXP_SIGNIF_BITS;               // high word of |x|
 
             // filter out huge and non-finite argument
diff --git a/src/java.base/share/classes/java/lang/Object.java b/src/java.base/share/classes/java/lang/Object.java
index 74b9d90b0ae..3ba5347ab8b 100644
--- a/src/java.base/share/classes/java/lang/Object.java
+++ b/src/java.base/share/classes/java/lang/Object.java
@@ -374,16 +374,21 @@ public final void wait() throws InterruptedException {
      * @see    #wait(long, int)
      */
     public final void wait(long timeoutMillis) throws InterruptedException {
-        long comp = Blocker.begin();
+        if (!Thread.currentThread().isVirtual()) {
+            wait0(timeoutMillis);
+            return;
+        }
+
+        // virtual thread waiting
+        boolean attempted = Blocker.begin();
         try {
             wait0(timeoutMillis);
         } catch (InterruptedException e) {
-            Thread thread = Thread.currentThread();
-            if (thread.isVirtual())
-                thread.getAndClearInterrupt();
+            // virtual thread's interrupt status needs to be cleared
+            Thread.currentThread().getAndClearInterrupt();
             throw e;
         } finally {
-            Blocker.end(comp);
+            Blocker.end(attempted);
         }
     }
 
diff --git a/src/java.base/share/classes/java/lang/Process.java b/src/java.base/share/classes/java/lang/Process.java
index 5b926e35729..f9762ffbcdb 100644
--- a/src/java.base/share/classes/java/lang/Process.java
+++ b/src/java.base/share/classes/java/lang/Process.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -25,6 +25,7 @@
 
 package java.lang;
 
+import jdk.internal.misc.Blocker;
 import jdk.internal.util.StaticProperty;
 
 import java.io.*;
@@ -839,6 +840,75 @@ public long skip(long n) throws IOException {
 
             return n - remaining;
         }
+
+        @Override
+        public int read() throws IOException {
+            boolean attempted = Blocker.begin();
+            try {
+                return super.read();
+            } finally {
+                Blocker.end(attempted);
+            }
+        }
+
+        @Override
+        public int read(byte[] b) throws IOException {
+            boolean attempted = Blocker.begin();
+            try {
+                return super.read(b);
+            } finally {
+                Blocker.end(attempted);
+            }
+        }
+
+        @Override
+        public int read(byte[] b, int off, int len) throws IOException {
+            boolean attempted = Blocker.begin();
+            try {
+                return super.read(b, off, len);
+            } finally {
+                Blocker.end(attempted);
+            }
+        }
+    }
+
+    /**
+     * An output stream for a subprocess pipe.
+     */
+    static class PipeOutputStream extends FileOutputStream {
+        PipeOutputStream(FileDescriptor fd) {
+            super(fd);
+        }
+
+        @Override
+        public void write(int b) throws IOException {
+            boolean attempted = Blocker.begin();
+            try {
+                super.write(b);
+            } finally {
+                Blocker.end(attempted);
+            }
+        }
+
+        @Override
+        public void write(byte[] b) throws IOException {
+            boolean attempted = Blocker.begin();
+            try {
+                super.write(b);
+            } finally {
+                Blocker.end(attempted);
+            }
+        }
+
+        @Override
+        public void write(byte[] b, int off, int len) throws IOException {
+            boolean attempted = Blocker.begin();
+            try {
+                super.write(b, off, len);
+            } finally {
+                Blocker.end(attempted);
+            }
+        }
     }
 
     /**
diff --git a/src/java.base/share/classes/java/lang/System.java b/src/java.base/share/classes/java/lang/System.java
index b668a1697b7..a24689e57fb 100644
--- a/src/java.base/share/classes/java/lang/System.java
+++ b/src/java.base/share/classes/java/lang/System.java
@@ -72,6 +72,7 @@
 import java.util.stream.Stream;
 
 import jdk.internal.logger.LoggerFinderLoader.TemporaryLoggerFinder;
+import jdk.internal.misc.Blocker;
 import jdk.internal.misc.CarrierThreadLocal;
 import jdk.internal.misc.Unsafe;
 import jdk.internal.util.StaticProperty;
@@ -2191,9 +2192,9 @@ private static void initPhase1() {
 
         lineSeparator = props.getProperty("line.separator");
 
-        FileInputStream fdIn = new FileInputStream(FileDescriptor.in);
-        FileOutputStream fdOut = new FileOutputStream(FileDescriptor.out);
-        FileOutputStream fdErr = new FileOutputStream(FileDescriptor.err);
+        FileInputStream fdIn = new In(FileDescriptor.in);
+        FileOutputStream fdOut = new Out(FileDescriptor.out);
+        FileOutputStream fdErr = new Out(FileDescriptor.err);
         initialIn = new BufferedInputStream(fdIn);
         setIn0(initialIn);
         // stdout/err.encoding are set when the VM is associated with the terminal,
@@ -2218,6 +2219,83 @@ private static void initPhase1() {
         VM.initLevel(1);
     }
 
+    /**
+     * System.in.
+     */
+    private static class In extends FileInputStream {
+        In(FileDescriptor fd) {
+            super(fd);
+        }
+
+        @Override
+        public int read() throws IOException {
+            boolean attempted = Blocker.begin();
+            try {
+                return super.read();
+            } finally {
+                Blocker.end(attempted);
+            }
+        }
+
+        @Override
+        public int read(byte[] b) throws IOException {
+            boolean attempted = Blocker.begin();
+            try {
+                return super.read(b);
+            } finally {
+                Blocker.end(attempted);
+            }
+        }
+
+        @Override
+        public int read(byte[] b, int off, int len) throws IOException {
+            boolean attempted = Blocker.begin();
+            try {
+                return super.read(b, off, len);
+            } finally {
+                Blocker.end(attempted);
+            }
+        }
+    }
+
+    /**
+     * System.out/System.err wrap this output stream.
+     */
+    private static class Out extends FileOutputStream {
+        Out(FileDescriptor fd) {
+            super(fd);
+        }
+
+        public void write(int b) throws IOException {
+            boolean attempted = Blocker.begin();
+            try {
+                super.write(b);
+            } finally {
+                Blocker.end(attempted);
+            }
+        }
+
+        @Override
+        public void write(byte[] b) throws IOException {
+            boolean attempted = Blocker.begin();
+            try {
+                super.write(b);
+            } finally {
+                Blocker.end(attempted);
+            }
+        }
+
+        @Override
+        public void write(byte[] b, int off, int len) throws IOException {
+            boolean attempted = Blocker.begin();
+            try {
+                super.write(b, off, len);
+            } finally {
+                Blocker.end(attempted);
+            }
+        }
+    }
+
     // @see #initPhase2()
     static ModuleLayer bootLayer;
 
diff --git a/src/java.base/share/classes/java/lang/VirtualThread.java b/src/java.base/share/classes/java/lang/VirtualThread.java
index 8e14c829d37..40469f2b8d6 100644
--- a/src/java.base/share/classes/java/lang/VirtualThread.java
+++ b/src/java.base/share/classes/java/lang/VirtualThread.java
@@ -466,6 +466,11 @@ private boolean yieldContinuation() {
     private void afterYield() {
         assert carrierThread == null;
 
+        // re-adjust parallelism if the virtual thread yielded when compensating
+        if (currentThread() instanceof CarrierThread ct) {
+            ct.endBlocking();
+        }
+
         int s = state();
 
         // LockSupport.park/parkNanos
@@ -1186,9 +1191,6 @@ private void setCarrierThread(Thread carrier) {
     @IntrinsicCandidate
     private static native void notifyJvmtiDisableSuspend(boolean enter);
 
-    @IntrinsicCandidate
-    private native void notifyJvmtiDisableSuspend(boolean enter);
-
     private static native void registerNatives();
     static {
         registerNatives();
diff --git a/src/java.base/share/classes/java/lang/classfile/BufWriter.java b/src/java.base/share/classes/java/lang/classfile/BufWriter.java
index bab8ebda4b8..f178b6b2db0 100644
--- a/src/java.base/share/classes/java/lang/classfile/BufWriter.java
+++ b/src/java.base/share/classes/java/lang/classfile/BufWriter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -124,6 +124,7 @@ public sealed interface BufWriter
      * @param arr the byte array
      * @param start the offset within the byte array of the range
      * @param length the length of the range
+     * @throws IndexOutOfBoundsException if range is outside of the array bounds
      */
     void writeBytes(byte[] arr, int start, int length);
 
@@ -134,6 +135,7 @@ public sealed interface BufWriter
      * @param offset the offset at which to patch
      * @param size the size of the integer value being written, in bytes
      * @param value the integer value
+     * @throws IndexOutOfBoundsException if patched int is outside of bounds
      */
     void patchInt(int offset, int size, int value);
 
@@ -152,7 +154,7 @@ public sealed interface BufWriter
      * to the buffer
      *
      * @param entry the constant pool entry
-     * @throws NullPointerException if the entry is null
+     * @throws IllegalArgumentException if the entry has invalid index
      */
     void writeIndex(PoolEntry entry);
 
@@ -161,6 +163,7 @@ public sealed interface BufWriter
      * to the buffer, or zero if the entry is null
      *
      * @param entry the constant pool entry
+     * @throws IllegalArgumentException if the entry has invalid index
      */
     void writeIndexOrZero(PoolEntry entry);
 
@@ -180,6 +183,7 @@ public sealed interface BufWriter
      * entry in the list.
      *
      * @param list the list of entries
+     * @throws IllegalArgumentException if any entry has invalid index
      */
     void writeListIndices(List list);
 
@@ -199,6 +203,7 @@ public sealed interface BufWriter
      * @param array the byte array
      * @param bufferOffset the offset into the array at which to write the
      *                     contents of the buffer
+     * @throws IndexOutOfBoundsException if copying outside of the array bounds
      */
     void copyTo(byte[] array, int bufferOffset);
 }
diff --git a/src/java.base/share/classes/java/lang/classfile/ClassFile.java b/src/java.base/share/classes/java/lang/classfile/ClassFile.java
index 39ace9e2ac8..32edc3c680a 100644
--- a/src/java.base/share/classes/java/lang/classfile/ClassFile.java
+++ b/src/java.base/share/classes/java/lang/classfile/ClassFile.java
@@ -1478,9 +1478,6 @@ default List verify(Path path) throws IOException {
     /** The class major version of JAVA_22. */
     int JAVA_22_VERSION = 66;
 
-    /** 67 */
-    int JAVA_23_VERSION = 67;
-
     /**
      * The class major version of JAVA_23.
      * @since 23
diff --git a/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java b/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java
index 544d7322c1c..e954be079fa 100644
--- a/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java
+++ b/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java
@@ -212,8 +212,7 @@ default CodeBuilder block(Consumer handler) {
         child.start();
         handler.accept(child);
         child.end();
-        labelBinding(breakLabel);
-        return this;
+        return labelBinding(breakLabel);
     }
 
     /**
@@ -253,12 +252,11 @@ default CodeBuilder ifThen(Opcode opcode,
 
         Label breakLabel = newLabel();
         BlockCodeBuilderImpl thenBlock = new BlockCodeBuilderImpl(this, breakLabel);
-        branchInstruction(BytecodeHelpers.reverseBranchOpcode(opcode), thenBlock.endLabel());
+        branch(BytecodeHelpers.reverseBranchOpcode(opcode), thenBlock.endLabel());
         thenBlock.start();
         thenHandler.accept(thenBlock);
         thenBlock.end();
-        labelBinding(breakLabel);
-        return this;
+        return labelBinding(breakLabel);
     }
 
     /**
@@ -305,17 +303,16 @@ default CodeBuilder ifThenElse(Opcode opcode,
         Label breakLabel = newLabel();
         BlockCodeBuilderImpl thenBlock = new BlockCodeBuilderImpl(this, breakLabel);
         BlockCodeBuilderImpl elseBlock = new BlockCodeBuilderImpl(this, breakLabel);
-        branchInstruction(BytecodeHelpers.reverseBranchOpcode(opcode), elseBlock.startLabel());
+        branch(BytecodeHelpers.reverseBranchOpcode(opcode), elseBlock.startLabel());
         thenBlock.start();
         thenHandler.accept(thenBlock);
         if (thenBlock.reachable())
-            thenBlock.branchInstruction(Opcode.GOTO, thenBlock.breakLabel());
+            thenBlock.branch(Opcode.GOTO, thenBlock.breakLabel());
         thenBlock.end();
         elseBlock.start();
         elseHandler.accept(elseBlock);
         elseBlock.end();
-        labelBinding(breakLabel);
-        return this;
+        return labelBinding(breakLabel);
     }
 
     /**
@@ -416,10 +413,10 @@ default CodeBuilder trying(Consumer tryHandler,
      * @param tk the load type
      * @param slot the local variable slot
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder loadInstruction(TypeKind tk, int slot) {
-        with(LoadInstruction.of(tk, slot));
-        return this;
+    default CodeBuilder loadLocal(TypeKind tk, int slot) {
+        return with(LoadInstruction.of(tk, slot));
     }
 
     /**
@@ -427,21 +424,10 @@ default CodeBuilder loadInstruction(TypeKind tk, int slot) {
      * @param tk the store type
      * @param slot the local variable slot
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder storeInstruction(TypeKind tk, int slot) {
-        with(StoreInstruction.of(tk, slot));
-        return this;
-    }
-
-    /**
-     * Generate an instruction to increment a local variable by a constant
-     * @param slot the local variable slot
-     * @param val the increment value
-     * @return this builder
-     */
-    default CodeBuilder incrementInstruction(int slot, int val) {
-        with(IncrementInstruction.of(slot, val));
-        return this;
+    default CodeBuilder storeLocal(TypeKind tk, int slot) {
+        return with(StoreInstruction.of(tk, slot));
     }
 
     /**
@@ -450,53 +436,20 @@ default CodeBuilder incrementInstruction(int slot, int val) {
      * @param op the branch opcode
      * @param target the branch target
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder branchInstruction(Opcode op, Label target) {
-        with(BranchInstruction.of(op, target));
-        return this;
-    }
-
-    /**
-     * Generate an instruction to access a jump table by key match and jump
-     * @param defaultTarget the default jump target
-     * @param cases the switch cases
-     * @return this builder
-     */
-    default CodeBuilder lookupSwitchInstruction(Label defaultTarget, List cases) {
-        with(LookupSwitchInstruction.of(defaultTarget, cases));
-        return this;
-    }
-
-    /**
-     * Generate an instruction to access a jump table by index and jump
-     * @param lowValue the low key value
-     * @param highValue the high key value
-     * @param defaultTarget the default jump target
-     * @param cases the switch cases
-     * @return this builder
-     */
-    default CodeBuilder tableSwitchInstruction(int lowValue, int highValue, Label defaultTarget, List cases) {
-        with(TableSwitchInstruction.of(lowValue, highValue, defaultTarget, cases));
-        return this;
+    default CodeBuilder branch(Opcode op, Label target) {
+        return with(BranchInstruction.of(op, target));
     }
 
     /**
      * Generate return instruction
      * @param tk the return type
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder returnInstruction(TypeKind tk) {
-        with(ReturnInstruction.of(tk));
-        return this;
-    }
-
-    /**
-     * Generate an instruction to throw an exception or error
-     * @return this builder
-     */
-    default CodeBuilder throwInstruction() {
-        with(ThrowInstruction.of());
-        return this;
+    default CodeBuilder return_(TypeKind tk) {
+        return with(ReturnInstruction.of(tk));
     }
 
     /**
@@ -505,10 +458,10 @@ default CodeBuilder throwInstruction() {
      * @param opcode the field access opcode
      * @param ref the field reference
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder fieldInstruction(Opcode opcode, FieldRefEntry ref) {
-        with(FieldInstruction.of(opcode, ref));
-        return this;
+    default CodeBuilder fieldAccess(Opcode opcode, FieldRefEntry ref) {
+        return with(FieldInstruction.of(opcode, ref));
     }
 
     /**
@@ -519,9 +472,10 @@ default CodeBuilder fieldInstruction(Opcode opcode, FieldRefEntry ref) {
      * @param name the field name
      * @param type the field type
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder fieldInstruction(Opcode opcode, ClassDesc owner, String name, ClassDesc type) {
-        return fieldInstruction(opcode, constantPool().fieldRefEntry(owner, name, type));
+    default CodeBuilder fieldAccess(Opcode opcode, ClassDesc owner, String name, ClassDesc type) {
+        return fieldAccess(opcode, constantPool().fieldRefEntry(owner, name, type));
     }
 
     /**
@@ -530,8 +484,9 @@ default CodeBuilder fieldInstruction(Opcode opcode, ClassDesc owner, String name
      * @param opcode the invoke opcode
      * @param ref the interface method or method reference
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder invokeInstruction(Opcode opcode, MemberRefEntry ref) {
+    default CodeBuilder invoke(Opcode opcode, MemberRefEntry ref) {
         return with(InvokeInstruction.of(opcode, ref));
     }
 
@@ -544,191 +499,101 @@ default CodeBuilder invokeInstruction(Opcode opcode, MemberRefEntry ref) {
      * @param desc the method type
      * @param isInterface the interface method invocation indication
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder invokeInstruction(Opcode opcode, ClassDesc owner, String name, MethodTypeDesc desc, boolean isInterface) {
-        return invokeInstruction(opcode,
+    default CodeBuilder invoke(Opcode opcode, ClassDesc owner, String name, MethodTypeDesc desc, boolean isInterface) {
+        return invoke(opcode,
                 isInterface ? constantPool().interfaceMethodRefEntry(owner, name, desc)
                             : constantPool().methodRefEntry(owner, name, desc));
     }
 
-    /**
-     * Generate an instruction to invoke a dynamically-computed call site
-     * @param ref the dynamic call site
-     * @return this builder
-     */
-    default CodeBuilder invokeDynamicInstruction(InvokeDynamicEntry ref) {
-        with(InvokeDynamicInstruction.of(ref));
-        return this;
-    }
-
-    /**
-     * Generate an instruction to invoke a dynamically-computed call site
-     * @param desc the dynamic call site
-     * @return this builder
-     */
-    default CodeBuilder invokeDynamicInstruction(DynamicCallSiteDesc desc) {
-        MethodHandleEntry bsMethod = handleDescToHandleInfo(constantPool(), (DirectMethodHandleDesc) desc.bootstrapMethod());
-        var cpArgs = desc.bootstrapArgs();
-        List bsArguments = new ArrayList<>(cpArgs.length);
-        for (var constantValue : cpArgs) {
-            bsArguments.add(BytecodeHelpers.constantEntry(constantPool(), constantValue));
-        }
-        BootstrapMethodEntry bm = constantPool().bsmEntry(bsMethod, bsArguments);
-        NameAndTypeEntry nameAndType = constantPool().nameAndTypeEntry(desc.invocationName(), desc.invocationType());
-        invokeDynamicInstruction(constantPool().invokeDynamicEntry(bm, nameAndType));
-        return this;
-    }
-
-    /**
-     * Generate an instruction to create a new object
-     * @param type the object type
-     * @return this builder
-     */
-    default CodeBuilder newObjectInstruction(ClassEntry type) {
-        with(NewObjectInstruction.of(type));
-        return this;
-    }
-
-    /**
-     * Generate an instruction to create a new object
-     * @param type the object type
-     * @return this builder
-     * @throws IllegalArgumentException if {@code type} represents a primitive type
-     */
-    default CodeBuilder newObjectInstruction(ClassDesc type) {
-        return newObjectInstruction(constantPool().classEntry(type));
-    }
-
-    /**
-     * Generate an instruction to create a new array of a primitive type
-     * @param typeKind the primitive component type
-     * @return this builder
-     */
-    default CodeBuilder newPrimitiveArrayInstruction(TypeKind typeKind) {
-        with(NewPrimitiveArrayInstruction.of(typeKind));
-        return this;
-    }
-
-    /**
-     * Generate an instruction to create a new array of reference
-     * @param type the component type
-     * @return this builder
-     */
-    default CodeBuilder newReferenceArrayInstruction(ClassEntry type) {
-        with(NewReferenceArrayInstruction.of(type));
-        return this;
-    }
-
-    /**
-     * Generate an instruction to create a new array of reference
-     * @param type the component type
-     * @return this builder
-     * @throws IllegalArgumentException if {@code type} represents a primitive type
-     */
-    default CodeBuilder newReferenceArrayInstruction(ClassDesc type) {
-        return newReferenceArrayInstruction(constantPool().classEntry(type));
-    }
-
-    /**
-     * Generate an instruction to create a new multidimensional array
-     * @param dimensions the number of dimensions
-     * @param type the array type
-     * @return this builder
-     */
-    default CodeBuilder newMultidimensionalArrayInstruction(int dimensions,
-                                                            ClassEntry type) {
-        with(NewMultiArrayInstruction.of(type, dimensions));
-        return this;
-    }
-
-    /**
-     * Generate an instruction to create a new multidimensional array
-     * @param dimensions the number of dimensions
-     * @param type the array type
-     * @return this builder
-     */
-    default CodeBuilder newMultidimensionalArrayInstruction(int dimensions,
-                                                            ClassDesc type) {
-        return newMultidimensionalArrayInstruction(dimensions, constantPool().classEntry(type));
-    }
-
     /**
      * Generate an instruction to load from an array
      * @param tk the array element type
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder arrayLoadInstruction(TypeKind tk) {
+    default CodeBuilder arrayLoad(TypeKind tk) {
         Opcode opcode = BytecodeHelpers.arrayLoadOpcode(tk);
-        with(ArrayLoadInstruction.of(opcode));
-        return this;
+        return with(ArrayLoadInstruction.of(opcode));
     }
 
     /**
      * Generate an instruction to store into an array
      * @param tk the array element type
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder arrayStoreInstruction(TypeKind tk) {
+    default CodeBuilder arrayStore(TypeKind tk) {
         Opcode opcode = BytecodeHelpers.arrayStoreOpcode(tk);
-        with(ArrayStoreInstruction.of(opcode));
-        return this;
-    }
-
-    /**
-     * Generate a type checking instruction
-     * @see Opcode.Kind#TYPE_CHECK
-     * @param opcode the type check instruction opcode
-     * @param type the type
-     * @return this builder
-     */
-    default CodeBuilder typeCheckInstruction(Opcode opcode,
-                                             ClassEntry type) {
-        with(TypeCheckInstruction.of(opcode, type));
-        return this;
-    }
-
-    /**
-     * Generate a type checking instruction
-     * @see Opcode.Kind#TYPE_CHECK
-     * @param opcode the type check instruction opcode
-     * @param type the type
-     * @return this builder
-     */
-    default CodeBuilder typeCheckInstruction(Opcode opcode, ClassDesc type) {
-        return typeCheckInstruction(opcode, constantPool().classEntry(type));
+        return with(ArrayStoreInstruction.of(opcode));
     }
 
     /**
-     * Generate a type converting instruction
+     * Generate instruction(s) to convert {@code fromType} to {@code toType}
      * @param fromType the source type
      * @param toType the target type
      * @return this builder
-     */
-    default CodeBuilder convertInstruction(TypeKind fromType, TypeKind toType) {
-        with(ConvertInstruction.of(fromType, toType));
-        return this;
-    }
-
-    /**
-     * Generate a stack manipulating instruction
-     * @param opcode the stack instruction opcode
-     * @see Opcode.Kind#STACK
-     * @return this builder
-     */
-    default CodeBuilder stackInstruction(Opcode opcode) {
-        with(StackInstruction.of(opcode));
-        return this;
-    }
-
-    /**
-     * Generate an operator instruction
-     * @see Opcode.Kind#OPERATOR
-     * @param opcode the operator instruction opcode
-     * @return this builder
-     */
-    default CodeBuilder operatorInstruction(Opcode opcode) {
-        with(OperatorInstruction.of(opcode));
-        return this;
+     * @throws IllegalArgumentException for conversions of {@code VoidType} or {@code ReferenceType}
+     * @since 23
+     */
+    default CodeBuilder conversion(TypeKind fromType, TypeKind toType) {
+        return switch (fromType) {
+            case IntType, ByteType, CharType, ShortType, BooleanType ->
+                    switch (toType) {
+                        case IntType -> this;
+                        case LongType -> i2l();
+                        case DoubleType -> i2d();
+                        case FloatType -> i2f();
+                        case ByteType -> i2b();
+                        case CharType -> i2c();
+                        case ShortType -> i2s();
+                        case BooleanType -> iconst_1().iand();
+                        case VoidType, ReferenceType ->
+                            throw new IllegalArgumentException(String.format("convert %s -> %s", fromType, toType));
+                    };
+            case LongType ->
+                    switch (toType) {
+                        case IntType -> l2i();
+                        case LongType -> this;
+                        case DoubleType -> l2d();
+                        case FloatType -> l2f();
+                        case ByteType -> l2i().i2b();
+                        case CharType -> l2i().i2c();
+                        case ShortType -> l2i().i2s();
+                        case BooleanType -> l2i().iconst_1().iand();
+                        case VoidType, ReferenceType ->
+                            throw new IllegalArgumentException(String.format("convert %s -> %s", fromType, toType));
+                    };
+            case DoubleType ->
+                    switch (toType) {
+                        case IntType -> d2i();
+                        case LongType -> d2l();
+                        case DoubleType -> this;
+                        case FloatType -> d2f();
+                        case ByteType -> d2i().i2b();
+                        case CharType -> d2i().i2c();
+                        case ShortType -> d2i().i2s();
+                        case BooleanType -> d2i().iconst_1().iand();
+                        case VoidType, ReferenceType ->
+                            throw new IllegalArgumentException(String.format("convert %s -> %s", fromType, toType));
+                    };
+            case FloatType ->
+                    switch (toType) {
+                        case IntType -> f2i();
+                        case LongType -> f2l();
+                        case DoubleType -> f2d();
+                        case FloatType -> this;
+                        case ByteType -> f2i().i2b();
+                        case CharType -> f2i().i2c();
+                        case ShortType -> f2i().i2s();
+                        case BooleanType -> f2i().iconst_1().iand();
+                        case VoidType, ReferenceType ->
+                            throw new IllegalArgumentException(String.format("convert %s -> %s", fromType, toType));
+                    };
+            case VoidType, ReferenceType ->
+                throw new IllegalArgumentException(String.format("convert %s -> %s", fromType, toType));
+        };
     }
 
     /**
@@ -737,8 +602,9 @@ default CodeBuilder operatorInstruction(Opcode opcode) {
      * @param opcode the constant instruction opcode
      * @param value the constant value
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder constantInstruction(Opcode opcode, ConstantDesc value) {
+    default CodeBuilder loadConstant(Opcode opcode, ConstantDesc value) {
         BytecodeHelpers.validateValue(opcode, value);
         return with(switch (opcode) {
             case SIPUSH, BIPUSH -> ConstantInstruction.ofArgument(opcode, ((Number)value).intValue());
@@ -751,8 +617,9 @@ default CodeBuilder constantInstruction(Opcode opcode, ConstantDesc value) {
      * Generate an instruction pushing a constant onto the operand stack
      * @param value the constant value
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder constantInstruction(ConstantDesc value) {
+    default CodeBuilder loadConstant(ConstantDesc value) {
         //avoid switch expressions here
         if (value == null || value == ConstantDescs.NULL)
             return aconst_null();
@@ -785,32 +652,12 @@ default CodeBuilder constantInstruction(ConstantDesc value) {
         return ldc(value);
     }
 
-    /**
-     * Generate a monitor instruction
-     * @see Opcode.Kind#MONITOR
-     * @param opcode the monitor instruction opcode
-     * @return this builder
-     */
-    default CodeBuilder monitorInstruction(Opcode opcode) {
-        with(MonitorInstruction.of(opcode));
-        return null;
-    }
-
-    /**
-     * Generate a do nothing instruction
-     * @return this builder
-     */
-    default CodeBuilder nopInstruction() {
-        with(NopInstruction.of());
-        return this;
-    }
-
     /**
      * Generate a do nothing instruction
      * @return this builder
      */
     default CodeBuilder nop() {
-        return nopInstruction();
+        return with(NopInstruction.of());
     }
 
     // Base pseudo-instruction builder methods
@@ -831,8 +678,7 @@ default Label newBoundLabel() {
      * @return this builder
      */
     default CodeBuilder labelBinding(Label label) {
-        with((LabelImpl) label);
-        return this;
+        return with((LabelImpl) label);
     }
 
     /**
@@ -841,8 +687,7 @@ default CodeBuilder labelBinding(Label label) {
      * @return this builder
      */
     default CodeBuilder lineNumber(int line) {
-        with(LineNumber.of(line));
-        return this;
+        return with(LineNumber.of(line));
     }
 
     /**
@@ -854,8 +699,7 @@ default CodeBuilder lineNumber(int line) {
      * @return this builder
      */
     default CodeBuilder exceptionCatch(Label start, Label end, Label handler, ClassEntry catchType) {
-        with(ExceptionCatch.of(handler, start, end, Optional.of(catchType)));
-        return this;
+        return with(ExceptionCatch.of(handler, start, end, Optional.of(catchType)));
     }
 
     /**
@@ -867,8 +711,7 @@ default CodeBuilder exceptionCatch(Label start, Label end, Label handler, ClassE
      * @return this builder
      */
     default CodeBuilder exceptionCatch(Label start, Label end, Label handler, Optional catchType) {
-        with(ExceptionCatch.of(handler, start, end, catchType));
-        return this;
+        return with(ExceptionCatch.of(handler, start, end, catchType));
     }
 
     /**
@@ -892,8 +735,7 @@ default CodeBuilder exceptionCatch(Label start, Label end, Label handler, ClassD
      * @return this builder
      */
     default CodeBuilder exceptionCatchAll(Label start, Label end, Label handler) {
-        with(ExceptionCatch.of(handler, start, end));
-        return this;
+        return with(ExceptionCatch.of(handler, start, end));
     }
 
     /**
@@ -906,8 +748,7 @@ default CodeBuilder exceptionCatchAll(Label start, Label end, Label handler) {
      * @return this builder
      */
     default CodeBuilder characterRange(Label startScope, Label endScope, int characterRangeStart, int characterRangeEnd, int flags) {
-        with(CharacterRange.of(startScope, endScope, characterRangeStart, characterRangeEnd, flags));
-        return this;
+        return with(CharacterRange.of(startScope, endScope, characterRangeStart, characterRangeEnd, flags));
     }
 
     /**
@@ -920,8 +761,7 @@ default CodeBuilder characterRange(Label startScope, Label endScope, int charact
      * @return this builder
      */
     default CodeBuilder localVariable(int slot, Utf8Entry nameEntry, Utf8Entry descriptorEntry, Label startScope, Label endScope) {
-        with(LocalVariable.of(slot, nameEntry, descriptorEntry, startScope, endScope));
-        return this;
+        return with(LocalVariable.of(slot, nameEntry, descriptorEntry, startScope, endScope));
     }
 
     /**
@@ -950,8 +790,7 @@ default CodeBuilder localVariable(int slot, String name, ClassDesc descriptor, L
      * @return this builder
      */
     default CodeBuilder localVariableType(int slot, Utf8Entry nameEntry, Utf8Entry signatureEntry, Label startScope, Label endScope) {
-        with(LocalVariableType.of(slot, nameEntry, signatureEntry, startScope, endScope));
-        return this;
+        return with(LocalVariableType.of(slot, nameEntry, signatureEntry, startScope, endScope));
     }
 
     /**
@@ -985,7 +824,7 @@ default CodeBuilder aconst_null() {
      * @return this builder
      */
     default CodeBuilder aaload() {
-        return arrayLoadInstruction(TypeKind.ReferenceType);
+        return arrayLoad(TypeKind.ReferenceType);
     }
 
     /**
@@ -993,7 +832,7 @@ default CodeBuilder aaload() {
      * @return this builder
      */
     default CodeBuilder aastore() {
-        return arrayStoreInstruction(TypeKind.ReferenceType);
+        return arrayStore(TypeKind.ReferenceType);
     }
 
     /**
@@ -1002,7 +841,7 @@ default CodeBuilder aastore() {
      * @return this builder
      */
     default CodeBuilder aload(int slot) {
-        return loadInstruction(TypeKind.ReferenceType, slot);
+        return loadLocal(TypeKind.ReferenceType, slot);
     }
 
     /**
@@ -1011,7 +850,7 @@ default CodeBuilder aload(int slot) {
      * @return this builder
      */
     default CodeBuilder anewarray(ClassEntry classEntry) {
-        return newReferenceArrayInstruction(classEntry);
+        return with(NewReferenceArrayInstruction.of(classEntry));
     }
 
     /**
@@ -1021,7 +860,7 @@ default CodeBuilder anewarray(ClassEntry classEntry) {
      * @throws IllegalArgumentException if {@code className} represents a primitive type
      */
     default CodeBuilder anewarray(ClassDesc className) {
-        return newReferenceArrayInstruction(constantPool().classEntry(className));
+        return anewarray(constantPool().classEntry(className));
     }
 
     /**
@@ -1029,7 +868,7 @@ default CodeBuilder anewarray(ClassDesc className) {
      * @return this builder
      */
     default CodeBuilder areturn() {
-        return returnInstruction(TypeKind.ReferenceType);
+        return return_(TypeKind.ReferenceType);
     }
 
     /**
@@ -1037,7 +876,7 @@ default CodeBuilder areturn() {
      * @return this builder
      */
     default CodeBuilder arraylength() {
-        return operatorInstruction(Opcode.ARRAYLENGTH);
+        return with(OperatorInstruction.of(Opcode.ARRAYLENGTH));
     }
 
     /**
@@ -1046,7 +885,7 @@ default CodeBuilder arraylength() {
      * @return this builder
      */
     default CodeBuilder astore(int slot) {
-        return storeInstruction(TypeKind.ReferenceType, slot);
+        return storeLocal(TypeKind.ReferenceType, slot);
     }
 
     /**
@@ -1054,7 +893,7 @@ default CodeBuilder astore(int slot) {
      * @return this builder
      */
     default CodeBuilder athrow() {
-        return throwInstruction();
+        return with(ThrowInstruction.of());
     }
 
     /**
@@ -1062,7 +901,7 @@ default CodeBuilder athrow() {
      * @return this builder
      */
     default CodeBuilder baload() {
-        return arrayLoadInstruction(TypeKind.ByteType);
+        return arrayLoad(TypeKind.ByteType);
     }
 
     /**
@@ -1070,7 +909,7 @@ default CodeBuilder baload() {
      * @return this builder
      */
     default CodeBuilder bastore() {
-        return arrayStoreInstruction(TypeKind.ByteType);
+        return arrayStore(TypeKind.ByteType);
     }
 
     /**
@@ -1079,7 +918,7 @@ default CodeBuilder bastore() {
      * @return this builder
      */
     default CodeBuilder bipush(int b) {
-        return constantInstruction(Opcode.BIPUSH, b);
+        return loadConstant(Opcode.BIPUSH, b);
     }
 
     /**
@@ -1087,7 +926,7 @@ default CodeBuilder bipush(int b) {
      * @return this builder
      */
     default CodeBuilder caload() {
-        return arrayLoadInstruction(TypeKind.CharType);
+        return arrayLoad(TypeKind.CharType);
     }
 
     /**
@@ -1095,7 +934,7 @@ default CodeBuilder caload() {
      * @return this builder
      */
     default CodeBuilder castore() {
-        return arrayStoreInstruction(TypeKind.CharType);
+        return arrayStore(TypeKind.CharType);
     }
 
     /**
@@ -1104,7 +943,7 @@ default CodeBuilder castore() {
      * @return this builder
      */
     default CodeBuilder checkcast(ClassEntry type) {
-        return typeCheckInstruction(Opcode.CHECKCAST, type);
+        return with(TypeCheckInstruction.of(Opcode.CHECKCAST, type));
     }
 
     /**
@@ -1114,7 +953,7 @@ default CodeBuilder checkcast(ClassEntry type) {
      * @throws IllegalArgumentException if {@code type} represents a primitive type
      */
     default CodeBuilder checkcast(ClassDesc type) {
-        return typeCheckInstruction(Opcode.CHECKCAST, type);
+        return checkcast(constantPool().classEntry(type));
     }
 
     /**
@@ -1122,7 +961,7 @@ default CodeBuilder checkcast(ClassDesc type) {
      * @return this builder
      */
     default CodeBuilder d2f() {
-        return convertInstruction(TypeKind.DoubleType, TypeKind.FloatType);
+        return with(ConvertInstruction.of(Opcode.D2F));
     }
 
     /**
@@ -1130,7 +969,7 @@ default CodeBuilder d2f() {
      * @return this builder
      */
     default CodeBuilder d2i() {
-        return convertInstruction(TypeKind.DoubleType, TypeKind.IntType);
+        return with(ConvertInstruction.of(Opcode.D2I));
     }
 
     /**
@@ -1138,7 +977,7 @@ default CodeBuilder d2i() {
      * @return this builder
      */
     default CodeBuilder d2l() {
-        return convertInstruction(TypeKind.DoubleType, TypeKind.LongType);
+        return with(ConvertInstruction.of(Opcode.D2L));
     }
 
     /**
@@ -1146,7 +985,7 @@ default CodeBuilder d2l() {
      * @return this builder
      */
     default CodeBuilder dadd() {
-        return operatorInstruction(Opcode.DADD);
+        return with(OperatorInstruction.of(Opcode.DADD));
     }
 
     /**
@@ -1154,7 +993,7 @@ default CodeBuilder dadd() {
      * @return this builder
      */
     default CodeBuilder daload() {
-        return arrayLoadInstruction(TypeKind.DoubleType);
+        return arrayLoad(TypeKind.DoubleType);
     }
 
     /**
@@ -1162,7 +1001,7 @@ default CodeBuilder daload() {
      * @return this builder
      */
     default CodeBuilder dastore() {
-        return arrayStoreInstruction(TypeKind.DoubleType);
+        return arrayStore(TypeKind.DoubleType);
     }
 
     /**
@@ -1170,7 +1009,7 @@ default CodeBuilder dastore() {
      * @return this builder
      */
     default CodeBuilder dcmpg() {
-        return operatorInstruction(Opcode.DCMPG);
+        return with(OperatorInstruction.of(Opcode.DCMPG));
     }
 
     /**
@@ -1178,7 +1017,7 @@ default CodeBuilder dcmpg() {
      * @return this builder
      */
     default CodeBuilder dcmpl() {
-        return operatorInstruction(Opcode.DCMPL);
+        return with(OperatorInstruction.of(Opcode.DCMPL));
     }
 
     /**
@@ -1202,7 +1041,7 @@ default CodeBuilder dconst_1() {
      * @return this builder
      */
     default CodeBuilder ddiv() {
-        return operatorInstruction(Opcode.DDIV);
+        return with(OperatorInstruction.of(Opcode.DDIV));
     }
 
     /**
@@ -1211,7 +1050,7 @@ default CodeBuilder ddiv() {
      * @return this builder
      */
     default CodeBuilder dload(int slot) {
-        return loadInstruction(TypeKind.DoubleType, slot);
+        return loadLocal(TypeKind.DoubleType, slot);
     }
 
     /**
@@ -1219,7 +1058,7 @@ default CodeBuilder dload(int slot) {
      * @return this builder
      */
     default CodeBuilder dmul() {
-        return operatorInstruction(Opcode.DMUL);
+        return with(OperatorInstruction.of(Opcode.DMUL));
     }
 
     /**
@@ -1227,7 +1066,7 @@ default CodeBuilder dmul() {
      * @return this builder
      */
     default CodeBuilder dneg() {
-        return operatorInstruction(Opcode.DNEG);
+        return with(OperatorInstruction.of(Opcode.DNEG));
     }
 
     /**
@@ -1235,7 +1074,7 @@ default CodeBuilder dneg() {
      * @return this builder
      */
     default CodeBuilder drem() {
-        return operatorInstruction(Opcode.DREM);
+        return with(OperatorInstruction.of(Opcode.DREM));
     }
 
     /**
@@ -1243,7 +1082,7 @@ default CodeBuilder drem() {
      * @return this builder
      */
     default CodeBuilder dreturn() {
-        return returnInstruction(TypeKind.DoubleType);
+        return return_(TypeKind.DoubleType);
     }
 
     /**
@@ -1252,7 +1091,7 @@ default CodeBuilder dreturn() {
      * @return this builder
      */
     default CodeBuilder dstore(int slot) {
-        return storeInstruction(TypeKind.DoubleType, slot);
+        return storeLocal(TypeKind.DoubleType, slot);
     }
 
     /**
@@ -1260,7 +1099,7 @@ default CodeBuilder dstore(int slot) {
      * @return this builder
      */
     default CodeBuilder dsub() {
-        return operatorInstruction(Opcode.DSUB);
+        return with(OperatorInstruction.of(Opcode.DSUB));
     }
 
     /**
@@ -1268,7 +1107,7 @@ default CodeBuilder dsub() {
      * @return this builder
      */
     default CodeBuilder dup() {
-        return stackInstruction(Opcode.DUP);
+        return with(StackInstruction.of(Opcode.DUP));
     }
 
     /**
@@ -1276,7 +1115,7 @@ default CodeBuilder dup() {
      * @return this builder
      */
     default CodeBuilder dup2() {
-        return stackInstruction(Opcode.DUP2);
+        return with(StackInstruction.of(Opcode.DUP2));
     }
 
     /**
@@ -1285,7 +1124,7 @@ default CodeBuilder dup2() {
      * @return this builder
      */
     default CodeBuilder dup2_x1() {
-        return stackInstruction(Opcode.DUP2_X1);
+        return with(StackInstruction.of(Opcode.DUP2_X1));
     }
 
     /**
@@ -1294,7 +1133,7 @@ default CodeBuilder dup2_x1() {
      * @return this builder
      */
     default CodeBuilder dup2_x2() {
-        return stackInstruction(Opcode.DUP2_X2);
+        return with(StackInstruction.of(Opcode.DUP2_X2));
     }
 
     /**
@@ -1302,7 +1141,7 @@ default CodeBuilder dup2_x2() {
      * @return this builder
      */
     default CodeBuilder dup_x1() {
-        return stackInstruction(Opcode.DUP_X1);
+        return with(StackInstruction.of(Opcode.DUP_X1));
     }
 
     /**
@@ -1310,7 +1149,7 @@ default CodeBuilder dup_x1() {
      * @return this builder
      */
     default CodeBuilder dup_x2() {
-        return stackInstruction(Opcode.DUP_X2);
+        return with(StackInstruction.of(Opcode.DUP_X2));
     }
 
     /**
@@ -1318,7 +1157,7 @@ default CodeBuilder dup_x2() {
      * @return this builder
      */
     default CodeBuilder f2d() {
-        return convertInstruction(TypeKind.FloatType, TypeKind.DoubleType);
+        return with(ConvertInstruction.of(Opcode.F2D));
     }
 
     /**
@@ -1326,7 +1165,7 @@ default CodeBuilder f2d() {
      * @return this builder
      */
     default CodeBuilder f2i() {
-        return convertInstruction(TypeKind.FloatType, TypeKind.IntType);
+        return with(ConvertInstruction.of(Opcode.F2I));
     }
 
     /**
@@ -1334,7 +1173,7 @@ default CodeBuilder f2i() {
      * @return this builder
      */
     default CodeBuilder f2l() {
-        return convertInstruction(TypeKind.FloatType, TypeKind.LongType);
+        return with(ConvertInstruction.of(Opcode.F2L));
     }
 
     /**
@@ -1342,7 +1181,7 @@ default CodeBuilder f2l() {
      * @return this builder
      */
     default CodeBuilder fadd() {
-        return operatorInstruction(Opcode.FADD);
+        return with(OperatorInstruction.of(Opcode.FADD));
     }
 
     /**
@@ -1350,7 +1189,7 @@ default CodeBuilder fadd() {
      * @return this builder
      */
     default CodeBuilder faload() {
-        return arrayLoadInstruction(TypeKind.FloatType);
+        return arrayLoad(TypeKind.FloatType);
     }
 
     /**
@@ -1358,7 +1197,7 @@ default CodeBuilder faload() {
      * @return this builder
      */
     default CodeBuilder fastore() {
-        return arrayStoreInstruction(TypeKind.FloatType);
+        return arrayStore(TypeKind.FloatType);
     }
 
     /**
@@ -1366,7 +1205,7 @@ default CodeBuilder fastore() {
      * @return this builder
      */
     default CodeBuilder fcmpg() {
-        return operatorInstruction(Opcode.FCMPG);
+        return with(OperatorInstruction.of(Opcode.FCMPG));
     }
 
     /**
@@ -1374,7 +1213,7 @@ default CodeBuilder fcmpg() {
      * @return this builder
      */
     default CodeBuilder fcmpl() {
-        return operatorInstruction(Opcode.FCMPL);
+        return with(OperatorInstruction.of(Opcode.FCMPL));
     }
 
     /**
@@ -1406,7 +1245,7 @@ default CodeBuilder fconst_2() {
      * @return this builder
      */
     default CodeBuilder fdiv() {
-        return operatorInstruction(Opcode.FDIV);
+        return with(OperatorInstruction.of(Opcode.FDIV));
     }
 
     /**
@@ -1415,7 +1254,7 @@ default CodeBuilder fdiv() {
      * @return this builder
      */
     default CodeBuilder fload(int slot) {
-        return loadInstruction(TypeKind.FloatType, slot);
+        return loadLocal(TypeKind.FloatType, slot);
     }
 
     /**
@@ -1423,7 +1262,7 @@ default CodeBuilder fload(int slot) {
      * @return this builder
      */
     default CodeBuilder fmul() {
-        return operatorInstruction(Opcode.FMUL);
+        return with(OperatorInstruction.of(Opcode.FMUL));
     }
 
     /**
@@ -1431,7 +1270,7 @@ default CodeBuilder fmul() {
      * @return this builder
      */
     default CodeBuilder fneg() {
-        return operatorInstruction(Opcode.FNEG);
+        return with(OperatorInstruction.of(Opcode.FNEG));
     }
 
     /**
@@ -1439,7 +1278,7 @@ default CodeBuilder fneg() {
      * @return this builder
      */
     default CodeBuilder frem() {
-        return operatorInstruction(Opcode.FREM);
+        return with(OperatorInstruction.of(Opcode.FREM));
     }
 
     /**
@@ -1447,7 +1286,7 @@ default CodeBuilder frem() {
      * @return this builder
      */
     default CodeBuilder freturn() {
-        return returnInstruction(TypeKind.FloatType);
+        return return_(TypeKind.FloatType);
     }
 
     /**
@@ -1456,7 +1295,7 @@ default CodeBuilder freturn() {
      * @return this builder
      */
     default CodeBuilder fstore(int slot) {
-        return storeInstruction(TypeKind.FloatType, slot);
+        return storeLocal(TypeKind.FloatType, slot);
     }
 
     /**
@@ -1464,7 +1303,7 @@ default CodeBuilder fstore(int slot) {
      * @return this builder
      */
     default CodeBuilder fsub() {
-        return operatorInstruction(Opcode.FSUB);
+        return with(OperatorInstruction.of(Opcode.FSUB));
     }
 
     /**
@@ -1473,7 +1312,7 @@ default CodeBuilder fsub() {
      * @return this builder
      */
     default CodeBuilder getfield(FieldRefEntry ref) {
-        return fieldInstruction(Opcode.GETFIELD, ref);
+        return fieldAccess(Opcode.GETFIELD, ref);
     }
 
     /**
@@ -1485,7 +1324,7 @@ default CodeBuilder getfield(FieldRefEntry ref) {
      * @throws IllegalArgumentException if {@code owner} represents a primitive type
      */
     default CodeBuilder getfield(ClassDesc owner, String name, ClassDesc type) {
-        return fieldInstruction(Opcode.GETFIELD, owner, name, type);
+        return fieldAccess(Opcode.GETFIELD, owner, name, type);
     }
 
     /**
@@ -1494,7 +1333,7 @@ default CodeBuilder getfield(ClassDesc owner, String name, ClassDesc type) {
      * @return this builder
      */
     default CodeBuilder getstatic(FieldRefEntry ref) {
-        return fieldInstruction(Opcode.GETSTATIC, ref);
+        return fieldAccess(Opcode.GETSTATIC, ref);
     }
 
     /**
@@ -1506,7 +1345,7 @@ default CodeBuilder getstatic(FieldRefEntry ref) {
      * @throws IllegalArgumentException if {@code owner} represents a primitive type
      */
     default CodeBuilder getstatic(ClassDesc owner, String name, ClassDesc type) {
-        return fieldInstruction(Opcode.GETSTATIC, owner, name, type);
+        return fieldAccess(Opcode.GETSTATIC, owner, name, type);
     }
 
     /**
@@ -1515,7 +1354,7 @@ default CodeBuilder getstatic(ClassDesc owner, String name, ClassDesc type) {
      * @return this builder
      */
     default CodeBuilder goto_(Label target) {
-        return branchInstruction(Opcode.GOTO, target);
+        return branch(Opcode.GOTO, target);
     }
 
     /**
@@ -1524,7 +1363,7 @@ default CodeBuilder goto_(Label target) {
      * @return this builder
      */
     default CodeBuilder goto_w(Label target) {
-        return branchInstruction(Opcode.GOTO_W, target);
+        return branch(Opcode.GOTO_W, target);
     }
 
     /**
@@ -1532,7 +1371,7 @@ default CodeBuilder goto_w(Label target) {
      * @return this builder
      */
     default CodeBuilder i2b() {
-        return convertInstruction(TypeKind.IntType, TypeKind.ByteType);
+        return with(ConvertInstruction.of(Opcode.I2B));
     }
 
     /**
@@ -1540,7 +1379,7 @@ default CodeBuilder i2b() {
      * @return this builder
      */
     default CodeBuilder i2c() {
-        return convertInstruction(TypeKind.IntType, TypeKind.CharType);
+        return with(ConvertInstruction.of(Opcode.I2C));
     }
 
     /**
@@ -1548,7 +1387,7 @@ default CodeBuilder i2c() {
      * @return this builder
      */
     default CodeBuilder i2d() {
-        return convertInstruction(TypeKind.IntType, TypeKind.DoubleType);
+        return with(ConvertInstruction.of(Opcode.I2D));
     }
 
     /**
@@ -1556,7 +1395,7 @@ default CodeBuilder i2d() {
      * @return this builder
      */
     default CodeBuilder i2f() {
-        return convertInstruction(TypeKind.IntType, TypeKind.FloatType);
+        return with(ConvertInstruction.of(Opcode.I2F));
     }
 
     /**
@@ -1564,7 +1403,7 @@ default CodeBuilder i2f() {
      * @return this builder
      */
     default CodeBuilder i2l() {
-        return convertInstruction(TypeKind.IntType, TypeKind.LongType);
+        return with(ConvertInstruction.of(Opcode.I2L));
     }
 
     /**
@@ -1572,7 +1411,7 @@ default CodeBuilder i2l() {
      * @return this builder
      */
     default CodeBuilder i2s() {
-        return convertInstruction(TypeKind.IntType, TypeKind.ShortType);
+        return with(ConvertInstruction.of(Opcode.I2S));
     }
 
     /**
@@ -1580,7 +1419,7 @@ default CodeBuilder i2s() {
      * @return this builder
      */
     default CodeBuilder iadd() {
-        return operatorInstruction(Opcode.IADD);
+        return with(OperatorInstruction.of(Opcode.IADD));
     }
 
     /**
@@ -1588,7 +1427,7 @@ default CodeBuilder iadd() {
      * @return this builder
      */
     default CodeBuilder iaload() {
-        return arrayLoadInstruction(TypeKind.IntType);
+        return arrayLoad(TypeKind.IntType);
     }
 
     /**
@@ -1596,7 +1435,7 @@ default CodeBuilder iaload() {
      * @return this builder
      */
     default CodeBuilder iand() {
-        return operatorInstruction(Opcode.IAND);
+        return with(OperatorInstruction.of(Opcode.IAND));
     }
 
     /**
@@ -1604,7 +1443,7 @@ default CodeBuilder iand() {
      * @return this builder
      */
     default CodeBuilder iastore() {
-        return arrayStoreInstruction(TypeKind.IntType);
+        return arrayStore(TypeKind.IntType);
     }
 
     /**
@@ -1668,7 +1507,7 @@ default CodeBuilder iconst_m1() {
      * @return this builder
      */
     default CodeBuilder idiv() {
-        return operatorInstruction(Opcode.IDIV);
+        return with(OperatorInstruction.of(Opcode.IDIV));
     }
 
     /**
@@ -1677,7 +1516,7 @@ default CodeBuilder idiv() {
      * @return this builder
      */
     default CodeBuilder if_acmpeq(Label target) {
-        return branchInstruction(Opcode.IF_ACMPEQ, target);
+        return branch(Opcode.IF_ACMPEQ, target);
     }
 
     /**
@@ -1686,7 +1525,7 @@ default CodeBuilder if_acmpeq(Label target) {
      * @return this builder
      */
     default CodeBuilder if_acmpne(Label target) {
-        return branchInstruction(Opcode.IF_ACMPNE, target);
+        return branch(Opcode.IF_ACMPNE, target);
     }
 
     /**
@@ -1695,7 +1534,7 @@ default CodeBuilder if_acmpne(Label target) {
      * @return this builder
      */
     default CodeBuilder if_icmpeq(Label target) {
-        return branchInstruction(Opcode.IF_ICMPEQ, target);
+        return branch(Opcode.IF_ICMPEQ, target);
     }
 
     /**
@@ -1704,7 +1543,7 @@ default CodeBuilder if_icmpeq(Label target) {
      * @return this builder
      */
     default CodeBuilder if_icmpge(Label target) {
-        return branchInstruction(Opcode.IF_ICMPGE, target);
+        return branch(Opcode.IF_ICMPGE, target);
     }
 
     /**
@@ -1713,7 +1552,7 @@ default CodeBuilder if_icmpge(Label target) {
      * @return this builder
      */
     default CodeBuilder if_icmpgt(Label target) {
-        return branchInstruction(Opcode.IF_ICMPGT, target);
+        return branch(Opcode.IF_ICMPGT, target);
     }
 
     /**
@@ -1722,7 +1561,7 @@ default CodeBuilder if_icmpgt(Label target) {
      * @return this builder
      */
     default CodeBuilder if_icmple(Label target) {
-        return branchInstruction(Opcode.IF_ICMPLE, target);
+        return branch(Opcode.IF_ICMPLE, target);
     }
 
     /**
@@ -1731,7 +1570,7 @@ default CodeBuilder if_icmple(Label target) {
      * @return this builder
      */
     default CodeBuilder if_icmplt(Label target) {
-        return branchInstruction(Opcode.IF_ICMPLT, target);
+        return branch(Opcode.IF_ICMPLT, target);
     }
 
     /**
@@ -1740,7 +1579,7 @@ default CodeBuilder if_icmplt(Label target) {
      * @return this builder
      */
     default CodeBuilder if_icmpne(Label target) {
-        return branchInstruction(Opcode.IF_ICMPNE, target);
+        return branch(Opcode.IF_ICMPNE, target);
     }
 
     /**
@@ -1749,7 +1588,7 @@ default CodeBuilder if_icmpne(Label target) {
      * @return this builder
      */
     default CodeBuilder if_nonnull(Label target) {
-        return branchInstruction(Opcode.IFNONNULL, target);
+        return branch(Opcode.IFNONNULL, target);
     }
 
     /**
@@ -1758,7 +1597,7 @@ default CodeBuilder if_nonnull(Label target) {
      * @return this builder
      */
     default CodeBuilder if_null(Label target) {
-        return branchInstruction(Opcode.IFNULL, target);
+        return branch(Opcode.IFNULL, target);
     }
 
     /**
@@ -1767,7 +1606,7 @@ default CodeBuilder if_null(Label target) {
      * @return this builder
      */
     default CodeBuilder ifeq(Label target) {
-        return branchInstruction(Opcode.IFEQ, target);
+        return branch(Opcode.IFEQ, target);
     }
 
     /**
@@ -1776,7 +1615,7 @@ default CodeBuilder ifeq(Label target) {
      * @return this builder
      */
     default CodeBuilder ifge(Label target) {
-        return branchInstruction(Opcode.IFGE, target);
+        return branch(Opcode.IFGE, target);
     }
 
     /**
@@ -1785,7 +1624,7 @@ default CodeBuilder ifge(Label target) {
      * @return this builder
      */
     default CodeBuilder ifgt(Label target) {
-        return branchInstruction(Opcode.IFGT, target);
+        return branch(Opcode.IFGT, target);
     }
 
     /**
@@ -1794,7 +1633,7 @@ default CodeBuilder ifgt(Label target) {
      * @return this builder
      */
     default CodeBuilder ifle(Label target) {
-        return branchInstruction(Opcode.IFLE, target);
+        return branch(Opcode.IFLE, target);
     }
 
     /**
@@ -1803,7 +1642,7 @@ default CodeBuilder ifle(Label target) {
      * @return this builder
      */
     default CodeBuilder iflt(Label target) {
-        return branchInstruction(Opcode.IFLT, target);
+        return branch(Opcode.IFLT, target);
     }
 
     /**
@@ -1812,7 +1651,7 @@ default CodeBuilder iflt(Label target) {
      * @return this builder
      */
     default CodeBuilder ifne(Label target) {
-        return branchInstruction(Opcode.IFNE, target);
+        return branch(Opcode.IFNE, target);
     }
 
     /**
@@ -1822,7 +1661,7 @@ default CodeBuilder ifne(Label target) {
      * @return this builder
      */
     default CodeBuilder iinc(int slot, int val) {
-        return incrementInstruction(slot, val);
+        return with(IncrementInstruction.of(slot, val));
     }
 
     /**
@@ -1831,7 +1670,7 @@ default CodeBuilder iinc(int slot, int val) {
      * @return this builder
      */
     default CodeBuilder iload(int slot) {
-        return loadInstruction(TypeKind.IntType, slot);
+        return loadLocal(TypeKind.IntType, slot);
     }
 
     /**
@@ -1839,7 +1678,7 @@ default CodeBuilder iload(int slot) {
      * @return this builder
      */
     default CodeBuilder imul() {
-        return operatorInstruction(Opcode.IMUL);
+        return with(OperatorInstruction.of(Opcode.IMUL));
     }
 
     /**
@@ -1847,16 +1686,17 @@ default CodeBuilder imul() {
      * @return this builder
      */
     default CodeBuilder ineg() {
-        return operatorInstruction(Opcode.INEG);
+        return with(OperatorInstruction.of(Opcode.INEG));
     }
 
     /**
      * Generate an instruction to determine if an object is of the given type
      * @param target the target type
      * @return this builder
+     * @since 23
      */
-    default CodeBuilder instanceof_(ClassEntry target) {
-        return typeCheckInstruction(Opcode.INSTANCEOF, target);
+    default CodeBuilder instanceOf(ClassEntry target) {
+        return with(TypeCheckInstruction.of(Opcode.INSTANCEOF, target));
     }
 
     /**
@@ -1864,9 +1704,10 @@ default CodeBuilder instanceof_(ClassEntry target) {
      * @param target the target type
      * @return this builder
      * @throws IllegalArgumentException if {@code target} represents a primitive type
+     * @since 23
      */
-    default CodeBuilder instanceof_(ClassDesc target) {
-        return typeCheckInstruction(Opcode.INSTANCEOF, constantPool().classEntry(target));
+    default CodeBuilder instanceOf(ClassDesc target) {
+        return instanceOf(constantPool().classEntry(target));
     }
 
     /**
@@ -1875,7 +1716,7 @@ default CodeBuilder instanceof_(ClassDesc target) {
      * @return this builder
      */
     default CodeBuilder invokedynamic(InvokeDynamicEntry ref) {
-        return invokeDynamicInstruction(ref);
+        return with(InvokeDynamicInstruction.of(ref));
     }
 
     /**
@@ -1884,7 +1725,15 @@ default CodeBuilder invokedynamic(InvokeDynamicEntry ref) {
      * @return this builder
      */
     default CodeBuilder invokedynamic(DynamicCallSiteDesc ref) {
-        return invokeDynamicInstruction(ref);
+        MethodHandleEntry bsMethod = handleDescToHandleInfo(constantPool(), (DirectMethodHandleDesc) ref.bootstrapMethod());
+        var cpArgs = ref.bootstrapArgs();
+        List bsArguments = new ArrayList<>(cpArgs.length);
+        for (var constantValue : cpArgs) {
+            bsArguments.add(BytecodeHelpers.constantEntry(constantPool(), constantValue));
+        }
+        BootstrapMethodEntry bm = constantPool().bsmEntry(bsMethod, bsArguments);
+        NameAndTypeEntry nameAndType = constantPool().nameAndTypeEntry(ref.invocationName(), ref.invocationType());
+        return invokedynamic(constantPool().invokeDynamicEntry(bm, nameAndType));
     }
 
     /**
@@ -1893,7 +1742,7 @@ default CodeBuilder invokedynamic(DynamicCallSiteDesc ref) {
      * @return this builder
      */
     default CodeBuilder invokeinterface(InterfaceMethodRefEntry ref) {
-        return invokeInstruction(Opcode.INVOKEINTERFACE, ref);
+        return invoke(Opcode.INVOKEINTERFACE, ref);
     }
 
     /**
@@ -1905,7 +1754,7 @@ default CodeBuilder invokeinterface(InterfaceMethodRefEntry ref) {
      * @throws IllegalArgumentException if {@code owner} represents a primitive type
      */
     default CodeBuilder invokeinterface(ClassDesc owner, String name, MethodTypeDesc type) {
-        return invokeInstruction(Opcode.INVOKEINTERFACE, constantPool().interfaceMethodRefEntry(owner, name, type));
+        return invoke(Opcode.INVOKEINTERFACE, constantPool().interfaceMethodRefEntry(owner, name, type));
     }
 
     /**
@@ -1915,7 +1764,7 @@ default CodeBuilder invokeinterface(ClassDesc owner, String name, MethodTypeDesc
      * @return this builder
      */
     default CodeBuilder invokespecial(InterfaceMethodRefEntry ref) {
-        return invokeInstruction(Opcode.INVOKESPECIAL, ref);
+        return invoke(Opcode.INVOKESPECIAL, ref);
     }
 
     /**
@@ -1925,7 +1774,7 @@ default CodeBuilder invokespecial(InterfaceMethodRefEntry ref) {
      * @return this builder
      */
     default CodeBuilder invokespecial(MethodRefEntry ref) {
-        return invokeInstruction(Opcode.INVOKESPECIAL, ref);
+        return invoke(Opcode.INVOKESPECIAL, ref);
     }
 
     /**
@@ -1938,7 +1787,7 @@ default CodeBuilder invokespecial(MethodRefEntry ref) {
      * @throws IllegalArgumentException if {@code owner} represents a primitive type
      */
     default CodeBuilder invokespecial(ClassDesc owner, String name, MethodTypeDesc type) {
-        return invokeInstruction(Opcode.INVOKESPECIAL, owner, name, type, false);
+        return invoke(Opcode.INVOKESPECIAL, owner, name, type, false);
     }
 
     /**
@@ -1952,7 +1801,7 @@ default CodeBuilder invokespecial(ClassDesc owner, String name, MethodTypeDesc t
      * @throws IllegalArgumentException if {@code owner} represents a primitive type
      */
     default CodeBuilder invokespecial(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface) {
-        return invokeInstruction(Opcode.INVOKESPECIAL, owner, name, type, isInterface);
+        return invoke(Opcode.INVOKESPECIAL, owner, name, type, isInterface);
     }
 
     /**
@@ -1961,7 +1810,7 @@ default CodeBuilder invokespecial(ClassDesc owner, String name, MethodTypeDesc t
      * @return this builder
      */
     default CodeBuilder invokestatic(InterfaceMethodRefEntry ref) {
-        return invokeInstruction(Opcode.INVOKESTATIC, ref);
+        return invoke(Opcode.INVOKESTATIC, ref);
     }
 
     /**
@@ -1970,7 +1819,7 @@ default CodeBuilder invokestatic(InterfaceMethodRefEntry ref) {
      * @return this builder
      */
     default CodeBuilder invokestatic(MethodRefEntry ref) {
-        return invokeInstruction(Opcode.INVOKESTATIC, ref);
+        return invoke(Opcode.INVOKESTATIC, ref);
     }
 
     /**
@@ -1982,7 +1831,7 @@ default CodeBuilder invokestatic(MethodRefEntry ref) {
      * @throws IllegalArgumentException if {@code owner} represents a primitive type
      */
     default CodeBuilder invokestatic(ClassDesc owner, String name, MethodTypeDesc type) {
-        return invokeInstruction(Opcode.INVOKESTATIC, owner, name, type, false);
+        return invoke(Opcode.INVOKESTATIC, owner, name, type, false);
     }
 
     /**
@@ -1995,7 +1844,7 @@ default CodeBuilder invokestatic(ClassDesc owner, String name, MethodTypeDesc ty
      * @throws IllegalArgumentException if {@code owner} represents a primitive type
      */
     default CodeBuilder invokestatic(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface) {
-        return invokeInstruction(Opcode.INVOKESTATIC, owner, name, type, isInterface);
+        return invoke(Opcode.INVOKESTATIC, owner, name, type, isInterface);
     }
 
     /**
@@ -2004,7 +1853,7 @@ default CodeBuilder invokestatic(ClassDesc owner, String name, MethodTypeDesc ty
      * @return this builder
      */
     default CodeBuilder invokevirtual(MethodRefEntry ref) {
-        return invokeInstruction(Opcode.INVOKEVIRTUAL, ref);
+        return invoke(Opcode.INVOKEVIRTUAL, ref);
     }
 
     /**
@@ -2016,7 +1865,7 @@ default CodeBuilder invokevirtual(MethodRefEntry ref) {
      * @throws IllegalArgumentException if {@code owner} represents a primitive type
      */
     default CodeBuilder invokevirtual(ClassDesc owner, String name, MethodTypeDesc type) {
-        return invokeInstruction(Opcode.INVOKEVIRTUAL, owner, name, type, false);
+        return invoke(Opcode.INVOKEVIRTUAL, owner, name, type, false);
     }
 
     /**
@@ -2024,7 +1873,7 @@ default CodeBuilder invokevirtual(ClassDesc owner, String name, MethodTypeDesc t
      * @return this builder
      */
     default CodeBuilder ior() {
-        return operatorInstruction(Opcode.IOR);
+        return with(OperatorInstruction.of(Opcode.IOR));
     }
 
     /**
@@ -2032,7 +1881,7 @@ default CodeBuilder ior() {
      * @return this builder
      */
     default CodeBuilder irem() {
-        return operatorInstruction(Opcode.IREM);
+        return with(OperatorInstruction.of(Opcode.IREM));
     }
 
     /**
@@ -2040,7 +1889,7 @@ default CodeBuilder irem() {
      * @return this builder
      */
     default CodeBuilder ireturn() {
-        return returnInstruction(TypeKind.IntType);
+        return return_(TypeKind.IntType);
     }
 
     /**
@@ -2048,7 +1897,7 @@ default CodeBuilder ireturn() {
      * @return this builder
      */
     default CodeBuilder ishl() {
-        return operatorInstruction(Opcode.ISHL);
+        return with(OperatorInstruction.of(Opcode.ISHL));
     }
 
     /**
@@ -2056,7 +1905,7 @@ default CodeBuilder ishl() {
      * @return this builder
      */
     default CodeBuilder ishr() {
-        return operatorInstruction(Opcode.ISHR);
+        return with(OperatorInstruction.of(Opcode.ISHR));
     }
 
     /**
@@ -2065,7 +1914,7 @@ default CodeBuilder ishr() {
      * @return this builder
      */
     default CodeBuilder istore(int slot) {
-        return storeInstruction(TypeKind.IntType, slot);
+        return storeLocal(TypeKind.IntType, slot);
     }
 
     /**
@@ -2073,7 +1922,7 @@ default CodeBuilder istore(int slot) {
      * @return this builder
      */
     default CodeBuilder isub() {
-        return operatorInstruction(Opcode.ISUB);
+        return with(OperatorInstruction.of(Opcode.ISUB));
     }
 
     /**
@@ -2081,7 +1930,7 @@ default CodeBuilder isub() {
      * @return this builder
      */
     default CodeBuilder iushr() {
-        return operatorInstruction(Opcode.IUSHR);
+        return with(OperatorInstruction.of(Opcode.IUSHR));
     }
 
     /**
@@ -2089,7 +1938,7 @@ default CodeBuilder iushr() {
      * @return this builder
      */
     default CodeBuilder ixor() {
-        return operatorInstruction(Opcode.IXOR);
+        return with(OperatorInstruction.of(Opcode.IXOR));
     }
 
     /**
@@ -2099,7 +1948,7 @@ default CodeBuilder ixor() {
      * @return this builder
      */
     default CodeBuilder lookupswitch(Label defaultTarget, List cases) {
-        return lookupSwitchInstruction(defaultTarget, cases);
+        return with(LookupSwitchInstruction.of(defaultTarget, cases));
     }
 
     /**
@@ -2107,7 +1956,7 @@ default CodeBuilder lookupswitch(Label defaultTarget, List cases) {
      * @return this builder
      */
     default CodeBuilder l2d() {
-        return convertInstruction(TypeKind.LongType, TypeKind.DoubleType);
+        return with(ConvertInstruction.of(Opcode.L2D));
     }
 
     /**
@@ -2115,7 +1964,7 @@ default CodeBuilder l2d() {
      * @return this builder
      */
     default CodeBuilder l2f() {
-        return convertInstruction(TypeKind.LongType, TypeKind.FloatType);
+        return with(ConvertInstruction.of(Opcode.L2F));
     }
 
     /**
@@ -2123,7 +1972,7 @@ default CodeBuilder l2f() {
      * @return this builder
      */
     default CodeBuilder l2i() {
-        return convertInstruction(TypeKind.LongType, TypeKind.IntType);
+        return with(ConvertInstruction.of(Opcode.L2I));
     }
 
     /**
@@ -2131,7 +1980,7 @@ default CodeBuilder l2i() {
      * @return this builder
      */
     default CodeBuilder ladd() {
-        return operatorInstruction(Opcode.LADD);
+        return with(OperatorInstruction.of(Opcode.LADD));
     }
 
     /**
@@ -2139,7 +1988,7 @@ default CodeBuilder ladd() {
      * @return this builder
      */
     default CodeBuilder laload() {
-        return arrayLoadInstruction(TypeKind.LongType);
+        return arrayLoad(TypeKind.LongType);
     }
 
     /**
@@ -2147,7 +1996,7 @@ default CodeBuilder laload() {
      * @return this builder
      */
     default CodeBuilder land() {
-        return operatorInstruction(Opcode.LAND);
+        return with(OperatorInstruction.of(Opcode.LAND));
     }
 
     /**
@@ -2155,7 +2004,7 @@ default CodeBuilder land() {
      * @return this builder
      */
     default CodeBuilder lastore() {
-        return arrayStoreInstruction(TypeKind.LongType);
+        return arrayStore(TypeKind.LongType);
     }
 
     /**
@@ -2163,7 +2012,7 @@ default CodeBuilder lastore() {
      * @return this builder
      */
     default CodeBuilder lcmp() {
-        return operatorInstruction(Opcode.LCMP);
+        return with(OperatorInstruction.of(Opcode.LCMP));
     }
 
     /**
@@ -2208,7 +2057,7 @@ default CodeBuilder ldc(LoadableConstantEntry entry) {
      * @return this builder
      */
     default CodeBuilder ldiv() {
-        return operatorInstruction(Opcode.LDIV);
+        return with(OperatorInstruction.of(Opcode.LDIV));
     }
 
     /**
@@ -2217,7 +2066,7 @@ default CodeBuilder ldiv() {
      * @return this builder
      */
     default CodeBuilder lload(int slot) {
-        return loadInstruction(TypeKind.LongType, slot);
+        return loadLocal(TypeKind.LongType, slot);
     }
 
     /**
@@ -2225,7 +2074,7 @@ default CodeBuilder lload(int slot) {
      * @return this builder
      */
     default CodeBuilder lmul() {
-        return operatorInstruction(Opcode.LMUL);
+        return with(OperatorInstruction.of(Opcode.LMUL));
     }
 
     /**
@@ -2233,7 +2082,7 @@ default CodeBuilder lmul() {
      * @return this builder
      */
     default CodeBuilder lneg() {
-        return operatorInstruction(Opcode.LNEG);
+        return with(OperatorInstruction.of(Opcode.LNEG));
     }
 
     /**
@@ -2241,7 +2090,7 @@ default CodeBuilder lneg() {
      * @return this builder
      */
     default CodeBuilder lor() {
-        return operatorInstruction(Opcode.LOR);
+        return with(OperatorInstruction.of(Opcode.LOR));
     }
 
     /**
@@ -2249,7 +2098,7 @@ default CodeBuilder lor() {
      * @return this builder
      */
     default CodeBuilder lrem() {
-        return operatorInstruction(Opcode.LREM);
+        return with(OperatorInstruction.of(Opcode.LREM));
     }
 
     /**
@@ -2257,7 +2106,7 @@ default CodeBuilder lrem() {
      * @return this builder
      */
     default CodeBuilder lreturn() {
-        return returnInstruction(TypeKind.LongType);
+        return return_(TypeKind.LongType);
     }
 
     /**
@@ -2265,7 +2114,7 @@ default CodeBuilder lreturn() {
      * @return this builder
      */
     default CodeBuilder lshl() {
-        return operatorInstruction(Opcode.LSHL);
+        return with(OperatorInstruction.of(Opcode.LSHL));
     }
 
     /**
@@ -2273,7 +2122,7 @@ default CodeBuilder lshl() {
      * @return this builder
      */
     default CodeBuilder lshr() {
-        return operatorInstruction(Opcode.LSHR);
+        return with(OperatorInstruction.of(Opcode.LSHR));
     }
 
     /**
@@ -2282,7 +2131,7 @@ default CodeBuilder lshr() {
      * @return this builder
      */
     default CodeBuilder lstore(int slot) {
-        return storeInstruction(TypeKind.LongType, slot);
+        return storeLocal(TypeKind.LongType, slot);
     }
 
     /**
@@ -2290,7 +2139,7 @@ default CodeBuilder lstore(int slot) {
      * @return this builder
      */
     default CodeBuilder lsub() {
-        return operatorInstruction(Opcode.LSUB);
+        return with(OperatorInstruction.of(Opcode.LSUB));
     }
 
     /**
@@ -2298,7 +2147,7 @@ default CodeBuilder lsub() {
      * @return this builder
      */
     default CodeBuilder lushr() {
-        return operatorInstruction(Opcode.LUSHR);
+        return with(OperatorInstruction.of(Opcode.LUSHR));
     }
 
     /**
@@ -2306,7 +2155,7 @@ default CodeBuilder lushr() {
      * @return this builder
      */
     default CodeBuilder lxor() {
-        return operatorInstruction(Opcode.LXOR);
+        return with(OperatorInstruction.of(Opcode.LXOR));
     }
 
     /**
@@ -2314,7 +2163,7 @@ default CodeBuilder lxor() {
      * @return this builder
      */
     default CodeBuilder monitorenter() {
-        return monitorInstruction(Opcode.MONITORENTER);
+        return with(MonitorInstruction.of(Opcode.MONITORENTER));
     }
 
     /**
@@ -2322,7 +2171,7 @@ default CodeBuilder monitorenter() {
      * @return this builder
      */
     default CodeBuilder monitorexit() {
-        return monitorInstruction(Opcode.MONITOREXIT);
+        return with(MonitorInstruction.of(Opcode.MONITOREXIT));
     }
 
     /**
@@ -2332,7 +2181,7 @@ default CodeBuilder monitorexit() {
      * @return this builder
      */
     default CodeBuilder multianewarray(ClassEntry array, int dims) {
-        return newMultidimensionalArrayInstruction(dims, array);
+        return with(NewMultiArrayInstruction.of(array, dims));
     }
 
     /**
@@ -2343,7 +2192,7 @@ default CodeBuilder multianewarray(ClassEntry array, int dims) {
      * @throws IllegalArgumentException if {@code array} represents a primitive type
      */
     default CodeBuilder multianewarray(ClassDesc array, int dims) {
-        return newMultidimensionalArrayInstruction(dims, constantPool().classEntry(array));
+        return multianewarray(constantPool().classEntry(array), dims);
     }
 
     /**
@@ -2352,7 +2201,7 @@ default CodeBuilder multianewarray(ClassDesc array, int dims) {
      * @return this builder
      */
     default CodeBuilder new_(ClassEntry clazz) {
-        return newObjectInstruction(clazz);
+        return with(NewObjectInstruction.of(clazz));
     }
 
     /**
@@ -2362,7 +2211,7 @@ default CodeBuilder new_(ClassEntry clazz) {
      * @throws IllegalArgumentException if {@code clazz} represents a primitive type
      */
     default CodeBuilder new_(ClassDesc clazz) {
-        return newObjectInstruction(constantPool().classEntry(clazz));
+        return new_(constantPool().classEntry(clazz));
     }
 
     /**
@@ -2371,7 +2220,7 @@ default CodeBuilder new_(ClassDesc clazz) {
      * @return this builder
      */
     default CodeBuilder newarray(TypeKind typeKind) {
-        return newPrimitiveArrayInstruction(typeKind);
+        return with(NewPrimitiveArrayInstruction.of(typeKind));
     }
 
     /**
@@ -2379,7 +2228,7 @@ default CodeBuilder newarray(TypeKind typeKind) {
      * @return this builder
      */
     default CodeBuilder pop() {
-        return stackInstruction(Opcode.POP);
+        return with(StackInstruction.of(Opcode.POP));
     }
 
     /**
@@ -2387,7 +2236,7 @@ default CodeBuilder pop() {
      * @return this builder
      */
     default CodeBuilder pop2() {
-        return stackInstruction(Opcode.POP2);
+        return with(StackInstruction.of(Opcode.POP2));
     }
 
     /**
@@ -2396,7 +2245,7 @@ default CodeBuilder pop2() {
      * @return this builder
      */
     default CodeBuilder putfield(FieldRefEntry ref) {
-        return fieldInstruction(Opcode.PUTFIELD, ref);
+        return fieldAccess(Opcode.PUTFIELD, ref);
     }
 
     /**
@@ -2408,7 +2257,7 @@ default CodeBuilder putfield(FieldRefEntry ref) {
      * @throws IllegalArgumentException if {@code owner} represents a primitive type
      */
     default CodeBuilder putfield(ClassDesc owner, String name, ClassDesc type) {
-        return fieldInstruction(Opcode.PUTFIELD, owner, name, type);
+        return fieldAccess(Opcode.PUTFIELD, owner, name, type);
     }
 
     /**
@@ -2417,7 +2266,7 @@ default CodeBuilder putfield(ClassDesc owner, String name, ClassDesc type) {
      * @return this builder
      */
     default CodeBuilder putstatic(FieldRefEntry ref) {
-        return fieldInstruction(Opcode.PUTSTATIC, ref);
+        return fieldAccess(Opcode.PUTSTATIC, ref);
     }
 
     /**
@@ -2429,7 +2278,7 @@ default CodeBuilder putstatic(FieldRefEntry ref) {
      * @throws IllegalArgumentException if {@code owner} represents a primitive type
      */
     default CodeBuilder putstatic(ClassDesc owner, String name, ClassDesc type) {
-        return fieldInstruction(Opcode.PUTSTATIC, owner, name, type);
+        return fieldAccess(Opcode.PUTSTATIC, owner, name, type);
     }
 
     /**
@@ -2437,7 +2286,7 @@ default CodeBuilder putstatic(ClassDesc owner, String name, ClassDesc type) {
      * @return this builder
      */
     default CodeBuilder return_() {
-        return returnInstruction(TypeKind.VoidType);
+        return return_(TypeKind.VoidType);
     }
 
     /**
@@ -2445,7 +2294,7 @@ default CodeBuilder return_() {
      * @return this builder
      */
     default CodeBuilder saload() {
-        return arrayLoadInstruction(TypeKind.ShortType);
+        return arrayLoad(TypeKind.ShortType);
     }
 
     /**
@@ -2453,7 +2302,7 @@ default CodeBuilder saload() {
      * @return this builder
      */
     default CodeBuilder sastore() {
-        return arrayStoreInstruction(TypeKind.ShortType);
+        return arrayStore(TypeKind.ShortType);
     }
 
     /**
@@ -2462,7 +2311,7 @@ default CodeBuilder sastore() {
      * @return this builder
      */
     default CodeBuilder sipush(int s) {
-        return constantInstruction(Opcode.SIPUSH, s);
+        return loadConstant(Opcode.SIPUSH, s);
     }
 
     /**
@@ -2470,7 +2319,7 @@ default CodeBuilder sipush(int s) {
      * @return this builder
      */
     default CodeBuilder swap() {
-        return stackInstruction(Opcode.SWAP);
+        return with(StackInstruction.of(Opcode.SWAP));
     }
 
     /**
@@ -2482,7 +2331,7 @@ default CodeBuilder swap() {
      * @return this builder
      */
     default CodeBuilder tableswitch(int low, int high, Label defaultTarget, List cases) {
-        return tableSwitchInstruction(low, high, defaultTarget, cases);
+        return with(TableSwitchInstruction.of(low, high, defaultTarget, cases));
     }
 
     /**
@@ -2499,6 +2348,6 @@ default CodeBuilder tableswitch(Label defaultTarget, List cases) {
             if (i < low) low = i;
             if (i > high) high = i;
         }
-        return tableSwitchInstruction(low, high, defaultTarget, cases);
+        return tableswitch(low, high, defaultTarget, cases);
     }
 }
diff --git a/src/java.base/share/classes/java/lang/classfile/package-info.java b/src/java.base/share/classes/java/lang/classfile/package-info.java
index e7e75d5abc3..0c4919067d5 100644
--- a/src/java.base/share/classes/java/lang/classfile/package-info.java
+++ b/src/java.base/share/classes/java/lang/classfile/package-info.java
@@ -228,7 +228,7 @@
  * instruction invoking {@code println} could have been generated with {@link
  * java.lang.classfile.CodeBuilder#invokevirtual(java.lang.constant.ClassDesc,
  * java.lang.String, java.lang.constant.MethodTypeDesc) CodeBuilder.invokevirtual}, {@link
- * java.lang.classfile.CodeBuilder#invokeInstruction(java.lang.classfile.Opcode,
+ * java.lang.classfile.CodeBuilder#invoke(java.lang.classfile.Opcode,
  * java.lang.constant.ClassDesc, java.lang.String, java.lang.constant.MethodTypeDesc,
  * boolean) CodeBuilder.invokeInstruction}, or {@link
  * java.lang.classfile.CodeBuilder#with(java.lang.classfile.ClassFileElement)
diff --git a/src/java.base/share/classes/java/lang/classfile/snippet-files/PackageSnippets.java b/src/java.base/share/classes/java/lang/classfile/snippet-files/PackageSnippets.java
index 3776c6f66e9..5073e108465 100644
--- a/src/java.base/share/classes/java/lang/classfile/snippet-files/PackageSnippets.java
+++ b/src/java.base/share/classes/java/lang/classfile/snippet-files/PackageSnippets.java
@@ -213,7 +213,7 @@ void fooToBarTransform() {
             if (e instanceof InvokeInstruction i
                     && i.owner().asInternalName().equals("Foo")
                     && i.opcode() == Opcode.INVOKESTATIC)
-                        b.invokeInstruction(i.opcode(), CD_Bar, i.name().stringValue(), i.typeSymbol(), i.isInterface());
+                        b.invoke(i.opcode(), CD_Bar, i.name().stringValue(), i.typeSymbol(), i.isInterface());
             else b.with(e);
         };
         // @end
@@ -327,7 +327,7 @@ void fooToBarUnrolled(ClassModel classModel) {
                                               for (CodeElement e : xm) {
                                                   if (e instanceof InvokeInstruction i && i.owner().asInternalName().equals("Foo")
                                                                                && i.opcode() == Opcode.INVOKESTATIC)
-                                                              codeBuilder.invokeInstruction(i.opcode(), CD_Bar,
+                                                              codeBuilder.invoke(i.opcode(), CD_Bar,
                                                                                             i.name().stringValue(), i.typeSymbol(), i.isInterface());
                                                   else codeBuilder.with(e);
                                               }});
diff --git a/src/java.base/share/classes/java/lang/constant/ClassDesc.java b/src/java.base/share/classes/java/lang/constant/ClassDesc.java
index f645fbd1141..89be851dbf5 100644
--- a/src/java.base/share/classes/java/lang/constant/ClassDesc.java
+++ b/src/java.base/share/classes/java/lang/constant/ClassDesc.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@ public sealed interface ClassDesc
         extends ConstantDesc,
                 TypeDescriptor.OfField
         permits PrimitiveClassDescImpl,
-                ClassDescImpl {
+                ReferenceClassDescImpl {
 
     /**
      * Returns a {@linkplain ClassDesc} for a class or interface type,
@@ -158,20 +158,11 @@ static ClassDesc of(String packageName, String className) {
      * @see ClassDesc#ofInternalName(String)
      */
     static ClassDesc ofDescriptor(String descriptor) {
-        requireNonNull(descriptor);
-        if (descriptor.isEmpty()) {
-            throw new IllegalArgumentException(
-                    "not a valid reference type descriptor: " + descriptor);
-        }
-        int depth = ConstantUtils.arrayDepth(descriptor);
-        if (depth > ConstantUtils.MAX_ARRAY_TYPE_DESC_DIMENSIONS) {
-            throw new IllegalArgumentException(
-                    "Cannot create an array type descriptor with more than " +
-                    ConstantUtils.MAX_ARRAY_TYPE_DESC_DIMENSIONS + " dimensions");
-        }
+        // implicit null-check
         return (descriptor.length() == 1)
-               ? new PrimitiveClassDescImpl(descriptor)
-               : new ClassDescImpl(descriptor);
+               ? Wrapper.forPrimitiveType(descriptor.charAt(0)).classDescriptor()
+               // will throw IAE on descriptor.length == 0 or if array dimensions too long
+               : new ReferenceClassDescImpl(descriptor);
     }
 
     /**
@@ -279,7 +270,7 @@ default ClassDesc nested(String firstNestedName, String... moreNestedNames) {
      * @return whether this {@linkplain ClassDesc} describes an array type
      */
     default boolean isArray() {
-        return descriptorString().startsWith("[");
+        return descriptorString().charAt(0) == '[';
     }
 
     /**
@@ -297,7 +288,7 @@ default boolean isPrimitive() {
      * @return whether this {@linkplain ClassDesc} describes a class or interface type
      */
     default boolean isClassOrInterface() {
-        return descriptorString().startsWith("L");
+        return descriptorString().charAt(0) == 'L';
     }
 
     /**
diff --git a/src/java.base/share/classes/java/lang/constant/ConstantDescs.java b/src/java.base/share/classes/java/lang/constant/ConstantDescs.java
index 82f56b7cbd4..a67a16643c3 100644
--- a/src/java.base/share/classes/java/lang/constant/ConstantDescs.java
+++ b/src/java.base/share/classes/java/lang/constant/ConstantDescs.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -64,125 +64,125 @@ private ConstantDescs() { }
     // Don't change the order of these declarations!
 
     /** {@link ClassDesc} representing {@link Object} */
-    public static final ClassDesc CD_Object = ClassDesc.of("java.lang.Object");
+    public static final ClassDesc CD_Object = new ReferenceClassDescImpl("Ljava/lang/Object;");
 
     /** {@link ClassDesc} representing {@link String} */
-    public static final ClassDesc CD_String = ClassDesc.of("java.lang.String");
+    public static final ClassDesc CD_String = new ReferenceClassDescImpl("Ljava/lang/String;");
 
     /** {@link ClassDesc} representing {@link Class} */
-    public static final ClassDesc CD_Class = ClassDesc.of("java.lang.Class");
+    public static final ClassDesc CD_Class = new ReferenceClassDescImpl("Ljava/lang/Class;");
 
     /** {@link ClassDesc} representing {@link Number} */
-    public static final ClassDesc CD_Number = ClassDesc.of("java.lang.Number");
+    public static final ClassDesc CD_Number = new ReferenceClassDescImpl("Ljava/lang/Number;");
 
     /** {@link ClassDesc} representing {@link Integer} */
-    public static final ClassDesc CD_Integer = ClassDesc.of("java.lang.Integer");
+    public static final ClassDesc CD_Integer = new ReferenceClassDescImpl("Ljava/lang/Integer;");
 
     /** {@link ClassDesc} representing {@link Long} */
-    public static final ClassDesc CD_Long = ClassDesc.of("java.lang.Long");
+    public static final ClassDesc CD_Long = new ReferenceClassDescImpl("Ljava/lang/Long;");
 
     /** {@link ClassDesc} representing {@link Float} */
-    public static final ClassDesc CD_Float = ClassDesc.of("java.lang.Float");
+    public static final ClassDesc CD_Float = new ReferenceClassDescImpl("Ljava/lang/Float;");
 
     /** {@link ClassDesc} representing {@link Double} */
-    public static final ClassDesc CD_Double = ClassDesc.of("java.lang.Double");
+    public static final ClassDesc CD_Double = new ReferenceClassDescImpl("Ljava/lang/Double;");
 
     /** {@link ClassDesc} representing {@link Short} */
-    public static final ClassDesc CD_Short = ClassDesc.of("java.lang.Short");
+    public static final ClassDesc CD_Short = new ReferenceClassDescImpl("Ljava/lang/Short;");
 
     /** {@link ClassDesc} representing {@link Byte} */
-    public static final ClassDesc CD_Byte = ClassDesc.of("java.lang.Byte");
+    public static final ClassDesc CD_Byte = new ReferenceClassDescImpl("Ljava/lang/Byte;");
 
     /** {@link ClassDesc} representing {@link Character} */
-    public static final ClassDesc CD_Character = ClassDesc.of("java.lang.Character");
+    public static final ClassDesc CD_Character = new ReferenceClassDescImpl("Ljava/lang/Character;");
 
     /** {@link ClassDesc} representing {@link Boolean} */
-    public static final ClassDesc CD_Boolean = ClassDesc.of("java.lang.Boolean");
+    public static final ClassDesc CD_Boolean = new ReferenceClassDescImpl("Ljava/lang/Boolean;");
 
     /** {@link ClassDesc} representing {@link Void} */
-    public static final ClassDesc CD_Void = ClassDesc.of("java.lang.Void");
+    public static final ClassDesc CD_Void = new ReferenceClassDescImpl("Ljava/lang/Void;");
 
     /** {@link ClassDesc} representing {@link Throwable} */
-    public static final ClassDesc CD_Throwable = ClassDesc.of("java.lang.Throwable");
+    public static final ClassDesc CD_Throwable = new ReferenceClassDescImpl("Ljava/lang/Throwable;");
 
     /** {@link ClassDesc} representing {@link Exception} */
-    public static final ClassDesc CD_Exception = ClassDesc.of("java.lang.Exception");
+    public static final ClassDesc CD_Exception = new ReferenceClassDescImpl("Ljava/lang/Exception;");
 
     /** {@link ClassDesc} representing {@link Enum} */
-    public static final ClassDesc CD_Enum = ClassDesc.of("java.lang.Enum");
+    public static final ClassDesc CD_Enum = new ReferenceClassDescImpl("Ljava/lang/Enum;");
 
     /** {@link ClassDesc} representing {@link VarHandle} */
-    public static final ClassDesc CD_VarHandle = ClassDesc.of("java.lang.invoke.VarHandle");
+    public static final ClassDesc CD_VarHandle = new ReferenceClassDescImpl("Ljava/lang/invoke/VarHandle;");
 
     /** {@link ClassDesc} representing {@link MethodHandles} */
-    public static final ClassDesc CD_MethodHandles = ClassDesc.of("java.lang.invoke.MethodHandles");
+    public static final ClassDesc CD_MethodHandles = new ReferenceClassDescImpl("Ljava/lang/invoke/MethodHandles;");
 
     /** {@link ClassDesc} representing {@link MethodHandles.Lookup} */
-    public static final ClassDesc CD_MethodHandles_Lookup = CD_MethodHandles.nested("Lookup");
+    public static final ClassDesc CD_MethodHandles_Lookup = new ReferenceClassDescImpl("Ljava/lang/invoke/MethodHandles$Lookup;");
 
     /** {@link ClassDesc} representing {@link MethodHandle} */
-    public static final ClassDesc CD_MethodHandle = ClassDesc.of("java.lang.invoke.MethodHandle");
+    public static final ClassDesc CD_MethodHandle = new ReferenceClassDescImpl("Ljava/lang/invoke/MethodHandle;");
 
     /** {@link ClassDesc} representing {@link MethodType} */
-    public static final ClassDesc CD_MethodType = ClassDesc.of("java.lang.invoke.MethodType");
+    public static final ClassDesc CD_MethodType = new ReferenceClassDescImpl("Ljava/lang/invoke/MethodType;");
 
     /** {@link ClassDesc} representing {@link CallSite} */
-    public static final ClassDesc CD_CallSite = ClassDesc.of("java.lang.invoke.CallSite");
+    public static final ClassDesc CD_CallSite = new ReferenceClassDescImpl("Ljava/lang/invoke/CallSite;");
 
     /** {@link ClassDesc} representing {@link Collection} */
-    public static final ClassDesc CD_Collection = ClassDesc.of("java.util.Collection");
+    public static final ClassDesc CD_Collection = new ReferenceClassDescImpl("Ljava/util/Collection;");
 
     /** {@link ClassDesc} representing {@link List} */
-    public static final ClassDesc CD_List = ClassDesc.of("java.util.List");
+    public static final ClassDesc CD_List = new ReferenceClassDescImpl("Ljava/util/List;");
 
     /** {@link ClassDesc} representing {@link Set} */
-    public static final ClassDesc CD_Set = ClassDesc.of("java.util.Set");
+    public static final ClassDesc CD_Set = new ReferenceClassDescImpl("Ljava/util/Set;");
 
     /** {@link ClassDesc} representing {@link Map} */
-    public static final ClassDesc CD_Map = ClassDesc.of("java.util.Map");
+    public static final ClassDesc CD_Map = new ReferenceClassDescImpl("Ljava/util/Map;");
 
     /** {@link ClassDesc} representing {@link ConstantDesc} */
-    public static final ClassDesc CD_ConstantDesc = ClassDesc.of("java.lang.constant.ConstantDesc");
+    public static final ClassDesc CD_ConstantDesc = new ReferenceClassDescImpl("Ljava/lang/constant/ConstantDesc;");
 
     /** {@link ClassDesc} representing {@link ClassDesc} */
-    public static final ClassDesc CD_ClassDesc = ClassDesc.of("java.lang.constant.ClassDesc");
+    public static final ClassDesc CD_ClassDesc = new ReferenceClassDescImpl("Ljava/lang/constant/ClassDesc;");
 
     /** {@link ClassDesc} representing {@link EnumDesc} */
-    public static final ClassDesc CD_EnumDesc = CD_Enum.nested("EnumDesc");
+    public static final ClassDesc CD_EnumDesc = new ReferenceClassDescImpl("Ljava/lang/Enum$EnumDesc;");
 
     /** {@link ClassDesc} representing {@link MethodTypeDesc} */
-    public static final ClassDesc CD_MethodTypeDesc = ClassDesc.of("java.lang.constant.MethodTypeDesc");
+    public static final ClassDesc CD_MethodTypeDesc = new ReferenceClassDescImpl("Ljava/lang/constant/MethodTypeDesc;");
 
     /** {@link ClassDesc} representing {@link MethodHandleDesc} */
-    public static final ClassDesc CD_MethodHandleDesc = ClassDesc.of("java.lang.constant.MethodHandleDesc");
+    public static final ClassDesc CD_MethodHandleDesc = new ReferenceClassDescImpl("Ljava/lang/constant/MethodHandleDesc;");
 
     /** {@link ClassDesc} representing {@link DirectMethodHandleDesc} */
-    public static final ClassDesc CD_DirectMethodHandleDesc = ClassDesc.of("java.lang.constant.DirectMethodHandleDesc");
+    public static final ClassDesc CD_DirectMethodHandleDesc = new ReferenceClassDescImpl("Ljava/lang/constant/DirectMethodHandleDesc;");
 
     /** {@link ClassDesc} representing {@link VarHandleDesc} */
-    public static final ClassDesc CD_VarHandleDesc = CD_VarHandle.nested("VarHandleDesc");
+    public static final ClassDesc CD_VarHandleDesc = new ReferenceClassDescImpl("Ljava/lang/invoke/VarHandle$VarHandleDesc;");
 
     /** {@link ClassDesc} representing {@link DirectMethodHandleDesc.Kind} */
-    public static final ClassDesc CD_MethodHandleDesc_Kind = CD_DirectMethodHandleDesc.nested("Kind");
+    public static final ClassDesc CD_MethodHandleDesc_Kind = new ReferenceClassDescImpl("Ljava/lang/constant/DirectMethodHandleDesc$Kind;");
 
     /** {@link ClassDesc} representing {@link DynamicConstantDesc} */
-    public static final ClassDesc CD_DynamicConstantDesc = ClassDesc.of("java.lang.constant.DynamicConstantDesc");
+    public static final ClassDesc CD_DynamicConstantDesc = new ReferenceClassDescImpl("Ljava/lang/constant/DynamicConstantDesc;");
 
     /** {@link ClassDesc} representing {@link DynamicCallSiteDesc} */
-    public static final ClassDesc CD_DynamicCallSiteDesc = ClassDesc.of("java.lang.constant.DynamicCallSiteDesc");
+    public static final ClassDesc CD_DynamicCallSiteDesc = new ReferenceClassDescImpl("Ljava/lang/constant/DynamicCallSiteDesc;");
 
     /** {@link ClassDesc} representing {@link ConstantBootstraps} */
-    public static final ClassDesc CD_ConstantBootstraps = ClassDesc.of("java.lang.invoke.ConstantBootstraps");
+    public static final ClassDesc CD_ConstantBootstraps = new ReferenceClassDescImpl("Ljava/lang/invoke/ConstantBootstraps;");
 
     private static final ClassDesc[] INDY_BOOTSTRAP_ARGS = {
-            ConstantDescs.CD_MethodHandles_Lookup,
-            ConstantDescs.CD_String,
-            ConstantDescs.CD_MethodType};
+            CD_MethodHandles_Lookup,
+            CD_String,
+            CD_MethodType};
 
     private static final ClassDesc[] CONDY_BOOTSTRAP_ARGS = {
-            ConstantDescs.CD_MethodHandles_Lookup,
-            ConstantDescs.CD_String,
-            ConstantDescs.CD_Class};
+            CD_MethodHandles_Lookup,
+            CD_String,
+            CD_Class};
 
     /** {@link MethodHandleDesc} representing {@link ConstantBootstraps#primitiveClass(Lookup, String, Class) ConstantBootstraps.primitiveClass} */
     public static final DirectMethodHandleDesc BSM_PRIMITIVE_CLASS
@@ -236,31 +236,31 @@ private ConstantDescs() { }
             CD_Object, CD_Object);
 
     /** {@link ClassDesc} representing the primitive type {@code int} */
-    public static final ClassDesc CD_int = ClassDesc.ofDescriptor("I");
+    public static final ClassDesc CD_int = new PrimitiveClassDescImpl("I");
 
     /** {@link ClassDesc} representing the primitive type {@code long} */
-    public static final ClassDesc CD_long = ClassDesc.ofDescriptor("J");
+    public static final ClassDesc CD_long = new PrimitiveClassDescImpl("J");
 
     /** {@link ClassDesc} representing the primitive type {@code float} */
-    public static final ClassDesc CD_float = ClassDesc.ofDescriptor("F");
+    public static final ClassDesc CD_float = new PrimitiveClassDescImpl("F");
 
     /** {@link ClassDesc} representing the primitive type {@code double} */
-    public static final ClassDesc CD_double = ClassDesc.ofDescriptor("D");
+    public static final ClassDesc CD_double = new PrimitiveClassDescImpl("D");
 
     /** {@link ClassDesc} representing the primitive type {@code short} */
-    public static final ClassDesc CD_short = ClassDesc.ofDescriptor("S");
+    public static final ClassDesc CD_short = new PrimitiveClassDescImpl("S");
 
     /** {@link ClassDesc} representing the primitive type {@code byte} */
-    public static final ClassDesc CD_byte = ClassDesc.ofDescriptor("B");
+    public static final ClassDesc CD_byte = new PrimitiveClassDescImpl("B");
 
     /** {@link ClassDesc} representing the primitive type {@code char} */
-    public static final ClassDesc CD_char = ClassDesc.ofDescriptor("C");
+    public static final ClassDesc CD_char = new PrimitiveClassDescImpl("C");
 
     /** {@link ClassDesc} representing the primitive type {@code boolean} */
-    public static final ClassDesc CD_boolean = ClassDesc.ofDescriptor("Z");
+    public static final ClassDesc CD_boolean = new PrimitiveClassDescImpl("Z");
 
     /** {@link ClassDesc} representing the primitive type {@code void} */
-    public static final ClassDesc CD_void = ClassDesc.ofDescriptor("V");
+    public static final ClassDesc CD_void = new PrimitiveClassDescImpl("V");
 
     /**
      * {@link MethodHandleDesc} representing {@link MethodHandles#classData(Lookup, String, Class) MethodHandles.classData}
diff --git a/src/java.base/share/classes/java/lang/constant/ConstantUtils.java b/src/java.base/share/classes/java/lang/constant/ConstantUtils.java
index 37bb75cf3d8..d8a1ccd543b 100644
--- a/src/java.base/share/classes/java/lang/constant/ConstantUtils.java
+++ b/src/java.base/share/classes/java/lang/constant/ConstantUtils.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
  */
 package java.lang.constant;
 
+import sun.invoke.util.Wrapper;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
@@ -144,7 +146,6 @@ public static String validateModuleName(String name) {
      * @throws IllegalArgumentException if the member name is invalid
      */
     public static String validateMemberName(String name, boolean method) {
-        requireNonNull(name);
         if (name.length() == 0)
             throw new IllegalArgumentException("zero-length member name");
         for (int i=0; i parseMethodDescriptor(String descriptor) {
+    static List parseMethodDescriptor(String descriptor) {
         int cur = 0, end = descriptor.length();
-        ArrayList ptypes = new ArrayList<>();
+        ArrayList ptypes = new ArrayList<>();
+        ptypes.add(null); // placeholder for return type
 
         if (cur >= end || descriptor.charAt(cur) != '(')
             throw new IllegalArgumentException("Bad method descriptor: " + descriptor);
@@ -207,7 +209,7 @@ static List parseMethodDescriptor(String descriptor) {
             int len = skipOverFieldSignature(descriptor, cur, end, false);
             if (len == 0)
                 throw new IllegalArgumentException("Bad method descriptor: " + descriptor);
-            ptypes.add(descriptor.substring(cur, cur + len));
+            ptypes.add(resolveClassDesc(descriptor, cur, len));
             cur += len;
         }
         if (cur >= end)
@@ -217,10 +219,17 @@ static List parseMethodDescriptor(String descriptor) {
         int rLen = skipOverFieldSignature(descriptor, cur, end, true);
         if (rLen == 0 || cur + rLen != end)
             throw new IllegalArgumentException("Bad method descriptor: " + descriptor);
-        ptypes.add(0, descriptor.substring(cur, cur + rLen));
+        ptypes.set(0, resolveClassDesc(descriptor, cur, rLen));
         return ptypes;
     }
 
+    private static ClassDesc resolveClassDesc(String descriptor, int start, int len) {
+        if (len == 1) {
+            return Wrapper.forPrimitiveType(descriptor.charAt(start)).classDescriptor();
+        }
+        return ClassDesc.ofDescriptor(descriptor.substring(start, start + len));
+    }
+
     private static final char JVM_SIGNATURE_ARRAY = '[';
     private static final char JVM_SIGNATURE_BYTE = 'B';
     private static final char JVM_SIGNATURE_CHAR = 'C';
diff --git a/src/java.base/share/classes/java/lang/constant/DirectMethodHandleDescImpl.java b/src/java.base/share/classes/java/lang/constant/DirectMethodHandleDescImpl.java
index 77f61d83133..47aa3dc36d2 100644
--- a/src/java.base/share/classes/java/lang/constant/DirectMethodHandleDescImpl.java
+++ b/src/java.base/share/classes/java/lang/constant/DirectMethodHandleDescImpl.java
@@ -67,8 +67,8 @@ final class DirectMethodHandleDescImpl implements DirectMethodHandleDesc {
             name = "";
 
         requireNonNull(kind);
-        validateClassOrInterface(requireNonNull(owner));
-        validateMemberName(requireNonNull(name), true);
+        validateClassOrInterface(owner);
+        validateMemberName(name, true);
         requireNonNull(type);
 
         switch (kind) {
diff --git a/src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java b/src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java
index bf6ae2670b1..180841cd798 100644
--- a/src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java
+++ b/src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java
@@ -87,12 +87,9 @@ protected DynamicConstantDesc(DirectMethodHandleDesc bootstrapMethod,
                                   ClassDesc constantType,
                                   ConstantDesc... bootstrapArgs) {
         this.bootstrapMethod = requireNonNull(bootstrapMethod);
-        this.constantName = validateMemberName(requireNonNull(constantName), true);
+        this.constantName = validateMemberName(constantName, true);
         this.constantType = requireNonNull(constantType);
-        this.bootstrapArgs = requireNonNull(bootstrapArgs).clone();
-
-        if (constantName.length() == 0)
-            throw new IllegalArgumentException("Illegal invocation name: " + constantName);
+        this.bootstrapArgs = bootstrapArgs.length == 0 ? EMPTY_CONSTANTDESC : bootstrapArgs.clone();
     }
 
     /**
diff --git a/src/java.base/share/classes/java/lang/constant/MethodTypeDescImpl.java b/src/java.base/share/classes/java/lang/constant/MethodTypeDescImpl.java
index c50cf7c58f0..7ee0995439a 100644
--- a/src/java.base/share/classes/java/lang/constant/MethodTypeDescImpl.java
+++ b/src/java.base/share/classes/java/lang/constant/MethodTypeDescImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,6 @@
 import java.util.Arrays;
 import java.util.List;
 import java.util.Objects;
-import java.util.StringJoiner;
 
 import static java.util.Objects.requireNonNull;
 
@@ -55,8 +54,8 @@ final class MethodTypeDescImpl implements MethodTypeDesc {
      * @param validatedArgTypes {@link ClassDesc}s describing the trusted and validated parameter types
      */
     private MethodTypeDescImpl(ClassDesc returnType, ClassDesc[] validatedArgTypes) {
-        this.returnType = requireNonNull(returnType);
-        this.argTypes = requireNonNull(validatedArgTypes);
+        this.returnType = returnType;
+        this.argTypes = validatedArgTypes;
     }
 
     /**
@@ -67,12 +66,12 @@ private MethodTypeDescImpl(ClassDesc returnType, ClassDesc[] validatedArgTypes)
      * @param trustedArgTypes {@link ClassDesc}s describing the trusted parameter types
      */
     static MethodTypeDescImpl ofTrusted(ClassDesc returnType, ClassDesc[] trustedArgTypes) {
-        Objects.requireNonNull(returnType);
+        requireNonNull(returnType);
         if (trustedArgTypes.length == 0) // implicit null check
             return new MethodTypeDescImpl(returnType, ConstantUtils.EMPTY_CLASSDESC);
 
         for (ClassDesc cd : trustedArgTypes)
-            if (cd.isPrimitive() && cd.descriptorString().charAt(0) == 'V') // implicit null check
+            if (cd.descriptorString().charAt(0) == 'V') // implicit null check
                 throw new IllegalArgumentException("Void parameters not permitted");
 
         return new MethodTypeDescImpl(returnType, trustedArgTypes);
@@ -88,21 +87,19 @@ static MethodTypeDescImpl ofTrusted(ClassDesc returnType, ClassDesc[] trustedArg
      * @jvms 4.3.3 Method Descriptors
      */
     static MethodTypeDescImpl ofDescriptor(String descriptor) {
-        requireNonNull(descriptor);
-
-        List types = ConstantUtils.parseMethodDescriptor(descriptor);
-
-        int paramCount = types.size() - 1;
-        var paramTypes = paramCount > 0 ? new ClassDesc[paramCount] : ConstantUtils.EMPTY_CLASSDESC;
-        for (int i = 0; i < paramCount; i++) {
-            paramTypes[i] = ClassDesc.ofDescriptor(types.get(i + 1));
-        }
-
-        MethodTypeDescImpl result = ofTrusted(ClassDesc.ofDescriptor(types.getFirst()), paramTypes);
+        // Implicit null-check of descriptor
+        List ptypes = ConstantUtils.parseMethodDescriptor(descriptor);
+        int args = ptypes.size() - 1;
+        ClassDesc[] paramTypes = args > 0
+                ? ptypes.subList(1, args + 1).toArray(ConstantUtils.EMPTY_CLASSDESC)
+                : ConstantUtils.EMPTY_CLASSDESC;
+
+        MethodTypeDescImpl result = ofTrusted(ptypes.get(0), paramTypes);
         result.cachedDescriptorString = descriptor;
         return result;
     }
 
+
     @Override
     public ClassDesc returnType() {
         return returnType;
@@ -130,7 +127,7 @@ public ClassDesc[] parameterArray() {
 
     @Override
     public MethodTypeDesc changeReturnType(ClassDesc returnType) {
-        return new MethodTypeDescImpl(returnType, argTypes);
+        return new MethodTypeDescImpl(requireNonNull(returnType), argTypes);
     }
 
     @Override
@@ -146,8 +143,12 @@ public MethodTypeDesc dropParameterTypes(int start, int end) {
         Objects.checkFromToIndex(start, end, argTypes.length);
 
         ClassDesc[] newArgs = new ClassDesc[argTypes.length - (end - start)];
-        System.arraycopy(argTypes, 0, newArgs, 0, start);
-        System.arraycopy(argTypes, end, newArgs, start, argTypes.length - end);
+        if (start > 0) {
+            System.arraycopy(argTypes, 0, newArgs, 0, start);
+        }
+        if (end < argTypes.length) {
+            System.arraycopy(argTypes, end, newArgs, start, argTypes.length - end);
+        }
         return ofTrusted(returnType, newArgs);
     }
 
@@ -157,10 +158,13 @@ public MethodTypeDesc insertParameterTypes(int pos, ClassDesc... paramTypes) {
             throw new IndexOutOfBoundsException(pos);
 
         ClassDesc[] newArgs = new ClassDesc[argTypes.length + paramTypes.length];
-        System.arraycopy(argTypes, 0, newArgs, 0, pos);
+        if (pos > 0) {
+            System.arraycopy(argTypes, 0, newArgs, 0, pos);
+        }
         System.arraycopy(paramTypes, 0, newArgs, pos, paramTypes.length);
-        System.arraycopy(argTypes, pos, newArgs, pos+paramTypes.length, argTypes.length - pos);
-
+        if (pos < argTypes.length) {
+            System.arraycopy(argTypes, pos, newArgs, pos + paramTypes.length, argTypes.length - pos);
+        }
         return ofTrusted(returnType, newArgs);
     }
 
@@ -170,11 +174,17 @@ public String descriptorString() {
         if (desc != null)
             return desc;
 
-        var sj = new StringJoiner("", "(", ")" + returnType().descriptorString());
-        for (int i = 0; i < parameterCount(); i++) {
-            sj.add(parameterType(i).descriptorString());
+        int len = 2 + returnType.descriptorString().length();
+        for (ClassDesc argType : argTypes) {
+            len += argType.descriptorString().length();
+        }
+        StringBuilder sb = new StringBuilder(len).append('(');
+        for (ClassDesc argType : argTypes) {
+            sb.append(argType.descriptorString());
         }
-        return cachedDescriptorString = sj.toString();
+        desc = sb.append(')').append(returnType.descriptorString()).toString();
+        cachedDescriptorString = desc;
+        return desc;
     }
 
     @Override
diff --git a/src/java.base/share/classes/java/lang/constant/ClassDescImpl.java b/src/java.base/share/classes/java/lang/constant/ReferenceClassDescImpl.java
similarity index 90%
rename from src/java.base/share/classes/java/lang/constant/ClassDescImpl.java
rename to src/java.base/share/classes/java/lang/constant/ReferenceClassDescImpl.java
index 4e2b0d6791e..5e2aaa98442 100644
--- a/src/java.base/share/classes/java/lang/constant/ClassDescImpl.java
+++ b/src/java.base/share/classes/java/lang/constant/ReferenceClassDescImpl.java
@@ -31,10 +31,10 @@
 
 /**
  * A nominal descriptor for a class,
- * interface, or array type.  A {@linkplain ClassDescImpl} corresponds to a
+ * interface, or array type.  A {@linkplain ReferenceClassDescImpl} corresponds to a
  * {@code Constant_Class_info} entry in the constant pool of a classfile.
  */
-final class ClassDescImpl implements ClassDesc {
+final class ReferenceClassDescImpl implements ClassDesc {
     private final String descriptor;
 
     /**
@@ -46,11 +46,10 @@ final class ClassDescImpl implements ClassDesc {
      * field descriptor string, or does not describe a class or interface type
      * @jvms 4.3.2 Field Descriptors
      */
-    ClassDescImpl(String descriptor) {
-        requireNonNull(descriptor);
-        int len = ConstantUtils.skipOverFieldSignature(descriptor, 0, descriptor.length(), false);
-        if (len == 0 || len == 1
-            || len != descriptor.length())
+    ReferenceClassDescImpl(String descriptor) {
+        int dLen = descriptor.length();
+        int len = ConstantUtils.skipOverFieldSignature(descriptor, 0, dLen, false);
+        if (len <= 1 || len != dLen)
             throw new IllegalArgumentException(String.format("not a valid reference type descriptor: %s", descriptor));
         this.descriptor = descriptor;
     }
@@ -88,8 +87,8 @@ private boolean isPrimitiveArray() {
     }
 
     /**
-     * Returns {@code true} if this {@linkplain ClassDescImpl} is
-     * equal to another {@linkplain ClassDescImpl}.  Equality is
+     * Returns {@code true} if this {@linkplain ReferenceClassDescImpl} is
+     * equal to another {@linkplain ReferenceClassDescImpl}.  Equality is
      * determined by the two class descriptors having equal class descriptor
      * strings.
      *
diff --git a/src/java.base/share/classes/java/lang/foreign/Linker.java b/src/java.base/share/classes/java/lang/foreign/Linker.java
index fb325ef1d44..545a83984f8 100644
--- a/src/java.base/share/classes/java/lang/foreign/Linker.java
+++ b/src/java.base/share/classes/java/lang/foreign/Linker.java
@@ -88,7 +88,7 @@
  * {@snippet lang = java:
  * Linker linker = Linker.nativeLinker();
  * MethodHandle strlen = linker.downcallHandle(
- *     linker.defaultLookup().find("strlen").orElseThrow(),
+ *     linker.defaultLookup().findOrThrow("strlen"),
  *     FunctionDescriptor.of(JAVA_LONG, ADDRESS)
  * );
  * }
@@ -306,7 +306,7 @@
  * {@snippet lang = java:
  * Linker linker = Linker.nativeLinker();
  * MethodHandle qsort = linker.downcallHandle(
- *     linker.defaultLookup().find("qsort").orElseThrow(),
+ *     linker.defaultLookup().findOrThrow("qsort"),
  *         FunctionDescriptor.ofVoid(ADDRESS, JAVA_LONG, JAVA_LONG, ADDRESS)
  * );
  * }
@@ -397,12 +397,12 @@
  * Linker linker = Linker.nativeLinker();
  *
  * MethodHandle malloc = linker.downcallHandle(
- *     linker.defaultLookup().find("malloc").orElseThrow(),
+ *     linker.defaultLookup().findOrThrow("malloc"),
  *     FunctionDescriptor.of(ADDRESS, JAVA_LONG)
  * );
  *
  * MethodHandle free = linker.downcallHandle(
- *     linker.defaultLookup().find("free").orElseThrow(),
+ *     linker.defaultLookup().findOrThrow("free"),
  *     FunctionDescriptor.ofVoid(ADDRESS)
  * );
  * }
@@ -530,7 +530,7 @@
  * {@snippet lang = java:
  * Linker linker = Linker.nativeLinker();
  * MethodHandle printf = linker.downcallHandle(
- *     linker.defaultLookup().find("printf").orElseThrow(),
+ *     linker.defaultLookup().findOrThrow("printf"),
  *         FunctionDescriptor.of(JAVA_INT, ADDRESS, JAVA_INT, JAVA_INT, JAVA_INT),
  *         Linker.Option.firstVariadicArg(1) // first int is variadic
  * );
diff --git a/src/java.base/share/classes/java/lang/foreign/SymbolLookup.java b/src/java.base/share/classes/java/lang/foreign/SymbolLookup.java
index 9bfc7964322..3bc416b9c62 100644
--- a/src/java.base/share/classes/java/lang/foreign/SymbolLookup.java
+++ b/src/java.base/share/classes/java/lang/foreign/SymbolLookup.java
@@ -39,6 +39,7 @@
 import java.lang.invoke.MethodHandles;
 import java.nio.file.FileSystems;
 import java.nio.file.Path;
+import java.util.NoSuchElementException;
 import java.util.Objects;
 import java.util.Optional;
 import java.util.function.BiFunction;
@@ -79,7 +80,7 @@
  * {@snippet lang = java:
  * try (Arena arena = Arena.ofConfined()) {
  *     SymbolLookup libGL = SymbolLookup.libraryLookup("libGL.so", arena); // libGL.so loaded here
- *     MemorySegment glGetString = libGL.find("glGetString").orElseThrow();
+ *     MemorySegment glGetString = libGL.findOrThrow("glGetString");
  *     ...
  * } //  libGL.so unloaded here
  *}
@@ -93,7 +94,7 @@
  * System.loadLibrary("GL"); // libGL.so loaded here
  * ...
  * SymbolLookup libGL = SymbolLookup.loaderLookup();
- * MemorySegment glGetString = libGL.find("glGetString").orElseThrow();
+ * MemorySegment glGetString = libGL.findOrThrow("glGetString");
  * }
  *
  * This symbol lookup, which is known as a loader lookup, is dynamic with
@@ -130,7 +131,7 @@
  * {@snippet lang = java:
  * Linker nativeLinker = Linker.nativeLinker();
  * SymbolLookup stdlib = nativeLinker.defaultLookup();
- * MemorySegment malloc = stdlib.find("malloc").orElseThrow();
+ * MemorySegment malloc = stdlib.findOrThrow("malloc");
  *}
  *
  * @since 22
@@ -144,9 +145,40 @@ public interface SymbolLookup {
      * @param name the symbol name
      * @return a zero-length memory segment whose address indicates the address of
      *         the symbol, if found
+     * @see #findOrThrow(String)
      */
     Optional find(String name);
 
+    /**
+     * Returns the address of the symbol with the given name or throws an exception.
+     *

+ * This is equivalent to the following code, but is more efficient: + * to: + * {@snippet lang= java : + * String name = ... + * MemorySegment address = lookup.find(name) + * .orElseThrow(() -> new NoSuchElementException("Symbol not found: " + name)); + * } + * + * @param name the symbol name + * @return a zero-length memory segment whose address indicates the address of + * the symbol + * @throws NoSuchElementException if no symbol address can be found for the + * given name + * @see #find(String) + * + * @since 23 + */ + default MemorySegment findOrThrow(String name) { + Objects.requireNonNull(name); + Optional address = find(name); + // Avoid lambda capturing + if (address.isPresent()) { + return address.get(); + } + throw new NoSuchElementException("Symbol not found: " + name); + } + /** * {@return a composed symbol lookup that returns the result of finding the symbol * with this lookup if found, otherwise returns the result of finding diff --git a/src/java.base/share/classes/java/lang/foreign/package-info.java b/src/java.base/share/classes/java/lang/foreign/package-info.java index b2a6a5f4474..6594826e405 100644 --- a/src/java.base/share/classes/java/lang/foreign/package-info.java +++ b/src/java.base/share/classes/java/lang/foreign/package-info.java @@ -100,7 +100,7 @@ * Linker linker = Linker.nativeLinker(); * SymbolLookup stdlib = linker.defaultLookup(); * MethodHandle strlen = linker.downcallHandle( - * stdlib.find("strlen").orElseThrow(), + * stdlib.findOrThrow("strlen"), * FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS) * ); * @@ -111,7 +111,7 @@ *} * * Here, we obtain a {@linkplain java.lang.foreign.Linker#nativeLinker() native linker} - * and we use it to {@linkplain java.lang.foreign.SymbolLookup#find(java.lang.String) look up} + * and we use it to {@linkplain java.lang.foreign.SymbolLookup#findOrThrow(java.lang.String) look up} * the {@code strlen} function in the standard C library; a downcall method handle * targeting said function is subsequently * {@linkplain java.lang.foreign.Linker#downcallHandle(FunctionDescriptor, Linker.Option...) obtained}. diff --git a/src/java.base/share/classes/java/lang/foreign/snippet-files/Snippets.java b/src/java.base/share/classes/java/lang/foreign/snippet-files/Snippets.java index 95b9cce7541..f305586ac61 100644 --- a/src/java.base/share/classes/java/lang/foreign/snippet-files/Snippets.java +++ b/src/java.base/share/classes/java/lang/foreign/snippet-files/Snippets.java @@ -163,7 +163,7 @@ static class LinkerSnippets { void downcall() throws Throwable { Linker linker = Linker.nativeLinker(); MethodHandle strlen = linker.downcallHandle( - linker.defaultLookup().find("strlen").orElseThrow(), + linker.defaultLookup().findOrThrow("strlen"), FunctionDescriptor.of(JAVA_LONG, ADDRESS) ); @@ -177,7 +177,7 @@ void downcall() throws Throwable { void qsort() throws Throwable { Linker linker = Linker.nativeLinker(); MethodHandle qsort = linker.downcallHandle( - linker.defaultLookup().find("qsort").orElseThrow(), + linker.defaultLookup().findOrThrow("qsort"), FunctionDescriptor.ofVoid(ADDRESS, JAVA_LONG, JAVA_LONG, ADDRESS) ); @@ -208,12 +208,12 @@ void returnPointer() throws Throwable { Linker linker = Linker.nativeLinker(); MethodHandle malloc = linker.downcallHandle( - linker.defaultLookup().find("malloc").orElseThrow(), + linker.defaultLookup().findOrThrow("malloc"), FunctionDescriptor.of(ADDRESS, JAVA_LONG) ); MethodHandle free = linker.downcallHandle( - linker.defaultLookup().find("free").orElseThrow(), + linker.defaultLookup().findOrThrow("free"), FunctionDescriptor.ofVoid(ADDRESS) ); @@ -282,7 +282,7 @@ void variadicFunc() throws Throwable { Linker linker = Linker.nativeLinker(); MethodHandle printf = linker.downcallHandle( - linker.defaultLookup().find("printf").orElseThrow(), + linker.defaultLookup().findOrThrow("printf"), FunctionDescriptor.of(JAVA_INT, ADDRESS, JAVA_INT, JAVA_INT, JAVA_INT), Linker.Option.firstVariadicArg(1) // first int is variadic ); @@ -568,7 +568,7 @@ void header() throws Throwable { Linker linker = Linker.nativeLinker(); SymbolLookup stdlib = linker.defaultLookup(); MethodHandle strlen = linker.downcallHandle( - stdlib.find("strlen").orElseThrow(), + stdlib.findOrThrow("strlen"), FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS) ); @@ -626,14 +626,14 @@ static class SymbolLookupSnippets { void header() { try (Arena arena = Arena.ofConfined()) { SymbolLookup libGL = libraryLookup("libGL.so", arena); // libGL.so loaded here - MemorySegment glGetString = libGL.find("glGetString").orElseThrow(); + MemorySegment glGetString = libGL.findOrThrow("glGetString"); // ... } // libGL.so unloaded here System.loadLibrary("GL"); // libGL.so loaded here // ... SymbolLookup libGL = loaderLookup(); - MemorySegment glGetString = libGL.find("glGetString").orElseThrow(); + MemorySegment glGetString = libGL.findOrThrow("glGetString"); Arena arena = Arena.ofAuto(); @@ -647,7 +647,7 @@ void header() { Linker nativeLinker = Linker.nativeLinker(); SymbolLookup stdlib = nativeLinker.defaultLookup(); - MemorySegment malloc = stdlib.find("malloc").orElseThrow(); + MemorySegment malloc = stdlib.findOrThrow("malloc"); } } diff --git a/src/java.base/share/classes/java/lang/invoke/LambdaForm.java b/src/java.base/share/classes/java/lang/invoke/LambdaForm.java index 93b9cf299db..79845dd9570 100644 --- a/src/java.base/share/classes/java/lang/invoke/LambdaForm.java +++ b/src/java.base/share/classes/java/lang/invoke/LambdaForm.java @@ -575,7 +575,7 @@ boolean nameRefsAreLegal() { return true; } - /** Invoke this form on the given arguments. */ + // /** Invoke this form on the given arguments. */ // final Object invoke(Object... args) throws Throwable { // // NYI: fit this into the fast path? // return interpretWithArguments(args); @@ -927,9 +927,9 @@ private boolean forceInterpretation() { return invocationCounter == -1; } + /** Interpretively invoke this form on the given arguments. */ @Hidden @DontInline - /** Interpretively invoke this form on the given arguments. */ Object interpretWithArguments(Object... argumentValues) throws Throwable { if (TRACE_INTERPRETER) return interpretWithArgumentsTracing(argumentValues); @@ -944,9 +944,9 @@ Object interpretWithArguments(Object... argumentValues) throws Throwable { return rv; } + /** Evaluate a single Name within this form, applying its function to its arguments. */ @Hidden @DontInline - /** Evaluate a single Name within this form, applying its function to its arguments. */ Object interpretName(Name name, Object[] values) throws Throwable { if (TRACE_INTERPRETER) traceInterpreter("| interpretName", name.debugString(), (Object[]) null); diff --git a/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java b/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java index adef2a586ea..0a099bc8c08 100644 --- a/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java +++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java @@ -383,7 +383,7 @@ private static byte[] createTemplate(ClassLoader loader, ClassDesc proxyDesc, Cl // clb.withMethodBody(CLASS_INIT_NAME, MTD_void, ACC_STATIC, cob -> { - cob.constantInstruction(ifaceDesc); + cob.loadConstant(ifaceDesc); cob.putstatic(proxyDesc, TYPE_NAME, CD_Class); cob.return_(); }); @@ -407,7 +407,7 @@ private static byte[] createTemplate(ClassLoader loader, ClassDesc proxyDesc, Cl // this.m = callerBoundTarget.asType(xxType); cob.aload(0); cob.aload(3); - cob.constantInstruction(mi.desc); + cob.loadConstant(mi.desc); cob.invokevirtual(CD_MethodHandle, "asType", MTD_MethodHandle_MethodType); cob.putfield(proxyDesc, mi.fieldName, CD_MethodHandle); } @@ -424,12 +424,12 @@ private static byte[] createTemplate(ClassLoader loader, ClassDesc proxyDesc, Cl // check lookupClass cob.aload(0); cob.invokevirtual(CD_MethodHandles_Lookup, "lookupClass", MTD_Class); - cob.constantInstruction(proxyDesc); + cob.loadConstant(proxyDesc); cob.if_acmpne(failLabel); // check original access cob.aload(0); cob.invokevirtual(CD_MethodHandles_Lookup, "lookupModes", MTD_int); - cob.constantInstruction(Lookup.ORIGINAL); + cob.loadConstant(Lookup.ORIGINAL); cob.iand(); cob.ifeq(failLabel); // success @@ -453,11 +453,11 @@ private static byte[] createTemplate(ClassLoader loader, ClassDesc proxyDesc, Cl bcb.aload(0); bcb.getfield(proxyDesc, mi.fieldName, CD_MethodHandle); for (int j = 0; j < mi.desc.parameterCount(); j++) { - bcb.loadInstruction(TypeKind.from(mi.desc.parameterType(j)), + bcb.loadLocal(TypeKind.from(mi.desc.parameterType(j)), bcb.parameterSlot(j)); } bcb.invokevirtual(CD_MethodHandle, "invokeExact", mi.desc); - bcb.returnInstruction(TypeKind.from(mi.desc.returnType())); + bcb.return_(TypeKind.from(mi.desc.returnType())); }, ctb -> ctb // catch (Error | RuntimeException | Declared ex) { throw ex; } .catchingMulti(mi.thrown, CodeBuilder::athrow) diff --git a/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java b/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java index b918b756332..3499fd83525 100644 --- a/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java +++ b/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -27,16 +27,25 @@ import jdk.internal.access.JavaLangAccess; import jdk.internal.access.SharedSecrets; -import jdk.internal.javac.PreviewFeature; +import jdk.internal.misc.VM; +import jdk.internal.util.ClassFileDumper; import jdk.internal.vm.annotation.Stable; import sun.invoke.util.Wrapper; +import java.lang.classfile.ClassBuilder; +import java.lang.classfile.ClassFile; +import java.lang.classfile.CodeBuilder; +import java.lang.classfile.TypeKind; +import java.lang.constant.ClassDesc; +import java.lang.constant.ConstantDescs; +import java.lang.constant.MethodTypeDesc; import java.lang.invoke.MethodHandles.Lookup; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; +import java.lang.reflect.AccessFlag; import java.util.Objects; +import java.util.Set; +import java.util.function.Consumer; +import static java.lang.invoke.MethodHandles.Lookup.ClassOption.STRONG; import static java.lang.invoke.MethodType.methodType; /** @@ -98,6 +107,13 @@ */ public final class StringConcatFactory { + private static final int HIGH_ARITY_THRESHOLD; + + static { + String highArity = VM.getSavedProperty("java.lang.invoke.StringConcat.highArityThreshold"); + HIGH_ARITY_THRESHOLD = highArity != null ? Integer.parseInt(highArity) : 20; + } + /** * Tag used to demarcate an ordinary argument. */ @@ -354,9 +370,14 @@ public static CallSite makeConcatWithConstants(MethodHandles.Lookup lookup, } try { - return new ConstantCallSite( - generateMHInlineCopy(concatType, constantStrings) - .viewAsType(concatType, true)); + if (concatType.parameterCount() <= HIGH_ARITY_THRESHOLD) { + return new ConstantCallSite( + generateMHInlineCopy(concatType, constantStrings) + .viewAsType(concatType, true)); + } else { + return new ConstantCallSite( + SimpleStringBuilderStrategy.generate(lookup, concatType, constantStrings)); + } } catch (Error e) { // Pass through any error throw e; @@ -1032,4 +1053,140 @@ private StringConcatFactory() { // no instantiation } + /** + * Bytecode StringBuilder strategy. + * + *

This strategy emits StringBuilder chains as similar as possible + * to what javac would. No exact sizing of parameters or estimates. + */ + private static final class SimpleStringBuilderStrategy { + static final String METHOD_NAME = "concat"; + static final ClassDesc STRING_BUILDER = ClassDesc.ofDescriptor("Ljava/lang/StringBuilder;"); + static final ClassFileDumper DUMPER = + ClassFileDumper.getInstance("java.lang.invoke.StringConcatFactory.dump", "stringConcatClasses"); + static final MethodTypeDesc APPEND_BOOLEAN_TYPE = MethodTypeDesc.of(STRING_BUILDER, ConstantDescs.CD_boolean); + static final MethodTypeDesc APPEND_CHAR_TYPE = MethodTypeDesc.of(STRING_BUILDER, ConstantDescs.CD_char); + static final MethodTypeDesc APPEND_DOUBLE_TYPE = MethodTypeDesc.of(STRING_BUILDER, ConstantDescs.CD_double); + static final MethodTypeDesc APPEND_FLOAT_TYPE = MethodTypeDesc.of(STRING_BUILDER, ConstantDescs.CD_float); + static final MethodTypeDesc APPEND_INT_TYPE = MethodTypeDesc.of(STRING_BUILDER, ConstantDescs.CD_int); + static final MethodTypeDesc APPEND_LONG_TYPE = MethodTypeDesc.of(STRING_BUILDER, ConstantDescs.CD_long); + static final MethodTypeDesc APPEND_OBJECT_TYPE = MethodTypeDesc.of(STRING_BUILDER, ConstantDescs.CD_Object); + static final MethodTypeDesc APPEND_STRING_TYPE = MethodTypeDesc.of(STRING_BUILDER, ConstantDescs.CD_String); + static final MethodTypeDesc INT_CONSTRUCTOR_TYPE = MethodTypeDesc.of(ConstantDescs.CD_void, ConstantDescs.CD_int); + static final MethodTypeDesc TO_STRING_TYPE = MethodTypeDesc.of(ConstantDescs.CD_String); + + /** + * Ensure a capacity in the initial StringBuilder to accommodate all + * constants plus this factor times the number of arguments. + */ + static final int ARGUMENT_SIZE_FACTOR = 4; + + static final Set SET_OF_STRONG = Set.of(STRONG); + + private SimpleStringBuilderStrategy() { + // no instantiation + } + + private static MethodHandle generate(Lookup lookup, MethodType args, String[] constants) throws Exception { + String className = getClassName(lookup.lookupClass()); + + byte[] classBytes = ClassFile.of().build(ClassDesc.of(className), + new Consumer() { + @Override + public void accept(ClassBuilder clb) { + clb.withFlags(AccessFlag.FINAL, AccessFlag.SUPER, AccessFlag.SYNTHETIC) + .withMethodBody(METHOD_NAME, + MethodTypeDesc.ofDescriptor(args.toMethodDescriptorString()), + ClassFile.ACC_FINAL | ClassFile.ACC_PRIVATE | ClassFile.ACC_STATIC, + generateMethod(constants, args)); + }}); + try { + Lookup hiddenLookup = lookup.makeHiddenClassDefiner(className, classBytes, SET_OF_STRONG, DUMPER) + .defineClassAsLookup(true); + Class innerClass = hiddenLookup.lookupClass(); + return hiddenLookup.findStatic(innerClass, METHOD_NAME, args); + } catch (Exception e) { + throw new StringConcatException("Exception while spinning the class", e); + } + } + + private static Consumer generateMethod(String[] constants, MethodType args) { + return new Consumer() { + @Override + public void accept(CodeBuilder cb) { + cb.new_(STRING_BUILDER); + cb.dup(); + + int len = 0; + for (String constant : constants) { + if (constant != null) { + len += constant.length(); + } + } + len += args.parameterCount() * ARGUMENT_SIZE_FACTOR; + cb.loadConstant(len); + cb.invokespecial(STRING_BUILDER, "", INT_CONSTRUCTOR_TYPE); + + // At this point, we have a blank StringBuilder on stack, fill it in with .append calls. + { + int off = 0; + for (int c = 0; c < args.parameterCount(); c++) { + if (constants[c] != null) { + cb.ldc(constants[c]); + cb.invokevirtual(STRING_BUILDER, "append", APPEND_STRING_TYPE); + } + Class cl = args.parameterType(c); + TypeKind kind = TypeKind.from(cl); + cb.loadLocal(kind, off); + off += kind.slotSize(); + MethodTypeDesc desc = getSBAppendDesc(cl); + cb.invokevirtual(STRING_BUILDER, "append", desc); + } + if (constants[constants.length - 1] != null) { + cb.ldc(constants[constants.length - 1]); + cb.invokevirtual(STRING_BUILDER, "append", APPEND_STRING_TYPE); + } + } + + cb.invokevirtual(STRING_BUILDER, "toString", TO_STRING_TYPE); + cb.areturn(); + } + }; + } + + /** + * The generated class is in the same package as the host class as + * it's the implementation of the string concatenation for the host + * class. + */ + private static String getClassName(Class hostClass) { + String name = hostClass.isHidden() ? hostClass.getName().replace('/', '_') + : hostClass.getName(); + return name + "$$StringConcat"; + } + + private static MethodTypeDesc getSBAppendDesc(Class cl) { + if (cl.isPrimitive()) { + if (cl == Integer.TYPE || cl == Byte.TYPE || cl == Short.TYPE) { + return APPEND_INT_TYPE; + } else if (cl == Boolean.TYPE) { + return APPEND_BOOLEAN_TYPE; + } else if (cl == Character.TYPE) { + return APPEND_CHAR_TYPE; + } else if (cl == Double.TYPE) { + return APPEND_DOUBLE_TYPE; + } else if (cl == Float.TYPE) { + return APPEND_FLOAT_TYPE; + } else if (cl == Long.TYPE) { + return APPEND_LONG_TYPE; + } else { + throw new IllegalStateException("Unhandled primitive StringBuilder.append: " + cl); + } + } else if (cl == String.class) { + return APPEND_STRING_TYPE; + } else { + return APPEND_OBJECT_TYPE; + } + } + } } diff --git a/src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java b/src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java index 04974eca743..d4ff88867aa 100644 --- a/src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java +++ b/src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java @@ -696,7 +696,7 @@ private static void generateLookupAccessor(ClassBuilder clb) { .block(blockBuilder -> blockBuilder .aload(cob.parameterSlot(0)) .invokevirtual(CD_MethodHandles_Lookup, "lookupClass", MTD_Class) - .constantInstruction(Opcode.LDC, CD_Proxy) + .ldc(CD_Proxy) .if_acmpne(blockBuilder.breakLabel()) .aload(cob.parameterSlot(0)) .invokevirtual(CD_MethodHandles_Lookup, "hasFullPrivilegeAccess", MTD_boolean) @@ -770,11 +770,11 @@ private void generateMethod(ClassBuilder clb, ClassEntry className) { if (parameterTypes.length > 0) { // Create an array and fill with the parameters converting primitives to wrappers - cob.constantInstruction(parameterTypes.length) + cob.loadConstant(parameterTypes.length) .anewarray(CE_Object); for (int i = 0; i < parameterTypes.length; i++) { cob.dup() - .constantInstruction(i); + .loadConstant(i); codeWrapArgument(cob, parameterTypes[i], cob.parameterSlot(i)); cob.aastore(); } @@ -818,7 +818,7 @@ private void generateMethod(ClassBuilder clb, ClassEntry className) { */ private void codeWrapArgument(CodeBuilder cob, Class type, int slot) { if (type.isPrimitive()) { - cob.loadInstruction(TypeKind.from(type).asLoadable(), slot); + cob.loadLocal(TypeKind.from(type).asLoadable(), slot); PrimitiveTypeInfo prim = PrimitiveTypeInfo.get(type); cob.invokestatic(prim.wrapperMethodRef); } else { @@ -837,7 +837,7 @@ private void codeUnwrapReturnValue(CodeBuilder cob, Class type) { cob.checkcast(prim.wrapperClass) .invokevirtual(prim.unwrapMethodRef) - .returnInstruction(TypeKind.from(type).asLoadable()); + .return_(TypeKind.from(type).asLoadable()); } else { cob.checkcast(toClassDesc(type)) .areturn(); @@ -854,13 +854,13 @@ private void codeFieldInitialization(CodeBuilder cob, ClassEntry className) { codeClassForName(cob, fromClass); cob.ldc(method.getName()) - .constantInstruction(parameterTypes.length) + .loadConstant(parameterTypes.length) .anewarray(CE_Class); // Construct an array with the parameter types mapping primitives to Wrapper types for (int i = 0; i < parameterTypes.length; i++) { cob.dup() - .constantInstruction(i); + .loadConstant(i); if (parameterTypes[i].isPrimitive()) { PrimitiveTypeInfo prim = PrimitiveTypeInfo.get(parameterTypes[i]); cob.getstatic(prim.typeFieldRef); diff --git a/src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java b/src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java index a8e690e3e0f..75d0d415d08 100644 --- a/src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java +++ b/src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java @@ -414,7 +414,7 @@ private static Consumer generateTypeSwitchSkeleton(Class selecto cb.ireturn(); cb.labelBinding(nonNullLabel); if (labelConstants.length == 0) { - cb.constantInstruction(0) + cb.loadConstant(0) .ireturn(); return; } @@ -454,7 +454,7 @@ record Element(Label target, Label next, Object caseLabel) { } // Object o = ... // o instanceof Wrapped(float) cb.aload(SELECTOR_OBJ); - cb.instanceof_(Wrapper.forBasicType(classLabel) + cb.instanceOf(Wrapper.forBasicType(classLabel) .wrapperType() .describeConstable() .orElseThrow()); @@ -464,7 +464,7 @@ record Element(Label target, Label next, Object caseLabel) { } // o instanceof float Label notNumber = cb.newLabel(); cb.aload(SELECTOR_OBJ); - cb.instanceof_(ConstantDescs.CD_Number); + cb.instanceOf(ConstantDescs.CD_Number); if (selectorType == long.class || selectorType == float.class || selectorType == double.class || selectorType == Long.class || selectorType == Float.class || selectorType == Double.class) { cb.ifeq(next); @@ -493,7 +493,7 @@ record Element(Label target, Label next, Object caseLabel) { } cb.goto_(compare); cb.labelBinding(notNumber); cb.aload(SELECTOR_OBJ); - cb.instanceof_(ConstantDescs.CD_Character); + cb.instanceOf(ConstantDescs.CD_Character); cb.ifeq(next); cb.aload(SELECTOR_OBJ); cb.checkcast(ConstantDescs.CD_Character); @@ -514,11 +514,11 @@ record Element(Label target, Label next, Object caseLabel) { } Optional classLabelConstableOpt = classLabel.describeConstable(); if (classLabelConstableOpt.isPresent()) { cb.aload(SELECTOR_OBJ); - cb.instanceof_(classLabelConstableOpt.orElseThrow()); + cb.instanceOf(classLabelConstableOpt.orElseThrow()); cb.ifeq(next); } else { cb.aload(EXTRA_CLASS_LABELS); - cb.constantInstruction(extraClassLabels.size()); + cb.loadConstant(extraClassLabels.size()); cb.invokeinterface(ConstantDescs.CD_List, "get", MethodTypeDesc.of(ConstantDescs.CD_Object, @@ -537,7 +537,7 @@ record Element(Label target, Label next, Object caseLabel) { } int enumIdx = enumDescs.size(); enumDescs.add(enumLabel); cb.aload(ENUM_CACHE); - cb.constantInstruction(enumIdx); + cb.loadConstant(enumIdx); cb.invokestatic(ConstantDescs.CD_Integer, "valueOf", MethodTypeDesc.of(ConstantDescs.CD_Integer, @@ -561,7 +561,7 @@ record Element(Label target, Label next, Object caseLabel) { } Label compare = cb.newLabel(); Label notNumber = cb.newLabel(); cb.aload(SELECTOR_OBJ); - cb.instanceof_(ConstantDescs.CD_Number); + cb.instanceOf(ConstantDescs.CD_Number); cb.ifeq(notNumber); cb.aload(SELECTOR_OBJ); cb.checkcast(ConstantDescs.CD_Number); @@ -571,7 +571,7 @@ record Element(Label target, Label next, Object caseLabel) { } cb.goto_(compare); cb.labelBinding(notNumber); cb.aload(SELECTOR_OBJ); - cb.instanceof_(ConstantDescs.CD_Character); + cb.instanceOf(ConstantDescs.CD_Character); cb.ifeq(next); cb.aload(SELECTOR_OBJ); cb.checkcast(ConstantDescs.CD_Character); @@ -587,9 +587,9 @@ record Element(Label target, Label next, Object caseLabel) { } element.caseLabel() instanceof Double || element.caseLabel() instanceof Boolean)) { if (element.caseLabel() instanceof Boolean c) { - cb.constantInstruction(c ? 1 : 0); + cb.loadConstant(c ? 1 : 0); } else { - cb.constantInstruction((ConstantDesc) element.caseLabel()); + cb.loadConstant((ConstantDesc) element.caseLabel()); } cb.invokestatic(element.caseLabel().getClass().describeConstable().orElseThrow(), "valueOf", @@ -605,11 +605,11 @@ record Element(Label target, Label next, Object caseLabel) { } throw new InternalError("Unsupported label type: " + element.caseLabel().getClass()); } - cb.constantInstruction(idx); + cb.loadConstant(idx); cb.ireturn(); } cb.labelBinding(dflt); - cb.constantInstruction(cases.size()); + cb.loadConstant(cases.size()); cb.ireturn(); }; } diff --git a/src/java.base/share/classes/java/math/BigInteger.java b/src/java.base/share/classes/java/math/BigInteger.java index 8d12c6de0a7..a972faafb45 100644 --- a/src/java.base/share/classes/java/math/BigInteger.java +++ b/src/java.base/share/classes/java/math/BigInteger.java @@ -4843,7 +4843,7 @@ private static int[] makePositive(int[] a) { 0x40000000, 0x4cfa3cc1, 0x5c13d840, 0x6d91b519, 0x39aa400 }; - /** + /* * These routines provide access to the two's complement representation * of BigIntegers. */ diff --git a/src/java.base/share/classes/java/math/MutableBigInteger.java b/src/java.base/share/classes/java/math/MutableBigInteger.java index 76e48d00cf1..eca42ee25b1 100644 --- a/src/java.base/share/classes/java/math/MutableBigInteger.java +++ b/src/java.base/share/classes/java/math/MutableBigInteger.java @@ -25,6 +25,10 @@ package java.math; +import static java.math.BigDecimal.INFLATED; +import static java.math.BigInteger.LONG_MASK; +import java.util.Arrays; + /** * A class used to represent multiprecision integers that makes efficient * use of allocated space by allowing a number to occupy only part of @@ -42,10 +46,6 @@ * @since 1.3 */ -import static java.math.BigDecimal.INFLATED; -import static java.math.BigInteger.LONG_MASK; -import java.util.Arrays; - class MutableBigInteger { /** * Holds the magnitude of this MutableBigInteger in big endian order. diff --git a/src/java.base/share/classes/java/net/HttpURLConnection.java b/src/java.base/share/classes/java/net/HttpURLConnection.java index b501fa25e45..b405fb10a16 100644 --- a/src/java.base/share/classes/java/net/HttpURLConnection.java +++ b/src/java.base/share/classes/java/net/HttpURLConnection.java @@ -675,7 +675,7 @@ public InputStream getErrorStream() { return null; } - /** + /* * The response codes for HTTP, as of version 1.1. */ diff --git a/src/java.base/share/classes/java/net/InetAddress.java b/src/java.base/share/classes/java/net/InetAddress.java index 8c0c658cb96..b73141dd7cc 100644 --- a/src/java.base/share/classes/java/net/InetAddress.java +++ b/src/java.base/share/classes/java/net/InetAddress.java @@ -1238,11 +1238,11 @@ public Stream lookupByName(String host, LookupPolicy policy) Objects.requireNonNull(policy); validate(host); InetAddress[] addrs; - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(); try { addrs = impl.lookupAllHostAddr(host, policy); } finally { - Blocker.end(comp); + Blocker.end(attempted); } return Arrays.stream(addrs); } @@ -1252,11 +1252,11 @@ public String lookupByAddress(byte[] addr) throws UnknownHostException { if (addr.length != Inet4Address.INADDRSZ && addr.length != Inet6Address.INADDRSZ) { throw new IllegalArgumentException("Invalid address length"); } - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(); try { return impl.getHostByAddr(addr); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } } diff --git a/src/java.base/share/classes/java/nio/MappedMemoryUtils.java b/src/java.base/share/classes/java/nio/MappedMemoryUtils.java index 5113d2730c2..cf6f953d8b2 100644 --- a/src/java.base/share/classes/java/nio/MappedMemoryUtils.java +++ b/src/java.base/share/classes/java/nio/MappedMemoryUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -98,13 +98,13 @@ static void force(FileDescriptor fd, long address, boolean isSync, long index, l long offset = mappingOffset(address, index); long mappingAddress = mappingAddress(address, offset, index); long mappingLength = mappingLength(offset, length); - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(); try { force0(fd, mappingAddress, mappingLength); } catch (IOException cause) { throw new UncheckedIOException(cause); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } } diff --git a/src/java.base/share/classes/java/text/CompactNumberFormat.java b/src/java.base/share/classes/java/text/CompactNumberFormat.java index a477d9c2fd8..115a21ee662 100644 --- a/src/java.base/share/classes/java/text/CompactNumberFormat.java +++ b/src/java.base/share/classes/java/text/CompactNumberFormat.java @@ -47,80 +47,113 @@ /** *

* {@code CompactNumberFormat} is a concrete subclass of {@code NumberFormat} - * that formats a decimal number in its compact form. - * - * The compact number formatting is designed for the environment where the space - * is limited, and the formatted string can be displayed in that limited space. - * It is defined by LDML's specification for + * that formats a decimal number in a localized compact form. + * Compact number formatting is designed for an environment with limited space. + * For example, displaying the formatted number {@code 7M} instead of {@code + * 7,000,000.00} in the {@link java.util.Locale#US US locale}. The {@code + * CompactNumberFormat} class is defined by LDML's specification for * - * Compact Number Formats. A compact number formatting refers - * to the representation of a number in a shorter form, based on the patterns - * provided for a given locale. + * Compact Number Formats. * - *

- * For example: - *
In the {@link java.util.Locale#US US locale}, {@code 1000} can be formatted - * as {@code "1K"}, and {@code 1000000} as {@code "1M"}, depending upon the - * {@linkplain ##compact_number_style style} used. - *
In the {@code "hi_IN"} locale, {@code 1000} can be formatted as - * "1 \u0939\u091C\u093C\u093E\u0930", and {@code 50000000} as "5 \u0915.", - * depending upon the {@linkplain ##compact_number_style style} used. + *

Getting a CompactNumberFormat

+ * To get a compact number format, use one of the ways listed below. + *
    + *
  • Use the factory method {@link NumberFormat#getCompactNumberInstance()} + * to obtain a format for the default locale with + * {@link NumberFormat.Style#SHORT SHORT} style. + *
  • Use the factory methood {@link NumberFormat#getCompactNumberInstance(Locale, Style)} + * to obtain a format for a different locale + * and to control the {@linkplain ##compact_number_style Style}. + *
  • Use one of the {@code CompactNumberFormat} constructors, for example, {@link + * CompactNumberFormat#CompactNumberFormat(String, DecimalFormatSymbols, String[]) + * CompactNumberFormat(decimalPattern, symbols, compactPatterns)}, to obtain a + * {@code CompactNumberFormat} with further customization. + *
+ *

If a standard compact format for a given locale and {@link + * ##compact_number_style style} is desired, it is recommended to use one of the + * NumberFormat factory methods listed above. To use an instance method + * defined by {@code CompactNumberFormat}, the {@code NumberFormat} returned by + * these factory methods should be type checked before converted to {@code CompactNumberFormat}. + * If the installed locale-sensitive service implementation does not support + * the given {@code Locale}, the parent locale chain will be looked up, and + * a {@code Locale} used that is supported. * - *

- * To obtain a {@code CompactNumberFormat} for a locale, use one - * of the factory methods given by {@code NumberFormat} for compact number - * formatting. For example, - * {@link NumberFormat#getCompactNumberInstance(Locale, Style)}. + *

Style

+ * When using {@link NumberFormat#getCompactNumberInstance(Locale, Style)}, a + * compact form can be retrieved with either a {@link NumberFormat.Style#SHORT + * SHORT} or {@link NumberFormat.Style#LONG LONG} style. + * For example, a {@link NumberFormat.Style#SHORT SHORT} style compact number instance in + * the {@link java.util.Locale#US US locale} formats {@code 10000} as {@code + * "10K"}. However, a {@link NumberFormat.Style#LONG LONG} style instance in + * the same locale formats {@code 10000} as {@code "10 thousand"}. * - *
{@snippet lang=java : - * NumberFormat fmt = NumberFormat.getCompactNumberInstance( - * Locale.forLanguageTag("hi-IN"), NumberFormat.Style.SHORT); - * String result = fmt.format(1000); - * }
+ *

Using CompactNumberFormat

+ * The following is an example of formatting and parsing in a localized manner, * - *

Style

- *

- * A number can be formatted in the compact forms with two different - * styles, {@link NumberFormat.Style#SHORT SHORT} - * and {@link NumberFormat.Style#LONG LONG}. Use - * {@link NumberFormat#getCompactNumberInstance(Locale, Style)} for formatting and - * parsing a number in {@link NumberFormat.Style#SHORT SHORT} or - * {@link NumberFormat.Style#LONG LONG} compact form, - * where the given {@code Style} parameter requests the desired - * format. A {@link NumberFormat.Style#SHORT SHORT} style - * compact number instance in the {@link java.util.Locale#US US locale} formats - * {@code 10000} as {@code "10K"}. However, a - * {@link NumberFormat.Style#LONG LONG} style instance in same locale - * formats {@code 10000} as {@code "10 thousand"}. + * {@snippet lang=java : + * NumberFormat compactFormat = NumberFormat.getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); + * compactFormat.format(1000); // returns "1K" + * compactFormat.parse("1K"); // returns 1000 + * } + * + *

Formatting

+ * The default formatting behavior returns a formatted string with no fractional + * digits, however users can use the {@link #setMinimumFractionDigits(int)} + * method to include the fractional part. + * The number {@code 1000.0} or {@code 1000} is formatted as {@code "1K"} + * not {@code "1.00K"} (in the {@link java.util.Locale#US US locale}). For this + * reason, the patterns provided for formatting contain only the minimum + * integer digits, prefix and/or suffix, but no fractional part. + * For example, patterns used are {@code {"", "", "", 0K, 00K, ...}}. If the pattern + * selected for formatting a number is {@code "0"} (special pattern), + * either explicit or defaulted, then the general number formatting provided by + * {@link java.text.DecimalFormat DecimalFormat} + * for the specified locale is used. + * + *

Rounding

+ * {@code CompactNumberFormat} provides rounding modes defined in + * {@link java.math.RoundingMode} for formatting. By default, it uses + * {@link java.math.RoundingMode#HALF_EVEN RoundingMode.HALF_EVEN}. + * + *

Parsing

+ * The default parsing behavior does not allow a grouping separator until + * grouping used is set to {@code true} by using + * {@link #setGroupingUsed(boolean)}. The parsing of the fractional part + * depends on the {@link #isParseIntegerOnly()}. For example, if the + * parse integer only is set to true, then the fractional part is skipped. * *

Compact Number Patterns

*

- * The compact number patterns are represented in a series of patterns where each - * pattern is used to format a range of numbers. An example of - * {@link NumberFormat.Style#SHORT SHORT} styled compact number patterns + * The {@code compactPatterns} in {@link + * CompactNumberFormat#CompactNumberFormat(String, DecimalFormatSymbols, String[]) + * CompactNumberFormat(decimalPattern, symbols, compactPatterns)} are represented + * as a series of strings, where each string is a {@link ##compact_number_syntax + * pattern} that is used to format a range of numbers. + * + *

An example of the {@link NumberFormat.Style#SHORT SHORT} styled compact number patterns * for the {@link java.util.Locale#US US locale} is {@code {"", "", "", "0K", * "00K", "000K", "0M", "00M", "000M", "0B", "00B", "000B", "0T", "00T", "000T"}}, * ranging from {@code 10}{@code 0} to {@code 10}{@code 14}. * There can be any number of patterns and they are * strictly index based starting from the range {@code 10}{@code 0}. - * For example, in the above patterns, pattern at index 3 - * ({@code "0K"}) is used for formatting {@code number >= 1000 and number < 10000}, - * pattern at index 4 ({@code "00K"}) is used for formatting - * {@code number >= 10000 and number < 100000} and so on. In most of the locales, - * patterns with the range + * For example, in the above patterns, the pattern at index 3 + * ({@code "0K"}) is used for formatting a number in the range: {@code 1000 <= number < 10000}, + * index 4 ({@code "00K"}) for formatting a number the range: {@code 10000 <= + * number < 100000}, and so forth. + *

In most locales, patterns with the range * {@code 10}{@code 0}-{@code 10}{@code 2} are empty * strings, which implicitly means a special pattern {@code "0"}. * A special pattern {@code "0"} is used for any range which does not contain * a compact pattern. This special pattern can appear explicitly for any specific * range, or considered as a default pattern for an empty string. * - *

+ *

Negative Subpatterns

* A compact pattern contains a positive and negative subpattern - * separated by a subpattern boundary character {@code ';' (U+003B)}, + * separated by a subpattern boundary character {@code ';'}, * for example, {@code "0K;-0K"}. Each subpattern has a prefix, * minimum integer digits, and suffix. The negative subpattern * is optional, if absent, then the positive subpattern prefixed with the - * minus sign ({@code '-' U+002D HYPHEN-MINUS}) is used as the negative + * minus sign {@code '-' (U+002D HYPHEN-MINUS)} is used as the negative * subpattern. That is, {@code "0K"} alone is equivalent to {@code "0K;-0K"}. * If there is an explicit negative subpattern, it serves only to specify * the negative prefix and suffix. The number of minimum integer digits, @@ -128,31 +161,35 @@ * That means that {@code "0K;-00K"} produces precisely the same behavior * as {@code "0K;-0K"}. * - *

+ *

Escaping Special Characters

* Many characters in a compact pattern are taken literally, they are matched * during parsing and output unchanged during formatting. * {@linkplain DecimalFormat##special_pattern_character Special characters}, * on the other hand, stand for other characters, strings, or classes of - * characters. They must be quoted, using single quote {@code ' (U+0027)} + * characters. These characters must be quoted using single quotes {@code ' (U+0027)} * unless noted otherwise, if they are to appear in the prefix or suffix * as literals. For example, 0\u0915'.'. * *

Plurals

+ *

{@code CompactNumberFormat} support patterns for both singular and plural + * compact forms. For the plural form, the {@code Pattern} should consist + * of {@code PluralPattern}(s) separated by a space ' ' (U+0020) that are enumerated + * within a pair of curly brackets '{' (U+007B) and '}' (U+007D). + * In this format, each {@code PluralPattern} consists of its {@code count}, + * followed by a single colon {@code ':' (U+003A)} and a {@code SimplePattern}. + * As a space is reserved for separating subsequent {@code PluralPattern}s, it must + * be quoted to be used literally in either the {@code prefix} or {@code suffix}. *

- * In case some localization requires compact number patterns to be different for - * plurals, each singular and plural pattern can be enumerated within a pair of - * curly brackets '{' (U+007B) and '}' (U+007D), separated - * by a space {@code ' ' (U+0020)}. If this format is used, each pattern needs to be - * prepended by its {@code count}, followed by a single colon {@code ':' (U+003A)}. - * If the pattern includes spaces literally, they must be quoted. + * For example, while the pattern representing millions ({@code 10}{@code 6} + * ) in the US locale can be specified as the SimplePattern: {@code "0 Million"}, for the + * German locale it can be specified as the PluralPattern: + * {@code "{one:0' 'Million other:0' 'Millionen}"}. + * *

- * For example, the compact number pattern representing millions in German locale can be - * specified as {@code "{one:0' 'Million other:0' 'Millionen}"}. The {@code count} - * follows LDML's + * A compact pattern has the following syntax, with {@code count} + * following LDML's * - * Language Plural Rules. - *

- * A compact pattern has the following syntax: + * Language Plural Rules: *

  * Pattern:
  *         SimplePattern
@@ -179,37 +216,12 @@
  *      0 MinimumInteger
  * 
* - *

Formatting

- * The default formatting behavior returns a formatted string with no fractional - * digits, however users can use the {@link #setMinimumFractionDigits(int)} - * method to include the fractional part. - * The number {@code 1000.0} or {@code 1000} is formatted as {@code "1K"} - * not {@code "1.00K"} (in the {@link java.util.Locale#US US locale}). For this - * reason, the patterns provided for formatting contain only the minimum - * integer digits, prefix and/or suffix, but no fractional part. - * For example, patterns used are {@code {"", "", "", 0K, 00K, ...}}. If the pattern - * selected for formatting a number is {@code "0"} (special pattern), - * either explicit or defaulted, then the general number formatting provided by - * {@link java.text.DecimalFormat DecimalFormat} - * for the specified locale is used. - * - *

Parsing

- * The default parsing behavior does not allow a grouping separator until - * grouping used is set to {@code true} by using - * {@link #setGroupingUsed(boolean)}. The parsing of the fractional part - * depends on the {@link #isParseIntegerOnly()}. For example, if the - * parse integer only is set to true, then the fractional part is skipped. - * - *

Rounding

- * {@code CompactNumberFormat} provides rounding modes defined in - * {@link java.math.RoundingMode} for formatting. By default, it uses - * {@link java.math.RoundingMode#HALF_EVEN RoundingMode.HALF_EVEN}. - * * @spec https://www.unicode.org/reports/tr35 * Unicode Locale Data Markup Language (LDML) * @see NumberFormat.Style * @see NumberFormat * @see DecimalFormat + * @see Locale * @since 12 */ public final class CompactNumberFormat extends NumberFormat { @@ -389,10 +401,19 @@ public final class CompactNumberFormat extends NumberFormat { * To obtain the instance of {@code CompactNumberFormat} with the standard * compact patterns for a {@code Locale} and {@code Style}, * it is recommended to use the factory methods given by - * {@code NumberFormat} for compact number formatting. For example, - * {@link NumberFormat#getCompactNumberInstance(Locale, Style)}. + * {@code NumberFormat} for compact number formatting. + * + *

Below is an example of using the constructor, + * + * {@snippet lang=java : + * String[] compactPatterns = {"", "", "", "a lot"}; + * NumberFormat fmt = new CompactNumberFormat("00", DecimalFormatSymbols.getInstance(Locale.US), compactPatterns); + * fmt.format(1); // returns "01" + * fmt.format(1000); // returns "a lot" + * } * - * @param decimalPattern a decimal pattern for general number formatting + * @param decimalPattern a {@linkplain DecimalFormat##patterns decimal pattern} + * for general number formatting * @param symbols the set of symbols to be used * @param compactPatterns an array of * {@linkplain ##compact_number_patterns compact number patterns} @@ -419,7 +440,8 @@ public CompactNumberFormat(String decimalPattern, * {@code NumberFormat} for compact number formatting. For example, * {@link NumberFormat#getCompactNumberInstance(Locale, Style)}. * - * @param decimalPattern a decimal pattern for general number formatting + * @param decimalPattern a {@linkplain DecimalFormat##patterns decimal pattern} + * for general number formatting * @param symbols the set of symbols to be used * @param compactPatterns an array of * {@linkplain ##compact_number_patterns compact number patterns} diff --git a/src/java.base/share/classes/java/text/DateFormat.java b/src/java.base/share/classes/java/text/DateFormat.java index d7a4b5a39b7..a67ba676836 100644 --- a/src/java.base/share/classes/java/text/DateFormat.java +++ b/src/java.base/share/classes/java/text/DateFormat.java @@ -407,7 +407,8 @@ public Date parse(String source) throws ParseException /** * Parse a date/time string according to the given parse position. For - * example, a time text {@code "07/10/96 4:5 PM, PDT"} will be parsed into a {@code Date} + * example, if {@code this} has the pattern {@code "M/d/yy h:m a, z"}, + * then a time text {@code "07/10/96 4:5 PM, PDT"} will be parsed into a {@code Date} * that is equivalent to {@code Date(837039900000L)}. * *

By default, parsing is lenient: If the input is not in the form used diff --git a/src/java.base/share/classes/java/text/DecimalFormat.java b/src/java.base/share/classes/java/text/DecimalFormat.java index 752c3924855..2fc64d8e63e 100644 --- a/src/java.base/share/classes/java/text/DecimalFormat.java +++ b/src/java.base/share/classes/java/text/DecimalFormat.java @@ -56,45 +56,104 @@ /** * {@code DecimalFormat} is a concrete subclass of - * {@code NumberFormat} that formats decimal numbers. It has a variety of - * features designed to make it possible to parse and format numbers in any - * locale, including support for Western, Arabic, and Indic digits. It also - * supports different kinds of numbers, including integers (123), fixed-point + * {@code NumberFormat} that formats decimal numbers in a localized manner. + * It has a variety of features designed to make it possible to parse and format + * numbers in any locale, including support for Western, Arabic, and Indic digits. + * It also supports different kinds of numbers, including integers (123), fixed-point * numbers (123.4), scientific notation (1.23E4), percentages (12%), and - * currency amounts ($123). All of these can be localized. + * currency amounts ($123). * - *

To obtain a {@code NumberFormat} for a specific locale, including the - * default locale, call one of {@code NumberFormat}'s factory methods, such - * as {@code getInstance()}. In general, do not call the - * {@code DecimalFormat} constructors directly, since the - * {@code NumberFormat} factory methods may return subclasses other than - * {@code DecimalFormat}. If you need to customize the format object, do - * something like this: + *

Getting a DecimalFormat

* - *
{@snippet lang=java : - * NumberFormat numFormat = NumberFormat.getInstance(loc); - * if (numFormat instanceof DecimalFormat decFormat) { - * decFormat.setDecimalSeparatorAlwaysShown(true); + * To obtain a standard decimal format for a specific locale, including the default locale, + * it is recommended to call one of the {@code NumberFormat} + * {@link NumberFormat##factory_methods factory methods}, such as {@link NumberFormat#getInstance()}. + * These factory methods may not always return a {@code DecimalFormat} + * depending on the locale-service provider implementation + * installed. Thus, to use an instance method defined by {@code DecimalFormat}, + * the {@code NumberFormat} returned by the factory method should be + * type checked before converted to {@code DecimalFormat}. If the installed locale-sensitive + * service implementation does not support the given {@code Locale}, the parent + * locale chain will be looked up, and a {@code Locale} used that is supported. + * + *

If the factory methods are not desired, use one of the constructors such + * as {@link #DecimalFormat(String) DecimalFormat(String pattern)}. See the {@link + * ##patterns Pattern} section for more information on the {@code pattern} parameter. + * + *

Using DecimalFormat

+ * The following is an example of formatting and parsing, + * {@snippet lang=java : + * NumberFormat nFmt = NumberFormat.getCurrencyInstance(Locale.US); + * if (nFmt instanceof DecimalFormat dFmt) { + * // pattern match to DecimalFormat to use setPositiveSuffix(String) + * dFmt.setPositiveSuffix(" dollars"); + * dFmt.format(100000); // returns "$100,000.00 dollars" + * dFmt.parse("$100,000.00 dollars"); // returns 100000 + * } * } - * }
* - *

A {@code DecimalFormat} comprises a pattern and a set of - * symbols. The pattern may be set directly using - * {@code applyPattern()}, or indirectly using the API methods. The - * symbols are stored in a {@code DecimalFormatSymbols} object. When using - * the {@code NumberFormat} factory methods, the pattern and symbols are - * read from localized {@code ResourceBundle}s. * - *

Patterns

+ *

Formatting and Parsing

+ *

Rounding

* - * Note: For any given {@code DecimalFormat} pattern, if the pattern is not - * in scientific notation, the maximum number of integer digits will not be - * derived from the pattern, and instead set to {@link Integer#MAX_VALUE}. - * Otherwise, if the pattern is in scientific notation, the maximum number of - * integer digits will be derived from the pattern. This derivation is detailed - * in the {@link ##scientific_notation Scientific Notation} section. This behavior - * is the typical end-user desire; {@link #setMaximumIntegerDigits(int)} can be - * used to manually adjust the maximum integer digits. + * When formatting, {@code DecimalFormat} can adjust its rounding using {@link + * #setRoundingMode(RoundingMode)}. By default, it uses + * {@link java.math.RoundingMode#HALF_EVEN RoundingMode.HALF_EVEN}. + * + *

Digits

+ * + * When formatting, {@code DecimalFormat} uses the ten consecutive + * characters starting with the localized zero digit defined in the + * {@code DecimalFormatSymbols} object as digits. + *

When parsing, these digits as well as all Unicode decimal digits, as + * defined by {@link Character#digit Character.digit}, are recognized. + * + *

Integer and Fraction Digit Limits

+ * @implSpec + * When formatting a {@code Number} other than {@code BigInteger} and + * {@code BigDecimal}, {@code 309} is used as the upper limit for integer digits, + * and {@code 340} as the upper limit for fraction digits. This occurs, even if + * one of the {@code DecimalFormat} getter methods, for example, {@link #getMinimumFractionDigits()} + * returns a numerically greater value. + * + *

Special Values

+ *
    + *
  • Not a Number ({@code NaN}) is formatted as a string, + * which is typically given as "NaN". This string is determined by {@link + * DecimalFormatSymbols#getNaN()}. This is the only value for which the prefixes + * and suffixes are not attached. + * + *

  • Infinity is formatted as a string, which is typically given as + * "∞" ({@code U+221E}), with the positive or negative prefixes and suffixes + * attached. This string is determined by {@link DecimalFormatSymbols#getInfinity()}. + * + *

  • Negative zero ({@code "-0"}) parses to + *

      + *
    • {@code BigDecimal(0)} if {@code isParseBigDecimal()} is + * true + *
    • {@code Long(0)} if {@code isParseBigDecimal()} is false + * and {@code isParseIntegerOnly()} is true + *
    • {@code Double(-0.0)} if both {@code isParseBigDecimal()} + * and {@code isParseIntegerOnly()} are false + *
    + *
+ * + *

Synchronization

+ * + *

+ * Decimal formats are generally not synchronized. + * It is recommended to create separate format instances for each thread. + * If multiple threads access a format concurrently, it must be synchronized + * externally. + * + *

DecimalFormat Pattern

+ * + * A {@code DecimalFormat} comprises a pattern and a set of + * symbols. The pattern may be set directly using {@code applyPattern()}, + * or indirectly using the various API methods. The symbols are stored in a {@code + * DecimalFormatSymbols} object. When using the {@code NumberFormat} factory + * methods, the pattern and symbols are created from the locale-sensitive service + * implementation installed. * *

{@code DecimalFormat} patterns have the following syntax: *

@@ -135,50 +194,21 @@
  *         0 MinimumExponentopt
  * 
* - *

A {@code DecimalFormat} pattern contains a positive and negative - * subpattern, for example, {@code "#,##0.00;(#,##0.00)"}. Each - * subpattern has a prefix, numeric part, and suffix. The negative subpattern - * is optional; if absent, then the positive subpattern prefixed with the - * minus sign ({@code '-' U+002D HYPHEN-MINUS}) is used as the - * negative subpattern. That is, {@code "0.00"} alone is equivalent to - * {@code "0.00;-0.00"}. If there is an explicit negative subpattern, it - * serves only to specify the negative prefix and suffix; the number of digits, - * minimal digits, and other characteristics are all the same as the positive - * pattern. That means that {@code "#,##0.0#;(#)"} produces precisely - * the same behavior as {@code "#,##0.0#;(#,##0.0#)"}. - * - *

The prefixes, suffixes, and various symbols used for infinity, digits, - * grouping separators, decimal separators, etc. may be set to arbitrary - * values, and they will appear properly during formatting. However, care must - * be taken that the symbols and strings do not conflict, or parsing will be - * unreliable. For example, either the positive and negative prefixes or the - * suffixes must be distinct for {@code DecimalFormat.parse()} to be able - * to distinguish positive from negative values. (If they are identical, then - * {@code DecimalFormat} will behave as if no negative subpattern was - * specified.) Another example is that the decimal separator and grouping - * separator should be distinct characters, or parsing will be impossible. - * - *

The grouping separator is commonly used for thousands, but in some - * countries it separates ten-thousands. The grouping size is a constant number - * of digits between the grouping characters, such as 3 for 100,000,000 or 4 for - * 1,0000,0000. If you supply a pattern with multiple grouping characters, the - * interval between the last one and the end of the integer is the one that is - * used. So {@code "#,##,###,####"} == {@code "######,####"} == - * {@code "##,####,####"}. - * *

Special Pattern Characters

* - *

Many characters in a pattern are taken literally; they are matched during - * parsing and output unchanged during formatting. Special characters, on the - * other hand, stand for other characters, strings, or classes of characters. + *

The special characters in the table below are interpreted syntactically when + * used in the DecimalFormat pattern. * They must be quoted, unless noted otherwise, if they are to appear in the * prefix or suffix as literals. * - *

The characters listed here are used in non-localized patterns. Localized - * patterns use the corresponding characters taken from this formatter's - * {@code DecimalFormatSymbols} object instead, and these characters lose - * their special status. Two exceptions are the currency sign and quote, which - * are not localized. + *

The characters in the {@code Symbol} column are used in non-localized + * patterns. The corresponding characters in the {@code Localized Symbol} column are used + * in localized patterns, with the characters in {@code Symbol} losing their + * syntactical meaning. Two exceptions are the currency sign ({@code U+00A4}) and + * quote ({@code U+0027}), which are not localized. + *

+ * Non-localized patterns should be used when calling {@link #applyPattern(String)}. + * Localized patterns should be used when calling {@link #applyLocalizedPattern(String)}. * *

* @@ -186,69 +216,69 @@ * * * * - * + * * + * * + * * - * + * + * * + * * + * * + * * - * + * + * * - * + *
Symbol + * Localized Symbol * Location - * Localized? - * Meaning + * Meaning *
{@code 0} + * {@link DecimalFormatSymbols#getZeroDigit()} * Number - * Yes * Digit - *
{@code #} + * {@link DecimalFormatSymbols#getDigit()} * Number - * Yes * Digit, zero shows as absent - *
{@code .} + * {@link DecimalFormatSymbols#getDecimalSeparator()} * Number - * Yes * Decimal separator or monetary decimal separator - *
{@code -} + *
{@code - (U+002D)} + * {@link DecimalFormatSymbols#getMinusSign()} * Number - * Yes * Minus sign - *
{@code ,} + * {@link DecimalFormatSymbols#getGroupingSeparator()} * Number - * Yes * Grouping separator or monetary grouping separator - *
{@code E} + * {@link DecimalFormatSymbols#getExponentSeparator()} * Number - * Yes - * Separates mantissa and exponent in scientific notation. - * Need not be quoted in prefix or suffix. - *
Separates mantissa and exponent in scientific notation. This value + * is case sensistive. Need not be quoted in prefix or suffix. + *
{@code ;} + * {@link DecimalFormatSymbols#getPatternSeparator()} * Subpattern boundary - * Yes * Separates positive and negative subpatterns - *
{@code %} + * {@link DecimalFormatSymbols#getPercent()} * Prefix or suffix - * Yes * Multiply by 100 and show as percentage - *
{@code U+2030} + *
‰ ({@code U+2030}) + * {@link DecimalFormatSymbols#getPerMill()} * Prefix or suffix - * Yes * Multiply by 1000 and show as per mille value - *
¤ ({@code U+00A4}) + * n/a (not localized) * Prefix or suffix - * No * Currency sign, replaced by currency symbol. If * doubled, replaced by international currency symbol. * If present in a pattern, the monetary decimal/grouping separators * are used instead of the decimal/grouping separators. - *
{@code '} + *
{@code ' (U+0027)} + * n/a (not localized) * Prefix or suffix - * No * Used to quote special characters in a prefix or suffix, * for example, {@code "'#'#"} formats 123 to * {@code "#123"}. To create a single quote @@ -257,6 +287,49 @@ *
*
* + *

Maximum Digits Derivation

+ * For any given {@code DecimalFormat} pattern, if the pattern is not + * in scientific notation, the maximum number of integer digits will not be + * derived from the pattern, and instead set to {@link Integer#MAX_VALUE}. + * Otherwise, if the pattern is in scientific notation, the maximum number of + * integer digits will be derived from the pattern. This derivation is detailed + * in the {@link ##scientific_notation Scientific Notation} section. {@link + * #setMaximumIntegerDigits(int)} can be used to manually adjust the maximum + * integer digits. + * + *

Negative Subpatterns

+ * A {@code DecimalFormat} pattern contains a positive and negative + * subpattern, for example, {@code "#,##0.00;(#,##0.00)"}. Each + * subpattern has a prefix, numeric part, and suffix. The negative subpattern + * is optional; if absent, then the positive subpattern prefixed with the + * minus sign {@code '-' (U+002D HYPHEN-MINUS)} is used as the + * negative subpattern. That is, {@code "0.00"} alone is equivalent to + * {@code "0.00;-0.00"}. If there is an explicit negative subpattern, it + * serves only to specify the negative prefix and suffix; the number of digits, + * minimal digits, and other characteristics are all the same as the positive + * pattern. That means that {@code "#,##0.0#;(#)"} produces precisely + * the same behavior as {@code "#,##0.0#;(#,##0.0#)"}. + * + *

The prefixes, suffixes, and various symbols used for infinity, digits, + * grouping separators, decimal separators, etc. may be set to arbitrary + * values, and they will appear properly during formatting. However, care must + * be taken that the symbols and strings do not conflict, or parsing will be + * unreliable. For example, either the positive and negative prefixes or the + * suffixes must be distinct for {@code DecimalFormat.parse()} to be able + * to distinguish positive from negative values. (If they are identical, then + * {@code DecimalFormat} will behave as if no negative subpattern was + * specified.) Another example is that the decimal separator and grouping + * separator should be distinct characters, or parsing will be impossible. + * + *

Grouping Separator

+ *

The grouping separator is commonly used for thousands, but in some + * locales it separates ten-thousands. The grouping size is a constant number + * of digits between the grouping characters, such as 3 for 100,000,000 or 4 for + * 1,0000,0000. If you supply a pattern with multiple grouping characters, the + * interval between the last one and the end of the integer is the one that is + * used. For example, {@code "#,##,###,####"} == {@code "######,####"} == + * {@code "##,####,####"}. + * *

Scientific Notation

* *

Numbers in scientific notation are expressed as the product of a mantissa @@ -339,95 +412,13 @@ *

  • Exponential patterns may not contain grouping separators. * * - *

    Rounding

    - * - * {@code DecimalFormat} provides rounding modes defined in - * {@link java.math.RoundingMode} for formatting. By default, it uses - * {@link java.math.RoundingMode#HALF_EVEN RoundingMode.HALF_EVEN}. - * - *

    Digits

    - * - * For formatting, {@code DecimalFormat} uses the ten consecutive - * characters starting with the localized zero digit defined in the - * {@code DecimalFormatSymbols} object as digits. For parsing, these - * digits as well as all Unicode decimal digits, as defined by - * {@link Character#digit Character.digit}, are recognized. - * - *

    Integer and Fraction Digit Limits

    - * - * @implSpec - * When formatting a {@code Number} other than {@code BigInteger} and - * {@code BigDecimal}, {@code 309} is used as the upper limit for integer digits, - * and {@code 340} as the upper limit for fraction digits. This occurs, even if - * one of the {@code DecimalFormat} getter methods, for example, {@link #getMinimumFractionDigits()} - * returns a numerically greater value. - * - *

    Special Values

    - * - *

    Not a Number({@code NaN}) is formatted as a string, which typically has a - * single character {@code U+FFFD}. This string is determined by the - * {@code DecimalFormatSymbols} object. This is the only value for which - * the prefixes and suffixes are not used. - * - *

    Infinity is formatted as a string, which typically has a single character - * {@code U+221E}, with the positive or negative prefixes and suffixes - * applied. The infinity string is determined by the - * {@code DecimalFormatSymbols} object. - * - *

    Negative zero ({@code "-0"}) parses to - *

      - *
    • {@code BigDecimal(0)} if {@code isParseBigDecimal()} is - * true, - *
    • {@code Long(0)} if {@code isParseBigDecimal()} is false - * and {@code isParseIntegerOnly()} is true, - *
    • {@code Double(-0.0)} if both {@code isParseBigDecimal()} - * and {@code isParseIntegerOnly()} are false. - *
    - * - *

    Synchronization

    - * - *

    - * Decimal formats are generally not synchronized. - * It is recommended to create separate format instances for each thread. - * If multiple threads access a format concurrently, it must be synchronized - * externally. - * - *

    Example

    - * - *
    {@snippet lang=java : - * // Print out a number using the localized number, integer, currency, - * // and percent format for each locale - * Locale[] locales = NumberFormat.getAvailableLocales(); - * double myNumber = -1234.56; - * NumberFormat form; - * for (int j = 0; j < 4; ++j) { - * System.out.println("FORMAT"); - * for (Locale locale : locales) { - * if (locale.getCountry().length() == 0) { - * continue; // Skip language-only locales - * } - * System.out.print(locale.getDisplayName()); - * form = switch (j) { - * case 0 -> NumberFormat.getInstance(locale); - * case 1 -> NumberFormat.getIntegerInstance(locale); - * case 2 -> NumberFormat.getCurrencyInstance(locale); - * default -> NumberFormat.getPercentInstance(locale); - * }; - * if (form instanceof DecimalFormat decForm) { - * System.out.print(": " + decForm.toPattern()); - * } - * System.out.print(" -> " + form.format(myNumber)); - * try { - * System.out.println(" -> " + form.parse(form.format(myNumber))); - * } catch (ParseException e) {} - * } - * } - * }
    - * + * @spec https://www.unicode.org/reports/tr35 + * Unicode Locale Data Markup Language (LDML) * @see Java Tutorial * @see NumberFormat * @see DecimalFormatSymbols * @see ParsePosition + * @see Locale * @author Mark Davis * @author Alan Liu * @since 1.1 diff --git a/src/java.base/share/classes/java/text/NumberFormat.java b/src/java.base/share/classes/java/text/NumberFormat.java index bd36ad6dc25..0409efc2da0 100644 --- a/src/java.base/share/classes/java/text/NumberFormat.java +++ b/src/java.base/share/classes/java/text/NumberFormat.java @@ -59,102 +59,110 @@ /** * {@code NumberFormat} is the abstract base class for all number * formats. This class provides the interface for formatting and parsing - * numbers. {@code NumberFormat} also provides methods for determining - * which locales have number formats, and what their names are. + * numbers in a localized manner. This enables code that can be completely + * independent of the locale conventions for decimal points, thousands-separators, + * the particular decimal digits used, or whether the number format is even + * decimal. For example, this class could be used within an application to + * produce a number in a currency format according to the conventions of the desired + * locale. * - *

    - * {@code NumberFormat} helps you to format and parse numbers for any locale. - * Your code can be completely independent of the locale conventions for - * decimal points, thousands-separators, or even the particular decimal - * digits used, or whether the number format is even decimal. + *

    Getting a NumberFormat

    + * To get a {@code NumberFormat} for the default Locale, use one of the static + * factory methods that return a concrete subclass of {@code NumberFormat}. + * The following formats all provide an example of formatting the {@code Number} + * "2000.50" with the {@link java.util.Locale#US US} locale as the default locale. + *
      + *
    • Use {@link #getInstance()} or {@link #getNumberInstance()} to get + * a decimal format. For example, {@code "2,000.5"}. + *
    • Use {@link #getIntegerInstance()} to get an integer number format. + * For example, {@code "2,000"}. + *
    • Use {@link #getCurrencyInstance} to get a currency number format. + * For example, {@code "$2,000.50"}. + *
    • Use {@link #getCompactNumberInstance} to get a compact number format. + * For example, {@code "2K"}. + *
    • Use {@link #getPercentInstance} to get a format for displaying percentages. + * For example, {@code "200,050%"}. + *
    * - *

    - * To format a number for the current Locale, use one of the factory - * class methods: - *

    - * {@snippet lang=java : - * myString = NumberFormat.getInstance().format(myNumber); - * } - *
    - * If you are formatting multiple numbers, it is - * more efficient to get the format and use it multiple times so that - * the system doesn't have to fetch the information about the local - * language and country conventions multiple times. - *
    - * {@snippet lang=java : - * NumberFormat nf = NumberFormat.getInstance(); - * for (var myNumber : numbers) { - * output.println(nf.format(myNumber) + "; "); - * } - * } - *
    - * To format a number for a different Locale, specify it in the - * call to {@code getInstance}. - *
    - * {@snippet lang=java : - * NumberFormat nf = NumberFormat.getInstance(Locale.FRENCH); - * } - *
    + * Alternatively, if a {@code NumberFormat} for a different locale is required, use + * one of the overloaded factory methods that take {@code Locale} as a parameter, + * for example, {@link #getIntegerInstance(Locale)}. If the installed locale-sensitive + * service implementation does not support the given {@code Locale}, the parent + * locale chain will be looked up, and a {@code Locale} used that is supported. * - *

    If the locale contains "nu" (numbers) and/or "rg" (region override) + *

    Locale Extensions

    + * Formatting behavior can be changed when using a locale that contains any of the following * Unicode extensions, - * the decimal digits, and/or the country used for formatting are overridden. + * + *

    * If both "nu" and "rg" are specified, the decimal digits from the "nu" * extension supersedes the implicit one from the "rg" extension. + * Although Unicode extensions + * defines various keys and values, actual locale-sensitive service implementations + * in a Java Runtime Environment might not support any particular Unicode locale + * attributes or key/type pairs. + *

    Below is an example of a "US" locale currency format with accounting style, + *

    {@code NumberFormat.getCurrencyInstance(Locale.forLanguageTag("en-US-u-cf-account"));}
    + * With this style, a negative value is formatted enclosed in parentheses, instead + * of being prepended with a minus sign. * - *

    You can also use a {@code NumberFormat} to parse numbers: - *

    + *

    Using NumberFormat

    + * The following is an example of formatting and parsing in a localized fashion, * {@snippet lang=java : - * myNumber = nf.parse(myString); + * NumberFormat currencyFormat = NumberFormat.getCurrencyInstance(Locale.US); + * currencyFormat.format(100000); // returns "$100,000.00" + * currencyFormat.parse("$100,000.00"); // returns 100000 * } - *
    - * Use {@code getInstance} or {@code getNumberInstance} to get the - * normal number format. Use {@code getIntegerInstance} to get an - * integer number format. Use {@code getCurrencyInstance} to get the - * currency number format. Use {@code getCompactNumberInstance} to get the - * compact number format to format a number in shorter form. For example, - * {@code 2000} can be formatted as {@code "2K"} in - * {@link java.util.Locale#US US locale}. Use {@code getPercentInstance} - * to get a format for displaying percentages. With this format, a fraction - * like 0.53 is displayed as 53%. * - *

    - * You can also control the display of numbers with such methods as - * {@code setMinimumFractionDigits}. - * If you want even more control over the format or parsing, - * or want to give your users more control, - * you can try casting the {@code NumberFormat} you get from the factory methods - * to a {@code DecimalFormat} or {@code CompactNumberFormat} depending on - * the factory method used. This will work for the vast majority of locales; - * just remember to put it in a {@code try} block in case you encounter - * an unusual one. + *

    Customizing NumberFormat

    + * {@code NumberFormat} provides API to customize formatting and parsing behavior, + *
      + *
    • {@link #setParseIntegerOnly(boolean)}; when {@code true}, will only return the + * integer portion of the number parsed from the String. + *
    • {@link #setMinimumFractionDigits(int)}; Use to adjust the expected digits when + * formatting. Use any of the other minimum/maximum or fraction/integer setter methods + * in the same manner. + *
    • {@link #setGroupingUsed(boolean)}; when {@code true}, formatted numbers will be displayed + * with grouping separators. Additionally, when {@code false}, parsing will not expect + * grouping separators in the parsed String. + *
    • {@link #setStrict(boolean)}; when {@code true}, parsing will be done strictly. + * The behavior of strict parsing should be referred to in the implementing + * {@code NumberFormat} subclass. + *
    * *

    - * NumberFormat and DecimalFormat are designed such that some controls - * work for formatting and others work for parsing. The following is - * the detailed description for each these control methods, - *

    - * setParseIntegerOnly : only affects parsing, e.g. - * if true, "3456.78" → 3456 (and leaves the parse position just after index 6) - * if false, "3456.78" → 3456.78 (and leaves the parse position just after index 8) - * This is independent of formatting. If you want to not show a decimal point - * where there might be no digits after the decimal point, use - * setDecimalSeparatorAlwaysShown. - *

    - * setDecimalSeparatorAlwaysShown : only affects formatting, and only where - * there might be no digits after the decimal point, such as with a pattern - * like "#,##0.##", e.g., - * if true, 3456.00 → "3,456." - * if false, 3456.00 → "3456" - * This is independent of parsing. If you want parsing to stop at the decimal - * point, use setParseIntegerOnly. + * To provide more control over formatting or parsing behavior, type checking can + * be done to safely convert to an implementing subclass of {@code NumberFormat}; this + * provides additional methods defined by the subclass. + * For example, + * {@snippet lang=java : + * NumberFormat nFmt = NumberFormat.getInstance(Locale.US); + * if (nFmt instanceof DecimalFormat dFmt) { + * dFmt.setDecimalSeparatorAlwaysShown(true); + * dFmt.format(100); // returns "100." + * } + * } + * The {@code NumberFormat} subclass returned by the factory methods is dependent + * on the locale-service provider implementation installed, and may not always + * be {@link DecimalFormat} or {@link CompactNumberFormat}. + * *

    * You can also use forms of the {@code parse} and {@code format} * methods with {@code ParsePosition} and {@code FieldPosition} to * allow you to: *

      - *
    • progressively parse through pieces of a string - *
    • align the decimal point and other areas + *
    • Progressively parse through pieces of a string + *
    • Align the decimal point and other areas *
    * For example, you can align numbers in two ways: *
      @@ -197,15 +205,20 @@ * If multiple threads access a format concurrently, it must be synchronized * externally. * - * @implSpec The {@link #format(double, StringBuffer, FieldPosition)}, + * @implSpec + * Null Parameter Handling + *
        + *
      • The {@link #format(double, StringBuffer, FieldPosition)}, * {@link #format(long, StringBuffer, FieldPosition)} and * {@link #parse(String, ParsePosition)} methods may throw * {@code NullPointerException}, if any of their parameter is {@code null}. * The subclass may provide its own implementation and specification about * {@code NullPointerException}. + *
      * - *

      - * The default implementation provides rounding modes defined + * Default RoundingMode + *

        + *
      • The default implementation provides rounding modes defined * in {@link java.math.RoundingMode} for formatting numbers. It * uses the {@linkplain java.math.RoundingMode#HALF_EVEN * round half-even algorithm}. To change the rounding mode use @@ -214,10 +227,14 @@ * configured to round floating point numbers using half-even * rounding (see {@link java.math.RoundingMode#HALF_EVEN * RoundingMode.HALF_EVEN}) for formatting. + *
      * + * @spec https://www.unicode.org/reports/tr35 + * Unicode Locale Data Markup Language (LDML) * @see DecimalFormat * @see ChoiceFormat * @see CompactNumberFormat + * @see Locale * @author Mark Davis * @author Helena Shih * @since 1.1 diff --git a/src/java.base/share/classes/java/util/Locale.java b/src/java.base/share/classes/java/util/Locale.java index bcdf32d6f8b..0f8474ec12d 100644 --- a/src/java.base/share/classes/java/util/Locale.java +++ b/src/java.base/share/classes/java/util/Locale.java @@ -995,11 +995,11 @@ static Locale getInstance(BaseLocale baseloc, LocaleExtensions extensions) { private static final ReferencedKeyMap LOCALE_CACHE = ReferencedKeyMap.create(true, ConcurrentHashMap::new); private static Locale createLocale(Object key) { - return switch (key) { - case BaseLocale base -> new Locale(base, null); - case LocaleKey lk -> new Locale(lk.base, lk.exts); - default -> throw new InternalError("should not happen"); - }; + if (key instanceof BaseLocale base) { + return new Locale(base, null); + } + LocaleKey lk = (LocaleKey)key; + return new Locale(lk.base, lk.exts); } private static final class LocaleKey { diff --git a/src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java b/src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java index f45c0036230..1b1ba4b29a0 100644 --- a/src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java +++ b/src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java @@ -117,6 +117,7 @@ protected RunnableFuture newTaskFor(Callable callable) { * @throws RejectedExecutionException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ + @Override public Future submit(Runnable task) { if (task == null) throw new NullPointerException(); RunnableFuture ftask = newTaskFor(task, null); @@ -128,6 +129,7 @@ public Future submit(Runnable task) { * @throws RejectedExecutionException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ + @Override public Future submit(Runnable task, T result) { if (task == null) throw new NullPointerException(); RunnableFuture ftask = newTaskFor(task, result); @@ -139,6 +141,7 @@ public Future submit(Runnable task, T result) { * @throws RejectedExecutionException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ + @Override public Future submit(Callable task) { if (task == null) throw new NullPointerException(); RunnableFuture ftask = newTaskFor(task); @@ -219,6 +222,14 @@ else if (timed) { } } + /** + * @throws InterruptedException {@inheritDoc} + * @throws NullPointerException {@inheritDoc} + * @throws IllegalArgumentException {@inheritDoc} + * @throws ExecutionException {@inheritDoc} + * @throws RejectedExecutionException {@inheritDoc} + */ + @Override public T invokeAny(Collection> tasks) throws InterruptedException, ExecutionException { try { @@ -229,12 +240,26 @@ public T invokeAny(Collection> tasks) } } + /** + * @throws InterruptedException {@inheritDoc} + * @throws NullPointerException {@inheritDoc} + * @throws TimeoutException {@inheritDoc} + * @throws ExecutionException {@inheritDoc} + * @throws RejectedExecutionException {@inheritDoc} + */ + @Override public T invokeAny(Collection> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { return doInvokeAny(tasks, true, unit.toNanos(timeout)); } + /** + * @throws InterruptedException {@inheritDoc} + * @throws NullPointerException {@inheritDoc} + * @throws RejectedExecutionException {@inheritDoc} + */ + @Override public List> invokeAll(Collection> tasks) throws InterruptedException { if (tasks == null) @@ -260,6 +285,12 @@ public List> invokeAll(Collection> tasks) } } + /** + * @throws InterruptedException {@inheritDoc} + * @throws NullPointerException {@inheritDoc} + * @throws RejectedExecutionException {@inheritDoc} + */ + @Override public List> invokeAll(Collection> tasks, long timeout, TimeUnit unit) throws InterruptedException { diff --git a/src/java.base/share/classes/java/util/regex/Pattern.java b/src/java.base/share/classes/java/util/regex/Pattern.java index 1c2fd151b8d..62ef125fdee 100644 --- a/src/java.base/share/classes/java/util/regex/Pattern.java +++ b/src/java.base/share/classes/java/util/regex/Pattern.java @@ -2225,7 +2225,7 @@ private static final boolean isSupplementary(int ch) { Character.isSurrogate((char)ch); } - /** + /* * The following methods handle the main parsing. They are sorted * according to their precedence order, the lowest one first. */ @@ -2282,10 +2282,10 @@ private Node expr(Node end) { } } - @SuppressWarnings("fallthrough") /** * Parsing of sequences between alternations. */ + @SuppressWarnings("fallthrough") private Node sequence(Node end) { Node head = null; Node tail = null; @@ -2409,10 +2409,10 @@ private Node sequence(Node end) { return head; } - @SuppressWarnings("fallthrough") /** * Parse and add a new Single or Slice. */ + @SuppressWarnings("fallthrough") private Node atom() { int first = 0; int prev = -1; @@ -3322,10 +3322,10 @@ private Node createGroup(boolean anonymous) { return head; } - @SuppressWarnings("fallthrough") /** * Parses inlined match flags and set them appropriately. */ + @SuppressWarnings("fallthrough") private void addFlag() { int ch = peek(); for (;;) { @@ -3364,11 +3364,11 @@ private void addFlag() { } } - @SuppressWarnings("fallthrough") /** * Parses the second part of inlined match flags and turns off * flags appropriately. */ + @SuppressWarnings("fallthrough") private void subFlag() { int ch = peek(); for (;;) { @@ -3708,7 +3708,7 @@ private Node newSlice(int[] buf, int count, boolean hasSupplementary) { return hasSupplementary ? new SliceS(tmp) : new Slice(tmp); } - /** + /* * The following classes are the building components of the object * tree that represents a compiled regular expression. The object tree * is made of individual elements that handle constructs in the Pattern. diff --git a/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java b/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java index 86aa580b619..2bf0c711cfe 100644 --- a/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java +++ b/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java @@ -159,6 +159,8 @@ * CLDR version * * + * JDK 23 + * CLDR 45 * JDK 22 * CLDR 44 * JDK 21 diff --git a/src/java.base/share/classes/javax/crypto/CipherInputStream.java b/src/java.base/share/classes/javax/crypto/CipherInputStream.java index d9b8c989b54..546bdf0808d 100644 --- a/src/java.base/share/classes/javax/crypto/CipherInputStream.java +++ b/src/java.base/share/classes/javax/crypto/CipherInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -84,8 +84,8 @@ public class CipherInputStream extends FilterInputStream { /* the buffer holding data that have been read in from the underlying stream, but have not been processed by the cipher - engine. the size 512 bytes is somewhat randomly chosen */ - private final byte[] ibuffer = new byte[512]; + engine. */ + private final byte[] ibuffer = new byte[8192]; // having reached the end of the underlying input stream private boolean done = false; diff --git a/src/java.base/share/classes/jdk/internal/access/JavaAWTFontAccess.java b/src/java.base/share/classes/jdk/internal/access/JavaAWTFontAccess.java index 6a5102b5088..139f02450b8 100644 --- a/src/java.base/share/classes/jdk/internal/access/JavaAWTFontAccess.java +++ b/src/java.base/share/classes/jdk/internal/access/JavaAWTFontAccess.java @@ -23,12 +23,12 @@ * questions. */ +package jdk.internal.access; + /** * SharedSecrets interface used for the access from java.text.Bidi */ -package jdk.internal.access; - public interface JavaAWTFontAccess { // java.awt.font.TextAttribute constants diff --git a/src/java.base/share/classes/jdk/internal/classfile/impl/AbstractInstruction.java b/src/java.base/share/classes/jdk/internal/classfile/impl/AbstractInstruction.java index 1ee9e1136a5..4e9a55c77ac 100644 --- a/src/java.base/share/classes/jdk/internal/classfile/impl/AbstractInstruction.java +++ b/src/java.base/share/classes/jdk/internal/classfile/impl/AbstractInstruction.java @@ -262,6 +262,9 @@ public static final class BoundLookupSwitchInstruction this.afterPad = pos + 1 + ((4 - ((pos + 1 - code.codeStart) & 3)) & 3); this.npairs = code.classReader.readInt(afterPad + 4); + if (npairs < 0 || npairs > code.codeLength >> 3) { + throw new IllegalArgumentException("Invalid lookupswitch npairs value: " + npairs); + } } static int size(CodeImpl code, int codeStart, int pos) { @@ -314,6 +317,9 @@ static int size(CodeImpl code, int codeStart, int pos) { int pad = ap - (pos + 1); int low = code.classReader.readInt(ap + 4); int high = code.classReader.readInt(ap + 8); + if (high < low || high - low > code.codeLength >> 2) { + throw new IllegalArgumentException("Invalid tableswitch values low: " + low + " high: " + high); + } int cnt = high - low + 1; return 1 + pad + 12 + cnt * 4; } diff --git a/src/java.base/share/classes/jdk/internal/classfile/impl/CatchBuilderImpl.java b/src/java.base/share/classes/jdk/internal/classfile/impl/CatchBuilderImpl.java index 0878682ae56..5d262c397f6 100644 --- a/src/java.base/share/classes/jdk/internal/classfile/impl/CatchBuilderImpl.java +++ b/src/java.base/share/classes/jdk/internal/classfile/impl/CatchBuilderImpl.java @@ -62,7 +62,7 @@ public CodeBuilder.CatchBuilder catchingMulti(List exceptionTypes, Co if (catchBlock == null) { if (tryBlock.reachable()) { - b.branchInstruction(Opcode.GOTO, tryCatchEnd); + b.branch(Opcode.GOTO, tryCatchEnd); } } @@ -76,7 +76,7 @@ public CodeBuilder.CatchBuilder catchingMulti(List exceptionTypes, Co if (catchBlock != null) { catchBlock.end(); if (catchBlock.reachable()) { - b.branchInstruction(Opcode.GOTO, tryCatchEnd); + b.branch(Opcode.GOTO, tryCatchEnd); } } diff --git a/src/java.base/share/classes/jdk/internal/classfile/impl/ClassReaderImpl.java b/src/java.base/share/classes/jdk/internal/classfile/impl/ClassReaderImpl.java index 9b6c7d7ad4c..2022f8f0154 100644 --- a/src/java.base/share/classes/jdk/internal/classfile/impl/ClassReaderImpl.java +++ b/src/java.base/share/classes/jdk/internal/classfile/impl/ClassReaderImpl.java @@ -150,7 +150,7 @@ public int flags() { @Override public ClassEntry thisClassEntry() { if (thisClass == null) { - thisClass = readEntry(thisClassPos, ClassEntry.class); + thisClass = readClassEntry(thisClassPos); } return thisClass; } @@ -339,6 +339,10 @@ void writeConstantPoolEntries(BufWriter buf) { // Constantpool @Override public PoolEntry entryByIndex(int index) { + return entryByIndex(index, 0, 0xff); + } + + private PoolEntry entryByIndex(int index, int lowerBoundTag, int upperBoundTag) { if (index <= 0 || index >= constantPoolCount) { throw new ConstantPoolException("Bad CP index: " + index); } @@ -349,6 +353,10 @@ public PoolEntry entryByIndex(int index) { throw new ConstantPoolException("Unusable CP index: " + index); } int tag = readU1(offset); + if (tag < lowerBoundTag || tag > upperBoundTag) { + throw new ConstantPoolException( + "Bad tag (" + tag + ") at index (" + index + ") position (" + offset + ")"); + } final int q = offset + 1; info = switch (tag) { case TAG_UTF8 -> new AbstractPoolEntry.Utf8EntryImpl(this, index, buffer, q + 2, readU2(q)); @@ -367,7 +375,7 @@ public PoolEntry entryByIndex(int index) { case TAG_NAMEANDTYPE -> new AbstractPoolEntry.NameAndTypeEntryImpl(this, index, (AbstractPoolEntry.Utf8EntryImpl) readUtf8Entry(q), (AbstractPoolEntry.Utf8EntryImpl) readUtf8Entry(q + 2)); case TAG_METHODHANDLE -> new AbstractPoolEntry.MethodHandleEntryImpl(this, index, readU1(q), - (AbstractPoolEntry.AbstractMemberRefEntry) readEntry(q + 1)); + readEntry(q + 1, AbstractPoolEntry.AbstractMemberRefEntry.class, TAG_FIELDREF, TAG_INTERFACEMETHODREF)); case TAG_METHODTYPE -> new AbstractPoolEntry.MethodTypeEntryImpl(this, index, (AbstractPoolEntry.Utf8EntryImpl) readUtf8Entry(q)); case TAG_CONSTANTDYNAMIC -> new AbstractPoolEntry.ConstantDynamicEntryImpl(this, index, readU2(q), (AbstractPoolEntry.NameAndTypeEntryImpl) readNameAndTypeEntry(q + 2)); case TAG_INVOKEDYNAMIC -> new AbstractPoolEntry.InvokeDynamicEntryImpl(this, index, readU2(q), (AbstractPoolEntry.NameAndTypeEntryImpl) readNameAndTypeEntry(q + 2)); @@ -423,7 +431,15 @@ public PoolEntry readEntry(int pos) { @Override public T readEntry(int pos, Class cls) { - var e = readEntry(pos); + return readEntry(pos, cls, 0, 0xff); + } + + private T readEntry(int pos, Class cls, int expectedTag) { + return readEntry(pos, cls, expectedTag, expectedTag); + } + + private T readEntry(int pos, Class cls, int lowerBoundTag, int upperBoundTag) { + var e = entryByIndex(readU2(pos), lowerBoundTag, upperBoundTag); if (cls.isInstance(e)) return cls.cast(e); throw new ConstantPoolException("Not a " + cls.getSimpleName() + " at index: " + readU2(pos)); } @@ -454,27 +470,27 @@ public Utf8Entry readUtf8EntryOrNull(int pos) { @Override public ModuleEntry readModuleEntry(int pos) { - return readEntry(pos, ModuleEntry.class); + return readEntry(pos, ModuleEntry.class, TAG_MODULE); } @Override public PackageEntry readPackageEntry(int pos) { - return readEntry(pos, PackageEntry.class); + return readEntry(pos, PackageEntry.class, TAG_PACKAGE); } @Override public ClassEntry readClassEntry(int pos) { - return readEntry(pos, ClassEntry.class); + return readEntry(pos, ClassEntry.class, TAG_CLASS); } @Override public NameAndTypeEntry readNameAndTypeEntry(int pos) { - return readEntry(pos, NameAndTypeEntry.class); + return readEntry(pos, NameAndTypeEntry.class, TAG_NAMEANDTYPE); } @Override public MethodHandleEntry readMethodHandleEntry(int pos) { - return readEntry(pos, MethodHandleEntry.class); + return readEntry(pos, MethodHandleEntry.class, TAG_METHODHANDLE); } @Override diff --git a/src/java.base/share/classes/jdk/internal/classfile/impl/ClassRemapperImpl.java b/src/java.base/share/classes/jdk/internal/classfile/impl/ClassRemapperImpl.java index 8f35b85b5de..6e80e289064 100644 --- a/src/java.base/share/classes/jdk/internal/classfile/impl/ClassRemapperImpl.java +++ b/src/java.base/share/classes/jdk/internal/classfile/impl/ClassRemapperImpl.java @@ -231,25 +231,25 @@ public CodeTransform asCodeTransform() { return (CodeBuilder cob, CodeElement coe) -> { switch (coe) { case FieldInstruction fai -> - cob.fieldInstruction(fai.opcode(), map(fai.owner().asSymbol()), + cob.fieldAccess(fai.opcode(), map(fai.owner().asSymbol()), fai.name().stringValue(), map(fai.typeSymbol())); case InvokeInstruction ii -> - cob.invokeInstruction(ii.opcode(), map(ii.owner().asSymbol()), + cob.invoke(ii.opcode(), map(ii.owner().asSymbol()), ii.name().stringValue(), mapMethodDesc(ii.typeSymbol()), ii.isInterface()); case InvokeDynamicInstruction idi -> - cob.invokeDynamicInstruction(DynamicCallSiteDesc.of( + cob.invokedynamic(DynamicCallSiteDesc.of( idi.bootstrapMethod(), idi.name().stringValue(), mapMethodDesc(idi.typeSymbol()), idi.bootstrapArgs().stream().map(this::mapConstantValue).toArray(ConstantDesc[]::new))); case NewObjectInstruction c -> - cob.newObjectInstruction(map(c.className().asSymbol())); + cob.new_(map(c.className().asSymbol())); case NewReferenceArrayInstruction c -> cob.anewarray(map(c.componentType().asSymbol())); case NewMultiArrayInstruction c -> cob.multianewarray(map(c.arrayType().asSymbol()), c.dimensions()); case TypeCheckInstruction c -> - cob.typeCheckInstruction(c.opcode(), map(c.type().asSymbol())); + cob.with(TypeCheckInstruction.of(c.opcode(), map(c.type().asSymbol()))); case ExceptionCatch c -> cob.exceptionCatch(c.tryStart(), c.tryEnd(), c.handler(),c.catchType() .map(d -> TemporaryConstantPool.INSTANCE.classEntry(map(d.asSymbol())))); @@ -260,7 +260,7 @@ public CodeTransform asCodeTransform() { cob.localVariableType(c.slot(), c.name().stringValue(), mapSignature(c.signatureSymbol()), c.startScope(), c.endScope()); case LoadConstantInstruction ldc -> - cob.constantInstruction(ldc.opcode(), + cob.loadConstant(ldc.opcode(), mapConstantValue(ldc.constantValue())); case RuntimeVisibleTypeAnnotationsAttribute aa -> cob.with(RuntimeVisibleTypeAnnotationsAttribute.of( diff --git a/src/java.base/share/classes/jdk/internal/classfile/impl/CodeLocalsShifterImpl.java b/src/java.base/share/classes/jdk/internal/classfile/impl/CodeLocalsShifterImpl.java index 9b301ccc822..a68225fbf27 100644 --- a/src/java.base/share/classes/jdk/internal/classfile/impl/CodeLocalsShifterImpl.java +++ b/src/java.base/share/classes/jdk/internal/classfile/impl/CodeLocalsShifterImpl.java @@ -50,15 +50,15 @@ public CodeLocalsShifterImpl(int fixed) { public void accept(CodeBuilder cob, CodeElement coe) { switch (coe) { case LoadInstruction li -> - cob.loadInstruction( + cob.loadLocal( li.typeKind(), shift(cob, li.slot(), li.typeKind())); case StoreInstruction si -> - cob.storeInstruction( + cob.storeLocal( si.typeKind(), shift(cob, si.slot(), si.typeKind())); case IncrementInstruction ii -> - cob.incrementInstruction( + cob.iinc( shift(cob, ii.slot(), TypeKind.IntType), ii.constant()); case LocalVariable lv -> diff --git a/src/java.base/share/classes/jdk/internal/classfile/impl/CodeRelabelerImpl.java b/src/java.base/share/classes/jdk/internal/classfile/impl/CodeRelabelerImpl.java index 0e9bacd1cd9..f191cbf3c1f 100644 --- a/src/java.base/share/classes/jdk/internal/classfile/impl/CodeRelabelerImpl.java +++ b/src/java.base/share/classes/jdk/internal/classfile/impl/CodeRelabelerImpl.java @@ -51,18 +51,18 @@ public Label relabel(Label label, CodeBuilder cob) { public void accept(CodeBuilder cob, CodeElement coe) { switch (coe) { case BranchInstruction bi -> - cob.branchInstruction( + cob.branch( bi.opcode(), relabel(bi.target(), cob)); case LookupSwitchInstruction lsi -> - cob.lookupSwitchInstruction( + cob.lookupswitch( relabel(lsi.defaultTarget(), cob), lsi.cases().stream().map(c -> SwitchCase.of( c.caseValue(), relabel(c.target(), cob))).toList()); case TableSwitchInstruction tsi -> - cob.tableSwitchInstruction( + cob.tableswitch( tsi.lowValue(), tsi.highValue(), relabel(tsi.defaultTarget(), cob), diff --git a/src/java.base/share/classes/jdk/internal/classfile/impl/StackCounter.java b/src/java.base/share/classes/jdk/internal/classfile/impl/StackCounter.java index 688af262c70..0b52d4e1ea5 100644 --- a/src/java.base/share/classes/jdk/internal/classfile/impl/StackCounter.java +++ b/src/java.base/share/classes/jdk/internal/classfile/impl/StackCounter.java @@ -37,6 +37,8 @@ import java.util.Queue; import static java.lang.classfile.ClassFile.*; +import java.lang.constant.ClassDesc; +import java.util.stream.Collectors; public final class StackCounter { @@ -45,6 +47,7 @@ private record Target(int bci, int stack) {} static StackCounter of(DirectCodeBuilder dcb, BufWriterImpl buf) { return new StackCounter( dcb, + buf.thisClass().asSymbol(), dcb.methodInfo.methodName().stringValue(), dcb.methodInfo.methodTypeSymbol(), (dcb.methodInfo.methodFlags() & ACC_STATIC) != 0, @@ -56,8 +59,11 @@ static StackCounter of(DirectCodeBuilder dcb, BufWriterImpl buf) { private int stack, maxStack, maxLocals, rets; private final RawBytecodeHelper bcs; + private final ClassDesc thisClass; private final String methodName; private final MethodTypeDesc methodDesc; + private final boolean isStatic; + private final ByteBuffer bytecode; private final SplitConstantPool cp; private final Queue targets; private final BitSet visited; @@ -91,14 +97,18 @@ private boolean next() { } public StackCounter(LabelContext labelContext, + ClassDesc thisClass, String methodName, MethodTypeDesc methodDesc, boolean isStatic, ByteBuffer bytecode, SplitConstantPool cp, List handlers) { + this.thisClass = thisClass; this.methodName = methodName; this.methodDesc = methodDesc; + this.isStatic = isStatic; + this.bytecode = bytecode; this.cp = cp; targets = new ArrayDeque<>(); maxStack = stack = rets = 0; @@ -247,24 +257,24 @@ public StackCounter(LabelContext labelContext, int low = bcs.getInt(alignedBci + 4); int high = bcs.getInt(alignedBci + 2 * 4); if (low > high) { - error("low must be less than or equal to high in tableswitch"); + throw error("low must be less than or equal to high in tableswitch"); } keys = high - low + 1; if (keys < 0) { - error("too many keys in tableswitch"); + throw error("too many keys in tableswitch"); } delta = 1; } else { keys = bcs.getInt(alignedBci + 4); if (keys < 0) { - error("number of keys in lookupswitch less than 0"); + throw error("number of keys in lookupswitch less than 0"); } delta = 2; for (int i = 0; i < (keys - 1); i++) { int this_key = bcs.getInt(alignedBci + (2 + 2 * i) * 4); int next_key = bcs.getInt(alignedBci + (2 + 2 * i + 2) * 4); if (this_key >= next_key) { - error("Bad lookupswitch instruction"); + throw error("Bad lookupswitch instruction"); } } } @@ -326,7 +336,7 @@ public StackCounter(LabelContext labelContext, next(); } default -> - error(String.format("Bad instruction: %02x", opcode)); + throw error(String.format("Bad instruction: %02x", opcode)); } } } @@ -360,15 +370,17 @@ private void processLdc(int index) { case TAG_CONSTANTDYNAMIC -> addStackSlot(((ConstantDynamicEntry)cp.entryByIndex(index)).typeKind().slotSize()); default -> - error("CP entry #%d %s is not loadable constant".formatted(index, cp.entryByIndex(index).tag())); + throw error("CP entry #%d %s is not loadable constant".formatted(index, cp.entryByIndex(index).tag())); } } - private void error(String msg) { - throw new IllegalArgumentException("%s at bytecode offset %d of method %s(%s)".formatted( + private IllegalArgumentException error(String msg) { + var sb = new StringBuilder("%s at bytecode offset %d of method %s(%s)".formatted( msg, bcs.bci, methodName, - methodDesc.displayDescriptor())); + methodDesc.parameterList().stream().map(ClassDesc::displayName).collect(Collectors.joining(",")))); + Util.dumpMethod(cp, thisClass, methodName, methodDesc, isStatic ? ACC_STATIC : 0, bytecode, sb::append); + return new IllegalArgumentException(sb.toString()); } } diff --git a/src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java b/src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java index 9d4f898e5cd..81e6f341a13 100644 --- a/src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java +++ b/src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java @@ -48,8 +48,6 @@ import java.lang.classfile.Label; import java.lang.classfile.attribute.StackMapTableAttribute; import java.lang.classfile.Attributes; -import java.lang.classfile.components.ClassPrinter; -import java.lang.classfile.attribute.CodeAttribute; /** * StackMapGenerator is responsible for stack map frames generation. @@ -836,36 +834,7 @@ private IllegalArgumentException generatorError(String msg, int offset) { offset, methodName, methodDesc.parameterList().stream().map(ClassDesc::displayName).collect(Collectors.joining(",")))); - //try to attach debug info about corrupted bytecode to the message - try { - var cc = ClassFile.of(); - var clm = cc.parse(cc.build(cp.classEntry(thisType.sym()), cp, clb -> - clb.withMethod(methodName, methodDesc, isStatic ? ACC_STATIC : 0, mb -> - ((DirectMethodBuilder)mb).writeAttribute(new UnboundAttribute.AdHocAttribute(Attributes.CODE) { - @Override - public void writeBody(BufWriter b) { - b.writeU2(-1);//max stack - b.writeU2(-1);//max locals - b.writeInt(bytecode.limit()); - b.writeBytes(bytecode.array(), 0, bytecode.limit()); - b.writeU2(0);//exception handlers - b.writeU2(0);//attributes - } - })))); - ClassPrinter.toYaml(clm.methods().get(0).code().get(), ClassPrinter.Verbosity.TRACE_ALL, sb::append); - } catch (Error | Exception suppresed) { - //fallback to bytecode hex dump - bytecode.rewind(); - while (bytecode.position() < bytecode.limit()) { - sb.append("%n%04x:".formatted(bytecode.position())); - for (int i = 0; i < 16 && bytecode.position() < bytecode.limit(); i++) { - sb.append(" %02x".formatted(bytecode.get())); - } - } - var err = new IllegalArgumentException(sb.toString()); - err.addSuppressed(suppresed); - return err; - } + Util.dumpMethod(cp, thisType.sym(), methodName, methodDesc, isStatic ? ACC_STATIC : 0, bytecode, sb::append); return new IllegalArgumentException(sb.toString()); } diff --git a/src/java.base/share/classes/jdk/internal/classfile/impl/Util.java b/src/java.base/share/classes/jdk/internal/classfile/impl/Util.java index 11e3328e775..7bff7e6f06d 100644 --- a/src/java.base/share/classes/jdk/internal/classfile/impl/Util.java +++ b/src/java.base/share/classes/jdk/internal/classfile/impl/Util.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,8 @@ import java.lang.classfile.Attribute; import java.lang.classfile.AttributeMapper; +import java.lang.classfile.Attributes; +import java.lang.classfile.BufWriter; import java.lang.classfile.ClassFile; import java.lang.classfile.Opcode; import java.lang.classfile.constantpool.ClassEntry; @@ -43,6 +45,11 @@ import jdk.internal.access.SharedSecrets; import static java.lang.classfile.ClassFile.ACC_STATIC; +import java.lang.classfile.attribute.CodeAttribute; +import java.lang.classfile.components.ClassPrinter; +import java.lang.classfile.constantpool.ConstantPoolBuilder; +import java.nio.ByteBuffer; +import java.util.function.Consumer; /** * Helper to create and manipulate type descriptors, where type descriptors are @@ -193,4 +200,41 @@ public static boolean isDoubleSlot(ClassDesc desc) { char ch = desc.descriptorString().charAt(0); return ch == 'D' || ch == 'J'; } + + public static void dumpMethod(SplitConstantPool cp, + ClassDesc cls, + String methodName, + MethodTypeDesc methodDesc, + int acc, + ByteBuffer bytecode, + Consumer dump) { + + // try to dump debug info about corrupted bytecode + try { + var cc = ClassFile.of(); + var clm = cc.parse(cc.build(cp.classEntry(cls), cp, clb -> + clb.withMethod(methodName, methodDesc, acc, mb -> + ((DirectMethodBuilder)mb).writeAttribute(new UnboundAttribute.AdHocAttribute(Attributes.CODE) { + @Override + public void writeBody(BufWriter b) { + b.writeU2(-1);//max stack + b.writeU2(-1);//max locals + b.writeInt(bytecode.limit()); + b.writeBytes(bytecode.array(), 0, bytecode.limit()); + b.writeU2(0);//exception handlers + b.writeU2(0);//attributes + } + })))); + ClassPrinter.toYaml(clm.methods().get(0).code().get(), ClassPrinter.Verbosity.TRACE_ALL, dump); + } catch (Error | Exception _) { + // fallback to bytecode hex dump + bytecode.rewind(); + while (bytecode.position() < bytecode.limit()) { + dump.accept("%n%04x:".formatted(bytecode.position())); + for (int i = 0; i < 16 && bytecode.position() < bytecode.limit(); i++) { + dump.accept(" %02x".formatted(bytecode.get())); + } + } + } + } } diff --git a/src/java.base/share/classes/jdk/internal/event/FileForceEvent.java b/src/java.base/share/classes/jdk/internal/event/FileForceEvent.java new file mode 100644 index 00000000000..f6dec6c8a5e --- /dev/null +++ b/src/java.base/share/classes/jdk/internal/event/FileForceEvent.java @@ -0,0 +1,110 @@ +/* + * 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. + */ + +package jdk.internal.event; + +/** + * A JFR event for forced updates written to files. This event is mirrored in + * {@code jdk.jfr.events.FileForceEvent } where the event annotations are + * provided. Some of the methods are replaced by generated + * methods when jfr is enabled. Note that the order of the arguments of the + * {@link #commit(long, long, String, boolean)} method + * must be the same as the order of the fields. + */ +public class FileForceEvent extends Event { + + // THE ORDER OF THE FOLLOWING FIELDS IS IMPORTANT! + // The order must match the argument order of the generated commit method. + public String path; + public boolean metaData; + + /** + * Helper method to offer the data needed to potentially commit an event. + * The duration of the operation is computed using the current + * timestamp and the given start time. If the duration is meets + * or exceeds the configured value (determined by calling the generated method + * {@link #shouldCommit(long)}), an event will be emitted by calling + * {@link #commit(long, long, String, boolean)}. + * + * @param start timestamp of the start of the operation + * @param path the full pathname of the file + * @param metaData true if the file metadata is updated + */ + public static void offer(long start, String path, boolean metaData) { + long duration = timestamp() - start; + if (shouldCommit(duration)) { + commit(start, duration, path, metaData); + } + } + + /** + * Actually commit an event. The implementation is generated automatically. + * The order of the fields must be the same as the parameters in this method. + * + * @param start timestamp of the start of the operation + * @param duration time in nanoseconds to complete the operation + * @param path the full pathname of the file + * @param metaData true if the file metadata is updated + */ + public static void commit(long start, long duration, String path, boolean metaData) { + // Generated by JFR + } + + /** + * Determine if an event should be emitted. The duration of the operation + * must exceed some threshold in order to commit the event. The implementation + * of this method is generated automatically if jfr is enabled. + * + * @param duration time in nanoseconds to complete the operation + * @return true if the event should be commited + */ + public static boolean shouldCommit(long duration) { + // Generated by JFR + return false; + } + + /** + * Determine if this kind of event is enabled. The implementation + * of this method is generated automatically if jfr is enabled. + * + * @return true if this type of event is enabled, false otherwise + */ + public static boolean enabled() { + // Generated by JFR + return false; + } + + /** + * Fetch the current timestamp in nanoseconds. This method is used + * to determine the start and end of an operation. The implementation + * of this method is generated automatically if jfr is enabled. + * + * @return the current timestamp value + */ + public static long timestamp() { + // Generated by JFR + return 0L; + } +} diff --git a/src/java.base/share/classes/jdk/internal/foreign/CABI.java b/src/java.base/share/classes/jdk/internal/foreign/CABI.java index 500e312b2f3..3aca7243a36 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/CABI.java +++ b/src/java.base/share/classes/jdk/internal/foreign/CABI.java @@ -23,6 +23,13 @@ * questions. * */ + +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved + * =========================================================================== + */ + package jdk.internal.foreign; import jdk.internal.foreign.abi.fallback.FallbackLinker; @@ -44,6 +51,7 @@ public enum CABI { LINUX_PPC_64_LE, LINUX_RISCV_64, LINUX_S390, + ZOS_S390, FALLBACK, UNSUPPORTED; @@ -93,6 +101,8 @@ private static CABI computeCurrent() { } else if (arch.equals("s390x")) { if (OperatingSystem.isLinux()) { return LINUX_S390; + } else { + return ZOS_S390; } } } else if (FallbackLinker.isSupported()) { diff --git a/src/java.base/share/classes/jdk/internal/foreign/SystemLookup.java b/src/java.base/share/classes/jdk/internal/foreign/SystemLookup.java index 8681aaadbdc..813085e4d6d 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/SystemLookup.java +++ b/src/java.base/share/classes/jdk/internal/foreign/SystemLookup.java @@ -145,7 +145,7 @@ public Boolean run() { libLookup(libs -> libs.load(jdkLibraryPath("syslookup"))); @SuppressWarnings("restricted") - MemorySegment funcs = fallbackLibLookup.find("funcs").orElseThrow() + MemorySegment funcs = fallbackLibLookup.findOrThrow("funcs") .reinterpret(WindowsFallbackSymbols.LAYOUT.byteSize()); Function> fallbackLookup = name -> Optional.ofNullable(WindowsFallbackSymbols.valueOfOrNull(name)) diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java b/src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java index 4f3baaa0e71..96572b6912e 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java @@ -22,6 +22,13 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved + * =========================================================================== + */ + package jdk.internal.foreign.abi; import jdk.internal.foreign.SystemLookup; @@ -35,6 +42,7 @@ import jdk.internal.foreign.abi.ppc64.linux.LinuxPPC64leLinker; import jdk.internal.foreign.abi.riscv64.linux.LinuxRISCV64Linker; import jdk.internal.foreign.abi.s390.linux.LinuxS390Linker; +import jdk.internal.foreign.abi.s390.zos.ZosS390Linker; import jdk.internal.foreign.abi.x64.sysv.SysVx64Linker; import jdk.internal.foreign.abi.x64.windows.Windowsx64Linker; import jdk.internal.foreign.layout.AbstractLayout; @@ -66,6 +74,7 @@ public abstract sealed class AbstractLinker implements Linker permits LinuxAArch Windowsx64Linker, AixPPC64Linker, LinuxPPC64Linker, LinuxPPC64leLinker, LinuxRISCV64Linker, LinuxS390Linker, + ZosS390Linker, FallbackLinker { public interface UpcallStubFactory { diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java b/src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java index a399b815ee6..7f5ef54bdca 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java @@ -274,8 +274,8 @@ private void specialize() { if (shouldAcquire(i)) { int scopeLocal = cb.allocateLocal(ReferenceType); initialScopeSlots[numScopes++] = scopeLocal; - cb.constantInstruction(null); - cb.storeInstruction(ReferenceType, scopeLocal); // need to initialize all scope locals here in case an exception occurs + cb.loadConstant(null); + cb.storeLocal(ReferenceType, scopeLocal); // need to initialize all scope locals here in case an exception occurs } } scopeSlots = Arrays.copyOf(initialScopeSlots, numScopes); // fit to size @@ -284,7 +284,7 @@ private void specialize() { // create a Binding.Context for this call if (callingSequence.allocationSize() != 0) { - cb.constantInstruction(callingSequence.allocationSize()); + cb.loadConstant(callingSequence.allocationSize()); cb.invokestatic(CD_SharedUtils, "newBoundedArena", MTD_NEW_BOUNDED_ARENA); } else if (callingSequence.forUpcall() && needsSession()) { cb.invokestatic(CD_SharedUtils, "newEmptyArena", MTD_NEW_EMPTY_ARENA); @@ -292,7 +292,7 @@ private void specialize() { cb.getstatic(CD_SharedUtils, "DUMMY_ARENA", CD_Arena); } contextIdx = cb.allocateLocal(ReferenceType); - cb.storeInstruction(ReferenceType, contextIdx); + cb.storeLocal(ReferenceType, contextIdx); // in case the call needs a return buffer, allocate it here. // for upcalls the VM wrapper stub allocates the buffer. @@ -300,7 +300,7 @@ private void specialize() { emitLoadInternalAllocator(); emitAllocateCall(callingSequence.returnBufferSize(), 1); returnBufferIdx = cb.allocateLocal(ReferenceType); - cb.storeInstruction(ReferenceType, returnBufferIdx); + cb.storeLocal(ReferenceType, returnBufferIdx); } Label tryStart = cb.newLabel(); @@ -323,7 +323,7 @@ private void specialize() { // for downcalls, recipes have an input value, which we set up here if (callingSequence.needsReturnBuffer() && i == 0) { assert returnBufferIdx != -1; - cb.loadInstruction(ReferenceType, returnBufferIdx); + cb.loadLocal(ReferenceType, returnBufferIdx); pushType(MemorySegment.class); } else { emitGetInput(); @@ -339,7 +339,7 @@ private void specialize() { // return buffer ptr is wrapped in a MemorySegment above, but not passed to the leaf handle popType(MemorySegment.class); returnBufferIdx = cb.allocateLocal(ReferenceType); - cb.storeInstruction(ReferenceType, returnBufferIdx); + cb.storeLocal(ReferenceType, returnBufferIdx); } else { // for upcalls the recipe result is an argument to the leaf handle emitSetOutput(typeStack.pop()); @@ -352,14 +352,14 @@ private void specialize() { // load the leaf MethodHandle if (callingSequence.forDowncall()) { - cb.constantInstruction(CLASS_DATA_DESC); + cb.loadConstant(CLASS_DATA_DESC); } else { - cb.loadInstruction(ReferenceType, 0); // load target arg + cb.loadLocal(ReferenceType, 0); // load target arg } cb.checkcast(CD_MethodHandle); // load all the leaf args for (int i = 0; i < leafArgSlots.length; i++) { - cb.loadInstruction(TypeKind.from(leafArgTypes.get(i)), leafArgSlots[i]); + cb.loadLocal(TypeKind.from(leafArgTypes.get(i)), leafArgSlots[i]); } // call leaf MH cb.invokevirtual(CD_MethodHandle, "invokeExact", desc(leafType)); @@ -396,7 +396,7 @@ private void specialize() { } else { popType(callerMethodType.returnType()); assert typeStack.isEmpty(); - cb.returnInstruction(TypeKind.from(callerMethodType.returnType())); + cb.return_(TypeKind.from(callerMethodType.returnType())); } } else { assert callerMethodType.returnType() == void.class; @@ -411,13 +411,13 @@ private void specialize() { // finally emitCleanup(); if (callingSequence.forDowncall()) { - cb.throwInstruction(); + cb.athrow(); } else { cb.invokestatic(CD_SharedUtils, "handleUncaughtException", MTD_HANDLE_UNCAUGHT_EXCEPTION); if (callerMethodType.returnType() != void.class) { TypeKind returnTypeKind = TypeKind.from(callerMethodType.returnType()); emitConstZero(returnTypeKind); - cb.returnInstruction(returnTypeKind); + cb.return_(returnTypeKind); } else { cb.return_(); } @@ -477,13 +477,13 @@ private void doBindings(List bindings) { } private void emitSetOutput(Class storeType) { - cb.storeInstruction(TypeKind.from(storeType), leafArgSlots[leafArgTypes.size()]); + cb.storeLocal(TypeKind.from(storeType), leafArgSlots[leafArgTypes.size()]); leafArgTypes.add(storeType); } private void emitGetInput() { Class highLevelType = callerMethodType.parameterType(paramIndex); - cb.loadInstruction(TypeKind.from(highLevelType), cb.parameterSlot(paramIndex)); + cb.loadLocal(TypeKind.from(highLevelType), cb.parameterSlot(paramIndex)); if (shouldAcquire(paramIndex)) { cb.dup(); @@ -505,7 +505,7 @@ private void emitAcquireScope() { boolean hasOtherScopes = curScopeLocalIdx != 0; for (int i = 0; i < curScopeLocalIdx; i++) { cb.dup(); // dup for comparison - cb.loadInstruction(ReferenceType, scopeSlots[i]); + cb.loadLocal(ReferenceType, scopeSlots[i]); cb.if_acmpeq(skipAcquire); } @@ -514,7 +514,7 @@ private void emitAcquireScope() { int nextScopeLocal = scopeSlots[curScopeLocalIdx++]; // call acquire first here. So that if it fails, we don't call release cb.invokevirtual(CD_MemorySessionImpl, "acquire0", MTD_ACQUIRE0); // call acquire on the other - cb.storeInstruction(ReferenceType, nextScopeLocal); // store off one to release later + cb.storeLocal(ReferenceType, nextScopeLocal); // store off one to release later if (hasOtherScopes) { // avoid ASM generating a bunch of nops for the dead code cb.goto_(end); @@ -528,9 +528,9 @@ private void emitAcquireScope() { private void emitReleaseScopes() { for (int scopeLocal : scopeSlots) { - cb.loadInstruction(ReferenceType, scopeLocal); + cb.loadLocal(ReferenceType, scopeLocal); cb.ifThen(Opcode.IFNONNULL, ifCb -> { - ifCb.loadInstruction(ReferenceType, scopeLocal); + ifCb.loadLocal(ReferenceType, scopeLocal); ifCb.invokevirtual(CD_MemorySessionImpl, "release0", MTD_RELEASE0); }); } @@ -539,18 +539,18 @@ private void emitReleaseScopes() { private void emitSaveReturnValue(Class storeType) { TypeKind typeKind = TypeKind.from(storeType); retValIdx = cb.allocateLocal(typeKind); - cb.storeInstruction(typeKind, retValIdx); + cb.storeLocal(typeKind, retValIdx); } private void emitRestoreReturnValue(Class loadType) { assert retValIdx != -1; - cb.loadInstruction(TypeKind.from(loadType), retValIdx); + cb.loadLocal(TypeKind.from(loadType), retValIdx); pushType(loadType); } private void emitLoadInternalSession() { assert contextIdx != -1; - cb.loadInstruction(ReferenceType, contextIdx); + cb.loadLocal(ReferenceType, contextIdx); cb.checkcast(CD_Arena); cb.invokeinterface(CD_Arena, "scope", MTD_SCOPE); cb.checkcast(CD_MemorySessionImpl); @@ -558,20 +558,20 @@ private void emitLoadInternalSession() { private void emitLoadInternalAllocator() { assert contextIdx != -1; - cb.loadInstruction(ReferenceType, contextIdx); + cb.loadLocal(ReferenceType, contextIdx); } private void emitCloseContext() { assert contextIdx != -1; - cb.loadInstruction(ReferenceType, contextIdx); + cb.loadLocal(ReferenceType, contextIdx); cb.checkcast(CD_Arena); cb.invokeinterface(CD_Arena, "close", MTD_CLOSE); } private void emitBoxAddress(BoxAddress boxAddress) { popType(long.class); - cb.constantInstruction(boxAddress.size()); - cb.constantInstruction(boxAddress.align()); + cb.loadConstant(boxAddress.size()); + cb.loadConstant(boxAddress.align()); if (needsSession()) { emitLoadInternalSession(); cb.invokestatic(CD_Utils, "longToAddress", MTD_LONG_TO_ADDRESS_SCOPE); @@ -584,7 +584,7 @@ private void emitBoxAddress(BoxAddress boxAddress) { private void emitAllocBuffer(Allocate binding) { if (callingSequence.forDowncall()) { assert returnAllocatorIdx != -1; - cb.loadInstruction(ReferenceType, returnAllocatorIdx); + cb.loadLocal(ReferenceType, returnAllocatorIdx); } else { emitLoadInternalAllocator(); } @@ -603,11 +603,11 @@ private void emitBufferStore(BufferStore bufferStore) { if (SharedUtils.isPowerOfTwo(byteWidth)) { int valueIdx = cb.allocateLocal(storeTypeKind); - cb.storeInstruction(storeTypeKind, valueIdx); + cb.storeLocal(storeTypeKind, valueIdx); ClassDesc valueLayoutType = emitLoadLayoutConstant(storeType); - cb.constantInstruction(offset); - cb.loadInstruction(storeTypeKind, valueIdx); + cb.loadConstant(offset); + cb.loadLocal(storeTypeKind, valueIdx); MethodTypeDesc descriptor = MethodTypeDesc.of(CD_void, valueLayoutType, CD_long, desc(storeType)); cb.invokeinterface(CD_MemorySegment, "set", descriptor); } else { @@ -618,9 +618,9 @@ private void emitBufferStore(BufferStore bufferStore) { assert storeType == long.class; // chunking only for int and long } int longValueIdx = cb.allocateLocal(LongType); - cb.storeInstruction(LongType, longValueIdx); + cb.storeLocal(LongType, longValueIdx); int writeAddrIdx = cb.allocateLocal(ReferenceType); - cb.storeInstruction(ReferenceType, writeAddrIdx); + cb.storeLocal(ReferenceType, writeAddrIdx); int remaining = byteWidth; int chunkOffset = 0; @@ -647,25 +647,25 @@ private void emitBufferStore(BufferStore bufferStore) { //int writeChunk = (int) (((0xFFFF_FFFFL << shiftAmount) & longValue) >>> shiftAmount); int shiftAmount = chunkOffset * Byte.SIZE; mask = mask << shiftAmount; - cb.loadInstruction(LongType, longValueIdx); - cb.constantInstruction(mask); + cb.loadLocal(LongType, longValueIdx); + cb.loadConstant(mask); cb.land(); if (shiftAmount != 0) { - cb.constantInstruction(shiftAmount); + cb.loadConstant(shiftAmount); cb.lushr(); } cb.l2i(); TypeKind chunkStoreTypeKind = TypeKind.from(chunkStoreType); int chunkIdx = cb.allocateLocal(chunkStoreTypeKind); - cb.storeInstruction(chunkStoreTypeKind, chunkIdx); + cb.storeLocal(chunkStoreTypeKind, chunkIdx); // chunk done, now write it //writeAddress.set(JAVA_SHORT_UNALIGNED, offset, writeChunk); - cb.loadInstruction(ReferenceType, writeAddrIdx); + cb.loadLocal(ReferenceType, writeAddrIdx); ClassDesc valueLayoutType = emitLoadLayoutConstant(chunkStoreType); long writeOffset = offset + SharedUtils.pickChunkOffset(chunkOffset, byteWidth, chunkSize); - cb.constantInstruction(writeOffset); - cb.loadInstruction(chunkStoreTypeKind, chunkIdx); + cb.loadConstant(writeOffset); + cb.loadLocal(chunkStoreTypeKind, chunkIdx); MethodTypeDesc descriptor = MethodTypeDesc.of(CD_void, valueLayoutType, CD_long, desc(chunkStoreType)); cb.invokeinterface(CD_MemorySegment, "set", descriptor); @@ -690,13 +690,13 @@ private void emitVMStore(VMStore vmStore) { emitSaveReturnValue(storeType); } else { int valueIdx = cb.allocateLocal(storeTypeKind); - cb.storeInstruction(storeTypeKind, valueIdx); // store away the stored value, need it later + cb.storeLocal(storeTypeKind, valueIdx); // store away the stored value, need it later assert returnBufferIdx != -1; - cb.loadInstruction(ReferenceType, returnBufferIdx); + cb.loadLocal(ReferenceType, returnBufferIdx); ClassDesc valueLayoutType = emitLoadLayoutConstant(storeType); - cb.constantInstruction(retBufOffset); - cb.loadInstruction(storeTypeKind, valueIdx); + cb.loadConstant(retBufOffset); + cb.loadLocal(storeTypeKind, valueIdx); MethodTypeDesc descriptor = MethodTypeDesc.of(CD_void, valueLayoutType, CD_long, desc(storeType)); cb.invokeinterface(CD_MemorySegment, "set", descriptor); retBufOffset += abi.arch.typeSize(vmStore.storage().type()); @@ -713,9 +713,9 @@ private void emitVMLoad(VMLoad vmLoad) { emitRestoreReturnValue(loadType); } else { assert returnBufferIdx != -1; - cb.loadInstruction(ReferenceType, returnBufferIdx); + cb.loadLocal(ReferenceType, returnBufferIdx); ClassDesc valueLayoutType = emitLoadLayoutConstant(loadType); - cb.constantInstruction(retBufOffset); + cb.loadConstant(retBufOffset); MethodTypeDesc descriptor = MethodTypeDesc.of(desc(loadType), valueLayoutType, CD_long); cb.invokeinterface(CD_MemorySegment, "get", descriptor); retBufOffset += abi.arch.typeSize(vmLoad.storage().type()); @@ -735,14 +735,14 @@ private void emitDupBinding() { private void emitShiftLeft(ShiftLeft shiftLeft) { popType(long.class); - cb.constantInstruction(shiftLeft.shiftAmount() * Byte.SIZE); + cb.loadConstant(shiftLeft.shiftAmount() * Byte.SIZE); cb.lshl(); pushType(long.class); } private void emitShiftRight(ShiftRight shiftRight) { popType(long.class); - cb.constantInstruction(shiftRight.shiftAmount() * Byte.SIZE); + cb.loadConstant(shiftRight.shiftAmount() * Byte.SIZE); cb.lushr(); pushType(long.class); } @@ -757,7 +757,7 @@ private void emitCast(Cast cast) { // implement least significant byte non-zero test // select first byte - cb.constantInstruction(0xFF); + cb.loadConstant(0xFF); cb.iand(); // convert to boolean @@ -808,17 +808,17 @@ private void emitBufferLoad(BufferLoad bufferLoad) { if (SharedUtils.isPowerOfTwo(byteWidth)) { ClassDesc valueLayoutType = emitLoadLayoutConstant(loadType); - cb.constantInstruction(offset); + cb.loadConstant(offset); MethodTypeDesc descriptor = MethodTypeDesc.of(desc(loadType), valueLayoutType, CD_long); cb.invokeinterface(CD_MemorySegment, "get", descriptor); } else { // chunked int readAddrIdx = cb.allocateLocal(ReferenceType); - cb.storeInstruction(ReferenceType, readAddrIdx); + cb.storeLocal(ReferenceType, readAddrIdx); - cb.constantInstruction(0L); // result + cb.loadConstant(0L); // result int resultIdx = cb.allocateLocal(LongType); - cb.storeInstruction(LongType, resultIdx); + cb.storeLocal(LongType, resultIdx); int remaining = byteWidth; int chunkOffset = 0; @@ -847,30 +847,30 @@ private void emitBufferLoad(BufferLoad bufferLoad) { throw new IllegalStateException("Unexpected chunk size for chunked write: " + chunkSize); } // read from segment - cb.loadInstruction(ReferenceType, readAddrIdx); + cb.loadLocal(ReferenceType, readAddrIdx); ClassDesc valueLayoutType = emitLoadLayoutConstant(chunkType); MethodTypeDesc descriptor = MethodTypeDesc.of(desc(chunkType), valueLayoutType, CD_long); long readOffset = offset + SharedUtils.pickChunkOffset(chunkOffset, byteWidth, chunkSize); - cb.constantInstruction(readOffset); + cb.loadConstant(readOffset); cb.invokeinterface(CD_MemorySegment, "get", descriptor); cb.invokestatic(toULongHolder, "toUnsignedLong", toULongDescriptor); // shift to right offset int shiftAmount = chunkOffset * Byte.SIZE; if (shiftAmount != 0) { - cb.constantInstruction(shiftAmount); + cb.loadConstant(shiftAmount); cb.lshl(); } // add to result - cb.loadInstruction(LongType, resultIdx); + cb.loadLocal(LongType, resultIdx); cb.lor(); - cb.storeInstruction(LongType, resultIdx); + cb.storeLocal(LongType, resultIdx); remaining -= chunkSize; chunkOffset += chunkSize; } while (remaining != 0); - cb.loadInstruction(LongType, resultIdx); + cb.loadLocal(LongType, resultIdx); if (loadType == int.class) { cb.l2i(); } else { @@ -890,25 +890,25 @@ private void emitCopyBuffer(Copy copy) { // operand/srcSegment is on the stack // generating a call to: // MemorySegment::copy(MemorySegment srcSegment, long srcOffset, MemorySegment dstSegment, long dstOffset, long bytes) - cb.constantInstruction(0L); + cb.loadConstant(0L); // create the dstSegment by allocating it. Similar to: // context.allocator().allocate(size, alignment) emitLoadInternalAllocator(); emitAllocateCall(size, alignment); cb.dup(); int storeIdx = cb.allocateLocal(ReferenceType); - cb.storeInstruction(ReferenceType, storeIdx); - cb.constantInstruction(0L); - cb.constantInstruction(size); + cb.storeLocal(ReferenceType, storeIdx); + cb.loadConstant(0L); + cb.loadConstant(size); cb.invokestatic(CD_MemorySegment, "copy", MTD_COPY, true); - cb.loadInstruction(ReferenceType, storeIdx); + cb.loadLocal(ReferenceType, storeIdx); pushType(MemorySegment.class); } private void emitAllocateCall(long size, long alignment) { - cb.constantInstruction(size); - cb.constantInstruction(alignment); + cb.loadConstant(size); + cb.loadConstant(alignment); cb.invokeinterface(CD_SegmentAllocator, "allocate", MTD_ALLOCATE); } diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java b/src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java index 83698398eda..8088e414f7a 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java @@ -22,6 +22,13 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved + * =========================================================================== + */ + package jdk.internal.foreign.abi; import jdk.internal.access.JavaLangAccess; @@ -38,6 +45,7 @@ import jdk.internal.foreign.abi.ppc64.linux.LinuxPPC64leLinker; import jdk.internal.foreign.abi.riscv64.linux.LinuxRISCV64Linker; import jdk.internal.foreign.abi.s390.linux.LinuxS390Linker; +import jdk.internal.foreign.abi.s390.zos.ZosS390Linker; import jdk.internal.foreign.abi.x64.sysv.SysVx64Linker; import jdk.internal.foreign.abi.x64.windows.Windowsx64Linker; import jdk.internal.vm.annotation.ForceInline; @@ -251,6 +259,7 @@ public static Linker getSystemLinker() { case LINUX_PPC_64_LE -> LinuxPPC64leLinker.getInstance(); case LINUX_RISCV_64 -> LinuxRISCV64Linker.getInstance(); case LINUX_S390 -> LinuxS390Linker.getInstance(); + case ZOS_S390 -> ZosS390Linker.getInstance(); case FALLBACK -> FallbackLinker.getInstance(); case UNSUPPORTED -> throw new UnsupportedOperationException("Platform does not support native linker"); }; diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/s390/zos/ZosS390CallArranger.java b/src/java.base/share/classes/jdk/internal/foreign/abi/s390/zos/ZosS390CallArranger.java new file mode 100644 index 00000000000..a529a3c821f --- /dev/null +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/s390/zos/ZosS390CallArranger.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved + * =========================================================================== + */ + +package jdk.internal.foreign.abi.s390.zos; + +import java.lang.foreign.FunctionDescriptor; +import jdk.internal.foreign.abi.AbstractLinker.UpcallStubFactory; +import jdk.internal.foreign.abi.DowncallLinker; +import jdk.internal.foreign.abi.LinkerOptions; +import jdk.internal.foreign.abi.UpcallLinker; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodType; + +/** + * For the s390 C ABI specifically, this class uses the DowncallLinker API + * which is turned into a MethodHandle to invoke the native code. + */ +public class ZosS390CallArranger { + + /* Replace DowncallLinker in OpenJDK with the implementation of DowncallLinker specific to OpenJ9. */ + public static MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDesc, LinkerOptions options) { + return DowncallLinker.getBoundMethodHandle(mt, cDesc, options); + } + + /* Replace UpcallLinker in OpenJDK with the implementation of UpcallLinker specific to OpenJ9. */ + public static UpcallStubFactory arrangeUpcall(MethodType mt, FunctionDescriptor cDesc, LinkerOptions options) { + return UpcallLinker.makeFactory(mt, cDesc, options); + } +} diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/s390/zos/ZosS390Linker.java b/src/java.base/share/classes/jdk/internal/foreign/abi/s390/zos/ZosS390Linker.java new file mode 100644 index 00000000000..07f72f3a940 --- /dev/null +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/s390/zos/ZosS390Linker.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved + * =========================================================================== + */ + +package jdk.internal.foreign.abi.s390.zos; + +import jdk.internal.foreign.abi.AbstractLinker; +import jdk.internal.foreign.abi.LinkerOptions; +import jdk.internal.foreign.abi.SharedUtils; + +import java.lang.foreign.FunctionDescriptor; +import java.lang.foreign.MemoryLayout; +import java.lang.foreign.ValueLayout; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodType; +import java.util.Map; + +public final class ZosS390Linker extends AbstractLinker { + + private static final Map CANONICAL_LAYOUTS = + SharedUtils.canonicalLayouts(ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT); + + public static ZosS390Linker getInstance() { + final class Holder { + private static final ZosS390Linker INSTANCE = new ZosS390Linker(); + } + + return Holder.INSTANCE; + } + + private ZosS390Linker() { + // Ensure there is only one instance + } + + @Override + protected MethodHandle arrangeDowncall(MethodType inferredMethodType, FunctionDescriptor function, LinkerOptions options) { + return ZosS390CallArranger.arrangeDowncall(inferredMethodType, function, options); + } + + @Override + protected UpcallStubFactory arrangeUpcall(MethodType targetType, FunctionDescriptor function, LinkerOptions options) { + return ZosS390CallArranger.arrangeUpcall(targetType, function, options); + } + + @Override + public Map canonicalLayouts() { + return CANONICAL_LAYOUTS; + } +} diff --git a/src/java.base/share/classes/jdk/internal/icu/lang/UCharacter.java b/src/java.base/share/classes/jdk/internal/icu/lang/UCharacter.java index 1fa93390215..cd87db30d7f 100644 --- a/src/java.base/share/classes/jdk/internal/icu/lang/UCharacter.java +++ b/src/java.base/share/classes/jdk/internal/icu/lang/UCharacter.java @@ -23,7 +23,7 @@ * questions. */ -/** +/* ******************************************************************************* * Copyright (C) 1996-2014, International Business Machines Corporation and * others. All Rights Reserved. diff --git a/src/java.base/share/classes/jdk/internal/icu/text/BidiBase.java b/src/java.base/share/classes/jdk/internal/icu/text/BidiBase.java index cdfdef9fbf9..bfeb0b7e621 100644 --- a/src/java.base/share/classes/jdk/internal/icu/text/BidiBase.java +++ b/src/java.base/share/classes/jdk/internal/icu/text/BidiBase.java @@ -2409,9 +2409,9 @@ else if (dirProp == PDI) { return directionFromFlags(); } - /*********************************************************************/ + /* *******************************************************************/ /* The Properties state machine table */ - /*********************************************************************/ + /* *******************************************************************/ /* */ /* All table cells are 8 bits: */ /* bits 0..4: next state */ @@ -2422,9 +2422,9 @@ else if (dirProp == PDI) { /* Cells may also be of format "_(x,y)" where x represents an action */ /* to perform and y represents the next state. */ /* */ - /*********************************************************************/ + /* *******************************************************************/ /* Definitions and type for properties state tables */ - /*********************************************************************/ + /* *******************************************************************/ private static final int IMPTABPROPS_COLUMNS = 16; private static final int IMPTABPROPS_RES = IMPTABPROPS_COLUMNS - 1; private static short GetStateProps(short cell) { @@ -2447,7 +2447,7 @@ private static short GetActionProps(short cell) { private static final short _S = 5; private static final short _B = 6; /* reduced dirProp */ - /*********************************************************************/ + /* *******************************************************************/ /* */ /* PROPERTIES STATE TABLE */ /* */ @@ -2510,9 +2510,9 @@ private static short GetActionProps(short cell) { /*23 ENR+ET */ { 32+1, 32+2, 21, 32+5, 32+7, 32+15, 32+17, 32+7, 23, 32+7, 23, 23, 32+3, 18, 21, _AN } }; - /*********************************************************************/ + /* *******************************************************************/ /* The levels state machine tables */ - /*********************************************************************/ + /* *******************************************************************/ /* */ /* All table cells are 8 bits: */ /* bits 0..3: next state */ @@ -2525,9 +2525,9 @@ private static short GetActionProps(short cell) { /* */ /* This format limits each table to 16 states each and to 15 actions.*/ /* */ - /*********************************************************************/ + /* *******************************************************************/ /* Definitions and type for levels state tables */ - /*********************************************************************/ + /* *******************************************************************/ private static final int IMPTABLEVELS_COLUMNS = _B + 2; private static final int IMPTABLEVELS_RES = IMPTABLEVELS_COLUMNS - 1; private static short GetState(byte cell) { return (short)(cell & 0x0f); } @@ -2544,7 +2544,7 @@ private static class ImpTabPair { } } - /*********************************************************************/ + /* *******************************************************************/ /* */ /* LEVELS STATE TABLES */ /* */ diff --git a/src/java.base/share/classes/jdk/internal/icu/text/UTF16.java b/src/java.base/share/classes/jdk/internal/icu/text/UTF16.java index 4205487a966..e84e1d4c0d4 100644 --- a/src/java.base/share/classes/jdk/internal/icu/text/UTF16.java +++ b/src/java.base/share/classes/jdk/internal/icu/text/UTF16.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -/** +/* ******************************************************************************* * Copyright (C) 1996-2014, International Business Machines Corporation and * others. All Rights Reserved. diff --git a/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java b/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java index 228aaf6ea7d..c17f570a3ef 100644 --- a/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java +++ b/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java @@ -82,7 +82,7 @@ public enum Feature { STRUCTURED_CONCURRENCY, @JEP(number=466, title="ClassFile API", status="Second Preview") CLASSFILE_API, - @JEP(number=461, title="Stream Gatherers", status="Preview") + @JEP(number=473, title="Stream Gatherers", status="Second Preview") STREAM_GATHERERS, LANGUAGE_MODEL, /** diff --git a/src/java.base/share/classes/jdk/internal/misc/Blocker.java b/src/java.base/share/classes/jdk/internal/misc/Blocker.java index e427d9520d5..d41ae73709f 100644 --- a/src/java.base/share/classes/jdk/internal/misc/Blocker.java +++ b/src/java.base/share/classes/jdk/internal/misc/Blocker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 @@ -25,20 +25,18 @@ package jdk.internal.misc; -import java.util.concurrent.ForkJoinPool; import jdk.internal.access.JavaLangAccess; -import jdk.internal.access.JavaUtilConcurrentFJPAccess; import jdk.internal.access.SharedSecrets; /** * Defines static methods to mark the beginning and end of a possibly blocking * operation. The methods are intended to be used with try-finally as follows: * {@snippet lang=java : - * long comp = Blocker.begin(); + * boolean attempted = Blocker.begin(); * try { * // blocking operation * } finally { - * Blocker.end(comp); + * Blocker.end(attempted); * } * } * If invoked from a virtual thread and the underlying carrier thread is a @@ -62,64 +60,35 @@ private static Thread currentCarrierThread() { } /** - * Marks the beginning of a possibly blocking operation. - * @return the return value from the attempt to compensate or -1 if not attempted + * Marks the beginning of a blocking operation. + * @return true if tryCompensate attempted */ - public static long begin() { + public static boolean begin() { if (VM.isBooted() - && currentCarrierThread() instanceof CarrierThread ct && !ct.inBlocking()) { - ct.beginBlocking(); - boolean completed = false; - try { - long comp = ForkJoinPools.beginCompensatedBlock(ct.getPool()); - assert currentCarrierThread() == ct; - completed = true; - return comp; - } finally { - if (!completed) { - ct.endBlocking(); - } - } + && Thread.currentThread().isVirtual() + && currentCarrierThread() instanceof CarrierThread ct) { + return ct.beginBlocking(); } - return -1; + return false; } /** * Marks the beginning of a possibly blocking operation. * @param blocking true if the operation may block, otherwise false - * @return the return value from the attempt to compensate, -1 if not attempted - * or blocking is false + * @return true if tryCompensate attempted */ - public static long begin(boolean blocking) { - return (blocking) ? begin() : -1; + public static boolean begin(boolean blocking) { + return (blocking) ? begin() : false; } /** * Marks the end of an operation that may have blocked. - * @param compensateReturn the value returned by the begin method + * @param attempted if tryCompensate attempted */ - public static void end(long compensateReturn) { - if (compensateReturn >= 0) { - assert currentCarrierThread() instanceof CarrierThread ct && ct.inBlocking(); + public static void end(boolean attempted) { + if (attempted) { CarrierThread ct = (CarrierThread) currentCarrierThread(); - ForkJoinPools.endCompensatedBlock(ct.getPool(), compensateReturn); ct.endBlocking(); } } - - /** - * Defines static methods to invoke non-public ForkJoinPool methods via the - * shared secret support. - */ - private static class ForkJoinPools { - private static final JavaUtilConcurrentFJPAccess FJP_ACCESS = - SharedSecrets.getJavaUtilConcurrentFJPAccess(); - static long beginCompensatedBlock(ForkJoinPool pool) { - return FJP_ACCESS.beginCompensatedBlock(pool); - } - static void endCompensatedBlock(ForkJoinPool pool, long post) { - FJP_ACCESS.endCompensatedBlock(pool, post); - } - } - } diff --git a/src/java.base/share/classes/jdk/internal/misc/CarrierThread.java b/src/java.base/share/classes/jdk/internal/misc/CarrierThread.java index e4276d4904e..d20b402fe92 100644 --- a/src/java.base/share/classes/jdk/internal/misc/CarrierThread.java +++ b/src/java.base/share/classes/jdk/internal/misc/CarrierThread.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 @@ -32,7 +32,9 @@ import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinWorkerThread; import jdk.internal.access.JavaLangAccess; +import jdk.internal.access.JavaUtilConcurrentFJPAccess; import jdk.internal.access.SharedSecrets; +import jdk.internal.vm.Continuation; /** * A ForkJoinWorkerThread that can be used as a carrier thread. @@ -49,7 +51,14 @@ public class CarrierThread extends ForkJoinWorkerThread { private static final long INHERITABLETHREADLOCALS; private static final long INHERITEDACCESSCONTROLCONTEXT; - private boolean blocking; // true if in blocking op + // compensating state + private static final int NOT_COMPENSATING = 0; + private static final int COMPENSATE_IN_PROGRESS = 1; + private static final int COMPENSATING = 2; + private int compensating; + + // FJP value to adjust release counts + private long compensateValue; @SuppressWarnings("this-escape") public CarrierThread(ForkJoinPool pool) { @@ -60,27 +69,44 @@ public CarrierThread(ForkJoinPool pool) { } /** - * For use by {@link Blocker} to test if the thread is in a blocking operation. + * Mark the start of a blocking operation. */ - boolean inBlocking() { - //assert JLA.currentCarrierThread() == this; - return blocking; - } + public boolean beginBlocking() { + assert Thread.currentThread().isVirtual() && JLA.currentCarrierThread() == this; + assert compensating == NOT_COMPENSATING || compensating == COMPENSATING; - /** - * For use by {@link Blocker} to mark the start of a blocking operation. - */ - void beginBlocking() { - //assert JLA.currentCarrierThread() == this && !blocking; - blocking = true; + if (compensating == NOT_COMPENSATING) { + // don't preempt when attempting to compensate + Continuation.pin(); + try { + compensating = COMPENSATE_IN_PROGRESS; + + // Uses FJP.tryCompensate to start or re-activate a spare thread + compensateValue = ForkJoinPools.beginCompensatedBlock(getPool()); + compensating = COMPENSATING; + return true; + } catch (Throwable e) { + // exception starting spare thread + compensating = NOT_COMPENSATING; + throw e; + } finally { + Continuation.unpin(); + } + } else { + return false; + } } /** - * For use by {@link Blocker} to mark the end of a blocking operation. + * Mark the end of a blocking operation. */ - void endBlocking() { - //assert JLA.currentCarrierThread() == this && blocking; - blocking = false; + public void endBlocking() { + assert Thread.currentThread() == this || JLA.currentCarrierThread() == this; + if (compensating == COMPENSATING) { + ForkJoinPools.endCompensatedBlock(getPool(), compensateValue); + compensating = NOT_COMPENSATING; + compensateValue = 0; + } } @Override @@ -95,7 +121,7 @@ public void setContextClassLoader(ClassLoader cl) { * The thread group for the carrier threads. */ @SuppressWarnings("removal") - private static final ThreadGroup carrierThreadGroup() { + private static ThreadGroup carrierThreadGroup() { return AccessController.doPrivileged(new PrivilegedAction() { public ThreadGroup run() { ThreadGroup group = JLA.currentCarrierThread().getThreadGroup(); @@ -117,6 +143,21 @@ private static AccessControlContext innocuousACC() { }); } + /** + * Defines static methods to invoke non-public ForkJoinPool methods via the + * shared secret support. + */ + private static class ForkJoinPools { + private static final JavaUtilConcurrentFJPAccess FJP_ACCESS = + SharedSecrets.getJavaUtilConcurrentFJPAccess(); + static long beginCompensatedBlock(ForkJoinPool pool) { + return FJP_ACCESS.beginCompensatedBlock(pool); + } + static void endCompensatedBlock(ForkJoinPool pool, long post) { + FJP_ACCESS.endCompensatedBlock(pool, post); + } + } + static { CONTEXTCLASSLOADER = U.objectFieldOffset(Thread.class, "contextClassLoader"); diff --git a/src/java.base/share/classes/jdk/internal/platform/Metrics.java b/src/java.base/share/classes/jdk/internal/platform/Metrics.java index c45e3e52257..50523d137ef 100644 --- a/src/java.base/share/classes/jdk/internal/platform/Metrics.java +++ b/src/java.base/share/classes/jdk/internal/platform/Metrics.java @@ -72,7 +72,7 @@ public static Metrics systemMetrics() { public String getProvider(); - /***************************************************************** + /* *************************************************************** * CPU Accounting Subsystem ****************************************************************/ @@ -123,7 +123,7 @@ public static Metrics systemMetrics() { */ public long getCpuSystemUsage(); - /***************************************************************** + /* *************************************************************** * CPU Scheduling Metrics ****************************************************************/ @@ -215,7 +215,7 @@ public static Metrics systemMetrics() { */ public long getEffectiveCpuCount(); - /***************************************************************** + /* *************************************************************** * CPU Sets ****************************************************************/ @@ -271,7 +271,7 @@ public static Metrics systemMetrics() { */ public int[] getEffectiveCpuSetMems(); - /***************************************************************** + /* *************************************************************** * Memory Subsystem ****************************************************************/ @@ -352,7 +352,7 @@ public static Metrics systemMetrics() { */ public long getMemorySoftLimit(); - /***************************************************************** + /* *************************************************************** * pids subsystem ****************************************************************/ @@ -373,7 +373,7 @@ public static Metrics systemMetrics() { */ public long getPidsCurrent(); - /***************************************************************** + /* *************************************************************** * BlKIO Subsystem ****************************************************************/ diff --git a/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java b/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java index 61be28519fc..8f8ea651d65 100644 --- a/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java +++ b/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -200,7 +200,7 @@ public static int vectorizedMismatch(Object a, long aOffset, public static int vectorizedHashCode(Object array, int fromIndex, int length, int initialValue, int basicType) { return switch (basicType) { - case T_BOOLEAN -> signedHashCode(initialValue, (byte[]) array, fromIndex, length); + case T_BOOLEAN -> unsignedHashCode(initialValue, (byte[]) array, fromIndex, length); case T_CHAR -> array instanceof byte[] ? utf16hashCode(initialValue, (byte[]) array, fromIndex, length) : hashCode(initialValue, (char[]) array, fromIndex, length); @@ -211,7 +211,7 @@ public static int vectorizedHashCode(Object array, int fromIndex, int length, in }; } - private static int signedHashCode(int result, byte[] a, int fromIndex, int length) { + private static int unsignedHashCode(int result, byte[] a, int fromIndex, int length) { int end = fromIndex + length; for (int i = fromIndex; i < end; i++) { result = 31 * result + (a[i] & 0xff); diff --git a/src/java.base/share/classes/jdk/internal/vm/StackChunk.java b/src/java.base/share/classes/jdk/internal/vm/StackChunk.java index 0c48ce67934..ab562706c24 100644 --- a/src/java.base/share/classes/jdk/internal/vm/StackChunk.java +++ b/src/java.base/share/classes/jdk/internal/vm/StackChunk.java @@ -31,10 +31,10 @@ public static void init() {} private StackChunk parent; private int size; // in words private int sp; // in words - private int argsize; // bottom stack-passed arguments, in words + private int bottom; // in words // The stack itself is appended here by the VM, as well as some injected fields public StackChunk parent() { return parent; } - public boolean isEmpty() { return sp >= (size - argsize); } + public boolean isEmpty() { return sp == bottom; } } diff --git a/src/java.base/share/classes/sun/invoke/util/Wrapper.java b/src/java.base/share/classes/sun/invoke/util/Wrapper.java index 76aede09487..fef9192932d 100644 --- a/src/java.base/share/classes/sun/invoke/util/Wrapper.java +++ b/src/java.base/share/classes/sun/invoke/util/Wrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -25,25 +25,27 @@ package sun.invoke.util; -import java.util.Map; import static sun.invoke.util.Wrapper.NumericClasses.*; import jdk.internal.vm.annotation.DontInline; +import java.lang.constant.ClassDesc; +import java.lang.constant.ConstantDescs; + public enum Wrapper { - // wrapperType simple primitiveType simple char emptyArray format numericClass superClass - BOOLEAN( Boolean.class, "Boolean", boolean.class, "boolean", 'Z', new boolean[0], Format.unsigned( 1), 0, 0), + // wrapperType simple primitiveType simple char emptyArray format numericClass superClass classDescriptor + BOOLEAN( Boolean.class, "Boolean", boolean.class, "boolean", 'Z', new boolean[0], Format.unsigned( 1), 0, 0, ConstantDescs.CD_boolean), // These must be in the order defined for widening primitive conversions in JLS 5.1.2 // Avoid boxing integral types here to defer initialization of internal caches - BYTE ( Byte.class, "Byte", byte.class, "byte", 'B', new byte[0], Format.signed( 8), BYTE_CLASS, BYTE_SUPERCLASSES), - SHORT ( Short.class, "Short", short.class, "short", 'S', new short[0], Format.signed( 16), SHORT_CLASS, SHORT_SUPERCLASSES), - CHAR (Character.class, "Character", char.class, "char", 'C', new char[0], Format.unsigned(16), CHAR_CLASS, CHAR_SUPERCLASSES), - INT ( Integer.class, "Integer", int.class, "int", 'I', new int[0], Format.signed( 32), INT_CLASS, INT_SUPERCLASSES), - LONG ( Long.class, "Long", long.class, "long", 'J', new long[0], Format.signed( 64), LONG_CLASS, LONG_SUPERCLASSES), - FLOAT ( Float.class, "Float", float.class, "float", 'F', new float[0], Format.floating(32), FLOAT_CLASS, FLOAT_SUPERCLASSES), - DOUBLE ( Double.class, "Double", double.class, "double", 'D', new double[0], Format.floating(64), DOUBLE_CLASS, DOUBLE_CLASS), - OBJECT ( Object.class, "Object", Object.class, "Object", 'L', new Object[0], Format.other( 1), 0, 0), + BYTE ( Byte.class, "Byte", byte.class, "byte", 'B', new byte[0], Format.signed( 8), BYTE_CLASS, BYTE_SUPERCLASSES, ConstantDescs.CD_byte), + SHORT ( Short.class, "Short", short.class, "short", 'S', new short[0], Format.signed( 16), SHORT_CLASS, SHORT_SUPERCLASSES, ConstantDescs.CD_short), + CHAR (Character.class, "Character", char.class, "char", 'C', new char[0], Format.unsigned(16), CHAR_CLASS, CHAR_SUPERCLASSES, ConstantDescs.CD_char), + INT ( Integer.class, "Integer", int.class, "int", 'I', new int[0], Format.signed( 32), INT_CLASS, INT_SUPERCLASSES, ConstantDescs.CD_int), + LONG ( Long.class, "Long", long.class, "long", 'J', new long[0], Format.signed( 64), LONG_CLASS, LONG_SUPERCLASSES, ConstantDescs.CD_long), + FLOAT ( Float.class, "Float", float.class, "float", 'F', new float[0], Format.floating(32), FLOAT_CLASS, FLOAT_SUPERCLASSES, ConstantDescs.CD_float), + DOUBLE ( Double.class, "Double", double.class, "double", 'D', new double[0], Format.floating(64), DOUBLE_CLASS, DOUBLE_CLASS, ConstantDescs.CD_double), + OBJECT ( Object.class, "Object", Object.class, "Object", 'L', new Object[0], Format.other( 1), 0, 0, ConstantDescs.CD_Object), // VOID must be the last type, since it is "assignable" from any other type: - VOID ( Void.class, "Void", void.class, "void", 'V', null, Format.other( 0), 0, 0), + VOID ( Void.class, "Void", void.class, "void", 'V', null, Format.other( 0), 0, 0, ConstantDescs.CD_void), ; public static final int COUNT = 10; @@ -58,8 +60,18 @@ public enum Wrapper { private final int superClasses; private final String wrapperSimpleName; private final String primitiveSimpleName; - - private Wrapper(Class wtype, String wtypeName, Class ptype, String ptypeName, char tchar, Object emptyArray, int format, int numericClass, int superClasses) { + private final ClassDesc classDesc; + + private Wrapper(Class wtype, + String wtypeName, + Class ptype, + String ptypeName, + char tchar, + Object emptyArray, + int format, + int numericClass, + int superClasses, + ClassDesc classDesc) { this.wrapperType = wtype; this.primitiveType = ptype; this.basicTypeChar = tchar; @@ -70,6 +82,7 @@ private Wrapper(Class wtype, String wtypeName, Class ptype, String ptypeNa this.superClasses = superClasses; this.wrapperSimpleName = wtypeName; this.primitiveSimpleName = ptypeName; + this.classDesc = classDesc; } /** For debugging, give the details of this wrapper. */ @@ -376,6 +389,9 @@ public static Wrapper forBasicType(Class type) { } } + /** A nominal descriptor of the wrapped type */ + public ClassDesc classDescriptor() { return classDesc; } + /** What is the primitive type wrapped by this wrapper? */ public Class primitiveType() { return primitiveType; } diff --git a/src/java.base/share/classes/sun/net/www/content/text/plain.java b/src/java.base/share/classes/sun/net/www/content/text/plain.java index 32836559756..33a9032b2bc 100644 --- a/src/java.base/share/classes/sun/net/www/content/text/plain.java +++ b/src/java.base/share/classes/sun/net/www/content/text/plain.java @@ -23,15 +23,15 @@ * questions. */ -/** - * Plain text file handler. - * @author Steven B. Byrne - */ package sun.net.www.content.text; import java.net.*; import java.io.InputStream; import java.io.IOException; +/** + * Plain text file handler. + * @author Steven B. Byrne + */ public class plain extends ContentHandler { /** * Returns a PlainTextInputStream object from which data diff --git a/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java b/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java index 6c601793c49..153de588938 100644 --- a/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java +++ b/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -389,9 +389,9 @@ public KeepAliveKey(URL url, Object obj) { */ @Override public boolean equals(Object obj) { - if ((obj instanceof KeepAliveKey) == false) + if (!(obj instanceof KeepAliveKey kae)) return false; - KeepAliveKey kae = (KeepAliveKey)obj; + return host.equals(kae.host) && (port == kae.port) && protocol.equals(kae.protocol) @@ -405,7 +405,7 @@ public boolean equals(Object obj) { @Override public int hashCode() { String str = protocol+host+port; - return this.obj == null? str.hashCode() : + return this.obj == null ? str.hashCode() : str.hashCode() + this.obj.hashCode(); } } diff --git a/src/java.base/share/classes/sun/net/www/protocol/file/FileURLConnection.java b/src/java.base/share/classes/sun/net/www/protocol/file/FileURLConnection.java index a27a6137a37..16fb1d2ea6c 100644 --- a/src/java.base/share/classes/sun/net/www/protocol/file/FileURLConnection.java +++ b/src/java.base/share/classes/sun/net/www/protocol/file/FileURLConnection.java @@ -23,12 +23,6 @@ * questions. */ -/** - * Open an file input stream given a URL. - * @author James Gosling - * @author Steven B. Byrne - */ - package sun.net.www.protocol.file; import java.net.URL; @@ -40,6 +34,11 @@ import java.util.*; import java.text.SimpleDateFormat; +/** + * Open a file input stream given a URL. + * @author James Gosling + * @author Steven B. Byrne + */ public class FileURLConnection extends URLConnection { private static final String CONTENT_LENGTH = "content-length"; diff --git a/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java b/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java index ff54e474b8e..39d05b6e0e4 100644 --- a/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java +++ b/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -65,7 +65,7 @@ protected AbstractDelegateHttpsURLConnection(URL url, Proxy p, protected abstract javax.net.ssl.HostnameVerifier getHostnameVerifier(); - /** + /* * No user application is able to call these routines, as no one * should ever get access to an instance of * DelegateHttpsURLConnection (sun.* or com.*) diff --git a/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java b/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java index 636230d8f38..0b72ee6a7c2 100644 --- a/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java +++ b/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java @@ -50,6 +50,7 @@ import jdk.internal.access.JavaIOFileDescriptorAccess; import jdk.internal.access.SharedSecrets; +import jdk.internal.event.FileForceEvent; import jdk.internal.foreign.MemorySessionImpl; import jdk.internal.foreign.SegmentFactories; import jdk.internal.misc.Blocker; @@ -78,6 +79,7 @@ public class FileChannelImpl // File access mode (immutable) private final boolean writable; private final boolean readable; + private final boolean sync; // O_SYNC or O_DSYNC // Required to prevent finalization of creating stream (immutable) private final Closeable parent; @@ -122,12 +124,14 @@ public void run() { } private FileChannelImpl(FileDescriptor fd, String path, boolean readable, - boolean writable, boolean direct, Closeable parent) + boolean writable, boolean sync, boolean direct, + Closeable parent) { this.fd = fd; this.path = path; this.readable = readable; this.writable = writable; + this.sync = sync; this.direct = direct; this.parent = parent; if (direct) { @@ -150,9 +154,9 @@ private FileChannelImpl(FileDescriptor fd, String path, boolean readable, // and RandomAccessFile::getChannel public static FileChannel open(FileDescriptor fd, String path, boolean readable, boolean writable, - boolean direct, Closeable parent) + boolean sync, boolean direct, Closeable parent) { - return new FileChannelImpl(fd, path, readable, writable, direct, parent); + return new FileChannelImpl(fd, path, readable, writable, sync, direct, parent); } private void ensureOpen() throws IOException { @@ -230,11 +234,11 @@ public int read(ByteBuffer dst) throws IOException { if (!isOpen()) return 0; do { - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(direct); try { n = IOUtil.read(fd, dst, -1, direct, alignment, nd); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } while ((n == IOStatus.INTERRUPTED) && isOpen()); return IOStatus.normalize(n); @@ -265,11 +269,11 @@ public long read(ByteBuffer[] dsts, int offset, int length) if (!isOpen()) return 0; do { - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(direct); try { n = IOUtil.read(fd, dsts, offset, length, direct, alignment, nd); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } while ((n == IOStatus.INTERRUPTED) && isOpen()); @@ -298,11 +302,11 @@ public int write(ByteBuffer src) throws IOException { if (!isOpen()) return 0; do { - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(sync || direct); try { n = IOUtil.write(fd, src, -1, direct, alignment, nd); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } while ((n == IOStatus.INTERRUPTED) && isOpen()); @@ -334,11 +338,11 @@ public long write(ByteBuffer[] srcs, int offset, int length) if (!isOpen()) return 0; do { - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(sync || direct); try { n = IOUtil.write(fd, srcs, offset, length, direct, alignment, nd); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } while ((n == IOStatus.INTERRUPTED) && isOpen()); return IOStatus.normalize(n); @@ -365,13 +369,8 @@ public long position() throws IOException { return 0; boolean append = fdAccess.getAppend(fd); do { - long comp = Blocker.begin(); - try { - // in append-mode then position is advanced to end before writing - p = (append) ? nd.size(fd) : nd.seek(fd, -1); - } finally { - Blocker.end(comp); - } + // in append-mode then position is advanced to end before writing + p = (append) ? nd.size(fd) : nd.seek(fd, -1); } while ((p == IOStatus.INTERRUPTED) && isOpen()); return IOStatus.normalize(p); } finally { @@ -396,12 +395,7 @@ public FileChannel position(long newPosition) throws IOException { if (!isOpen()) return null; do { - long comp = Blocker.begin(); - try { - p = nd.seek(fd, newPosition); - } finally { - Blocker.end(comp); - } + p = nd.seek(fd, newPosition); } while ((p == IOStatus.INTERRUPTED) && isOpen()); return this; } finally { @@ -424,12 +418,7 @@ public long size() throws IOException { if (!isOpen()) return -1; do { - long comp = Blocker.begin(); - try { - s = nd.size(fd); - } finally { - Blocker.end(comp); - } + s = nd.size(fd); } while ((s == IOStatus.INTERRUPTED) && isOpen()); return IOStatus.normalize(s); } finally { @@ -461,24 +450,14 @@ public FileChannel truncate(long newSize) throws IOException { // get current size long size; do { - long comp = Blocker.begin(); - try { - size = nd.size(fd); - } finally { - Blocker.end(comp); - } + size = nd.size(fd); } while ((size == IOStatus.INTERRUPTED) && isOpen()); if (!isOpen()) return null; // get current position do { - long comp = Blocker.begin(); - try { - p = nd.seek(fd, -1); - } finally { - Blocker.end(comp); - } + p = nd.seek(fd, -1); } while ((p == IOStatus.INTERRUPTED) && isOpen()); if (!isOpen()) return null; @@ -487,12 +466,7 @@ public FileChannel truncate(long newSize) throws IOException { // truncate file if given size is less than the current size if (newSize < size) { do { - long comp = Blocker.begin(); - try { - rv = nd.truncate(fd, newSize); - } finally { - Blocker.end(comp); - } + rv = nd.truncate(fd, newSize); } while ((rv == IOStatus.INTERRUPTED) && isOpen()); if (!isOpen()) return null; @@ -502,12 +476,7 @@ public FileChannel truncate(long newSize) throws IOException { if (p > newSize) p = newSize; do { - long comp = Blocker.begin(); - try { - rp = nd.seek(fd, p); - } finally { - Blocker.end(comp); - } + rp = nd.seek(fd, p); } while ((rp == IOStatus.INTERRUPTED) && isOpen()); return this; } finally { @@ -518,8 +487,7 @@ public FileChannel truncate(long newSize) throws IOException { } } - @Override - public void force(boolean metaData) throws IOException { + private void implForce(boolean metaData) throws IOException { ensureOpen(); int rv = -1; int ti = -1; @@ -529,11 +497,11 @@ public void force(boolean metaData) throws IOException { if (!isOpen()) return; do { - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(); try { rv = nd.force(fd, metaData); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } while ((rv == IOStatus.INTERRUPTED) && isOpen()); } finally { @@ -543,6 +511,17 @@ public void force(boolean metaData) throws IOException { } } + @Override + public void force(boolean metaData) throws IOException { + if (!FileForceEvent.enabled()) { + implForce(metaData); + return; + } + long start = FileForceEvent.timestamp(); + implForce(metaData); + FileForceEvent.offer(start, path, metaData); + } + // Assume at first that the underlying kernel supports sendfile/equivalent; // set this to true if we find out later that it doesn't // @@ -624,12 +603,7 @@ private long transferToFileDescriptor(long position, int count, FileDescriptor t long n; boolean append = fdAccess.getAppend(targetFD); do { - long comp = Blocker.begin(); - try { - n = nd.transferTo(fd, position, count, targetFD, append); - } finally { - Blocker.end(comp); - } + n = nd.transferTo(fd, position, count, targetFD, append); } while ((n == IOStatus.INTERRUPTED) && isOpen()); return n; } @@ -895,12 +869,7 @@ private long transferFromFileDescriptor(FileDescriptor srcFD, long position, lon long n; boolean append = fdAccess.getAppend(fd); do { - long comp = Blocker.begin(); - try { - n = nd.transferFrom(srcFD, fd, position, count, append); - } finally { - Blocker.end(comp); - } + n = nd.transferFrom(srcFD, fd, position, count, append); } while ((n == IOStatus.INTERRUPTED) && isOpen()); return n; } @@ -1088,11 +1057,11 @@ private int readInternal(ByteBuffer dst, long position) throws IOException { if (!isOpen()) return -1; do { - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(direct); try { n = IOUtil.read(fd, dst, position, direct, alignment, nd); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } while ((n == IOStatus.INTERRUPTED) && isOpen()); return IOStatus.normalize(n); @@ -1133,11 +1102,11 @@ private int writeInternal(ByteBuffer src, long position) throws IOException { if (!isOpen()) return -1; do { - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(sync || direct); try { n = IOUtil.write(fd, src, position, direct, alignment, nd); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } while ((n == IOStatus.INTERRUPTED) && isOpen()); return IOStatus.normalize(n); @@ -1362,12 +1331,7 @@ private Unmapper mapInternal(MapMode mode, long position, long size, int prot, b synchronized (positionLock) { long filesize; do { - long comp = Blocker.begin(); - try { - filesize = nd.size(fd); - } finally { - Blocker.end(comp); - } + filesize = nd.size(fd); } while ((filesize == IOStatus.INTERRUPTED) && isOpen()); if (!isOpen()) return null; @@ -1379,12 +1343,7 @@ private Unmapper mapInternal(MapMode mode, long position, long size, int prot, b } int rv; do { - long comp = Blocker.begin(); - try { - rv = nd.truncate(fd, position + size); - } finally { - Blocker.end(comp); - } + rv = nd.truncate(fd, position + size); } while ((rv == IOStatus.INTERRUPTED) && isOpen()); if (!isOpen()) return null; @@ -1575,11 +1534,11 @@ public FileLock lock(long position, long size, boolean shared) return null; int n; do { - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(); try { n = nd.lock(fd, true, position, size, shared); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } while ((n == FileDispatcher.INTERRUPTED) && isOpen()); if (isOpen()) { diff --git a/src/java.base/share/classes/sun/nio/ch/Interruptible.java b/src/java.base/share/classes/sun/nio/ch/Interruptible.java index 5785ba52e24..b5d9a7d2b3f 100644 --- a/src/java.base/share/classes/sun/nio/ch/Interruptible.java +++ b/src/java.base/share/classes/sun/nio/ch/Interruptible.java @@ -23,12 +23,12 @@ * questions. */ +package sun.nio.ch; + /** * An object that interrupts a thread blocked in an I/O operation. */ -package sun.nio.ch; - public interface Interruptible { /** diff --git a/src/java.base/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java b/src/java.base/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java index b41430c8d9d..5f3f91e7aff 100644 --- a/src/java.base/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java +++ b/src/java.base/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -25,6 +25,8 @@ package sun.nio.ch; +import jdk.internal.event.FileForceEvent; + import java.nio.channels.*; import java.util.concurrent.*; import java.nio.ByteBuffer; @@ -50,19 +52,25 @@ private static class DefaultExecutorHolder { // Used to make native read and write calls private static final FileDispatcher nd = new FileDispatcherImpl(); + // file path + private final String path; + // Thread-safe set of IDs of native threads, for signalling private final NativeThreadSet threads = new NativeThreadSet(2); SimpleAsynchronousFileChannelImpl(FileDescriptor fdObj, + String path, boolean reading, boolean writing, ExecutorService executor) { super(fdObj, reading, writing, executor); + this.path = path; } public static AsynchronousFileChannel open(FileDescriptor fdo, + String path, boolean reading, boolean writing, ThreadPool pool) @@ -70,7 +78,7 @@ public static AsynchronousFileChannel open(FileDescriptor fdo, // Executor is either default or based on pool parameters ExecutorService executor = (pool == null) ? DefaultExecutorHolder.defaultExecutor : pool.executor(); - return new SimpleAsynchronousFileChannelImpl(fdo, reading, writing, executor); + return new SimpleAsynchronousFileChannelImpl(fdo, path, reading, writing, executor); } @Override @@ -151,8 +159,7 @@ public AsynchronousFileChannel truncate(long size) throws IOException { } } - @Override - public void force(boolean metaData) throws IOException { + private void implForce(boolean metaData) throws IOException { int ti = threads.add(); try { int n = 0; @@ -169,6 +176,17 @@ public void force(boolean metaData) throws IOException { } } + @Override + public void force(boolean metaData) throws IOException { + if (!FileForceEvent.enabled()) { + implForce(metaData); + return; + } + long start = FileForceEvent.timestamp(); + implForce(metaData); + FileForceEvent.offer(start, path, metaData); + } + @Override Future implLock(final long position, final long size, diff --git a/src/java.base/share/classes/sun/security/ec/SunEC.java b/src/java.base/share/classes/sun/security/ec/SunEC.java index 87385f1dea0..2e49b0af934 100644 --- a/src/java.base/share/classes/sun/security/ec/SunEC.java +++ b/src/java.base/share/classes/sun/security/ec/SunEC.java @@ -25,7 +25,7 @@ /* * =========================================================================== - * (c) Copyright IBM Corp. 2022, 2023 All Rights Reserved + * (c) Copyright IBM Corp. 2022, 2024 All Rights Reserved * =========================================================================== */ @@ -75,6 +75,11 @@ public final class SunEC extends Provider { */ private static final boolean useNativeECKeyGen = NativeCrypto.isAlgorithmEnabled("jdk.nativeECKeyGen", "SunEC"); + /* The property 'jdk.nativeECDSA' is used to control enablement of the native + * ECDSA signature implementation. + */ + private static final boolean useNativeECDSA = NativeCrypto.isAlgorithmEnabled("jdk.nativeECDSA", "SunEC"); + /* The property 'jdk.nativeXDHKeyAgreement' is used to control enablement of the native * XDH key agreement. XDH key agreement is only supported in OpenSSL 1.1.1 and above. */ @@ -130,37 +135,96 @@ public Object newInstance(Object ctrParamObj) if (inP1363) { algo = algo.substring(0, algo.length() - 13); } - if (algo.equals("SHA1withECDSA")) { - return (inP1363? new ECDSASignature.SHA1inP1363Format() : - new ECDSASignature.SHA1()); - } else if (algo.equals("SHA224withECDSA")) { - return (inP1363? new ECDSASignature.SHA224inP1363Format() : - new ECDSASignature.SHA224()); - } else if (algo.equals("SHA256withECDSA")) { - return (inP1363? new ECDSASignature.SHA256inP1363Format() : - new ECDSASignature.SHA256()); - } else if (algo.equals("SHA384withECDSA")) { - return (inP1363? new ECDSASignature.SHA384inP1363Format() : - new ECDSASignature.SHA384()); - } else if (algo.equals("SHA512withECDSA")) { - return (inP1363? new ECDSASignature.SHA512inP1363Format() : - new ECDSASignature.SHA512()); - } else if (algo.equals("NONEwithECDSA")) { - return (inP1363? new ECDSASignature.RawinP1363Format() : - new ECDSASignature.Raw()); - } else if (algo.equals("SHA3-224withECDSA")) { - return (inP1363? new ECDSASignature.SHA3_224inP1363Format() : - new ECDSASignature.SHA3_224()); - } else if (algo.equals("SHA3-256withECDSA")) { - return (inP1363? new ECDSASignature.SHA3_256inP1363Format() : - new ECDSASignature.SHA3_256()); - } else if (algo.equals("SHA3-384withECDSA")) { - return (inP1363? new ECDSASignature.SHA3_384inP1363Format() : - new ECDSASignature.SHA3_384()); - } else if (algo.equals("SHA3-512withECDSA")) { - return (inP1363? new ECDSASignature.SHA3_512inP1363Format() : - new ECDSASignature.SHA3_512()); - } + if (useNativeECDSA + && (NativeCrypto.getVersionIfAvailable() >= NativeCrypto.OPENSSL_VERSION_1_1_1) + ) { + if (nativeCryptTrace) { + System.err.println("ECDSA Signature - Using OpenSSL integration."); + } + if (algo.equals("SHA1withECDSA")) { + return inP1363 + ? new NativeECDSASignature.SHA1inP1363Format() + : new NativeECDSASignature.SHA1(); + } else if (algo.equals("SHA224withECDSA")) { + return inP1363 + ? new NativeECDSASignature.SHA224inP1363Format() + : new NativeECDSASignature.SHA224(); + } else if (algo.equals("SHA256withECDSA")) { + return inP1363 + ? new NativeECDSASignature.SHA256inP1363Format() + : new NativeECDSASignature.SHA256(); + } else if (algo.equals("SHA384withECDSA")) { + return inP1363 + ? new NativeECDSASignature.SHA384inP1363Format() + : new NativeECDSASignature.SHA384(); + } else if (algo.equals("SHA512withECDSA")) { + return inP1363 + ? new NativeECDSASignature.SHA512inP1363Format() + : new NativeECDSASignature.SHA512(); + } else if (algo.equals("NONEwithECDSA")) { + return inP1363 + ? new NativeECDSASignature.RawinP1363Format() + : new NativeECDSASignature.Raw(); + } else if (algo.equals("SHA3-224withECDSA")) { + return inP1363 + ? new NativeECDSASignature.SHA3_224inP1363Format() + : new NativeECDSASignature.SHA3_224(); + } else if (algo.equals("SHA3-256withECDSA")) { + return inP1363 + ? new NativeECDSASignature.SHA3_256inP1363Format() + : new NativeECDSASignature.SHA3_256(); + } else if (algo.equals("SHA3-384withECDSA")) { + return inP1363 + ? new NativeECDSASignature.SHA3_384inP1363Format() + : new NativeECDSASignature.SHA3_384(); + } else if (algo.equals("SHA3-512withECDSA")) { + return inP1363 + ? new NativeECDSASignature.SHA3_512inP1363Format() + : new NativeECDSASignature.SHA3_512(); + } + } else { + if (algo.equals("SHA1withECDSA")) { + return inP1363 + ? new ECDSASignature.SHA1inP1363Format() + : new ECDSASignature.SHA1(); + } else if (algo.equals("SHA224withECDSA")) { + return inP1363 + ? new ECDSASignature.SHA224inP1363Format() + : new ECDSASignature.SHA224(); + } else if (algo.equals("SHA256withECDSA")) { + return inP1363 + ? new ECDSASignature.SHA256inP1363Format() + : new ECDSASignature.SHA256(); + } else if (algo.equals("SHA384withECDSA")) { + return inP1363 + ? new ECDSASignature.SHA384inP1363Format() + : new ECDSASignature.SHA384(); + } else if (algo.equals("SHA512withECDSA")) { + return inP1363 + ? new ECDSASignature.SHA512inP1363Format() + : new ECDSASignature.SHA512(); + } else if (algo.equals("NONEwithECDSA")) { + return inP1363 + ? new ECDSASignature.RawinP1363Format() + : new ECDSASignature.Raw(); + } else if (algo.equals("SHA3-224withECDSA")) { + return inP1363 + ? new ECDSASignature.SHA3_224inP1363Format() + : new ECDSASignature.SHA3_224(); + } else if (algo.equals("SHA3-256withECDSA")) { + return inP1363 + ? new ECDSASignature.SHA3_256inP1363Format() + : new ECDSASignature.SHA3_256(); + } else if (algo.equals("SHA3-384withECDSA")) { + return inP1363 + ? new ECDSASignature.SHA3_384inP1363Format() + : new ECDSASignature.SHA3_384(); + } else if (algo.equals("SHA3-512withECDSA")) { + return inP1363 + ? new ECDSASignature.SHA3_512inP1363Format() + : new ECDSASignature.SHA3_512(); + } + } } else if (type.equals("KeyFactory")) { if (algo.equals("EC")) { return new ECKeyFactory(); @@ -403,68 +467,135 @@ void putEntries() { /* * Signature engines */ - putService(new ProviderService(this, "Signature", - "NONEwithECDSA", "sun.security.ec.ECDSASignature$Raw", - null, ATTRS)); - putService(new ProviderServiceA(this, "Signature", - "SHA1withECDSA", "sun.security.ec.ECDSASignature$SHA1", - ATTRS)); - putService(new ProviderServiceA(this, "Signature", - "SHA224withECDSA", "sun.security.ec.ECDSASignature$SHA224", - ATTRS)); - putService(new ProviderServiceA(this, "Signature", - "SHA256withECDSA", "sun.security.ec.ECDSASignature$SHA256", - ATTRS)); - putService(new ProviderServiceA(this, "Signature", - "SHA384withECDSA", "sun.security.ec.ECDSASignature$SHA384", - ATTRS)); - putService(new ProviderServiceA(this, "Signature", - "SHA512withECDSA", "sun.security.ec.ECDSASignature$SHA512", - ATTRS)); - putService(new ProviderServiceA(this, "Signature", - "SHA3-224withECDSA", "sun.security.ec.ECDSASignature$SHA3_224", - ATTRS)); - putService(new ProviderServiceA(this, "Signature", - "SHA3-256withECDSA", "sun.security.ec.ECDSASignature$SHA3_256", - ATTRS)); - putService(new ProviderServiceA(this, "Signature", - "SHA3-384withECDSA", "sun.security.ec.ECDSASignature$SHA3_384", - ATTRS)); - putService(new ProviderServiceA(this, "Signature", - "SHA3-512withECDSA", "sun.security.ec.ECDSASignature$SHA3_512", - ATTRS)); + if (useNativeECDSA + && (NativeCrypto.getVersionIfAvailable() >= NativeCrypto.OPENSSL_VERSION_1_1_1) + ) { + putService(new ProviderService(this, "Signature", + "NONEwithECDSA", "sun.security.ec.NativeECDSASignature$Raw", + null, ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA1withECDSA", "sun.security.ec.NativeECDSASignature$SHA1", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA224withECDSA", "sun.security.ec.NativeECDSASignature$SHA224", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA256withECDSA", "sun.security.ec.NativeECDSASignature$SHA256", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA384withECDSA", "sun.security.ec.NativeECDSASignature$SHA384", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA512withECDSA", "sun.security.ec.NativeECDSASignature$SHA512", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA3-224withECDSA", "sun.security.ec.NativeECDSASignature$SHA3_224", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA3-256withECDSA", "sun.security.ec.NativeECDSASignature$SHA3_256", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA3-384withECDSA", "sun.security.ec.NativeECDSASignature$SHA3_384", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA3-512withECDSA", "sun.security.ec.NativeECDSASignature$SHA3_512", + ATTRS)); - putService(new ProviderService(this, "Signature", - "NONEwithECDSAinP1363Format", - "sun.security.ec.ECDSASignature$RawinP1363Format")); - putService(new ProviderService(this, "Signature", - "SHA1withECDSAinP1363Format", - "sun.security.ec.ECDSASignature$SHA1inP1363Format")); - putService(new ProviderService(this, "Signature", - "SHA224withECDSAinP1363Format", - "sun.security.ec.ECDSASignature$SHA224inP1363Format")); - putService(new ProviderService(this, "Signature", - "SHA256withECDSAinP1363Format", - "sun.security.ec.ECDSASignature$SHA256inP1363Format")); - putService(new ProviderService(this, "Signature", - "SHA384withECDSAinP1363Format", - "sun.security.ec.ECDSASignature$SHA384inP1363Format")); - putService(new ProviderService(this, "Signature", - "SHA512withECDSAinP1363Format", - "sun.security.ec.ECDSASignature$SHA512inP1363Format")); + putService(new ProviderService(this, "Signature", + "NONEwithECDSAinP1363Format", + "sun.security.ec.NativeECDSASignature$RawinP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA1withECDSAinP1363Format", + "sun.security.ec.NativeECDSASignature$SHA1inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA224withECDSAinP1363Format", + "sun.security.ec.NativeECDSASignature$SHA224inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA256withECDSAinP1363Format", + "sun.security.ec.NativeECDSASignature$SHA256inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA384withECDSAinP1363Format", + "sun.security.ec.NativeECDSASignature$SHA384inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA512withECDSAinP1363Format", + "sun.security.ec.NativeECDSASignature$SHA512inP1363Format")); + + putService(new ProviderService(this, "Signature", + "SHA3-224withECDSAinP1363Format", + "sun.security.ec.NativeECDSASignature$SHA3_224inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA3-256withECDSAinP1363Format", + "sun.security.ec.NativeECDSASignature$SHA3_256inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA3-384withECDSAinP1363Format", + "sun.security.ec.NativeECDSASignature$SHA3_384inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA3-512withECDSAinP1363Format", + "sun.security.ec.NativeECDSASignature$SHA3_512inP1363Format")); + } else { + putService(new ProviderService(this, "Signature", + "NONEwithECDSA", "sun.security.ec.ECDSASignature$Raw", + null, ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA1withECDSA", "sun.security.ec.ECDSASignature$SHA1", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA224withECDSA", "sun.security.ec.ECDSASignature$SHA224", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA256withECDSA", "sun.security.ec.ECDSASignature$SHA256", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA384withECDSA", "sun.security.ec.ECDSASignature$SHA384", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA512withECDSA", "sun.security.ec.ECDSASignature$SHA512", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA3-224withECDSA", "sun.security.ec.ECDSASignature$SHA3_224", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA3-256withECDSA", "sun.security.ec.ECDSASignature$SHA3_256", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA3-384withECDSA", "sun.security.ec.ECDSASignature$SHA3_384", + ATTRS)); + putService(new ProviderServiceA(this, "Signature", + "SHA3-512withECDSA", "sun.security.ec.ECDSASignature$SHA3_512", + ATTRS)); - putService(new ProviderService(this, "Signature", - "SHA3-224withECDSAinP1363Format", - "sun.security.ec.ECDSASignature$SHA3_224inP1363Format")); - putService(new ProviderService(this, "Signature", - "SHA3-256withECDSAinP1363Format", - "sun.security.ec.ECDSASignature$SHA3_256inP1363Format")); - putService(new ProviderService(this, "Signature", - "SHA3-384withECDSAinP1363Format", - "sun.security.ec.ECDSASignature$SHA3_384inP1363Format")); - putService(new ProviderService(this, "Signature", - "SHA3-512withECDSAinP1363Format", - "sun.security.ec.ECDSASignature$SHA3_512inP1363Format")); + putService(new ProviderService(this, "Signature", + "NONEwithECDSAinP1363Format", + "sun.security.ec.ECDSASignature$RawinP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA1withECDSAinP1363Format", + "sun.security.ec.ECDSASignature$SHA1inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA224withECDSAinP1363Format", + "sun.security.ec.ECDSASignature$SHA224inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA256withECDSAinP1363Format", + "sun.security.ec.ECDSASignature$SHA256inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA384withECDSAinP1363Format", + "sun.security.ec.ECDSASignature$SHA384inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA512withECDSAinP1363Format", + "sun.security.ec.ECDSASignature$SHA512inP1363Format")); + + putService(new ProviderService(this, "Signature", + "SHA3-224withECDSAinP1363Format", + "sun.security.ec.ECDSASignature$SHA3_224inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA3-256withECDSAinP1363Format", + "sun.security.ec.ECDSASignature$SHA3_256inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA3-384withECDSAinP1363Format", + "sun.security.ec.ECDSASignature$SHA3_384inP1363Format")); + putService(new ProviderService(this, "Signature", + "SHA3-512withECDSAinP1363Format", + "sun.security.ec.ECDSASignature$SHA3_512inP1363Format")); + } /* * Key Pair Generator engine @@ -475,7 +606,7 @@ void putEntries() { && !isAIX ) { putService(new ProviderServiceA(this, "KeyPairGenerator", - "EC", "sun.security.ec.NaticeECKeyPairGenerator", ATTRS)); + "EC", "sun.security.ec.NativeECKeyPairGenerator", ATTRS)); } else { putService(new ProviderServiceA(this, "KeyPairGenerator", "EC", "sun.security.ec.ECKeyPairGenerator", ATTRS)); diff --git a/src/java.base/share/classes/sun/security/jca/ProviderList.java b/src/java.base/share/classes/sun/security/jca/ProviderList.java index 19cdb4f10a5..b1b230431ca 100644 --- a/src/java.base/share/classes/sun/security/jca/ProviderList.java +++ b/src/java.base/share/classes/sun/security/jca/ProviderList.java @@ -397,10 +397,13 @@ public Service getService(String type, String name) { int i; // Preferred provider list - if (preferredPropList != null && - (pList = preferredPropList.getAll(type, name)) != null) { + if (preferredPropList != null) { + pList = preferredPropList.getAll(type, name); for (i = 0; i < pList.size(); i++) { Provider p = getProvider(pList.get(i).provider); + if (p == null) { + continue; + } Service s = p.getService(type, name); if ((s != null) && RestrictedSecurity.isServiceAllowed(s)) { // We found a service that is allowed in restricted security mode. @@ -408,7 +411,6 @@ public Service getService(String type, String name) { } } } - for (i = 0; i < configs.length; i++) { Provider p = getProvider(i); Service s = p.getService(type, name); diff --git a/src/java.base/share/classes/sun/security/pkcs/ParsingException.java b/src/java.base/share/classes/sun/security/pkcs/ParsingException.java index d0f5999013d..ea7571491a0 100644 --- a/src/java.base/share/classes/sun/security/pkcs/ParsingException.java +++ b/src/java.base/share/classes/sun/security/pkcs/ParsingException.java @@ -23,16 +23,15 @@ * questions. */ +package sun.security.pkcs; + +import java.io.IOException; + /** * Generic PKCS Parsing exception. * * @author Benjamin Renaud */ - -package sun.security.pkcs; - -import java.io.IOException; - public class ParsingException extends IOException { @java.io.Serial diff --git a/src/java.base/share/classes/sun/security/provider/SeedGenerator.java b/src/java.base/share/classes/sun/security/provider/SeedGenerator.java index 94ffc26ab3f..b4c9355bccf 100644 --- a/src/java.base/share/classes/sun/security/provider/SeedGenerator.java +++ b/src/java.base/share/classes/sun/security/provider/SeedGenerator.java @@ -25,6 +25,17 @@ package sun.security.provider; +import java.security.*; +import java.io.*; +import java.util.Properties; +import java.util.Enumeration; +import java.net.*; +import java.nio.file.DirectoryStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Random; +import sun.security.util.Debug; + /** * This class generates seeds for the SHA1PRNG cryptographically strong * random number generator. @@ -66,17 +77,6 @@ * @author Gadi Guy */ -import java.security.*; -import java.io.*; -import java.util.Properties; -import java.util.Enumeration; -import java.net.*; -import java.nio.file.DirectoryStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.Random; -import sun.security.util.Debug; - abstract class SeedGenerator { // Static instance is created at link time diff --git a/src/java.base/share/classes/sun/security/util/ByteArrayTagOrder.java b/src/java.base/share/classes/sun/security/util/ByteArrayTagOrder.java index dd5fae526ac..65f20ac816c 100644 --- a/src/java.base/share/classes/sun/security/util/ByteArrayTagOrder.java +++ b/src/java.base/share/classes/sun/security/util/ByteArrayTagOrder.java @@ -23,6 +23,9 @@ * questions. */ +package sun.security.util; + +import java.util.Comparator; /** * ByteArrayTagOrder: a class for comparing two DER encodings by the @@ -31,10 +34,6 @@ * @author D. N. Hoover */ -package sun.security.util; - -import java.util.Comparator; - public class ByteArrayTagOrder implements Comparator { /** diff --git a/src/java.base/share/classes/sun/security/util/IOUtils.java b/src/java.base/share/classes/sun/security/util/IOUtils.java index 4837e2b70a0..a103f36eb2c 100644 --- a/src/java.base/share/classes/sun/security/util/IOUtils.java +++ b/src/java.base/share/classes/sun/security/util/IOUtils.java @@ -23,16 +23,15 @@ * questions. */ -/** - * IOUtils: A collection of IO-related public static methods. - */ - package sun.security.util; import java.io.EOFException; import java.io.IOException; import java.io.InputStream; +/** + * IOUtils: A collection of IO-related public static methods. + */ public class IOUtils { /** diff --git a/src/java.base/share/legal/cldr.md b/src/java.base/share/legal/cldr.md index e0d8102fb7f..97331fcba9f 100644 --- a/src/java.base/share/legal/cldr.md +++ b/src/java.base/share/legal/cldr.md @@ -1,14 +1,15 @@ -## Unicode Common Local Data Repository (CLDR) v44 +## Unicode Common Local Data Repository (CLDR) v45 ### CLDR License ``` + UNICODE LICENSE V3 COPYRIGHT AND PERMISSION NOTICE -Copyright © 2019-2023 Unicode, Inc. +Copyright © 1991-2024 Unicode, Inc. NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR @@ -44,4 +45,56 @@ not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. +SPDX-License-Identifier: Unicode-3.0 + +———————————— + +Unicode® Copyright and Terms of Use +For the general privacy policy governing access to this site, see the Unicode Privacy Policy. + +Unicode Copyright +Copyright © 1991-2024 Unicode, Inc. All rights reserved. +Definitions +Unicode Data Files ("DATA FILES") include all data files under the directories: +https://www.unicode.org/Public/ +https://www.unicode.org/reports/ +https://www.unicode.org/ivd/data/ + +Unicode Data Files do not include PDF online code charts under the directory: +https://www.unicode.org/Public/ + +Unicode Software ("SOFTWARE") includes any source code published in the Unicode Standard +or any source code or compiled code under the directories: +https://www.unicode.org/Public/PROGRAMS/ +https://www.unicode.org/Public/cldr/ +http://site.icu-project.org/download/ +Terms of Use +Certain documents and files on this website contain a legend indicating that "Modification is permitted." Any person is hereby authorized, without fee, to modify such documents and files to create derivative works conforming to the Unicode® Standard, subject to Terms and Conditions herein. +Any person is hereby authorized, without fee, to view, use, reproduce, and distribute all documents and files, subject to the Terms and Conditions herein. +Further specifications of rights and restrictions pertaining to the use of the Unicode DATA FILES and SOFTWARE can be found in the Unicode Data Files and Software License. +Each version of the Unicode Standard has further specifications of rights and restrictions of use. For the book editions (Unicode 5.0 and earlier), these are found on the back of the title page. +The Unicode PDF online code charts carry specific restrictions. Those restrictions are incorporated as the first page of each PDF code chart. +All other files, including online documentation of the core specification for Unicode 6.0 and later, are covered under these general Terms of Use. +No license is granted to "mirror" the Unicode website where a fee is charged for access to the "mirror" site. +Modification is not permitted with respect to this document. All copies of this document must be verbatim. +Restricted Rights Legend +Any technical data or software which is licensed to the United States of America, its agencies and/or instrumentalities under this Agreement is commercial technical data or commercial computer software developed exclusively at private expense as defined in FAR 2.101, or DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, duplication, or disclosure by the Government is subject to restrictions as set forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, as applicable, use, duplication or disclosure by the Government is subject to the restrictions set forth in this Agreement. +Warranties and Disclaimers +This publication and/or website may include technical or typographical errors or other inaccuracies. Changes are periodically added to the information herein; these changes will be incorporated in new editions of the publication and/or website. Unicode, Inc. may make improvements and/or changes in the product(s) and/or program(s) described in this publication and/or website at any time. +If this file has been purchased on magnetic or optical media from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange of the defective media within ninety (90) days of original purchase. +EXCEPT AS PROVIDED IN SECTION E.2, THIS PUBLICATION AND/OR SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE, INC. AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE. +Waiver of Damages +In no event shall Unicode, Inc. or its licensors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, whether or not Unicode, Inc. was advised of the possibility of the damage, including, without limitation, those resulting from the following: loss of use, data or profits, in connection with the use, modification or distribution of this information or its derivatives. +Trademarks & Logos +The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc. “The Unicode Consortium” and “Unicode, Inc.” are trade names of Unicode, Inc. Use of the information and materials found on this website indicates your acknowledgement of Unicode, Inc.’s exclusive worldwide rights in the Unicode Word Mark, the Unicode Logo, and the Unicode trade names. +The Unicode Consortium Name and Trademark Usage Policy (“Trademark Policy”) are incorporated herein by reference and you agree to abide by the provisions of the Trademark Policy, which may be changed from time to time in the sole discretion of Unicode, Inc. +All third party trademarks referenced herein are the property of their respective owners. +Miscellaneous +Jurisdiction and Venue. This website is operated from a location in the State of California, United States of America. Unicode, Inc. makes no representation that the materials are appropriate for use in other locations. If you access this website from other locations, you are responsible for compliance with local laws. This Agreement, all use of this website and any claims and damages resulting from use of this website are governed solely by the laws of the State of California without regard to any principles which would apply the laws of a different jurisdiction. The user agrees that any disputes regarding this website shall be resolved solely in the courts located in Santa Clara County, California. The user agrees said courts have personal jurisdiction and agree to waive any right to transfer the dispute to any other forum. +Modification by Unicode, Inc. Unicode, Inc. shall have the right to modify this Agreement at any time by posting it to this website. The user may not assign any part of this Agreement without Unicode, Inc.’s prior written consent. +Taxes. The user agrees to pay any taxes arising from access to this website or use of the information herein, except for those based on Unicode’s net income. +Severability. If any provision of this Agreement is declared invalid or unenforceable, the remaining provisions of this Agreement shall remain in effect. +Entire Agreement. This Agreement constitutes the entire agreement between the parties. + + ``` diff --git a/src/java.base/share/native/libzip/zip_util.c b/src/java.base/share/native/libzip/zip_util.c index a996b450ad4..8f2f19c66a2 100644 --- a/src/java.base/share/native/libzip/zip_util.c +++ b/src/java.base/share/native/libzip/zip_util.c @@ -437,7 +437,7 @@ hash(const char *s) static unsigned int hashN(const char *s, int length) { - int h = 0; + unsigned int h = 0; while (length-- > 0) h = 31*h + *s++; return h; diff --git a/src/java.base/unix/classes/java/io/UnixFileSystem.java b/src/java.base/unix/classes/java/io/UnixFileSystem.java index 682e9a69b56..18afb729c01 100644 --- a/src/java.base/unix/classes/java/io/UnixFileSystem.java +++ b/src/java.base/unix/classes/java/io/UnixFileSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -26,7 +26,6 @@ package java.io; import java.util.Properties; -import jdk.internal.misc.Blocker; import jdk.internal.util.StaticProperty; import sun.security.action.GetPropertyAction; @@ -161,12 +160,7 @@ public String resolve(File f) { @Override public String canonicalize(String path) throws IOException { - long comp = Blocker.begin(); - try { - return canonicalize0(path); - } finally { - Blocker.end(comp); - } + return canonicalize0(path); } private native String canonicalize0(String path) throws IOException; @@ -176,25 +170,13 @@ public String canonicalize(String path) throws IOException { @Override public int getBooleanAttributes(File f) { - int rv; - long comp = Blocker.begin(); - try { - rv = getBooleanAttributes0(f); - } finally { - Blocker.end(comp); - } + int rv = getBooleanAttributes0(f); return rv | isHidden(f); } @Override public boolean hasBooleanAttributes(File f, int attributes) { - int rv; - long comp = Blocker.begin(); - try { - rv = getBooleanAttributes0(f); - } finally { - Blocker.end(comp); - } + int rv = getBooleanAttributes0(f); if ((attributes & BA_HIDDEN) != 0) { rv |= isHidden(f); } @@ -207,45 +189,25 @@ private static int isHidden(File f) { @Override public boolean checkAccess(File f, int access) { - long comp = Blocker.begin(); - try { - return checkAccess0(f, access); - } finally { - Blocker.end(comp); - } + return checkAccess0(f, access); } private native boolean checkAccess0(File f, int access); @Override public long getLastModifiedTime(File f) { - long comp = Blocker.begin(); - try { - return getLastModifiedTime0(f); - } finally { - Blocker.end(comp); - } + return getLastModifiedTime0(f); } private native long getLastModifiedTime0(File f); @Override public long getLength(File f) { - long comp = Blocker.begin(); - try { - return getLength0(f); - } finally { - Blocker.end(comp); - } + return getLength0(f); } private native long getLength0(File f); @Override public boolean setPermission(File f, int access, boolean enable, boolean owneronly) { - long comp = Blocker.begin(); - try { - return setPermission0(f, access, enable, owneronly); - } finally { - Blocker.end(comp); - } + return setPermission0(f, access, enable, owneronly); } private native boolean setPermission0(File f, int access, boolean enable, boolean owneronly); @@ -253,78 +215,43 @@ public boolean setPermission(File f, int access, boolean enable, boolean owneron @Override public boolean createFileExclusively(String path) throws IOException { - long comp = Blocker.begin(); - try { - return createFileExclusively0(path); - } finally { - Blocker.end(comp); - } + return createFileExclusively0(path); } private native boolean createFileExclusively0(String path) throws IOException; @Override public boolean delete(File f) { - long comp = Blocker.begin(); - try { - return delete0(f); - } finally { - Blocker.end(comp); - } + return delete0(f); } private native boolean delete0(File f); @Override public String[] list(File f) { - long comp = Blocker.begin(); - try { - return list0(f); - } finally { - Blocker.end(comp); - } + return list0(f); } private native String[] list0(File f); @Override public boolean createDirectory(File f) { - long comp = Blocker.begin(); - try { - return createDirectory0(f); - } finally { - Blocker.end(comp); - } + return createDirectory0(f); } private native boolean createDirectory0(File f); @Override public boolean rename(File f1, File f2) { - long comp = Blocker.begin(); - try { - return rename0(f1, f2); - } finally { - Blocker.end(comp); - } + return rename0(f1, f2); } private native boolean rename0(File f1, File f2); @Override public boolean setLastModifiedTime(File f, long time) { - long comp = Blocker.begin(); - try { - return setLastModifiedTime0(f, time); - } finally { - Blocker.end(comp); - } + return setLastModifiedTime0(f, time); } private native boolean setLastModifiedTime0(File f, long time); @Override public boolean setReadOnly(File f) { - long comp = Blocker.begin(); - try { - return setReadOnly0(f); - } finally { - Blocker.end(comp); - } + return setReadOnly0(f); } private native boolean setReadOnly0(File f); @@ -348,12 +275,7 @@ public File[] listRoots() { @Override public long getSpace(File f, int t) { - long comp = Blocker.begin(); - try { - return getSpace0(f, t); - } finally { - Blocker.end(comp); - } + return getSpace0(f, t); } private native long getSpace0(File f, int t); diff --git a/src/java.base/unix/classes/java/lang/ProcessImpl.java b/src/java.base/unix/classes/java/lang/ProcessImpl.java index 3b302b23cd3..da4874b0181 100644 --- a/src/java.base/unix/classes/java/lang/ProcessImpl.java +++ b/src/java.base/unix/classes/java/lang/ProcessImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -626,7 +626,7 @@ public void close() throws IOException { */ private static class ProcessPipeOutputStream extends BufferedOutputStream { ProcessPipeOutputStream(int fd) { - super(new FileOutputStream(newFileDescriptor(fd))); + super(new PipeOutputStream(newFileDescriptor(fd))); } /** Called by the process reaper thread when the process exits. */ diff --git a/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java b/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java index 513c871e0e4..a3bff8d1e65 100644 --- a/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java +++ b/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2022, 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 @@ -111,11 +111,11 @@ protected int doSelect(Consumer action, long timeout) int numPolled; do { long startTime = timedPoll ? System.nanoTime() : 0; - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(blocking); try { numPolled = poll(pollArray.address(), pollArraySize, to); } finally { - Blocker.end(comp); + Blocker.end(attempted); } if (numPolled == IOStatus.INTERRUPTED && timedPoll) { // timed poll interrupted so need to adjust timeout diff --git a/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java b/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java index eed7bc4c575..8e5bf38882c 100644 --- a/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java +++ b/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -131,8 +131,8 @@ static FileChannel newFileChannel(int dfd, throw new IllegalArgumentException("APPEND + TRUNCATE_EXISTING not allowed"); FileDescriptor fdObj = open(dfd, path, pathForPermissionCheck, flags, mode); - return FileChannelImpl.open(fdObj, path.toString(), flags.read, - flags.write, flags.direct, null); + return FileChannelImpl.open(fdObj, path.toString(), flags.read, flags.write, + (flags.sync || flags.dsync), flags.direct, null); } /** @@ -168,7 +168,7 @@ static AsynchronousFileChannel newAsynchronousFileChannel(UnixPath path, // for now use simple implementation FileDescriptor fdObj = open(-1, path, null, flags, mode); - return SimpleAsynchronousFileChannelImpl.open(fdObj, flags.read, flags.write, pool); + return SimpleAsynchronousFileChannelImpl.open(fdObj, path.toString(), flags.read, flags.write, pool); } /** diff --git a/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java b/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java index a9e10a94be3..2b9ab775ed8 100644 --- a/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java +++ b/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java @@ -52,7 +52,6 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.regex.Pattern; -import jdk.internal.misc.Blocker; import sun.nio.ch.DirectBuffer; import sun.nio.ch.IOStatus; import sun.security.action.GetPropertyAction; @@ -682,7 +681,6 @@ void copyFile(UnixPath source, // Some forms of direct copy do not work on zero size files if (!directCopyNotSupported && attrs.size() > 0) { // copy bytes to target using platform function - long comp = Blocker.begin(); try { int res = directCopy(fo, fi, addressToPollForCancel); if (res == 0) { @@ -692,8 +690,6 @@ void copyFile(UnixPath source, } } catch (UnixException x) { x.rethrowAsIOException(source, target); - } finally { - Blocker.end(comp); } } @@ -703,14 +699,11 @@ void copyFile(UnixPath source, ByteBuffer buf = sun.nio.ch.Util.getTemporaryDirectBuffer(bufferSize); try { - long comp = Blocker.begin(); try { bufferedCopy(fo, fi, ((DirectBuffer)buf).address(), bufferSize, addressToPollForCancel); } catch (UnixException x) { x.rethrowAsIOException(source, target); - } finally { - Blocker.end(comp); } } finally { sun.nio.ch.Util.releaseTemporaryDirectBuffer(buf); diff --git a/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java b/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java index 2404f883c9c..a069a9a04ba 100644 --- a/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java +++ b/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -26,7 +26,6 @@ package sun.nio.fs; import java.util.function.Function; -import jdk.internal.misc.Blocker; /** * Unix system and library calls. @@ -67,12 +66,7 @@ static NativeBuffer copyToNativeBuffer(UnixPath path) { */ static int open(UnixPath path, int flags, int mode) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - return open0(buffer.address(), flags, mode); - } finally { - Blocker.end(comp); - } + return open0(buffer.address(), flags, mode); } } private static native int open0(long pathAddress, int flags, int mode) @@ -83,12 +77,7 @@ private static native int open0(long pathAddress, int flags, int mode) */ static int openat(int dfd, byte[] path, int flags, int mode) throws UnixException { try (NativeBuffer buffer = NativeBuffers.asNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - return openat0(dfd, buffer.address(), flags, mode); - } finally { - Blocker.end(comp); - } + return openat0(dfd, buffer.address(), flags, mode); } } private static native int openat0(int dfd, long pathAddress, int flags, int mode) @@ -138,12 +127,7 @@ void close(int fd, Function mapper) throws X { static void link(UnixPath existing, UnixPath newfile) throws UnixException { try (NativeBuffer existingBuffer = copyToNativeBuffer(existing); NativeBuffer newBuffer = copyToNativeBuffer(newfile)) { - long comp = Blocker.begin(); - try { - link0(existingBuffer.address(), newBuffer.address()); - } finally { - Blocker.end(comp); - } + link0(existingBuffer.address(), newBuffer.address()); } } private static native void link0(long existingAddress, long newAddress) @@ -154,12 +138,7 @@ private static native void link0(long existingAddress, long newAddress) */ static void unlink(UnixPath path) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - unlink0(buffer.address()); - } finally { - Blocker.end(comp); - } + unlink0(buffer.address()); } } private static native void unlink0(long pathAddress) throws UnixException; @@ -169,12 +148,7 @@ static void unlink(UnixPath path) throws UnixException { */ static void unlinkat(int dfd, byte[] path, int flag) throws UnixException { try (NativeBuffer buffer = NativeBuffers.asNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - unlinkat0(dfd, buffer.address(), flag); - } finally { - Blocker.end(comp); - } + unlinkat0(dfd, buffer.address(), flag); } } private static native void unlinkat0(int dfd, long pathAddress, int flag) @@ -185,12 +159,7 @@ private static native void unlinkat0(int dfd, long pathAddress, int flag) */ static void mknod(UnixPath path, int mode, long dev) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - mknod0(buffer.address(), mode, dev); - } finally { - Blocker.end(comp); - } + mknod0(buffer.address(), mode, dev); } } private static native void mknod0(long pathAddress, int mode, long dev) @@ -202,12 +171,7 @@ private static native void mknod0(long pathAddress, int mode, long dev) static void rename(UnixPath from, UnixPath to) throws UnixException { try (NativeBuffer fromBuffer = copyToNativeBuffer(from); NativeBuffer toBuffer = copyToNativeBuffer(to)) { - long comp = Blocker.begin(); - try { - rename0(fromBuffer.address(), toBuffer.address()); - } finally { - Blocker.end(comp); - } + rename0(fromBuffer.address(), toBuffer.address()); } } private static native void rename0(long fromAddress, long toAddress) @@ -219,12 +183,7 @@ private static native void rename0(long fromAddress, long toAddress) static void renameat(int fromfd, byte[] from, int tofd, byte[] to) throws UnixException { try (NativeBuffer fromBuffer = NativeBuffers.asNativeBuffer(from); NativeBuffer toBuffer = NativeBuffers.asNativeBuffer(to)) { - long comp = Blocker.begin(); - try { - renameat0(fromfd, fromBuffer.address(), tofd, toBuffer.address()); - } finally { - Blocker.end(comp); - } + renameat0(fromfd, fromBuffer.address(), tofd, toBuffer.address()); } } private static native void renameat0(int fromfd, long fromAddress, int tofd, long toAddress) @@ -235,12 +194,7 @@ private static native void renameat0(int fromfd, long fromAddress, int tofd, lon */ static void mkdir(UnixPath path, int mode) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - mkdir0(buffer.address(), mode); - } finally { - Blocker.end(comp); - } + mkdir0(buffer.address(), mode); } } private static native void mkdir0(long pathAddress, int mode) throws UnixException; @@ -250,12 +204,7 @@ static void mkdir(UnixPath path, int mode) throws UnixException { */ static void rmdir(UnixPath path) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - rmdir0(buffer.address()); - } finally { - Blocker.end(comp); - } + rmdir0(buffer.address()); } } private static native void rmdir0(long pathAddress) throws UnixException; @@ -267,12 +216,7 @@ static void rmdir(UnixPath path) throws UnixException { */ static byte[] readlink(UnixPath path) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - return readlink0(buffer.address()); - } finally { - Blocker.end(comp); - } + return readlink0(buffer.address()); } } private static native byte[] readlink0(long pathAddress) throws UnixException; @@ -284,12 +228,7 @@ static byte[] readlink(UnixPath path) throws UnixException { */ static byte[] realpath(UnixPath path) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - return realpath0(buffer.address()); - } finally { - Blocker.end(comp); - } + return realpath0(buffer.address()); } } private static native byte[] realpath0(long pathAddress) throws UnixException; @@ -300,12 +239,7 @@ static byte[] realpath(UnixPath path) throws UnixException { static void symlink(byte[] name1, UnixPath name2) throws UnixException { try (NativeBuffer targetBuffer = NativeBuffers.asNativeBuffer(name1); NativeBuffer linkBuffer = copyToNativeBuffer(name2)) { - long comp = Blocker.begin(); - try { - symlink0(targetBuffer.address(), linkBuffer.address()); - } finally { - Blocker.end(comp); - } + symlink0(targetBuffer.address(), linkBuffer.address()); } } private static native void symlink0(long name1, long name2) @@ -316,26 +250,16 @@ private static native void symlink0(long name1, long name2) */ static void stat(UnixPath path, UnixFileAttributes attrs) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - int errno = stat0(buffer.address(), attrs); - if (errno != 0) { - throw new UnixException(errno); - } - } finally { - Blocker.end(comp); + int errno = stat0(buffer.address(), attrs); + if (errno != 0) { + throw new UnixException(errno); } } } static int stat2(UnixPath path, UnixFileAttributes attrs) { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - return stat0(buffer.address(), attrs); - } finally { - Blocker.end(comp); - } + return stat0(buffer.address(), attrs); } } @@ -346,12 +270,7 @@ static int stat2(UnixPath path, UnixFileAttributes attrs) { */ static void lstat(UnixPath path, UnixFileAttributes attrs) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - lstat0(buffer.address(), attrs); - } finally { - Blocker.end(comp); - } + lstat0(buffer.address(), attrs); } } private static native void lstat0(long pathAddress, UnixFileAttributes attrs) @@ -361,12 +280,7 @@ private static native void lstat0(long pathAddress, UnixFileAttributes attrs) * fstat(int filedes, struct stat* buf) */ static void fstat(int fd, UnixFileAttributes attrs) throws UnixException { - long comp = Blocker.begin(); - try { - fstat0(fd, attrs); - } finally { - Blocker.end(comp); - } + fstat0(fd, attrs); } private static native void fstat0(int fd, UnixFileAttributes attrs) throws UnixException; @@ -378,12 +292,7 @@ static void fstatat(int dfd, byte[] path, int flag, UnixFileAttributes attrs) throws UnixException { try (NativeBuffer buffer = NativeBuffers.asNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - fstatat0(dfd, buffer.address(), flag, attrs); - } finally { - Blocker.end(comp); - } + fstatat0(dfd, buffer.address(), flag, attrs); } } private static native void fstatat0(int dfd, long pathAddress, int flag, @@ -394,12 +303,7 @@ private static native void fstatat0(int dfd, long pathAddress, int flag, */ static void chown(UnixPath path, int uid, int gid) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - chown0(buffer.address(), uid, gid); - } finally { - Blocker.end(comp); - } + chown0(buffer.address(), uid, gid); } } private static native void chown0(long pathAddress, int uid, int gid) @@ -410,12 +314,7 @@ private static native void chown0(long pathAddress, int uid, int gid) */ static void lchown(UnixPath path, int uid, int gid) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - lchown0(buffer.address(), uid, gid); - } finally { - Blocker.end(comp); - } + lchown0(buffer.address(), uid, gid); } } private static native void lchown0(long pathAddress, int uid, int gid) @@ -425,12 +324,7 @@ private static native void lchown0(long pathAddress, int uid, int gid) * fchown(int filedes, uid_t owner, gid_t group) */ static void fchown(int fd, int uid, int gid) throws UnixException { - long comp = Blocker.begin(); - try { - fchown0(fd, uid, gid); - } finally { - Blocker.end(comp); - } + fchown0(fd, uid, gid); } static native void fchown0(int fd, int uid, int gid) throws UnixException; @@ -439,12 +333,7 @@ static void fchown(int fd, int uid, int gid) throws UnixException { */ static void chmod(UnixPath path, int mode) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - chmod0(buffer.address(), mode); - } finally { - Blocker.end(comp); - } + chmod0(buffer.address(), mode); } } private static native void chmod0(long pathAddress, int mode) @@ -454,12 +343,7 @@ private static native void chmod0(long pathAddress, int mode) * fchmod(int fildes, mode_t mode) */ static void fchmod(int fd, int mode) throws UnixException { - long comp = Blocker.begin(); - try { - fchmod0(fd, mode); - } finally { - Blocker.end(comp); - } + fchmod0(fd, mode); } private static native void fchmod0(int fd, int mode) throws UnixException; @@ -470,12 +354,7 @@ static void utimes(UnixPath path, long times0, long times1) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - utimes0(buffer.address(), times0, times1); - } finally { - Blocker.end(comp); - } + utimes0(buffer.address(), times0, times1); } } private static native void utimes0(long pathAddress, long times0, long times1) @@ -485,12 +364,7 @@ private static native void utimes0(long pathAddress, long times0, long times1) * futimes(int fildes, const struct timeval times[2]) */ static void futimes(int fd, long times0, long times1) throws UnixException { - long comp = Blocker.begin(); - try { - futimes0(fd, times0, times1); - } finally { - Blocker.end(comp); - } + futimes0(fd, times0, times1); } private static native void futimes0(int fd, long times0, long times1) throws UnixException; @@ -499,12 +373,7 @@ private static native void futimes0(int fd, long times0, long times1) * futimens(int fildes, const struct timespec times[2]) */ static void futimens(int fd, long times0, long times1) throws UnixException { - long comp = Blocker.begin(); - try { - futimens0(fd, times0, times1); - } finally { - Blocker.end(comp); - } + futimens0(fd, times0, times1); } private static native void futimens0(int fd, long times0, long times1) throws UnixException; @@ -516,12 +385,7 @@ static void lutimes(UnixPath path, long times0, long times1) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - lutimes0(buffer.address(), times0, times1); - } finally { - Blocker.end(comp); - } + lutimes0(buffer.address(), times0, times1); } } private static native void lutimes0(long pathAddress, long times0, long times1) @@ -532,12 +396,7 @@ private static native void lutimes0(long pathAddress, long times0, long times1) */ static long opendir(UnixPath path) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - return opendir0(buffer.address()); - } finally { - Blocker.end(comp); - } + return opendir0(buffer.address()); } } private static native long opendir0(long pathAddress) throws UnixException; @@ -559,12 +418,7 @@ static long opendir(UnixPath path) throws UnixException { * @return dirent->d_name */ static byte[] readdir(long dir) throws UnixException { - long comp = Blocker.begin(); - try { - return readdir0(dir); - } finally { - Blocker.end(comp); - } + return readdir0(dir); } static native byte[] readdir0(long dir) throws UnixException; @@ -572,12 +426,7 @@ static byte[] readdir(long dir) throws UnixException { * size_t read(int fildes, void* buf, size_t nbyte) */ static int read(int fildes, long buf, int nbyte) throws UnixException { - long comp = Blocker.begin(); - try { - return read0(fildes, buf, nbyte); - } finally { - Blocker.end(comp); - } + return read0(fildes, buf, nbyte); } private static native int read0(int fildes, long buf, int nbyte) throws UnixException; @@ -585,12 +434,7 @@ static int read(int fildes, long buf, int nbyte) throws UnixException { * size_t writeint fildes, void* buf, size_t nbyte) */ static int write(int fildes, long buf, int nbyte) throws UnixException { - long comp = Blocker.begin(); - try { - return write0(fildes, buf, nbyte); - } finally { - Blocker.end(comp); - } + return write0(fildes, buf, nbyte); } private static native int write0(int fildes, long buf, int nbyte) throws UnixException; @@ -599,12 +443,7 @@ static int write(int fildes, long buf, int nbyte) throws UnixException { */ static int access(UnixPath path, int amode) { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - return access0(buffer.address(), amode); - } finally { - Blocker.end(comp); - } + return access0(buffer.address(), amode); } } private static native int access0(long pathAddress, int amode); @@ -630,12 +469,7 @@ static int access(UnixPath path, int amode) { */ static int getpwnam(String name) throws UnixException { try (NativeBuffer buffer = NativeBuffers.asNativeBuffer(Util.toBytes(name))) { - long comp = Blocker.begin(); - try { - return getpwnam0(buffer.address()); - } finally { - Blocker.end(comp); - } + return getpwnam0(buffer.address()); } } private static native int getpwnam0(long nameAddress) throws UnixException; @@ -647,12 +481,7 @@ static int getpwnam(String name) throws UnixException { */ static int getgrnam(String name) throws UnixException { try (NativeBuffer buffer = NativeBuffers.asNativeBuffer(Util.toBytes(name))) { - long comp = Blocker.begin(); - try { - return getgrnam0(buffer.address()); - } finally { - Blocker.end(comp); - } + return getgrnam0(buffer.address()); } } private static native int getgrnam0(long nameAddress) throws UnixException; @@ -664,12 +493,7 @@ static void statvfs(UnixPath path, UnixFileStoreAttributes attrs) throws UnixException { try (NativeBuffer buffer = copyToNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - statvfs0(buffer.address(), attrs); - } finally { - Blocker.end(comp); - } + statvfs0(buffer.address(), attrs); } } private static native void statvfs0(long pathAddress, UnixFileStoreAttributes attrs) @@ -687,12 +511,7 @@ static int fgetxattr(int filedes, byte[] name, long valueAddress, int valueLen) throws UnixException { try (NativeBuffer buffer = NativeBuffers.asNativeBuffer(name)) { - long comp = Blocker.begin(); - try { - return fgetxattr0(filedes, buffer.address(), valueAddress, valueLen); - } finally { - Blocker.end(comp); - } + return fgetxattr0(filedes, buffer.address(), valueAddress, valueLen); } } @@ -706,12 +525,7 @@ static void fsetxattr(int filedes, byte[] name, long valueAddress, int valueLen) throws UnixException { try (NativeBuffer buffer = NativeBuffers.asNativeBuffer(name)) { - long comp = Blocker.begin(); - try { - fsetxattr0(filedes, buffer.address(), valueAddress, valueLen); - } finally { - Blocker.end(comp); - } + fsetxattr0(filedes, buffer.address(), valueAddress, valueLen); } } @@ -723,12 +537,7 @@ private static native void fsetxattr0(int filedes, long nameAddress, */ static void fremovexattr(int filedes, byte[] name) throws UnixException { try (NativeBuffer buffer = NativeBuffers.asNativeBuffer(name)) { - long comp = Blocker.begin(); - try { - fremovexattr0(filedes, buffer.address()); - } finally { - Blocker.end(comp); - } + fremovexattr0(filedes, buffer.address()); } } diff --git a/src/java.base/unix/native/libjli/java_md.c b/src/java.base/unix/native/libjli/java_md.c index a71206c77cb..7cde49ddaf6 100644 --- a/src/java.base/unix/native/libjli/java_md.c +++ b/src/java.base/unix/native/libjli/java_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -544,6 +544,8 @@ GetJREPath(char *path, jint pathsize, jboolean speculative) char libjava[MAXPATHLEN]; struct stat s; + JLI_TraceLauncher("Attempt to get JRE path from launcher executable path\n"); + if (GetApplicationHome(path, pathsize)) { /* Is JRE co-located with the application? */ JLI_Snprintf(libjava, sizeof(libjava), "%s/lib/" JAVA_DLL, path); @@ -551,20 +553,10 @@ GetJREPath(char *path, jint pathsize, jboolean speculative) JLI_TraceLauncher("JRE path is %s\n", path); return JNI_TRUE; } - /* ensure storage for path + /jre + NULL */ - if ((JLI_StrLen(path) + 4 + 1) > (size_t) pathsize) { - JLI_TraceLauncher("Insufficient space to store JRE path\n"); - return JNI_FALSE; - } - /* Does the app ship a private JRE in /jre directory? */ - JLI_Snprintf(libjava, sizeof(libjava), "%s/jre/lib/" JAVA_DLL, path); - if (access(libjava, F_OK) == 0) { - JLI_StrCat(path, "/jre"); - JLI_TraceLauncher("JRE path is %s\n", path); - return JNI_TRUE; - } } + JLI_TraceLauncher("Attempt to get JRE path from shared lib of the image\n"); + if (GetApplicationHomeFromDll(path, pathsize)) { JLI_Snprintf(libjava, sizeof(libjava), "%s/lib/" JAVA_DLL, path); if (stat(libjava, &s) == 0) { diff --git a/src/java.base/windows/classes/java/io/WinNTFileSystem.java b/src/java.base/windows/classes/java/io/WinNTFileSystem.java index e700d44cfae..cf58d980bbe 100644 --- a/src/java.base/windows/classes/java/io/WinNTFileSystem.java +++ b/src/java.base/windows/classes/java/io/WinNTFileSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2023, 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 @@ -30,7 +30,6 @@ import java.util.BitSet; import java.util.Locale; import java.util.Properties; -import jdk.internal.misc.Blocker; import sun.security.action.GetPropertyAction; /** @@ -491,12 +490,7 @@ public String canonicalize(String path) throws IOException { return path; return "" + ((char) (c-32)) + ':' + '\\'; } - long comp = Blocker.begin(); - try { - return canonicalize0(path); - } finally { - Blocker.end(comp); - } + return canonicalize0(path); } private native String canonicalize0(String path) @@ -507,56 +501,31 @@ private native String canonicalize0(String path) @Override public int getBooleanAttributes(File f) { - long comp = Blocker.begin(); - try { - return getBooleanAttributes0(f); - } finally { - Blocker.end(comp); - } + return getBooleanAttributes0(f); } private native int getBooleanAttributes0(File f); @Override public boolean checkAccess(File f, int access) { - long comp = Blocker.begin(); - try { - return checkAccess0(f, access); - } finally { - Blocker.end(comp); - } + return checkAccess0(f, access); } private native boolean checkAccess0(File f, int access); @Override public long getLastModifiedTime(File f) { - long comp = Blocker.begin(); - try { - return getLastModifiedTime0(f); - } finally { - Blocker.end(comp); - } + return getLastModifiedTime0(f); } private native long getLastModifiedTime0(File f); @Override public long getLength(File f) { - long comp = Blocker.begin(); - try { - return getLength0(f); - } finally { - Blocker.end(comp); - } + return getLength0(f); } private native long getLength0(File f); @Override public boolean setPermission(File f, int access, boolean enable, boolean owneronly) { - long comp = Blocker.begin(); - try { - return setPermission0(f, access, enable, owneronly); - } finally { - Blocker.end(comp); - } + return setPermission0(f, access, enable, owneronly); } private native boolean setPermission0(File f, int access, boolean enable, boolean owneronly); @@ -564,78 +533,43 @@ public boolean setPermission(File f, int access, boolean enable, boolean owneron @Override public boolean createFileExclusively(String path) throws IOException { - long comp = Blocker.begin(); - try { - return createFileExclusively0(path); - } finally { - Blocker.end(comp); - } + return createFileExclusively0(path); } private native boolean createFileExclusively0(String path) throws IOException; @Override public String[] list(File f) { - long comp = Blocker.begin(); - try { - return list0(f); - } finally { - Blocker.end(comp); - } + return list0(f); } private native String[] list0(File f); @Override public boolean createDirectory(File f) { - long comp = Blocker.begin(); - try { - return createDirectory0(f); - } finally { - Blocker.end(comp); - } + return createDirectory0(f); } private native boolean createDirectory0(File f); @Override public boolean setLastModifiedTime(File f, long time) { - long comp = Blocker.begin(); - try { - return setLastModifiedTime0(f, time); - } finally { - Blocker.end(comp); - } + return setLastModifiedTime0(f, time); } private native boolean setLastModifiedTime0(File f, long time); @Override public boolean setReadOnly(File f) { - long comp = Blocker.begin(); - try { - return setReadOnly0(f); - } finally { - Blocker.end(comp); - } + return setReadOnly0(f); } private native boolean setReadOnly0(File f); @Override public boolean delete(File f) { - long comp = Blocker.begin(); - try { - return delete0(f); - } finally { - Blocker.end(comp); - } + return delete0(f); } private native boolean delete0(File f); @Override public boolean rename(File f1, File f2) { - long comp = Blocker.begin(); - try { - return rename0(f1, f2); - } finally { - Blocker.end(comp); - } + return rename0(f1, f2); } private native boolean rename0(File f1, File f2); diff --git a/src/java.base/windows/classes/java/lang/ProcessImpl.java b/src/java.base/windows/classes/java/lang/ProcessImpl.java index a01d1db6ddc..d6fb51c4494 100644 --- a/src/java.base/windows/classes/java/lang/ProcessImpl.java +++ b/src/java.base/windows/classes/java/lang/ProcessImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -515,7 +515,7 @@ public Void run() { fdAccess.setHandle(stdin_fd, stdHandles[0]); fdAccess.registerCleanup(stdin_fd); stdin_stream = new BufferedOutputStream( - new FileOutputStream(stdin_fd)); + new PipeOutputStream(stdin_fd)); } if (stdHandles[1] == -1L || forceNullOutputStream) @@ -564,11 +564,11 @@ public int exitValue() { private static native int getExitCodeProcess(long handle); public int waitFor() throws InterruptedException { - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(); try { waitForInterruptibly(handle); } finally { - Blocker.end(comp); + Blocker.end(attempted); } if (Thread.interrupted()) throw new InterruptedException(); @@ -593,11 +593,11 @@ public boolean waitFor(long timeout, TimeUnit unit) // if wraps around then wait a long while msTimeout = Integer.MAX_VALUE; } - long comp = Blocker.begin(); + boolean attempted = Blocker.begin(); try { waitForTimeoutInterruptibly(handle, msTimeout); } finally { - Blocker.end(comp); + Blocker.end(attempted); } if (Thread.interrupted()) throw new InterruptedException(); diff --git a/src/java.base/windows/classes/sun/nio/ch/WEPollSelectorImpl.java b/src/java.base/windows/classes/sun/nio/ch/WEPollSelectorImpl.java index 2b39a7ed4a9..bbcfab9bbf1 100644 --- a/src/java.base/windows/classes/sun/nio/ch/WEPollSelectorImpl.java +++ b/src/java.base/windows/classes/sun/nio/ch/WEPollSelectorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -109,11 +109,11 @@ protected int doSelect(Consumer action, long timeout) processDeregisterQueue(); try { begin(blocking); - long comp = Blocker.begin(blocking); + boolean attempted = Blocker.begin(blocking); try { numEntries = WEPoll.wait(eph, pollArrayAddress, NUM_EPOLLEVENTS, to); } finally { - Blocker.end(comp); + Blocker.end(attempted); } } finally { end(blocking); diff --git a/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java b/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java index a1bacc1fae1..15ae425850e 100644 --- a/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java +++ b/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -33,6 +33,7 @@ import java.io.FileDescriptor; import jdk.internal.access.SharedSecrets; import jdk.internal.access.JavaIOFileDescriptorAccess; +import jdk.internal.event.FileForceEvent; /** * Windows implementation of AsynchronousFileChannel using overlapped I/O. @@ -63,6 +64,9 @@ private static Iocp defaultIocp() { // Used for force/truncate/size methods private static final FileDispatcher nd = new FileDispatcherImpl(); + // file path + private final String path; + // The handle is extracted for use in native methods invoked from this class. private final long handle; @@ -79,6 +83,7 @@ private static Iocp defaultIocp() { private WindowsAsynchronousFileChannelImpl(FileDescriptor fdObj, + String path, boolean reading, boolean writing, Iocp iocp, @@ -86,6 +91,7 @@ private WindowsAsynchronousFileChannelImpl(FileDescriptor fdObj, throws IOException { super(fdObj, reading, writing, iocp.executor()); + this.path = path; this.handle = fdAccess.getHandle(fdObj); this.iocp = iocp; this.isDefaultIocp = isDefaultIocp; @@ -94,6 +100,7 @@ private WindowsAsynchronousFileChannelImpl(FileDescriptor fdObj, } public static AsynchronousFileChannel open(FileDescriptor fdo, + String path, boolean reading, boolean writing, ThreadPool pool) @@ -109,8 +116,7 @@ public static AsynchronousFileChannel open(FileDescriptor fdo, isDefaultIocp = false; } try { - return new - WindowsAsynchronousFileChannelImpl(fdo, reading, writing, iocp, isDefaultIocp); + return new WindowsAsynchronousFileChannelImpl(fdo, path, reading, writing, iocp, isDefaultIocp); } catch (IOException x) { // error binding to port so need to close it (if created for this channel) if (!isDefaultIocp) @@ -196,8 +202,7 @@ public AsynchronousFileChannel truncate(long size) throws IOException { return this; } - @Override - public void force(boolean metaData) throws IOException { + private void implForce(boolean metaData) throws IOException { try { begin(); nd.force(fdObj, metaData); @@ -206,6 +211,17 @@ public void force(boolean metaData) throws IOException { } } + @Override + public void force(boolean metaData) throws IOException { + if (!FileForceEvent.enabled()) { + implForce(metaData); + return; + } + long start = FileForceEvent.timestamp(); + implForce(metaData); + FileForceEvent.offer(start, path, metaData); + } + // -- file locking -- /** diff --git a/src/java.base/windows/classes/sun/nio/fs/WindowsChannelFactory.java b/src/java.base/windows/classes/sun/nio/fs/WindowsChannelFactory.java index 56f09d34ab8..59db82d3fab 100644 --- a/src/java.base/windows/classes/sun/nio/fs/WindowsChannelFactory.java +++ b/src/java.base/windows/classes/sun/nio/fs/WindowsChannelFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -166,8 +166,8 @@ static FileChannel newFileChannel(String pathForWindows, throw new IllegalArgumentException("APPEND + TRUNCATE_EXISTING not allowed"); FileDescriptor fdObj = open(pathForWindows, pathToCheck, flags, pSecurityDescriptor); - return FileChannelImpl.open(fdObj, pathForWindows, flags.read, - flags.write, flags.direct, null); + return FileChannelImpl.open(fdObj, pathForWindows, flags.read, flags.write, + (flags.sync || flags.dsync), flags.direct, null); } /** @@ -212,7 +212,7 @@ static AsynchronousFileChannel newAsynchronousFileChannel(String pathForWindows, // create the AsynchronousFileChannel try { - return WindowsAsynchronousFileChannelImpl.open(fdObj, flags.read, flags.write, pool); + return WindowsAsynchronousFileChannelImpl.open(fdObj, pathForWindows, flags.read, flags.write, pool); } catch (IOException x) { // IOException is thrown if the file handle cannot be associated // with the completion port. All we can do is close the file. diff --git a/src/java.base/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java b/src/java.base/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java index 34d748f4150..8e351b7e0ef 100644 --- a/src/java.base/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java +++ b/src/java.base/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -25,7 +25,6 @@ package sun.nio.fs; -import jdk.internal.misc.Blocker; import jdk.internal.misc.Unsafe; import static sun.nio.fs.WindowsConstants.*; @@ -68,17 +67,12 @@ static long CreateFile(String path, throws WindowsException { try (NativeBuffer buffer = asNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - return CreateFile0(buffer.address(), - dwDesiredAccess, - dwShareMode, - lpSecurityAttributes, - dwCreationDisposition, - dwFlagsAndAttributes); - } finally { - Blocker.end(comp); - } + return CreateFile0(buffer.address(), + dwDesiredAccess, + dwShareMode, + lpSecurityAttributes, + dwCreationDisposition, + dwFlagsAndAttributes); } } static long CreateFile(String path, @@ -113,12 +107,7 @@ private static native long CreateFile0(long lpFileName, */ static void DeleteFile(String path) throws WindowsException { try (NativeBuffer buffer = asNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - DeleteFile0(buffer.address()); - } finally { - Blocker.end(comp); - } + DeleteFile0(buffer.address()); } } private static native void DeleteFile0(long lpFileName) @@ -132,12 +121,7 @@ private static native void DeleteFile0(long lpFileName) */ static void CreateDirectory(String path, long lpSecurityAttributes) throws WindowsException { try (NativeBuffer buffer = asNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - CreateDirectory0(buffer.address(), lpSecurityAttributes); - } finally { - Blocker.end(comp); - } + CreateDirectory0(buffer.address(), lpSecurityAttributes); } } private static native void CreateDirectory0(long lpFileName, long lpSecurityAttributes) @@ -150,12 +134,7 @@ private static native void CreateDirectory0(long lpFileName, long lpSecurityAttr */ static void RemoveDirectory(String path) throws WindowsException { try (NativeBuffer buffer = asNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - RemoveDirectory0(buffer.address()); - } finally { - Blocker.end(comp); - } + RemoveDirectory0(buffer.address()); } } private static native void RemoveDirectory0(long lpFileName) @@ -200,12 +179,7 @@ static native void DeviceIoControlGetReparsePoint(long handle, static FirstFile FindFirstFile(String path) throws WindowsException { try (NativeBuffer buffer = asNativeBuffer(path)) { FirstFile data = new FirstFile(); - long comp = Blocker.begin(); - try { - FindFirstFile0(buffer.address(), data); - } finally { - Blocker.end(comp); - } + FindFirstFile0(buffer.address(), data); return data; } } @@ -230,12 +204,7 @@ private static native void FindFirstFile0(long lpFileName, FirstFile obj) */ static long FindFirstFile(String path, long address) throws WindowsException { try (NativeBuffer buffer = asNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - return FindFirstFile1(buffer.address(), address); - } finally { - Blocker.end(comp); - } + return FindFirstFile1(buffer.address(), address); } } private static native long FindFirstFile1(long lpFileName, long address) @@ -250,12 +219,7 @@ private static native long FindFirstFile1(long lpFileName, long address) * @return lpFindFileData->cFileName or null */ static String FindNextFile(long handle, long address) throws WindowsException { - long comp = Blocker.begin(); - try { - return FindNextFile0(handle, address); - } finally { - Blocker.end(comp); - } + return FindNextFile0(handle, address); } private static native String FindNextFile0(long handle, long address) throws WindowsException; @@ -271,12 +235,7 @@ private static native String FindNextFile0(long handle, long address) static FirstStream FindFirstStream(String path) throws WindowsException { try (NativeBuffer buffer = asNativeBuffer(path)) { FirstStream data = new FirstStream(); - long comp = Blocker.begin(); - try { - FindFirstStream0(buffer.address(), data); - } finally { - Blocker.end(comp); - } + FindFirstStream0(buffer.address(), data); if (data.handle() == WindowsConstants.INVALID_HANDLE_VALUE) return null; return data; @@ -300,12 +259,7 @@ private static native void FindFirstStream0(long lpFileName, FirstStream obj) * ) */ static String FindNextStream(long handle) throws WindowsException { - long comp = Blocker.begin(); - try { - return FindNextStream0(handle); - } finally { - Blocker.end(comp); - } + return FindNextStream0(handle); } private static native String FindNextStream0(long handle) throws WindowsException; @@ -325,12 +279,7 @@ static String FindNextStream(long handle) throws WindowsException { static void GetFileInformationByHandle(long handle, long address) throws WindowsException { - long comp = Blocker.begin(); - try { - GetFileInformationByHandle0(handle, address); - } finally { - Blocker.end(comp); - } + GetFileInformationByHandle0(handle, address); } private static native void GetFileInformationByHandle0(long handle, long address) throws WindowsException; @@ -351,13 +300,7 @@ static void CopyFileEx(String source, String target, int flags, { try (NativeBuffer sourceBuffer = asNativeBuffer(source); NativeBuffer targetBuffer = asNativeBuffer(target)) { - long comp = Blocker.begin(); - try { - CopyFileEx0(sourceBuffer.address(), targetBuffer.address(), flags, - addressToPollForCancel); - } finally { - Blocker.end(comp); - } + CopyFileEx0(sourceBuffer.address(), targetBuffer.address(), flags, addressToPollForCancel); } } private static native void CopyFileEx0(long existingAddress, long newAddress, @@ -375,12 +318,7 @@ static void MoveFileEx(String source, String target, int flags) { try (NativeBuffer sourceBuffer = asNativeBuffer(source); NativeBuffer targetBuffer = asNativeBuffer(target)) { - long comp = Blocker.begin(); - try { - MoveFileEx0(sourceBuffer.address(), targetBuffer.address(), flags); - } finally { - Blocker.end(comp); - } + MoveFileEx0(sourceBuffer.address(), targetBuffer.address(), flags); } } private static native void MoveFileEx0(long existingAddress, long newAddress, @@ -393,12 +331,7 @@ private static native void MoveFileEx0(long existingAddress, long newAddress, */ static int GetFileAttributes(String path) throws WindowsException { try (NativeBuffer buffer = asNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - return GetFileAttributes0(buffer.address()); - } finally { - Blocker.end(comp); - } + return GetFileAttributes0(buffer.address()); } } private static native int GetFileAttributes0(long lpFileName) @@ -413,12 +346,7 @@ static void SetFileAttributes(String path, int dwFileAttributes) throws WindowsException { try (NativeBuffer buffer = asNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - SetFileAttributes0(buffer.address(), dwFileAttributes); - } finally { - Blocker.end(comp); - } + SetFileAttributes0(buffer.address(), dwFileAttributes); } } private static native void SetFileAttributes0(long lpFileName, @@ -433,12 +361,7 @@ private static native void SetFileAttributes0(long lpFileName, */ static void GetFileAttributesEx(String path, long address) throws WindowsException { try (NativeBuffer buffer = asNativeBuffer(path)) { - long comp = Blocker.begin(); - try { - GetFileAttributesEx0(buffer.address(), address); - } finally { - Blocker.end(comp); - } + GetFileAttributesEx0(buffer.address(), address); } } private static native void GetFileAttributesEx0(long lpFileName, long address) @@ -455,12 +378,7 @@ private static native void GetFileAttributesEx0(long lpFileName, long address) static void SetFileTime(long handle, long createTime, long lastAccessTime, long lastWriteTime) throws WindowsException { - long comp = Blocker.begin(); - try { - SetFileTime0(handle, createTime, lastAccessTime, lastWriteTime); - } finally { - Blocker.end(comp); - } + SetFileTime0(handle, createTime, lastAccessTime, lastWriteTime); } private static native void SetFileTime0(long handle, long createTime, diff --git a/src/java.base/windows/native/libjli/java_md.c b/src/java.base/windows/native/libjli/java_md.c index 39930a38535..6ff155bcb9b 100644 --- a/src/java.base/windows/native/libjli/java_md.c +++ b/src/java.base/windows/native/libjli/java_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -49,10 +49,6 @@ static jboolean GetJVMPath(const char *jrepath, const char *jvmtype, char *jvmpath, jint jvmpathsize); static jboolean GetJREPath(char *path, jint pathsize); -#ifdef USE_REGISTRY_LOOKUP -jboolean GetPublicJREHome(char *buf, jint bufsize); -#endif - /* We supports warmup for UI stack that is performed in parallel * to VM initialization. * This helps to improve startup of UI application as warmup phase @@ -300,6 +296,8 @@ GetJREPath(char *path, jint pathsize) char javadll[MAXPATHLEN]; struct stat s; + JLI_TraceLauncher("Attempt to get JRE path from launcher executable path\n"); + if (GetApplicationHome(path, pathsize)) { /* Is JRE co-located with the application? */ JLI_Snprintf(javadll, sizeof(javadll), "%s\\bin\\" JAVA_DLL, path); @@ -307,20 +305,10 @@ GetJREPath(char *path, jint pathsize) JLI_TraceLauncher("JRE path is %s\n", path); return JNI_TRUE; } - /* ensure storage for path + \jre + NULL */ - if ((JLI_StrLen(path) + 4 + 1) > (size_t) pathsize) { - JLI_TraceLauncher("Insufficient space to store JRE path\n"); - return JNI_FALSE; - } - /* Does this app ship a private JRE in \jre directory? */ - JLI_Snprintf(javadll, sizeof (javadll), "%s\\jre\\bin\\" JAVA_DLL, path); - if (stat(javadll, &s) == 0) { - JLI_StrCat(path, "\\jre"); - JLI_TraceLauncher("JRE path is %s\n", path); - return JNI_TRUE; - } } + JLI_TraceLauncher("Attempt to get JRE path from shared lib of the image\n"); + /* Try getting path to JRE from path to JLI.DLL */ if (GetApplicationHomeFromDll(path, pathsize)) { JLI_Snprintf(javadll, sizeof(javadll), "%s\\bin\\" JAVA_DLL, path); @@ -330,14 +318,6 @@ GetJREPath(char *path, jint pathsize) } } -#ifdef USE_REGISTRY_LOOKUP - /* Lookup public JRE using Windows registry. */ - if (GetPublicJREHome(path, pathsize)) { - JLI_TraceLauncher("JRE path is %s\n", path); - return JNI_TRUE; - } -#endif - JLI_ReportErrorMessage(JRE_ERROR8 JAVA_DLL); return JNI_FALSE; } diff --git a/src/java.desktop/macosx/classes/sun/font/CStrike.java b/src/java.desktop/macosx/classes/sun/font/CStrike.java index eb049c3d449..b0131711ca5 100644 --- a/src/java.desktop/macosx/classes/sun/font/CStrike.java +++ b/src/java.desktop/macosx/classes/sun/font/CStrike.java @@ -199,7 +199,7 @@ void getGlyphImageBounds(int glyphCode, Point2D.Float pt, Rectangle result) { getGlyphImageBounds(glyphCode, pt.x, pt.y, floatRect); if (floatRect.width == 0 && floatRect.height == 0) { - result.setRect(0, 0, -1, -1); + result.setRect(0, 0, 0, 0); return; } diff --git a/src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m b/src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m index f6e8fe6af55..ecdd6e4cdf8 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m @@ -1020,4 +1020,20 @@ @implementation CGGI_GlyphCanvas CTFontGetAdvancesForGlyphs(font, kCTFontDefaultOrientation, glyphs, advances, count); } } -} \ No newline at end of file + int MAX_SIZE = 1 << 30; + if (bboxes) { + for (int i = 0; i < count; i++) { + if (bboxes[i].origin.x > (double)MAX_SIZE) bboxes[i].origin.x = 0; + if (bboxes[i].origin.y > (double)MAX_SIZE) bboxes[i].origin.y = 0; + if (bboxes[i].size.width > (double)MAX_SIZE) bboxes[i].size.width = 0; + if (bboxes[i].size.height > (double)MAX_SIZE) bboxes[i].size.height = 0; + } + } + if (advances) { + for (int i = 0; i < count; i++) { + if (advances[i].width > (double)MAX_SIZE) advances[i].width = 0; + if (advances[i].height > (double)MAX_SIZE) advances[i].height = 0; + } + } +} + diff --git a/src/java.desktop/share/classes/com/sun/media/sound/StandardMidiFileReader.java b/src/java.desktop/share/classes/com/sun/media/sound/StandardMidiFileReader.java index fb24eca6611..de2a8b6306b 100644 --- a/src/java.desktop/share/classes/com/sun/media/sound/StandardMidiFileReader.java +++ b/src/java.desktop/share/classes/com/sun/media/sound/StandardMidiFileReader.java @@ -313,10 +313,10 @@ void readTrack(Track track) throws IOException, InvalidMidiDataException { // reset current tick to 0 long tick = 0; - // reset current status byte to 0 (invalid value). + // reset current running status byte to 0 (invalid value). // this should cause us to throw an InvalidMidiDataException if we don't // get a valid status byte from the beginning of the track. - int status = 0; + int runningStatus = 0; boolean endOfTrackFound = false; while (!trackFinished() && !endOfTrackFound) { @@ -333,10 +333,17 @@ void readTrack(Track track) throws IOException, InvalidMidiDataException { // check for new status int byteValue = readUnsigned(); + int status; if (byteValue >= 0x80) { status = byteValue; + + // update running status (only for channel messages) + if ((status & 0xF0) != 0xF0) { + runningStatus = status; + } } else { - data1 = byteValue; + status = runningStatus; + data1 = byteValue; } switch (status & 0xF0) { diff --git a/src/java.desktop/share/classes/sun/font/FileFontStrike.java b/src/java.desktop/share/classes/sun/font/FileFontStrike.java index ea2a1608f2d..bf98b8ca578 100644 --- a/src/java.desktop/share/classes/sun/font/FileFontStrike.java +++ b/src/java.desktop/share/classes/sun/font/FileFontStrike.java @@ -37,6 +37,7 @@ import java.awt.geom.Rectangle2D; import java.util.concurrent.ConcurrentHashMap; import static sun.awt.SunHints.*; +import sun.java2d.pipe.OutlineTextRenderer; public class FileFontStrike extends PhysicalStrike { @@ -107,6 +108,7 @@ public class FileFontStrike extends PhysicalStrike { boolean useNatives; NativeStrike[] nativeStrikes; + static final int MAX_IMAGE_SIZE = OutlineTextRenderer.THRESHHOLD; /* Used only for communication to native layer */ private int intPtSize; @@ -697,6 +699,20 @@ float getCodePointAdvance(int cp) { void getGlyphImageBounds(int glyphCode, Point2D.Float pt, Rectangle result) { + if (intPtSize > MAX_IMAGE_SIZE) { + Rectangle.Float obds = getGlyphOutlineBounds(glyphCode); + if (obds.isEmpty()) { + Rectangle bds = getGlyphOutline(glyphCode, pt.x, pt.y).getBounds(); + result.setBounds(bds); + } else { + result.x = (int)Math.floor(pt.x + obds.getX() + 0.5f); + result.y = (int)Math.floor(pt.y + obds.getY() + 0.5f); + result.width = (int)Math.floor(obds.getWidth() + 0.5f); + result.height = (int)Math.floor(obds.getHeight() + 0.5f); + } + return; + } + long ptr = getGlyphImagePtr(glyphCode); float topLeftX, topLeftY; diff --git a/src/java.desktop/share/classes/sun/font/HBShaper.java b/src/java.desktop/share/classes/sun/font/HBShaper.java index 90877623c2b..70e95cdc27b 100644 --- a/src/java.desktop/share/classes/sun/font/HBShaper.java +++ b/src/java.desktop/share/classes/sun/font/HBShaper.java @@ -168,22 +168,22 @@ private static VarHandle getVarHandle(StructLayout struct, String name) { SYM_LOOKUP = SymbolLookup.loaderLookup().or(LINKER.defaultLookup()); FunctionDescriptor mallocDescriptor = FunctionDescriptor.of(ADDRESS, JAVA_LONG); - Optional malloc_symbol = SYM_LOOKUP.find("malloc"); + MemorySegment malloc_symbol = SYM_LOOKUP.findOrThrow("malloc"); @SuppressWarnings("restricted") - MethodHandle tmp1 = LINKER.downcallHandle(malloc_symbol.get(), mallocDescriptor); + MethodHandle tmp1 = LINKER.downcallHandle(malloc_symbol, mallocDescriptor); malloc_handle = tmp1; FunctionDescriptor createFaceDescriptor = FunctionDescriptor.of(ADDRESS, ADDRESS); - Optional create_face_symbol = SYM_LOOKUP.find("HBCreateFace"); + MemorySegment create_face_symbol = SYM_LOOKUP.findOrThrow("HBCreateFace"); @SuppressWarnings("restricted") - MethodHandle tmp2 = LINKER.downcallHandle(create_face_symbol.get(), createFaceDescriptor); + MethodHandle tmp2 = LINKER.downcallHandle(create_face_symbol, createFaceDescriptor); create_face_handle = tmp2; FunctionDescriptor disposeFaceDescriptor = FunctionDescriptor.ofVoid(ADDRESS); - Optional dispose_face_symbol = SYM_LOOKUP.find("HBDisposeFace"); + MemorySegment dispose_face_symbol = SYM_LOOKUP.findOrThrow("HBDisposeFace"); @SuppressWarnings("restricted") - MethodHandle tmp3 = LINKER.downcallHandle(dispose_face_symbol.get(), disposeFaceDescriptor); + MethodHandle tmp3 = LINKER.downcallHandle(dispose_face_symbol, disposeFaceDescriptor); dispose_face_handle = tmp3; FunctionDescriptor shapeDesc = FunctionDescriptor.ofVoid( @@ -204,9 +204,9 @@ private static VarHandle getVarHandle(StructLayout struct, String name) { ADDRESS, // ptr to harfbuzz font_funcs object. ADDRESS); // store_results_fn - Optional shape_sym = SYM_LOOKUP.find("jdk_hb_shape"); + MemorySegment shape_sym = SYM_LOOKUP.findOrThrow("jdk_hb_shape"); @SuppressWarnings("restricted") - MethodHandle tmp4 = LINKER.downcallHandle(shape_sym.get(), shapeDesc); + MethodHandle tmp4 = LINKER.downcallHandle(shape_sym, shapeDesc); jdk_hb_shape_handle = tmp4; Arena garena = Arena.global(); // creating stubs that exist until VM exit. @@ -260,10 +260,10 @@ private static VarHandle getVarHandle(StructLayout struct, String name) { ADDRESS, // h_advance_fn upcall stub ADDRESS, // v_advance_fn upcall stub ADDRESS); // contour_pt_fn upcall stub - Optional create_font_funcs_symbol = SYM_LOOKUP.find("HBCreateFontFuncs"); + MemorySegment create_font_funcs_symbol = SYM_LOOKUP.findOrThrow("HBCreateFontFuncs"); @SuppressWarnings("restricted") MethodHandle create_font_funcs_handle = - LINKER.downcallHandle(create_font_funcs_symbol.get(), createFontFuncsDescriptor); + LINKER.downcallHandle(create_font_funcs_symbol, createFontFuncsDescriptor); MemorySegment s = null; try { diff --git a/src/java.desktop/share/legal/giflib.md b/src/java.desktop/share/legal/giflib.md index 0be4fb8226e..8b8fde8706d 100644 --- a/src/java.desktop/share/legal/giflib.md +++ b/src/java.desktop/share/legal/giflib.md @@ -1,4 +1,4 @@ -## GIFLIB v5.2.1 +## GIFLIB v5.2.2 ### GIFLIB License ``` @@ -24,7 +24,27 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -https://sourceforge.net/p/giflib/code/ci/master/tree/openbsd-reallocarray.c +tree/README -Copyright (c) 2008 Otto Moerbeek +== Authors == + +Gershon Elber +original giflib code + +Toshio Kuratomi +uncompressed gif writing code +former maintainer + +Eric Raymond +current as well as long time former maintainer of giflib code + +There have been many other contributors; see the attributions in the +version-control history to learn more. + + +tree/openbsd-reallocarray.c + +Copyright (C) 2008 Otto Moerbeek SPDX-License-Identifier: MIT + +``` diff --git a/src/java.desktop/share/legal/libpng.md b/src/java.desktop/share/legal/libpng.md index f420ccd94ed..cbffed81332 100644 --- a/src/java.desktop/share/legal/libpng.md +++ b/src/java.desktop/share/legal/libpng.md @@ -1,4 +1,4 @@ -## libpng v1.6.40 +## libpng v1.6.43 ### libpng License
      @@ -9,11 +9,11 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
       PNG Reference Library License version 2
       ---------------------------------------
       
      -Copyright (c) 1995-2023 The PNG Reference Library Authors.
      -Copyright (c) 2018-2023 Cosmin Truta
      -Copyright (c) 1998-2018 Glenn Randers-Pehrson
      -Copyright (c) 1996-1997 Andreas Dilger
      -Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      +Copyright (C) 1995-2024 The PNG Reference Library Authors.
      +Copyright (C) 2018-2024 Cosmin Truta
      +Copyright (C) 1998-2018 Glenn Randers-Pehrson
      +Copyright (C) 1996-1997 Andreas Dilger
      +Copyright (C) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
       
       The software is supplied "as is", without warranty of any kind,
       express or implied, including, without limitation, the warranties
      @@ -157,7 +157,9 @@ PNG REFERENCE LIBRARY AUTHORS
       This is the list of PNG Reference Library ("libpng") Contributing
       Authors, for copyright and licensing purposes.
       
      + * Adam Richter
        * Andreas Dilger
      + * Chris Blume
        * Cosmin Truta
        * Dave Martindale
        * Eric S. Raymond
      @@ -186,21 +188,28 @@ Authors, for copyright and licensing purposes.
        * Vadim Barkov
        * Willem van Schaik
        * Zhijie Liang
      + * Apple Inc.
      +    - Zixu Wang (王子旭)
        * Arm Holdings
      -   - Richard Townsend
      +    - Richard Townsend
        * Google Inc.
      -   - Dan Field
      -   - Leon Scroggins III
      -   - Matt Sarett
      -   - Mike Klein
      -   - Sami Boukortt
      -   - Wan-Teh Chang
      +    - Dan Field
      +    - Leon Scroggins III
      +    - Matt Sarett
      +    - Mike Klein
      +    - Sami Boukortt
      +    - Wan-Teh Chang
      + * Loongson Technology Corporation Ltd.
      +    - GuXiWei (顾希伟)
      +    - JinBo (金波)
      +    - ZhangLixia (张利霞)
       
       The build projects, the build scripts, the test scripts, and other
      -files in the "ci", "projects", "scripts" and "tests" directories, have
      +files in the "projects", "scripts" and "tests" directories, have
       other copyright owners, but are released under the libpng license.
       
      -Some files in the "contrib" directory, and some tools-generated files
      -that are distributed with libpng, have other copyright owners, and are
      -released under other open source licenses.
      +Some files in the "ci" and "contrib" directories, as well as some
      +of the tools-generated files that are distributed with libpng, have
      +other copyright owners, and are released under other open source
      +licenses.
       ```
      diff --git a/src/java.desktop/share/native/libfontmanager/freetypeScaler.c b/src/java.desktop/share/native/libfontmanager/freetypeScaler.c
      index 21ac280f0fb..f9ebacad66b 100644
      --- a/src/java.desktop/share/native/libfontmanager/freetypeScaler.c
      +++ b/src/java.desktop/share/native/libfontmanager/freetypeScaler.c
      @@ -504,6 +504,8 @@ static double euclidianDistance(double a, double b) {
           return sqrt(a*a+b*b);
       }
       
      +#define TOO_LARGE(a, b) (abs((int)(a / b)) > 32766)
      +
       JNIEXPORT jlong JNICALL
       Java_sun_font_FreetypeFontScaler_createScalerContextNative(
               JNIEnv *env, jobject scaler, jlong pScaler, jdoubleArray matrix,
      @@ -515,6 +517,7 @@ Java_sun_font_FreetypeFontScaler_createScalerContextNative(
                    (FTScalerInfo*) jlong_to_ptr(pScaler);
       
           if (context == NULL) {
      +        free(context);
               invalidateJavaScaler(env, scaler, NULL);
               return (jlong) 0;
           }
      @@ -524,7 +527,18 @@ Java_sun_font_FreetypeFontScaler_createScalerContextNative(
               //text can not be smaller than 1 point
               ptsz = 1.0;
           }
      +    if (ptsz > 16384) {
      +        ptsz = 16384;    // far enough from 32767
      +        fm = TEXT_FM_ON; // avoids calculations which might overflow
      +    }
           context->ptsz = (int)(ptsz * 64);
      +    if (TOO_LARGE(dmat[0], ptsz) || TOO_LARGE(dmat[1], ptsz) ||
      +        TOO_LARGE(dmat[2], ptsz) || TOO_LARGE(dmat[3], ptsz))
      +    {
      +        free(context);
      +        return (jlong)0;
      +    }
      +
           context->transform.xx =  FloatToFTFixed((float)(dmat[0]/ptsz));
           context->transform.yx = -FloatToFTFixed((float)(dmat[1]/ptsz));
           context->transform.xy = -FloatToFTFixed((float)(dmat[2]/ptsz));
      diff --git a/src/java.desktop/share/native/libsplashscreen/giflib/dgif_lib.c b/src/java.desktop/share/native/libsplashscreen/giflib/dgif_lib.c
      index 6ddfb46060d..0b2860b4b50 100644
      --- a/src/java.desktop/share/native/libsplashscreen/giflib/dgif_lib.c
      +++ b/src/java.desktop/share/native/libsplashscreen/giflib/dgif_lib.c
      @@ -34,11 +34,11 @@ SPDX-License-Identifier: MIT
       
       *****************************************************************************/
       
      -#include 
      +#include 
       #include 
       #include 
      -#include 
       #include 
      +#include 
       #include 
       
       #ifdef _WIN32
      @@ -55,18 +55,19 @@ SPDX-License-Identifier: MIT
       
       /* avoid extra function call in case we use fread (TVT) */
       static int InternalRead(GifFileType *gif, GifByteType *buf, int len) {
      -    //fprintf(stderr, "### Read: %d\n", len);
      -    return
      -    (((GifFilePrivateType*)gif->Private)->Read ?
      -     ((GifFilePrivateType*)gif->Private)->Read(gif,buf,len) :
      -     fread(buf,1,len,((GifFilePrivateType*)gif->Private)->File));
      +    // fprintf(stderr, "### Read: %d\n", len);
      +    return (((GifFilePrivateType *)gif->Private)->Read
      +                ? ((GifFilePrivateType *)gif->Private)->Read(gif, buf, len)
      +                : fread(buf, 1, len,
      +                        ((GifFilePrivateType *)gif->Private)->File));
       }
       
       static int DGifGetWord(GifFileType *GifFile, GifWord *Word);
       static int DGifSetupDecompress(GifFileType *GifFile);
       static int DGifDecompressLine(GifFileType *GifFile, GifPixelType *Line,
                                     int LineLen);
      -static int DGifGetPrefixChar(GifPrefixType *Prefix, int Code, int ClearCode);
      +static int DGifGetPrefixChar(const GifPrefixType *Prefix, int Code,
      +                             int ClearCode);
       static int DGifDecompressInput(GifFileType *GifFile, int *Code);
       static int DGifBufferedInput(GifFileType *GifFile, GifByteType *Buf,
                                    GifByteType *NextByte);
      @@ -76,15 +77,14 @@ static int DGifBufferedInput(GifFileType *GifFile, GifByteType *Buf,
        Returns dynamically allocated GifFileType pointer which serves as the GIF
        info record.
       ******************************************************************************/
      -GifFileType *
      -DGifOpenFileName(const char *FileName, int *Error)
      -{
      +GifFileType *DGifOpenFileName(const char *FileName, int *Error) {
           int FileHandle;
           GifFileType *GifFile;
       
           if ((FileHandle = open(FileName, O_RDONLY)) == -1) {
      -        if (Error != NULL)
      +        if (Error != NULL) {
                   *Error = D_GIF_ERR_OPEN_FAILED;
      +        }
               return NULL;
           }
       
      @@ -97,9 +97,7 @@ DGifOpenFileName(const char *FileName, int *Error)
        Returns dynamically allocated GifFileType pointer which serves as the GIF
        info record.
       ******************************************************************************/
      -GifFileType *
      -DGifOpenFileHandle(int FileHandle, int *Error)
      -{
      +GifFileType *DGifOpenFileHandle(int FileHandle, int *Error) {
           char Buf[GIF_STAMP_LEN + 1];
           GifFileType *GifFile;
           GifFilePrivateType *Private;
      @@ -107,13 +105,14 @@ DGifOpenFileHandle(int FileHandle, int *Error)
       
           GifFile = (GifFileType *)malloc(sizeof(GifFileType));
           if (GifFile == NULL) {
      -        if (Error != NULL)
      +        if (Error != NULL) {
                   *Error = D_GIF_ERR_NOT_ENOUGH_MEM;
      +        }
               (void)close(FileHandle);
               return NULL;
           }
       
      -    /*@i1@*/memset(GifFile, '\0', sizeof(GifFileType));
      +    /*@i1@*/ memset(GifFile, '\0', sizeof(GifFileType));
       
           /* Belt and suspenders, in case the null pointer isn't zero */
           GifFile->SavedImages = NULL;
      @@ -121,35 +120,38 @@ DGifOpenFileHandle(int FileHandle, int *Error)
       
           Private = (GifFilePrivateType *)calloc(1, sizeof(GifFilePrivateType));
           if (Private == NULL) {
      -        if (Error != NULL)
      +        if (Error != NULL) {
                   *Error = D_GIF_ERR_NOT_ENOUGH_MEM;
      +        }
               (void)close(FileHandle);
               free((char *)GifFile);
               return NULL;
           }
       
      -    /*@i1@*/memset(Private, '\0', sizeof(GifFilePrivateType));
      +    /*@i1@*/ memset(Private, '\0', sizeof(GifFilePrivateType));
       
       #ifdef _WIN32
      -    _setmode(FileHandle, O_BINARY);    /* Make sure it is in binary mode. */
      -#endif /* _WIN32 */
      +    _setmode(FileHandle, O_BINARY); /* Make sure it is in binary mode. */
      +#endif                                  /* _WIN32 */
       
      -    f = fdopen(FileHandle, "rb");    /* Make it into a stream: */
      +    f = fdopen(FileHandle, "rb"); /* Make it into a stream: */
       
           /*@-mustfreeonly@*/
           GifFile->Private = (void *)Private;
           Private->FileHandle = FileHandle;
           Private->File = f;
           Private->FileState = FILE_STATE_READ;
      -    Private->Read = NULL;        /* don't use alternate input method (TVT) */
      -    GifFile->UserData = NULL;    /* TVT */
      +    Private->Read = NULL;     /* don't use alternate input method (TVT) */
      +    GifFile->UserData = NULL; /* TVT */
           /*@=mustfreeonly@*/
       
           /* Let's see if this is a GIF file: */
           /* coverity[check_return] */
      -    if (InternalRead(GifFile, (unsigned char *)Buf, GIF_STAMP_LEN) != GIF_STAMP_LEN) {
      -        if (Error != NULL)
      +    if (InternalRead(GifFile, (unsigned char *)Buf, GIF_STAMP_LEN) !=
      +        GIF_STAMP_LEN) {
      +        if (Error != NULL) {
                   *Error = D_GIF_ERR_READ_FAILED;
      +        }
               (void)fclose(f);
               free((char *)Private);
               free((char *)GifFile);
      @@ -159,8 +161,9 @@ DGifOpenFileHandle(int FileHandle, int *Error)
           /* Check for GIF prefix at start of file */
           Buf[GIF_STAMP_LEN] = 0;
           if (strncmp(GIF_STAMP, Buf, GIF_VERSION_POS) != 0) {
      -        if (Error != NULL)
      +        if (Error != NULL) {
                   *Error = D_GIF_ERR_NOT_GIF_FILE;
      +        }
               (void)fclose(f);
               free((char *)Private);
               free((char *)GifFile);
      @@ -177,7 +180,7 @@ DGifOpenFileHandle(int FileHandle, int *Error)
           GifFile->Error = 0;
       
           /* What version of GIF? */
      -    Private->gif89 = (Buf[GIF_VERSION_POS] == '9');
      +    Private->gif89 = (Buf[GIF_VERSION_POS + 1] == '9');
       
           return GifFile;
       }
      @@ -185,17 +188,16 @@ DGifOpenFileHandle(int FileHandle, int *Error)
       /******************************************************************************
        GifFileType constructor with user supplied input function (TVT)
       ******************************************************************************/
      -GifFileType *
      -DGifOpen(void *userData, InputFunc readFunc, int *Error)
      -{
      +GifFileType *DGifOpen(void *userData, InputFunc readFunc, int *Error) {
           char Buf[GIF_STAMP_LEN + 1];
           GifFileType *GifFile;
           GifFilePrivateType *Private;
       
           GifFile = (GifFileType *)malloc(sizeof(GifFileType));
           if (GifFile == NULL) {
      -        if (Error != NULL)
      +        if (Error != NULL) {
                   *Error = D_GIF_ERR_NOT_ENOUGH_MEM;
      +        }
               return NULL;
           }
       
      @@ -207,26 +209,29 @@ DGifOpen(void *userData, InputFunc readFunc, int *Error)
       
           Private = (GifFilePrivateType *)calloc(1, sizeof(GifFilePrivateType));
           if (!Private) {
      -        if (Error != NULL)
      +        if (Error != NULL) {
                   *Error = D_GIF_ERR_NOT_ENOUGH_MEM;
      +        }
               free((char *)GifFile);
               return NULL;
           }
      -    /*@i1@*/memset(Private, '\0', sizeof(GifFilePrivateType));
      +    /*@i1@*/ memset(Private, '\0', sizeof(GifFilePrivateType));
       
           GifFile->Private = (void *)Private;
           Private->FileHandle = 0;
           Private->File = NULL;
           Private->FileState = FILE_STATE_READ;
       
      -    Private->Read = readFunc;    /* TVT */
      -    GifFile->UserData = userData;    /* TVT */
      +    Private->Read = readFunc;     /* TVT */
      +    GifFile->UserData = userData; /* TVT */
       
           /* Lets see if this is a GIF file: */
           /* coverity[check_return] */
      -    if (InternalRead(GifFile, (unsigned char *)Buf, GIF_STAMP_LEN) != GIF_STAMP_LEN) {
      -        if (Error != NULL)
      +    if (InternalRead(GifFile, (unsigned char *)Buf, GIF_STAMP_LEN) !=
      +        GIF_STAMP_LEN) {
      +        if (Error != NULL) {
                   *Error = D_GIF_ERR_READ_FAILED;
      +        }
               free((char *)Private);
               free((char *)GifFile);
               return NULL;
      @@ -235,8 +240,9 @@ DGifOpen(void *userData, InputFunc readFunc, int *Error)
           /* Check for GIF prefix at start of file */
           Buf[GIF_STAMP_LEN] = '\0';
           if (strncmp(GIF_STAMP, Buf, GIF_VERSION_POS) != 0) {
      -        if (Error != NULL)
      +        if (Error != NULL) {
                   *Error = D_GIF_ERR_NOT_GIF_FILE;
      +        }
               free((char *)Private);
               free((char *)GifFile);
               return NULL;
      @@ -245,15 +251,16 @@ DGifOpen(void *userData, InputFunc readFunc, int *Error)
           if (DGifGetScreenDesc(GifFile) == GIF_ERROR) {
               free((char *)Private);
               free((char *)GifFile);
      -        if (Error != NULL)
      +        if (Error != NULL) {
                   *Error = D_GIF_ERR_NO_SCRN_DSCR;
      +        }
               return NULL;
           }
       
           GifFile->Error = 0;
       
           /* What version of GIF? */
      -    Private->gif89 = (Buf[GIF_VERSION_POS] == '9');
      +    Private->gif89 = (Buf[GIF_VERSION_POS + 1] == '9');
       
           return GifFile;
       }
      @@ -262,9 +269,7 @@ DGifOpen(void *userData, InputFunc readFunc, int *Error)
        This routine should be called before any other DGif calls. Note that
        this routine is called automatically from DGif file open routines.
       ******************************************************************************/
      -int
      -DGifGetScreenDesc(GifFileType *GifFile)
      -{
      +int DGifGetScreenDesc(GifFileType *GifFile) {
           int BitsPerPixel;
           bool SortFlag;
           GifByteType Buf[3];
      @@ -278,8 +283,9 @@ DGifGetScreenDesc(GifFileType *GifFile)
       
           /* Put the screen descriptor into the file: */
           if (DGifGetWord(GifFile, &GifFile->SWidth) == GIF_ERROR ||
      -        DGifGetWord(GifFile, &GifFile->SHeight) == GIF_ERROR)
      +        DGifGetWord(GifFile, &GifFile->SHeight) == GIF_ERROR) {
               return GIF_ERROR;
      +    }
       
           if (InternalRead(GifFile, Buf, 3) != 3) {
               GifFile->Error = D_GIF_ERR_READ_FAILED;
      @@ -292,7 +298,7 @@ DGifGetScreenDesc(GifFileType *GifFile)
           BitsPerPixel = (Buf[0] & 0x07) + 1;
           GifFile->SBackGroundColor = Buf[1];
           GifFile->AspectByte = Buf[2];
      -    if (Buf[0] & 0x80) {    /* Do we have global color map? */
      +    if (Buf[0] & 0x80) { /* Do we have global color map? */
               int i;
       
               GifFile->SColorMap = GifMakeMapObject(1 << BitsPerPixel, NULL);
      @@ -327,23 +333,20 @@ DGifGetScreenDesc(GifFileType *GifFile)
           return GIF_OK;
       }
       
      -const char *
      -DGifGetGifVersion(GifFileType *GifFile)
      -{
      -    GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private;
      +const char *DGifGetGifVersion(GifFileType *GifFile) {
      +    GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
       
      -    if (Private->gif89)
      +    if (Private->gif89) {
               return GIF89_STAMP;
      -    else
      +    } else {
               return GIF87_STAMP;
      +    }
       }
       
       /******************************************************************************
        This routine should be called before any attempt to read an image.
       ******************************************************************************/
      -int
      -DGifGetRecordType(GifFileType *GifFile, GifRecordType* Type)
      -{
      +int DGifGetRecordType(GifFileType *GifFile, GifRecordType *Type) {
           GifByteType Buf;
           GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
       
      @@ -359,29 +362,27 @@ DGifGetRecordType(GifFileType *GifFile, GifRecordType* Type)
               return GIF_ERROR;
           }
       
      -    //fprintf(stderr, "### DGifGetRecordType: %02x\n", Buf);
      +    // fprintf(stderr, "### DGifGetRecordType: %02x\n", Buf);
           switch (Buf) {
      -      case DESCRIPTOR_INTRODUCER:
      -          *Type = IMAGE_DESC_RECORD_TYPE;
      -          break;
      -      case EXTENSION_INTRODUCER:
      -          *Type = EXTENSION_RECORD_TYPE;
      -          break;
      -      case TERMINATOR_INTRODUCER:
      -          *Type = TERMINATE_RECORD_TYPE;
      -          break;
      -      default:
      -          *Type = UNDEFINED_RECORD_TYPE;
      -          GifFile->Error = D_GIF_ERR_WRONG_RECORD;
      -          return GIF_ERROR;
      +    case DESCRIPTOR_INTRODUCER:
      +        *Type = IMAGE_DESC_RECORD_TYPE;
      +        break;
      +    case EXTENSION_INTRODUCER:
      +        *Type = EXTENSION_RECORD_TYPE;
      +        break;
      +    case TERMINATOR_INTRODUCER:
      +        *Type = TERMINATE_RECORD_TYPE;
      +        break;
      +    default:
      +        *Type = UNDEFINED_RECORD_TYPE;
      +        GifFile->Error = D_GIF_ERR_WRONG_RECORD;
      +        return GIF_ERROR;
           }
       
           return GIF_OK;
       }
       
      -int
      -DGifGetImageHeader(GifFileType *GifFile)
      -{
      +int DGifGetImageHeader(GifFileType *GifFile) {
           unsigned int BitsPerPixel;
           GifByteType Buf[3];
           GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
      @@ -395,8 +396,9 @@ DGifGetImageHeader(GifFileType *GifFile)
           if (DGifGetWord(GifFile, &GifFile->Image.Left) == GIF_ERROR ||
               DGifGetWord(GifFile, &GifFile->Image.Top) == GIF_ERROR ||
               DGifGetWord(GifFile, &GifFile->Image.Width) == GIF_ERROR ||
      -        DGifGetWord(GifFile, &GifFile->Image.Height) == GIF_ERROR)
      +        DGifGetWord(GifFile, &GifFile->Image.Height) == GIF_ERROR) {
               return GIF_ERROR;
      +    }
           if (InternalRead(GifFile, Buf, 1) != 1) {
               GifFile->Error = D_GIF_ERR_READ_FAILED;
               GifFreeMapObject(GifFile->Image.ColorMap);
      @@ -415,7 +417,8 @@ DGifGetImageHeader(GifFileType *GifFile)
           if (Buf[0] & 0x80) {
               unsigned int i;
       
      -        GifFile->Image.ColorMap = GifMakeMapObject(1 << BitsPerPixel, NULL);
      +        GifFile->Image.ColorMap =
      +            GifMakeMapObject(1 << BitsPerPixel, NULL);
               if (GifFile->Image.ColorMap == NULL) {
                   GifFile->Error = D_GIF_ERR_NOT_ENOUGH_MEM;
                   return GIF_ERROR;
      @@ -436,8 +439,8 @@ DGifGetImageHeader(GifFileType *GifFile)
               }
           }
       
      -    Private->PixelCount = (long)GifFile->Image.Width *
      -       (long)GifFile->Image.Height;
      +    Private->PixelCount =
      +        (long)GifFile->Image.Width * (long)GifFile->Image.Height;
       
           /* Reset decompress algorithm parameters. */
           return DGifSetupDecompress(GifFile);
      @@ -447,9 +450,7 @@ DGifGetImageHeader(GifFileType *GifFile)
        This routine should be called before any attempt to read an image.
        Note it is assumed the Image desc. header has been read.
       ******************************************************************************/
      -int
      -DGifGetImageDesc(GifFileType *GifFile)
      -{
      +int DGifGetImageDesc(GifFileType *GifFile) {
           GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
           SavedImage *sp;
       
      @@ -464,9 +465,9 @@ DGifGetImageDesc(GifFileType *GifFile)
           }
       
           if (GifFile->SavedImages) {
      -        SavedImage* new_saved_images =
      -            (SavedImage *)reallocarray(GifFile->SavedImages,
      -                            (GifFile->ImageCount + 1), sizeof(SavedImage));
      +        SavedImage *new_saved_images = (SavedImage *)reallocarray(
      +            GifFile->SavedImages, (GifFile->ImageCount + 1),
      +            sizeof(SavedImage));
               if (new_saved_images == NULL) {
                   GifFile->Error = D_GIF_ERR_NOT_ENOUGH_MEM;
                   return GIF_ERROR;
      @@ -474,7 +475,7 @@ DGifGetImageDesc(GifFileType *GifFile)
               GifFile->SavedImages = new_saved_images;
           } else {
               if ((GifFile->SavedImages =
      -             (SavedImage *) malloc(sizeof(SavedImage))) == NULL) {
      +                 (SavedImage *)malloc(sizeof(SavedImage))) == NULL) {
                   GifFile->Error = D_GIF_ERR_NOT_ENOUGH_MEM;
                   return GIF_ERROR;
               }
      @@ -483,9 +484,9 @@ DGifGetImageDesc(GifFileType *GifFile)
           sp = &GifFile->SavedImages[GifFile->ImageCount];
           memcpy(&sp->ImageDesc, &GifFile->Image, sizeof(GifImageDesc));
           if (GifFile->Image.ColorMap != NULL) {
      -        sp->ImageDesc.ColorMap = GifMakeMapObject(
      -                                 GifFile->Image.ColorMap->ColorCount,
      -                                 GifFile->Image.ColorMap->Colors);
      +        sp->ImageDesc.ColorMap =
      +            GifMakeMapObject(GifFile->Image.ColorMap->ColorCount,
      +                             GifFile->Image.ColorMap->Colors);
               if (sp->ImageDesc.ColorMap == NULL) {
                   GifFile->Error = D_GIF_ERR_NOT_ENOUGH_MEM;
                   return GIF_ERROR;
      @@ -493,7 +494,7 @@ DGifGetImageDesc(GifFileType *GifFile)
           }
           sp->RasterBits = (unsigned char *)NULL;
           sp->ExtensionBlockCount = 0;
      -    sp->ExtensionBlocks = (ExtensionBlock *) NULL;
      +    sp->ExtensionBlocks = (ExtensionBlock *)NULL;
       
           GifFile->ImageCount++;
       
      @@ -503,11 +504,9 @@ DGifGetImageDesc(GifFileType *GifFile)
       /******************************************************************************
        Get one full scanned line (Line) of length LineLen from GIF file.
       ******************************************************************************/
      -int
      -DGifGetLine(GifFileType *GifFile, GifPixelType *Line, int LineLen)
      -{
      +int DGifGetLine(GifFileType *GifFile, GifPixelType *Line, int LineLen) {
           GifByteType *Dummy;
      -    GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private;
      +    GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
       
           if (!IS_READABLE(Private)) {
               /* This file was NOT open for reading: */
      @@ -515,8 +514,9 @@ DGifGetLine(GifFileType *GifFile, GifPixelType *Line, int LineLen)
               return GIF_ERROR;
           }
       
      -    if (!LineLen)
      +    if (!LineLen) {
               LineLen = GifFile->Image.Width;
      +    }
       
           if ((Private->PixelCount -= LineLen) > 0xffff0000UL) {
               GifFile->Error = D_GIF_ERR_DATA_TOO_BIG;
      @@ -525,56 +525,59 @@ DGifGetLine(GifFileType *GifFile, GifPixelType *Line, int LineLen)
       
           if (DGifDecompressLine(GifFile, Line, LineLen) == GIF_OK) {
               if (Private->PixelCount == 0) {
      -            /* We probably won't be called any more, so let's clean up
      -             * everything before we return: need to flush out all the
      -             * rest of image until an empty block (size 0)
      +            /* We probably won't be called any more, so let's clean
      +             * up everything before we return: need to flush out all
      +             * the rest of image until an empty block (size 0)
                    * detected. We use GetCodeNext.
                    */
      -            do
      -                if (DGifGetCodeNext(GifFile, &Dummy) == GIF_ERROR)
      +            do {
      +                if (DGifGetCodeNext(GifFile, &Dummy) ==
      +                    GIF_ERROR) {
                           return GIF_ERROR;
      -            while (Dummy != NULL) ;
      +                }
      +            } while (Dummy != NULL);
               }
               return GIF_OK;
      -    } else
      +    } else {
               return GIF_ERROR;
      +    }
       }
       
       /******************************************************************************
        Put one pixel (Pixel) into GIF file.
       ******************************************************************************/
      -int
      -DGifGetPixel(GifFileType *GifFile, GifPixelType Pixel)
      -{
      +int DGifGetPixel(GifFileType *GifFile, GifPixelType Pixel) {
           GifByteType *Dummy;
      -    GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private;
      +    GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
       
           if (!IS_READABLE(Private)) {
               /* This file was NOT open for reading: */
               GifFile->Error = D_GIF_ERR_NOT_READABLE;
               return GIF_ERROR;
           }
      -    if (--Private->PixelCount > 0xffff0000UL)
      -    {
      +    if (--Private->PixelCount > 0xffff0000UL) {
               GifFile->Error = D_GIF_ERR_DATA_TOO_BIG;
               return GIF_ERROR;
           }
       
           if (DGifDecompressLine(GifFile, &Pixel, 1) == GIF_OK) {
               if (Private->PixelCount == 0) {
      -            /* We probably won't be called any more, so let's clean up
      -             * everything before we return: need to flush out all the
      -             * rest of image until an empty block (size 0)
      +            /* We probably won't be called any more, so let's clean
      +             * up everything before we return: need to flush out all
      +             * the rest of image until an empty block (size 0)
                    * detected. We use GetCodeNext.
                    */
      -            do
      -                if (DGifGetCodeNext(GifFile, &Dummy) == GIF_ERROR)
      +            do {
      +                if (DGifGetCodeNext(GifFile, &Dummy) ==
      +                    GIF_ERROR) {
                           return GIF_ERROR;
      -            while (Dummy != NULL) ;
      +                }
      +            } while (Dummy != NULL);
               }
               return GIF_OK;
      -    } else
      +    } else {
               return GIF_ERROR;
      +    }
       }
       
       /******************************************************************************
      @@ -584,13 +587,12 @@ DGifGetPixel(GifFileType *GifFile, GifPixelType Pixel)
        The Extension should NOT be freed by the user (not dynamically allocated).
        Note it is assumed the Extension description header has been read.
       ******************************************************************************/
      -int
      -DGifGetExtension(GifFileType *GifFile, int *ExtCode, GifByteType **Extension)
      -{
      +int DGifGetExtension(GifFileType *GifFile, int *ExtCode,
      +                     GifByteType **Extension) {
           GifByteType Buf;
           GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
       
      -    //fprintf(stderr, "### -> DGifGetExtension:\n");
      +    // fprintf(stderr, "### -> DGifGetExtension:\n");
           if (!IS_READABLE(Private)) {
               /* This file was NOT open for reading: */
               GifFile->Error = D_GIF_ERR_NOT_READABLE;
      @@ -603,7 +605,8 @@ DGifGetExtension(GifFileType *GifFile, int *ExtCode, GifByteType **Extension)
               return GIF_ERROR;
           }
           *ExtCode = Buf;
      -    //fprintf(stderr, "### <- DGifGetExtension: %02x, about to call next\n", Buf);
      +    // fprintf(stderr, "### <- DGifGetExtension: %02x, about to call
      +    // next\n", Buf);
       
           return DGifGetExtensionNext(GifFile, Extension);
       }
      @@ -613,30 +616,30 @@ DGifGetExtension(GifFileType *GifFile, int *ExtCode, GifByteType **Extension)
        routine should be called until NULL Extension is returned.
        The Extension should NOT be freed by the user (not dynamically allocated).
       ******************************************************************************/
      -int
      -DGifGetExtensionNext(GifFileType *GifFile, GifByteType ** Extension)
      -{
      +int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **Extension) {
           GifByteType Buf;
           GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
       
      -    //fprintf(stderr, "### -> DGifGetExtensionNext\n");
      +    // fprintf(stderr, "### -> DGifGetExtensionNext\n");
           if (InternalRead(GifFile, &Buf, 1) != 1) {
               GifFile->Error = D_GIF_ERR_READ_FAILED;
               return GIF_ERROR;
           }
      -    //fprintf(stderr, "### DGifGetExtensionNext sees %d\n", Buf);
      +    // fprintf(stderr, "### DGifGetExtensionNext sees %d\n", Buf);
       
           if (Buf > 0) {
      -        *Extension = Private->Buf;    /* Use private unused buffer. */
      -        (*Extension)[0] = Buf;  /* Pascal strings notation (pos. 0 is len.). */
      -        /* coverity[tainted_data,check_return] */
      +        *Extension = Private->Buf; /* Use private unused buffer. */
      +        (*Extension)[0] =
      +            Buf; /* Pascal strings notation (pos. 0 is len.). */
      +                 /* coverity[tainted_data,check_return] */
               if (InternalRead(GifFile, &((*Extension)[1]), Buf) != Buf) {
                   GifFile->Error = D_GIF_ERR_READ_FAILED;
                   return GIF_ERROR;
               }
      -    } else
      +    } else {
               *Extension = NULL;
      -    //fprintf(stderr, "### <- DGifGetExtensionNext: %p\n", Extension);
      +    }
      +    // fprintf(stderr, "### <- DGifGetExtensionNext: %p\n", Extension);
       
           return GIF_OK;
       }
      @@ -647,19 +650,20 @@ DGifGetExtensionNext(GifFileType *GifFile, GifByteType ** Extension)
       
       int DGifExtensionToGCB(const size_t GifExtensionLength,
                              const GifByteType *GifExtension,
      -                       GraphicsControlBlock *GCB)
      -{
      +                       GraphicsControlBlock *GCB) {
           if (GifExtensionLength != 4) {
               return GIF_ERROR;
           }
       
           GCB->DisposalMode = (GifExtension[0] >> 2) & 0x07;
           GCB->UserInputFlag = (GifExtension[0] & 0x02) != 0;
      -    GCB->DelayTime = UNSIGNED_LITTLE_ENDIAN(GifExtension[1], GifExtension[2]);
      -    if (GifExtension[0] & 0x01)
      +    GCB->DelayTime =
      +        UNSIGNED_LITTLE_ENDIAN(GifExtension[1], GifExtension[2]);
      +    if (GifExtension[0] & 0x01) {
               GCB->TransparentColor = (int)GifExtension[3];
      -    else
      +    } else {
               GCB->TransparentColor = NO_TRANSPARENT_COLOR;
      +    }
       
           return GIF_OK;
       }
      @@ -668,23 +672,27 @@ int DGifExtensionToGCB(const size_t GifExtensionLength,
        Extract the Graphics Control Block for a saved image, if it exists.
       ******************************************************************************/
       
      -int DGifSavedExtensionToGCB(GifFileType *GifFile,
      -                int ImageIndex, GraphicsControlBlock *GCB)
      -{
      +int DGifSavedExtensionToGCB(GifFileType *GifFile, int ImageIndex,
      +                            GraphicsControlBlock *GCB) {
           int i;
       
      -    if (ImageIndex < 0 || ImageIndex > GifFile->ImageCount - 1)
      +    if (ImageIndex < 0 || ImageIndex > GifFile->ImageCount - 1) {
               return GIF_ERROR;
      +    }
       
           GCB->DisposalMode = DISPOSAL_UNSPECIFIED;
           GCB->UserInputFlag = false;
           GCB->DelayTime = 0;
           GCB->TransparentColor = NO_TRANSPARENT_COLOR;
       
      -    for (i = 0; i < GifFile->SavedImages[ImageIndex].ExtensionBlockCount; i++) {
      -        ExtensionBlock *ep = &GifFile->SavedImages[ImageIndex].ExtensionBlocks[i];
      -        if (ep->Function == GRAPHICS_EXT_FUNC_CODE)
      -            return DGifExtensionToGCB(ep->ByteCount, ep->Bytes, GCB);
      +    for (i = 0; i < GifFile->SavedImages[ImageIndex].ExtensionBlockCount;
      +         i++) {
      +        ExtensionBlock *ep =
      +            &GifFile->SavedImages[ImageIndex].ExtensionBlocks[i];
      +        if (ep->Function == GRAPHICS_EXT_FUNC_CODE) {
      +            return DGifExtensionToGCB(ep->ByteCount, ep->Bytes,
      +                                      GCB);
      +        }
           }
       
           return GIF_ERROR;
      @@ -693,13 +701,12 @@ int DGifSavedExtensionToGCB(GifFileType *GifFile,
       /******************************************************************************
        This routine should be called last, to close the GIF file.
       ******************************************************************************/
      -int
      -DGifCloseFile(GifFileType *GifFile, int *ErrorCode)
      -{
      +int DGifCloseFile(GifFileType *GifFile, int *ErrorCode) {
           GifFilePrivateType *Private;
       
      -    if (GifFile == NULL || GifFile->Private == NULL)
      +    if (GifFile == NULL || GifFile->Private == NULL) {
               return GIF_ERROR;
      +    }
       
           if (GifFile->Image.ColorMap) {
               GifFreeMapObject(GifFile->Image.ColorMap);
      @@ -716,22 +723,25 @@ DGifCloseFile(GifFileType *GifFile, int *ErrorCode)
               GifFile->SavedImages = NULL;
           }
       
      -    GifFreeExtensions(&GifFile->ExtensionBlockCount, &GifFile->ExtensionBlocks);
      +    GifFreeExtensions(&GifFile->ExtensionBlockCount,
      +                      &GifFile->ExtensionBlocks);
       
      -    Private = (GifFilePrivateType *) GifFile->Private;
      +    Private = (GifFilePrivateType *)GifFile->Private;
       
           if (!IS_READABLE(Private)) {
               /* This file was NOT open for reading: */
      -        if (ErrorCode != NULL)
      +        if (ErrorCode != NULL) {
                   *ErrorCode = D_GIF_ERR_NOT_READABLE;
      +        }
               free((char *)GifFile->Private);
               free(GifFile);
               return GIF_ERROR;
           }
       
           if (Private->File && (fclose(Private->File) != 0)) {
      -        if (ErrorCode != NULL)
      +        if (ErrorCode != NULL) {
                   *ErrorCode = D_GIF_ERR_CLOSE_FAILED;
      +        }
               free((char *)GifFile->Private);
               free(GifFile);
               return GIF_ERROR;
      @@ -739,17 +749,16 @@ DGifCloseFile(GifFileType *GifFile, int *ErrorCode)
       
           free((char *)GifFile->Private);
           free(GifFile);
      -    if (ErrorCode != NULL)
      +    if (ErrorCode != NULL) {
               *ErrorCode = D_GIF_SUCCEEDED;
      +    }
           return GIF_OK;
       }
       
       /******************************************************************************
        Get 2 bytes (word) from the given file:
       ******************************************************************************/
      -static int
      -DGifGetWord(GifFileType *GifFile, GifWord *Word)
      -{
      +static int DGifGetWord(GifFileType *GifFile, GifWord *Word) {
           unsigned char c[2];
       
           /* coverity[check_return] */
      @@ -769,9 +778,7 @@ DGifGetWord(GifFileType *GifFile, GifWord *Word)
        to DGifGetCodeNext, until NULL block is returned.
        The block should NOT be freed by the user (not dynamically allocated).
       ******************************************************************************/
      -int
      -DGifGetCode(GifFileType *GifFile, int *CodeSize, GifByteType **CodeBlock)
      -{
      +int DGifGetCode(GifFileType *GifFile, int *CodeSize, GifByteType **CodeBlock) {
           GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
       
           if (!IS_READABLE(Private)) {
      @@ -790,9 +797,7 @@ DGifGetCode(GifFileType *GifFile, int *CodeSize, GifByteType **CodeBlock)
        called until NULL block is returned.
        The block should NOT be freed by the user (not dynamically allocated).
       ******************************************************************************/
      -int
      -DGifGetCodeNext(GifFileType *GifFile, GifByteType **CodeBlock)
      -{
      +int DGifGetCodeNext(GifFileType *GifFile, GifByteType **CodeBlock) {
           GifByteType Buf;
           GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
       
      @@ -805,17 +810,19 @@ DGifGetCodeNext(GifFileType *GifFile, GifByteType **CodeBlock)
       
           /* coverity[lower_bounds] */
           if (Buf > 0) {
      -        *CodeBlock = Private->Buf;    /* Use private unused buffer. */
      -        (*CodeBlock)[0] = Buf;  /* Pascal strings notation (pos. 0 is len.). */
      -        /* coverity[tainted_data] */
      +        *CodeBlock = Private->Buf; /* Use private unused buffer. */
      +        (*CodeBlock)[0] =
      +            Buf; /* Pascal strings notation (pos. 0 is len.). */
      +                 /* coverity[tainted_data] */
               if (InternalRead(GifFile, &((*CodeBlock)[1]), Buf) != Buf) {
                   GifFile->Error = D_GIF_ERR_READ_FAILED;
                   return GIF_ERROR;
               }
           } else {
               *CodeBlock = NULL;
      -        Private->Buf[0] = 0;    /* Make sure the buffer is empty! */
      -        Private->PixelCount = 0;    /* And local info. indicate image read. */
      +        Private->Buf[0] = 0; /* Make sure the buffer is empty! */
      +        Private->PixelCount =
      +            0; /* And local info. indicate image read. */
           }
       
           return GIF_OK;
      @@ -824,41 +831,43 @@ DGifGetCodeNext(GifFileType *GifFile, GifByteType **CodeBlock)
       /******************************************************************************
        Setup the LZ decompression for this image:
       ******************************************************************************/
      -static int
      -DGifSetupDecompress(GifFileType *GifFile)
      -{
      +static int DGifSetupDecompress(GifFileType *GifFile) {
           int i, BitsPerPixel;
           GifByteType CodeSize;
           GifPrefixType *Prefix;
           GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
       
           /* coverity[check_return] */
      -    if (InternalRead(GifFile, &CodeSize, 1) < 1) {    /* Read Code size from file. */
      -        return GIF_ERROR;    /* Failed to read Code size. */
      +    if (InternalRead(GifFile, &CodeSize, 1) <
      +        1) { /* Read Code size from file. */
      +        GifFile->Error = D_GIF_ERR_READ_FAILED;
      +        return GIF_ERROR; /* Failed to read Code size. */
           }
           BitsPerPixel = CodeSize;
       
           /* this can only happen on a severely malformed GIF */
           if (BitsPerPixel > 8) {
      -        GifFile->Error = D_GIF_ERR_READ_FAILED;    /* somewhat bogus error code */
      -        return GIF_ERROR;    /* Failed to read Code size. */
      +        GifFile->Error =
      +            D_GIF_ERR_READ_FAILED; /* somewhat bogus error code */
      +        return GIF_ERROR;          /* Failed to read Code size. */
           }
       
      -    Private->Buf[0] = 0;    /* Input Buffer empty. */
      +    Private->Buf[0] = 0; /* Input Buffer empty. */
           Private->BitsPerPixel = BitsPerPixel;
           Private->ClearCode = (1 << BitsPerPixel);
           Private->EOFCode = Private->ClearCode + 1;
           Private->RunningCode = Private->EOFCode + 1;
      -    Private->RunningBits = BitsPerPixel + 1;    /* Number of bits per code. */
      -    Private->MaxCode1 = 1 << Private->RunningBits;    /* Max. code + 1. */
      -    Private->StackPtr = 0;    /* No pixels on the pixel stack. */
      +    Private->RunningBits = BitsPerPixel + 1; /* Number of bits per code. */
      +    Private->MaxCode1 = 1 << Private->RunningBits; /* Max. code + 1. */
      +    Private->StackPtr = 0; /* No pixels on the pixel stack. */
           Private->LastCode = NO_SUCH_CODE;
      -    Private->CrntShiftState = 0;    /* No information in CrntShiftDWord. */
      +    Private->CrntShiftState = 0; /* No information in CrntShiftDWord. */
           Private->CrntShiftDWord = 0;
       
           Prefix = Private->Prefix;
      -    for (i = 0; i <= LZ_MAX_CODE; i++)
      +    for (i = 0; i <= LZ_MAX_CODE; i++) {
               Prefix[i] = NO_SUCH_CODE;
      +    }
       
           return GIF_OK;
       }
      @@ -869,14 +878,13 @@ DGifSetupDecompress(GifFileType *GifFile)
        This routine can be called few times (one per scan line, for example), in
        order the complete the whole image.
       ******************************************************************************/
      -static int
      -DGifDecompressLine(GifFileType *GifFile, GifPixelType *Line, int LineLen)
      -{
      +static int DGifDecompressLine(GifFileType *GifFile, GifPixelType *Line,
      +                              int LineLen) {
           int i = 0;
           int j, CrntCode, EOFCode, ClearCode, CrntPrefix, LastCode, StackPtr;
           GifByteType *Stack, *Suffix;
           GifPrefixType *Prefix;
      -    GifFilePrivateType *Private = (GifFilePrivateType *) GifFile->Private;
      +    GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
       
           StackPtr = Private->StackPtr;
           Prefix = Private->Prefix;
      @@ -891,72 +899,88 @@ DGifDecompressLine(GifFileType *GifFile, GifPixelType *Line, int LineLen)
           }
       
           if (StackPtr != 0) {
      -        /* Let pop the stack off before continueing to read the GIF file: */
      -        while (StackPtr != 0 && i < LineLen)
      +        /* Let pop the stack off before continueing to read the GIF
      +         * file: */
      +        while (StackPtr != 0 && i < LineLen) {
                   Line[i++] = Stack[--StackPtr];
      +        }
           }
       
      -    while (i < LineLen) {    /* Decode LineLen items. */
      -        if (DGifDecompressInput(GifFile, &CrntCode) == GIF_ERROR)
      +    while (i < LineLen) { /* Decode LineLen items. */
      +        if (DGifDecompressInput(GifFile, &CrntCode) == GIF_ERROR) {
                   return GIF_ERROR;
      +        }
       
               if (CrntCode == EOFCode) {
      -            /* Note however that usually we will not be here as we will stop
      -             * decoding as soon as we got all the pixel, or EOF code will
      -             * not be read at all, and DGifGetLine/Pixel clean everything.  */
      +            /* Note however that usually we will not be here as we
      +             * will stop decoding as soon as we got all the pixel,
      +             * or EOF code will not be read at all, and
      +             * DGifGetLine/Pixel clean everything.  */
                   GifFile->Error = D_GIF_ERR_EOF_TOO_SOON;
                   return GIF_ERROR;
               } else if (CrntCode == ClearCode) {
                   /* We need to start over again: */
      -            for (j = 0; j <= LZ_MAX_CODE; j++)
      +            for (j = 0; j <= LZ_MAX_CODE; j++) {
                       Prefix[j] = NO_SUCH_CODE;
      +            }
                   Private->RunningCode = Private->EOFCode + 1;
                   Private->RunningBits = Private->BitsPerPixel + 1;
                   Private->MaxCode1 = 1 << Private->RunningBits;
                   LastCode = Private->LastCode = NO_SUCH_CODE;
               } else {
      -            /* Its regular code - if in pixel range simply add it to output
      -             * stream, otherwise trace to codes linked list until the prefix
      -             * is in pixel range: */
      +            /* Its regular code - if in pixel range simply add it to
      +             * output stream, otherwise trace to codes linked list
      +             * until the prefix is in pixel range: */
                   if (CrntCode < ClearCode) {
      -                /* This is simple - its pixel scalar, so add it to output: */
      +                /* This is simple - its pixel scalar, so add it
      +                 * to output: */
                       Line[i++] = CrntCode;
                   } else {
      -                /* Its a code to needed to be traced: trace the linked list
      -                 * until the prefix is a pixel, while pushing the suffix
      -                 * pixels on our stack. If we done, pop the stack in reverse
      -                 * (thats what stack is good for!) order to output.  */
      +                /* Its a code to needed to be traced: trace the
      +                 * linked list until the prefix is a pixel,
      +                 * while pushing the suffix pixels on our stack.
      +                 * If we done, pop the stack in reverse (thats
      +                 * what stack is good for!) order to output.  */
                       if (Prefix[CrntCode] == NO_SUCH_CODE) {
                           CrntPrefix = LastCode;
       
      -                    /* Only allowed if CrntCode is exactly the running code:
      -                     * In that case CrntCode = XXXCode, CrntCode or the
      -                     * prefix code is last code and the suffix char is
      -                     * exactly the prefix of last code! */
      -                    if (CrntCode == Private->RunningCode - 2) {
      -                        Suffix[Private->RunningCode - 2] =
      -                           Stack[StackPtr++] = DGifGetPrefixChar(Prefix,
      -                                                                 LastCode,
      -                                                                 ClearCode);
      +                    /* Only allowed if CrntCode is exactly
      +                     * the running code: In that case
      +                     * CrntCode = XXXCode, CrntCode or the
      +                     * prefix code is last code and the
      +                     * suffix char is exactly the prefix of
      +                     * last code! */
      +                    if (CrntCode ==
      +                        Private->RunningCode - 2) {
      +                        Suffix[Private->RunningCode -
      +                               2] = Stack[StackPtr++] =
      +                            DGifGetPrefixChar(
      +                                Prefix, LastCode,
      +                                ClearCode);
                           } else {
      -                        Suffix[Private->RunningCode - 2] =
      -                           Stack[StackPtr++] = DGifGetPrefixChar(Prefix,
      -                                                                 CrntCode,
      -                                                                 ClearCode);
      +                        Suffix[Private->RunningCode -
      +                               2] = Stack[StackPtr++] =
      +                            DGifGetPrefixChar(
      +                                Prefix, CrntCode,
      +                                ClearCode);
                           }
      -                } else
      +                } else {
                           CrntPrefix = CrntCode;
      +                }
       
      -                /* Now (if image is O.K.) we should not get a NO_SUCH_CODE
      -                 * during the trace. As we might loop forever, in case of
      -                 * defective image, we use StackPtr as loop counter and stop
      -                 * before overflowing Stack[]. */
      +                /* Now (if image is O.K.) we should not get a
      +                 * NO_SUCH_CODE during the trace. As we might
      +                 * loop forever, in case of defective image, we
      +                 * use StackPtr as loop counter and stop before
      +                 * overflowing Stack[]. */
                       while (StackPtr < LZ_MAX_CODE &&
      -                       CrntPrefix > ClearCode && CrntPrefix <= LZ_MAX_CODE) {
      +                       CrntPrefix > ClearCode &&
      +                       CrntPrefix <= LZ_MAX_CODE) {
                           Stack[StackPtr++] = Suffix[CrntPrefix];
                           CrntPrefix = Prefix[CrntPrefix];
                       }
      -                if (StackPtr >= LZ_MAX_CODE || CrntPrefix > LZ_MAX_CODE) {
      +                if (StackPtr >= LZ_MAX_CODE ||
      +                    CrntPrefix > LZ_MAX_CODE) {
                           GifFile->Error = D_GIF_ERR_IMAGE_DEFECT;
                           return GIF_ERROR;
                       }
      @@ -964,22 +988,29 @@ DGifDecompressLine(GifFileType *GifFile, GifPixelType *Line, int LineLen)
                       Stack[StackPtr++] = CrntPrefix;
       
                       /* Now lets pop all the stack into output: */
      -                while (StackPtr != 0 && i < LineLen)
      +                while (StackPtr != 0 && i < LineLen) {
                           Line[i++] = Stack[--StackPtr];
      +                }
                   }
      -            if (LastCode != NO_SUCH_CODE && Private->RunningCode - 2 < (LZ_MAX_CODE+1) && Prefix[Private->RunningCode - 2] == NO_SUCH_CODE) {
      +            if (LastCode != NO_SUCH_CODE &&
      +                Private->RunningCode - 2 < (LZ_MAX_CODE + 1) &&
      +                Prefix[Private->RunningCode - 2] == NO_SUCH_CODE) {
                       Prefix[Private->RunningCode - 2] = LastCode;
       
                       if (CrntCode == Private->RunningCode - 2) {
      -                    /* Only allowed if CrntCode is exactly the running code:
      -                     * In that case CrntCode = XXXCode, CrntCode or the
      -                     * prefix code is last code and the suffix char is
      -                     * exactly the prefix of last code! */
      +                    /* Only allowed if CrntCode is exactly
      +                     * the running code: In that case
      +                     * CrntCode = XXXCode, CrntCode or the
      +                     * prefix code is last code and the
      +                     * suffix char is exactly the prefix of
      +                     * last code! */
                           Suffix[Private->RunningCode - 2] =
      -                       DGifGetPrefixChar(Prefix, LastCode, ClearCode);
      +                        DGifGetPrefixChar(Prefix, LastCode,
      +                                          ClearCode);
                       } else {
                           Suffix[Private->RunningCode - 2] =
      -                       DGifGetPrefixChar(Prefix, CrntCode, ClearCode);
      +                        DGifGetPrefixChar(Prefix, CrntCode,
      +                                          ClearCode);
                       }
                   }
                   LastCode = CrntCode;
      @@ -998,9 +1029,8 @@ DGifDecompressLine(GifFileType *GifFile, GifPixelType *Line, int LineLen)
        If image is defective, we might loop here forever, so we limit the loops to
        the maximum possible if image O.k. - LZ_MAX_CODE times.
       ******************************************************************************/
      -static int
      -DGifGetPrefixChar(GifPrefixType *Prefix, int Code, int ClearCode)
      -{
      +static int DGifGetPrefixChar(const GifPrefixType *Prefix, int Code,
      +                             int ClearCode) {
           int i = 0;
       
           while (Code > ClearCode && i++ <= LZ_MAX_CODE) {
      @@ -1016,9 +1046,7 @@ DGifGetPrefixChar(GifPrefixType *Prefix, int Code, int ClearCode)
        Interface for accessing the LZ codes directly. Set Code to the real code
        (12bits), or to -1 if EOF code is returned.
       ******************************************************************************/
      -int
      -DGifGetLZCodes(GifFileType *GifFile, int *Code)
      -{
      +int DGifGetLZCodes(GifFileType *GifFile, int *Code) {
           GifByteType *CodeBlock;
           GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
       
      @@ -1028,15 +1056,18 @@ DGifGetLZCodes(GifFileType *GifFile, int *Code)
               return GIF_ERROR;
           }
       
      -    if (DGifDecompressInput(GifFile, Code) == GIF_ERROR)
      +    if (DGifDecompressInput(GifFile, Code) == GIF_ERROR) {
               return GIF_ERROR;
      +    }
       
           if (*Code == Private->EOFCode) {
      -        /* Skip rest of codes (hopefully only NULL terminating block): */
      +        /* Skip rest of codes (hopefully only NULL terminating block):
      +         */
               do {
      -            if (DGifGetCodeNext(GifFile, &CodeBlock) == GIF_ERROR)
      +            if (DGifGetCodeNext(GifFile, &CodeBlock) == GIF_ERROR) {
                       return GIF_ERROR;
      -        } while (CodeBlock != NULL) ;
      +            }
      +        } while (CodeBlock != NULL);
       
               *Code = -1;
           } else if (*Code == Private->ClearCode) {
      @@ -1055,15 +1086,10 @@ DGifGetLZCodes(GifFileType *GifFile, int *Code)
        8 bits (bytes) packets, into the real codes.
        Returns GIF_OK if read successfully.
       ******************************************************************************/
      -static int
      -DGifDecompressInput(GifFileType *GifFile, int *Code)
      -{
      +static int DGifDecompressInput(GifFileType *GifFile, int *Code) {
           static const unsigned short CodeMasks[] = {
      -        0x0000, 0x0001, 0x0003, 0x0007,
      -        0x000f, 0x001f, 0x003f, 0x007f,
      -        0x00ff, 0x01ff, 0x03ff, 0x07ff,
      -        0x0fff
      -    };
      +        0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f,
      +        0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff};
       
           GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
       
      @@ -1077,11 +1103,12 @@ DGifDecompressInput(GifFileType *GifFile, int *Code)
       
           while (Private->CrntShiftState < Private->RunningBits) {
               /* Needs to get more bytes from input stream for next code: */
      -        if (DGifBufferedInput(GifFile, Private->Buf, &NextByte) == GIF_ERROR) {
      +        if (DGifBufferedInput(GifFile, Private->Buf, &NextByte) ==
      +            GIF_ERROR) {
                   return GIF_ERROR;
               }
      -        Private->CrntShiftDWord |=
      -            ((unsigned long)NextByte) << Private->CrntShiftState;
      +        Private->CrntShiftDWord |= ((unsigned long)NextByte)
      +                                   << Private->CrntShiftState;
               Private->CrntShiftState += 8;
           }
           *Code = Private->CrntShiftDWord & CodeMasks[Private->RunningBits];
      @@ -1109,9 +1136,8 @@ DGifDecompressInput(GifFileType *GifFile, int *Code)
        The routine returns the next byte from its internal buffer (or read next
        block in if buffer empty) and returns GIF_OK if succesful.
       ******************************************************************************/
      -static int
      -DGifBufferedInput(GifFileType *GifFile, GifByteType *Buf, GifByteType *NextByte)
      -{
      +static int DGifBufferedInput(GifFileType *GifFile, GifByteType *Buf,
      +                             GifByteType *NextByte) {
           if (Buf[0] == 0) {
               /* Needs to read the next buffer - this one is empty: */
               /* coverity[check_return] */
      @@ -1120,8 +1146,8 @@ DGifBufferedInput(GifFileType *GifFile, GifByteType *Buf, GifByteType *NextByte)
                   return GIF_ERROR;
               }
               /* There shouldn't be any empty data blocks here as the LZW spec
      -         * says the LZW termination code should come first.  Therefore we
      -         * shouldn't be inside this routine at that point.
      +         * says the LZW termination code should come first.  Therefore
      +         * we shouldn't be inside this routine at that point.
                */
               if (Buf[0] == 0) {
                   GifFile->Error = D_GIF_ERR_IMAGE_DEFECT;
      @@ -1132,7 +1158,7 @@ DGifBufferedInput(GifFileType *GifFile, GifByteType *Buf, GifByteType *NextByte)
                   return GIF_ERROR;
               }
               *NextByte = Buf[1];
      -        Buf[1] = 2;    /* We use now the second place as last char read! */
      +        Buf[1] = 2; /* We use now the second place as last char read! */
               Buf[0]--;
           } else {
               *NextByte = Buf[Buf[1]++];
      @@ -1142,14 +1168,32 @@ DGifBufferedInput(GifFileType *GifFile, GifByteType *Buf, GifByteType *NextByte)
           return GIF_OK;
       }
       
      +/******************************************************************************
      + This routine is called in case of error during parsing image. We need to
      + decrease image counter and reallocate memory for saved images. Not decreasing
      + ImageCount may lead to null pointer dereference, because the last element in
      + SavedImages may point to the spoilt image and null pointer buffers.
      +*******************************************************************************/
      +void DGifDecreaseImageCounter(GifFileType *GifFile) {
      +    GifFile->ImageCount--;
      +    if (GifFile->SavedImages[GifFile->ImageCount].RasterBits != NULL) {
      +        free(GifFile->SavedImages[GifFile->ImageCount].RasterBits);
      +    }
      +
      +    // Realloc array according to the new image counter.
      +    SavedImage *correct_saved_images = (SavedImage *)reallocarray(
      +        GifFile->SavedImages, GifFile->ImageCount, sizeof(SavedImage));
      +    if (correct_saved_images != NULL) {
      +        GifFile->SavedImages = correct_saved_images;
      +    }
      +}
      +
       /******************************************************************************
        This routine reads an entire GIF into core, hanging all its state info off
        the GifFileType pointer.  Call DGifOpenFileName() or DGifOpenFileHandle()
        first to initialize I/O.  Its inverse is EGifSpew().
       *******************************************************************************/
      -int
      -DGifSlurp(GifFileType *GifFile)
      -{
      +int DGifSlurp(GifFileType *GifFile) {
           size_t ImageSize;
           GifRecordType RecordType;
           SavedImage *sp;
      @@ -1160,103 +1204,130 @@ DGifSlurp(GifFileType *GifFile)
           GifFile->ExtensionBlockCount = 0;
       
           do {
      -        if (DGifGetRecordType(GifFile, &RecordType) == GIF_ERROR)
      +        if (DGifGetRecordType(GifFile, &RecordType) == GIF_ERROR) {
                   return (GIF_ERROR);
      +        }
       
               switch (RecordType) {
      -          case IMAGE_DESC_RECORD_TYPE:
      -              if (DGifGetImageDesc(GifFile) == GIF_ERROR)
      -                  return (GIF_ERROR);
      -
      -              sp = &GifFile->SavedImages[GifFile->ImageCount - 1];
      -              /* Allocate memory for the image */
      -              if (sp->ImageDesc.Width <= 0 || sp->ImageDesc.Height <= 0 ||
      -                      sp->ImageDesc.Width > (INT_MAX / sp->ImageDesc.Height)) {
      -                  return GIF_ERROR;
      -              }
      -              ImageSize = sp->ImageDesc.Width * sp->ImageDesc.Height;
      -
      -              if (ImageSize > (SIZE_MAX / sizeof(GifPixelType))) {
      -                  return GIF_ERROR;
      -              }
      -              sp->RasterBits = (unsigned char *)reallocarray(NULL, ImageSize,
      -                      sizeof(GifPixelType));
      -
      -              if (sp->RasterBits == NULL) {
      -                  return GIF_ERROR;
      -              }
      -
      -              if (sp->ImageDesc.Interlace) {
      -                  int i, j;
      -                   /*
      -                    * The way an interlaced image should be read -
      -                    * offsets and jumps...
      -                    */
      -                  int InterlacedOffset[] = { 0, 4, 2, 1 };
      -                  int InterlacedJumps[] = { 8, 8, 4, 2 };
      -                  /* Need to perform 4 passes on the image */
      -                  for (i = 0; i < 4; i++)
      -                      for (j = InterlacedOffset[i];
      -                       j < sp->ImageDesc.Height;
      -                       j += InterlacedJumps[i]) {
      -                      if (DGifGetLine(GifFile,
      -                              sp->RasterBits+j*sp->ImageDesc.Width,
      -                              sp->ImageDesc.Width) == GIF_ERROR)
      -                          return GIF_ERROR;
      -                      }
      -              }
      -              else {
      -                  if (DGifGetLine(GifFile,sp->RasterBits,ImageSize)==GIF_ERROR)
      -                      return (GIF_ERROR);
      -              }
      -
      -              if (GifFile->ExtensionBlocks) {
      -                  sp->ExtensionBlocks = GifFile->ExtensionBlocks;
      -                  sp->ExtensionBlockCount = GifFile->ExtensionBlockCount;
      -
      -                  GifFile->ExtensionBlocks = NULL;
      -                  GifFile->ExtensionBlockCount = 0;
      -              }
      -              break;
      -
      -          case EXTENSION_RECORD_TYPE:
      -              if (DGifGetExtension(GifFile,&ExtFunction,&ExtData) == GIF_ERROR)
      -                  return (GIF_ERROR);
      -              /* Create an extension block with our data */
      -              if (ExtData != NULL) {
      -                  if (GifAddExtensionBlock(&GifFile->ExtensionBlockCount,
      -                               &GifFile->ExtensionBlocks,
      -                               ExtFunction, ExtData[0], &ExtData[1])
      -                      == GIF_ERROR)
      -                      return (GIF_ERROR);
      -              }
      -              for (;;) {
      -                  if (DGifGetExtensionNext(GifFile, &ExtData) == GIF_ERROR)
      -                      return (GIF_ERROR);
      -                  if (ExtData == NULL)
      -                      break;
      -                  /* Continue the extension block */
      -                  if (ExtData != NULL)
      -                      if (GifAddExtensionBlock(&GifFile->ExtensionBlockCount,
      -                                   &GifFile->ExtensionBlocks,
      -                                   CONTINUE_EXT_FUNC_CODE,
      -                                   ExtData[0], &ExtData[1]) == GIF_ERROR)
      -                              return (GIF_ERROR);
      -              }
      -              break;
      -
      -          case TERMINATE_RECORD_TYPE:
      -              break;
      -
      -          default:    /* Should be trapped by DGifGetRecordType */
      -              break;
      +        case IMAGE_DESC_RECORD_TYPE:
      +            if (DGifGetImageDesc(GifFile) == GIF_ERROR) {
      +                return (GIF_ERROR);
      +            }
      +
      +            sp = &GifFile->SavedImages[GifFile->ImageCount - 1];
      +            /* Allocate memory for the image */
      +            if (sp->ImageDesc.Width <= 0 ||
      +                sp->ImageDesc.Height <= 0 ||
      +                sp->ImageDesc.Width >
      +                    (INT_MAX / sp->ImageDesc.Height)) {
      +                DGifDecreaseImageCounter(GifFile);
      +                return GIF_ERROR;
      +            }
      +            ImageSize = sp->ImageDesc.Width * sp->ImageDesc.Height;
      +
      +            if (ImageSize > (SIZE_MAX / sizeof(GifPixelType))) {
      +                DGifDecreaseImageCounter(GifFile);
      +                return GIF_ERROR;
      +            }
      +            sp->RasterBits = (unsigned char *)reallocarray(
      +                NULL, ImageSize, sizeof(GifPixelType));
      +
      +            if (sp->RasterBits == NULL) {
      +                DGifDecreaseImageCounter(GifFile);
      +                return GIF_ERROR;
      +            }
      +
      +            if (sp->ImageDesc.Interlace) {
      +                int i, j;
      +                /*
      +                 * The way an interlaced image should be read -
      +                 * offsets and jumps...
      +                 */
      +                static const int InterlacedOffset[] = {0, 4, 2,
      +                                                       1};
      +                static const int InterlacedJumps[] = {8, 8, 4,
      +                                                      2};
      +                /* Need to perform 4 passes on the image */
      +                for (i = 0; i < 4; i++) {
      +                    for (j = InterlacedOffset[i];
      +                         j < sp->ImageDesc.Height;
      +                         j += InterlacedJumps[i]) {
      +                        if (DGifGetLine(
      +                                GifFile,
      +                                sp->RasterBits +
      +                                    j * sp->ImageDesc
      +                                            .Width,
      +                                sp->ImageDesc.Width) ==
      +                            GIF_ERROR) {
      +                            DGifDecreaseImageCounter(
      +                                GifFile);
      +                            return GIF_ERROR;
      +                        }
      +                    }
      +                }
      +            } else {
      +                if (DGifGetLine(GifFile, sp->RasterBits,
      +                                ImageSize) == GIF_ERROR) {
      +                    DGifDecreaseImageCounter(GifFile);
      +                    return GIF_ERROR;
      +                }
      +            }
      +
      +            if (GifFile->ExtensionBlocks) {
      +                sp->ExtensionBlocks = GifFile->ExtensionBlocks;
      +                sp->ExtensionBlockCount =
      +                    GifFile->ExtensionBlockCount;
      +
      +                GifFile->ExtensionBlocks = NULL;
      +                GifFile->ExtensionBlockCount = 0;
      +            }
      +            break;
      +
      +        case EXTENSION_RECORD_TYPE:
      +            if (DGifGetExtension(GifFile, &ExtFunction, &ExtData) ==
      +                GIF_ERROR) {
      +                return (GIF_ERROR);
      +            }
      +            /* Create an extension block with our data */
      +            if (ExtData != NULL) {
      +                if (GifAddExtensionBlock(
      +                        &GifFile->ExtensionBlockCount,
      +                        &GifFile->ExtensionBlocks, ExtFunction,
      +                        ExtData[0], &ExtData[1]) == GIF_ERROR) {
      +                    return (GIF_ERROR);
      +                }
      +            }
      +            for (;;) {
      +                if (DGifGetExtensionNext(GifFile, &ExtData) ==
      +                    GIF_ERROR) {
      +                    return (GIF_ERROR);
      +                }
      +                if (ExtData == NULL) {
      +                    break;
      +                }
      +                /* Continue the extension block */
      +                if (GifAddExtensionBlock(
      +                        &GifFile->ExtensionBlockCount,
      +                        &GifFile->ExtensionBlocks,
      +                        CONTINUE_EXT_FUNC_CODE, ExtData[0],
      +                        &ExtData[1]) == GIF_ERROR) {
      +                    return (GIF_ERROR);
      +                }
      +            }
      +            break;
      +
      +        case TERMINATE_RECORD_TYPE:
      +            break;
      +
      +        default: /* Should be trapped by DGifGetRecordType */
      +            break;
               }
           } while (RecordType != TERMINATE_RECORD_TYPE);
       
           /* Sanity check for corrupted file */
           if (GifFile->ImageCount == 0) {
               GifFile->Error = D_GIF_ERR_NO_IMAG_DSCR;
      -        return(GIF_ERROR);
      +        return (GIF_ERROR);
           }
       
           return (GIF_OK);
      diff --git a/src/java.desktop/share/native/libsplashscreen/giflib/gif_err.c b/src/java.desktop/share/native/libsplashscreen/giflib/gif_err.c
      index db08838efff..3b6785f7c63 100644
      --- a/src/java.desktop/share/native/libsplashscreen/giflib/gif_err.c
      +++ b/src/java.desktop/share/native/libsplashscreen/giflib/gif_err.c
      @@ -38,82 +38,80 @@ SPDX-License-Identifier: MIT
       /*****************************************************************************
        Return a string description of  the last GIF error
       *****************************************************************************/
      -const char *
      -GifErrorString(int ErrorCode)
      -{
      +const char *GifErrorString(int ErrorCode) {
           const char *Err;
       
           switch (ErrorCode) {
      -      case E_GIF_ERR_OPEN_FAILED:
      +    case E_GIF_ERR_OPEN_FAILED:
               Err = "Failed to open given file";
               break;
      -      case E_GIF_ERR_WRITE_FAILED:
      +    case E_GIF_ERR_WRITE_FAILED:
               Err = "Failed to write to given file";
               break;
      -      case E_GIF_ERR_HAS_SCRN_DSCR:
      +    case E_GIF_ERR_HAS_SCRN_DSCR:
               Err = "Screen descriptor has already been set";
               break;
      -      case E_GIF_ERR_HAS_IMAG_DSCR:
      +    case E_GIF_ERR_HAS_IMAG_DSCR:
               Err = "Image descriptor is still active";
               break;
      -      case E_GIF_ERR_NO_COLOR_MAP:
      +    case E_GIF_ERR_NO_COLOR_MAP:
               Err = "Neither global nor local color map";
               break;
      -      case E_GIF_ERR_DATA_TOO_BIG:
      +    case E_GIF_ERR_DATA_TOO_BIG:
               Err = "Number of pixels bigger than width * height";
               break;
      -      case E_GIF_ERR_NOT_ENOUGH_MEM:
      +    case E_GIF_ERR_NOT_ENOUGH_MEM:
               Err = "Failed to allocate required memory";
               break;
      -      case E_GIF_ERR_DISK_IS_FULL:
      +    case E_GIF_ERR_DISK_IS_FULL:
               Err = "Write failed (disk full?)";
               break;
      -      case E_GIF_ERR_CLOSE_FAILED:
      +    case E_GIF_ERR_CLOSE_FAILED:
               Err = "Failed to close given file";
               break;
      -      case E_GIF_ERR_NOT_WRITEABLE:
      +    case E_GIF_ERR_NOT_WRITEABLE:
               Err = "Given file was not opened for write";
               break;
      -      case D_GIF_ERR_OPEN_FAILED:
      +    case D_GIF_ERR_OPEN_FAILED:
               Err = "Failed to open given file";
               break;
      -      case D_GIF_ERR_READ_FAILED:
      +    case D_GIF_ERR_READ_FAILED:
               Err = "Failed to read from given file";
               break;
      -      case D_GIF_ERR_NOT_GIF_FILE:
      +    case D_GIF_ERR_NOT_GIF_FILE:
               Err = "Data is not in GIF format";
               break;
      -      case D_GIF_ERR_NO_SCRN_DSCR:
      +    case D_GIF_ERR_NO_SCRN_DSCR:
               Err = "No screen descriptor detected";
               break;
      -      case D_GIF_ERR_NO_IMAG_DSCR:
      +    case D_GIF_ERR_NO_IMAG_DSCR:
               Err = "No Image Descriptor detected";
               break;
      -      case D_GIF_ERR_NO_COLOR_MAP:
      +    case D_GIF_ERR_NO_COLOR_MAP:
               Err = "Neither global nor local color map";
               break;
      -      case D_GIF_ERR_WRONG_RECORD:
      +    case D_GIF_ERR_WRONG_RECORD:
               Err = "Wrong record type detected";
               break;
      -      case D_GIF_ERR_DATA_TOO_BIG:
      +    case D_GIF_ERR_DATA_TOO_BIG:
               Err = "Number of pixels bigger than width * height";
               break;
      -      case D_GIF_ERR_NOT_ENOUGH_MEM:
      +    case D_GIF_ERR_NOT_ENOUGH_MEM:
               Err = "Failed to allocate required memory";
               break;
      -      case D_GIF_ERR_CLOSE_FAILED:
      +    case D_GIF_ERR_CLOSE_FAILED:
               Err = "Failed to close given file";
               break;
      -      case D_GIF_ERR_NOT_READABLE:
      +    case D_GIF_ERR_NOT_READABLE:
               Err = "Given file was not opened for read";
               break;
      -      case D_GIF_ERR_IMAGE_DEFECT:
      +    case D_GIF_ERR_IMAGE_DEFECT:
               Err = "Image is defective, decoding aborted";
               break;
      -      case D_GIF_ERR_EOF_TOO_SOON:
      +    case D_GIF_ERR_EOF_TOO_SOON:
               Err = "Image EOF detected before image complete";
               break;
      -      default:
      +    default:
               Err = NULL;
               break;
           }
      diff --git a/src/java.desktop/share/native/libsplashscreen/giflib/gif_hash.h b/src/java.desktop/share/native/libsplashscreen/giflib/gif_hash.h
      index 6cabd0866ed..bd00af64161 100644
      --- a/src/java.desktop/share/native/libsplashscreen/giflib/gif_hash.h
      +++ b/src/java.desktop/share/native/libsplashscreen/giflib/gif_hash.h
      @@ -33,27 +33,25 @@ SPDX-License-Identifier: MIT
       #ifndef _GIF_HASH_H_
       #define _GIF_HASH_H_
       
      -/** Begin JDK modifications to support building on Windows **/
       #ifndef _WIN32
       #include 
      -#endif
      -/** End JDK modifications to support building on Windows **/
      +#endif /* _WIN32 */
       #include 
       
      -#define HT_SIZE         8192    /* 12bits = 4096 or twice as big! */
      -#define HT_KEY_MASK     0x1FFF  /* 13bits keys */
      -#define HT_KEY_NUM_BITS 13      /* 13bits keys */
      -#define HT_MAX_KEY      8191    /* 13bits - 1, maximal code possible */
      -#define HT_MAX_CODE     4095    /* Biggest code possible in 12 bits. */
      +#define HT_SIZE 8192       /* 12bits = 4096 or twice as big! */
      +#define HT_KEY_MASK 0x1FFF /* 13bits keys */
      +#define HT_KEY_NUM_BITS 13 /* 13bits keys */
      +#define HT_MAX_KEY 8191    /* 13bits - 1, maximal code possible */
      +#define HT_MAX_CODE 4095   /* Biggest code possible in 12 bits. */
       
       /* The 32 bits of the long are divided into two parts for the key & code:   */
       /* 1. The code is 12 bits as our compression algorithm is limited to 12bits */
      -/* 2. The key is 12 bits Prefix code + 8 bit new char or 20 bits.           */
      +/* 2. The key is 12 bits Prefix code + 8 bit new char or 20 bits.        */
       /* The key is the upper 20 bits.  The code is the lower 12. */
      -#define HT_GET_KEY(l)    (l >> 12)
      -#define HT_GET_CODE(l)   (l & 0x0FFF)
      -#define HT_PUT_KEY(l)    (l << 12)
      -#define HT_PUT_CODE(l)   (l & 0x0FFF)
      +#define HT_GET_KEY(l) (l >> 12)
      +#define HT_GET_CODE(l) (l & 0x0FFF)
      +#define HT_PUT_KEY(l) (l << 12)
      +#define HT_PUT_CODE(l) (l & 0x0FFF)
       
       typedef struct GifHashTableType {
           uint32_t HTable[HT_SIZE];
      diff --git a/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h b/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h
      index f739b36adfd..74a2e969c0d 100644
      --- a/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h
      +++ b/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h
      @@ -39,27 +39,19 @@ extern "C" {
       
       #define GIFLIB_MAJOR 5
       #define GIFLIB_MINOR 2
      -#define GIFLIB_RELEASE 1
      +#define GIFLIB_RELEASE 2
       
      -#define GIF_ERROR   0
      -#define GIF_OK      1
      +#define GIF_ERROR 0
      +#define GIF_OK 1
       
      +#include 
       #include 
      -/** Begin JDK modifications to support building using old compilers**/
      -//#include 
      -#ifdef bool
      -#undef bool
      -#endif
      -typedef int bool;
      -#define false 0
      -#define true 1
      -/** End JDK modifications to support building using old compilers**/
      -
      -#define GIF_STAMP "GIFVER"          /* First chars in file - GIF stamp.  */
      +
      +#define GIF_STAMP "GIFVER" /* First chars in file - GIF stamp.  */
       #define GIF_STAMP_LEN sizeof(GIF_STAMP) - 1
      -#define GIF_VERSION_POS 3           /* Version first character in stamp. */
      -#define GIF87_STAMP "GIF87a"        /* First chars in file - GIF stamp.  */
      -#define GIF89_STAMP "GIF89a"        /* First chars in file - GIF stamp.  */
      +#define GIF_VERSION_POS 3    /* Version first character in stamp. */
      +#define GIF87_STAMP "GIF87a" /* First chars in file - GIF stamp.  */
      +#define GIF89_STAMP "GIF89a" /* First chars in file - GIF stamp.  */
       
       typedef unsigned char GifPixelType;
       typedef unsigned char *GifRowType;
      @@ -75,24 +67,24 @@ typedef struct ColorMapObject {
           int ColorCount;
           int BitsPerPixel;
           bool SortFlag;
      -    GifColorType *Colors;    /* on malloc(3) heap */
      +    GifColorType *Colors; /* on malloc(3) heap */
       } ColorMapObject;
       
       typedef struct GifImageDesc {
      -    GifWord Left, Top, Width, Height;   /* Current image dimensions. */
      -    bool Interlace;                     /* Sequential/Interlaced lines. */
      -    ColorMapObject *ColorMap;           /* The local color map */
      +    GifWord Left, Top, Width, Height; /* Current image dimensions. */
      +    bool Interlace;                   /* Sequential/Interlaced lines. */
      +    ColorMapObject *ColorMap;         /* The local color map */
       } GifImageDesc;
       
       typedef struct ExtensionBlock {
           int ByteCount;
      -    GifByteType *Bytes; /* on malloc(3) heap */
      -    int Function;       /* The block function code */
      -#define CONTINUE_EXT_FUNC_CODE    0x00    /* continuation subblock */
      -#define COMMENT_EXT_FUNC_CODE     0xfe    /* comment */
      -#define GRAPHICS_EXT_FUNC_CODE    0xf9    /* graphics control (GIF89) */
      -#define PLAINTEXT_EXT_FUNC_CODE   0x01    /* plaintext */
      -#define APPLICATION_EXT_FUNC_CODE 0xff    /* application block (GIF89) */
      +    GifByteType *Bytes;            /* on malloc(3) heap */
      +    int Function;                  /* The block function code */
      +#define CONTINUE_EXT_FUNC_CODE 0x00    /* continuation subblock */
      +#define COMMENT_EXT_FUNC_CODE 0xfe     /* comment */
      +#define GRAPHICS_EXT_FUNC_CODE 0xf9    /* graphics control (GIF89) */
      +#define PLAINTEXT_EXT_FUNC_CODE 0x01   /* plaintext */
      +#define APPLICATION_EXT_FUNC_CODE 0xff /* application block (GIF89) */
       } ExtensionBlock;
       
       typedef struct SavedImage {
      @@ -103,22 +95,22 @@ typedef struct SavedImage {
       } SavedImage;
       
       typedef struct GifFileType {
      -    GifWord SWidth, SHeight;         /* Size of virtual canvas */
      -    GifWord SColorResolution;        /* How many colors can we generate? */
      -    GifWord SBackGroundColor;        /* Background color for virtual canvas */
      -    GifByteType AspectByte;          /* Used to compute pixel aspect ratio */
      -    ColorMapObject *SColorMap;       /* Global colormap, NULL if nonexistent. */
      -    int ImageCount;                  /* Number of current image (both APIs) */
      -    GifImageDesc Image;              /* Current image (low-level API) */
      -    SavedImage *SavedImages;         /* Image sequence (high-level API) */
      -    int ExtensionBlockCount;         /* Count extensions past last image */
      +    GifWord SWidth, SHeight;   /* Size of virtual canvas */
      +    GifWord SColorResolution;  /* How many colors can we generate? */
      +    GifWord SBackGroundColor;  /* Background color for virtual canvas */
      +    GifByteType AspectByte;    /* Used to compute pixel aspect ratio */
      +    ColorMapObject *SColorMap; /* Global colormap, NULL if nonexistent. */
      +    int ImageCount;            /* Number of current image (both APIs) */
      +    GifImageDesc Image;        /* Current image (low-level API) */
      +    SavedImage *SavedImages;   /* Image sequence (high-level API) */
      +    int ExtensionBlockCount;   /* Count extensions past last image */
           ExtensionBlock *ExtensionBlocks; /* Extensions past last image */
           int Error;                       /* Last error condition reported */
           void *UserData;                  /* hook to attach user data (TVT) */
           void *Private;                   /* Don't mess with this! */
       } GifFileType;
       
      -#define GIF_ASPECT_RATIO(n)    ((n)+15.0/64.0)
      +#define GIF_ASPECT_RATIO(n) ((n) + 15.0 / 64.0)
       
       typedef enum {
           UNDEFINED_RECORD_TYPE,
      @@ -129,12 +121,12 @@ typedef enum {
       } GifRecordType;
       
       /* func type to read gif data from arbitrary sources (TVT) */
      -typedef int (*InputFunc) (GifFileType *, GifByteType *, int);
      +typedef int (*InputFunc)(GifFileType *, GifByteType *, int);
       
       /* func type to write gif data to arbitrary targets.
        * Returns count of bytes written. (MRB)
        */
      -typedef int (*OutputFunc) (GifFileType *, const GifByteType *, int);
      +typedef int (*OutputFunc)(GifFileType *, const GifByteType *, int);
       
       /******************************************************************************
        GIF89 structures
      @@ -142,14 +134,14 @@ typedef int (*OutputFunc) (GifFileType *, const GifByteType *, int);
       
       typedef struct GraphicsControlBlock {
           int DisposalMode;
      -#define DISPOSAL_UNSPECIFIED      0       /* No disposal specified. */
      -#define DISPOSE_DO_NOT            1       /* Leave image in place */
      -#define DISPOSE_BACKGROUND        2       /* Set area too background color */
      -#define DISPOSE_PREVIOUS          3       /* Restore to previous content */
      -    bool UserInputFlag;      /* User confirmation required before disposal */
      -    int DelayTime;           /* pre-display delay in 0.01sec units */
      -    int TransparentColor;    /* Palette index for transparency, -1 if none */
      -#define NO_TRANSPARENT_COLOR    -1
      +#define DISPOSAL_UNSPECIFIED 0 /* No disposal specified. */
      +#define DISPOSE_DO_NOT 1       /* Leave image in place */
      +#define DISPOSE_BACKGROUND 2   /* Set area too background color */
      +#define DISPOSE_PREVIOUS 3     /* Restore to previous content */
      +    bool UserInputFlag;    /* User confirmation required before disposal */
      +    int DelayTime;         /* pre-display delay in 0.01sec units */
      +    int TransparentColor;  /* Palette index for transparency, -1 if none */
      +#define NO_TRANSPARENT_COLOR -1
       } GraphicsControlBlock;
       
       /******************************************************************************
      @@ -161,49 +153,44 @@ GifFileType *EGifOpenFileName(const char *GifFileName,
                                     const bool GifTestExistence, int *Error);
       GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error);
       GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error);
      -int EGifSpew(GifFileType * GifFile);
      +int EGifSpew(GifFileType *GifFile);
       const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */
       int EGifCloseFile(GifFileType *GifFile, int *ErrorCode);
       
      -#define E_GIF_SUCCEEDED          0
      -#define E_GIF_ERR_OPEN_FAILED    1    /* And EGif possible errors. */
      -#define E_GIF_ERR_WRITE_FAILED   2
      -#define E_GIF_ERR_HAS_SCRN_DSCR  3
      -#define E_GIF_ERR_HAS_IMAG_DSCR  4
      -#define E_GIF_ERR_NO_COLOR_MAP   5
      -#define E_GIF_ERR_DATA_TOO_BIG   6
      +#define E_GIF_SUCCEEDED 0
      +#define E_GIF_ERR_OPEN_FAILED 1 /* And EGif possible errors. */
      +#define E_GIF_ERR_WRITE_FAILED 2
      +#define E_GIF_ERR_HAS_SCRN_DSCR 3
      +#define E_GIF_ERR_HAS_IMAG_DSCR 4
      +#define E_GIF_ERR_NO_COLOR_MAP 5
      +#define E_GIF_ERR_DATA_TOO_BIG 6
       #define E_GIF_ERR_NOT_ENOUGH_MEM 7
      -#define E_GIF_ERR_DISK_IS_FULL   8
      -#define E_GIF_ERR_CLOSE_FAILED   9
      -#define E_GIF_ERR_NOT_WRITEABLE  10
      +#define E_GIF_ERR_DISK_IS_FULL 8
      +#define E_GIF_ERR_CLOSE_FAILED 9
      +#define E_GIF_ERR_NOT_WRITEABLE 10
       
       /* These are legacy.  You probably do not want to call them directly */
      -int EGifPutScreenDesc(GifFileType *GifFile,
      -                      const int GifWidth, const int GifHeight,
      -                      const int GifColorRes,
      +int EGifPutScreenDesc(GifFileType *GifFile, const int GifWidth,
      +                      const int GifHeight, const int GifColorRes,
                             const int GifBackGround,
                             const ColorMapObject *GifColorMap);
      -int EGifPutImageDesc(GifFileType *GifFile,
      -                     const int GifLeft, const int GifTop,
      +int EGifPutImageDesc(GifFileType *GifFile, const int GifLeft, const int GifTop,
                            const int GifWidth, const int GifHeight,
                            const bool GifInterlace,
                            const ColorMapObject *GifColorMap);
       void EGifSetGifVersion(GifFileType *GifFile, const bool gif89);
      -int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine,
      -                int GifLineLen);
      +int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen);
       int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel);
       int EGifPutComment(GifFileType *GifFile, const char *GifComment);
       int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode);
      -int EGifPutExtensionBlock(GifFileType *GifFile,
      -                         const int GifExtLen, const void *GifExtension);
      +int EGifPutExtensionBlock(GifFileType *GifFile, const int GifExtLen,
      +                          const void *GifExtension);
       int EGifPutExtensionTrailer(GifFileType *GifFile);
       int EGifPutExtension(GifFileType *GifFile, const int GifExtCode,
      -                     const int GifExtLen,
      -                     const void *GifExtension);
      +                     const int GifExtLen, const void *GifExtension);
       int EGifPutCode(GifFileType *GifFile, int GifCodeSize,
                       const GifByteType *GifCodeBlock);
      -int EGifPutCodeNext(GifFileType *GifFile,
      -                    const GifByteType *GifCodeBlock);
      +int EGifPutCodeNext(GifFileType *GifFile, const GifByteType *GifCodeBlock);
       
       /******************************************************************************
        GIF decoding routines
      @@ -212,24 +199,25 @@ int EGifPutCodeNext(GifFileType *GifFile,
       /* Main entry points */
       GifFileType *DGifOpenFileName(const char *GifFileName, int *Error);
       GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error);
      -int DGifSlurp(GifFileType * GifFile);
      -GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error);    /* new one (TVT) */
      -    int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
      -
      -#define D_GIF_SUCCEEDED          0
      -#define D_GIF_ERR_OPEN_FAILED    101    /* And DGif possible errors. */
      -#define D_GIF_ERR_READ_FAILED    102
      -#define D_GIF_ERR_NOT_GIF_FILE   103
      -#define D_GIF_ERR_NO_SCRN_DSCR   104
      -#define D_GIF_ERR_NO_IMAG_DSCR   105
      -#define D_GIF_ERR_NO_COLOR_MAP   106
      -#define D_GIF_ERR_WRONG_RECORD   107
      -#define D_GIF_ERR_DATA_TOO_BIG   108
      +int DGifSlurp(GifFileType *GifFile);
      +GifFileType *DGifOpen(void *userPtr, InputFunc readFunc,
      +                      int *Error); /* new one (TVT) */
      +int DGifCloseFile(GifFileType *GifFile, int *ErrorCode);
      +
      +#define D_GIF_SUCCEEDED 0
      +#define D_GIF_ERR_OPEN_FAILED 101 /* And DGif possible errors. */
      +#define D_GIF_ERR_READ_FAILED 102
      +#define D_GIF_ERR_NOT_GIF_FILE 103
      +#define D_GIF_ERR_NO_SCRN_DSCR 104
      +#define D_GIF_ERR_NO_IMAG_DSCR 105
      +#define D_GIF_ERR_NO_COLOR_MAP 106
      +#define D_GIF_ERR_WRONG_RECORD 107
      +#define D_GIF_ERR_DATA_TOO_BIG 108
       #define D_GIF_ERR_NOT_ENOUGH_MEM 109
      -#define D_GIF_ERR_CLOSE_FAILED   110
      -#define D_GIF_ERR_NOT_READABLE   111
      -#define D_GIF_ERR_IMAGE_DEFECT   112
      -#define D_GIF_ERR_EOF_TOO_SOON   113
      +#define D_GIF_ERR_CLOSE_FAILED 110
      +#define D_GIF_ERR_NOT_READABLE 111
      +#define D_GIF_ERR_IMAGE_DEFECT 112
      +#define D_GIF_ERR_EOF_TOO_SOON 113
       
       /* These are legacy.  You probably do not want to call them directly */
       int DGifGetScreenDesc(GifFileType *GifFile);
      @@ -247,11 +235,10 @@ int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock);
       int DGifGetLZCodes(GifFileType *GifFile, int *GifCode);
       const char *DGifGetGifVersion(GifFileType *GifFile);
       
      -
       /******************************************************************************
        Error handling and reporting.
       ******************************************************************************/
      -extern const char *GifErrorString(int ErrorCode);     /* new in 2012 - ESR */
      +extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */
       
       /*****************************************************************************
        Everything below this point is new after version 1.2, supporting `slurp
      @@ -263,26 +250,26 @@ extern const char *GifErrorString(int ErrorCode);     /* new in 2012 - ESR */
       ******************************************************************************/
       
       extern ColorMapObject *GifMakeMapObject(int ColorCount,
      -                                     const GifColorType *ColorMap);
      +                                        const GifColorType *ColorMap);
       extern void GifFreeMapObject(ColorMapObject *Object);
       extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1,
      -                                     const ColorMapObject *ColorIn2,
      -                                     GifPixelType ColorTransIn2[]);
      +                                        const ColorMapObject *ColorIn2,
      +                                        GifPixelType ColorTransIn2[]);
       extern int GifBitSize(int n);
       
       /******************************************************************************
        Support for the in-core structures allocation (slurp mode).
       ******************************************************************************/
       
      -extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]);
      +extern void GifApplyTranslation(SavedImage *Image,
      +                                const GifPixelType Translation[]);
       extern int GifAddExtensionBlock(int *ExtensionBlock_Count,
      -                                ExtensionBlock **ExtensionBlocks,
      -                                int Function,
      +                                ExtensionBlock **ExtensionBlocks, int Function,
                                       unsigned int Len, unsigned char ExtData[]);
       extern void GifFreeExtensions(int *ExtensionBlock_Count,
                                     ExtensionBlock **ExtensionBlocks);
       extern SavedImage *GifMakeSavedImage(GifFileType *GifFile,
      -                                  const SavedImage *CopyFrom);
      +                                     const SavedImage *CopyFrom);
       extern void GifFreeSavedImages(GifFileType *GifFile);
       
       /******************************************************************************
      @@ -295,37 +282,31 @@ int DGifExtensionToGCB(const size_t GifExtensionLength,
       size_t EGifGCBToExtension(const GraphicsControlBlock *GCB,
                                 GifByteType *GifExtension);
       
      -int DGifSavedExtensionToGCB(GifFileType *GifFile,
      -                            int ImageIndex,
      +int DGifSavedExtensionToGCB(GifFileType *GifFile, int ImageIndex,
                                   GraphicsControlBlock *GCB);
       int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB,
      -                            GifFileType *GifFile,
      -                            int ImageIndex);
      +                            GifFileType *GifFile, int ImageIndex);
       
       /******************************************************************************
        The library's internal utility font
       ******************************************************************************/
       
      -#define GIF_FONT_WIDTH  8
      +#define GIF_FONT_WIDTH 8
       #define GIF_FONT_HEIGHT 8
       extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH];
       
      -extern void GifDrawText8x8(SavedImage *Image,
      -                     const int x, const int y,
      -                     const char *legend, const int color);
      +extern void GifDrawText8x8(SavedImage *Image, const int x, const int y,
      +                           const char *legend, const int color);
       
      -extern void GifDrawBox(SavedImage *Image,
      -                    const int x, const int y,
      -                    const int w, const int d, const int color);
      +extern void GifDrawBox(SavedImage *Image, const int x, const int y, const int w,
      +                       const int d, const int color);
       
      -extern void GifDrawRectangle(SavedImage *Image,
      -                   const int x, const int y,
      -                   const int w, const int d, const int color);
      +extern void GifDrawRectangle(SavedImage *Image, const int x, const int y,
      +                             const int w, const int d, const int color);
       
      -extern void GifDrawBoxedText8x8(SavedImage *Image,
      -                          const int x, const int y,
      -                          const char *legend,
      -                          const int border, const int bg, const int fg);
      +extern void GifDrawBoxedText8x8(SavedImage *Image, const int x, const int y,
      +                                const char *legend, const int border,
      +                                const int bg, const int fg);
       
       #ifdef __cplusplus
       }
      diff --git a/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib_private.h b/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib_private.h
      index 4f832676ffc..f905e0d7b48 100644
      --- a/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib_private.h
      +++ b/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib_private.h
      @@ -33,52 +33,54 @@ SPDX-License-Identifier: MIT
       #ifndef _GIF_LIB_PRIVATE_H
       #define _GIF_LIB_PRIVATE_H
       
      -#include "gif_lib.h"
       #include "gif_hash.h"
      +#include "gif_lib.h"
       
       #ifndef SIZE_MAX
      -    #define SIZE_MAX     UINTPTR_MAX
      +#define SIZE_MAX UINTPTR_MAX
       #endif
       
      -#define EXTENSION_INTRODUCER      0x21
      -#define DESCRIPTOR_INTRODUCER     0x2c
      -#define TERMINATOR_INTRODUCER     0x3b
      +#define EXTENSION_INTRODUCER 0x21
      +#define DESCRIPTOR_INTRODUCER 0x2c
      +#define TERMINATOR_INTRODUCER 0x3b
       
      -#define LZ_MAX_CODE         4095    /* Biggest code possible in 12 bits. */
      -#define LZ_BITS             12
      +#define LZ_MAX_CODE 4095 /* Biggest code possible in 12 bits. */
      +#define LZ_BITS 12
       
      -#define FLUSH_OUTPUT        4096    /* Impossible code, to signal flush. */
      -#define FIRST_CODE          4097    /* Impossible code, to signal first. */
      -#define NO_SUCH_CODE        4098    /* Impossible code, to signal empty. */
      +#define FLUSH_OUTPUT 4096 /* Impossible code, to signal flush. */
      +#define FIRST_CODE 4097   /* Impossible code, to signal first. */
      +#define NO_SUCH_CODE 4098 /* Impossible code, to signal empty. */
       
      -#define FILE_STATE_WRITE    0x01
      -#define FILE_STATE_SCREEN   0x02
      -#define FILE_STATE_IMAGE    0x04
      -#define FILE_STATE_READ     0x08
      +#define FILE_STATE_WRITE 0x01
      +#define FILE_STATE_SCREEN 0x02
      +#define FILE_STATE_IMAGE 0x04
      +#define FILE_STATE_READ 0x08
       
      -#define IS_READABLE(Private)    (Private->FileState & FILE_STATE_READ)
      -#define IS_WRITEABLE(Private)   (Private->FileState & FILE_STATE_WRITE)
      +#define IS_READABLE(Private) (Private->FileState & FILE_STATE_READ)
      +#define IS_WRITEABLE(Private) (Private->FileState & FILE_STATE_WRITE)
       
       typedef struct GifFilePrivateType {
      -    GifWord FileState, FileHandle,  /* Where all this data goes to! */
      -      BitsPerPixel,     /* Bits per pixel (Codes uses at least this + 1). */
      -      ClearCode,   /* The CLEAR LZ code. */
      -      EOFCode,     /* The EOF LZ code. */
      -      RunningCode, /* The next code algorithm can generate. */
      -      RunningBits, /* The number of bits required to represent RunningCode. */
      -      MaxCode1,    /* 1 bigger than max. possible code, in RunningBits bits. */
      -      LastCode,    /* The code before the current code. */
      -      CrntCode,    /* Current algorithm code. */
      -      StackPtr,    /* For character stack (see below). */
      -      CrntShiftState;    /* Number of bits in CrntShiftDWord. */
      -    unsigned long CrntShiftDWord;   /* For bytes decomposition into codes. */
      -    unsigned long PixelCount;   /* Number of pixels in image. */
      -    FILE *File;    /* File as stream. */
      -    InputFunc Read;     /* function to read gif input (TVT) */
      -    OutputFunc Write;   /* function to write gif output (MRB) */
      -    GifByteType Buf[256];   /* Compressed input is buffered here. */
      +    GifWord FileState, FileHandle, /* Where all this data goes to! */
      +        BitsPerPixel, /* Bits per pixel (Codes uses at least this + 1). */
      +        ClearCode,    /* The CLEAR LZ code. */
      +        EOFCode,      /* The EOF LZ code. */
      +        RunningCode,  /* The next code algorithm can generate. */
      +        RunningBits,  /* The number of bits required to represent
      +                         RunningCode. */
      +        MaxCode1, /* 1 bigger than max. possible code, in RunningBits bits.
      +                   */
      +        LastCode, /* The code before the current code. */
      +        CrntCode, /* Current algorithm code. */
      +        StackPtr, /* For character stack (see below). */
      +        CrntShiftState;           /* Number of bits in CrntShiftDWord. */
      +    unsigned long CrntShiftDWord; /* For bytes decomposition into codes. */
      +    unsigned long PixelCount;     /* Number of pixels in image. */
      +    FILE *File;                   /* File as stream. */
      +    InputFunc Read;               /* function to read gif input (TVT) */
      +    OutputFunc Write;             /* function to write gif output (MRB) */
      +    GifByteType Buf[256];         /* Compressed input is buffered here. */
           GifByteType Stack[LZ_MAX_CODE]; /* Decoded pixels are stacked here. */
      -    GifByteType Suffix[LZ_MAX_CODE + 1];    /* So we can trace the codes. */
      +    GifByteType Suffix[LZ_MAX_CODE + 1]; /* So we can trace the codes. */
           GifPrefixType Prefix[LZ_MAX_CODE + 1];
           GifHashTableType *HashTable;
           bool gif89;
      diff --git a/src/java.desktop/share/native/libsplashscreen/giflib/gifalloc.c b/src/java.desktop/share/native/libsplashscreen/giflib/gifalloc.c
      index 75b74b4fba0..5aef3044558 100644
      --- a/src/java.desktop/share/native/libsplashscreen/giflib/gifalloc.c
      +++ b/src/java.desktop/share/native/libsplashscreen/giflib/gifalloc.c
      @@ -30,59 +30,59 @@ SPDX-License-Identifier: MIT
       
       ****************************************************************************/
       
      -#include 
       #include 
      +#include 
       #include 
       
       #include "gif_lib.h"
       #include "gif_lib_private.h"
       
      -#define MAX(x, y)    (((x) > (y)) ? (x) : (y))
      +#define MAX(x, y) (((x) > (y)) ? (x) : (y))
       
       /******************************************************************************
        Miscellaneous utility functions
       ******************************************************************************/
       
       /* return smallest bitfield size n will fit in */
      -int
      -GifBitSize(int n)
      -{
      +int GifBitSize(int n) {
           register int i;
       
      -    for (i = 1; i <= 8; i++)
      -        if ((1 << i) >= n)
      +    for (i = 1; i <= 8; i++) {
      +        if ((1 << i) >= n) {
                   break;
      +        }
      +    }
           return (i);
       }
       
       /******************************************************************************
      -  Color map object functions
      + Color map object functions
       ******************************************************************************/
       
       /*
        * Allocate a color map of given size; initialize with contents of
        * ColorMap if that pointer is non-NULL.
        */
      -ColorMapObject *
      -GifMakeMapObject(int ColorCount, const GifColorType *ColorMap)
      -{
      +ColorMapObject *GifMakeMapObject(int ColorCount, const GifColorType *ColorMap) {
           ColorMapObject *Object;
       
           /*** FIXME: Our ColorCount has to be a power of two.  Is it necessary to
      -     * make the user know that or should we automatically round up instead? */
      +     * make the user know that or should we automatically round up instead?
      +     */
           if (ColorCount != (1 << GifBitSize(ColorCount))) {
      -        return ((ColorMapObject *) NULL);
      +        return ((ColorMapObject *)NULL);
           }
       
           Object = (ColorMapObject *)malloc(sizeof(ColorMapObject));
      -    if (Object == (ColorMapObject *) NULL) {
      -        return ((ColorMapObject *) NULL);
      +    if (Object == (ColorMapObject *)NULL) {
      +        return ((ColorMapObject *)NULL);
           }
       
      -    Object->Colors = (GifColorType *)calloc(ColorCount, sizeof(GifColorType));
      -    if (Object->Colors == (GifColorType *) NULL) {
      +    Object->Colors =
      +        (GifColorType *)calloc(ColorCount, sizeof(GifColorType));
      +    if (Object->Colors == (GifColorType *)NULL) {
               free(Object);
      -        return ((ColorMapObject *) NULL);
      +        return ((ColorMapObject *)NULL);
           }
       
           Object->ColorCount = ColorCount;
      @@ -90,19 +90,17 @@ GifMakeMapObject(int ColorCount, const GifColorType *ColorMap)
           Object->SortFlag = false;
       
           if (ColorMap != NULL) {
      -        memcpy((char *)Object->Colors,
      -               (char *)ColorMap, ColorCount * sizeof(GifColorType));
      +        memcpy((char *)Object->Colors, (char *)ColorMap,
      +               ColorCount * sizeof(GifColorType));
           }
       
           return (Object);
       }
       
       /*******************************************************************************
      -Free a color map object
      + Free a color map object
       *******************************************************************************/
      -void
      -GifFreeMapObject(ColorMapObject *Object)
      -{
      +void GifFreeMapObject(ColorMapObject *Object) {
           if (Object != NULL) {
               (void)free(Object->Colors);
               (void)free(Object);
      @@ -110,17 +108,14 @@ GifFreeMapObject(ColorMapObject *Object)
       }
       
       #ifdef DEBUG
      -void
      -DumpColorMap(ColorMapObject *Object,
      -             FILE * fp)
      -{
      +void DumpColorMap(ColorMapObject *Object, FILE *fp) {
           if (Object != NULL) {
               int i, j, Len = Object->ColorCount;
       
               for (i = 0; i < Len; i += 4) {
                   for (j = 0; j < 4 && j < Len; j++) {
      -                (void)fprintf(fp, "%3d: %02x %02x %02x   ", i + j,
      -                              Object->Colors[i + j].Red,
      +                (void)fprintf(fp, "%3d: %02x %02x %02x   ",
      +                              i + j, Object->Colors[i + j].Red,
                                     Object->Colors[i + j].Green,
                                     Object->Colors[i + j].Blue);
                   }
      @@ -137,11 +132,9 @@ DumpColorMap(ColorMapObject *Object,
        copied iff they didn't exist before.  ColorTransIn2 maps the old
        ColorIn2 into the ColorUnion color map table./
       *******************************************************************************/
      -ColorMapObject *
      -GifUnionColorMap(const ColorMapObject *ColorIn1,
      -              const ColorMapObject *ColorIn2,
      -              GifPixelType ColorTransIn2[])
      -{
      +ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1,
      +                                 const ColorMapObject *ColorIn2,
      +                                 GifPixelType ColorTransIn2[]) {
           int i, j, CrntSlot, RoundUpTo, NewGifBitSize;
           ColorMapObject *ColorUnion;
       
      @@ -152,17 +145,19 @@ GifUnionColorMap(const ColorMapObject *ColorIn1,
            */
       
           /* Allocate table which will hold the result for sure. */
      -    ColorUnion = GifMakeMapObject(MAX(ColorIn1->ColorCount,
      -                               ColorIn2->ColorCount) * 2, NULL);
      +    ColorUnion = GifMakeMapObject(
      +        MAX(ColorIn1->ColorCount, ColorIn2->ColorCount) * 2, NULL);
       
      -    if (ColorUnion == NULL)
      +    if (ColorUnion == NULL) {
               return (NULL);
      +    }
       
           /*
            * Copy ColorIn1 to ColorUnion.
            */
      -    for (i = 0; i < ColorIn1->ColorCount; i++)
      +    for (i = 0; i < ColorIn1->ColorCount; i++) {
               ColorUnion->Colors[i] = ColorIn1->Colors[i];
      +    }
           CrntSlot = ColorIn1->ColorCount;
       
           /*
      @@ -172,22 +167,25 @@ GifUnionColorMap(const ColorMapObject *ColorIn1,
            * of table 1.  This is very useful if your display is limited to
            * 16 colors.
            */
      -    while (ColorIn1->Colors[CrntSlot - 1].Red == 0
      -           && ColorIn1->Colors[CrntSlot - 1].Green == 0
      -           && ColorIn1->Colors[CrntSlot - 1].Blue == 0)
      +    while (ColorIn1->Colors[CrntSlot - 1].Red == 0 &&
      +           ColorIn1->Colors[CrntSlot - 1].Green == 0 &&
      +           ColorIn1->Colors[CrntSlot - 1].Blue == 0) {
               CrntSlot--;
      +    }
       
           /* Copy ColorIn2 to ColorUnion (use old colors if they exist): */
           for (i = 0; i < ColorIn2->ColorCount && CrntSlot <= 256; i++) {
               /* Let's see if this color already exists: */
      -        for (j = 0; j < ColorIn1->ColorCount; j++)
      -            if (memcmp (&ColorIn1->Colors[j], &ColorIn2->Colors[i],
      -                        sizeof(GifColorType)) == 0)
      +        for (j = 0; j < ColorIn1->ColorCount; j++) {
      +            if (memcmp(&ColorIn1->Colors[j], &ColorIn2->Colors[i],
      +                       sizeof(GifColorType)) == 0) {
                       break;
      +            }
      +        }
       
      -        if (j < ColorIn1->ColorCount)
      -            ColorTransIn2[i] = j;    /* color exists in Color1 */
      -        else {
      +        if (j < ColorIn1->ColorCount) {
      +            ColorTransIn2[i] = j; /* color exists in Color1 */
      +        } else {
                   /* Color is new - copy it to a new slot: */
                   ColorUnion->Colors[CrntSlot] = ColorIn2->Colors[i];
                   ColorTransIn2[i] = CrntSlot++;
      @@ -196,7 +194,7 @@ GifUnionColorMap(const ColorMapObject *ColorIn1,
       
           if (CrntSlot > 256) {
               GifFreeMapObject(ColorUnion);
      -        return ((ColorMapObject *) NULL);
      +        return ((ColorMapObject *)NULL);
           }
       
           NewGifBitSize = GifBitSize(CrntSlot);
      @@ -210,16 +208,17 @@ GifUnionColorMap(const ColorMapObject *ColorIn1,
                * We know these slots exist because of the way ColorUnion's
                * start dimension was computed.
                */
      -        for (j = CrntSlot; j < RoundUpTo; j++)
      +        for (j = CrntSlot; j < RoundUpTo; j++) {
                   Map[j].Red = Map[j].Green = Map[j].Blue = 0;
      +        }
       
               /* perhaps we can shrink the map? */
               if (RoundUpTo < ColorUnion->ColorCount) {
      -            GifColorType *new_map = (GifColorType *)reallocarray(Map,
      -                                 RoundUpTo, sizeof(GifColorType));
      -            if( new_map == NULL ) {
      +            GifColorType *new_map = (GifColorType *)reallocarray(
      +                Map, RoundUpTo, sizeof(GifColorType));
      +            if (new_map == NULL) {
                       GifFreeMapObject(ColorUnion);
      -                return ((ColorMapObject *) NULL);
      +                return ((ColorMapObject *)NULL);
                   }
                   ColorUnion->Colors = new_map;
               }
      @@ -234,49 +233,49 @@ GifUnionColorMap(const ColorMapObject *ColorIn1,
       /*******************************************************************************
        Apply a given color translation to the raster bits of an image
       *******************************************************************************/
      -void
      -GifApplyTranslation(SavedImage *Image, GifPixelType Translation[])
      -{
      +void GifApplyTranslation(SavedImage *Image, const GifPixelType Translation[]) {
           register int i;
      -    register int RasterSize = Image->ImageDesc.Height * Image->ImageDesc.Width;
      +    register int RasterSize =
      +        Image->ImageDesc.Height * Image->ImageDesc.Width;
       
      -    for (i = 0; i < RasterSize; i++)
      +    for (i = 0; i < RasterSize; i++) {
               Image->RasterBits[i] = Translation[Image->RasterBits[i]];
      +    }
       }
       
       /******************************************************************************
        Extension record functions
       ******************************************************************************/
      -int
      -GifAddExtensionBlock(int *ExtensionBlockCount,
      -                     ExtensionBlock **ExtensionBlocks,
      -                     int Function,
      -                     unsigned int Len,
      -                     unsigned char ExtData[])
      -{
      +int GifAddExtensionBlock(int *ExtensionBlockCount,
      +                         ExtensionBlock **ExtensionBlocks, int Function,
      +                         unsigned int Len, unsigned char ExtData[]) {
           ExtensionBlock *ep;
       
      -    if (*ExtensionBlocks == NULL)
      -        *ExtensionBlocks=(ExtensionBlock *)malloc(sizeof(ExtensionBlock));
      -    else {
      -        ExtensionBlock* ep_new = (ExtensionBlock *)reallocarray
      -                                      (*ExtensionBlocks, (*ExtensionBlockCount + 1),
      -                                      sizeof(ExtensionBlock));
      -        if( ep_new == NULL )
      +    if (*ExtensionBlocks == NULL) {
      +        *ExtensionBlocks =
      +            (ExtensionBlock *)malloc(sizeof(ExtensionBlock));
      +    } else {
      +        ExtensionBlock *ep_new = (ExtensionBlock *)reallocarray(
      +            *ExtensionBlocks, (*ExtensionBlockCount + 1),
      +            sizeof(ExtensionBlock));
      +        if (ep_new == NULL) {
                   return (GIF_ERROR);
      +        }
               *ExtensionBlocks = ep_new;
           }
       
      -    if (*ExtensionBlocks == NULL)
      +    if (*ExtensionBlocks == NULL) {
               return (GIF_ERROR);
      +    }
       
           ep = &(*ExtensionBlocks)[(*ExtensionBlockCount)++];
       
           ep->Function = Function;
      -    ep->ByteCount=Len;
      +    ep->ByteCount = Len;
           ep->Bytes = (GifByteType *)malloc(ep->ByteCount);
      -    if (ep->Bytes == NULL)
      +    if (ep->Bytes == NULL) {
               return (GIF_ERROR);
      +    }
       
           if (ExtData != NULL) {
               memcpy(ep->Bytes, ExtData, Len);
      @@ -285,38 +284,36 @@ GifAddExtensionBlock(int *ExtensionBlockCount,
           return (GIF_OK);
       }
       
      -void
      -GifFreeExtensions(int *ExtensionBlockCount,
      -                  ExtensionBlock **ExtensionBlocks)
      -{
      +void GifFreeExtensions(int *ExtensionBlockCount,
      +                       ExtensionBlock **ExtensionBlocks) {
           ExtensionBlock *ep;
       
      -    if (*ExtensionBlocks == NULL)
      +    if (*ExtensionBlocks == NULL) {
               return;
      +    }
       
           for (ep = *ExtensionBlocks;
      -         ep < (*ExtensionBlocks + *ExtensionBlockCount);
      -         ep++)
      +         ep < (*ExtensionBlocks + *ExtensionBlockCount); ep++) {
               (void)free((char *)ep->Bytes);
      +    }
           (void)free((char *)*ExtensionBlocks);
           *ExtensionBlocks = NULL;
           *ExtensionBlockCount = 0;
       }
       
       /******************************************************************************
      - Image block allocation functions
      +   Image block allocation functions
       ******************************************************************************/
       
       /* Private Function:
        * Frees the last image in the GifFile->SavedImages array
        */
      -void
      -FreeLastSavedImage(GifFileType *GifFile)
      -{
      +void FreeLastSavedImage(GifFileType *GifFile) {
           SavedImage *sp;
       
      -    if ((GifFile == NULL) || (GifFile->SavedImages == NULL))
      +    if ((GifFile == NULL) || (GifFile->SavedImages == NULL)) {
               return;
      +    }
       
           /* Remove one SavedImage from the GifFile */
           GifFile->ImageCount--;
      @@ -329,54 +326,58 @@ FreeLastSavedImage(GifFileType *GifFile)
           }
       
           /* Deallocate the image data */
      -    if (sp->RasterBits != NULL)
      +    if (sp->RasterBits != NULL) {
               free((char *)sp->RasterBits);
      +    }
       
           /* Deallocate any extensions */
           GifFreeExtensions(&sp->ExtensionBlockCount, &sp->ExtensionBlocks);
       
           /*** FIXME: We could realloc the GifFile->SavedImages structure but is
            * there a point to it? Saves some memory but we'd have to do it every
      -     * time.  If this is used in GifFreeSavedImages then it would be inefficient
      -     * (The whole array is going to be deallocated.)  If we just use it when
      -     * we want to free the last Image it's convenient to do it here.
      +     * time.  If this is used in GifFreeSavedImages then it would be
      +     * inefficient (The whole array is going to be deallocated.)  If we just
      +     * use it when we want to free the last Image it's convenient to do it
      +     * here.
            */
       }
       
       /*
        * Append an image block to the SavedImages array
        */
      -SavedImage *
      -GifMakeSavedImage(GifFileType *GifFile, const SavedImage *CopyFrom)
      -{
      -    if (GifFile->SavedImages == NULL)
      +SavedImage *GifMakeSavedImage(GifFileType *GifFile,
      +                              const SavedImage *CopyFrom) {
      +    // cppcheck-suppress ctunullpointer
      +    if (GifFile->SavedImages == NULL) {
               GifFile->SavedImages = (SavedImage *)malloc(sizeof(SavedImage));
      -    else {
      -        SavedImage* newSavedImages = (SavedImage *)reallocarray(GifFile->SavedImages,
      -                               (GifFile->ImageCount + 1), sizeof(SavedImage));
      -        if( newSavedImages == NULL)
      +    } else {
      +        SavedImage *newSavedImages = (SavedImage *)reallocarray(
      +            GifFile->SavedImages, (GifFile->ImageCount + 1),
      +            sizeof(SavedImage));
      +        if (newSavedImages == NULL) {
                   return ((SavedImage *)NULL);
      +        }
               GifFile->SavedImages = newSavedImages;
           }
      -    if (GifFile->SavedImages == NULL)
      +    if (GifFile->SavedImages == NULL) {
               return ((SavedImage *)NULL);
      -    else {
      +    } else {
               SavedImage *sp = &GifFile->SavedImages[GifFile->ImageCount++];
       
               if (CopyFrom != NULL) {
                   memcpy((char *)sp, CopyFrom, sizeof(SavedImage));
       
                   /*
      -             * Make our own allocated copies of the heap fields in the
      -             * copied record.  This guards against potential aliasing
      -             * problems.
      +             * Make our own allocated copies of the heap fields in
      +             * the copied record.  This guards against potential
      +             * aliasing problems.
                    */
       
                   /* first, the local color map */
                   if (CopyFrom->ImageDesc.ColorMap != NULL) {
                       sp->ImageDesc.ColorMap = GifMakeMapObject(
      -                                         CopyFrom->ImageDesc.ColorMap->ColorCount,
      -                                         CopyFrom->ImageDesc.ColorMap->Colors);
      +                    CopyFrom->ImageDesc.ColorMap->ColorCount,
      +                    CopyFrom->ImageDesc.ColorMap->Colors);
                       if (sp->ImageDesc.ColorMap == NULL) {
                           FreeLastSavedImage(GifFile);
                           return (SavedImage *)(NULL);
      @@ -384,32 +385,36 @@ GifMakeSavedImage(GifFileType *GifFile, const SavedImage *CopyFrom)
                   }
       
                   /* next, the raster */
      -            sp->RasterBits = (unsigned char *)reallocarray(NULL,
      -                                                  (CopyFrom->ImageDesc.Height *
      -                                                  CopyFrom->ImageDesc.Width),
      -                                                  sizeof(GifPixelType));
      +            sp->RasterBits = (unsigned char *)reallocarray(
      +                NULL,
      +                (CopyFrom->ImageDesc.Height *
      +                 CopyFrom->ImageDesc.Width),
      +                sizeof(GifPixelType));
                   if (sp->RasterBits == NULL) {
                       FreeLastSavedImage(GifFile);
                       return (SavedImage *)(NULL);
                   }
                   memcpy(sp->RasterBits, CopyFrom->RasterBits,
      -                   sizeof(GifPixelType) * CopyFrom->ImageDesc.Height *
      -                   CopyFrom->ImageDesc.Width);
      +                   sizeof(GifPixelType) *
      +                       CopyFrom->ImageDesc.Height *
      +                       CopyFrom->ImageDesc.Width);
       
                   /* finally, the extension blocks */
                   if (CopyFrom->ExtensionBlocks != NULL) {
      -                sp->ExtensionBlocks = (ExtensionBlock *)reallocarray(NULL,
      -                                      CopyFrom->ExtensionBlockCount,
      -                                      sizeof(ExtensionBlock));
      +                sp->ExtensionBlocks =
      +                    (ExtensionBlock *)reallocarray(
      +                        NULL, CopyFrom->ExtensionBlockCount,
      +                        sizeof(ExtensionBlock));
                       if (sp->ExtensionBlocks == NULL) {
                           FreeLastSavedImage(GifFile);
                           return (SavedImage *)(NULL);
                       }
      -                memcpy(sp->ExtensionBlocks, CopyFrom->ExtensionBlocks,
      -                       sizeof(ExtensionBlock) * CopyFrom->ExtensionBlockCount);
      +                memcpy(sp->ExtensionBlocks,
      +                       CopyFrom->ExtensionBlocks,
      +                       sizeof(ExtensionBlock) *
      +                           CopyFrom->ExtensionBlockCount);
                   }
      -        }
      -        else {
      +        } else {
                   memset((char *)sp, '\0', sizeof(SavedImage));
               }
       
      @@ -417,9 +422,7 @@ GifMakeSavedImage(GifFileType *GifFile, const SavedImage *CopyFrom)
           }
       }
       
      -void
      -GifFreeSavedImages(GifFileType *GifFile)
      -{
      +void GifFreeSavedImages(GifFileType *GifFile) {
           SavedImage *sp;
       
           if ((GifFile == NULL) || (GifFile->SavedImages == NULL)) {
      @@ -432,10 +435,12 @@ GifFreeSavedImages(GifFileType *GifFile)
                   sp->ImageDesc.ColorMap = NULL;
               }
       
      -        if (sp->RasterBits != NULL)
      +        if (sp->RasterBits != NULL) {
                   free((char *)sp->RasterBits);
      +        }
       
      -        GifFreeExtensions(&sp->ExtensionBlockCount, &sp->ExtensionBlocks);
      +        GifFreeExtensions(&sp->ExtensionBlockCount,
      +                          &sp->ExtensionBlocks);
           }
           free((char *)GifFile->SavedImages);
           GifFile->SavedImages = NULL;
      diff --git a/src/java.desktop/share/native/libsplashscreen/giflib/openbsd-reallocarray.c b/src/java.desktop/share/native/libsplashscreen/giflib/openbsd-reallocarray.c
      index 452df69d7cd..7420af674c5 100644
      --- a/src/java.desktop/share/native/libsplashscreen/giflib/openbsd-reallocarray.c
      +++ b/src/java.desktop/share/native/libsplashscreen/giflib/openbsd-reallocarray.c
      @@ -28,24 +28,22 @@
        * SPDX-License-Identifier: MIT
        */
       
      -#include 
       #include 
       #include 
       #include 
      +#include 
       
       #ifndef SIZE_MAX
      -    #define SIZE_MAX     UINTPTR_MAX
      +#define SIZE_MAX UINTPTR_MAX
       #endif
       
       /*
        * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX
        * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW
        */
      -#define MUL_NO_OVERFLOW    ((size_t)1 << (sizeof(size_t) * 4))
      +#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4))
       
      -void *
      -openbsd_reallocarray(void *optr, size_t nmemb, size_t size)
      -{
      +void *openbsd_reallocarray(void *optr, size_t nmemb, size_t size) {
           if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) &&
               nmemb > 0 && SIZE_MAX / nmemb < size) {
               errno = ENOMEM;
      @@ -93,7 +91,8 @@ openbsd_reallocarray(void *optr, size_t nmemb, size_t size)
            * fuzzing on one platform may not detect zero-size allocation
            * problems on other platforms.
            */
      -    if (size == 0 || nmemb == 0)
      +    if (size == 0 || nmemb == 0) {
               return NULL;
      +    }
           return realloc(optr, size * nmemb);
       }
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/CHANGES b/src/java.desktop/share/native/libsplashscreen/libpng/CHANGES
      index 2d8c585c0e7..441b57ecf1a 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/CHANGES
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/CHANGES
      @@ -6129,6 +6129,73 @@ Version 1.6.40 [June 21, 2023]
         Updated the configurations and the scripts for continuous integration.
         Cleaned up the code, the build scripts, and the documentation.
       
      +Version 1.6.41 [January 24, 2024]
      +  Added SIMD-optimized code for the LoongArch LSX hardware.
      +    (Contributed by GuXiWei, JinBo and ZhangLixia)
      +  Fixed the run-time discovery of MIPS MSA hardware.
      +    (Contributed by Sui Jingfeng)
      +  Fixed an off-by-one error in the function png_do_check_palette_indexes(),
      +    which failed to recognize errors that might have existed in the first
      +    column of a broken palette-encoded image. This was a benign regression
      +    accidentally introduced in libpng-1.6.33. No pixel was harmed.
      +    (Contributed by Adam Richter; reviewed by John Bowler)
      +  Fixed, improved and modernized the contrib/pngminus programs, i.e.,
      +    png2pnm.c and pnm2png.c
      +  Removed old and peculiar portability hacks that were meant to silence
      +    warnings issued by gcc version 7.1 alone.
      +    (Contributed by John Bowler)
      +  Fixed and modernized the CMake file, and raised the minimum required
      +    CMake version from 3.1 to 3.6.
      +    (Contributed by Clinton Ingram, Timothy Lyanguzov, Tyler Kropp, et al.)
      +  Allowed the configure script to disable the building of auxiliary tools
      +    and tests, thus catching up with the CMake file.
      +    (Contributed by Carlo Bramini)
      +  Fixed a build issue on Mac.
      +    (Contributed by Zixu Wang)
      +  Moved the Autoconf macro files to scripts/autoconf.
      +  Moved the CMake files (except for the main CMakeLists.txt) to
      +    scripts/cmake and moved the list of their contributing authors to
      +    scripts/cmake/AUTHORS.md
      +  Updated the CI configurations and scripts.
      +  Relicensed the CI scripts to the MIT License.
      +  Improved the test coverage.
      +    (Contributed by John Bowler)
      +
      +Version 1.6.42 [January 29, 2024]
      +  Fixed the implementation of the macro function png_check_sig().
      +    This was an API regression, introduced in libpng-1.6.41.
      +    (Reported by Matthieu Darbois)
      +  Fixed and updated the libpng manual.
      +
      +Version 1.6.43 [February 23, 2024]
      +  Fixed the row width check in png_check_IHDR().
      +    This corrected a bug that was specific to the 16-bit platforms,
      +    and removed a spurious compiler warning from the 64-bit builds.
      +    (Reported by Jacek Caban; fixed by John Bowler)
      +  Added eXIf chunk support to the push-mode reader in pngpread.c.
      +    (Contributed by Chris Blume)
      +  Added contrib/pngexif for the benefit of the users who would like
      +    to inspect the content of eXIf chunks.
      +  Added contrib/conftest/basic.dfa, a basic build-time configuration.
      +    (Contributed by John Bowler)
      +  Fixed a preprocessor condition in pngread.c that broke build-time
      +    configurations like contrib/conftest/pngcp.dfa.
      +    (Contributed by John Bowler)
      +  Added CMake build support for LoongArch LSX.
      +    (Contributed by GuXiWei)
      +  Fixed a CMake build error that occurred under a peculiar state of the
      +    dependency tree. This was a regression introduced in libpng-1.6.41.
      +    (Contributed by Dan Rosser)
      +  Marked the installed libpng headers as system headers in CMake.
      +    (Contributed by Benjamin Buch)
      +  Updated the build support for RISCOS.
      +    (Contributed by Cameron Cawley)
      +  Updated the makefiles to allow cross-platform builds to initialize
      +    conventional make variables like AR and ARFLAGS.
      +  Added various improvements to the CI scripts in areas like version
      +    consistency verification and text linting.
      +  Added version consistency verification to pngtest.c also.
      +
       Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
       Subscription is required; visit
       https://lists.sourceforge.net/lists/listinfo/png-mng-implement
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/LICENSE b/src/java.desktop/share/native/libsplashscreen/libpng/LICENSE
      index 086d1c2fda6..25f298f0fcf 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/LICENSE
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/LICENSE
      @@ -4,8 +4,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
       PNG Reference Library License version 2
       ---------------------------------------
       
      - * Copyright (c) 1995-2023 The PNG Reference Library Authors.
      - * Copyright (c) 2018-2023 Cosmin Truta.
      + * Copyright (c) 1995-2024 The PNG Reference Library Authors.
      + * Copyright (c) 2018-2024 Cosmin Truta.
        * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
        * Copyright (c) 1996-1997 Andreas Dilger.
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/README b/src/java.desktop/share/native/libsplashscreen/libpng/README
      index dedd2c1639e..a6ca3ae9f94 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/README
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/README
      @@ -1,4 +1,4 @@
      -README for libpng version 1.6.40
      +README for libpng version 1.6.43
       ================================
       
       See the note about version numbers near the top of `png.h`.
      @@ -142,10 +142,11 @@ Files included in this distribution
           pngwrite.c    =>  High-level write functions
           pngwtran.c    =>  Write data transformations
           pngwutil.c    =>  Write utility functions
      -    arm/          =>  Optimized code for the ARM platform
      -    intel/        =>  Optimized code for the INTEL-SSE2 platform
      -    mips/         =>  Optimized code for the MIPS platform
      -    powerpc/      =>  Optimized code for the PowerPC platform
      +    arm/          =>  Optimized code for ARM Neon
      +    intel/        =>  Optimized code for INTEL SSE2
      +    loongarch/    =>  Optimized code for LoongArch LSX
      +    mips/         =>  Optimized code for MIPS MSA and MIPS MMI
      +    powerpc/      =>  Optimized code for PowerPC VSX
           ci/           =>  Scripts for continuous integration
           contrib/      =>  External contributions
               arm-neon/     =>  Optimized code for the ARM-NEON platform
      @@ -158,6 +159,7 @@ Files included in this distribution
               libtests/     =>  Test programs
               oss-fuzz/     =>  Files used by the OSS-Fuzz project for fuzz-testing
                                 libpng
      +        pngexif/      =>  Program to inspect the EXIF information in PNG files
               pngminim/     =>  Minimal decoder, encoder, and progressive decoder
                                 programs demonstrating the use of pngusr.dfa
               pngminus/     =>  Simple pnm2png and png2pnm programs
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/UPDATING.txt b/src/java.desktop/share/native/libsplashscreen/libpng/UPDATING.txt
      index 93c8f5bb703..88200db5d73 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/UPDATING.txt
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/UPDATING.txt
      @@ -37,18 +37,21 @@ and instead just tweak the existing one.
       
       First cd into the libpng folder and run the following script.
       
      +    shopt -s nullglob
           for f in *.c *.h;
      -    do
      -      # replace tabs with spaces
      -      expand ${f} > ${f}.tmp;
      -      mv ${f}.tmp $f;
      -
      -      # fix line endings to LF
      -      sed -i -e 's/\r$//g' ${f};
      -
      -      # remove trailing spaces
      -      sed -i -e 's/[ ]* $//g' ${f};
      -    done
      +         do
      +            # replace tabs with spaces
      +            expand ${f} > ${f}.tmp
      +            mv ${f}.tmp $f
      +
      +            # fix line endings to LF
      +            sed -e 's/\r$//g' ${f} > ${f}.tmp
      +            mv ${f}.tmp $f
      +
      +            # remove trailing spaces
      +            sed -e 's/[ ]* $//g' ${f} > ${f}.tmp
      +            mv ${f}.tmp $f
      +         done
       
       6) As with all native code, run it through the official build systems, in case
       the updated code trigger any fatal warnings with the official compilers.
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/png.c b/src/java.desktop/share/native/libsplashscreen/libpng/png.c
      index 91a92e5f718..232dff876c7 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/png.c
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/png.c
      @@ -29,7 +29,7 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        *
      - * Copyright (c) 2018-2023 Cosmin Truta
      + * Copyright (c) 2018-2024 Cosmin Truta
        * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
        * Copyright (c) 1996-1997 Andreas Dilger
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      @@ -42,27 +42,7 @@
       #include "pngpriv.h"
       
       /* Generate a compiler error if there is an old png.h in the search path. */
      -typedef png_libpng_version_1_6_40 Your_png_h_is_not_version_1_6_40;
      -
      -#ifdef __GNUC__
      -/* The version tests may need to be added to, but the problem warning has
      - * consistently been fixed in GCC versions which obtain wide-spread release.
      - * The problem is that many versions of GCC rearrange comparison expressions in
      - * the optimizer in such a way that the results of the comparison will change
      - * if signed integer overflow occurs.  Such comparisons are not permitted in
      - * ANSI C90, however GCC isn't clever enough to work out that that do not occur
      - * below in png_ascii_from_fp and png_muldiv, so it produces a warning with
      - * -Wextra.  Unfortunately this is highly dependent on the optimizer and the
      - * machine architecture so the warning comes and goes unpredictably and is
      - * impossible to "fix", even were that a good idea.
      - */
      -#if __GNUC__ == 7 && __GNUC_MINOR__ == 1
      -#define GCC_STRICT_OVERFLOW 1
      -#endif /* GNU 7.1.x */
      -#endif /* GNU */
      -#ifndef GCC_STRICT_OVERFLOW
      -#define GCC_STRICT_OVERFLOW 0
      -#endif
      +typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43;
       
       /* Tells libpng that we have already handled the first "num_bytes" bytes
        * of the PNG file signature.  If the PNG data is embedded into another
      @@ -101,21 +81,21 @@ png_set_sig_bytes(png_structrp png_ptr, int num_bytes)
       int PNGAPI
       png_sig_cmp(png_const_bytep sig, size_t start, size_t num_to_check)
       {
      -   png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
      +   static const png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
       
          if (num_to_check > 8)
             num_to_check = 8;
       
          else if (num_to_check < 1)
      -      return (-1);
      +      return -1;
       
          if (start > 7)
      -      return (-1);
      +      return -1;
       
          if (start + num_to_check > 8)
             num_to_check = 8 - start;
       
      -   return ((int)(memcmp(&sig[start], &png_signature[start], num_to_check)));
      +   return memcmp(&sig[start], &png_signature[start], num_to_check);
       }
       
       #endif /* READ */
      @@ -475,7 +455,6 @@ png_info_init_3,(png_infopp ptr_ptr, size_t png_info_struct_size),
          memset(info_ptr, 0, (sizeof *info_ptr));
       }
       
      -/* The following API is not called internally */
       void PNGAPI
       png_data_freer(png_const_structrp png_ptr, png_inforp info_ptr,
           int freer, png_uint_32 mask)
      @@ -714,9 +693,9 @@ png_voidp PNGAPI
       png_get_io_ptr(png_const_structrp png_ptr)
       {
          if (png_ptr == NULL)
      -      return (NULL);
      +      return NULL;
       
      -   return (png_ptr->io_ptr);
      +   return png_ptr->io_ptr;
       }
       
       #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
      @@ -780,7 +759,7 @@ png_convert_to_rfc1123_buffer(char out[29], png_const_timep ptime)
       
          {
             size_t pos = 0;
      -      char number_buf[5]; /* enough for a four-digit year */
      +      char number_buf[5] = {0, 0, 0, 0, 0}; /* enough for a four-digit year */
       
       #     define APPEND_STRING(string) pos = png_safecat(out, 29, pos, (string))
       #     define APPEND_NUMBER(format, value)\
      @@ -843,8 +822,8 @@ png_get_copyright(png_const_structrp png_ptr)
          return PNG_STRING_COPYRIGHT
       #else
          return PNG_STRING_NEWLINE \
      -      "libpng version 1.6.40" PNG_STRING_NEWLINE \
      -      "Copyright (c) 2018-2023 Cosmin Truta" PNG_STRING_NEWLINE \
      +      "libpng version 1.6.43" PNG_STRING_NEWLINE \
      +      "Copyright (c) 2018-2024 Cosmin Truta" PNG_STRING_NEWLINE \
             "Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
             PNG_STRING_NEWLINE \
             "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
      @@ -1005,7 +984,7 @@ png_reset_zstream(png_structrp png_ptr)
             return Z_STREAM_ERROR;
       
          /* WARNING: this resets the window bits to the maximum! */
      -   return (inflateReset(&png_ptr->zstream));
      +   return inflateReset(&png_ptr->zstream);
       }
       #endif /* READ */
       
      @@ -1014,7 +993,7 @@ png_uint_32 PNGAPI
       png_access_version_number(void)
       {
          /* Version of *.c files used when building libpng */
      -   return((png_uint_32)PNG_LIBPNG_VER);
      +   return (png_uint_32)PNG_LIBPNG_VER;
       }
       
       #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
      @@ -1870,14 +1849,14 @@ png_icc_profile_error(png_const_structrp png_ptr, png_colorspacerp colorspace,
          }
       #  ifdef PNG_WARNINGS_SUPPORTED
          else
      -      {
      -         char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */
      +   {
      +      char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */
       
      -         pos = png_safecat(message, (sizeof message), pos,
      -             png_format_number(number, number+(sizeof number),
      -             PNG_NUMBER_FORMAT_x, value));
      -         pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */
      -      }
      +      pos = png_safecat(message, (sizeof message), pos,
      +          png_format_number(number, number+(sizeof number),
      +          PNG_NUMBER_FORMAT_x, value));
      +      pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */
      +   }
       #  endif
          /* The 'reason' is an arbitrary message, allow +79 maximum 195 */
          pos = png_safecat(message, (sizeof message), pos, reason);
      @@ -2560,17 +2539,6 @@ png_colorspace_set_rgb_coefficients(png_structrp png_ptr)
       
       #endif /* COLORSPACE */
       
      -#ifdef __GNUC__
      -/* This exists solely to work round a warning from GNU C. */
      -static int /* PRIVATE */
      -png_gt(size_t a, size_t b)
      -{
      -   return a > b;
      -}
      -#else
      -#   define png_gt(a,b) ((a) > (b))
      -#endif
      -
       void /* PRIVATE */
       png_check_IHDR(png_const_structrp png_ptr,
           png_uint_32 width, png_uint_32 height, int bit_depth,
      @@ -2592,8 +2560,16 @@ png_check_IHDR(png_const_structrp png_ptr,
             error = 1;
          }
       
      -   if (png_gt(((width + 7) & (~7U)),
      -       ((PNG_SIZE_MAX
      +   /* The bit mask on the first line below must be at least as big as a
      +    * png_uint_32.  "~7U" is not adequate on 16-bit systems because it will
      +    * be an unsigned 16-bit value.  Casting to (png_alloc_size_t) makes the
      +    * type of the result at least as bit (in bits) as the RHS of the > operator
      +    * which also avoids a common warning on 64-bit systems that the comparison
      +    * of (png_uint_32) against the constant value on the RHS will always be
      +    * false.
      +    */
      +   if (((width + 7) & ~(png_alloc_size_t)7) >
      +       (((PNG_SIZE_MAX
                  - 48        /* big_row_buf hack */
                  - 1)        /* filter byte */
                  / 8)        /* 8-byte RGBA pixels */
      @@ -2919,14 +2895,6 @@ png_pow10(int power)
       /* Function to format a floating point value in ASCII with a given
        * precision.
        */
      -#if GCC_STRICT_OVERFLOW
      -#pragma GCC diagnostic push
      -/* The problem arises below with exp_b10, which can never overflow because it
      - * comes, originally, from frexp and is therefore limited to a range which is
      - * typically +/-710 (log2(DBL_MAX)/log2(DBL_MIN)).
      - */
      -#pragma GCC diagnostic warning "-Wstrict-overflow=2"
      -#endif /* GCC_STRICT_OVERFLOW */
       void /* PRIVATE */
       png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, size_t size,
           double fp, unsigned int precision)
      @@ -3248,10 +3216,6 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, size_t size,
          /* Here on buffer too small. */
          png_error(png_ptr, "ASCII conversion buffer too small");
       }
      -#if GCC_STRICT_OVERFLOW
      -#pragma GCC diagnostic pop
      -#endif /* GCC_STRICT_OVERFLOW */
      -
       #  endif /* FLOATING_POINT */
       
       #  ifdef PNG_FIXED_POINT_SUPPORTED
      @@ -3279,7 +3243,7 @@ png_ascii_from_fixed(png_const_structrp png_ptr, png_charp ascii,
             if (num <= 0x80000000) /* else overflowed */
             {
                unsigned int ndigits = 0, first = 16 /* flag value */;
      -         char digits[10];
      +         char digits[10] = {0};
       
                while (num)
                {
      @@ -3364,15 +3328,6 @@ png_fixed(png_const_structrp png_ptr, double fp, png_const_charp text)
        * the nearest .00001).  Overflow and divide by zero are signalled in
        * the result, a boolean - true on success, false on overflow.
        */
      -#if GCC_STRICT_OVERFLOW /* from above */
      -/* It is not obvious which comparison below gets optimized in such a way that
      - * signed overflow would change the result; looking through the code does not
      - * reveal any tests which have the form GCC complains about, so presumably the
      - * optimizer is moving an add or subtract into the 'if' somewhere.
      - */
      -#pragma GCC diagnostic push
      -#pragma GCC diagnostic warning "-Wstrict-overflow=2"
      -#endif /* GCC_STRICT_OVERFLOW */
       int
       png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times,
           png_int_32 divisor)
      @@ -3487,9 +3442,6 @@ png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times,
       
          return 0;
       }
      -#if GCC_STRICT_OVERFLOW
      -#pragma GCC diagnostic pop
      -#endif /* GCC_STRICT_OVERFLOW */
       #endif /* READ_GAMMA || INCH_CONVERSIONS */
       
       #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED)
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/png.h b/src/java.desktop/share/native/libsplashscreen/libpng/png.h
      index 578841c9580..9f61a773c1d 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/png.h
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/png.h
      @@ -29,9 +29,9 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        *
      - * libpng version 1.6.40
      + * libpng version 1.6.43
        *
      - * Copyright (c) 2018-2023 Cosmin Truta
      + * Copyright (c) 2018-2024 Cosmin Truta
        * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
        * Copyright (c) 1996-1997 Andreas Dilger
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      @@ -43,7 +43,7 @@
        *   libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
        *   libpng versions 0.97, January 1998, through 1.6.35, July 2018:
        *     Glenn Randers-Pehrson
      - *   libpng versions 1.6.36, December 2018, through 1.6.40, June 2023:
      + *   libpng versions 1.6.36, December 2018, through 1.6.43, February 2024:
        *     Cosmin Truta
        *   See also "Contributing Authors", below.
        */
      @@ -55,8 +55,8 @@
        * PNG Reference Library License version 2
        * ---------------------------------------
        *
      - *  * Copyright (c) 1995-2023 The PNG Reference Library Authors.
      - *  * Copyright (c) 2018-2023 Cosmin Truta.
      + *  * Copyright (c) 1995-2024 The PNG Reference Library Authors.
      + *  * Copyright (c) 2018-2024 Cosmin Truta.
        *  * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
        *  * Copyright (c) 1996-1997 Andreas Dilger.
        *  * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      @@ -267,7 +267,7 @@
        *    ...
        *    1.5.30                  15    10530  15.so.15.30[.0]
        *    ...
      - *    1.6.40                  16    10640  16.so.16.40[.0]
      + *    1.6.43                  16    10643  16.so.16.43[.0]
        *
        *    Henceforth the source version will match the shared-library major and
        *    minor numbers; the shared-library major version number will be used for
      @@ -283,9 +283,6 @@
        *    to the info_ptr or png_ptr members through png.h, and the compiled
        *    application is loaded with a different version of the library.
        *
      - *    DLLNUM will change each time there are forward or backward changes
      - *    in binary compatibility (e.g., when a new feature is added).
      - *
        * See libpng.txt or libpng.3 for more information.  The PNG specification
        * is available as a W3C Recommendation and as an ISO/IEC Standard; see
        * 
      @@ -306,19 +303,21 @@
        */
       
       /* Version information for png.h - this should match the version in png.c */
      -#define PNG_LIBPNG_VER_STRING "1.6.40"
      -#define PNG_HEADER_VERSION_STRING " libpng version 1.6.40 - June 21, 2023\n"
      +#define PNG_LIBPNG_VER_STRING "1.6.43"
      +#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"
       
      -#define PNG_LIBPNG_VER_SONUM   16
      -#define PNG_LIBPNG_VER_DLLNUM  16
      +/* The versions of shared library builds should stay in sync, going forward */
      +#define PNG_LIBPNG_VER_SHAREDLIB 16
      +#define PNG_LIBPNG_VER_SONUM     PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */
      +#define PNG_LIBPNG_VER_DLLNUM    PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */
       
       /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
       #define PNG_LIBPNG_VER_MAJOR   1
       #define PNG_LIBPNG_VER_MINOR   6
      -#define PNG_LIBPNG_VER_RELEASE 40
      +#define PNG_LIBPNG_VER_RELEASE 43
       
       /* This should be zero for a public release, or non-zero for a
      - * development version.  [Deprecated]
      + * development version.
        */
       #define PNG_LIBPNG_VER_BUILD  0
       
      @@ -346,7 +345,7 @@
        * From version 1.0.1 it is:
        * XXYYZZ, where XX=major, YY=minor, ZZ=release
        */
      -#define PNG_LIBPNG_VER 10640 /* 1.6.40 */
      +#define PNG_LIBPNG_VER 10643 /* 1.6.43 */
       
       /* Library configuration: these options cannot be changed after
        * the library has been built.
      @@ -456,7 +455,7 @@ extern "C" {
       /* This triggers a compiler error in png.c, if png.c and png.h
        * do not agree upon the version number.
        */
      -typedef char* png_libpng_version_1_6_40;
      +typedef char* png_libpng_version_1_6_43;
       
       /* Basic control structions.  Read libpng-manual.txt or libpng.3 for more info.
        *
      @@ -877,7 +876,7 @@ PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef);
       #define PNG_TRANSFORM_GRAY_TO_RGB   0x2000      /* read only */
       /* Added to libpng-1.5.4 */
       #define PNG_TRANSFORM_EXPAND_16     0x4000      /* read only */
      -#if INT_MAX >= 0x8000 /* else this might break */
      +#if ~0U > 0xffffU /* or else this might break on a 16-bit machine */
       #define PNG_TRANSFORM_SCALE_16      0x8000      /* read only */
       #endif
       
      @@ -936,15 +935,15 @@ PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes));
       /* Check sig[start] through sig[start + num_to_check - 1] to see if it's a
        * PNG file.  Returns zero if the supplied bytes match the 8-byte PNG
        * signature, and non-zero otherwise.  Having num_to_check == 0 or
      - * start > 7 will always fail (ie return non-zero).
      + * start > 7 will always fail (i.e. return non-zero).
        */
       PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, size_t start,
           size_t num_to_check));
       
       /* Simple signature checking function.  This is the same as calling
      - * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
      + * png_check_sig(sig, n) := (png_sig_cmp(sig, 0, n) == 0).
        */
      -#define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n))
      +#define png_check_sig(sig, n) (png_sig_cmp((sig), 0, (n)) == 0) /* DEPRECATED */
       
       /* Allocate and initialize png_ptr struct for reading, and any other memory. */
       PNG_EXPORTA(4, png_structp, png_create_read_struct,
      @@ -1758,12 +1757,9 @@ PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr));
       PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr,
           png_inforp info_ptr, png_uint_32 free_me, int num));
       
      -/* Reassign responsibility for freeing existing data, whether allocated
      +/* Reassign the responsibility for freeing existing data, whether allocated
        * by libpng or by the application; this works on the png_info structure passed
      - * in, it does not change the state for other png_info structures.
      - *
      - * It is unlikely that this function works correctly as of 1.6.0 and using it
      - * may result either in memory leaks or double free of allocated data.
      + * in, without changing the state for other png_info structures.
        */
       PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
           png_inforp info_ptr, int freer, png_uint_32 mask));
      @@ -3235,11 +3231,18 @@ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory,
       #ifdef PNG_MIPS_MSA_API_SUPPORTED
       #  define PNG_MIPS_MSA   6 /* HARDWARE: MIPS Msa SIMD instructions supported */
       #endif
      -#define PNG_IGNORE_ADLER32 8
      +#ifdef PNG_DISABLE_ADLER32_CHECK_SUPPORTED
      +#  define PNG_IGNORE_ADLER32 8 /* SOFTWARE: disable Adler32 check on IDAT */
      +#endif
       #ifdef PNG_POWERPC_VSX_API_SUPPORTED
      -#  define PNG_POWERPC_VSX   10 /* HARDWARE: PowerPC VSX SIMD instructions supported */
      +#  define PNG_POWERPC_VSX   10 /* HARDWARE: PowerPC VSX SIMD instructions
      +                                * supported */
       #endif
      -#define PNG_OPTION_NEXT  12 /* Next option - numbers must be even */
      +#ifdef PNG_MIPS_MMI_API_SUPPORTED
      +#  define PNG_MIPS_MMI   12 /* HARDWARE: MIPS MMI SIMD instructions supported */
      +#endif
      +
      +#define PNG_OPTION_NEXT  14 /* Next option - numbers must be even */
       
       /* Return values: NOTE: there are four values and 'off' is *not* zero */
       #define PNG_OPTION_UNSET   0 /* Unset - defaults to off */
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pngconf.h b/src/java.desktop/share/native/libsplashscreen/libpng/pngconf.h
      index 41cbc91d398..b3b441b1122 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/pngconf.h
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngconf.h
      @@ -29,9 +29,9 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        *
      - * libpng version 1.6.40
      + * libpng version 1.6.43
        *
      - * Copyright (c) 2018-2022 Cosmin Truta
      + * Copyright (c) 2018-2024 Cosmin Truta
        * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
        * Copyright (c) 1996-1997 Andreas Dilger
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pngerror.c b/src/java.desktop/share/native/libsplashscreen/libpng/pngerror.c
      index 623735f06f1..ea8dd172197 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/pngerror.c
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngerror.c
      @@ -29,7 +29,7 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        *
      - * Copyright (c) 2018 Cosmin Truta
      + * Copyright (c) 2018-2024 Cosmin Truta
        * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
        * Copyright (c) 1996-1997 Andreas Dilger
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      @@ -283,7 +283,7 @@ void
       png_warning_parameter_unsigned(png_warning_parameters p, int number, int format,
           png_alloc_size_t value)
       {
      -   char buffer[PNG_NUMBER_BUFFER_SIZE];
      +   char buffer[PNG_NUMBER_BUFFER_SIZE] = {0};
          png_warning_parameter(p, number, PNG_FORMAT_NUMBER(buffer, format, value));
       }
       
      @@ -293,7 +293,7 @@ png_warning_parameter_signed(png_warning_parameters p, int number, int format,
       {
          png_alloc_size_t u;
          png_charp str;
      -   char buffer[PNG_NUMBER_BUFFER_SIZE];
      +   char buffer[PNG_NUMBER_BUFFER_SIZE] = {0};
       
          /* Avoid overflow by doing the negate in a png_alloc_size_t: */
          u = (png_alloc_size_t)value;
      @@ -886,7 +886,7 @@ png_get_error_ptr(png_const_structrp png_ptr)
          if (png_ptr == NULL)
             return NULL;
       
      -   return ((png_voidp)png_ptr->error_ptr);
      +   return (png_voidp)png_ptr->error_ptr;
       }
       
       
      @@ -961,31 +961,25 @@ png_safe_warning(png_structp png_nonconst_ptr, png_const_charp warning_message)
       #endif
       
       int /* PRIVATE */
      -png_safe_execute(png_imagep image_in, int (*function)(png_voidp), png_voidp arg)
      +png_safe_execute(png_imagep image, int (*function)(png_voidp), png_voidp arg)
       {
      -   volatile png_imagep image = image_in;
      -   volatile int result;
      -   volatile png_voidp saved_error_buf;
      +   png_voidp saved_error_buf = image->opaque->error_buf;
          jmp_buf safe_jmpbuf;
      +   int result;
       
      -   /* Safely execute function(arg) with png_error returning to this function. */
      -   saved_error_buf = image->opaque->error_buf;
      -   result = setjmp(safe_jmpbuf) == 0;
      -
      -   if (result != 0)
      +   /* Safely execute function(arg), with png_error returning back here. */
      +   if (setjmp(safe_jmpbuf) == 0)
          {
      -
             image->opaque->error_buf = safe_jmpbuf;
             result = function(arg);
      +      image->opaque->error_buf = saved_error_buf;
      +      return result;
          }
       
      +   /* On png_error, return via longjmp, pop the jmpbuf, and free the image. */
          image->opaque->error_buf = saved_error_buf;
      -
      -   /* And do the cleanup prior to any failure return. */
      -   if (result == 0)
      -      png_image_free(image);
      -
      -   return result;
      +   png_image_free(image);
      +   return 0;
       }
       #endif /* SIMPLIFIED READ || SIMPLIFIED_WRITE */
       #endif /* READ || WRITE */
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pngget.c b/src/java.desktop/share/native/libsplashscreen/libpng/pngget.c
      index 6e510b27327..41e0a5abc3a 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/pngget.c
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngget.c
      @@ -29,7 +29,7 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        *
      - * Copyright (c) 2018-2023 Cosmin Truta
      + * Copyright (c) 2018-2024 Cosmin Truta
        * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
        * Copyright (c) 1996-1997 Andreas Dilger
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      @@ -56,22 +56,22 @@ png_get_valid(png_const_structrp png_ptr, png_const_inforp info_ptr,
              * valid tRNS chunk in this case.
              */
             if (flag == PNG_INFO_tRNS && png_ptr->num_trans == 0)
      -         return(0);
      +         return 0;
       #endif
       
      -      return(info_ptr->valid & flag);
      +      return info_ptr->valid & flag;
          }
       
      -   return(0);
      +   return 0;
       }
       
       size_t PNGAPI
       png_get_rowbytes(png_const_structrp png_ptr, png_const_inforp info_ptr)
       {
          if (png_ptr != NULL && info_ptr != NULL)
      -      return(info_ptr->rowbytes);
      +      return info_ptr->rowbytes;
       
      -   return(0);
      +   return 0;
       }
       
       #ifdef PNG_INFO_IMAGE_SUPPORTED
      @@ -79,9 +79,9 @@ png_bytepp PNGAPI
       png_get_rows(png_const_structrp png_ptr, png_const_inforp info_ptr)
       {
          if (png_ptr != NULL && info_ptr != NULL)
      -      return(info_ptr->row_pointers);
      +      return info_ptr->row_pointers;
       
      -   return(0);
      +   return 0;
       }
       #endif
       
      @@ -93,7 +93,7 @@ png_get_image_width(png_const_structrp png_ptr, png_const_inforp info_ptr)
          if (png_ptr != NULL && info_ptr != NULL)
             return info_ptr->width;
       
      -   return (0);
      +   return 0;
       }
       
       png_uint_32 PNGAPI
      @@ -102,7 +102,7 @@ png_get_image_height(png_const_structrp png_ptr, png_const_inforp info_ptr)
          if (png_ptr != NULL && info_ptr != NULL)
             return info_ptr->height;
       
      -   return (0);
      +   return 0;
       }
       
       png_byte PNGAPI
      @@ -111,7 +111,7 @@ png_get_bit_depth(png_const_structrp png_ptr, png_const_inforp info_ptr)
          if (png_ptr != NULL && info_ptr != NULL)
             return info_ptr->bit_depth;
       
      -   return (0);
      +   return 0;
       }
       
       png_byte PNGAPI
      @@ -120,7 +120,7 @@ png_get_color_type(png_const_structrp png_ptr, png_const_inforp info_ptr)
          if (png_ptr != NULL && info_ptr != NULL)
             return info_ptr->color_type;
       
      -   return (0);
      +   return 0;
       }
       
       png_byte PNGAPI
      @@ -129,7 +129,7 @@ png_get_filter_type(png_const_structrp png_ptr, png_const_inforp info_ptr)
          if (png_ptr != NULL && info_ptr != NULL)
             return info_ptr->filter_type;
       
      -   return (0);
      +   return 0;
       }
       
       png_byte PNGAPI
      @@ -138,7 +138,7 @@ png_get_interlace_type(png_const_structrp png_ptr, png_const_inforp info_ptr)
          if (png_ptr != NULL && info_ptr != NULL)
             return info_ptr->interlace_type;
       
      -   return (0);
      +   return 0;
       }
       
       png_byte PNGAPI
      @@ -147,7 +147,7 @@ png_get_compression_type(png_const_structrp png_ptr, png_const_inforp info_ptr)
          if (png_ptr != NULL && info_ptr != NULL)
             return info_ptr->compression_type;
       
      -   return (0);
      +   return 0;
       }
       
       png_uint_32 PNGAPI
      @@ -155,21 +155,20 @@ png_get_x_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp
          info_ptr)
       {
       #ifdef PNG_pHYs_SUPPORTED
      +   png_debug(1, "in png_get_x_pixels_per_meter");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_pHYs) != 0)
      -      {
      -         png_debug1(1, "in %s retrieval function",
      -             "png_get_x_pixels_per_meter");
      -
      -         if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
      -            return (info_ptr->x_pixels_per_unit);
      -      }
      +   {
      +      if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
      +         return info_ptr->x_pixels_per_unit;
      +   }
       #else
          PNG_UNUSED(png_ptr)
          PNG_UNUSED(info_ptr)
       #endif
       
      -   return (0);
      +   return 0;
       }
       
       png_uint_32 PNGAPI
      @@ -177,42 +176,41 @@ png_get_y_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp
           info_ptr)
       {
       #ifdef PNG_pHYs_SUPPORTED
      +   png_debug(1, "in png_get_y_pixels_per_meter");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_pHYs) != 0)
          {
      -      png_debug1(1, "in %s retrieval function",
      -          "png_get_y_pixels_per_meter");
      -
             if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
      -         return (info_ptr->y_pixels_per_unit);
      +         return info_ptr->y_pixels_per_unit;
          }
       #else
          PNG_UNUSED(png_ptr)
          PNG_UNUSED(info_ptr)
       #endif
       
      -   return (0);
      +   return 0;
       }
       
       png_uint_32 PNGAPI
       png_get_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp info_ptr)
       {
       #ifdef PNG_pHYs_SUPPORTED
      +   png_debug(1, "in png_get_pixels_per_meter");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_pHYs) != 0)
          {
      -      png_debug1(1, "in %s retrieval function", "png_get_pixels_per_meter");
      -
             if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER &&
                 info_ptr->x_pixels_per_unit == info_ptr->y_pixels_per_unit)
      -         return (info_ptr->x_pixels_per_unit);
      +         return info_ptr->x_pixels_per_unit;
          }
       #else
          PNG_UNUSED(png_ptr)
          PNG_UNUSED(info_ptr)
       #endif
       
      -   return (0);
      +   return 0;
       }
       
       #ifdef PNG_FLOATING_POINT_SUPPORTED
      @@ -221,21 +219,21 @@ png_get_pixel_aspect_ratio(png_const_structrp png_ptr, png_const_inforp
          info_ptr)
       {
       #ifdef PNG_READ_pHYs_SUPPORTED
      +   png_debug(1, "in png_get_pixel_aspect_ratio");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_pHYs) != 0)
          {
      -      png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio");
      -
             if (info_ptr->x_pixels_per_unit != 0)
      -         return ((float)((float)info_ptr->y_pixels_per_unit
      -             /(float)info_ptr->x_pixels_per_unit));
      +         return (float)info_ptr->y_pixels_per_unit
      +              / (float)info_ptr->x_pixels_per_unit;
          }
       #else
          PNG_UNUSED(png_ptr)
          PNG_UNUSED(info_ptr)
       #endif
       
      -   return ((float)0.0);
      +   return (float)0.0;
       }
       #endif
       
      @@ -245,6 +243,8 @@ png_get_pixel_aspect_ratio_fixed(png_const_structrp png_ptr,
           png_const_inforp info_ptr)
       {
       #ifdef PNG_READ_pHYs_SUPPORTED
      +   png_debug(1, "in png_get_pixel_aspect_ratio_fixed");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_pHYs) != 0 &&
              info_ptr->x_pixels_per_unit > 0 && info_ptr->y_pixels_per_unit > 0 &&
      @@ -253,8 +253,6 @@ png_get_pixel_aspect_ratio_fixed(png_const_structrp png_ptr,
          {
             png_fixed_point res;
       
      -      png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio_fixed");
      -
             /* The following casts work because a PNG 4 byte integer only has a valid
              * range of 0..2^31-1; otherwise the cast might overflow.
              */
      @@ -275,80 +273,80 @@ png_int_32 PNGAPI
       png_get_x_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr)
       {
       #ifdef PNG_oFFs_SUPPORTED
      +   png_debug(1, "in png_get_x_offset_microns");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_oFFs) != 0)
          {
      -      png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns");
      -
             if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER)
      -         return (info_ptr->x_offset);
      +         return info_ptr->x_offset;
          }
       #else
          PNG_UNUSED(png_ptr)
          PNG_UNUSED(info_ptr)
       #endif
       
      -   return (0);
      +   return 0;
       }
       
       png_int_32 PNGAPI
       png_get_y_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr)
       {
       #ifdef PNG_oFFs_SUPPORTED
      +   png_debug(1, "in png_get_y_offset_microns");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_oFFs) != 0)
          {
      -      png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns");
      -
             if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER)
      -         return (info_ptr->y_offset);
      +         return info_ptr->y_offset;
          }
       #else
          PNG_UNUSED(png_ptr)
          PNG_UNUSED(info_ptr)
       #endif
       
      -   return (0);
      +   return 0;
       }
       
       png_int_32 PNGAPI
       png_get_x_offset_pixels(png_const_structrp png_ptr, png_const_inforp info_ptr)
       {
       #ifdef PNG_oFFs_SUPPORTED
      +   png_debug(1, "in png_get_x_offset_pixels");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_oFFs) != 0)
          {
      -      png_debug1(1, "in %s retrieval function", "png_get_x_offset_pixels");
      -
             if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL)
      -         return (info_ptr->x_offset);
      +         return info_ptr->x_offset;
          }
       #else
          PNG_UNUSED(png_ptr)
          PNG_UNUSED(info_ptr)
       #endif
       
      -   return (0);
      +   return 0;
       }
       
       png_int_32 PNGAPI
       png_get_y_offset_pixels(png_const_structrp png_ptr, png_const_inforp info_ptr)
       {
       #ifdef PNG_oFFs_SUPPORTED
      +   png_debug(1, "in png_get_y_offset_pixels");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_oFFs) != 0)
          {
      -      png_debug1(1, "in %s retrieval function", "png_get_y_offset_pixels");
      -
             if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL)
      -         return (info_ptr->y_offset);
      +         return info_ptr->y_offset;
          }
       #else
          PNG_UNUSED(png_ptr)
          PNG_UNUSED(info_ptr)
       #endif
       
      -   return (0);
      +   return 0;
       }
       
       #ifdef PNG_INCH_CONVERSIONS_SUPPORTED
      @@ -462,11 +460,11 @@ png_get_pHYs_dpi(png_const_structrp png_ptr, png_const_inforp info_ptr,
       {
          png_uint_32 retval = 0;
       
      +   png_debug1(1, "in %s retrieval function", "pHYs");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_pHYs) != 0)
          {
      -      png_debug1(1, "in %s retrieval function", "pHYs");
      -
             if (res_x != NULL)
             {
                *res_x = info_ptr->x_pixels_per_unit;
      @@ -492,7 +490,7 @@ png_get_pHYs_dpi(png_const_structrp png_ptr, png_const_inforp info_ptr,
             }
          }
       
      -   return (retval);
      +   return retval;
       }
       #endif /* pHYs */
       #endif /* INCH_CONVERSIONS */
      @@ -506,9 +504,9 @@ png_byte PNGAPI
       png_get_channels(png_const_structrp png_ptr, png_const_inforp info_ptr)
       {
          if (png_ptr != NULL && info_ptr != NULL)
      -      return(info_ptr->channels);
      +      return info_ptr->channels;
       
      -   return (0);
      +   return 0;
       }
       
       #ifdef PNG_READ_SUPPORTED
      @@ -516,9 +514,9 @@ png_const_bytep PNGAPI
       png_get_signature(png_const_structrp png_ptr, png_const_inforp info_ptr)
       {
          if (png_ptr != NULL && info_ptr != NULL)
      -      return(info_ptr->signature);
      +      return info_ptr->signature;
       
      -   return (NULL);
      +   return NULL;
       }
       #endif
       
      @@ -527,17 +525,17 @@ png_uint_32 PNGAPI
       png_get_bKGD(png_const_structrp png_ptr, png_inforp info_ptr,
           png_color_16p *background)
       {
      +   png_debug1(1, "in %s retrieval function", "bKGD");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_bKGD) != 0 &&
              background != NULL)
          {
      -      png_debug1(1, "in %s retrieval function", "bKGD");
      -
             *background = &(info_ptr->background);
      -      return (PNG_INFO_bKGD);
      +      return PNG_INFO_bKGD;
          }
       
      -   return (0);
      +   return 0;
       }
       #endif
       
      @@ -552,6 +550,8 @@ png_get_cHRM(png_const_structrp png_ptr, png_const_inforp info_ptr,
           double *white_x, double *white_y, double *red_x, double *red_y,
           double *green_x, double *green_y, double *blue_x, double *blue_y)
       {
      +   png_debug1(1, "in %s retrieval function", "cHRM");
      +
          /* Quiet API change: this code used to only return the end points if a cHRM
           * chunk was present, but the end points can also come from iCCP or sRGB
           * chunks, so in 1.6.0 the png_get_ APIs return the end points regardless and
      @@ -561,8 +561,6 @@ png_get_cHRM(png_const_structrp png_ptr, png_const_inforp info_ptr,
          if (png_ptr != NULL && info_ptr != NULL &&
             (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
          {
      -      png_debug1(1, "in %s retrieval function", "cHRM");
      -
             if (white_x != NULL)
                *white_x = png_float(png_ptr,
                    info_ptr->colorspace.end_points_xy.whitex, "cHRM white X");
      @@ -587,10 +585,10 @@ png_get_cHRM(png_const_structrp png_ptr, png_const_inforp info_ptr,
             if (blue_y != NULL)
                *blue_y = png_float(png_ptr, info_ptr->colorspace.end_points_xy.bluey,
                    "cHRM blue Y");
      -      return (PNG_INFO_cHRM);
      +      return PNG_INFO_cHRM;
          }
       
      -   return (0);
      +   return 0;
       }
       
       png_uint_32 PNGAPI
      @@ -599,11 +597,11 @@ png_get_cHRM_XYZ(png_const_structrp png_ptr, png_const_inforp info_ptr,
           double *green_Y, double *green_Z, double *blue_X, double *blue_Y,
           double *blue_Z)
       {
      +   png_debug1(1, "in %s retrieval function", "cHRM_XYZ(float)");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
          {
      -      png_debug1(1, "in %s retrieval function", "cHRM_XYZ(float)");
      -
             if (red_X != NULL)
                *red_X = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.red_X,
                    "cHRM red X");
      @@ -631,10 +629,10 @@ png_get_cHRM_XYZ(png_const_structrp png_ptr, png_const_inforp info_ptr,
             if (blue_Z != NULL)
                *blue_Z = png_float(png_ptr,
                    info_ptr->colorspace.end_points_XYZ.blue_Z, "cHRM blue Z");
      -      return (PNG_INFO_cHRM);
      +      return PNG_INFO_cHRM;
          }
       
      -   return (0);
      +   return 0;
       }
       #  endif
       
      @@ -647,11 +645,11 @@ png_get_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
           png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y,
           png_fixed_point *int_blue_Z)
       {
      +   png_debug1(1, "in %s retrieval function", "cHRM_XYZ");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
             (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
          {
      -      png_debug1(1, "in %s retrieval function", "cHRM_XYZ");
      -
             if (int_red_X != NULL)
                *int_red_X = info_ptr->colorspace.end_points_XYZ.red_X;
             if (int_red_Y != NULL)
      @@ -670,10 +668,10 @@ png_get_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
                *int_blue_Y = info_ptr->colorspace.end_points_XYZ.blue_Y;
             if (int_blue_Z != NULL)
                *int_blue_Z = info_ptr->colorspace.end_points_XYZ.blue_Z;
      -      return (PNG_INFO_cHRM);
      +      return PNG_INFO_cHRM;
          }
       
      -   return (0);
      +   return 0;
       }
       
       png_uint_32 PNGAPI
      @@ -703,10 +701,10 @@ png_get_cHRM_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
                *blue_x = info_ptr->colorspace.end_points_xy.bluex;
             if (blue_y != NULL)
                *blue_y = info_ptr->colorspace.end_points_xy.bluey;
      -      return (PNG_INFO_cHRM);
      +      return PNG_INFO_cHRM;
          }
       
      -   return (0);
      +   return 0;
       }
       #  endif
       #endif
      @@ -724,10 +722,10 @@ png_get_gAMA_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
              file_gamma != NULL)
          {
             *file_gamma = info_ptr->colorspace.gamma;
      -      return (PNG_INFO_gAMA);
      +      return PNG_INFO_gAMA;
          }
       
      -   return (0);
      +   return 0;
       }
       #  endif
       
      @@ -744,10 +742,10 @@ png_get_gAMA(png_const_structrp png_ptr, png_const_inforp info_ptr,
          {
             *file_gamma = png_float(png_ptr, info_ptr->colorspace.gamma,
                 "png_get_gAMA");
      -      return (PNG_INFO_gAMA);
      +      return PNG_INFO_gAMA;
          }
       
      -   return (0);
      +   return 0;
       }
       #  endif
       #endif
      @@ -763,10 +761,10 @@ png_get_sRGB(png_const_structrp png_ptr, png_const_inforp info_ptr,
             (info_ptr->valid & PNG_INFO_sRGB) != 0 && file_srgb_intent != NULL)
          {
             *file_srgb_intent = info_ptr->colorspace.rendering_intent;
      -      return (PNG_INFO_sRGB);
      +      return PNG_INFO_sRGB;
          }
       
      -   return (0);
      +   return 0;
       }
       #endif
       
      @@ -790,10 +788,10 @@ png_get_iCCP(png_const_structrp png_ptr, png_inforp info_ptr,
              */
             if (compression_type != NULL)
                *compression_type = PNG_COMPRESSION_TYPE_BASE;
      -      return (PNG_INFO_iCCP);
      +      return PNG_INFO_iCCP;
          }
       
      -   return (0);
      +   return 0;
       
       }
       #endif
      @@ -803,13 +801,15 @@ int PNGAPI
       png_get_sPLT(png_const_structrp png_ptr, png_inforp info_ptr,
           png_sPLT_tpp spalettes)
       {
      +   png_debug1(1, "in %s retrieval function", "sPLT");
      +
          if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL)
          {
             *spalettes = info_ptr->splt_palettes;
             return info_ptr->splt_palettes_num;
          }
       
      -   return (0);
      +   return 0;
       }
       #endif
       
      @@ -835,10 +835,10 @@ png_get_eXIf_1(png_const_structrp png_ptr, png_const_inforp info_ptr,
          {
             *num_exif = info_ptr->num_exif;
             *exif = info_ptr->exif;
      -      return (PNG_INFO_eXIf);
      +      return PNG_INFO_eXIf;
          }
       
      -   return (0);
      +   return 0;
       }
       #endif
       
      @@ -853,10 +853,10 @@ png_get_hIST(png_const_structrp png_ptr, png_inforp info_ptr,
              (info_ptr->valid & PNG_INFO_hIST) != 0 && hist != NULL)
          {
             *hist = info_ptr->hist;
      -      return (PNG_INFO_hIST);
      +      return PNG_INFO_hIST;
          }
       
      -   return (0);
      +   return 0;
       }
       #endif
       
      @@ -869,7 +869,7 @@ png_get_IHDR(png_const_structrp png_ptr, png_const_inforp info_ptr,
          png_debug1(1, "in %s retrieval function", "IHDR");
       
          if (png_ptr == NULL || info_ptr == NULL)
      -      return (0);
      +      return 0;
       
          if (width != NULL)
              *width = info_ptr->width;
      @@ -901,7 +901,7 @@ png_get_IHDR(png_const_structrp png_ptr, png_const_inforp info_ptr,
              info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type,
              info_ptr->compression_type, info_ptr->filter_type);
       
      -   return (1);
      +   return 1;
       }
       
       #ifdef PNG_oFFs_SUPPORTED
      @@ -918,10 +918,10 @@ png_get_oFFs(png_const_structrp png_ptr, png_const_inforp info_ptr,
             *offset_x = info_ptr->x_offset;
             *offset_y = info_ptr->y_offset;
             *unit_type = (int)info_ptr->offset_unit_type;
      -      return (PNG_INFO_oFFs);
      +      return PNG_INFO_oFFs;
          }
       
      -   return (0);
      +   return 0;
       }
       #endif
       
      @@ -945,10 +945,10 @@ png_get_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
             *nparams = (int)info_ptr->pcal_nparams;
             *units = info_ptr->pcal_units;
             *params = info_ptr->pcal_params;
      -      return (PNG_INFO_pCAL);
      +      return PNG_INFO_pCAL;
          }
       
      -   return (0);
      +   return 0;
       }
       #endif
       
      @@ -960,6 +960,8 @@ png_uint_32 PNGAPI
       png_get_sCAL_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
           int *unit, png_fixed_point *width, png_fixed_point *height)
       {
      +   png_debug1(1, "in %s retrieval function", "sCAL");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_sCAL) != 0)
          {
      @@ -971,10 +973,10 @@ png_get_sCAL_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
             *width = png_fixed(png_ptr, atof(info_ptr->scal_s_width), "sCAL width");
             *height = png_fixed(png_ptr, atof(info_ptr->scal_s_height),
                 "sCAL height");
      -      return (PNG_INFO_sCAL);
      +      return PNG_INFO_sCAL;
          }
       
      -   return(0);
      +   return 0;
       }
       #    endif /* FLOATING_ARITHMETIC */
       #  endif /* FIXED_POINT */
      @@ -983,32 +985,36 @@ png_uint_32 PNGAPI
       png_get_sCAL(png_const_structrp png_ptr, png_const_inforp info_ptr,
           int *unit, double *width, double *height)
       {
      +   png_debug1(1, "in %s retrieval function", "sCAL(float)");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_sCAL) != 0)
          {
             *unit = info_ptr->scal_unit;
             *width = atof(info_ptr->scal_s_width);
             *height = atof(info_ptr->scal_s_height);
      -      return (PNG_INFO_sCAL);
      +      return PNG_INFO_sCAL;
          }
       
      -   return(0);
      +   return 0;
       }
       #  endif /* FLOATING POINT */
       png_uint_32 PNGAPI
       png_get_sCAL_s(png_const_structrp png_ptr, png_const_inforp info_ptr,
           int *unit, png_charpp width, png_charpp height)
       {
      +   png_debug1(1, "in %s retrieval function", "sCAL(str)");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_sCAL) != 0)
          {
             *unit = info_ptr->scal_unit;
             *width = info_ptr->scal_s_width;
             *height = info_ptr->scal_s_height;
      -      return (PNG_INFO_sCAL);
      +      return PNG_INFO_sCAL;
          }
       
      -   return(0);
      +   return 0;
       }
       #endif /* sCAL */
       
      @@ -1043,7 +1049,7 @@ png_get_pHYs(png_const_structrp png_ptr, png_const_inforp info_ptr,
             }
          }
       
      -   return (retval);
      +   return retval;
       }
       #endif /* pHYs */
       
      @@ -1059,10 +1065,10 @@ png_get_PLTE(png_const_structrp png_ptr, png_inforp info_ptr,
             *palette = info_ptr->palette;
             *num_palette = info_ptr->num_palette;
             png_debug1(3, "num_palette = %d", *num_palette);
      -      return (PNG_INFO_PLTE);
      +      return PNG_INFO_PLTE;
          }
       
      -   return (0);
      +   return 0;
       }
       
       #ifdef PNG_sBIT_SUPPORTED
      @@ -1076,10 +1082,10 @@ png_get_sBIT(png_const_structrp png_ptr, png_inforp info_ptr,
              (info_ptr->valid & PNG_INFO_sBIT) != 0 && sig_bit != NULL)
          {
             *sig_bit = &(info_ptr->sig_bit);
      -      return (PNG_INFO_sBIT);
      +      return PNG_INFO_sBIT;
          }
       
      -   return (0);
      +   return 0;
       }
       #endif
       
      @@ -1090,7 +1096,7 @@ png_get_text(png_const_structrp png_ptr, png_inforp info_ptr,
       {
          if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0)
          {
      -      png_debug1(1, "in 0x%lx retrieval function",
      +      png_debug1(1, "in text retrieval function, chunk typeid = 0x%lx",
                (unsigned long)png_ptr->chunk_name);
       
             if (text_ptr != NULL)
      @@ -1105,7 +1111,7 @@ png_get_text(png_const_structrp png_ptr, png_inforp info_ptr,
          if (num_text != NULL)
             *num_text = 0;
       
      -   return(0);
      +   return 0;
       }
       #endif
       
      @@ -1120,10 +1126,10 @@ png_get_tIME(png_const_structrp png_ptr, png_inforp info_ptr,
              (info_ptr->valid & PNG_INFO_tIME) != 0 && mod_time != NULL)
          {
             *mod_time = &(info_ptr->mod_time);
      -      return (PNG_INFO_tIME);
      +      return PNG_INFO_tIME;
          }
       
      -   return (0);
      +   return 0;
       }
       #endif
       
      @@ -1133,11 +1139,12 @@ png_get_tRNS(png_const_structrp png_ptr, png_inforp info_ptr,
           png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)
       {
          png_uint_32 retval = 0;
      +
      +   png_debug1(1, "in %s retrieval function", "tRNS");
      +
          if (png_ptr != NULL && info_ptr != NULL &&
              (info_ptr->valid & PNG_INFO_tRNS) != 0)
          {
      -      png_debug1(1, "in %s retrieval function", "tRNS");
      -
             if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
             {
                if (trans_alpha != NULL)
      @@ -1169,7 +1176,7 @@ png_get_tRNS(png_const_structrp png_ptr, png_inforp info_ptr,
             }
          }
       
      -   return (retval);
      +   return retval;
       }
       #endif
       
      @@ -1184,7 +1191,7 @@ png_get_unknown_chunks(png_const_structrp png_ptr, png_inforp info_ptr,
             return info_ptr->unknown_chunks_num;
          }
       
      -   return (0);
      +   return 0;
       }
       #endif
       
      @@ -1280,7 +1287,7 @@ png_get_palette_max(png_const_structp png_ptr, png_const_infop info_ptr)
          if (png_ptr != NULL && info_ptr != NULL)
             return png_ptr->num_palette_max;
       
      -   return (-1);
      +   return -1;
       }
       #  endif
       #endif
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h b/src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h
      index e98d49cf0cc..e238ccdb9a4 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h
      @@ -31,7 +31,7 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        */
      -/* libpng version 1.6.40 */
      +/* libpng version 1.6.43 */
       
       /* Copyright (c) 2018-2023 Cosmin Truta */
       /* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pngpread.c b/src/java.desktop/share/native/libsplashscreen/libpng/pngpread.c
      index a98b2013256..816631cae18 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/pngpread.c
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngpread.c
      @@ -29,7 +29,7 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        *
      - * Copyright (c) 2018 Cosmin Truta
      + * Copyright (c) 2018-2024 Cosmin Truta
        * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
        * Copyright (c) 1996-1997 Andreas Dilger
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      @@ -173,10 +173,10 @@ png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr)
              num_to_check);
          png_ptr->sig_bytes = (png_byte)(png_ptr->sig_bytes + num_to_check);
       
      -   if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check))
      +   if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check) != 0)
          {
             if (num_checked < 4 &&
      -          png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4))
      +          png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4) != 0)
                png_error(png_ptr, "Not a PNG file");
       
             else
      @@ -322,6 +322,14 @@ png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr)
             png_handle_cHRM(png_ptr, info_ptr, png_ptr->push_length);
          }
       
      +#endif
      +#ifdef PNG_READ_eXIf_SUPPORTED
      +   else if (png_ptr->chunk_name == png_eXIf)
      +   {
      +      PNG_PUSH_SAVE_BUFFER_IF_FULL
      +      png_handle_eXIf(png_ptr, info_ptr, png_ptr->push_length);
      +   }
      +
       #endif
       #ifdef PNG_READ_sRGB_SUPPORTED
          else if (chunk_name == png_sRGB)
      @@ -1117,7 +1125,7 @@ png_voidp PNGAPI
       png_get_progressive_ptr(png_const_structrp png_ptr)
       {
          if (png_ptr == NULL)
      -      return (NULL);
      +      return NULL;
       
          return png_ptr->io_ptr;
       }
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pngpriv.h b/src/java.desktop/share/native/libsplashscreen/libpng/pngpriv.h
      index 914d0b97b1d..18424542b00 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/pngpriv.h
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngpriv.h
      @@ -29,7 +29,7 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        *
      - * Copyright (c) 2018-2023 Cosmin Truta
      + * Copyright (c) 2018-2024 Cosmin Truta
        * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
        * Copyright (c) 1996-1997 Andreas Dilger
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      @@ -64,7 +64,7 @@
        * still required (as of 2011-05-02.)
        */
       #ifndef _POSIX_SOURCE
      -# define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */
      +#  define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */
       #endif
       
       #ifndef PNG_VERSION_INFO_ONLY
      @@ -218,13 +218,27 @@
       #endif /* PNG_ARM_NEON_OPT > 0 */
       
       #ifndef PNG_MIPS_MSA_OPT
      -#  if defined(__mips_msa) && (__mips_isa_rev >= 5) && defined(PNG_ALIGNED_MEMORY_SUPPORTED)
      +#  if defined(__mips_msa) && (__mips_isa_rev >= 5) && \
      +   defined(PNG_ALIGNED_MEMORY_SUPPORTED)
       #     define PNG_MIPS_MSA_OPT 2
       #  else
       #     define PNG_MIPS_MSA_OPT 0
       #  endif
       #endif
       
      +#ifndef PNG_MIPS_MMI_OPT
      +#  ifdef PNG_MIPS_MMI
      +#    if defined(__mips_loongson_mmi) && (_MIPS_SIM == _ABI64) && \
      +     defined(PNG_ALIGNED_MEMORY_SUPPORTED)
      +#       define PNG_MIPS_MMI_OPT 1
      +#    else
      +#       define PNG_MIPS_MMI_OPT 0
      +#    endif
      +#  else
      +#    define PNG_MIPS_MMI_OPT 0
      +#  endif
      +#endif
      +
       #ifndef PNG_POWERPC_VSX_OPT
       #  if defined(__PPC64__) && defined(__ALTIVEC__) && defined(__VSX__)
       #     define PNG_POWERPC_VSX_OPT 2
      @@ -233,13 +247,21 @@
       #  endif
       #endif
       
      +#ifndef PNG_LOONGARCH_LSX_OPT
      +#  if defined(__loongarch_sx)
      +#     define PNG_LOONGARCH_LSX_OPT 1
      +#  else
      +#     define PNG_LOONGARCH_LSX_OPT 0
      +#  endif
      +#endif
      +
       #ifndef PNG_INTEL_SSE_OPT
       #   ifdef PNG_INTEL_SSE
             /* Only check for SSE if the build configuration has been modified to
              * enable SSE optimizations.  This means that these optimizations will
              * be off by default.  See contrib/intel for more details.
              */
      -#     if defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \
      +#      if defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \
              defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \
              (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
       #         define PNG_INTEL_SSE_OPT 1
      @@ -276,7 +298,6 @@
       #endif
       
       #if PNG_MIPS_MSA_OPT > 0
      -#  define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_msa
       #  ifndef PNG_MIPS_MSA_IMPLEMENTATION
       #     if defined(__mips_msa)
       #        if defined(__clang__)
      @@ -292,11 +313,28 @@
       
       #  ifndef PNG_MIPS_MSA_IMPLEMENTATION
       #     define PNG_MIPS_MSA_IMPLEMENTATION 1
      +#     define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_mips
       #  endif
       #else
       #  define PNG_MIPS_MSA_IMPLEMENTATION 0
       #endif /* PNG_MIPS_MSA_OPT > 0 */
       
      +#if PNG_MIPS_MMI_OPT > 0
      +#  ifndef PNG_MIPS_MMI_IMPLEMENTATION
      +#     if defined(__mips_loongson_mmi) && (_MIPS_SIM == _ABI64)
      +#        define PNG_MIPS_MMI_IMPLEMENTATION 2
      +#     else /* !defined __mips_loongson_mmi  || _MIPS_SIM != _ABI64 */
      +#        define PNG_MIPS_MMI_IMPLEMENTATION 0
      +#     endif /* __mips_loongson_mmi  && _MIPS_SIM == _ABI64 */
      +#  endif /* !PNG_MIPS_MMI_IMPLEMENTATION */
      +
      +#   if PNG_MIPS_MMI_IMPLEMENTATION > 0
      +#      define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_mips
      +#   endif
      +#else
      +#   define PNG_MIPS_MMI_IMPLEMENTATION 0
      +#endif /* PNG_MIPS_MMI_OPT > 0 */
      +
       #if PNG_POWERPC_VSX_OPT > 0
       #  define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_vsx
       #  define PNG_POWERPC_VSX_IMPLEMENTATION 1
      @@ -304,6 +342,12 @@
       #  define PNG_POWERPC_VSX_IMPLEMENTATION 0
       #endif
       
      +#if PNG_LOONGARCH_LSX_OPT > 0
      +#   define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_lsx
      +#   define PNG_LOONGARCH_LSX_IMPLEMENTATION 1
      +#else
      +#   define PNG_LOONGARCH_LSX_IMPLEMENTATION 0
      +#endif
       
       /* Is this a build of a DLL where compilation of the object modules requires
        * different preprocessor settings to those required for a simple library?  If
      @@ -542,18 +586,8 @@
           */
       #  include 
       
      -#  if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
      -    defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
      -   /* We need to check that  hasn't already been included earlier
      -    * as it seems it doesn't agree with , yet we should really use
      -    *  if possible.
      -    */
      -#    if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
      -#      include 
      -#    endif
      -#  else
      -#    include 
      -#  endif
      +#  include 
      +
       #  if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
          /* Amiga SAS/C: We must include builtin FPU functions when compiling using
           * MATH=68881
      @@ -1334,7 +1368,7 @@ PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_neon,(png_row_infop
           row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
       #endif
       
      -#if PNG_MIPS_MSA_OPT > 0
      +#if PNG_MIPS_MSA_IMPLEMENTATION == 1
       PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_msa,(png_row_infop row_info,
           png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
       PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_msa,(png_row_infop
      @@ -1351,6 +1385,23 @@ PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_msa,(png_row_infop
           row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
       #endif
       
      +#if PNG_MIPS_MMI_IMPLEMENTATION > 0
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_mmi,(png_row_infop row_info,
      +    png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_mmi,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_mmi,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_mmi,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_mmi,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_mmi,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_mmi,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +#endif
      +
       #if PNG_POWERPC_VSX_OPT > 0
       PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_vsx,(png_row_infop row_info,
           png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      @@ -1383,6 +1434,23 @@ PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_sse2,(png_row_infop
           row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
       #endif
       
      +#if PNG_LOONGARCH_LSX_IMPLEMENTATION == 1
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_lsx,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_lsx,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_lsx,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_lsx,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_lsx,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_lsx,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_lsx,(png_row_infop
      +    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
      +#endif
      +
       /* Choose the best filter to use and filter the row data */
       PNG_INTERNAL_FUNCTION(void,png_write_find_filter,(png_structrp png_ptr,
           png_row_infop row_info),PNG_EMPTY);
      @@ -2122,17 +2190,27 @@ PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_neon,
          (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
       #endif
       
      -#if PNG_MIPS_MSA_OPT > 0
      -PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_msa,
      +#if PNG_MIPS_MSA_IMPLEMENTATION == 1
      +PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_mips,
          (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
       #endif
       
      +#  if PNG_MIPS_MMI_IMPLEMENTATION > 0
      +PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_mips,
      +   (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
      +#  endif
      +
       #  if PNG_INTEL_SSE_IMPLEMENTATION > 0
       PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_sse2,
          (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
       #  endif
       #endif
       
      +#if PNG_LOONGARCH_LSX_OPT > 0
      +PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_lsx,
      +    (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
      +#endif
      +
       PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr,
          png_const_charp key, png_bytep new_key), PNG_EMPTY);
       
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pngread.c b/src/java.desktop/share/native/libsplashscreen/libpng/pngread.c
      index 3631e60f36b..e9e94477545 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/pngread.c
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngread.c
      @@ -29,7 +29,7 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        *
      - * Copyright (c) 2018-2019 Cosmin Truta
      + * Copyright (c) 2018-2024 Cosmin Truta
        * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
        * Copyright (c) 1996-1997 Andreas Dilger
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      @@ -596,7 +596,11 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
       #endif
       
       #ifdef PNG_READ_TRANSFORMS_SUPPORTED
      -   if (png_ptr->transformations)
      +   if (png_ptr->transformations
      +#     ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
      +         || png_ptr->num_palette_max >= 0
      +#     endif
      +      )
             png_do_read_transformations(png_ptr, &row_info);
       #endif
       
      @@ -813,7 +817,7 @@ png_read_end(png_structrp png_ptr, png_inforp info_ptr)
       #ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
          /* Report invalid palette index; added at libng-1.5.10 */
          if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
      -       png_ptr->num_palette_max > png_ptr->num_palette)
      +       png_ptr->num_palette_max >= png_ptr->num_palette)
             png_benign_error(png_ptr, "Read palette index exceeding num_palette");
       #endif
       
      @@ -1077,6 +1081,8 @@ void PNGAPI
       png_read_png(png_structrp png_ptr, png_inforp info_ptr,
           int transforms, voidp params)
       {
      +   png_debug(1, "in png_read_png");
      +
          if (png_ptr == NULL || info_ptr == NULL)
             return;
       
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pngrtran.c b/src/java.desktop/share/native/libsplashscreen/libpng/pngrtran.c
      index 843eb5fff2a..a393de4b79d 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/pngrtran.c
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngrtran.c
      @@ -29,7 +29,7 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        *
      - * Copyright (c) 2018-2019 Cosmin Truta
      + * Copyright (c) 2018-2024 Cosmin Truta
        * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
        * Copyright (c) 1996-1997 Andreas Dilger
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      @@ -318,21 +318,20 @@ png_set_alpha_mode_fixed(png_structrp png_ptr, int mode,
          int compose = 0;
          png_fixed_point file_gamma;
       
      -   png_debug(1, "in png_set_alpha_mode");
      +   png_debug(1, "in png_set_alpha_mode_fixed");
       
          if (png_rtran_ok(png_ptr, 0) == 0)
             return;
       
          output_gamma = translate_gamma_flags(png_ptr, output_gamma, 1/*screen*/);
       
      -   /* Validate the value to ensure it is in a reasonable range. The value
      +   /* Validate the value to ensure it is in a reasonable range.  The value
           * is expected to be 1 or greater, but this range test allows for some
      -    * viewing correction values.  The intent is to weed out users of this API
      -    * who use the inverse of the gamma value accidentally!  Since some of these
      -    * values are reasonable this may have to be changed:
      +    * viewing correction values.  The intent is to weed out the API users
      +    * who might use the inverse of the gamma value accidentally!
           *
      -    * 1.6.x: changed from 0.07..3 to 0.01..100 (to accommodate the optimal 16-bit
      -    * gamma of 36, and its reciprocal.)
      +    * In libpng 1.6.0, we changed from 0.07..3 to 0.01..100, to accommodate
      +    * the optimal 16-bit gamma of 36 and its reciprocal.
           */
          if (output_gamma < 1000 || output_gamma > 10000000)
             png_error(png_ptr, "output gamma out of expected range");
      @@ -469,7 +468,7 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette,
             int i;
       
             png_ptr->quantize_index = (png_bytep)png_malloc(png_ptr,
      -          (png_alloc_size_t)((png_uint_32)num_palette * (sizeof (png_byte))));
      +          (png_alloc_size_t)num_palette);
             for (i = 0; i < num_palette; i++)
                png_ptr->quantize_index[i] = (png_byte)i;
          }
      @@ -486,7 +485,7 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette,
       
                /* Initialize an array to sort colors */
                png_ptr->quantize_sort = (png_bytep)png_malloc(png_ptr,
      -             (png_alloc_size_t)((png_uint_32)num_palette * (sizeof (png_byte))));
      +             (png_alloc_size_t)num_palette);
       
                /* Initialize the quantize_sort array */
                for (i = 0; i < num_palette; i++)
      @@ -620,11 +619,9 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette,
       
                /* Initialize palette index arrays */
                png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr,
      -             (png_alloc_size_t)((png_uint_32)num_palette *
      -             (sizeof (png_byte))));
      +             (png_alloc_size_t)num_palette);
                png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr,
      -             (png_alloc_size_t)((png_uint_32)num_palette *
      -             (sizeof (png_byte))));
      +             (png_alloc_size_t)num_palette);
       
                /* Initialize the sort array */
                for (i = 0; i < num_palette; i++)
      @@ -789,12 +786,11 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette,
             size_t num_entries = ((size_t)1 << total_bits);
       
             png_ptr->palette_lookup = (png_bytep)png_calloc(png_ptr,
      -          (png_alloc_size_t)(num_entries * (sizeof (png_byte))));
      +          (png_alloc_size_t)(num_entries));
       
      -      distance = (png_bytep)png_malloc(png_ptr, (png_alloc_size_t)(num_entries *
      -          (sizeof (png_byte))));
      +      distance = (png_bytep)png_malloc(png_ptr, (png_alloc_size_t)num_entries);
       
      -      memset(distance, 0xff, num_entries * (sizeof (png_byte)));
      +      memset(distance, 0xff, num_entries);
       
             for (i = 0; i < num_palette; i++)
             {
      @@ -998,7 +994,7 @@ void PNGFAPI
       png_set_rgb_to_gray_fixed(png_structrp png_ptr, int error_action,
           png_fixed_point red, png_fixed_point green)
       {
      -   png_debug(1, "in png_set_rgb_to_gray");
      +   png_debug(1, "in png_set_rgb_to_gray_fixed");
       
          /* Need the IHDR here because of the check on color_type below. */
          /* TODO: fix this */
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pngrutil.c b/src/java.desktop/share/native/libsplashscreen/libpng/pngrutil.c
      index 524297c5a10..5280140d12b 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/pngrutil.c
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngrutil.c
      @@ -29,7 +29,7 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        *
      - * Copyright (c) 2018-2022 Cosmin Truta
      + * Copyright (c) 2018-2024 Cosmin Truta
        * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
        * Copyright (c) 1996-1997 Andreas Dilger
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      @@ -54,7 +54,7 @@ png_get_uint_31(png_const_structrp png_ptr, png_const_bytep buf)
          if (uval > PNG_UINT_31_MAX)
             png_error(png_ptr, "PNG unsigned integer out of range");
       
      -   return (uval);
      +   return uval;
       }
       
       #if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_READ_cHRM_SUPPORTED)
      @@ -168,7 +168,7 @@ png_read_sig(png_structrp png_ptr, png_inforp info_ptr)
          if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check) != 0)
          {
             if (num_checked < 4 &&
      -          png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4))
      +          png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4) != 0)
                png_error(png_ptr, "Not a PNG file");
             else
                png_error(png_ptr, "PNG file corrupted by ASCII conversion");
      @@ -199,7 +199,7 @@ png_read_chunk_header(png_structrp png_ptr)
          /* Put the chunk name into png_ptr->chunk_name. */
          png_ptr->chunk_name = PNG_CHUNK_FROM_STRING(buf+4);
       
      -   png_debug2(0, "Reading %lx chunk, length = %lu",
      +   png_debug2(0, "Reading chunk typeid = 0x%lx, length = %lu",
              (unsigned long)png_ptr->chunk_name, (unsigned long)length);
       
          /* Reset the crc and run it over the chunk name. */
      @@ -266,10 +266,10 @@ png_crc_finish(png_structrp png_ptr, png_uint_32 skip)
             else
                png_chunk_error(png_ptr, "CRC error");
       
      -      return (1);
      +      return 1;
          }
       
      -   return (0);
      +   return 0;
       }
       
       /* Compare the CRC stored in the PNG file with that calculated by libpng from
      @@ -305,11 +305,11 @@ png_crc_error(png_structrp png_ptr)
          if (need_crc != 0)
          {
             crc = png_get_uint_32(crc_bytes);
      -      return ((int)(crc != png_ptr->crc));
      +      return crc != png_ptr->crc;
          }
       
          else
      -      return (0);
      +      return 0;
       }
       
       #if defined(PNG_READ_iCCP_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) ||\
      @@ -449,8 +449,7 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner)
                   png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED;
             }
       
      -#if ZLIB_VERNUM >= 0x1290 && \
      -   defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32)
      +#ifdef PNG_DISABLE_ADLER32_CHECK_SUPPORTED
             if (((png_ptr->options >> PNG_IGNORE_ADLER32) & 3) == PNG_OPTION_ON)
                /* Turn off validation of the ADLER32 checksum in IDAT chunks */
                ret = inflateValidate(&png_ptr->zstream, 0);
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pngset.c b/src/java.desktop/share/native/libsplashscreen/libpng/pngset.c
      index 62612a02278..f53ab6fa1d1 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/pngset.c
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngset.c
      @@ -29,7 +29,7 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        *
      - * Copyright (c) 2018-2023 Cosmin Truta
      + * Copyright (c) 2018-2024 Cosmin Truta
        * Copyright (c) 1998-2018 Glenn Randers-Pehrson
        * Copyright (c) 1996-1997 Andreas Dilger
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      @@ -791,11 +791,11 @@ png_set_text_2(png_const_structrp png_ptr, png_inforp info_ptr,
       {
          int i;
       
      -   png_debug1(1, "in %lx storage function", png_ptr == NULL ? 0xabadca11U :
      -      (unsigned long)png_ptr->chunk_name);
      +   png_debug1(1, "in text storage function, chunk typeid = 0x%lx",
      +      png_ptr == NULL ? 0xabadca11UL : (unsigned long)png_ptr->chunk_name);
       
          if (png_ptr == NULL || info_ptr == NULL || num_text <= 0 || text_ptr == NULL)
      -      return(0);
      +      return 0;
       
          /* Make sure we have enough space in the "text" array in info_struct
           * to hold all of the incoming text_ptr objects.  This compare can't overflow
      @@ -975,7 +975,7 @@ png_set_text_2(png_const_structrp png_ptr, png_inforp info_ptr,
             png_debug1(3, "transferred text chunk %d", info_ptr->num_text);
          }
       
      -   return(0);
      +   return 0;
       }
       #endif
       
      @@ -1091,6 +1091,8 @@ png_set_sPLT(png_const_structrp png_ptr,
       {
          png_sPLT_tp np;
       
      +   png_debug1(1, "in %s storage function", "sPLT");
      +
          if (png_ptr == NULL || info_ptr == NULL || nentries <= 0 || entries == NULL)
             return;
       
      @@ -1565,7 +1567,7 @@ void PNGAPI
       png_set_rows(png_const_structrp png_ptr, png_inforp info_ptr,
           png_bytepp row_pointers)
       {
      -   png_debug1(1, "in %s storage function", "rows");
      +   png_debug(1, "in png_set_rows");
       
          if (png_ptr == NULL || info_ptr == NULL)
             return;
      @@ -1584,6 +1586,8 @@ png_set_rows(png_const_structrp png_ptr, png_inforp info_ptr,
       void PNGAPI
       png_set_compression_buffer_size(png_structrp png_ptr, size_t size)
       {
      +   png_debug(1, "in png_set_compression_buffer_size");
      +
          if (png_ptr == NULL)
             return;
       
      @@ -1655,6 +1659,8 @@ void PNGAPI
       png_set_user_limits(png_structrp png_ptr, png_uint_32 user_width_max,
           png_uint_32 user_height_max)
       {
      +   png_debug(1, "in png_set_user_limits");
      +
          /* Images with dimensions larger than these limits will be
           * rejected by png_set_IHDR().  To accept any PNG datastream
           * regardless of dimensions, set both limits to 0x7fffffff.
      @@ -1670,6 +1676,8 @@ png_set_user_limits(png_structrp png_ptr, png_uint_32 user_width_max,
       void PNGAPI
       png_set_chunk_cache_max(png_structrp png_ptr, png_uint_32 user_chunk_cache_max)
       {
      +   png_debug(1, "in png_set_chunk_cache_max");
      +
          if (png_ptr != NULL)
             png_ptr->user_chunk_cache_max = user_chunk_cache_max;
       }
      @@ -1679,6 +1687,8 @@ void PNGAPI
       png_set_chunk_malloc_max(png_structrp png_ptr,
           png_alloc_size_t user_chunk_malloc_max)
       {
      +   png_debug(1, "in png_set_chunk_malloc_max");
      +
          if (png_ptr != NULL)
             png_ptr->user_chunk_malloc_max = user_chunk_malloc_max;
       }
      diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pngtrans.c b/src/java.desktop/share/native/libsplashscreen/libpng/pngtrans.c
      index 89a62191b6f..2350057e70e 100644
      --- a/src/java.desktop/share/native/libsplashscreen/libpng/pngtrans.c
      +++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngtrans.c
      @@ -29,7 +29,7 @@
        * However, the following notice accompanied the original version of this
        * file and, per its terms, should not be removed:
        *
      - * Copyright (c) 2018 Cosmin Truta
      + * Copyright (c) 2018-2024 Cosmin Truta
        * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
        * Copyright (c) 1996-1997 Andreas Dilger
        * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
      @@ -131,10 +131,10 @@ png_set_interlace_handling(png_structrp png_ptr)
          if (png_ptr != 0 && png_ptr->interlaced != 0)
          {
             png_ptr->transformations |= PNG_INTERLACE;
      -      return (7);
      +      return 7;
          }
       
      -   return (1);
      +   return 1;
       }
       #endif
       
      @@ -526,6 +526,8 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
          png_bytep dp = row; /* destination pointer */
          png_bytep ep = row + row_info->rowbytes; /* One beyond end of row */
       
      +   png_debug(1, "in png_do_strip_channel");
      +
          /* At the start sp will point to the first byte to copy and dp to where
           * it is copied to.  ep always points just beyond the end of the row, so
           * the loop simply copies (channels-1) channels until sp reaches ep.
      @@ -726,6 +728,8 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
       void /* PRIVATE */
       png_do_check_palette_indexes(png_structrp png_ptr, png_row_infop row_info)
       {
      +   png_debug(1, "in png_do_check_palette_indexes");
      +
          if (png_ptr->num_palette < (1 << row_info->bit_depth) &&
             png_ptr->num_palette > 0) /* num_palette can be 0 in MNG files */
          {
      @@ -736,7 +740,7 @@ png_do_check_palette_indexes(png_structrp png_ptr, png_row_infop row_info)
              * forms produced on either GCC or MSVC.
              */
             int padding = PNG_PADBITS(row_info->pixel_depth, row_info->width);
      -      png_bytep rp = png_ptr->row_buf + row_info->rowbytes - 1;
      +      png_bytep rp = png_ptr->row_buf + row_info->rowbytes;
       
             switch (row_info->bit_depth)
             {
      @@ -861,7 +865,7 @@ png_voidp PNGAPI
       png_get_user_transform_ptr(png_const_structrp png_ptr)
       {
          if (png_ptr == NULL)
      -      return (NULL);
      +      return NULL;
       
          return png_ptr->user_transform_ptr;
       }
      diff --git a/src/java.desktop/unix/classes/sun/awt/screencast/TokenStorage.java b/src/java.desktop/unix/classes/sun/awt/screencast/TokenStorage.java
      index 2f31611cf5f..3daf9b2a8b8 100644
      --- a/src/java.desktop/unix/classes/sun/awt/screencast/TokenStorage.java
      +++ b/src/java.desktop/unix/classes/sun/awt/screencast/TokenStorage.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -37,6 +37,8 @@
       import java.nio.file.WatchKey;
       import java.nio.file.WatchService;
       import java.nio.file.attribute.PosixFilePermission;
      +import java.security.AccessController;
      +import java.security.PrivilegedAction;
       import java.util.Arrays;
       import java.util.HashSet;
       import java.util.LinkedHashSet;
      @@ -58,6 +60,7 @@
        * The restore token allows the ScreenCast session to be restored
        * with previously granted screen access permissions.
        */
      +@SuppressWarnings("removal")
       final class TokenStorage {
       
           private TokenStorage() {}
      @@ -69,8 +72,24 @@ private TokenStorage() {}
           private static final Path PROPS_PATH;
           private static final Path PROP_FILENAME;
       
      +    private static void doPrivilegedRunnable(Runnable runnable) {
      +        AccessController.doPrivileged(new PrivilegedAction() {
      +            @Override
      +            public Void run() {
      +                runnable.run();
      +                return null;
      +            }
      +        });
      +    }
      +
           static {
      -        PROPS_PATH = setupPath();
      +        PROPS_PATH = AccessController.doPrivileged(new PrivilegedAction() {
      +            @Override
      +            public Path run() {
      +                return setupPath();
      +            }
      +        });
      +
               if (PROPS_PATH != null) {
                   PROP_FILENAME = PROPS_PATH.getFileName();
                   if (SCREENCAST_DEBUG) {
      @@ -192,9 +211,9 @@ public void run() {
                           }
       
                           if (kind == ENTRY_CREATE) {
      -                        setFilePermission(PROPS_PATH);
      +                        doPrivilegedRunnable(() -> setFilePermission(PROPS_PATH));
                           } else if (kind == ENTRY_MODIFY) {
      -                        readTokens(PROPS_PATH);
      +                        doPrivilegedRunnable(() -> readTokens(PROPS_PATH));
                           } else if (kind == ENTRY_DELETE) {
                               synchronized (PROPS) {
                                   PROPS.clear();
      @@ -207,24 +226,31 @@ public void run() {
               }
           }
       
      +    private static WatchService watchService;
      +
           private static void setupWatch() {
      -        try {
      -            WatchService watchService =
      -                    FileSystems.getDefault().newWatchService();
      +        doPrivilegedRunnable(() -> {
      +            try {
      +                watchService =
      +                        FileSystems.getDefault().newWatchService();
       
      -            PROPS_PATH
      -                    .getParent()
      -                    .register(watchService,
      -                            ENTRY_CREATE,
      -                            ENTRY_DELETE,
      -                            ENTRY_MODIFY);
      +                PROPS_PATH
      +                        .getParent()
      +                        .register(watchService,
      +                                ENTRY_CREATE,
      +                                ENTRY_DELETE,
      +                                ENTRY_MODIFY);
       
      -            new WatcherThread(watchService).start();
      -        } catch (Exception e) {
      -            if (SCREENCAST_DEBUG) {
      -                System.err.printf("Token storage: failed to setup " +
      -                        "file watch %s\n", e);
      +            } catch (Exception e) {
      +                if (SCREENCAST_DEBUG) {
      +                    System.err.printf("Token storage: failed to setup " +
      +                            "file watch %s\n", e);
      +                }
                   }
      +        });
      +
      +        if (watchService != null) {
      +            new WatcherThread(watchService).start();
               }
           }
       
      @@ -276,7 +302,7 @@ private static void storeTokenFromNative(String oldToken,
                   }
       
                   if (changed) {
      -                store("save tokens");
      +                doPrivilegedRunnable(() -> store("save tokens"));
                   }
               }
           }
      @@ -331,7 +357,7 @@ static Set getTokens(List affectedScreenBounds) {
                           .toList();
               }
       
      -        removeMalformedRecords(malformed);
      +        doPrivilegedRunnable(() -> removeMalformedRecords(malformed));
       
               // 1. Try to find exact matches
               for (TokenItem tokenItem : allTokenItems) {
      diff --git a/src/java.desktop/windows/classes/sun/awt/windows/ThemeReader.java b/src/java.desktop/windows/classes/sun/awt/windows/ThemeReader.java
      index 61972bf4ed5..7c0d8c1ea4d 100644
      --- a/src/java.desktop/windows/classes/sun/awt/windows/ThemeReader.java
      +++ b/src/java.desktop/windows/classes/sun/awt/windows/ThemeReader.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2004, 2023, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2004, 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
      @@ -100,21 +100,30 @@ public static boolean isXPStyleEnabled() {
               return xpStyleEnabled;
           }
       
      -    private static Long openThemeImpl(String widget, int dpi) {
      -       Long theme;
      +    private static long openThemeImpl(String widget, int dpi) {
      +       long theme;
              int i = widget.indexOf("::");
              if (i > 0) {
                  // We're using the syntax "subAppName::controlName" here, as used by msstyles.
                  // See documentation for SetWindowTheme on MSDN.
                  setWindowTheme(widget.substring(0, i));
      -           theme = openTheme(widget.substring(i + 2), dpi);
      +           theme = getOpenThemeValue(widget.substring(i + 2), dpi);
                  setWindowTheme(null);
              } else {
      -           theme = openTheme(widget, dpi);
      +           theme = getOpenThemeValue(widget, dpi);
              }
              return theme;
           }
       
      +    private static long getOpenThemeValue(String widget, int dpi) {
      +        long theme;
      +        theme = openTheme(widget, dpi);
      +        if (theme == 0) {
      +            theme = openTheme(widget, defaultDPI);
      +        }
      +        return theme;
      +    }
      +
           // this should be called only with writeLock held
           private static Long getThemeImpl(String widget, int dpi) {
              return dpiAwareWidgetToTheme.computeIfAbsent(dpi, key -> new HashMap<>())
      diff --git a/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp b/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp
      index b3f13a5bf82..335281ad5d7 100644
      --- a/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp
      +++ b/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2003, 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
      @@ -119,17 +119,6 @@ static jstring lsSize;
       static jstring lsType;
       static jstring lsDate;
       
      -// Some macros from awt.h, because it is not included in release
      -#ifndef IS_WIN2000
      -#define IS_WIN2000 (LOBYTE(LOWORD(::GetVersion())) >= 5)
      -#endif
      -#ifndef IS_WINXP
      -#define IS_WINXP ((IS_WIN2000 && HIBYTE(LOWORD(::GetVersion())) >= 1) || LOBYTE(LOWORD(::GetVersion())) > 5)
      -#endif
      -#ifndef IS_WINVISTA
      -#define IS_WINVISTA (!(::GetVersion() & 0x80000000) && LOBYTE(LOWORD(::GetVersion())) >= 6)
      -#endif
      -
       
       extern "C" {
       
      @@ -1090,12 +1079,10 @@ JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getIconBits
                       // XP supports alpha in some icons, and depending on device.
                       // This should take precedence over the icon mask bits.
                       BOOL hasAlpha = FALSE;
      -                if (IS_WINXP) {
      -                    for (int i = 0; i < nBits; i++) {
      -                        if ((colorBits[i] & 0xff000000) != 0) {
      -                            hasAlpha = TRUE;
      -                            break;
      -                        }
      +                for (int i = 0; i < nBits; i++) {
      +                    if ((colorBits[i] & 0xff000000) != 0) {
      +                        hasAlpha = TRUE;
      +                        break;
                           }
                       }
                       if (!hasAlpha) {
      diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/AuthenticationFilter.java b/src/java.net.http/share/classes/jdk/internal/net/http/AuthenticationFilter.java
      index 6e6182a1fb2..81acd83c423 100644
      --- a/src/java.net.http/share/classes/jdk/internal/net/http/AuthenticationFilter.java
      +++ b/src/java.net.http/share/classes/jdk/internal/net/http/AuthenticationFilter.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2015, 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
      @@ -89,7 +89,6 @@ private PasswordAuthentication getCredentials(String header,
               InetSocketAddress proxyAddress;
               if (proxy && (proxyAddress = req.proxy()) != null) {
                   // request sent to server through proxy
      -            proxyAddress = req.proxy();
                   host = proxyAddress.getHostString();
                   port = proxyAddress.getPort();
                   protocol = "http"; // we don't support https connection to proxy
      diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java b/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java
      index c4a7abe2816..1bb520a6fb1 100644
      --- a/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java
      +++ b/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2015, 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
      @@ -1724,9 +1724,10 @@ protected void unregister() {
           private static final VarHandle DEREGISTERED;
           static {
               try {
      -            STREAM_STATE = MethodHandles.lookup()
      +            MethodHandles.Lookup lookup = MethodHandles.lookup();
      +            STREAM_STATE = lookup
                           .findVarHandle(Stream.class, "streamState", int.class);
      -            DEREGISTERED = MethodHandles.lookup()
      +            DEREGISTERED = lookup
                           .findVarHandle(Stream.class, "deRegistered", boolean.class);
               } catch (Exception x) {
                   throw new ExceptionInInitializerError(x);
      diff --git a/src/java.sql/share/classes/java/sql/DatabaseMetaData.java b/src/java.sql/share/classes/java/sql/DatabaseMetaData.java
      index 6f63c2989b8..f4cb8787b5f 100644
      --- a/src/java.sql/share/classes/java/sql/DatabaseMetaData.java
      +++ b/src/java.sql/share/classes/java/sql/DatabaseMetaData.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 1996, 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
      @@ -1215,7 +1215,7 @@ boolean dataDefinitionIgnoredInTransactions()
            * Only procedure descriptions matching the schema and
            * procedure name criteria are returned.  They are ordered by
            * {@code PROCEDURE_CAT}, {@code PROCEDURE_SCHEM},
      -     * {@code PROCEDURE_NAME} and {@code SPECIFIC_ NAME}.
      +     * {@code PROCEDURE_NAME} and {@code SPECIFIC_NAME}.
            *
            * 

      Each procedure description has the following columns: *

        @@ -3289,7 +3289,7 @@ ResultSet getClientInfoProperties() * function name criteria are returned. They are ordered by * {@code FUNCTION_CAT}, {@code FUNCTION_SCHEM}, * {@code FUNCTION_NAME} and - * {@code SPECIFIC_ NAME}. + * {@code SPECIFIC_NAME}. * *

        Each function description has the following columns: *

          @@ -3339,7 +3339,7 @@ ResultSet getFunctions(String catalog, String schemaPattern, * parameter name criteria are returned. They are ordered by * {@code FUNCTION_CAT}, {@code FUNCTION_SCHEM}, * {@code FUNCTION_NAME} and - * {@code SPECIFIC_ NAME}. Within this, the return value, + * {@code SPECIFIC_NAME}. Within this, the return value, * if any, is first. Next are the parameter descriptions in call * order. The column descriptions follow in column number order. * @@ -3358,7 +3358,7 @@ ResultSet getFunctions(String catalog, String schemaPattern, *
        1. functionColumnIn - IN parameter *
        2. functionColumnInOut - INOUT parameter *
        3. functionColumnOut - OUT parameter - *
        4. functionColumnReturn - function return value + *
        5. functionReturn - function return value *
        6. functionColumnResult - Indicates that the parameter or column * is a column in the {@code ResultSet} * diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java index 081367fa26a..45c76071f8b 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -1059,6 +1059,11 @@ public String getText() { return ""; } + @Override + public JCDiagnostic.DiagnosticPosition getPos() { + return null; + } + @Override public int getSourcePos(int index) { return offset + index; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java index 94d121ad04d..9fba9b5318b 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -52,10 +52,15 @@ public static DeferredLintHandler instance(Context context) { return instance; } + /** The Lint to use when {@link #immediate(Lint)} is used, + * instead of {@link #setPos(DiagnosticPosition)}. */ + private Lint immediateLint; + @SuppressWarnings("this-escape") protected DeferredLintHandler(Context context) { context.put(deferredLintHandlerKey, this); this.currentPos = IMMEDIATE_POSITION; + immediateLint = Lint.instance(context); } /**An interface for deferred lint reporting - loggers passed to @@ -63,7 +68,7 @@ protected DeferredLintHandler(Context context) { * {@link #flush(DiagnosticPosition) } is invoked. */ public interface LintLogger { - void report(); + void report(Lint lint); } private DiagnosticPosition currentPos; @@ -77,7 +82,7 @@ public interface LintLogger { */ public void report(LintLogger logger) { if (currentPos == IMMEDIATE_POSITION) { - logger.report(); + logger.report(immediateLint); } else { ListBuffer loggers = loggersQueue.get(currentPos); if (loggers == null) { @@ -89,11 +94,11 @@ public void report(LintLogger logger) { /**Invoke all {@link LintLogger}s that were associated with the provided {@code pos}. */ - public void flush(DiagnosticPosition pos) { + public void flush(DiagnosticPosition pos, Lint lint) { ListBuffer loggers = loggersQueue.get(pos); if (loggers != null) { for (LintLogger lintLogger : loggers) { - lintLogger.report(); + lintLogger.report(lint); } loggersQueue.remove(pos); } @@ -112,7 +117,8 @@ public DiagnosticPosition setPos(DiagnosticPosition currentPos) { /**{@link LintLogger}s passed to subsequent invocations of * {@link #report(LintLogger) } will be invoked immediately. */ - public DiagnosticPosition immediate() { + public DiagnosticPosition immediate(Lint lint) { + immediateLint = lint; return setPos(IMMEDIATE_POSITION); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java index c19480728d1..67f14941532 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -180,6 +180,12 @@ public enum LintCategory { */ CLASSFILE("classfile"), + /** + * Warn about"dangling" documentation comments, + * not attached to any declaration. + */ + DANGLING_DOC_COMMENTS("dangling-doc-comments"), + /** * Warn about use of deprecated items. */ diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java index c08f33bf5e2..c582209cfe2 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java @@ -1135,6 +1135,7 @@ private String className(Symbol sym, boolean longform) { s += String.valueOf(sym.hashCode()); return s; } else if (longform) { + sym.apiComplete(); return sym.getQualifiedName().toString(); } else { return sym.name.toString(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java index 71c9d59cb27..40a2da35488 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -254,7 +254,7 @@ public void annotateLater(List annotations, Env local DiagnosticPosition prevLintPos = deferPos != null ? deferredLintHandler.setPos(deferPos) - : deferredLintHandler.immediate(); + : deferredLintHandler.immediate(lint); Lint prevLint = deferPos != null ? null : chk.setLint(lint); try { if (s.hasAnnotations() && annotations.nonEmpty()) diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java index 2692e573ba6..9017ed72ed9 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java @@ -990,7 +990,7 @@ public void visitMethodDef(JCMethodDecl tree) { env.info.ctorPrologue = false; MethodSymbol prevMethod = chk.setMethod(m); try { - deferredLintHandler.flush(tree.pos()); + deferredLintHandler.flush(tree.pos(), lint); chk.checkDeprecatedAnnotation(tree.pos(), m); @@ -1295,7 +1295,7 @@ public void visitVarDef(JCVariableDecl tree) { try { v.getConstValue(); // ensure compile-time constant initializer is evaluated - deferredLintHandler.flush(tree.pos()); + deferredLintHandler.flush(tree.pos(), lint); chk.checkDeprecatedAnnotation(tree.pos(), v); if (tree.init != null) { @@ -5318,7 +5318,7 @@ private void attribWithLint(TypeSymbol sym, Consumer> attrib) { JavaFileObject prev = log.useSource(env.toplevel.sourcefile); try { - deferredLintHandler.flush(env.tree.pos()); + deferredLintHandler.flush(env.tree.pos(), lint); attrib.accept(env); } finally { log.useSource(prev); @@ -5493,7 +5493,7 @@ void attribClass(ClassSymbol c) throws CompletionFailure { } } - deferredLintHandler.flush(env.tree); + deferredLintHandler.flush(env.tree, env.info.lint); env.info.returnResult = null; // java.lang.Enum may not be subclassed by a non-enum if (st.tsym == syms.enumSym && @@ -5548,7 +5548,7 @@ public void visitModuleDef(JCModuleDecl tree) { chk.checkDeprecatedAnnotation(tree, msym); try { - deferredLintHandler.flush(tree.pos()); + deferredLintHandler.flush(tree.pos(), lint); } finally { chk.setLint(prevLint); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java index 055d11a9502..4efae80426d 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java @@ -673,7 +673,7 @@ public void checkRedundantCast(Env env, final JCTypeCast tree) { && types.isSameType(tree.expr.type, tree.clazz.type) && !(ignoreAnnotatedCasts && TreeInfo.containsTypeAnnotation(tree.clazz)) && !is292targetTypeCast(tree)) { - deferredLintHandler.report(() -> { + deferredLintHandler.report(_l -> { if (lint.isEnabled(LintCategory.CAST)) log.warning(LintCategory.CAST, tree.pos(), Warnings.RedundantCast(tree.clazz.type)); @@ -1433,7 +1433,7 @@ && checkDisjoint(pos, flags, private void warnOnExplicitStrictfp(DiagnosticPosition pos) { DiagnosticPosition prevLintPos = deferredLintHandler.setPos(pos); try { - deferredLintHandler.report(() -> { + deferredLintHandler.report(_l -> { if (lint.isEnabled(LintCategory.STRICTFP)) { log.warning(LintCategory.STRICTFP, pos, Warnings.Strictfp); } @@ -3907,13 +3907,13 @@ void checkDeprecated(Supplier pos, final Symbol other, final || s.isDeprecated() && !other.isDeprecated()) && (s.outermostClass() != other.outermostClass() || s.outermostClass() == null) && s.kind != Kind.PCK) { - deferredLintHandler.report(() -> warnDeprecated(pos.get(), s)); + deferredLintHandler.report(_l -> warnDeprecated(pos.get(), s)); } } void checkSunAPI(final DiagnosticPosition pos, final Symbol s) { if ((s.flags() & PROPRIETARY) != 0) { - deferredLintHandler.report(() -> { + deferredLintHandler.report(_l -> { log.mandatoryWarning(pos, Warnings.SunProprietary(s)); }); } @@ -3932,10 +3932,10 @@ void checkPreview(DiagnosticPosition pos, Symbol other, Symbol s) { log.error(pos, Errors.IsPreview(s)); } else { preview.markUsesPreview(pos); - deferredLintHandler.report(() -> warnPreviewAPI(pos, Warnings.IsPreview(s))); + deferredLintHandler.report(_l -> warnPreviewAPI(pos, Warnings.IsPreview(s))); } } else { - deferredLintHandler.report(() -> warnPreviewAPI(pos, Warnings.IsPreviewReflective(s))); + deferredLintHandler.report(_l -> warnPreviewAPI(pos, Warnings.IsPreviewReflective(s))); } } if (preview.declaredUsingPreviewFeature(s)) { @@ -3944,14 +3944,14 @@ void checkPreview(DiagnosticPosition pos, Symbol other, Symbol s) { //If "s" is compiled from source, then there was an error for it already; //if "s" is from classfile, there already was an error for the classfile. preview.markUsesPreview(pos); - deferredLintHandler.report(() -> warnDeclaredUsingPreview(pos, s)); + deferredLintHandler.report(_l -> warnDeclaredUsingPreview(pos, s)); } } } void checkRestricted(DiagnosticPosition pos, Symbol s) { if (s.kind == MTH && (s.flags() & RESTRICTED) != 0) { - deferredLintHandler.report(() -> warnRestrictedAPI(pos, s)); + deferredLintHandler.report(_l -> warnRestrictedAPI(pos, s)); } } @@ -4203,7 +4203,7 @@ void checkDivZero(final DiagnosticPosition pos, Symbol operator, Type operand) { int opc = ((OperatorSymbol)operator).opcode; if (opc == ByteCodes.idiv || opc == ByteCodes.imod || opc == ByteCodes.ldiv || opc == ByteCodes.lmod) { - deferredLintHandler.report(() -> warnDivZero(pos)); + deferredLintHandler.report(_l -> warnDivZero(pos)); } } } @@ -4216,7 +4216,7 @@ void checkDivZero(final DiagnosticPosition pos, Symbol operator, Type operand) { */ void checkLossOfPrecision(final DiagnosticPosition pos, Type found, Type req) { if (found.isNumeric() && req.isNumeric() && !types.isAssignable(found, req)) { - deferredLintHandler.report(() -> { + deferredLintHandler.report(_l -> { if (lint.isEnabled(LintCategory.LOSSY_CONVERSIONS)) log.warning(LintCategory.LOSSY_CONVERSIONS, pos, Warnings.PossibleLossOfPrecision(found, req)); @@ -4420,7 +4420,7 @@ void checkDefaultConstructor(ClassSymbol c, DiagnosticPosition pos) { // Warning may be suppressed by // annotations; check again for being // enabled in the deferred context. - deferredLintHandler.report(() -> { + deferredLintHandler.report(_l -> { if (lint.isEnabled(LintCategory.MISSING_EXPLICIT_CTOR)) log.warning(LintCategory.MISSING_EXPLICIT_CTOR, pos, Warnings.MissingExplicitCtor(c, pkg, modle)); @@ -4755,7 +4755,7 @@ private void checkVisible(DiagnosticPosition pos, Symbol what, PackageSymbol inP void checkModuleExists(final DiagnosticPosition pos, ModuleSymbol msym) { if (msym.kind != MDL) { - deferredLintHandler.report(() -> { + deferredLintHandler.report(_l -> { if (lint.isEnabled(LintCategory.MODULE)) log.warning(LintCategory.MODULE, pos, Warnings.ModuleNotFound(msym)); }); @@ -4765,7 +4765,7 @@ void checkModuleExists(final DiagnosticPosition pos, ModuleSymbol msym) { void checkPackageExistsForOpens(final DiagnosticPosition pos, PackageSymbol packge) { if (packge.members().isEmpty() && ((packge.flags() & Flags.HAS_RESOURCE) == 0)) { - deferredLintHandler.report(() -> { + deferredLintHandler.report(_l -> { if (lint.isEnabled(LintCategory.OPENS)) log.warning(pos, Warnings.PackageEmptyOrNotFound(packge)); }); @@ -4774,7 +4774,7 @@ void checkPackageExistsForOpens(final DiagnosticPosition pos, PackageSymbol pack void checkModuleRequires(final DiagnosticPosition pos, final RequiresDirective rd) { if ((rd.module.flags() & Flags.AUTOMATIC_MODULE) != 0) { - deferredLintHandler.report(() -> { + deferredLintHandler.report(_l -> { if (rd.isTransitive() && lint.isEnabled(LintCategory.REQUIRES_TRANSITIVE_AUTOMATIC)) { log.warning(pos, Warnings.RequiresTransitiveAutomatic); } else if (lint.isEnabled(LintCategory.REQUIRES_AUTOMATIC)) { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java index eda2772fb75..da008bc4b53 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java @@ -470,7 +470,8 @@ public void visitPackageDef(JCPackageDecl tree) { protected void scanSyntheticBreak(TreeMaker make, JCTree swtch) { if (swtch.hasTag(SWITCH_EXPRESSION)) { - JCYield brk = make.at(Position.NOPOS).Yield(null); + JCYield brk = make.at(Position.NOPOS).Yield(make.Erroneous() + .setType(swtch.type)); brk.target = swtch; scan(brk); } else { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java index d716e9252d6..ef521f182f6 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -347,7 +347,7 @@ private void resolveImports(JCCompilationUnit tree, Env env) { ImportFilter prevStaticImportFilter = staticImportFilter; ImportFilter prevTypeImportFilter = typeImportFilter; - DiagnosticPosition prevLintPos = deferredLintHandler.immediate(); + DiagnosticPosition prevLintPos = deferredLintHandler.immediate(lint); Lint prevLint = chk.setLint(lint); Env prevEnv = this.env; try { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java index 88de2333069..403cb30921a 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java @@ -34,6 +34,8 @@ import com.sun.tools.javac.parser.Tokens.Comment.CommentStyle; import com.sun.tools.javac.resources.CompilerProperties.Errors; import com.sun.tools.javac.resources.CompilerProperties.Warnings; +import com.sun.tools.javac.tree.EndPosTable; +import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.util.*; import com.sun.tools.javac.util.JCDiagnostic.*; @@ -1207,6 +1209,8 @@ protected static class BasicComment extends PositionTrackingReader implements Co */ CommentStyle cs; + DiagnosticPosition pos; + /** * true if comment contains @deprecated at beginning of a line. */ @@ -1228,6 +1232,12 @@ protected static class BasicComment extends PositionTrackingReader implements Co protected BasicComment(CommentStyle cs, UnicodeReader reader, int pos, int endPos) { super(reader, pos, endPos); this.cs = cs; + this.pos = new SimpleDiagnosticPosition(pos) { + @Override + public int getEndPosition(EndPosTable endPosTable) { + return endPos; + } + }; } /** @@ -1239,6 +1249,10 @@ public String getText() { return null; } + public DiagnosticPosition getPos() { + return pos; + } + /** * Return buffer position in original buffer mapped from buffer position in comment. * diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java index dd4516fe7e7..ea12e676086 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java @@ -115,6 +115,12 @@ public class JavacParser implements Parser { /** End position mappings container */ protected final AbstractEndPosTable endPosTable; + /** A map associating "other nearby documentation comments" + * with the preferred documentation comment for a declaration. */ + protected Map> danglingComments = new HashMap<>(); + /** Handler for deferred diagnostics. */ + protected final DeferredLintHandler deferredLintHandler; + // Because of javac's limited lookahead, some contexts are ambiguous in // the presence of type annotations even though they are not ambiguous // in the absence of type annotations. Consider this code: @@ -185,6 +191,7 @@ protected JavacParser(ParserFactory fac, this.names = fac.names; this.source = fac.source; this.preview = fac.preview; + this.deferredLintHandler = fac.deferredLintHandler; this.allowStringFolding = fac.options.getBoolean("allowStringFolding", true); this.keepDocComments = keepDocComments; this.parseModuleInfo = parseModuleInfo; @@ -211,6 +218,7 @@ protected JavacParser(JavacParser parser, this.names = parser.names; this.source = parser.source; this.preview = parser.preview; + this.deferredLintHandler = parser.deferredLintHandler; this.allowStringFolding = parser.allowStringFolding; this.keepDocComments = parser.keepDocComments; this.parseModuleInfo = false; @@ -562,16 +570,119 @@ protected void checkNoMods(int pos, long mods) { */ private final DocCommentTable docComments; + /** Record nearby documentation comments against the + * primary documentation comment for a declaration. + * + * Dangling documentation comments are handled as follows. + * 1. {@code Scanner} adds all doc comments to a queue of + * recent doc comments. The queue is flushed whenever + * it is known that the recent doc comments should be + * ignored and should not cause any warnings. + * 2. The primary documentation comment is the one obtained + * from the first token of any declaration. + * (using {@code token.getDocComment()}. + * 3. At the end of the "signature" of the declaration + * (that is, before any initialization or body for the + * declaration) any other "recent" comments are saved + * in a map using the primary comment as a key, + * using this method, {@code saveDanglingComments}. + * 4. When the tree node for the declaration is finally + * available, and the primary comment, if any, + * is "attached", (in {@link #attach}) any related + * dangling comments are also attached to the tree node + * by registering them using the {@link #deferredLintHandler}. + * 5. (Later) Warnings may be generated for the dangling + * comments, subject to the {@code -Xlint} and + * {@code @SuppressWarnings}. + * + * @param dc the primary documentation comment + */ + private void saveDanglingDocComments(Comment dc) { + var recentComments = S.getDocComments(); + + switch (recentComments.size()) { + case 0: + // no recent comments + return; + + case 1: + if (recentComments.peek() == dc) { + // no other recent comments + recentComments.remove(); + return; + } + } + + var lb = new ListBuffer(); + while (!recentComments.isEmpty()) { + var c = recentComments.remove(); + if (c != dc) { + lb.add(c); + } + } + danglingComments.put(dc, lb.toList()); + } + /** Make an entry into docComments hashtable, * provided flag keepDocComments is set and given doc comment is non-null. + * If there are any related "dangling comments", register + * diagnostics to be handled later, when @SuppressWarnings + * can be taken into account. + * * @param tree The tree to be used as index in the hashtable * @param dc The doc comment to associate with the tree, or null. */ protected void attach(JCTree tree, Comment dc) { if (keepDocComments && dc != null) { -// System.out.println("doc comment = ");System.out.println(dc);//DEBUG docComments.putComment(tree, dc); } + reportDanglingComments(tree, dc); + } + + /** Reports all dangling comments associated with the + * primary comment for a declaration against the position + * of the tree node for a declaration. + * + * @param tree the tree node for the declaration + * @param dc the primary comment for the declaration + */ + void reportDanglingComments(JCTree tree, Comment dc) { + var list = danglingComments.remove(dc); + if (list != null) { + var prevPos = deferredLintHandler.setPos(tree); + try { + list.forEach(this::reportDanglingDocComment); + } finally { + deferredLintHandler.setPos(prevPos); + } + } + } + + /** + * Reports an individual dangling comment using the {@link #deferredLintHandler}. + * The comment may or not may generate an actual diagnostic, depending on + * the settings for {@code -Xlint} and/or {@code @SuppressWarnings}. + * + * @param c the comment + */ + void reportDanglingDocComment(Comment c) { + var pos = c.getPos(); + if (pos != null) { + deferredLintHandler.report(lint -> { + if (lint.isEnabled(Lint.LintCategory.DANGLING_DOC_COMMENTS)) { + log.warning(Lint.LintCategory.DANGLING_DOC_COMMENTS, + pos, Warnings.DanglingDocComment); + } + }); + } + } + + /** + * Ignores any recent documentation comments found by the scanner, + * such as those that cannot be associated with a nearby declaration. + */ + private void ignoreDanglingComments() { + S.getDocComments().clear(); } /* -------- source positions ------- */ @@ -2645,6 +2756,7 @@ JCNewClass classCreatorRest(int newpos, List args = arguments(); JCClassDecl body = null; if (token.kind == LBRACE) { + ignoreDanglingComments(); // ignore any comments from before the '{' int pos = token.pos; List defs = classInterfaceOrRecordBody(names.empty, false, false); JCModifiers mods = F.at(Position.NOPOS).Modifiers(flags); @@ -2697,6 +2809,7 @@ JCExpression parExpression() { */ JCBlock block(int pos, long flags) { accept(LBRACE); + ignoreDanglingComments(); // ignore any comments from before the '{' List stats = blockStatements(); JCBlock t = F.at(pos).Block(flags, stats); while (token.kind == CASE || token.kind == DEFAULT) { @@ -2728,6 +2841,7 @@ List blockStatements() { ListBuffer stats = new ListBuffer<>(); while (true) { List stat = blockStatement(); + ignoreDanglingComments(); // ignore comments not consumed by the statement if (stat.isEmpty()) { return stats.toList(); } else { @@ -2799,7 +2913,7 @@ List blockStatement() { return List.of(classOrRecordOrInterfaceOrEnumDeclaration(mods, dc)); } else { JCExpression t = parseType(true); - return localVariableDeclarations(mods, t); + return localVariableDeclarations(mods, t, dc); } } case ABSTRACT: case STRICTFP: { @@ -2890,8 +3004,8 @@ List blockStatement() { dc = token.docComment(); return List.of(classOrRecordOrInterfaceOrEnumDeclaration(modifiersOpt(), dc)); } + dc = token.docComment(); if (isRecordStart() && allowRecords) { - dc = token.docComment(); return List.of(recordDeclaration(F.at(pos).Modifiers(0), dc)); } else { Token prevToken = token; @@ -2904,7 +3018,7 @@ List blockStatement() { pos = token.pos; JCModifiers mods = F.at(Position.NOPOS).Modifiers(0); F.at(pos); - return localVariableDeclarations(mods, t); + return localVariableDeclarations(mods, t, dc); } else { // This Exec is an "ExpressionStatement"; it subsumes the terminating semicolon t = checkExprStat(t); @@ -2915,7 +3029,11 @@ List blockStatement() { } } //where - private List localVariableDeclarations(JCModifiers mods, JCExpression type) { + private List localVariableDeclarations(JCModifiers mods, JCExpression type, Comment dc) { + if (dc != null) { + // ignore a well-placed doc comment, but save any misplaced ones + saveDanglingDocComments(dc); + } ListBuffer stats = variableDeclarators(mods, type, new ListBuffer<>(), true); // A "LocalVariableDeclarationStatement" subsumes the terminating semicolon @@ -2943,6 +3061,7 @@ private List localVariableDeclarations(JCModifiers mods, JCExpressi * | ";" */ public JCStatement parseSimpleStatement() { + ignoreDanglingComments(); // ignore comments before statement int pos = token.pos; switch (token.kind) { case LBRACE: @@ -3681,6 +3800,8 @@ JCVariableDecl variableDeclaratorRest(int pos, JCModifiers mods, JCExpression ty name = names.empty; } + saveDanglingDocComments(dc); + if (token.kind == EQ) { nextToken(); init = variableInitializer(); @@ -4260,6 +4381,9 @@ protected JCClassDecl classDeclaration(JCModifiers mods, Comment dc) { implementing = typeList(); } List permitting = permitsClause(mods, "class"); + + saveDanglingDocComments(dc); + List defs = classInterfaceOrRecordBody(name, false, false); JCClassDecl result = toP(F.at(pos).ClassDef( mods, name, typarams, extending, implementing, permitting, defs)); @@ -4282,6 +4406,9 @@ protected JCClassDecl recordDeclaration(JCModifiers mods, Comment dc) { nextToken(); implementing = typeList(); } + + saveDanglingDocComments(dc); + List defs = classInterfaceOrRecordBody(name, false, true); java.util.List fields = new ArrayList<>(); for (JCVariableDecl field : headerFields) { @@ -4341,6 +4468,9 @@ protected JCClassDecl interfaceDeclaration(JCModifiers mods, Comment dc) { extending = typeList(); } List permitting = permitsClause(mods, "interface"); + + saveDanglingDocComments(dc); + List defs; defs = classInterfaceOrRecordBody(name, true, false); JCClassDecl result = toP(F.at(pos).ClassDef( @@ -4386,6 +4516,8 @@ protected JCClassDecl enumDeclaration(JCModifiers mods, Comment dc) { implementing = typeList(); } + saveDanglingDocComments(dc); + List defs = enumBody(name); mods.flags |= Flags.ENUM; JCClassDecl result = toP(F.at(pos). @@ -4513,8 +4645,12 @@ JCTree enumeratorDeclaration(Name enumName) { int identPos = token.pos; Name name = ident(); int createPos = token.pos; + + saveDanglingDocComments(dc); + List args = (token.kind == LPAREN) ? arguments() : List.nil(); + JCClassDecl body = null; if (token.kind == LBRACE) { JCModifiers mods1 = F.at(Position.NOPOS).Modifiers(Flags.ENUM); @@ -4619,6 +4755,7 @@ protected List classOrInterfaceOrRecordBodyDeclaration(JCModifiers mods, } else if (isRecord && (mods.flags & Flags.STATIC) == 0) { log.error(DiagnosticFlag.SYNTAX, token.pos, Errors.InstanceInitializerNotAllowedInRecords); } + ignoreDanglingComments(); // no declaration with which dangling comments can be associated return List.of(block(pos, mods.flags)); } else { return constructorOrMethodOrFieldDeclaration(mods, className, isInterface, isRecord, dc); @@ -4924,6 +5061,9 @@ protected JCTree methodDeclaratorRest(int pos, thrown = qualidentList(true); } } + + saveDanglingDocComments(dc); + JCBlock body = null; JCExpression defaultValue; if (token.kind == LBRACE) { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Lexer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Lexer.java index 2223999bebe..bff4e027db7 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Lexer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Lexer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -25,6 +25,8 @@ package com.sun.tools.javac.parser; +import java.util.Queue; + import com.sun.tools.javac.parser.Tokens.*; import com.sun.tools.javac.util.Position.LineMap; @@ -89,4 +91,16 @@ public interface Lexer { * @return a LineMap */ LineMap getLineMap(); + + /** + * Returns a queue for the documentation comments encountered + * in a compilation unit. + * + * Comments may be added to this queue by the implementation; + * clients may remove them from the queue as they are analyzed. + * + * Note: all comments may also be associated with the following + * token. + */ + Queue getDocComments(); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ParserFactory.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ParserFactory.java index d27a785e363..3c07c382aa3 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ParserFactory.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ParserFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -27,6 +27,8 @@ import java.util.Locale; +import com.sun.tools.javac.code.DeferredLintHandler; +import com.sun.tools.javac.code.Lint; import com.sun.tools.javac.code.Preview; import com.sun.tools.javac.code.Source; import com.sun.tools.javac.tree.DocTreeMaker; @@ -68,6 +70,7 @@ public static ParserFactory instance(Context context) { final Options options; final ScannerFactory scannerFactory; final Locale locale; + final DeferredLintHandler deferredLintHandler; @SuppressWarnings("this-escape") protected ParserFactory(Context context) { @@ -83,6 +86,7 @@ protected ParserFactory(Context context) { this.options = Options.instance(context); this.scannerFactory = ScannerFactory.instance(context); this.locale = context.get(Locale.class); + this.deferredLintHandler = DeferredLintHandler.instance(context); } public JavacParser newParser(CharSequence input, boolean keepDocComments, boolean keepEndPos, boolean keepLineMap) { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Scanner.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Scanner.java index 3cfb8b9ddbe..a182c74b07b 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Scanner.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Scanner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -26,8 +26,10 @@ package com.sun.tools.javac.parser; import java.nio.*; +import java.util.ArrayDeque; import java.util.List; import java.util.ArrayList; +import java.util.Queue; import com.sun.tools.javac.util.Position.LineMap; import static com.sun.tools.javac.parser.Tokens.*; @@ -58,6 +60,11 @@ public class Scanner implements Lexer { private final JavaTokenizer tokenizer; + /** Queue of recently seen documentation comments. + * It is assumed the queue will typically be small. + */ + private final Queue docComments = new ArrayDeque<>(); + /** * Create a scanner from the input array. This method might * modify the array. To avoid copying the input array, ensure @@ -115,6 +122,15 @@ public void nextToken() { token = savedTokens.remove(0); } else { token = tokenizer.readToken(); + if (token.comments != null) { + for (var c : token.comments) { + switch (c.getStyle()) { + case JAVADOC -> { + docComments.add(c); + } + } + } + } } } @@ -129,6 +145,11 @@ public LineMap getLineMap() { return tokenizer.getLineMap(); } + @Override + public Queue getDocComments() { + return docComments; + } + public int errPos() { return tokenizer.errPos(); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java index b6be0a84b7d..a05d48d320b 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -280,6 +280,7 @@ enum CommentStyle { } String getText(); + JCDiagnostic.DiagnosticPosition getPos(); int getSourcePos(int index); CommentStyle getStyle(); boolean isDeprecated(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/VirtualParser.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/VirtualParser.java index 1d716f75a90..f32c1bf4756 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/VirtualParser.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/VirtualParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,7 @@ import com.sun.tools.javac.util.Position.LineMap; import java.util.Optional; +import java.util.Queue; import java.util.function.Consumer; import java.util.function.Function; @@ -146,6 +147,11 @@ public Token split() { return token; } + @Override + public Queue getDocComments() { + return S.getDocComments(); + } + @Override public int errPos() { return S.errPos(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties index 02c702ffee6..4d2e41997f2 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties @@ -1869,6 +1869,9 @@ compiler.warn.lintOption=\ compiler.warn.constant.SVUID=\ serialVersionUID must be constant in class {0} +compiler.warn.dangling.doc.comment=\ + documentation comment is not attached to any declaration + # 0: path compiler.warn.dir.path.element.not.found=\ bad path element "{0}": no such directory diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties index 7ed2ac2af46..de60c4fc672 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 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 @@ -189,6 +189,9 @@ javac.opt.Xlint.desc.cast=\ javac.opt.Xlint.desc.classfile=\ Warn about issues related to classfile contents. +javac.opt.Xlint.desc.dangling-doc-comments=\ + Warn about dangling documentation comments, not attached to any declaration. + javac.opt.Xlint.desc.missing-explicit-ctor=\ Warn about missing explicit constructors in public and protected classes in exported packages. diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java index afa590240e2..c729b6ff832 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -218,6 +218,11 @@ public String getText() { return null; } + @Override + public JCDiagnostic.DiagnosticPosition getPos() { + return null; + } + @Override public int getSourcePos(int index) { return Position.NOPOS; diff --git a/src/jdk.compiler/share/classes/module-info.java b/src/jdk.compiler/share/classes/module-info.java index 31f79bb090e..6c19613d3b6 100644 --- a/src/jdk.compiler/share/classes/module-info.java +++ b/src/jdk.compiler/share/classes/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -153,6 +153,8 @@ * from other files * {@code cast} use of unnecessary casts * {@code classfile} issues related to classfile contents + * {@code dangling-doc-comments} issues related to "dangling" documentation comments, + * not attached to a declaration * {@code deprecation} use of deprecated items * {@code dep-ann} items marked as deprecated in a documentation comment but not * using the {@code @Deprecated} annotation diff --git a/src/jdk.compiler/share/man/javac.1 b/src/jdk.compiler/share/man/javac.1 index ab429ab7d9a..6586bcaf83f 100644 --- a/src/jdk.compiler/share/man/javac.1 +++ b/src/jdk.compiler/share/man/javac.1 @@ -708,6 +708,9 @@ in a source file, and is used from other files. \f[V]classfile\f[R]: Warns about the issues related to classfile contents. .IP \[bu] 2 +\f[V]dangling-doc-comments\f[R]: Warns about extra or misplaced +documentation comments near the beginning of a declaration. +.IP \[bu] 2 \f[V]deprecation\f[R]: Warns about the use of deprecated items. .IP \[bu] 2 \f[V]dep-ann\f[R]: Warns about the items marked as deprecated in diff --git a/src/jdk.internal.le/linux/native/lible/CLibrary.cpp b/src/jdk.internal.le/linux/native/lible/CLibrary.cpp index 7815fe0cd2e..3215e1f5013 100644 --- a/src/jdk.internal.le/linux/native/lible/CLibrary.cpp +++ b/src/jdk.internal.le/linux/native/lible/CLibrary.cpp @@ -150,20 +150,20 @@ JNIEXPORT void JNICALL Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibr (JNIEnv *env, jobject, jint fd, jint cmd, jobject data) { winsize ws; - ws.ws_row = env->GetIntField(data, ws_row); - ws.ws_col = env->GetIntField(data, ws_col); - ws.ws_xpixel = env->GetIntField(data, ws_xpixel); - ws.ws_ypixel = env->GetIntField(data, ws_ypixel); + ws.ws_row = env->GetShortField(data, ws_row); + ws.ws_col = env->GetShortField(data, ws_col); + ws.ws_xpixel = env->GetShortField(data, ws_xpixel); + ws.ws_ypixel = env->GetShortField(data, ws_ypixel); if (ioctl(fd, cmd, &ws) != 0) { throw_errno(env); return ; } - env->SetIntField(data, ws_row, ws.ws_row); - env->SetIntField(data, ws_col, ws.ws_col); - env->SetIntField(data, ws_xpixel, ws.ws_xpixel); - env->SetIntField(data, ws_ypixel, ws.ws_ypixel); + env->SetShortField(data, ws_row, ws.ws_row); + env->SetShortField(data, ws_col, ws.ws_col); + env->SetShortField(data, ws_xpixel, ws.ws_xpixel); + env->SetShortField(data, ws_ypixel, ws.ws_ypixel); } /* diff --git a/src/jdk.internal.le/macosx/native/lible/CLibrary.cpp b/src/jdk.internal.le/macosx/native/lible/CLibrary.cpp index 760e090f5e8..3bc481f4afa 100644 --- a/src/jdk.internal.le/macosx/native/lible/CLibrary.cpp +++ b/src/jdk.internal.le/macosx/native/lible/CLibrary.cpp @@ -154,20 +154,20 @@ JNIEXPORT void JNICALL Java_jdk_internal_org_jline_terminal_impl_jna_osx_CLibrar (JNIEnv *env, jobject, jint fd, jlong cmd, jobject data) { winsize ws; - ws.ws_row = env->GetIntField(data, ws_row); - ws.ws_col = env->GetIntField(data, ws_col); - ws.ws_xpixel = env->GetIntField(data, ws_xpixel); - ws.ws_ypixel = env->GetIntField(data, ws_ypixel); + ws.ws_row = env->GetShortField(data, ws_row); + ws.ws_col = env->GetShortField(data, ws_col); + ws.ws_xpixel = env->GetShortField(data, ws_xpixel); + ws.ws_ypixel = env->GetShortField(data, ws_ypixel); if (ioctl(fd, cmd, &ws) != 0) { throw_errno(env); return ; } - env->SetIntField(data, ws_row, ws.ws_row); - env->SetIntField(data, ws_col, ws.ws_col); - env->SetIntField(data, ws_xpixel, ws.ws_xpixel); - env->SetIntField(data, ws_ypixel, ws.ws_ypixel); + env->SetShortField(data, ws_row, ws.ws_row); + env->SetShortField(data, ws_col, ws.ws_col); + env->SetShortField(data, ws_xpixel, ws.ws_xpixel); + env->SetShortField(data, ws_ypixel, ws.ws_ypixel); } /* diff --git a/src/jdk.jartool/share/man/jar.1 b/src/jdk.jartool/share/man/jar.1 index 26d2c422b2d..49a028e0f29 100644 --- a/src/jdk.jartool/share/man/jar.1 +++ b/src/jdk.jartool/share/man/jar.1 @@ -186,7 +186,8 @@ created or a non-modular JAR file being updated. Specifies the location of module dependence for generating the hash. .TP \f[V]\[at]\f[R]\f[I]file\f[R] -Reads \f[V]jar\f[R] options and file names from a text file. +Reads \f[V]jar\f[R] options and file names from a text file as if they +were supplied on the command line .SH OPERATION MODIFIERS VALID ONLY IN CREATE, UPDATE, AND GENERATE-INDEX MODES .PP You can use the following options to customize the actions of the create @@ -330,11 +331,14 @@ class files from the file \f[V]classes.list\f[R]. .PP \f[B]Note:\f[R] .PP -To shorten or simplify the \f[V]jar\f[R] command, you can specify -arguments in a separate text file and pass it to the \f[V]jar\f[R] -command with the at sign (\f[V]\[at]\f[R]) as a prefix. +To shorten or simplify the \f[V]jar\f[R] command, you can provide an arg +file that lists the files to include in the JAR file and pass it to the +\f[V]jar\f[R] command with the at sign (\f[V]\[at]\f[R]) as a prefix. .RS .PP \f[V]jar --create --file my.jar \[at]classes.list\f[R] .RE +.PP +If one or more entries in the arg file cannot be found then the jar +command fails without creating the JAR file. .RE diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java index aedaee2b828..17867e368bf 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java @@ -335,6 +335,10 @@ protected void generateOtherFiles(ClassTree classTree) DocPaths.RESOURCE_FILES.resolve(DocPaths.JQUERY_UI_CSS), false); } copyLegalFiles(options.createIndex()); + // Print a notice if the documentation contains diagnostic markers + if (messages.containsDiagnosticMarkers()) { + messages.notice("doclet.contains.diagnostic.markers"); + } } @Override diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java index 25ec603a064..3e461dc3e74 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java @@ -1611,6 +1611,7 @@ private boolean shouldRedirectRelativeLinks(Element element) { * @return the output */ public Content invalidTagOutput(String summary, Optional detail) { + messages.setContainsDiagnosticMarkers(); if (detail.isEmpty() || detail.get().isEmpty()) { return HtmlTree.SPAN(HtmlStyle.invalidTag, Text.of(summary)); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java index 9183804ddc6..576bf64e751 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java @@ -47,6 +47,7 @@ public class Messages { private final BaseConfiguration configuration; private final Resources resources; private final Reporter reporter; + private boolean containsDiagnosticMarkers = false; /** * Creates a {@code Messages} object to provide standardized access to @@ -212,6 +213,21 @@ public void notice(String key, Object... args) { } } + /** + * {@return true if the generated documentation contains one or more diagnostic markers + * for invalid input} + */ + public boolean containsDiagnosticMarkers() { + return containsDiagnosticMarkers; + } + + /** + * Sets the flag for documentation containing a diagnostic marker for invalid input. + */ + public void setContainsDiagnosticMarkers() { + this.containsDiagnosticMarkers = true; + } + // ***** Internal support ***** private void report(Diagnostic.Kind k, String msg) { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties index 7c5b43d35df..859289ff8bd 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties @@ -262,6 +262,8 @@ doclet.urlRedirected=URL {0} was redirected to {1} -- Update the command-line op doclet.unexpectedRedirect=Unexpected redirection for URL {0} to {1} doclet.duplicate.comment.for.property=Duplicate comment for property.\n\ Remove the comment on the property field or on this method to suppress this warning. +doclet.contains.diagnostic.markers=\ + The generated documentation contains diagnostic markers for invalid input. #Documentation for Enums doclet.enum_values_doc.fullbody=\ diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocMemberEnter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocMemberEnter.java index 51f45627f31..4628d851ab0 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocMemberEnter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocMemberEnter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -132,8 +132,8 @@ public void scan(JCTree tree) { tree.accept(this); } - @Override /** default for any non-overridden visit method. */ + @Override public void visitTree(JCTree tree) { maybeConstantExpr = false; } diff --git a/src/jdk.javadoc/share/man/javadoc.1 b/src/jdk.javadoc/share/man/javadoc.1 index 30256207b3e..d42d7137657 100644 --- a/src/jdk.javadoc/share/man/javadoc.1 +++ b/src/jdk.javadoc/share/man/javadoc.1 @@ -96,6 +96,22 @@ option either to recursively traverse a directory and its subdirectories, or to pass in an explicit list of package names. When you document individual source files, pass in a list of Java source file names. +.SS Documentation Comments +.PP +The \f[V]javadoc\f[R] tool uses the documentation comment, if any, that +immediately precedes the beginning of the declaration, whether that is +an annotation, modifier, or the name being declared. +If there are multiple documentation comments before the declaration, +only the last one (closest to the declaration) will be used. +If there are any documentation comments after the beginning of the +declaration, they will be ignored. +To check for any extra or misplaced documentation comments, compile your +source code with the \f[V]javac\f[R] option \f[V]-Xlint\f[R], or more +specifically, \f[V]-Xlint:dangling-doc-comments\f[R]. +Within a source file, you may use suppress any warnings generated by +these options by using +\f[V]\[at]SuppressWarnings(\[dq]dangling-doc-comments\[dq])\f[R] on a +suitable enclosing declaration. .SS Conformance .PP The standard doclet does not validate the content of documentation diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/DeserializationEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/DeserializationEvent.java index 66c376e9022..dd90a38b14c 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/DeserializationEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/DeserializationEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 @@ -36,9 +36,8 @@ @Label("Deserialization") @Name("jdk.Deserialization") @Description("Results of deserialization and ObjectInputFilter checks") -@MirrorEvent(className = "jdk.internal.event.DeserializationEvent") @RemoveFields("duration") -public final class DeserializationEvent extends AbstractJDKEvent { +public final class DeserializationEvent extends MirrorEvent { @Label("Filter Configured") public boolean filterConfigured; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/ErrorThrownEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/ErrorThrownEvent.java index 337cfad20fb..a87f51ff718 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/ErrorThrownEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/ErrorThrownEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -36,9 +36,8 @@ @Label("Java Error") @Category("Java Application") @Description("An object derived from java.lang.Error has been created. OutOfMemoryErrors are ignored") -@MirrorEvent(className = "jdk.internal.event.ErrorThrownEvent") @RemoveFields("duration") -public final class ErrorThrownEvent extends AbstractJDKEvent { +public final class ErrorThrownEvent extends MirrorEvent { @Label("Message") public String message; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/EventConfigurations.java b/src/jdk.jfr/share/classes/jdk/jfr/events/EventConfigurations.java index d4dba462f4b..7d829f69076 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/EventConfigurations.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/EventConfigurations.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -30,5 +30,4 @@ public final class EventConfigurations { public static final EventConfiguration FILE_READ = JVMSupport.getConfiguration(FileReadEvent.class); public static final EventConfiguration FILE_WRITE = JVMSupport.getConfiguration(FileWriteEvent.class); - public static final EventConfiguration FILE_FORCE = JVMSupport.getConfiguration(FileForceEvent.class); } diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionStatisticsEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionStatisticsEvent.java index cdaa6372f68..795f618b4e6 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionStatisticsEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionStatisticsEvent.java @@ -31,14 +31,15 @@ import jdk.jfr.Name; import jdk.jfr.StackTrace; import jdk.jfr.internal.MirrorEvent; +import jdk.jfr.internal.RemoveFields; import jdk.jfr.internal.Type; @Name(Type.EVENT_NAME_PREFIX + "ExceptionStatistics") @Label("Exception Statistics") @Category({ "Java Application", "Statistics" }) @Description("Number of objects derived from java.lang.Throwable that have been created") -@MirrorEvent(className = "jdk.internal.event.ExceptionStatisticsEvent") -public final class ExceptionStatisticsEvent extends AbstractPeriodicEvent { +@RemoveFields({"duration", "eventThread", "stackTrace"}) +public final class ExceptionStatisticsEvent extends MirrorEvent { @Label("Exceptions Created") public long throwables; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionThrownEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionThrownEvent.java index c61965755bd..22c87f3132d 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionThrownEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionThrownEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -37,9 +37,8 @@ @Label("Java Exception") @Category("Java Application") @Description("An object derived from java.lang.Exception has been created") -@MirrorEvent(className = "jdk.internal.event.ExceptionThrownEvent") @RemoveFields("duration") -public final class ExceptionThrownEvent extends AbstractJDKEvent { +public final class ExceptionThrownEvent extends MirrorEvent { @Label("Message") public String message; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/FileForceEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/FileForceEvent.java index d54d5e9b2a4..495112ffa9d 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/FileForceEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/FileForceEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -29,13 +29,14 @@ import jdk.jfr.Description; import jdk.jfr.Label; import jdk.jfr.Name; +import jdk.jfr.internal.MirrorEvent; import jdk.jfr.internal.Type; @Name(Type.EVENT_NAME_PREFIX + "FileForce") @Label("File Force") @Category("Java Application") @Description("Force updates to be written to file") -public final class FileForceEvent extends AbstractJDKEvent { +public final class FileForceEvent extends MirrorEvent { // The order of these fields must be the same as the parameters in // commit(..., String, boolean) @@ -48,7 +49,4 @@ public final class FileForceEvent extends AbstractJDKEvent { @Description("Whether the file metadata is updated") public boolean metaData; - public static void commit(long start, long duration, String path, boolean metaData) { - // Generated - } } diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/ProcessStartEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/ProcessStartEvent.java index 5ad2dc82fc1..01abc75e155 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/ProcessStartEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/ProcessStartEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -36,10 +36,9 @@ @Label("Process Start") @Name("jdk.ProcessStart") @Description("Operating system process started") -@MirrorEvent(className = "jdk.internal.event.ProcessStartEvent") @RemoveFields("duration") @StackFilter({"java.lang.ProcessBuilder", "java.lang.Runtime::exec"}) -public final class ProcessStartEvent extends AbstractJDKEvent { +public final class ProcessStartEvent extends MirrorEvent { @Label("Process Id") public long pid; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/SecurityPropertyModificationEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/SecurityPropertyModificationEvent.java index 7f4e5045c9d..1e6aea7b536 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/SecurityPropertyModificationEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/SecurityPropertyModificationEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,10 +33,9 @@ @Label("Security Property Modification") @Name("jdk.SecurityPropertyModification") @Description("Modification of Security property") -@MirrorEvent(className = "jdk.internal.event.SecurityPropertyModificationEvent") @RemoveFields("duration") @StackFilter({"java.security.Security::setProperty"}) -public final class SecurityPropertyModificationEvent extends AbstractJDKEvent { +public final class SecurityPropertyModificationEvent extends MirrorEvent { @Label("Key") public String key; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/SecurityProviderServiceEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/SecurityProviderServiceEvent.java index 8bbbf09d87d..fe4dbaec31d 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/SecurityProviderServiceEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/SecurityProviderServiceEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,10 +36,9 @@ @Label("Security Provider Instance Request") @Name("jdk.SecurityProviderService") @Description("Details of Provider.getInstance(String type, String algorithm) calls") -@MirrorEvent(className = "jdk.internal.event.SecurityProviderServiceEvent") @RemoveFields("duration") @StackFilter({"java.security.Provider::getService"}) -public final class SecurityProviderServiceEvent extends AbstractJDKEvent { +public final class SecurityProviderServiceEvent extends MirrorEvent { @Label("Type of Service") public String type; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/SerializationMisdeclarationEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/SerializationMisdeclarationEvent.java index b88ba270708..ce170d5ad9e 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/SerializationMisdeclarationEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/SerializationMisdeclarationEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,9 +40,8 @@ " The checks are usually performed just once per serializable class," + " the first time it is used by serialization." + " Under high memory pressure, a class might be re-checked again.") -@MirrorEvent(className = "jdk.internal.event.SerializationMisdeclarationEvent") @RemoveFields({"duration", "stackTrace", "eventThread"}) -public final class SerializationMisdeclarationEvent extends AbstractJDKEvent { +public final class SerializationMisdeclarationEvent extends MirrorEvent { @Label("Misdeclared Class") public Class misdeclaredClass; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/SocketReadEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/SocketReadEvent.java index 7ef63765eec..917eabd9206 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/SocketReadEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/SocketReadEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -38,8 +38,7 @@ @Label("Socket Read") @Category("Java Application") @Description("Reading data from a socket") -@MirrorEvent(className = "jdk.internal.event.SocketReadEvent") -public final class SocketReadEvent extends AbstractJDKEvent { +public final class SocketReadEvent extends MirrorEvent { @Label("Remote Host") public String host; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/SocketWriteEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/SocketWriteEvent.java index 6e776b8871d..92c85c132d4 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/SocketWriteEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/SocketWriteEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -37,8 +37,7 @@ @Label("Socket Write") @Category("Java Application") @Description("Writing data to a socket") -@MirrorEvent(className = "jdk.internal.event.SocketWriteEvent") -public final class SocketWriteEvent extends AbstractJDKEvent { +public final class SocketWriteEvent extends MirrorEvent { @Label("Remote Host") public String host; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/TLSHandshakeEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/TLSHandshakeEvent.java index df2f4cfc2ed..d0d81ac63bc 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/TLSHandshakeEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/TLSHandshakeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,10 +37,9 @@ @Label("TLS Handshake") @Name("jdk.TLSHandshake") @Description("Parameters used in TLS Handshake") -@MirrorEvent(className = "jdk.internal.event.TLSHandshakeEvent") @RemoveFields("duration") @StackFilter("sun.security.ssl.Finished::recordEvent") -public final class TLSHandshakeEvent extends AbstractJDKEvent { +public final class TLSHandshakeEvent extends MirrorEvent { @Label("Peer Host") public String peerHost; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/ThreadSleepEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/ThreadSleepEvent.java index 216ad370aca..617f18511ce 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/ThreadSleepEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/ThreadSleepEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -34,11 +34,10 @@ @Category("Java Application") @Label("Java Thread Sleep") @Name("jdk.ThreadSleep") -@MirrorEvent(className = "jdk.internal.event.ThreadSleepEvent") @StackFilter({"java.lang.Thread::afterSleep", "java.lang.Thread::sleepNanos", "java.lang.Thread::sleep"}) -public final class ThreadSleepEvent extends AbstractJDKEvent { +public final class ThreadSleepEvent extends MirrorEvent { @Label("Sleep Time") @Timespan(Timespan.NANOSECONDS) public long time; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadEndEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadEndEvent.java index 8ad64abf1bf..12d404ace44 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadEndEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadEndEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 @@ -34,9 +34,8 @@ @Category("Java Application") @Label("Virtual Thread End") @Name("jdk.VirtualThreadEnd") -@MirrorEvent(className = "jdk.internal.event.VirtualThreadEndEvent") @RemoveFields({"duration", "stackTrace"}) -public final class VirtualThreadEndEvent extends AbstractJDKEvent { +public final class VirtualThreadEndEvent extends MirrorEvent { @Label("Thread Id") public long javaThreadId; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadPinnedEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadPinnedEvent.java index f109966f1be..83547125ac5 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadPinnedEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadPinnedEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 @@ -33,6 +33,5 @@ @Category("Java Application") @Label("Virtual Thread Pinned") @Name("jdk.VirtualThreadPinned") -@MirrorEvent(className = "jdk.internal.event.VirtualThreadPinnedEvent") -public final class VirtualThreadPinnedEvent extends AbstractJDKEvent { +public final class VirtualThreadPinnedEvent extends MirrorEvent { } diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadStartEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadStartEvent.java index 646c2379178..216ecd9ba79 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadStartEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadStartEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 @@ -34,9 +34,8 @@ @Category("Java Application") @Label("Virtual Thread Start") @Name("jdk.VirtualThreadStart") -@MirrorEvent(className = "jdk.internal.event.VirtualThreadStartEvent") @RemoveFields("duration") -public final class VirtualThreadStartEvent extends AbstractJDKEvent { +public final class VirtualThreadStartEvent extends MirrorEvent { @Label("Thread Id") public long javaThreadId; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadSubmitFailedEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadSubmitFailedEvent.java index d59fbe2931e..5fab1eaebf0 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadSubmitFailedEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadSubmitFailedEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 @@ -36,9 +36,8 @@ @Label("Virtual Thread Submit Failed") @Name("jdk.VirtualThreadSubmitFailed") @Description("Submit of task for virtual thread failed") -@MirrorEvent(className = "jdk.internal.event.VirtualThreadSubmitFailedEvent") @RemoveFields("duration") -public final class VirtualThreadSubmitFailedEvent extends AbstractJDKEvent { +public final class VirtualThreadSubmitFailedEvent extends MirrorEvent { @Label("Thread Id") public long javaThreadId; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/X509CertificateEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/X509CertificateEvent.java index 7ec9c043605..ab3aaafc524 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/X509CertificateEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/X509CertificateEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,9 +33,8 @@ @Label("X509 Certificate") @Name("jdk.X509Certificate") @Description("Details of X.509 Certificate parsed by JDK") -@MirrorEvent(className = "jdk.internal.event.X509CertificateEvent") @RemoveFields("duration") -public final class X509CertificateEvent extends AbstractJDKEvent { +public final class X509CertificateEvent extends MirrorEvent { @Label("Signature Algorithm") public String algorithm; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/events/X509ValidationEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/events/X509ValidationEvent.java index c4a73d2ffe8..5cc05f2f3eb 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/events/X509ValidationEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/events/X509ValidationEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,9 +33,8 @@ @Label("X509 Validation") @Name("jdk.X509Validation") @Description("Serial numbers from X.509 Certificates forming chain of trust") -@MirrorEvent(className = "jdk.internal.event.X509ValidationEvent") @RemoveFields("duration") -public final class X509ValidationEvent extends AbstractJDKEvent { +public final class X509ValidationEvent extends MirrorEvent { @CertificateId @Label("Certificate Id") @Unsigned diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/EventInstrumentation.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/EventInstrumentation.java index b8d386f08bf..cf7e162a42e 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/EventInstrumentation.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/EventInstrumentation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -90,7 +90,6 @@ private record SettingDesc(ClassDesc paramType, String methodName) { private static final ClassDesc TYPE_ISE = Bytecode.classDesc(IllegalStateException.class); private static final ClassDesc TYPE_EVENT_WRITER = classDesc(EventWriter.class); private static final ClassDesc TYPE_EVENT_WRITER_FACTORY = ClassDesc.of("jdk.jfr.internal.event.EventWriterFactory"); - private static final ClassDesc TYPE_MIRROR_EVENT = Bytecode.classDesc(MirrorEvent.class); private static final ClassDesc TYPE_OBJECT = Bytecode.classDesc(Object.class); private static final ClassDesc TYPE_SETTING_DEFINITION = Bytecode.classDesc(SettingDefinition.class); private static final MethodDesc METHOD_BEGIN = MethodDesc.of("begin", "()V"); @@ -144,9 +143,7 @@ private record SettingDesc(ClassDesc paramType, String methodName) { private ImplicitFields determineImplicitFields() { if (isJDK) { - // For now, only support mirror events in java.base - String fullName = "java.base:" + className; - Class eventClass = MirrorEvents.find(fullName); + Class eventClass = MirrorEvents.find(isJDK, className); if (eventClass != null) { return new ImplicitFields(eventClass); } @@ -221,20 +218,6 @@ boolean isEnabled() { return true; } - boolean isMirrorEvent() { - String typeDescriptor = TYPE_MIRROR_EVENT.descriptorString(); - for (ClassElement ce : classModel.elements()) { - if (ce instanceof RuntimeVisibleAnnotationsAttribute rvaa) { - for (var annotation : rvaa.annotations()) { - if (annotation.className().equalsString(typeDescriptor)) { - return true; - } - } - } - } - return false; - } - @SuppressWarnings("unchecked") // Only supports String, String[] and Boolean values private static T annotationValue(ClassModel classModel, ClassDesc classDesc, Class type) { @@ -487,7 +470,7 @@ private void makeInstrumented() { // stack:[ex] [EW] catchAllHandler.pop(); // stack:[ex] - catchAllHandler.throwInstruction(); + catchAllHandler.athrow(); }); }); codeBuilder.labelBinding(excluded); @@ -579,7 +562,7 @@ void updateStaticCommit(BlockCodeBuilder blockCodeBuilder, Label excluded) { // write begin event getEventConfiguration(blockCodeBuilder); // stack: [EW], [EW], [EventConfiguration] - blockCodeBuilder.constantInstruction(Opcode.LDC2_W, eventTypeId); + blockCodeBuilder.loadConstant(Opcode.LDC2_W, eventTypeId); // stack: [EW], [EW], [EventConfiguration] [long] invokevirtual(blockCodeBuilder, TYPE_EVENT_WRITER, EventWriterMethod.BEGIN_EVENT.method()); // stack: [EW], [integer] @@ -589,7 +572,7 @@ void updateStaticCommit(BlockCodeBuilder blockCodeBuilder, Label excluded) { blockCodeBuilder.dup(); // stack: [EW], [EW] tk = TypeKind.from(argumentTypes[argIndex++]); - blockCodeBuilder.loadInstruction(tk, slotIndex); + blockCodeBuilder.loadLocal(tk, slotIndex); // stack: [EW], [EW], [long] slotIndex += tk.slotSize(); invokevirtual(blockCodeBuilder, TYPE_EVENT_WRITER, EventWriterMethod.PUT_LONG.method()); @@ -600,7 +583,7 @@ void updateStaticCommit(BlockCodeBuilder blockCodeBuilder, Label excluded) { blockCodeBuilder.dup(); // stack: [EW], [EW] tk = TypeKind.from(argumentTypes[argIndex++]); - blockCodeBuilder.loadInstruction(tk, slotIndex); + blockCodeBuilder.loadLocal(tk, slotIndex); // stack: [EW], [EW], [long] slotIndex += tk.slotSize(); invokevirtual(blockCodeBuilder, TYPE_EVENT_WRITER, EventWriterMethod.PUT_LONG.method()); @@ -626,7 +609,7 @@ void updateStaticCommit(BlockCodeBuilder blockCodeBuilder, Label excluded) { blockCodeBuilder.dup(); // stack: [EW], [EW] tk = TypeKind.from(argumentTypes[argIndex++]); - blockCodeBuilder.loadInstruction(tk, slotIndex); + blockCodeBuilder.loadLocal(tk, slotIndex); // stack:[EW], [EW], [field] slotIndex += tk.slotSize(); FieldDesc field = fieldDescs.get(fieldIndex); @@ -693,7 +676,7 @@ void updateInstanceCommit(BlockCodeBuilder blockCodeBuilder, Label end, Label ex // stack: [EW] [EW] getEventConfiguration(blockCodeBuilder); // stack: [EW] [EW] [EC] - blockCodeBuilder.constantInstruction(Opcode.LDC2_W, eventTypeId); + blockCodeBuilder.loadConstant(Opcode.LDC2_W, eventTypeId); invokevirtual(blockCodeBuilder, TYPE_EVENT_WRITER, EventWriterMethod.BEGIN_EVENT.method()); // stack: [EW] [int] blockCodeBuilder.ifeq(excluded); @@ -755,7 +738,7 @@ private void updateEnabledMethod(MethodDesc method) { Label nullLabel = codeBuilder.newLabel(); if (guardEventConfiguration) { getEventConfiguration(codeBuilder); - codeBuilder.branchInstruction(Opcode.IFNULL, nullLabel); + codeBuilder.if_null(nullLabel); } getEventConfiguration(codeBuilder); invokevirtual(codeBuilder, TYPE_EVENT_CONFIGURATION, METHOD_IS_ENABLED); diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/JVMUpcalls.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/JVMUpcalls.java index 25d0e0418f1..9c37a1ab660 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/JVMUpcalls.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/JVMUpcalls.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -112,9 +112,6 @@ static byte[] bytesForEagerInstrumentation(long traceId, boolean forceInstrument Logger.log(LogTag.JFR_SYSTEM, LogLevel.INFO, "Skipping instrumentation for " + eventName + " since container support is missing"); return oldBytes; } - if (ei.isMirrorEvent()) { - return oldBytes; - } if (!forceInstrumentation) { // Assume we are recording diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java index 29267803009..7d61d3c984f 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java @@ -144,10 +144,6 @@ public synchronized EventType register(Class } EventConfiguration configuration = getConfiguration(eventClass, true); if (configuration == null) { - if (eventClass.getAnnotation(MirrorEvent.class) != null) { - // Don't register mirror classes. - return null; - } PlatformEventType pe = findMirrorType(eventClass); configuration = makeConfiguration(eventClass, pe, dynamicAnnotations, dynamicFields); } @@ -162,8 +158,7 @@ public synchronized EventType register(Class } private PlatformEventType findMirrorType(Class eventClass) throws InternalError { - String fullName = eventClass.getModule().getName() + ":" + eventClass.getName(); - Class mirrorClass = MirrorEvents.find(fullName); + Class mirrorClass = MirrorEvents.find(eventClass); if (mirrorClass == null) { return null; // not a mirror } diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvent.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvent.java index ce5126e3afe..deabd2aaacd 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvent.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 @@ -22,32 +22,28 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ - package jdk.jfr.internal; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.ElementType; +import jdk.jfr.Enabled; +import jdk.jfr.Registered; +import jdk.jfr.StackTrace; + /** - * Any event class annotated with this annotation must be added - * to the {@link MirrorEvents) class for it to take effect. + * A mirror event is a fictitious event class that contains metadata about an + * event, but not the implementation to write the event data to buffers. + *

          + * A mirror event should be used when an event class is in a module where a + * dependency on the jdk.jfr module is not possible, for example, due to a + * circular dependency. + *

          + * Subclass the MirrorEvent class and add the exact same fields as the actual + * event, but with labels, descriptions etc. + *

          + * For the mirror mechanism to work, the mirror class must be registered in the + * jdk.jfr.internal.MirrorEvents class. */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ ElementType.TYPE }) -public @interface MirrorEvent { - /** - * Fully qualified name of the class to mirror metadata for (for example, - * {@code "jdk.internal.event.Example"}) - * - * @return the fully qualified class name of the event - */ - String className(); - - /** - * The module where the event is located, by default {@code "java.base"}. - * - * @return the module name - */ - String module() default "java.base"; +@Registered(false) +@Enabled(false) +@StackTrace(false) +public abstract class MirrorEvent { } diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java index 7c74bb41f4a..8ae1f3b031f 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java @@ -24,14 +24,14 @@ */ package jdk.jfr.internal; -import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; -import jdk.jfr.Event; import jdk.jfr.events.DeserializationEvent; import jdk.jfr.events.ErrorThrownEvent; import jdk.jfr.events.ExceptionStatisticsEvent; import jdk.jfr.events.ExceptionThrownEvent; +import jdk.jfr.events.FileForceEvent; import jdk.jfr.events.ProcessStartEvent; import jdk.jfr.events.SecurityPropertyModificationEvent; import jdk.jfr.events.SecurityProviderServiceEvent; @@ -47,52 +47,47 @@ import jdk.jfr.events.X509CertificateEvent; import jdk.jfr.events.X509ValidationEvent; -public final class MirrorEvents { - private static final Class[] mirrorEventClasses = { - DeserializationEvent.class, - ProcessStartEvent.class, - SecurityPropertyModificationEvent.class, - SecurityProviderServiceEvent.class, - SerializationMisdeclarationEvent.class, - SocketReadEvent.class, - SocketWriteEvent.class, - ThreadSleepEvent.class, - TLSHandshakeEvent.class, - VirtualThreadStartEvent.class, - VirtualThreadEndEvent.class, - VirtualThreadPinnedEvent.class, - VirtualThreadSubmitFailedEvent.class, - X509CertificateEvent.class, - X509ValidationEvent.class, - ErrorThrownEvent.class, - ExceptionStatisticsEvent.class, - ExceptionThrownEvent.class, +/** + * This class registers all mirror events. + */ +final class MirrorEvents { + private static final Map> mirrorLookup = new ConcurrentHashMap<>(); + + // Add mirror event mapping here. See MirrorEvent class for details. + static { + register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class); + register("jdk.internal.event.FileForceEvent", FileForceEvent.class); + register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class); + register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class); + register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class); + register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class); + register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class); + register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class); + register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class); + register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class); + register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class); + register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class); + register("jdk.internal.event.VirtualThreadPinnedEvent", VirtualThreadPinnedEvent.class); + register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class); + register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class); + register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class); + register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class); + register("jdk.internal.event.ExceptionStatisticsEvent", ExceptionStatisticsEvent.class); + register("jdk.internal.event.ExceptionThrownEvent", ExceptionThrownEvent.class); }; - private static final Map> mirrorLookup = createLookup(); + private static void register(String eventClassName, Class mirrorClass) { + mirrorLookup.put(eventClassName, mirrorClass); + } - public static Class find(String name) { - // When of this class is executed it may lead - // to a JVM up call and invocation of this method before - // the mirrorLookup field has been set. This is fine, - // mirrors should not be instrumented. - if (mirrorLookup != null) { - return mirrorLookup.get(name); - } - return null; + static Class find(Class eventClass) { + return find(eventClass.getClassLoader() == null, eventClass.getName()); } - @SuppressWarnings("unchecked") - private static Map> createLookup() { - Map> mirrors = new HashMap<>(); - for (Class eventClass : mirrorEventClasses) { - MirrorEvent me = eventClass.getAnnotation(MirrorEvent.class); - if (me == null) { - throw new InternalError("Mirror class must have annotation " + MirrorEvent.class.getName()); - } - String fullName = me.module() + ":" + me.className(); - mirrors.put(fullName, (Class) eventClass); + static Class find(boolean bootClassLoader, String name) { + if (bootClassLoader) { + return mirrorLookup.get(name); } - return mirrors; + return null; } } diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/TypeLibrary.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/TypeLibrary.java index 19c83b3dc1c..cab6e7befe1 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/TypeLibrary.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/TypeLibrary.java @@ -263,7 +263,7 @@ public static synchronized Type createType(Class clazz, List clazz, List clazz) { + if (jdk.internal.event.Event.class.isAssignableFrom(clazz)) { + return true; + } + if (MirrorEvent.class.isAssignableFrom(clazz)) { + return true; + } + return false; + } + private static void addAnnotations(Class clazz, Type type, List dynamicAnnotations) { ArrayList aes = new ArrayList<>(); if (dynamicAnnotations.isEmpty()) { diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/AbstractDCmd.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/AbstractDCmd.java index 21a33481fe8..d0b95df8484 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/AbstractDCmd.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/AbstractDCmd.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -57,7 +57,7 @@ abstract class AbstractDCmd { private String source; // Called by native - public abstract String[] printHelp(); + public abstract String[] getHelp(); // Called by native. The number of arguments for each command is // reported to the DCmdFramework as a hardcoded number in native. @@ -233,7 +233,7 @@ protected final void printPath(SafePath path) { } protected final void printHelpText() { - for (String line : printHelp()) { + for (String line : getHelp()) { println(line); } } diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdCheck.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdCheck.java index fdf077fa6c9..998cca46131 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdCheck.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdCheck.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -139,7 +139,7 @@ private static List sortByEventPath(Collection events) { } @Override - public String[] printHelp() { + public String[] getHelp() { // 0123456789001234567890012345678900123456789001234567890012345678900123456789001234567890 return """ Syntax : JFR.check [options] diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java index c67c8a756c7..8ea49cbd3a5 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -248,7 +248,7 @@ private void printMaxChunkSize() { } @Override - public String[] printHelp() { + public String[] getHelp() { throw new InternalError("Should not reach here!"); } diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdDump.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdDump.java index 594e78bdbbf..605eb4bc745 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdDump.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdDump.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -194,7 +194,7 @@ private PlatformRecording newSnapShot(PlatformRecorder recorder, Recording recor } @Override - public String[] printHelp() { + public String[] getHelp() { // 0123456789001234567890012345678900123456789001234567890012345678900123456789001234567890 return """ Syntax : JFR.dump [options] diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdQuery.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdQuery.java index e892477bb45..4c296d8a78f 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdQuery.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdQuery.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -87,7 +87,7 @@ private String stripQuotes(String text) { } @Override - public String[] printHelp() { + public String[] getHelp() { List lines = new ArrayList<>(); lines.addAll(getOptions().lines().toList()); lines.add(""); diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java index 692ab578478..0dbd70801d2 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java @@ -318,7 +318,7 @@ private boolean hasJDKEvents(Map settings) { return false; } - public String[] printStartupHelp() { + public String[] getStartupHelp() { Map parameters = Map.of( "$SYNTAX", "-XX:StartFlightRecording:[options]", "$SOURCE", "-XX:StartFlightRecording:", @@ -331,7 +331,7 @@ public String[] printStartupHelp() { } @Override - public String[] printHelp() { + public String[] getHelp() { Map parameters = Map.of( "$SYNTAX", "JFR.start [options]", "$SOURCE", "$ jcmd JFR.start ", diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStop.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStop.java index baa45396a4b..92d2d28b472 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStop.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStop.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -71,7 +71,7 @@ protected void execute(ArgumentParser parser) throws DCmdException { } @Override - public String[] printHelp() { + public String[] getHelp() { // 0123456789001234567890012345678900123456789001234567890012345678900123456789001234567890 return """ Syntax : JFR.stop [options] diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdView.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdView.java index cc8a381de0b..1d6f6e3dd23 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdView.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -89,7 +89,7 @@ protected final boolean isInteractive() { } @Override - public String[] printHelp() { + public String[] getHelp() { List lines = new ArrayList<>(); lines.addAll(getOptions().lines().toList()); lines.add(""); diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/FileChannelImplInstrumentor.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/FileChannelImplInstrumentor.java index d0d8d9b4509..5a795395c72 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/FileChannelImplInstrumentor.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/FileChannelImplInstrumentor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -45,25 +45,6 @@ private FileChannelImplInstrumentor() { private String path; - @JIInstrumentationMethod - public void force(boolean metaData) throws IOException { - EventConfiguration eventConfiguration = EventConfigurations.FILE_FORCE; - if (!eventConfiguration.isEnabled()) { - force(metaData); - return; - } - long start = 0; - try { - start = EventConfiguration.timestamp(); - force(metaData); - } finally { - long duration = EventConfiguration.timestamp() - start; - if (eventConfiguration.shouldCommit(duration)) { - FileForceEvent.commit(start, duration, path, metaData); - } - } - } - @JIInstrumentationMethod public int read(ByteBuffer dst) throws IOException { EventConfiguration eventConfiguration = EventConfigurations.FILE_READ; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/JDKEvents.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/JDKEvents.java index a6c65641cd3..fb981c42cae 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/JDKEvents.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/JDKEvents.java @@ -57,7 +57,6 @@ public final class JDKEvents { private static final Class[] eventClasses = { - FileForceEvent.class, FileReadEvent.class, FileWriteEvent.class, ActiveSettingEvent.class, @@ -68,6 +67,7 @@ public final class JDKEvents { jdk.internal.event.ErrorThrownEvent.class, jdk.internal.event.ExceptionStatisticsEvent.class, jdk.internal.event.ExceptionThrownEvent.class, + jdk.internal.event.FileForceEvent.class, jdk.internal.event.ProcessStartEvent.class, jdk.internal.event.SecurityPropertyModificationEvent.class, jdk.internal.event.SecurityProviderServiceEvent.class, diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/util/ImplicitFields.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/util/ImplicitFields.java index 8e302f8542f..c97efe0bdb9 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/util/ImplicitFields.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/util/ImplicitFields.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,11 +41,11 @@ public final class ImplicitFields { private final List fields = new ArrayList<>(4); public ImplicitFields(Class eventClass) { - fields.add(START_TIME); // for completeness, not really needed + fields.add(START_TIME); fields.add(DURATION); fields.add(STACK_TRACE); fields.add(EVENT_THREAD); - for (Class c = eventClass; jdk.internal.event.Event.class != c; c = c.getSuperclass()) { + for (Class c = eventClass; !Utils.isEventBaseClass(c); c = c.getSuperclass()) { RemoveFields rf = c.getAnnotation(RemoveFields.class); if (rf != null) { for (String value : rf.value()) { diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/util/Utils.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/util/Utils.java index 4ed36989277..c133a11b3c5 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/util/Utils.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/util/Utils.java @@ -51,6 +51,7 @@ import jdk.jfr.internal.LogLevel; import jdk.jfr.internal.LogTag; import jdk.jfr.internal.Logger; +import jdk.jfr.internal.MirrorEvent; import jdk.jfr.internal.SecuritySupport; import jdk.jfr.internal.Type; import jdk.jfr.internal.settings.PeriodSetting; @@ -206,9 +207,8 @@ public static List sanitizeNullFreeList(List elements, Class clazz) } public static List getVisibleEventFields(Class clazz) { - Utils.ensureValidEventSubclass(clazz); List fields = new ArrayList<>(); - for (Class c = clazz; c != jdk.internal.event.Event.class; c = c.getSuperclass()) { + for (Class c = clazz; !Utils.isEventBaseClass(c); c = c.getSuperclass()) { for (Field field : c.getDeclaredFields()) { // skip private field in base classes if (c == clazz || !Modifier.isPrivate(field.getModifiers())) { @@ -219,6 +219,16 @@ public static List getVisibleEventFields(Class clazz) { return fields; } + public static boolean isEventBaseClass(Class clazz) { + if (jdk.internal.event.Event.class == clazz) { + return true; + } + if (jdk.jfr.internal.MirrorEvent.class == clazz) { + return true; + } + return false; + } + public static void ensureValidEventSubclass(Class eventClass) { if (jdk.internal.event.Event.class.isAssignableFrom(eventClass) && Modifier.isAbstract(eventClass.getModifiers())) { throw new IllegalArgumentException("Abstract event classes are not allowed"); @@ -338,7 +348,7 @@ public static String upgradeLegacyJDKEvent(String eventName) { return eventName; } - public static void verifyMirror(Class mirror, Class real) { + public static void verifyMirror(Class mirror, Class real) { Class cMirror = Objects.requireNonNull(mirror); Class cReal = Objects.requireNonNull(real); @@ -353,7 +363,7 @@ public static void verifyMirror(Class mirror, Class real) { } while (cReal != null) { for (Field realField : cReal.getDeclaredFields()) { - if (isSupportedType(realField.getType())) { + if (isSupportedType(realField.getType()) && !realField.isSynthetic()) { String fieldName = realField.getName(); Field mirrorField = mirrorFields.get(fieldName); if (mirrorField == null) { diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java index 40693b33d6d..96b7c76f24d 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java @@ -668,7 +668,7 @@ private void genHasSplitPackages(ClassBuilder clb) { "hasSplitPackages", MTD_boolean, ACC_PUBLIC, - cob -> cob.constantInstruction(hasSplitPackages ? 1 : 0) + cob -> cob.loadConstant(hasSplitPackages ? 1 : 0) .ireturn()); } @@ -686,7 +686,7 @@ private void genIncubatorModules(ClassBuilder clb) { "hasIncubatorModules", MTD_boolean, ACC_PUBLIC, - cob -> cob.constantInstruction(hasIncubatorModules ? 1 : 0) + cob -> cob.loadConstant(hasIncubatorModules ? 1 : 0) .ireturn()); } @@ -700,7 +700,7 @@ private void genModuleDescriptorsMethod(ClassBuilder clb) { MTD_ModuleDescriptorArray, ACC_PUBLIC, cob -> { - cob.constantInstruction(moduleInfos.size()) + cob.loadConstant(moduleInfos.size()) .anewarray(CD_MODULE_DESCRIPTOR) .astore(MD_VAR); @@ -764,13 +764,13 @@ private void genModuleDescriptorsMethod(ClassBuilder clb) { MTD_ModuleDescriptorArray, ACC_PUBLIC, cob -> { - cob.constantInstruction(moduleInfos.size()) + cob.loadConstant(moduleInfos.size()) .anewarray(CD_MODULE_DESCRIPTOR) .dup() .astore(MD_VAR); cob.new_(arrayListClassDesc) .dup() - .constantInstruction(moduleInfos.size()) + .loadConstant(moduleInfos.size()) .invokespecial(arrayListClassDesc, INIT_NAME, MethodTypeDesc.of(CD_void, CD_int)) .astore(DEDUP_LIST_VAR); cob.aload(0) @@ -797,7 +797,7 @@ private void genModuleDescriptorsMethod(ClassBuilder clb) { if (curDedupVar > dedupVarStart) { for (int i = dedupVarStart; i < curDedupVar; i++) { cob.aload(DEDUP_LIST_VAR) - .constantInstruction(i - dedupVarStart) + .loadConstant(i - dedupVarStart) .invokevirtual(arrayListClassDesc, "get", MethodTypeDesc.of(CD_Object, CD_int)) .astore(i); } @@ -845,7 +845,7 @@ private void genModuleTargetsMethod(ClassBuilder clb) { MTD_ModuleTargetArray, ACC_PUBLIC, cob -> { - cob.constantInstruction(moduleInfos.size()) + cob.loadConstant(moduleInfos.size()) .anewarray(CD_MODULE_TARGET) .astore(MT_VAR); @@ -868,12 +868,12 @@ private void genModuleTargetsMethod(ClassBuilder clb) { ModuleInfo minfo = moduleInfos.get(index); if (minfo.target() != null) { cob.aload(MT_VAR) - .constantInstruction(index); + .loadConstant(index); // new ModuleTarget(String) cob.new_(CD_MODULE_TARGET) .dup() - .constantInstruction(minfo.target().targetPlatform()) + .loadConstant(minfo.target().targetPlatform()) .invokespecial(CD_MODULE_TARGET, INIT_NAME, MTD_void_String); @@ -896,7 +896,7 @@ private void genModuleHashesMethod(ClassBuilder clb) { MTD_ModuleHashesArray, ACC_PUBLIC, cob -> { - cob.constantInstruction(moduleInfos.size()) + cob.loadConstant(moduleInfos.size()) .anewarray(CD_MODULE_HASHES) .astore(MH_VAR); @@ -923,7 +923,7 @@ private void genModuleResolutionsMethod(ClassBuilder clb) { MTD_ModuleResolutionArray, ACC_PUBLIC, cob -> { - cob.constantInstruction(moduleInfos.size()) + cob.loadConstant(moduleInfos.size()) .anewarray(CD_MODULE_RESOLUTION) .astore(0); @@ -931,10 +931,10 @@ private void genModuleResolutionsMethod(ClassBuilder clb) { ModuleInfo minfo = moduleInfos.get(index); if (minfo.moduleResolution() != null) { cob.aload(0) - .constantInstruction(index) + .loadConstant(index) .new_(CD_MODULE_RESOLUTION) .dup() - .constantInstruction(minfo.moduleResolution().value()) + .loadConstant(minfo.moduleResolution().value()) .invokespecial(CD_MODULE_RESOLUTION, INIT_NAME, MTD_void_int) @@ -1000,7 +1000,7 @@ private void generate(ClassBuilder clb, } // new Map$Entry[size] - cob.constantInstruction(map.size()) + cob.loadConstant(map.size()) .anewarray(CD_Map_Entry); int index = 0; @@ -1009,8 +1009,8 @@ private void generate(ClassBuilder clb, Set s = e.getValue(); cob.dup() - .constantInstruction(index) - .constantInstruction(name); + .loadConstant(index) + .loadConstant(name); // if de-duplicated then load the local, otherwise generate code Integer varIndex = locals.get(s); @@ -1046,13 +1046,13 @@ private void genImmutableSet(CodeBuilder cob, Set set) { // use Set.of(Object[]) when there are more than 2 elements // use Set.of(Object) or Set.of(Object, Object) when fewer if (size > 2) { - cob.constantInstruction(size) + cob.loadConstant(size) .anewarray(CD_String); int i = 0; for (String element : sorted(set)) { cob.dup() - .constantInstruction(i) - .constantInstruction(element) + .loadConstant(i) + .loadConstant(element) .aastore(); i++; } @@ -1062,7 +1062,7 @@ private void genImmutableSet(CodeBuilder cob, Set set) { true); } else { for (String element : sorted(set)) { - cob.constantInstruction(element); + cob.loadConstant(element); } var mtdArgs = new ClassDesc[size]; Arrays.fill(mtdArgs, CD_Object); @@ -1166,7 +1166,7 @@ void build() { void newBuilder() { cob.new_(CD_MODULE_BUILDER) .dup() - .constantInstruction(md.name()) + .loadConstant(md.name()) .invokespecial(CD_MODULE_BUILDER, INIT_NAME, MTD_void_String) @@ -1188,7 +1188,7 @@ void newBuilder() { */ void setModuleBit(String methodName, boolean value) { cob.aload(BUILDER_VAR) - .constantInstruction(value ? 1 : 0) + .loadConstant(value ? 1 : 0) .invokevirtual(CD_MODULE_BUILDER, methodName, MTD_BOOLEAN) @@ -1200,9 +1200,9 @@ void setModuleBit(String methodName, boolean value) { */ void putModuleDescriptor() { cob.aload(MD_VAR) - .constantInstruction(index) + .loadConstant(index) .aload(BUILDER_VAR) - .constantInstruction(md.hashCode()) + .loadConstant(md.hashCode()) .invokevirtual(CD_MODULE_BUILDER, "build", MTD_ModuleDescriptor_int) @@ -1217,7 +1217,7 @@ void putModuleDescriptor() { */ void requires(Set requires) { cob.aload(BUILDER_VAR) - .constantInstruction(requires.size()) + .loadConstant(requires.size()) .anewarray(CD_REQUIRES); int arrayIndex = 0; for (Requires require : sorted(requires)) { @@ -1227,7 +1227,7 @@ void requires(Set requires) { } cob.dup() // arrayref - .constantInstruction(arrayIndex++); + .loadConstant(arrayIndex++); newRequires(require.modifiers(), require.name(), compiledVersion); cob.aastore(); } @@ -1246,9 +1246,9 @@ void requires(Set requires) { void newRequires(Set mods, String name, String compiledVersion) { int varIndex = dedupSetBuilder.indexOfRequiresModifiers(cob, mods); cob.aload(varIndex) - .constantInstruction(name); + .loadConstant(name); if (compiledVersion != null) { - cob.constantInstruction(compiledVersion) + cob.loadConstant(compiledVersion) .invokestatic(CD_MODULE_BUILDER, "newRequires", MTD_REQUIRES_SET_STRING_STRING); @@ -1267,12 +1267,12 @@ void newRequires(Set mods, String name, String compiledVersio */ void exports(Set exports) { cob.aload(BUILDER_VAR) - .constantInstruction(exports.size()) + .loadConstant(exports.size()) .anewarray(CD_EXPORTS); int arrayIndex = 0; for (Exports export : sorted(exports)) { cob.dup() // arrayref - .constantInstruction(arrayIndex++); + .loadConstant(arrayIndex++); newExports(export.modifiers(), export.source(), export.targets()); cob.aastore(); } @@ -1302,14 +1302,14 @@ void newExports(Set ms, String pn, Set targets) { if (!targets.isEmpty()) { int stringSetIndex = dedupSetBuilder.indexOfStringSet(cob, targets); cob.aload(modifiersSetIndex) - .constantInstruction(pn) + .loadConstant(pn) .aload(stringSetIndex) .invokestatic(CD_MODULE_BUILDER, "newExports", MTD_EXPORTS_MODIFIER_SET_STRING_SET); } else { cob.aload(modifiersSetIndex) - .constantInstruction(pn) + .loadConstant(pn) .invokestatic(CD_MODULE_BUILDER, "newExports", MTD_EXPORTS_MODIFIER_SET_STRING); @@ -1324,12 +1324,12 @@ void newExports(Set ms, String pn, Set targets) { */ void opens(Set opens) { cob.aload(BUILDER_VAR) - .constantInstruction(opens.size()) + .loadConstant(opens.size()) .anewarray(CD_OPENS); int arrayIndex = 0; for (Opens open : sorted(opens)) { cob.dup() // arrayref - .constantInstruction(arrayIndex++); + .loadConstant(arrayIndex++); newOpens(open.modifiers(), open.source(), open.targets()); cob.aastore(); } @@ -1359,14 +1359,14 @@ void newOpens(Set ms, String pn, Set targets) { if (!targets.isEmpty()) { int stringSetIndex = dedupSetBuilder.indexOfStringSet(cob, targets); cob.aload(modifiersSetIndex) - .constantInstruction(pn) + .loadConstant(pn) .aload(stringSetIndex) .invokestatic(CD_MODULE_BUILDER, "newOpens", MTD_OPENS_MODIFIER_SET_STRING_SET); } else { cob.aload(modifiersSetIndex) - .constantInstruction(pn) + .loadConstant(pn) .invokestatic(CD_MODULE_BUILDER, "newOpens", MTD_OPENS_MODIFIER_SET_STRING); @@ -1394,12 +1394,12 @@ void uses(Set uses) { */ void provides(Collection provides) { cob.aload(BUILDER_VAR) - .constantInstruction(provides.size()) + .loadConstant(provides.size()) .anewarray(CD_PROVIDES); int arrayIndex = 0; for (Provides provide : sorted(provides)) { cob.dup() // arrayref - .constantInstruction(arrayIndex++); + .loadConstant(arrayIndex++); newProvides(provide.service(), provide.providers()); cob.aastore(); } @@ -1419,14 +1419,14 @@ void provides(Collection provides) { * Builder.newProvides(service, providers); */ void newProvides(String service, List providers) { - cob.constantInstruction(service) - .constantInstruction(providers.size()) + cob.loadConstant(service) + .loadConstant(providers.size()) .anewarray(CD_String); int arrayIndex = 0; for (String provider : providers) { cob.dup() // arrayref - .constantInstruction(arrayIndex++) - .constantInstruction(provider) + .loadConstant(arrayIndex++) + .loadConstant(provider) .aastore(); } cob.invokestatic(CD_List, @@ -1456,7 +1456,7 @@ void packages(Set packages) { */ void mainClass(String cn) { cob.aload(BUILDER_VAR) - .constantInstruction(cn) + .loadConstant(cn) .invokevirtual(CD_MODULE_BUILDER, "mainClass", MTD_STRING) @@ -1468,7 +1468,7 @@ void mainClass(String cn) { */ void version(Version v) { cob.aload(BUILDER_VAR) - .constantInstruction(v.toString()) + .loadConstant(v.toString()) .invokevirtual(CD_MODULE_BUILDER, "version", MTD_STRING) @@ -1477,7 +1477,7 @@ void version(Version v) { void invokeBuilderMethod(String methodName, String value) { cob.aload(BUILDER_VAR) - .constantInstruction(value) + .loadConstant(value) .invokevirtual(CD_MODULE_BUILDER, methodName, MTD_STRING) @@ -1531,8 +1531,8 @@ void build() { void newModuleHashesBuilder() { cob.new_(MODULE_HASHES_BUILDER) .dup() - .constantInstruction(recordedHashes.algorithm()) - .constantInstruction(((4 * recordedHashes.names().size()) / 3) + 1) + .loadConstant(recordedHashes.algorithm()) + .loadConstant(((4 * recordedHashes.names().size()) / 3) + 1) .invokespecial(MODULE_HASHES_BUILDER, INIT_NAME, MTD_void_String_int) @@ -1547,7 +1547,7 @@ void newModuleHashesBuilder() { */ void pushModuleHashes() { cob.aload(MH_VAR) - .constantInstruction(index) + .loadConstant(index) .aload(BUILDER_VAR) .invokevirtual(MODULE_HASHES_BUILDER, "build", @@ -1560,13 +1560,13 @@ void pushModuleHashes() { */ void hashForModule(String name, byte[] hash) { cob.aload(BUILDER_VAR) - .constantInstruction(name) - .constantInstruction(hash.length) + .loadConstant(name) + .loadConstant(hash.length) .newarray(TypeKind.ByteType); for (int i = 0; i < hash.length; i++) { cob.dup() // arrayref - .constantInstruction(i) - .constantInstruction((int)hash[i]) + .loadConstant(i) + .loadConstant((int)hash[i]) .bastore(); } @@ -1729,7 +1729,7 @@ final void increment() { * to the element onto the stack. */ void visitElement(T element, CodeBuilder cob) { - cob.constantInstruction((ConstantDesc)element); + cob.loadConstant((ConstantDesc)element); } /* @@ -1772,12 +1772,12 @@ private void generateSetOf(CodeBuilder cob, int index) { true); } else { // call Set.of(E... elements) - cob.constantInstruction(elements.size()) + cob.loadConstant(elements.size()) .anewarray(CD_String); int arrayIndex = 0; for (T t : sorted(elements)) { cob.dup() // arrayref - .constantInstruction(arrayIndex); + .loadConstant(arrayIndex); visitElement(t, cob); // value cob.aastore(); arrayIndex++; @@ -1876,14 +1876,14 @@ private String genSystemModulesMapClass(ClassDesc allSystemModules, MTD_StringArray, ACC_STATIC, cob -> { - cob.constantInstruction(map.size()); + cob.loadConstant(map.size()); cob.anewarray(CD_String); int index = 0; for (Map.Entry entry : systemModulesMap) { cob.dup() // arrayref - .constantInstruction(index) - .constantInstruction(entry.getKey()) + .loadConstant(index) + .loadConstant(entry.getKey()) .aastore(); index++; } @@ -1897,14 +1897,14 @@ private String genSystemModulesMapClass(ClassDesc allSystemModules, MTD_StringArray, ACC_STATIC, cob -> { - cob.constantInstruction(map.size()) + cob.loadConstant(map.size()) .anewarray(CD_String); int index = 0; for (Map.Entry entry : systemModulesMap) { cob.dup() // arrayref - .constantInstruction(index) - .constantInstruction(entry.getValue().replace('/', '.')) + .loadConstant(index) + .loadConstant(entry.getValue().replace('/', '.')) .aastore(); index++; } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/VersionPropsPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/VersionPropsPlugin.java index 42b6357866f..973fa4d1268 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/VersionPropsPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/VersionPropsPlugin.java @@ -143,7 +143,7 @@ public void accept(CodeBuilder cob, CodeElement coe) { // forget about it pendingLDC = null; // and add an ldc for the new value - cob.constantInstruction(value); + cob.loadConstant(value); redefined = true; } else { flushPendingLDC(cob); diff --git a/src/jdk.jpackage/share/man/jpackage.1 b/src/jdk.jpackage/share/man/jpackage.1 index 3f5e062ee6c..f9848200059 100644 --- a/src/jdk.jpackage/share/man/jpackage.1 +++ b/src/jdk.jpackage/share/man/jpackage.1 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. +.\" Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. .\" .\" This code is free software; you can redistribute it and/or modify it @@ -189,7 +189,7 @@ All files in the input directory will be packaged into the application image. .RE .TP -\[ga]--app-content \f[I]additional-content\f[R][,\f[I]additional-content\f[R]...] +\f[V]--app-content\f[R] \f[I]additional-content\f[R] [\f[V],\f[R]\f[I]additional-content\f[R]...] A comma separated list of paths to files and/or directories to add to the application payload. .RS @@ -443,7 +443,7 @@ Group value of the RPM /.spec file or Section value of DEB control file Creates a shortcut for the application. .SS macOS platform options (available only when running on macOS): .TP -\[aq]--mac-dmg-content \f[I]additional-content\f[R][,\f[I]additional-content\f[R]...] +\f[V]--mac-dmg-content\f[R] \f[I]additional-content\f[R] [\f[V],\f[R]\f[I]additional-content\f[R]...] Include all the referenced content in the dmg. .RS .PP diff --git a/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java index 1e6cc0f4534..df21f178989 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java @@ -65,7 +65,7 @@ public abstract class DeclarationSnippet extends PersistentSnippet { this.bodyReferences = bodyReferences; } - /**** internal access ****/ + //*** internal access **** /** * @return the corralled guts diff --git a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java index 887e8dc9a34..064bcbaf556 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java @@ -65,7 +65,7 @@ public String typeName() { return key().typeName(); } - /**** internal access ****/ + //**** internal access **** @Override ExpressionKey key() { diff --git a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionToTypeInfo.java b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionToTypeInfo.java index e9eaccea321..8bc339c6dab 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionToTypeInfo.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionToTypeInfo.java @@ -71,7 +71,8 @@ */ class ExpressionToTypeInfo { - private static final String OBJECT_TYPE_NAME = "Object"; + //only used in erroneous/non-standard circumstances; OK to use a FQN: + private static final String OBJECT_TYPE_NAME = "java.lang.Object"; final AnalyzeTask at; final CompilationUnitTree cu; @@ -394,8 +395,8 @@ private ExpressionInfo treeToInfo(TreePath tp) { break; case NULL: ei.isNonVoid = true; - ei.typeName = OBJECT_TYPE_NAME; - ei.accessibleTypeName = OBJECT_TYPE_NAME; + ei.typeName = varTypeName(syms.objectType, false, AnonymousTypeKind.SUPER); + ei.accessibleTypeName = ei.typeName; break; default: { ei.isNonVoid = true; diff --git a/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java index ea30984b640..188b34ab183 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java @@ -96,7 +96,7 @@ public boolean isStatic() { return isStatic; } - /**** internal access ****/ + //**** internal access **** @Override ImportKey key() { diff --git a/src/jdk.jshell/share/classes/jdk/jshell/KeyMap.java b/src/jdk.jshell/share/classes/jdk/jshell/KeyMap.java index a2011a111bf..e350cf4a7d7 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/KeyMap.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/KeyMap.java @@ -99,4 +99,8 @@ boolean doesVariableNameExist(String name) { Stream importKeys() { return importMap.values().stream(); } + + Stream typeDeclKeys() { + return classMap.values().stream(); + } } diff --git a/src/jdk.jshell/share/classes/jdk/jshell/MaskCommentsAndModifiers.java b/src/jdk.jshell/share/classes/jdk/jshell/MaskCommentsAndModifiers.java index 8d5198758fb..5a6c1688dc0 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/MaskCommentsAndModifiers.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/MaskCommentsAndModifiers.java @@ -107,7 +107,7 @@ boolean endsWithOpenToken() { return openToken; } - /****** private implementation methods ******/ + //****** private implementation methods ****** /** * Read the next character diff --git a/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java index c231fbe672d..3642ed3fc06 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java @@ -85,7 +85,7 @@ public String toString() { return sb.toString(); } - /**** internal access ****/ + //**** internal access **** @Override MethodKey key() { diff --git a/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java b/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java index 70e556e40f2..2b4d817a588 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java @@ -593,7 +593,7 @@ public boolean isDefined() { setSequenceNumber(0); } - /**** public access ****/ + //**** public access **** /** * The unique identifier for the snippet. No two active snippets will have diff --git a/src/jdk.jshell/share/classes/jdk/jshell/SnippetMaps.java b/src/jdk.jshell/share/classes/jdk/jshell/SnippetMaps.java index c801e489e20..0bbf2a5dceb 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/SnippetMaps.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/SnippetMaps.java @@ -158,6 +158,15 @@ String fullClassNameAndPackageToClass(String full, String pkg) { if (mat.lookingAt()) { return full.substring(mat.end()); } + String simpleName = full.substring(full.lastIndexOf(".") + 1); + Stream declaredInSnippets = state.keyMap.typeDeclKeys() + .map(key -> (TypeDeclSnippet) getSnippet(key)) + .map(decl -> decl.name()); + if (declaredInSnippets.anyMatch(clazz -> simpleName.equals(clazz))) { + //simple name of full clashes with a name of a user-defined class, + //use the fully-qualified name: + return full; + } state.debug(DBG_DEP, "SM %s %s\n", full, pkg); List klasses = importSnippets() .filter(isi -> !isi.isStar) @@ -165,7 +174,7 @@ String fullClassNameAndPackageToClass(String full, String pkg) { .toList(); for (String k : klasses) { if (k.equals(full)) { - return full.substring(full.lastIndexOf(".")+1); + return simpleName; } } if (pkg.isEmpty()) { diff --git a/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java index 0e71784ec08..fb6378b24f9 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java @@ -50,7 +50,7 @@ public class TypeDeclSnippet extends DeclarationSnippet { declareReferences, bodyReferences, syntheticDiags); } - /**** internal access ****/ + //**** internal access **** @Override TypeDeclKey key() { diff --git a/src/jdk.jshell/share/classes/jdk/jshell/TypePrinter.java b/src/jdk.jshell/share/classes/jdk/jshell/TypePrinter.java index 36d3e882f38..76f2e929e34 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/TypePrinter.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/TypePrinter.java @@ -47,7 +47,8 @@ */ class TypePrinter extends Printer { - private static final String OBJECT = "Object"; + //only used in erroneous/non-standard circumstances; OK to use a FQN: + private static final String OBJECT = "java.lang.Object"; private final JavacMessages messages; private final Types types; diff --git a/src/jdk.jshell/share/classes/jdk/jshell/Wrap.java b/src/jdk.jshell/share/classes/jdk/jshell/Wrap.java index f9ae63b9cde..57ed543ce25 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/Wrap.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/Wrap.java @@ -113,9 +113,9 @@ public static Wrap varWrap(String source, Wrap wtype, String brackets, scratchName += "$"; } Wrap waux = new CompoundWrap( - " private static <" + scratchName + "> " + scratchName +" ", DOIT_METHOD_NAME + "Aux", "() throws Throwable {\n", + " private static <" + scratchName + "> " + scratchName +" ", DOIT_METHOD_NAME + "Aux", "() throws java.lang.Throwable {\n", wtype, brackets + " ", scratchName, "_ =\n ", winit, semi(winit), - " @SuppressWarnings(\"unchecked\") ", scratchName, " ", scratchName, "__ = (", scratchName, ")", scratchName, "_;\n", + " @java.lang.SuppressWarnings(\"unchecked\") ", scratchName, " ", scratchName, "__ = (", scratchName, ")", scratchName, "_;\n", " return ", scratchName, "__;\n", "}" ); @@ -550,7 +550,7 @@ private static String semi(String s) { private static class DoitMethodWrap extends CompoundWrap { DoitMethodWrap(Wrap w) { - super(" public static Object " + DOIT_METHOD_NAME + "() throws Throwable {\n" + super(" public static java.lang.Object " + DOIT_METHOD_NAME + "() throws java.lang.Throwable {\n" + " ", w, " }\n"); } diff --git a/src/jdk.jshell/share/classes/module-info.java b/src/jdk.jshell/share/classes/module-info.java index fa44d2996f1..9266fd0fed5 100644 --- a/src/jdk.jshell/share/classes/module-info.java +++ b/src/jdk.jshell/share/classes/module-info.java @@ -35,7 +35,7 @@ * and programmatically launching the existing Java shell tool. *

          * The {@link jdk.jshell} is the package for creating 'snippet' evaluating tools. - * Generally, this is only package that would be needed for creating tools. + * Generally, this is the only package that would be needed for creating tools. *

          *

          * The {@link jdk.jshell.spi} package specifies a Service Provider Interface (SPI) diff --git a/src/jdk.localedata/share/legal/cldr.md b/src/jdk.localedata/share/legal/cldr.md index e0d8102fb7f..97331fcba9f 100644 --- a/src/jdk.localedata/share/legal/cldr.md +++ b/src/jdk.localedata/share/legal/cldr.md @@ -1,14 +1,15 @@ -## Unicode Common Local Data Repository (CLDR) v44 +## Unicode Common Local Data Repository (CLDR) v45 ### CLDR License ``` + UNICODE LICENSE V3 COPYRIGHT AND PERMISSION NOTICE -Copyright © 2019-2023 Unicode, Inc. +Copyright © 1991-2024 Unicode, Inc. NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR @@ -44,4 +45,56 @@ not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. +SPDX-License-Identifier: Unicode-3.0 + +———————————— + +Unicode® Copyright and Terms of Use +For the general privacy policy governing access to this site, see the Unicode Privacy Policy. + +Unicode Copyright +Copyright © 1991-2024 Unicode, Inc. All rights reserved. +Definitions +Unicode Data Files ("DATA FILES") include all data files under the directories: +https://www.unicode.org/Public/ +https://www.unicode.org/reports/ +https://www.unicode.org/ivd/data/ + +Unicode Data Files do not include PDF online code charts under the directory: +https://www.unicode.org/Public/ + +Unicode Software ("SOFTWARE") includes any source code published in the Unicode Standard +or any source code or compiled code under the directories: +https://www.unicode.org/Public/PROGRAMS/ +https://www.unicode.org/Public/cldr/ +http://site.icu-project.org/download/ +Terms of Use +Certain documents and files on this website contain a legend indicating that "Modification is permitted." Any person is hereby authorized, without fee, to modify such documents and files to create derivative works conforming to the Unicode® Standard, subject to Terms and Conditions herein. +Any person is hereby authorized, without fee, to view, use, reproduce, and distribute all documents and files, subject to the Terms and Conditions herein. +Further specifications of rights and restrictions pertaining to the use of the Unicode DATA FILES and SOFTWARE can be found in the Unicode Data Files and Software License. +Each version of the Unicode Standard has further specifications of rights and restrictions of use. For the book editions (Unicode 5.0 and earlier), these are found on the back of the title page. +The Unicode PDF online code charts carry specific restrictions. Those restrictions are incorporated as the first page of each PDF code chart. +All other files, including online documentation of the core specification for Unicode 6.0 and later, are covered under these general Terms of Use. +No license is granted to "mirror" the Unicode website where a fee is charged for access to the "mirror" site. +Modification is not permitted with respect to this document. All copies of this document must be verbatim. +Restricted Rights Legend +Any technical data or software which is licensed to the United States of America, its agencies and/or instrumentalities under this Agreement is commercial technical data or commercial computer software developed exclusively at private expense as defined in FAR 2.101, or DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, duplication, or disclosure by the Government is subject to restrictions as set forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, as applicable, use, duplication or disclosure by the Government is subject to the restrictions set forth in this Agreement. +Warranties and Disclaimers +This publication and/or website may include technical or typographical errors or other inaccuracies. Changes are periodically added to the information herein; these changes will be incorporated in new editions of the publication and/or website. Unicode, Inc. may make improvements and/or changes in the product(s) and/or program(s) described in this publication and/or website at any time. +If this file has been purchased on magnetic or optical media from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange of the defective media within ninety (90) days of original purchase. +EXCEPT AS PROVIDED IN SECTION E.2, THIS PUBLICATION AND/OR SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE, INC. AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE. +Waiver of Damages +In no event shall Unicode, Inc. or its licensors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, whether or not Unicode, Inc. was advised of the possibility of the damage, including, without limitation, those resulting from the following: loss of use, data or profits, in connection with the use, modification or distribution of this information or its derivatives. +Trademarks & Logos +The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc. “The Unicode Consortium” and “Unicode, Inc.” are trade names of Unicode, Inc. Use of the information and materials found on this website indicates your acknowledgement of Unicode, Inc.’s exclusive worldwide rights in the Unicode Word Mark, the Unicode Logo, and the Unicode trade names. +The Unicode Consortium Name and Trademark Usage Policy (“Trademark Policy”) are incorporated herein by reference and you agree to abide by the provisions of the Trademark Policy, which may be changed from time to time in the sole discretion of Unicode, Inc. +All third party trademarks referenced herein are the property of their respective owners. +Miscellaneous +Jurisdiction and Venue. This website is operated from a location in the State of California, United States of America. Unicode, Inc. makes no representation that the materials are appropriate for use in other locations. If you access this website from other locations, you are responsible for compliance with local laws. This Agreement, all use of this website and any claims and damages resulting from use of this website are governed solely by the laws of the State of California without regard to any principles which would apply the laws of a different jurisdiction. The user agrees that any disputes regarding this website shall be resolved solely in the courts located in Santa Clara County, California. The user agrees said courts have personal jurisdiction and agree to waive any right to transfer the dispute to any other forum. +Modification by Unicode, Inc. Unicode, Inc. shall have the right to modify this Agreement at any time by posting it to this website. The user may not assign any part of this Agreement without Unicode, Inc.’s prior written consent. +Taxes. The user agrees to pay any taxes arising from access to this website or use of the information herein, except for those based on Unicode’s net income. +Severability. If any provision of this Agreement is declared invalid or unenforceable, the remaining provisions of this Agreement shall remain in effect. +Entire Agreement. This Agreement constitutes the entire agreement between the parties. + + ``` diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/pom.xml b/src/utils/IdealGraphVisualizer/ControlFlow/pom.xml deleted file mode 100644 index f44f08bec1f..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/pom.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - 4.0.0 - - IdealGraphVisualizer-parent - com.sun.hotspot.igv - 1.0-SNAPSHOT - - ControlFlow - 1.0-SNAPSHOT - nbm - ControlFlow - - 17 - UTF-8 - - - - com.sun.hotspot.igv - Data - ${project.version} - - - com.sun.hotspot.igv - Util - ${project.version} - - - com.sun.hotspot.igv - Layout - ${project.version} - - - com.sun.hotspot.igv - HierarchicalLayout - ${project.version} - - - org.netbeans.api - org-netbeans-api-visual - ${netbeans.version} - - - net.java.dev.swing-layout - swing-layout - ${swinglayouts.version} - - - org.netbeans.api - org-openide-util - ${netbeans.version} - - - org.netbeans.api - org-openide-util-lookup - ${netbeans.version} - - - org.netbeans.api - org-openide-util-ui - ${netbeans.version} - - - org.netbeans.api - org-openide-windows - ${netbeans.version} - - - - - - org.codehaus.mojo - nbm-maven-plugin - ${nbmmvnplugin.version} - true - - - org.apache.maven.plugins - maven-compiler-plugin - ${mvncompilerplugin.version} - - 17 - - - - org.apache.maven.plugins - maven-jar-plugin - ${mvnjarplugin.version} - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - - diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/BlockConnectionWidget.java b/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/BlockConnectionWidget.java deleted file mode 100644 index 4cf38780f97..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/BlockConnectionWidget.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ -package com.sun.hotspot.igv.controlflow; - -import com.sun.hotspot.igv.data.InputBlockEdge; -import com.sun.hotspot.igv.layout.Cluster; -import com.sun.hotspot.igv.layout.Link; -import com.sun.hotspot.igv.layout.Port; -import java.awt.BasicStroke; -import java.awt.Point; -import java.awt.Stroke; -import java.util.ArrayList; -import java.util.List; -import org.netbeans.api.visual.widget.ConnectionWidget; - -/** - * - * @author Thomas Wuerthinger - */ -public class BlockConnectionWidget extends ConnectionWidget implements Link { - - private static final Stroke NORMAL_STROKE = new BasicStroke(1.0f); - private static final Stroke BOLD_STROKE = new BasicStroke(2.5f); - private static final Stroke DASHED_STROKE = new BasicStroke(1.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f, new float[]{5, 5}, 0); - private static final Stroke BOLD_DASHED_STROKE = new BasicStroke(2.5f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f, new float[]{5, 5}, 0); - - private final BlockWidget from; - private final BlockWidget to; - private final Port inputSlot; - private final Port outputSlot; - private List points; - private boolean isDashed = false; - private boolean isBold = false; - - public BlockConnectionWidget(ControlFlowScene scene, InputBlockEdge edge) { - super(scene); - - this.from = (BlockWidget) scene.findWidget(edge.getFrom()); - this.to = (BlockWidget) scene.findWidget(edge.getTo()); - inputSlot = to.getInputSlot(); - outputSlot = from.getOutputSlot(); - points = new ArrayList<>(); - } - - public Port getTo() { - return inputSlot; - } - - public Port getFrom() { - return outputSlot; - } - - public Cluster getFromCluster() { - return null; - } - - public Cluster getToCluster() { - return null; - } - - public void setBold(boolean bold) { - this.isBold = bold; - updateStroke(); - } - - public void setDashed(boolean dashed) { - this.isDashed = dashed; - updateStroke(); - } - - private void updateStroke() { - Stroke stroke = NORMAL_STROKE; - if (isBold) { - if (isDashed) { - stroke = BOLD_DASHED_STROKE; - } else { - stroke = BOLD_STROKE; - } - } else if (isDashed) { - stroke = DASHED_STROKE; - } - setStroke(stroke); - } - - public void setControlPoints(List p) { - this.points = p; - } - - @Override - public List getControlPoints() { - return points; - } - - @Override - public String toString() { - return "Connection[ " + from.toString() + " - " + to.toString() + "]"; - } - - @Override - public boolean isVIP() { - return isBold; - } -} diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/BlockWidget.java b/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/BlockWidget.java deleted file mode 100644 index 5c4a51463f0..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/BlockWidget.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ -package com.sun.hotspot.igv.controlflow; - -import com.sun.hotspot.igv.data.InputBlock; -import com.sun.hotspot.igv.layout.Cluster; -import com.sun.hotspot.igv.layout.Port; -import com.sun.hotspot.igv.layout.Vertex; -import java.awt.*; -import org.netbeans.api.visual.border.BorderFactory; -import org.netbeans.api.visual.model.ObjectState; -import org.netbeans.api.visual.widget.LabelWidget; - -/** - * - * @author Thomas Wuerthinger - */ -public class BlockWidget extends LabelWidget implements Vertex { - - public static final Dimension MIN_SIZE = new Dimension(20, 20); - private final InputBlock block; - private final Port inputSlot; - private final Port outputSlot; - private Cluster cluster; - private static final Font font = new Font(Font.SANS_SERIF, Font.PLAIN, 12); - private static final Font boldFont = font.deriveFont(Font.BOLD); - public static final Color NORMAL_FOREGROUND_COLOR = Color.BLACK; - public static final Color HOVER_FOREGROUND_COLOR = Color.BLUE; - - /** Creates a new instance of BlockWidget */ - public BlockWidget(ControlFlowScene scene, InputBlock block) { - super(scene); - this.block = block; - this.setLabel(block.getName()); - this.setForeground(NORMAL_FOREGROUND_COLOR); - this.setBorder(BorderFactory.createLineBorder(1, NORMAL_FOREGROUND_COLOR)); - this.setMinimumSize(MIN_SIZE); - - this.setFont(font); - this.setAlignment(Alignment.CENTER); - - final BlockWidget widget = this; - inputSlot = new Port() { - public Point getRelativePosition() { - return new Point((int) (getSize().getWidth() / 2), (int) (getSize().getHeight() / 2)); - } - public Vertex getVertex() { - return widget; - } - }; - outputSlot = new Port() { - public Point getRelativePosition() { - return new Point((int) (getSize().getWidth() / 2), (int) (getSize().getHeight() / 2)); - } - public Vertex getVertex() { - return widget; - } - }; - } - - public Port getInputSlot() { - return inputSlot; - } - - public Port getOutputSlot() { - return outputSlot; - } - - public InputBlock getBlock() { - return block; - } - - public Dimension getSize() { - Rectangle bounds = getBounds(); - if (bounds != null) { - return bounds.getSize(); - } else { - return MIN_SIZE; - } - } - - public void setPosition(Point p) { - this.setPreferredLocation(p); - } - - @Override - public String toString() { - return block.getName(); - } - - public Point getPosition() { - return this.getPreferredLocation(); - } - - public Cluster getCluster() { - return cluster; - } - - public boolean isRoot() { - return false; - } - - public int compareTo(Vertex o) { - return toString().compareTo(o.toString()); - } - - @Override - protected void notifyStateChanged(ObjectState previousState, ObjectState state) { - super.notifyStateChanged(previousState, state); - - if (previousState.isHovered() != state.isHovered()) { - if (state.isHovered()) { - this.setBorder(BorderFactory.createLineBorder(1, HOVER_FOREGROUND_COLOR)); - } else { - this.setBorder(BorderFactory.createLineBorder(1, NORMAL_FOREGROUND_COLOR)); - } - } - - if (previousState.isSelected() != state.isSelected()) { - if (state.isSelected()) { - this.setFont(boldFont); - } else { - this.setFont(font); - } - } - } -} diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/ControlFlowScene.java b/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/ControlFlowScene.java deleted file mode 100644 index d5da6ce2d44..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/ControlFlowScene.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ -package com.sun.hotspot.igv.controlflow; - -import com.sun.hotspot.igv.data.InputBlock; -import com.sun.hotspot.igv.data.InputBlockEdge; -import com.sun.hotspot.igv.data.InputGraph; -import com.sun.hotspot.igv.data.InputNode; -import com.sun.hotspot.igv.data.services.InputGraphProvider; -import com.sun.hotspot.igv.util.LookupHistory; -import java.awt.Color; -import java.awt.Point; -import java.awt.Rectangle; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Set; -import javax.swing.BorderFactory; -import org.netbeans.api.visual.action.*; -import org.netbeans.api.visual.anchor.AnchorFactory; -import org.netbeans.api.visual.anchor.AnchorShape; -import org.netbeans.api.visual.graph.GraphScene; -import org.netbeans.api.visual.graph.layout.GraphLayout; -import org.netbeans.api.visual.layout.LayoutFactory; -import org.netbeans.api.visual.layout.SceneLayout; -import org.netbeans.api.visual.router.RouterFactory; -import org.netbeans.api.visual.widget.ConnectionWidget; -import org.netbeans.api.visual.widget.LayerWidget; -import org.netbeans.api.visual.widget.Widget; - -/** - * - * @author Thomas Wuerthinger - */ -public class ControlFlowScene extends GraphScene implements SelectProvider, MoveProvider, RectangularSelectDecorator, RectangularSelectProvider { - - private final HashSet selection; - private InputGraph oldGraph; - private final LayerWidget edgeLayer; - private final LayerWidget mainLayer; - private final WidgetAction hoverAction = createWidgetHoverAction(); - private final WidgetAction selectAction = new DoubleClickSelectAction(this); - private final WidgetAction moveAction = ActionFactory.createMoveAction(null, this); - - public ControlFlowScene() { - selection = new HashSet<>(); - - getInputBindings().setZoomActionModifiers(0); - setLayout(LayoutFactory.createAbsoluteLayout()); - - mainLayer = new LayerWidget(this); - addChild(mainLayer); - - edgeLayer = new LayerWidget(this); - addChild(edgeLayer); - - LayerWidget selectLayer = new LayerWidget(this); - addChild(selectLayer); - - getActions().addAction(hoverAction); - getActions().addAction(selectAction); - getActions().addAction(ActionFactory.createRectangularSelectAction(this, selectLayer, this)); - getActions().addAction(ActionFactory.createMouseCenteredZoomAction(1.1)); - } - - public void setGraph(InputGraph g) { - if (g == oldGraph) { - return; - } - oldGraph = g; - - ArrayList blocks = new ArrayList<>(getNodes()); - for (InputBlock b : blocks) { - removeNode(b); - } - - ArrayList edges = new ArrayList<>(getEdges()); - for (InputBlockEdge e : edges) { - removeEdge(e); - } - - edgeLayer.removeChildren(); - mainLayer.removeChildren(); - - for (InputBlock b : g.getBlocks()) { - addNode(b); - } - - for (InputBlockEdge e : g.getBlockEdges()) { - addEdge(e); - assert g.getBlocks().contains(e.getFrom()); - assert g.getBlocks().contains(e.getTo()); - setEdgeSource(e, e.getFrom()); - setEdgeTarget(e, e.getTo()); - } - - GraphLayout layout = new HierarchicalGraphLayout<>(); - SceneLayout sceneLayout = LayoutFactory.createSceneGraphLayout(this, layout); - sceneLayout.invokeLayout(); - - validate(); - } - - private void clearSelection() { - for (BlockWidget w : selection) { - w.setState(w.getState().deriveSelected(false)); - } - selection.clear(); - selectionChanged(); - } - - private void selectionChanged() { - InputGraphProvider p = LookupHistory.getLast(InputGraphProvider.class); - if (p != null) { - Set inputNodes = new HashSet<>(); - for (BlockWidget w : selection) { - inputNodes.addAll(w.getBlock().getNodes()); - } - p.clearSelectedNodes(); - p.addSelectedNodes(inputNodes, true); - p.centerSelectedNodes(); - } - } - - private void addToSelection(BlockWidget widget) { - widget.setState(widget.getState().deriveSelected(true)); - selection.add(widget); - selectionChanged(); - } - - private void removeFromSelection(BlockWidget widget) { - widget.setState(widget.getState().deriveSelected(false)); - selection.remove(widget); - selectionChanged(); - } - - @Override - public boolean isAimingAllowed(Widget widget, Point point, boolean b) { - return false; - } - - @Override - public boolean isSelectionAllowed(Widget widget, Point point, boolean b) { - return true; - } - - @Override - public void select(Widget widget, Point point, boolean change) { - if (widget == this) { - clearSelection(); - } else { - - assert widget instanceof BlockWidget; - BlockWidget bw = (BlockWidget) widget; - if (change) { - if (selection.contains(bw)) { - removeFromSelection(bw); - } else { - addToSelection(bw); - } - } else { - if (!selection.contains(bw)) { - clearSelection(); - addToSelection(bw); - } - } - } - } - - @Override - public void movementStarted(Widget widget) {} - - @Override - - public void movementFinished(Widget widget) {} - - @Override - public Point getOriginalLocation(Widget widget) { - return widget.getPreferredLocation(); - } - - @Override - public void setNewLocation(Widget widget, Point location) { - assert widget instanceof BlockWidget; - if (selection.contains((BlockWidget) widget)) { - // move entire selection - Point originalLocation = getOriginalLocation(widget); - int xOffset = location.x - originalLocation.x; - int yOffset = location.y - originalLocation.y; - for (Widget w : selection) { - Point p = new Point(w.getPreferredLocation()); - p.translate(xOffset, yOffset); - w.setPreferredLocation(p); - } - } else { - widget.setPreferredLocation(location); - } - } - - @Override - public Widget createSelectionWidget() { - Widget widget = new Widget(this); - widget.setOpaque(false); - widget.setBorder(BorderFactory.createLineBorder(Color.black, 2)); - widget.setForeground(Color.red); - return widget; - } - - @Override - public void performSelection(Rectangle rectangle) { - - if (rectangle.width < 0) { - rectangle.x += rectangle.width; - rectangle.width *= -1; - } - - if (rectangle.height < 0) { - rectangle.y += rectangle.height; - rectangle.height *= -1; - } - - boolean changed = false; - for (InputBlock b : getNodes()) { - BlockWidget w = (BlockWidget) findWidget(b); - Rectangle r = new Rectangle(w.getBounds()); - r.setLocation(w.getLocation()); - if (r.intersects(rectangle)) { - if (!selection.contains(w)) { - changed = true; - selection.add(w); - w.setState(w.getState().deriveSelected(true)); - } - } else { - if (selection.contains(w)) { - changed = true; - selection.remove(w); - w.setState(w.getState().deriveSelected(false)); - } - } - } - - if (changed) { - selectionChanged(); - } - - } - - @Override - protected Widget attachNodeWidget(InputBlock node) { - BlockWidget w = new BlockWidget(this, node); - mainLayer.addChild(w); - w.getActions().addAction(hoverAction); - w.getActions().addAction(selectAction); - w.getActions().addAction(moveAction); - return w; - } - - @Override - protected Widget attachEdgeWidget(InputBlockEdge edge) { - BlockConnectionWidget w = new BlockConnectionWidget(this, edge); - switch (edge.getState()) { - case NEW: - w.setBold(true); - break; - case DELETED: - w.setDashed(true); - break; - } - w.setRouter(RouterFactory.createDirectRouter()); - w.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED); - edgeLayer.addChild(w); - return w; - } - - @Override - protected void attachEdgeSourceAnchor(InputBlockEdge edge, InputBlock oldSourceNode, InputBlock sourceNode) { - Widget w = findWidget(edge); - assert w instanceof ConnectionWidget; - ConnectionWidget cw = (ConnectionWidget) w; - cw.setSourceAnchor(AnchorFactory.createRectangularAnchor(findWidget(sourceNode))); - - } - - @Override - protected void attachEdgeTargetAnchor(InputBlockEdge edge, InputBlock oldTargetNode, InputBlock targetNode) { - Widget w = findWidget(edge); - assert w instanceof ConnectionWidget; - ConnectionWidget cw = (ConnectionWidget) w; - cw.setTargetAnchor(AnchorFactory.createRectangularAnchor(findWidget(targetNode))); - } -} diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.form b/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.form deleted file mode 100644 index 7061b53f324..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.form +++ /dev/null @@ -1,28 +0,0 @@ - - -

          - - - - - - - - - - - - - - - - - - - - - - - - -
          diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.java b/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.java deleted file mode 100644 index f4c5b98a841..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ -package com.sun.hotspot.igv.controlflow; - -import com.sun.hotspot.igv.data.ChangedListener; -import com.sun.hotspot.igv.data.InputGraph; -import com.sun.hotspot.igv.data.services.InputGraphProvider; -import com.sun.hotspot.igv.util.LookupHistory; -import java.awt.BorderLayout; -import javax.swing.JScrollPane; -import javax.swing.SwingUtilities; -import org.openide.ErrorManager; -import org.openide.util.NbBundle; -import org.openide.windows.TopComponent; -import org.openide.windows.WindowManager; - -/** - * - * @author Thomas Wuerthinger - */ -final class ControlFlowTopComponent extends TopComponent implements ChangedListener { - - private static ControlFlowTopComponent instance; - private static final String PREFERRED_ID = "ControlFlowTopComponent"; - private final ControlFlowScene scene; - - private ControlFlowTopComponent() { - initComponents(); - setName(NbBundle.getMessage(ControlFlowTopComponent.class, "CTL_ControlFlowTopComponent")); - setToolTipText(NbBundle.getMessage(ControlFlowTopComponent.class, "HINT_ControlFlowTopComponent")); - - scene = new ControlFlowScene(); - setLayout(new BorderLayout()); - associateLookup(scene.getLookup()); - - JScrollPane panel = new JScrollPane(scene.createView()); - add(panel, BorderLayout.CENTER); - } - - /** - * Gets default instance. Do not use directly: reserved for *.settings files only, - * i.e. deserialization routines; otherwise you could get a non-deserialized instance. - * To obtain the singleton instance, use {@link #findInstance()}. - */ - public static synchronized ControlFlowTopComponent getDefault() { - if (instance == null) { - instance = new ControlFlowTopComponent(); - } - return instance; - } - - /** - * Obtain the ControlFlowTopComponent instance. Never call {@link #getDefault} directly! - */ - public static synchronized ControlFlowTopComponent findInstance() { - TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID); - if (win == null) { - ErrorManager.getDefault().log(ErrorManager.WARNING, "Cannot find ControlFlow component. It will not be located properly in the window system."); - return getDefault(); - } - if (win instanceof ControlFlowTopComponent) { - return (ControlFlowTopComponent) win; - } - ErrorManager.getDefault().log(ErrorManager.WARNING, "There seem to be multiple components with the '" + PREFERRED_ID + "' ID. That is a potential source of errors and unexpected behavior."); - return getDefault(); - } - - @Override - public int getPersistenceType() { - return TopComponent.PERSISTENCE_ALWAYS; - } - - @Override - public void componentOpened() { - LookupHistory.addListener(InputGraphProvider.class, this); - } - - @Override - public void componentClosed() { - LookupHistory.removeListener(InputGraphProvider.class, this); - } - - @Override - public void changed(InputGraphProvider lastProvider) { - SwingUtilities.invokeLater(() -> { - if (lastProvider != null) { - InputGraph graph = lastProvider.getGraph(); - if (graph != null) { - scene.setGraph(graph); - return; - } - } - scene.setGraph(new InputGraph("")); - }); - } - - @Override - protected String preferredID() { - return PREFERRED_ID; - } - - @Override - public void requestActive() { - super.requestActive(); - scene.getView().requestFocus(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - // //GEN-BEGIN:initComponents - private void initComponents() { - - org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 400, Short.MAX_VALUE) - ); - layout.setVerticalGroup( - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 300, Short.MAX_VALUE) - ); - }// //GEN-END:initComponents - // Variables declaration - do not modify//GEN-BEGIN:variables - // End of variables declaration//GEN-END:variables -} diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/DoubleClickSelectAction.java b/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/DoubleClickSelectAction.java deleted file mode 100644 index f70ba33df7d..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/DoubleClickSelectAction.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ -package com.sun.hotspot.igv.controlflow; - -import java.awt.Point; -import java.awt.event.MouseEvent; -import org.netbeans.api.visual.action.SelectProvider; -import org.netbeans.api.visual.action.WidgetAction; -import org.netbeans.api.visual.widget.Widget; -import org.openide.util.Utilities; - -/** - * Selection action that acts on double-click only. Does not support aiming. - * - * @author Peter Hofer - */ -public class DoubleClickSelectAction extends WidgetAction.LockedAdapter { - - private final SelectProvider provider; - - public DoubleClickSelectAction(SelectProvider provider) { - this.provider = provider; - } - - protected int getModifierMask () { - return Utilities.isMac() ? MouseEvent.META_DOWN_MASK : MouseEvent.CTRL_DOWN_MASK; - } - - protected boolean isLocked() { - return false; - } - - @Override - public State mousePressed(Widget widget, WidgetMouseEvent event) { - if (event.getClickCount() >= 2 && (event.getButton() == MouseEvent.BUTTON1 || event.getButton() == MouseEvent.BUTTON2)) { - boolean invert = (event.getModifiersEx() & getModifierMask()) != 0; - Point point = event.getPoint(); - if (provider.isSelectionAllowed(widget, point, invert)) { - provider.select(widget, point, invert); - return State.CHAIN_ONLY; - } - } - return State.REJECTED; - } -} diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/HierarchicalGraphLayout.java b/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/HierarchicalGraphLayout.java deleted file mode 100644 index ca83df7ae29..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/HierarchicalGraphLayout.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ -package com.sun.hotspot.igv.controlflow; - -import com.sun.hotspot.igv.hierarchicallayout.HierarchicalLayoutManager; -import com.sun.hotspot.igv.layout.*; -import java.awt.Dimension; -import java.awt.Point; -import java.util.*; -import org.netbeans.api.visual.graph.layout.GraphLayout; -import org.netbeans.api.visual.graph.layout.UniversalGraph; -import org.netbeans.api.visual.widget.Widget; - -/** - * - * @author Thomas Wuerthinger - */ -public class HierarchicalGraphLayout extends GraphLayout { - - public HierarchicalGraphLayout() {} - - private class LinkWrapper implements Link { - - private final VertexWrapper from; - private final VertexWrapper to; - - public LinkWrapper(VertexWrapper from, VertexWrapper to) { - this.from = from; - this.to = to; - } - - public Port getFrom() { - return from.getSlot(); - } - - public Port getTo() { - return to.getSlot(); - } - - public Cluster getFromCluster() { - return null; - } - - public Cluster getToCluster() { - return null; - } - - public List getControlPoints() { - return new ArrayList<>(); - } - - public void setControlPoints(List list) { - // Do nothing for now - } - - public boolean isVIP() { - return false; - } - } - - private class VertexWrapper implements Vertex { - - private final N node; - private final UniversalGraph graph; - private final Port slot; - private Point position; - - public VertexWrapper(N node, UniversalGraph graph) { - this.node = node; - this.graph = graph; - final VertexWrapper vertex = this; - this.slot = new Port() { - - public Vertex getVertex() { - return vertex; - } - - public Point getRelativePosition() { - return new Point((int) (vertex.getSize().getWidth() / 2), (int) (vertex.getSize().getHeight() / 2)); - } - }; - - Widget w = graph.getScene().findWidget(node); - this.position = w.getPreferredLocation(); - } - - public Cluster getCluster() { - return null; - } - - public Dimension getSize() { - Widget w = graph.getScene().findWidget(node); - assert w.getBounds() != null; - return w.getBounds().getSize(); - } - - public Point getPosition() { - return position; - } - - public void setPosition(Point p) { - HierarchicalGraphLayout.this.setResolvedNodeLocation(graph, node, p); - position = p; - } - - public boolean isRoot() { - return false; - } - - public int compareTo(Vertex o) { - @SuppressWarnings("unchecked") - VertexWrapper vw = (VertexWrapper) o; - return node.toString().compareTo(vw.node.toString()); - } - - public Port getSlot() { - return slot; - } - } - - protected void performGraphLayout(UniversalGraph graph) { - - Set links = new LinkedHashSet<>(); - Set vertices = new LinkedHashSet<>(); - Map vertexMap = new HashMap<>(); - - for (N node : graph.getNodes()) { - VertexWrapper v = new VertexWrapper(node, graph); - vertexMap.put(node, v); - vertices.add(v); - } - - for (E edge : graph.getEdges()) { - N source = graph.getEdgeSource(edge); - N target = graph.getEdgeTarget(edge); - LinkWrapper l = new LinkWrapper(vertexMap.get(source), vertexMap.get(target)); - links.add(l); - } - - HierarchicalLayoutManager m = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.NONE); - - LayoutGraph layoutGraph = new LayoutGraph(links, vertices); - m.doLayout(layoutGraph); - } - - protected void performNodesLayout(UniversalGraph graph, Collection nodes) { - throw new UnsupportedOperationException(); - } -} diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/nbm/manifest.mf b/src/utils/IdealGraphVisualizer/ControlFlow/src/main/nbm/manifest.mf deleted file mode 100644 index c745f8a82b4..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/nbm/manifest.mf +++ /dev/null @@ -1,6 +0,0 @@ -Manifest-Version: 1.0 -OpenIDE-Module: com.sun.hotspot.igv.controlflow -OpenIDE-Module-Layer: com/sun/hotspot/igv/controlflow/layer.xml -OpenIDE-Module-Localizing-Bundle: com/sun/hotspot/igv/controlflow/Bundle.properties -OpenIDE-Module-Specification-Version: 1.0 - diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/resources/com/sun/hotspot/igv/controlflow/Bundle.properties b/src/utils/IdealGraphVisualizer/ControlFlow/src/main/resources/com/sun/hotspot/igv/controlflow/Bundle.properties deleted file mode 100644 index 587299c05df..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/resources/com/sun/hotspot/igv/controlflow/Bundle.properties +++ /dev/null @@ -1,4 +0,0 @@ -CTL_ControlFlowAction=Control Flow -CTL_ControlFlowTopComponent=Control Flow -HINT_ControlFlowTopComponent=Shows the blocks of the current graph. -OpenIDE-Module-Name=ControlFlow diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/resources/com/sun/hotspot/igv/controlflow/ControlFlowTopComponentSettings.xml b/src/utils/IdealGraphVisualizer/ControlFlow/src/main/resources/com/sun/hotspot/igv/controlflow/ControlFlowTopComponentSettings.xml deleted file mode 100644 index 5ffb8213fbc..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/resources/com/sun/hotspot/igv/controlflow/ControlFlowTopComponentSettings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/resources/com/sun/hotspot/igv/controlflow/ControlFlowTopComponentWstcref.xml b/src/utils/IdealGraphVisualizer/ControlFlow/src/main/resources/com/sun/hotspot/igv/controlflow/ControlFlowTopComponentWstcref.xml deleted file mode 100644 index 66bc3093c7e..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/resources/com/sun/hotspot/igv/controlflow/ControlFlowTopComponentWstcref.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/resources/com/sun/hotspot/igv/controlflow/layer.xml b/src/utils/IdealGraphVisualizer/ControlFlow/src/main/resources/com/sun/hotspot/igv/controlflow/layer.xml deleted file mode 100644 index 5e79cc22ee7..00000000000 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/resources/com/sun/hotspot/igv/controlflow/layer.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/utils/IdealGraphVisualizer/application/pom.xml b/src/utils/IdealGraphVisualizer/application/pom.xml index 0fc3ae119f0..25902816808 100644 --- a/src/utils/IdealGraphVisualizer/application/pom.xml +++ b/src/utils/IdealGraphVisualizer/application/pom.xml @@ -115,11 +115,6 @@ HierarchicalLayout ${project.version} - - ${project.groupId} - ControlFlow - ${project.version} - ${project.groupId} Filter diff --git a/src/utils/IdealGraphVisualizer/pom.xml b/src/utils/IdealGraphVisualizer/pom.xml index 4e4da82e109..7f9bd67af42 100644 --- a/src/utils/IdealGraphVisualizer/pom.xml +++ b/src/utils/IdealGraphVisualizer/pom.xml @@ -102,7 +102,6 @@ SelectionCoordinator Graph HierarchicalLayout - ControlFlow Filter Bytecodes ServerCompiler diff --git a/test/hotspot/gtest/gc/g1/test_freeRegionList.cpp b/test/hotspot/gtest/gc/g1/test_freeRegionList.cpp index 4639f1c9694..6dfde68678a 100644 --- a/test/hotspot/gtest/gc/g1/test_freeRegionList.cpp +++ b/test/hotspot/gtest/gc/g1/test_freeRegionList.cpp @@ -50,7 +50,7 @@ TEST_OTHER_VM(FreeRegionList, length) { // the BOT. size_t bot_size = G1BlockOffsetTable::compute_size(heap.word_size()); HeapWord* bot_data = NEW_C_HEAP_ARRAY(HeapWord, bot_size, mtGC); - ReservedSpace bot_rs(G1BlockOffsetTable::compute_size(heap.word_size())); + ReservedSpace bot_rs(G1BlockOffsetTable::compute_size(heap.word_size()), mtTest); G1RegionToSpaceMapper* bot_storage = G1RegionToSpaceMapper::create_mapper(bot_rs, bot_rs.size(), diff --git a/test/hotspot/gtest/gc/g1/test_stressCommitUncommit.cpp b/test/hotspot/gtest/gc/g1/test_stressCommitUncommit.cpp index 8ce98827ab2..2285f58d55c 100644 --- a/test/hotspot/gtest/gc/g1/test_stressCommitUncommit.cpp +++ b/test/hotspot/gtest/gc/g1/test_stressCommitUncommit.cpp @@ -81,7 +81,7 @@ TEST_VM(G1RegionToSpaceMapper, smallStressAdjacent) { size_t size = G1BlockOffsetTable::compute_size(num_regions * region_size / HeapWordSize); size_t page_size = os::vm_page_size(); - ReservedSpace rs(size, os::vm_page_size()); + ReservedSpace rs(size, os::vm_page_size(), mtTest); G1RegionToSpaceMapper* small_mapper = G1RegionToSpaceMapper::create_mapper(rs, @@ -105,7 +105,7 @@ TEST_VM(G1RegionToSpaceMapper, largeStressAdjacent) { size_t size = G1BlockOffsetTable::compute_size(num_regions * region_size / HeapWordSize); size_t page_size = os::vm_page_size(); - ReservedSpace rs(size, page_size); + ReservedSpace rs(size, page_size, mtTest); G1RegionToSpaceMapper* large_mapper = G1RegionToSpaceMapper::create_mapper(rs, diff --git a/test/hotspot/gtest/gc/z/test_zForwarding.cpp b/test/hotspot/gtest/gc/z/test_zForwarding.cpp index 622c6d9d8f4..570e402ccd7 100644 --- a/test/hotspot/gtest/gc/z/test_zForwarding.cpp +++ b/test/hotspot/gtest/gc/z/test_zForwarding.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -56,7 +56,7 @@ class ZForwardingTest : public Test { const size_t increment = MAX2(align_up(unused / 100, ZGranuleSize), ZGranuleSize); for (uintptr_t start = 0; start + ZGranuleSize <= ZAddressOffsetMax; start += increment) { - char* const reserved = os::attempt_reserve_memory_at((char*)ZAddressHeapBase + start, ZGranuleSize, false /* executable */); + char* const reserved = os::attempt_reserve_memory_at((char*)ZAddressHeapBase + start, ZGranuleSize, !ExecMem /* executable */, mtTest); if (reserved != nullptr) { // Success return reserved; @@ -100,7 +100,7 @@ class ZForwardingTest : public Test { _reserved = reserved; - os::commit_memory((char*)_reserved, ZGranuleSize, false /* executable */); + os::commit_memory((char*)_reserved, ZGranuleSize, !ExecMem /* executable */, mtTest); _page_offset = uintptr_t(_reserved) - ZAddressHeapBase; } @@ -111,7 +111,7 @@ class ZForwardingTest : public Test { ZGeneration::_old = _old_old; ZGeneration::_young = _old_young; if (_reserved != nullptr) { - os::uncommit_memory((char*)_reserved, ZGranuleSize, false /* executable */); + os::uncommit_memory((char*)_reserved, ZGranuleSize, !ExecMem, mtTest); os::release_memory((char*)_reserved, ZGranuleSize); } } diff --git a/test/hotspot/gtest/gc/z/test_zMapper_windows.cpp b/test/hotspot/gtest/gc/z/test_zMapper_windows.cpp new file mode 100644 index 00000000000..744ea1f9c26 --- /dev/null +++ b/test/hotspot/gtest/gc/z/test_zMapper_windows.cpp @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include "precompiled.hpp" + +#ifdef _WINDOWS + +#include "gc/z/zAddress.inline.hpp" +#include "gc/z/zGlobals.hpp" +#include "gc/z/zList.inline.hpp" +#include "gc/z/zMemory.inline.hpp" +#include "gc/z/zSyscall_windows.hpp" +#include "gc/z/zVirtualMemory.hpp" +#include "runtime/os.hpp" +#include "unittest.hpp" + +using namespace testing; + +#define EXPECT_ALLOC_OK(offset) EXPECT_NE(offset, zoffset(UINTPTR_MAX)) + +class ZMapperTest : public Test { +private: + static constexpr size_t ZMapperTestReservationSize = 32 * M; + + static bool _initialized; + static ZMemoryManager* _va; + + ZVirtualMemoryManager* _vmm; + +public: + bool reserve_for_test() { + // Initialize platform specific parts before reserving address space + _vmm->pd_initialize_before_reserve(); + + // Reserve address space + if (!_vmm->pd_reserve(ZOffset::address_unsafe(zoffset(0)), ZMapperTestReservationSize)) { + return false; + } + + // Make the address range free before setting up callbacks below + _va->free(zoffset(0), ZMapperTestReservationSize); + + // Initialize platform specific parts after reserving address space + _vmm->pd_initialize_after_reserve(); + + return true; + } + + virtual void SetUp() { + // Only run test on supported Windows versions + if (!ZSyscall::is_supported()) { + GTEST_SKIP() << "Requires Windows version 1803 or later"; + return; + } + + ZSyscall::initialize(); + ZGlobalsPointers::initialize(); + + // Fake a ZVirtualMemoryManager + _vmm = (ZVirtualMemoryManager*)os::malloc(sizeof(ZVirtualMemoryManager), mtTest); + + // Construct its internal ZMemoryManager + _va = new (&_vmm->_manager) ZMemoryManager(); + + // Reserve address space for the test + if (!reserve_for_test()) { + GTEST_SKIP() << "Failed to reserve address space"; + return; + } + + _initialized = true; + } + + virtual void TearDown() { + if (!ZSyscall::is_supported()) { + // Test skipped, nothing to cleanup + return; + } + + if (_initialized) { + _vmm->pd_unreserve(ZOffset::address_unsafe(zoffset(0)), 0); + } + os::free(_vmm); + } + + static void test_alloc_low_address() { + // Verify that we get placeholder for first granule + zoffset bottom = _va->alloc_low_address(ZGranuleSize); + EXPECT_ALLOC_OK(bottom); + + _va->free(bottom, ZGranuleSize); + + // Alloc something larger than a granule and free it + bottom = _va->alloc_low_address(ZGranuleSize * 3); + EXPECT_ALLOC_OK(bottom); + + _va->free(bottom, ZGranuleSize * 3); + + // Free with more memory allocated + bottom = _va->alloc_low_address(ZGranuleSize); + EXPECT_ALLOC_OK(bottom); + + zoffset next = _va->alloc_low_address(ZGranuleSize); + EXPECT_ALLOC_OK(next); + + _va->free(bottom, ZGranuleSize); + _va->free(next, ZGranuleSize); + } + + static void test_alloc_high_address() { + // Verify that we get placeholder for last granule + zoffset high = _va->alloc_high_address(ZGranuleSize); + EXPECT_ALLOC_OK(high); + + zoffset prev = _va->alloc_high_address(ZGranuleSize); + EXPECT_ALLOC_OK(prev); + + _va->free(high, ZGranuleSize); + _va->free(prev, ZGranuleSize); + + // Alloc something larger than a granule and return it + high = _va->alloc_high_address(ZGranuleSize * 2); + EXPECT_ALLOC_OK(high); + + _va->free(high, ZGranuleSize * 2); + } + + static void test_alloc_whole_area() { + // Alloc the whole reservation + zoffset bottom = _va->alloc_low_address(ZMapperTestReservationSize); + EXPECT_ALLOC_OK(bottom); + + // Free two chunks and then allocate them again + _va->free(bottom, ZGranuleSize * 4); + _va->free(bottom + ZGranuleSize * 6, ZGranuleSize * 6); + + zoffset offset = _va->alloc_low_address(ZGranuleSize * 4); + EXPECT_ALLOC_OK(offset); + + offset = _va->alloc_low_address(ZGranuleSize * 6); + EXPECT_ALLOC_OK(offset); + + // Now free it all, and verify it can be re-allocated + _va->free(bottom, ZMapperTestReservationSize); + + bottom = _va->alloc_low_address(ZMapperTestReservationSize); + EXPECT_ALLOC_OK(bottom); + + _va->free(bottom, ZMapperTestReservationSize); + } +}; + +bool ZMapperTest::_initialized = false; +ZMemoryManager* ZMapperTest::_va = nullptr; + +TEST_VM_F(ZMapperTest, test_alloc_low_address) { + test_alloc_low_address(); +} + +TEST_VM_F(ZMapperTest, test_alloc_high_address) { + test_alloc_high_address(); +} + +TEST_VM_F(ZMapperTest, test_alloc_whole_area) { + test_alloc_whole_area(); +} + +#endif // _WINDOWS diff --git a/test/hotspot/gtest/memory/test_virtualspace.cpp b/test/hotspot/gtest/memory/test_virtualspace.cpp index 2240f0f4cb3..a20f85ba6c5 100644 --- a/test/hotspot/gtest/memory/test_virtualspace.cpp +++ b/test/hotspot/gtest/memory/test_virtualspace.cpp @@ -64,7 +64,7 @@ namespace { static void test_reserved_size(size_t size) { ASSERT_PRED2(is_size_aligned, size, os::vm_allocation_granularity()); - ReservedSpace rs(size); + ReservedSpace rs(size, mtTest); MemoryReleaser releaser(&rs); EXPECT_TRUE(rs.base() != nullptr) << "rs.special: " << rs.special(); @@ -78,7 +78,7 @@ namespace { static void test_reserved_size_alignment(size_t size, size_t alignment) { ASSERT_PRED2(is_size_aligned, size, alignment) << "Incorrect input parameters"; size_t page_size = UseLargePages ? os::large_page_size() : os::vm_page_size(); - ReservedSpace rs(size, alignment, page_size, (char *) nullptr); + ReservedSpace rs(size, alignment, page_size, mtTest, (char *) nullptr); ASSERT_TRUE(rs.base() != nullptr) << "rs.special = " << rs.special(); ASSERT_EQ(size, rs.size()) << "rs.special = " << rs.special(); @@ -106,7 +106,7 @@ namespace { bool large = maybe_large && UseLargePages && size >= os::large_page_size(); size_t page_size = large ? os::large_page_size() : os::vm_page_size(); - ReservedSpace rs(size, alignment, page_size); + ReservedSpace rs(size, alignment, page_size, mtTest); MemoryReleaser releaser(&rs); EXPECT_TRUE(rs.base() != nullptr) << "rs.special: " << rs.special(); @@ -215,12 +215,13 @@ namespace { default: case Default: case Reserve: - return ReservedSpace(reserve_size_aligned); + return ReservedSpace(reserve_size_aligned, mtTest); case Disable: case Commit: return ReservedSpace(reserve_size_aligned, os::vm_allocation_granularity(), - os::vm_page_size()); + os::vm_page_size(), + mtTest); } } @@ -299,7 +300,7 @@ TEST_VM(VirtualSpace, actual_committed_space_one_large_page) { size_t large_page_size = os::large_page_size(); - ReservedSpace reserved(large_page_size, large_page_size, large_page_size); + ReservedSpace reserved(large_page_size, large_page_size, large_page_size, mtTest); ReservedSpaceReleaser releaser(&reserved); ASSERT_TRUE(reserved.is_reserved()); @@ -369,6 +370,7 @@ class TestReservedSpace : AllStatic { ReservedSpace rs(size, // size alignment, // alignment page_size, // page size + mtTest, // NMT MEM Flag (char *)nullptr); // requested_address EXPECT_TRUE(rs.base() != nullptr); @@ -387,7 +389,7 @@ class TestReservedSpace : AllStatic { static void test_reserved_space2(size_t size) { ASSERT_TRUE(is_aligned(size, os::vm_allocation_granularity())) << "Must be at least AG aligned"; - ReservedSpace rs(size); + ReservedSpace rs(size, mtTest); EXPECT_TRUE(rs.base() != nullptr); EXPECT_EQ(rs.size(), size) << "rs.size: " << rs.size(); @@ -412,7 +414,7 @@ class TestReservedSpace : AllStatic { bool large = maybe_large && UseLargePages && size >= os::large_page_size(); size_t page_size = large ? os::large_page_size() : os::vm_page_size(); - ReservedSpace rs(size, alignment, page_size); + ReservedSpace rs(size, alignment, page_size, mtTest); EXPECT_TRUE(rs.base() != nullptr); EXPECT_EQ(rs.size(), size) << "rs.size: " << rs.size(); @@ -516,12 +518,12 @@ class TestVirtualSpace : AllStatic { default: case Default: case Reserve: - return ReservedSpace(reserve_size_aligned); + return ReservedSpace(reserve_size_aligned, mtTest); case Disable: case Commit: return ReservedSpace(reserve_size_aligned, os::vm_allocation_granularity(), - os::vm_page_size()); + os::vm_page_size(), mtTest); } } @@ -576,7 +578,7 @@ class TestVirtualSpace : AllStatic { size_t large_page_size = os::large_page_size(); - ReservedSpace reserved(large_page_size, large_page_size, large_page_size); + ReservedSpace reserved(large_page_size, large_page_size, large_page_size, mtTest); EXPECT_TRUE(reserved.is_reserved()); diff --git a/test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp b/test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp index 87ad2a798e0..359c492bb6a 100644 --- a/test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp +++ b/test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp @@ -114,7 +114,7 @@ TEST_VM(NMT, DISABLED_location_printing_cheap_dead_7) { test_for_dead_c_heap_blo #endif static void test_for_mmap(size_t sz, ssize_t offset) { - char* addr = os::reserve_memory(sz, false, mtTest); + char* addr = os::reserve_memory(sz, !ExecMem, mtTest); if (MemTracker::enabled()) { test_pointer(addr + offset, true, "in mmap'd memory region"); } else { diff --git a/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp b/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp index d4959cfa008..4036c798079 100644 --- a/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp +++ b/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp @@ -93,7 +93,7 @@ class CommittedVirtualMemoryTest { const size_t page_sz = os::vm_page_size(); const size_t size = num_pages * page_sz; char* base = os::reserve_memory(size, !ExecMem, mtThreadStack); - bool result = os::commit_memory(base, size, !ExecMem); + bool result = os::commit_memory(base, size, !ExecMem, mtThreadStack); size_t index; ASSERT_NE(base, (char*)nullptr); for (index = 0; index < touch_pages; index ++) { @@ -132,7 +132,7 @@ class CommittedVirtualMemoryTest { } // Cleanup - os::free_memory(base, size, page_sz); + os::free_memory(base, size, page_sz, mtThreadStack); VirtualMemoryTracker::remove_released_region((address)base, size); rmr = VirtualMemoryTracker::_reserved_regions->find(ReservedMemoryRegion((address)base, size)); @@ -162,7 +162,7 @@ class CommittedVirtualMemoryTest { const size_t size = num_pages * page_sz; char* base = os::reserve_memory(size, !ExecMem, mtTest); ASSERT_NE(base, (char*)nullptr); - result = os::commit_memory(base, size, !ExecMem); + result = os::commit_memory(base, size, !ExecMem, mtTest); ASSERT_TRUE(result); // touch all pages diff --git a/test/hotspot/gtest/runtime/test_os.cpp b/test/hotspot/gtest/runtime/test_os.cpp index 55d30349ee5..3b7267b5790 100644 --- a/test/hotspot/gtest/runtime/test_os.cpp +++ b/test/hotspot/gtest/runtime/test_os.cpp @@ -367,7 +367,7 @@ TEST_VM(os, jio_snprintf) { static inline bool can_reserve_executable_memory(void) { bool executable = true; size_t len = 128; - char* p = os::reserve_memory(len, executable); + char* p = os::reserve_memory(len, executable, mtTest); bool exec_supported = (p != nullptr); if (exec_supported) { os::release_memory(p, len); @@ -405,7 +405,7 @@ static address reserve_multiple(int num_stripes, size_t stripe_len) { for (int tries = 0; tries < 256 && p == nullptr; tries ++) { size_t total_range_len = num_stripes * stripe_len; // Reserve a large contiguous area to get the address space... - p = (address)os::reserve_memory(total_range_len); + p = (address)os::reserve_memory(total_range_len, !ExecMem, mtTest); EXPECT_NE(p, (address)nullptr); // .. release it... EXPECT_TRUE(os::release_memory((char*)p, total_range_len)); @@ -419,14 +419,14 @@ static address reserve_multiple(int num_stripes, size_t stripe_len) { #else const bool executable = stripe % 2 == 0; #endif - q = (address)os::attempt_reserve_memory_at((char*)q, stripe_len, executable); + q = (address)os::attempt_reserve_memory_at((char*)q, stripe_len, executable, mtTest); if (q == nullptr) { // Someone grabbed that area concurrently. Cleanup, then retry. tty->print_cr("reserve_multiple: retry (%d)...", stripe); carefully_release_multiple(p, stripe, stripe_len); p = nullptr; } else { - EXPECT_TRUE(os::commit_memory((char*)q, stripe_len, executable)); + EXPECT_TRUE(os::commit_memory((char*)q, stripe_len, executable, mtTest)); } } } @@ -439,12 +439,12 @@ static address reserve_multiple(int num_stripes, size_t stripe_len) { static address reserve_one_commit_multiple(int num_stripes, size_t stripe_len) { assert(is_aligned(stripe_len, os::vm_allocation_granularity()), "Sanity"); size_t total_range_len = num_stripes * stripe_len; - address p = (address)os::reserve_memory(total_range_len); + address p = (address)os::reserve_memory(total_range_len, !ExecMem, mtTest); EXPECT_NE(p, (address)nullptr); for (int stripe = 0; stripe < num_stripes; stripe++) { address q = p + (stripe * stripe_len); if (stripe % 2 == 0) { - EXPECT_TRUE(os::commit_memory((char*)q, stripe_len, false)); + EXPECT_TRUE(os::commit_memory((char*)q, stripe_len, !ExecMem, mtTest)); } } return p; @@ -506,7 +506,7 @@ TEST_VM(os, release_multi_mappings) { PRINT_MAPPINGS("B"); // ...re-reserve the middle stripes. This should work unless release silently failed. - address p2 = (address)os::attempt_reserve_memory_at((char*)p_middle_stripes, middle_stripe_len); + address p2 = (address)os::attempt_reserve_memory_at((char*)p_middle_stripes, middle_stripe_len, !ExecMem, mtTest); ASSERT_EQ(p2, p_middle_stripes); @@ -529,7 +529,7 @@ TEST_VM_ASSERT_MSG(os, release_bad_ranges, ".*bad release") { #else TEST_VM(os, release_bad_ranges) { #endif - char* p = os::reserve_memory(4 * M); + char* p = os::reserve_memory(4 * M, !ExecMem, mtTest); ASSERT_NE(p, (char*)nullptr); // Release part of range ASSERT_FALSE(os::release_memory(p, M)); @@ -564,7 +564,7 @@ TEST_VM(os, release_one_mapping_multi_commits) { // // make things even more difficult by trying to reserve at the border of the region address border = p + num_stripes * stripe_len; - address p2 = (address)os::attempt_reserve_memory_at((char*)border, stripe_len); + address p2 = (address)os::attempt_reserve_memory_at((char*)border, stripe_len, !ExecMem, mtTest); PRINT_MAPPINGS("B"); ASSERT_TRUE(p2 == nullptr || p2 == border); @@ -605,9 +605,9 @@ TEST_VM(os, show_mappings_small_range) { TEST_VM(os, show_mappings_full_range) { // Reserve a small range and fill it with a marker string, should show up // on implementations displaying range snippets - char* p = os::reserve_memory(1 * M, false, mtInternal); + char* p = os::reserve_memory(1 * M, !ExecMem, mtInternal); if (p != nullptr) { - if (os::commit_memory(p, 1 * M, false)) { + if (os::commit_memory(p, 1 * M, !ExecMem, mtTest)) { strcpy(p, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); } } @@ -629,7 +629,7 @@ TEST_VM(os, find_mapping_simple) { // A simple allocation { - address p = (address)os::reserve_memory(total_range_len); + address p = (address)os::reserve_memory(total_range_len, !ExecMem, mtTest); ASSERT_NE(p, (address)nullptr); PRINT_MAPPINGS("A"); for (size_t offset = 0; offset < total_range_len; offset += 4711) { @@ -934,9 +934,9 @@ TEST_VM(os, open_O_CLOEXEC) { } TEST_VM(os, reserve_at_wish_address_shall_not_replace_mappings_smallpages) { - char* p1 = os::reserve_memory(M, false, mtTest); + char* p1 = os::reserve_memory(M, !ExecMem, mtTest); ASSERT_NE(p1, nullptr); - char* p2 = os::attempt_reserve_memory_at(p1, M); + char* p2 = os::attempt_reserve_memory_at(p1, M, !ExecMem, mtTest); ASSERT_EQ(p2, nullptr); // should have failed os::release_memory(p1, M); } @@ -944,9 +944,9 @@ TEST_VM(os, reserve_at_wish_address_shall_not_replace_mappings_smallpages) { TEST_VM(os, reserve_at_wish_address_shall_not_replace_mappings_largepages) { if (UseLargePages && !os::can_commit_large_page_memory()) { // aka special const size_t lpsz = os::large_page_size(); - char* p1 = os::reserve_memory_aligned(lpsz, lpsz, false); + char* p1 = os::reserve_memory_aligned(lpsz, lpsz, !ExecMem, mtTest); ASSERT_NE(p1, nullptr); - char* p2 = os::reserve_memory_special(lpsz, lpsz, lpsz, p1, false); + char* p2 = os::reserve_memory_special(lpsz, lpsz, lpsz, p1, !ExecMem, mtTest); ASSERT_EQ(p2, nullptr); // should have failed os::release_memory(p1, M); } else { @@ -958,9 +958,9 @@ TEST_VM(os, reserve_at_wish_address_shall_not_replace_mappings_largepages) { // On Aix, we should fail attach attempts not aligned to segment boundaries (256m) TEST_VM(os, aix_reserve_at_non_shmlba_aligned_address) { if (Use64KPages) { - char* p = os::attempt_reserve_memory_at((char*)0x1f00000, M); + char* p = os::attempt_reserve_memory_at((char*)0x1f00000, M, !ExecMem, mtTest); ASSERT_EQ(p, nullptr); // should have failed - p = os::attempt_reserve_memory_at((char*)((64 * G) + M), M); + p = os::attempt_reserve_memory_at((char*)((64 * G) + M), M, !ExecMem, mtTest); ASSERT_EQ(p, nullptr); // should have failed } } diff --git a/test/hotspot/gtest/runtime/test_os_linux.cpp b/test/hotspot/gtest/runtime/test_os_linux.cpp index 69c3d991b2a..582a516465c 100644 --- a/test/hotspot/gtest/runtime/test_os_linux.cpp +++ b/test/hotspot/gtest/runtime/test_os_linux.cpp @@ -54,7 +54,7 @@ namespace { const size_t _size; public: static char* reserve_memory_special_huge_tlbfs(size_t bytes, size_t alignment, size_t page_size, char* req_addr, bool exec) { - return os::reserve_memory_special(bytes, alignment, page_size, req_addr, exec); + return os::reserve_memory_special(bytes, alignment, page_size, req_addr, exec, mtTest); } HugeTlbfsMemory(char* const ptr, size_t size) : _ptr(ptr), _size(size) { } ~HugeTlbfsMemory() { @@ -224,7 +224,7 @@ class TestReserveMemorySpecial : AllStatic { if (!using_explicit_hugepages()) { return; } - char* addr = os::reserve_memory_special(size, alignment, page_size, nullptr, false); + char* addr = os::reserve_memory_special(size, alignment, page_size, nullptr, !ExecMem, mtTest); if (addr != nullptr) { small_page_write(addr, size); os::release_memory_special(addr, size); @@ -281,7 +281,7 @@ class TestReserveMemorySpecial : AllStatic { for (int i = 0; i < num_sizes; i++) { const size_t size = sizes[i]; for (size_t alignment = ag; is_aligned(size, alignment); alignment *= 2) { - char* p = os::reserve_memory_special(size, alignment, lp, nullptr, false); + char* p = os::reserve_memory_special(size, alignment, lp, nullptr, !ExecMem, mtTest); if (p != nullptr) { EXPECT_TRUE(is_aligned(p, alignment)); small_page_write(p, size); @@ -296,7 +296,7 @@ class TestReserveMemorySpecial : AllStatic { for (size_t alignment = ag; is_aligned(size, alignment); alignment *= 2) { // req_addr must be at least large page aligned. char* const req_addr = align_up(mapping1, MAX2(alignment, lp)); - char* p = os::reserve_memory_special(size, alignment, lp, req_addr, false); + char* p = os::reserve_memory_special(size, alignment, lp, req_addr, !ExecMem, mtTest); if (p != nullptr) { EXPECT_EQ(p, req_addr); small_page_write(p, size); @@ -311,7 +311,7 @@ class TestReserveMemorySpecial : AllStatic { for (size_t alignment = ag; is_aligned(size, alignment); alignment *= 2) { // req_addr must be at least large page aligned. char* const req_addr = align_up(mapping2, MAX2(alignment, lp)); - char* p = os::reserve_memory_special(size, alignment, lp, req_addr, false); + char* p = os::reserve_memory_special(size, alignment, lp, req_addr, !ExecMem, mtTest); // as the area around req_addr contains already existing mappings, the API should always // return nullptr (as per contract, it cannot return another address) EXPECT_TRUE(p == nullptr); @@ -355,9 +355,9 @@ TEST_VM(os_linux, pretouch_thp_and_use_concurrent) { const size_t size = 1 * G; const bool useThp = UseTransparentHugePages; UseTransparentHugePages = true; - char* const heap = os::reserve_memory(size, false, mtInternal); + char* const heap = os::reserve_memory(size, !ExecMem, mtInternal); EXPECT_NE(heap, nullptr); - EXPECT_TRUE(os::commit_memory(heap, size, false)); + EXPECT_TRUE(os::commit_memory(heap, size, !ExecMem, mtInternal)); { auto pretouch = [heap, size](Thread*, int) { @@ -379,7 +379,7 @@ TEST_VM(os_linux, pretouch_thp_and_use_concurrent) { for (int i = 0; i < 1000; i++) EXPECT_EQ(*iptr++, i); - EXPECT_TRUE(os::uncommit_memory(heap, size, false)); + EXPECT_TRUE(os::uncommit_memory(heap, size, !ExecMem, mtInternal)); EXPECT_TRUE(os::release_memory(heap, size)); UseTransparentHugePages = useThp; } diff --git a/test/hotspot/gtest/runtime/test_os_reserve_between.cpp b/test/hotspot/gtest/runtime/test_os_reserve_between.cpp index aad6acc095a..1e052ddf65e 100644 --- a/test/hotspot/gtest/runtime/test_os_reserve_between.cpp +++ b/test/hotspot/gtest/runtime/test_os_reserve_between.cpp @@ -66,7 +66,7 @@ static size_t allocation_granularity() { << " bytes: " << bytes << " alignment: " << alignment << " randomized: " << randomized static char* call_attempt_reserve_memory_between(char* min, char* max, size_t bytes, size_t alignment, bool randomized) { - char* const addr = os::attempt_reserve_memory_between(min, max, bytes, alignment, randomized); + char* const addr = os::attempt_reserve_memory_between(min, max, bytes, alignment, randomized, mtTest); if (addr != nullptr) { EXPECT_TRUE(is_aligned(addr, alignment)) << ERRINFO; EXPECT_TRUE(is_aligned(addr, allocation_granularity())) << ERRINFO; @@ -158,7 +158,7 @@ struct SpaceWithHole { // the hole. const uintptr_t candidate = nth_bit(i); if ((candidate + _len) <= ARMB_constants::absolute_max) { - _base = os::attempt_reserve_memory_at((char*)candidate, _len); + _base = os::attempt_reserve_memory_at((char*)candidate, _len, !ExecMem, mtTest); } } if (_base == nullptr) { @@ -166,8 +166,8 @@ struct SpaceWithHole { } // Release total mapping, remap the individual non-holy parts os::release_memory(_base, _len); - _p1 = os::attempt_reserve_memory_at(_base + _p1_offset, _p1_size); - _p2 = os::attempt_reserve_memory_at(_base + _p2_offset, _p2_size); + _p1 = os::attempt_reserve_memory_at(_base + _p1_offset, _p1_size, !ExecMem, mtTest); + _p2 = os::attempt_reserve_memory_at(_base + _p2_offset, _p2_size, !ExecMem, mtTest); if (_p1 == nullptr || _p2 == nullptr) { return false; } diff --git a/test/hotspot/gtest/runtime/test_os_windows.cpp b/test/hotspot/gtest/runtime/test_os_windows.cpp index 8c6f003de6f..87ae501a08b 100644 --- a/test/hotspot/gtest/runtime/test_os_windows.cpp +++ b/test/hotspot/gtest/runtime/test_os_windows.cpp @@ -67,7 +67,7 @@ void TestReserveMemorySpecial_test() { FLAG_SET_CMDLINE(UseNUMAInterleaving, false); const size_t large_allocation_size = os::large_page_size() * 4; - char* result = os::reserve_memory_special(large_allocation_size, os::large_page_size(), os::large_page_size(), nullptr, false); + char* result = os::reserve_memory_special(large_allocation_size, os::large_page_size(), os::large_page_size(), nullptr, !ExecMem, mtTest); if (result == nullptr) { // failed to allocate memory, skipping the test return; @@ -77,12 +77,12 @@ void TestReserveMemorySpecial_test() { // Reserve another page within the recently allocated memory area. This should fail const size_t expected_allocation_size = os::large_page_size(); char* expected_location = result + os::large_page_size(); - char* actual_location = os::reserve_memory_special(expected_allocation_size, os::large_page_size(), os::large_page_size(), expected_location, false); + char* actual_location = os::reserve_memory_special(expected_allocation_size, os::large_page_size(), os::large_page_size(), expected_location, !ExecMem, mtTest); EXPECT_TRUE(actual_location == nullptr) << "Should not be allowed to reserve within present reservation"; // Instead try reserving after the first reservation. expected_location = result + large_allocation_size; - actual_location = os::reserve_memory_special(expected_allocation_size, os::large_page_size(), os::large_page_size(), expected_location, false); + actual_location = os::reserve_memory_special(expected_allocation_size, os::large_page_size(), os::large_page_size(), expected_location, !ExecMem, mtTest); EXPECT_TRUE(actual_location != nullptr) << "Unexpected reservation failure, can’t verify correct location"; EXPECT_TRUE(actual_location == expected_location) << "Reservation must be at requested location"; MemoryReleaser m2(actual_location, os::large_page_size()); @@ -90,7 +90,7 @@ void TestReserveMemorySpecial_test() { // Now try to do a reservation with a larger alignment. const size_t alignment = os::large_page_size() * 2; const size_t new_large_size = alignment * 4; - char* aligned_request = os::reserve_memory_special(new_large_size, alignment, os::large_page_size(), nullptr, false); + char* aligned_request = os::reserve_memory_special(new_large_size, alignment, os::large_page_size(), nullptr, !ExecMem, mtTest); EXPECT_TRUE(aligned_request != nullptr) << "Unexpected reservation failure, can’t verify correct alignment"; EXPECT_TRUE(is_aligned(aligned_request, alignment)) << "Returned address must be aligned"; MemoryReleaser m3(aligned_request, new_large_size); diff --git a/test/hotspot/gtest/runtime/test_virtualMemoryTracker.cpp b/test/hotspot/gtest/runtime/test_virtualMemoryTracker.cpp index b098416456d..f2b3b843c23 100644 --- a/test/hotspot/gtest/runtime/test_virtualMemoryTracker.cpp +++ b/test/hotspot/gtest/runtime/test_virtualMemoryTracker.cpp @@ -93,7 +93,7 @@ class VirtualMemoryTrackerTest { static void test_add_committed_region_adjacent() { size_t size = 0x01000000; - ReservedSpace rs(size); + ReservedSpace rs(size, mtTest); address addr = (address)rs.base(); address frame1 = (address)0x1234; @@ -167,7 +167,7 @@ class VirtualMemoryTrackerTest { static void test_add_committed_region_adjacent_overlapping() { size_t size = 0x01000000; - ReservedSpace rs(size); + ReservedSpace rs(size, mtTest); address addr = (address)rs.base(); address frame1 = (address)0x1234; @@ -254,7 +254,7 @@ class VirtualMemoryTrackerTest { static void test_add_committed_region_overlapping() { size_t size = 0x01000000; - ReservedSpace rs(size); + ReservedSpace rs(size, mtTest); address addr = (address)rs.base(); address frame1 = (address)0x1234; @@ -425,7 +425,7 @@ class VirtualMemoryTrackerTest { static void test_remove_uncommitted_region() { size_t size = 0x01000000; - ReservedSpace rs(size); + ReservedSpace rs(size, mtTest); address addr = (address)rs.base(); address frame1 = (address)0x1234; diff --git a/test/hotspot/gtest/utilities/test_abs.cpp b/test/hotspot/gtest/utilities/test_abs.cpp new file mode 100644 index 00000000000..74e4fdb02e9 --- /dev/null +++ b/test/hotspot/gtest/utilities/test_abs.cpp @@ -0,0 +1,115 @@ +/* + * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include "precompiled.hpp" +#include "unittest.hpp" +#include "memory/allocation.hpp" +#include "memory/resourceArea.inline.hpp" +#include "runtime/thread.hpp" + +TEST(absTest, sanity) { + // Simple integer cases + EXPECT_EQ(0, ABS(0)); + EXPECT_EQ(1, ABS(1)); + EXPECT_EQ(1, ABS(-1)); + + // Simple floating point cases, should be exactly representable + EXPECT_EQ(0.0f, ABS(0.0f)); + EXPECT_EQ(1.0f, ABS(1.0f)); + EXPECT_EQ(1.0f, ABS(-1.0f)); + + EXPECT_EQ(0.0, ABS(0.0)); + EXPECT_EQ(1.0, ABS(1.0)); + EXPECT_EQ(1.0, ABS(-1.0)); + + // Upper bounds for unsigned integers + EXPECT_EQ(max_jubyte, ABS(max_jubyte)); + EXPECT_EQ(max_jushort, ABS(max_jushort)); + EXPECT_EQ(max_juint, ABS(max_juint)); + EXPECT_EQ(max_julong, ABS(max_julong)); + + // Upper bounds for signed integers + EXPECT_EQ(max_jbyte, ABS(max_jbyte)); + EXPECT_EQ(max_jshort, ABS(max_jshort)); + EXPECT_EQ(max_jint, ABS(max_jint)); + EXPECT_EQ(max_jlong, ABS(max_jlong)); + + // Lower valid bounds for signed integers + EXPECT_EQ(max_jbyte, ABS(min_jbyte + 1)); + EXPECT_EQ(max_jshort, ABS(min_jshort + 1)); + EXPECT_EQ(max_jint, ABS(min_jint + 1)); + EXPECT_EQ(max_jlong, ABS(min_jlong + 1)); + + // Lower bounds for signed integers after explicit FP cast + EXPECT_TRUE(ABS((float)min_jbyte) > 0); + EXPECT_TRUE(ABS((float)min_jshort) > 0); + EXPECT_TRUE(ABS((float)min_jint) > 0); + EXPECT_TRUE(ABS((float)min_jlong) > 0); +} + +// Now check what happens when we feed invalid arguments. + +#ifndef ASSERT + +// In release builds, ABS would return incorrect values. + +TEST(absTest, release_sanity) { + EXPECT_EQ(min_jbyte, ABS(min_jbyte)); + EXPECT_EQ(min_jshort, ABS(min_jshort)); + EXPECT_EQ(min_jint, ABS(min_jint)); + EXPECT_EQ(min_jlong, ABS(min_jlong)); +} + +#else + +// In debug builds, ABS would assert. + +TEST_VM_ASSERT_MSG(absTest, debug_sanity_min_jbyte, + "Error: ABS: argument should not allow overflow") { + + jbyte r = ABS(min_jbyte); // should fail + EXPECT_TRUE(r > 0); // should not be normally reachable +} + +TEST_VM_ASSERT_MSG(absTest, debug_sanity_min_jshort, + "Error: ABS: argument should not allow overflow") { + + jshort r = ABS(min_jshort); // should fail + EXPECT_TRUE(r > 0); // should not be normally reachable +} + +TEST_VM_ASSERT_MSG(absTest, debug_sanity_min_jint, + "Error: ABS: argument should not allow overflow") { + + jint r = ABS(min_jint); // should fail + EXPECT_TRUE(r > 0); // should not be normally reachable +} + +TEST_VM_ASSERT_MSG(absTest, debug_sanity_min_jlong, + "Error: ABS: argument should not allow overflow") { + + jlong r = ABS(min_jlong); // should fail + EXPECT_TRUE(r > 0); // should not be normally reachable +} + +#endif diff --git a/test/hotspot/jtreg/ProblemList-generational-zgc.txt b/test/hotspot/jtreg/ProblemList-generational-zgc.txt index cbe76d68dff..a92751cc621 100644 --- a/test/hotspot/jtreg/ProblemList-generational-zgc.txt +++ b/test/hotspot/jtreg/ProblemList-generational-zgc.txt @@ -106,6 +106,7 @@ serviceability/sa/jmap-hprof/JMapHProfLargeHeapProc.java 8307393 generic- serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java 8307393 generic-all serviceability/sa/sadebugd/ClhsdbAttachToDebugServer.java 8307393 generic-all serviceability/sa/sadebugd/ClhsdbTestConnectArgument.java 8307393 generic-all +serviceability/sa/ClhsdbTestAllocationMerge.java 8307393 generic-all serviceability/sa/sadebugd/DebugdConnectTest.java 8307393 generic-all serviceability/sa/sadebugd/DebugdUtils.java 8307393 generic-all serviceability/sa/sadebugd/DisableRegistryTest.java 8307393 generic-all diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt index 2c94c777598..f9e31e7a7f6 100644 --- a/test/hotspot/jtreg/ProblemList.txt +++ b/test/hotspot/jtreg/ProblemList.txt @@ -113,7 +113,6 @@ runtime/StackGuardPages/TestStackGuardPagesNative.java 8303612 linux-all runtime/ErrorHandling/TestDwarf.java#checkDecoder 8305489 linux-all runtime/ErrorHandling/MachCodeFramesInErrorFile.java 8313315 linux-ppc64le runtime/cds/appcds/customLoader/HelloCustom_JFR.java 8241075 linux-all,windows-x64 -runtime/os/TestTransparentHugePageUsage.java 8324776 linux-all runtime/Thread/TestAlwaysPreTouchStacks.java 8324781 linux-all applications/jcstress/accessAtomic.java 8325984 generic-all diff --git a/test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyDisjointLarge.java b/test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyDisjointLarge.java new file mode 100644 index 00000000000..70d983e6ccd --- /dev/null +++ b/test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyDisjointLarge.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package compiler.arraycopy; +import java.util.Random; + +/** + * @test + * @bug 8310159 + * @summary Test large arrayCopy. + * + * @run main/timeout=600 compiler.arraycopy.TestArrayCopyDisjointLarge + * + */ + +public class TestArrayCopyDisjointLarge { + + public static final int ARRLEN = 4194304; + public static int fromPos, toPos; + public static byte[] fromByteArr, toByteArr; + + public static void setup() { + fromPos = 0; + toPos = 0; + + fromByteArr = new byte[ARRLEN]; + toByteArr = new byte[ARRLEN]; + for (int i = 0 ; i < ARRLEN ; i++) { + fromByteArr[i] = (byte)i; + } + } + + public static void validate(String msg, byte[] toByteArr, int length, int fromPos, int toPos) { + for(int i = 0 ; i < length; i++) { + if (fromByteArr[i + fromPos] != toByteArr[i + toPos]) { + System.out.println(msg + "[" + toByteArr.getClass() + "] Result mismtach at i = " + i + + " expected = " + fromByteArr[i + fromPos] + + " actual = " + toByteArr[i + toPos] + + " fromPos = " + fromPos + + " toPos = " + toPos); + throw new Error("Fail"); + } + } + } + + public static void testByte(int length, int fromPos, int toPos) { + System.arraycopy(fromByteArr, fromPos, toByteArr, toPos, length); + validate(" Test ByteArr ", toByteArr, length, fromPos, toPos); + } + + public static void main(String [] args) { + int base_size = 2621440; + Random r = new Random(1024); + int [] lengths = {base_size - 1, base_size, base_size + 1, base_size + 63, base_size + 64, + base_size + 65, base_size + 255, base_size + 256, base_size + 257, + base_size + r.nextInt(2048)}; + setup(); + + for (int i = 0 ; i < 20 ; i++ ) { + testByte(lengths[i % lengths.length], 0, 0); + testByte(lengths[i % lengths.length], 0, 9); + testByte(lengths[i % lengths.length], 9, 0); + testByte(lengths[i % lengths.length], 9, 9); + testByte(lengths[i % lengths.length], r.nextInt(2048) , r.nextInt(2048)); + } + } +} diff --git a/test/hotspot/jtreg/compiler/arraycopy/TestTailCallInArrayCopyStub.java b/test/hotspot/jtreg/compiler/arraycopy/TestTailCallInArrayCopyStub.java new file mode 100644 index 00000000000..19ea82509bc --- /dev/null +++ b/test/hotspot/jtreg/compiler/arraycopy/TestTailCallInArrayCopyStub.java @@ -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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @key stress randomness + * @bug 8329258 + * @summary Test correct execution of the tail call at the end of the arraycopy stub. + * @requires vm.compiler2.enabled + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -Xbatch -XX:-TieredCompilation + * -XX:+StressGCM -XX:+StressLCM + * -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*::test + * compiler.arraycopy.TestTailCallInArrayCopyStub + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -Xbatch -XX:-TieredCompilation + * -XX:+StressGCM -XX:+StressLCM -XX:StressSeed=75451718 + * -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*::test + * compiler.arraycopy.TestTailCallInArrayCopyStub + */ + +package compiler.arraycopy; + +public class TestTailCallInArrayCopyStub { + + public static void test(byte[] src, byte[] dst) { + try { + System.arraycopy(src, -1, dst, 0, src.length); + } catch (Exception e) { + // Expected + } + } + + public static void main(String[] args) { + byte[] array = new byte[5]; + for (int i = 0; i < 10_000; ++i) { + test(array, array); + } + } +} diff --git a/test/hotspot/jtreg/compiler/c1/TestLinearScanOrderMain.java b/test/hotspot/jtreg/compiler/c1/TestLinearScanOrderMain.java index 4165fa4d0e1..a154427530a 100644 --- a/test/hotspot/jtreg/compiler/c1/TestLinearScanOrderMain.java +++ b/test/hotspot/jtreg/compiler/c1/TestLinearScanOrderMain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ * @bug 8207355 * @compile TestLinearScanOrder.jasm * @run main/othervm -Xcomp -XX:+TieredCompilation -XX:TieredStopAtLevel=1 + * -XX:+IgnoreUnrecognizedVMOptions -XX:NMethodSizeLimit=655360 * -XX:CompileCommand=compileonly,compiler.c1.TestLinearScanOrder::test * compiler.c1.TestLinearScanOrderMain */ diff --git a/test/hotspot/jtreg/compiler/c2/TestMergeStores.java b/test/hotspot/jtreg/compiler/c2/TestMergeStores.java new file mode 100644 index 00000000000..55594650219 --- /dev/null +++ b/test/hotspot/jtreg/compiler/c2/TestMergeStores.java @@ -0,0 +1,1322 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package compiler.c2; + +import compiler.lib.ir_framework.*; +import jdk.test.lib.Utils; +import jdk.internal.misc.Unsafe; +import java.lang.reflect.Array; +import java.util.Map; +import java.util.HashMap; +import java.util.Random; + +/* + * @test + * @bug 8318446 8331054 + * @summary Test merging of consecutive stores + * @modules java.base/jdk.internal.misc + * @library /test/lib / + * @run main compiler.c2.TestMergeStores aligned + */ + +/* + * @test + * @bug 8318446 8331054 + * @summary Test merging of consecutive stores + * @modules java.base/jdk.internal.misc + * @library /test/lib / + * @run main compiler.c2.TestMergeStores unaligned + */ + +public class TestMergeStores { + static int RANGE = 1000; + private static final Unsafe UNSAFE = Unsafe.getUnsafe(); + private static final Random RANDOM = Utils.getRandomInstance(); + + // Inputs + byte[] aB = new byte[RANGE]; + byte[] bB = new byte[RANGE]; + short[] aS = new short[RANGE]; + short[] bS = new short[RANGE]; + int[] aI = new int[RANGE]; + int[] bI = new int[RANGE]; + long[] aL = new long[RANGE]; + long[] bL = new long[RANGE]; + + int offset1; + int offset2; + byte vB1; + byte vB2; + short vS1; + short vS2; + int vI1; + int vI2; + long vL1; + long vL2; + + interface TestFunction { + Object[] run(boolean isWarmUp, int rnd); + } + + Map> testGroups = new HashMap>(); + + public static void main(String[] args) { + TestFramework framework = new TestFramework(TestMergeStores.class); + framework.addFlags("--add-modules", "java.base", "--add-exports", "java.base/jdk.internal.misc=ALL-UNNAMED"); + + switch (args[0]) { + case "aligned" -> { framework.addFlags("-XX:-UseUnalignedAccesses"); } + case "unaligned" -> { framework.addFlags("-XX:+UseUnalignedAccesses"); } + default -> { throw new RuntimeException("Test argument not recognized: " + args[0]); } + } + framework.start(); + } + + public TestMergeStores() { + testGroups.put("test1", new HashMap()); + testGroups.get("test1").put("test1R", (_,_) -> { return test1R(aB.clone()); }); + testGroups.get("test1").put("test1a", (_,_) -> { return test1a(aB.clone()); }); + testGroups.get("test1").put("test1b", (_,_) -> { return test1b(aB.clone()); }); + testGroups.get("test1").put("test1c", (_,_) -> { return test1c(aB.clone()); }); + testGroups.get("test1").put("test1d", (_,_) -> { return test1d(aB.clone()); }); + testGroups.get("test1").put("test1e", (_,_) -> { return test1e(aB.clone()); }); + testGroups.get("test1").put("test1f", (_,_) -> { return test1f(aB.clone()); }); + testGroups.get("test1").put("test1g", (_,_) -> { return test1g(aB.clone()); }); + testGroups.get("test1").put("test1h", (_,_) -> { return test1h(aB.clone()); }); + testGroups.get("test1").put("test1i", (_,_) -> { return test1i(aB.clone()); }); + + testGroups.put("test2", new HashMap()); + testGroups.get("test2").put("test2R", (_,_) -> { return test2R(aB.clone(), offset1, vL1); }); + testGroups.get("test2").put("test2a", (_,_) -> { return test2a(aB.clone(), offset1, vL1); }); + testGroups.get("test2").put("test2b", (_,_) -> { return test2b(aB.clone(), offset1, vL1); }); + testGroups.get("test2").put("test2c", (_,_) -> { return test2c(aB.clone(), offset1, vL1); }); + testGroups.get("test2").put("test2d", (_,_) -> { return test2d(aB.clone(), offset1, vL1); }); + testGroups.get("test2").put("test2e", (_,_) -> { return test2d(aB.clone(), offset1, vL1); }); + + testGroups.put("test3", new HashMap()); + testGroups.get("test3").put("test3R", (_,_) -> { return test3R(aB.clone(), offset1, vL1); }); + testGroups.get("test3").put("test3a", (_,_) -> { return test3a(aB.clone(), offset1, vL1); }); + + testGroups.put("test4", new HashMap()); + testGroups.get("test4").put("test4R", (_,_) -> { return test4R(aB.clone(), offset1, vL1, vI1, vS1, vB1); }); + testGroups.get("test4").put("test4a", (_,_) -> { return test4a(aB.clone(), offset1, vL1, vI1, vS1, vB1); }); + + testGroups.put("test5", new HashMap()); + testGroups.get("test5").put("test5R", (_,_) -> { return test5R(aB.clone(), offset1); }); + testGroups.get("test5").put("test5a", (_,_) -> { return test5a(aB.clone(), offset1); }); + + testGroups.put("test6", new HashMap()); + testGroups.get("test6").put("test6R", (_,_) -> { return test6R(aB.clone(), bB.clone(), offset1, offset2); }); + testGroups.get("test6").put("test6a", (_,_) -> { return test6a(aB.clone(), bB.clone(), offset1, offset2); }); + + testGroups.put("test7", new HashMap()); + testGroups.get("test7").put("test7R", (_,_) -> { return test7R(aB.clone(), offset1, vI1); }); + testGroups.get("test7").put("test7a", (_,_) -> { return test7a(aB.clone(), offset1, vI1); }); + + testGroups.put("test100", new HashMap()); + testGroups.get("test100").put("test100R", (_,_) -> { return test100R(aS.clone(), offset1); }); + testGroups.get("test100").put("test100a", (_,_) -> { return test100a(aS.clone(), offset1); }); + + testGroups.put("test101", new HashMap()); + testGroups.get("test101").put("test101R", (_,_) -> { return test101R(aS.clone(), offset1); }); + testGroups.get("test101").put("test101a", (_,_) -> { return test101a(aS.clone(), offset1); }); + + testGroups.put("test102", new HashMap()); + testGroups.get("test102").put("test102R", (_,_) -> { return test102R(aS.clone(), offset1, vL1, vI1, vS1); }); + testGroups.get("test102").put("test102a", (_,_) -> { return test102a(aS.clone(), offset1, vL1, vI1, vS1); }); + + testGroups.put("test200", new HashMap()); + testGroups.get("test200").put("test200R", (_,_) -> { return test200R(aI.clone(), offset1); }); + testGroups.get("test200").put("test200a", (_,_) -> { return test200a(aI.clone(), offset1); }); + + testGroups.put("test201", new HashMap()); + testGroups.get("test201").put("test201R", (_,_) -> { return test201R(aI.clone(), offset1); }); + testGroups.get("test201").put("test201a", (_,_) -> { return test201a(aI.clone(), offset1); }); + + testGroups.put("test202", new HashMap()); + testGroups.get("test202").put("test202R", (_,_) -> { return test202R(aI.clone(), offset1, vL1, vI1); }); + testGroups.get("test202").put("test202a", (_,_) -> { return test202a(aI.clone(), offset1, vL1, vI1); }); + + testGroups.put("test300", new HashMap()); + testGroups.get("test300").put("test300R", (_,_) -> { return test300R(aI.clone()); }); + testGroups.get("test300").put("test300a", (_,_) -> { return test300a(aI.clone()); }); + + testGroups.put("test400", new HashMap()); + testGroups.get("test400").put("test400R", (_,_) -> { return test400R(aI.clone()); }); + testGroups.get("test400").put("test400a", (_,_) -> { return test400a(aI.clone()); }); + + testGroups.put("test500", new HashMap()); + testGroups.get("test500").put("test500R", (_,_) -> { return test500R(aB.clone(), offset1, vL1); }); + testGroups.get("test500").put("test500a", (_,_) -> { return test500a(aB.clone(), offset1, vL1); }); + + testGroups.put("test501", new HashMap()); + testGroups.get("test501").put("test500R", (_,i) -> { return test500R(aB.clone(), RANGE - 20 + (i % 30), vL1); }); + testGroups.get("test501").put("test501a", (_,i) -> { return test501a(aB.clone(), RANGE - 20 + (i % 30), vL1); }); + // +-------------------+ + // Create offsets that are sometimes going to pass all RangeChecks, and sometimes one, and sometimes none. + // Consequence: all RangeChecks stay in the final compilation. + + testGroups.put("test502", new HashMap()); + testGroups.get("test502").put("test500R", (w,i) -> { return test500R(aB.clone(), w ? offset1 : RANGE - 20 + (i % 30), vL1); }); + testGroups.get("test502").put("test502a", (w,i) -> { return test502a(aB.clone(), w ? offset1 : RANGE - 20 + (i % 30), vL1); }); + // +-----+ +-------------------+ + // First use something in range, and after warmup randomize going outside the range. + // Consequence: all RangeChecks stay in the final compilation. + + testGroups.put("test600", new HashMap()); + testGroups.get("test600").put("test600R", (_,i) -> { return test600R(aB.clone(), aI.clone(), i); }); + testGroups.get("test600").put("test600a", (_,i) -> { return test600a(aB.clone(), aI.clone(), i); }); + + testGroups.put("test700", new HashMap()); + testGroups.get("test700").put("test700R", (_,i) -> { return test700R(aI.clone(), i); }); + testGroups.get("test700").put("test700a", (_,i) -> { return test700a(aI.clone(), i); }); + } + + @Warmup(100) + @Run(test = {"test1a", + "test1b", + "test1c", + "test1d", + "test1e", + "test1f", + "test1g", + "test1h", + "test1i", + "test2a", + "test2b", + "test2c", + "test2d", + "test2e", + "test3a", + "test4a", + "test5a", + "test6a", + "test7a", + "test100a", + "test101a", + "test102a", + "test200a", + "test201a", + "test202a", + "test300a", + "test400a", + "test500a", + "test501a", + "test502a", + "test600a", + "test700a"}) + public void runTests(RunInfo info) { + // Repeat many times, so that we also have multiple iterations for post-warmup to potentially recompile + int iters = info.isWarmUp() ? 1_000 : 50_000; + for (int iter = 0; iter < iters; iter++) { + // Write random values to inputs + set_random(aB); + set_random(bB); + set_random(aS); + set_random(bS); + set_random(aI); + set_random(bI); + set_random(aL); + set_random(bL); + + offset1 = Math.abs(RANDOM.nextInt()) % 100; + offset2 = Math.abs(RANDOM.nextInt()) % 100; + vB1 = (byte)RANDOM.nextInt(); + vB2 = (byte)RANDOM.nextInt(); + vS1 = (short)RANDOM.nextInt(); + vS2 = (short)RANDOM.nextInt(); + vI1 = RANDOM.nextInt(); + vI2 = RANDOM.nextInt(); + vL1 = RANDOM.nextLong(); + vL2 = RANDOM.nextLong(); + + // Run all tests + for (Map.Entry> group_entry : testGroups.entrySet()) { + String group_name = group_entry.getKey(); + Map group = group_entry.getValue(); + Object[] gold = null; + String gold_name = "NONE"; + for (Map.Entry entry : group.entrySet()) { + String name = entry.getKey(); + TestFunction test = entry.getValue(); + Object[] result = test.run(info.isWarmUp(), iter); + if (gold == null) { + gold = result; + gold_name = name; + } else { + verify("group " + group_name + ", gold " + gold_name + ", test " + name, gold, result); + } + } + } + } + } + + static void verify(String name, Object[] gold, Object[] result) { + if (gold.length != result.length) { + throw new RuntimeException("verify " + name + ": not the same number of outputs: gold.length = " + + gold.length + ", result.length = " + result.length); + } + for (int i = 0; i < gold.length; i++) { + Object g = gold[i]; + Object r = result[i]; + if (g.getClass() != r.getClass() || !g.getClass().isArray() || !r.getClass().isArray()) { + throw new RuntimeException("verify " + name + ": must both be array of same type:" + + " gold[" + i + "].getClass() = " + g.getClass().getSimpleName() + + " result[" + i + "].getClass() = " + r.getClass().getSimpleName()); + } + if (g == r) { + throw new RuntimeException("verify " + name + ": should be two separate arrays (with identical content):" + + " gold[" + i + "] == result[" + i + "]"); + } + if (Array.getLength(g) != Array.getLength(r)) { + throw new RuntimeException("verify " + name + ": arrays must have same length:" + + " gold[" + i + "].length = " + Array.getLength(g) + + " result[" + i + "].length = " + Array.getLength(r)); + } + Class c = g.getClass().getComponentType(); + if (c == byte.class) { + verifyB(name, i, (byte[])g, (byte[])r); + } else if (c == short.class) { + verifyS(name, i, (short[])g, (short[])r); + } else if (c == int.class) { + verifyI(name, i, (int[])g, (int[])r); + } else if (c == long.class) { + verifyL(name, i, (long[])g, (long[])r); + } else { + throw new RuntimeException("verify " + name + ": array type not supported for verify:" + + " gold[" + i + "].getClass() = " + g.getClass().getSimpleName() + + " result[" + i + "].getClass() = " + r.getClass().getSimpleName()); + } + } + } + + static void verifyB(String name, int i, byte[] g, byte[] r) { + for (int j = 0; j < g.length; j++) { + if (g[j] != r[j]) { + throw new RuntimeException("verify " + name + ": arrays must have same content:" + + " gold[" + i + "][" + j + "] = " + g[j] + + " = " + String.format("%02X", g[j] & 0xFF) + + " result[" + i + "][" + j + "] = " + r[j] + + " = " + String.format("%02X", r[j] & 0xFF)); + } + } + } + + static void verifyS(String name, int i, short[] g, short[] r) { + for (int j = 0; j < g.length; j++) { + if (g[j] != r[j]) { + throw new RuntimeException("verify " + name + ": arrays must have same content:" + + " gold[" + i + "][" + j + "] = " + g[j] + + " result[" + i + "][" + j + "] = " + r[j]); + } + } + } + + static void verifyI(String name, int i, int[] g, int[] r) { + for (int j = 0; j < g.length; j++) { + if (g[j] != r[j]) { + throw new RuntimeException("verify " + name + ": arrays must have same content:" + + " gold[" + i + "][" + j + "] = " + g[j] + + " result[" + i + "][" + j + "] = " + r[j]); + } + } + } + + static void verifyL(String name, int i, long[] g, long[] r) { + for (int j = 0; j < g.length; j++) { + if (g[j] != r[j]) { + throw new RuntimeException("verify " + name + ": arrays must have same content:" + + " gold[" + i + "][" + j + "] = " + g[j] + + " result[" + i + "][" + j + "] = " + r[j]); + } + } + } + + static void set_random(byte[] a) { + for (int i = 0; i < a.length; i++) { + a[i] = (byte)RANDOM.nextInt(); + } + } + + static void set_random(short[] a) { + for (int i = 0; i < a.length; i++) { + a[i] = (short)RANDOM.nextInt(); + } + } + + static void set_random(int[] a) { + for (int i = 0; i < a.length; i++) { + a[i] = RANDOM.nextInt(); + } + } + + static void set_random(long[] a) { + for (int i = 0; i < a.length; i++) { + a[i] = RANDOM.nextLong(); + } + } + + // ------------------------------------------- + // ------- Little-Endian API ---------- + // ------------------------------------------- + // Note: I had to add @ForceInline because otherwise it would sometimes + // not inline nested method calls. + + // Store a short LE into an array using store bytes in an array + @ForceInline + static void storeShortLE(byte[] bytes, int offset, short value) { + storeBytes(bytes, offset, (byte)(value >> 0), + (byte)(value >> 8)); + } + + // Store an int LE into an array using store bytes in an array + @ForceInline + static void storeIntLE(byte[] bytes, int offset, int value) { + storeBytes(bytes, offset, (byte)(value >> 0 ), + (byte)(value >> 8 ), + (byte)(value >> 16), + (byte)(value >> 24)); + } + + // Store an int LE into an array using store bytes in an array + @ForceInline + static void storeLongLE(byte[] bytes, int offset, long value) { + storeBytes(bytes, offset, (byte)(value >> 0 ), + (byte)(value >> 8 ), + (byte)(value >> 16), + (byte)(value >> 24), + (byte)(value >> 32), + (byte)(value >> 40), + (byte)(value >> 48), + (byte)(value >> 56)); + } + + // Store 2 bytes into an array + @ForceInline + static void storeBytes(byte[] bytes, int offset, byte b0, byte b1) { + bytes[offset + 0] = b0; + bytes[offset + 1] = b1; + } + + // Store 4 bytes into an array + @ForceInline + static void storeBytes(byte[] bytes, int offset, byte b0, byte b1, byte b2, byte b3) { + bytes[offset + 0] = b0; + bytes[offset + 1] = b1; + bytes[offset + 2] = b2; + bytes[offset + 3] = b3; + } + + // Store 8 bytes into an array + @ForceInline + static void storeBytes(byte[] bytes, int offset, byte b0, byte b1, byte b2, byte b3, + byte b4, byte b5, byte b6, byte b7) { + bytes[offset + 0] = b0; + bytes[offset + 1] = b1; + bytes[offset + 2] = b2; + bytes[offset + 3] = b3; + bytes[offset + 4] = b4; + bytes[offset + 5] = b5; + bytes[offset + 6] = b6; + bytes[offset + 7] = b7; + } + + @DontCompile + static Object[] test1R(byte[] a) { + a[0] = (byte)0xbe; + a[1] = (byte)0xba; + a[2] = (byte)0xad; + a[3] = (byte)0xba; + a[4] = (byte)0xef; + a[5] = (byte)0xbe; + a[6] = (byte)0xad; + a[7] = (byte)0xde; + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test1a(byte[] a) { + a[0] = (byte)0xbe; + a[1] = (byte)0xba; + a[2] = (byte)0xad; + a[3] = (byte)0xba; + a[4] = (byte)0xef; + a[5] = (byte)0xbe; + a[6] = (byte)0xad; + a[7] = (byte)0xde; + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test1b(byte[] a) { + // Add custom null check, to ensure the unsafe access always recognizes its type as an array store + if (a == null) {return null;} + UNSAFE.putLongUnaligned(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET, 0xdeadbeefbaadbabeL); + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test1c(byte[] a) { + storeLongLE(a, 0, 0xdeadbeefbaadbabeL); + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test1d(byte[] a) { + storeIntLE(a, 0, 0xbaadbabe); + storeIntLE(a, 4, 0xdeadbeef); + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test1e(byte[] a) { + storeShortLE(a, 0, (short)0xbabe); + storeShortLE(a, 2, (short)0xbaad); + storeShortLE(a, 4, (short)0xbeef); + storeShortLE(a, 6, (short)0xdead); + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test1f(byte[] a) { + UNSAFE.putByte(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 0, (byte)0xbe); + UNSAFE.putByte(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 1, (byte)0xba); + UNSAFE.putByte(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 2, (byte)0xad); + UNSAFE.putByte(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 3, (byte)0xba); + UNSAFE.putByte(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 4, (byte)0xef); + UNSAFE.putByte(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 5, (byte)0xbe); + UNSAFE.putByte(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 6, (byte)0xad); + UNSAFE.putByte(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 7, (byte)0xde); + return new Object[]{ a }; + } + + @Test + // Do not optimize these, just to be sure we do not mess with store ordering. + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test1g(byte[] a) { + UNSAFE.putByteRelease(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 0, (byte)0xbe); + UNSAFE.putByteRelease(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 1, (byte)0xba); + UNSAFE.putByteRelease(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 2, (byte)0xad); + UNSAFE.putByteRelease(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 3, (byte)0xba); + UNSAFE.putByteRelease(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 4, (byte)0xef); + UNSAFE.putByteRelease(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 5, (byte)0xbe); + UNSAFE.putByteRelease(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 6, (byte)0xad); + UNSAFE.putByteRelease(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 7, (byte)0xde); + return new Object[]{ a }; + } + + @Test + // Do not optimize these, just to be sure we do not mess with store ordering. + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test1h(byte[] a) { + UNSAFE.putByteVolatile(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 0, (byte)0xbe); + UNSAFE.putByteVolatile(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 1, (byte)0xba); + UNSAFE.putByteVolatile(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 2, (byte)0xad); + UNSAFE.putByteVolatile(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 3, (byte)0xba); + UNSAFE.putByteVolatile(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 4, (byte)0xef); + UNSAFE.putByteVolatile(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 5, (byte)0xbe); + UNSAFE.putByteVolatile(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 6, (byte)0xad); + UNSAFE.putByteVolatile(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 7, (byte)0xde); + return new Object[]{ a }; + } + + @Test + // Do not optimize these, just to be sure we do not mess with store ordering. + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test1i(byte[] a) { + UNSAFE.putByteOpaque(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 0, (byte)0xbe); + UNSAFE.putByteOpaque(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 1, (byte)0xba); + UNSAFE.putByteOpaque(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 2, (byte)0xad); + UNSAFE.putByteOpaque(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 3, (byte)0xba); + UNSAFE.putByteOpaque(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 4, (byte)0xef); + UNSAFE.putByteOpaque(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 5, (byte)0xbe); + UNSAFE.putByteOpaque(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 6, (byte)0xad); + UNSAFE.putByteOpaque(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 7, (byte)0xde); + return new Object[]{ a }; + } + + @DontCompile + static Object[] test2R(byte[] a, int offset, long v) { + a[offset + 0] = (byte)(v >> 0); + a[offset + 1] = (byte)(v >> 8); + a[offset + 2] = (byte)(v >> 16); + a[offset + 3] = (byte)(v >> 24); + a[offset + 4] = (byte)(v >> 32); + a[offset + 5] = (byte)(v >> 40); + a[offset + 6] = (byte)(v >> 48); + a[offset + 7] = (byte)(v >> 56); + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test2a(byte[] a, int offset, long v) { + a[offset + 0] = (byte)(v >> 0); + a[offset + 1] = (byte)(v >> 8); + a[offset + 2] = (byte)(v >> 16); + a[offset + 3] = (byte)(v >> 24); + a[offset + 4] = (byte)(v >> 32); + a[offset + 5] = (byte)(v >> 40); + a[offset + 6] = (byte)(v >> 48); + a[offset + 7] = (byte)(v >> 56); + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test2b(byte[] a, int offset, long v) { + // Add custom null check, to ensure the unsafe access always recognizes its type as an array store + if (a == null) {return null;} + UNSAFE.putLongUnaligned(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + offset, v); + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test2c(byte[] a, int offset, long v) { + storeLongLE(a, offset, v); + return new Object[]{ a }; + } + + @Test + // No optimization, casting long -> int -> byte does not work + static Object[] test2d(byte[] a, int offset, long v) { + storeIntLE(a, offset + 0, (int)(v >> 0)); + storeIntLE(a, offset + 4, (int)(v >> 32)); + return new Object[]{ a }; + } + + @Test + // No optimization, casting long -> short -> byte does not work + static Object[] test2e(byte[] a, int offset, long v) { + storeShortLE(a, offset + 0, (short)(v >> 0)); + storeShortLE(a, offset + 2, (short)(v >> 16)); + storeShortLE(a, offset + 4, (short)(v >> 32)); + storeShortLE(a, offset + 6, (short)(v >> 48)); + return new Object[]{ a }; + } + + @DontCompile + static Object[] test3R(byte[] a, int offset, long v) { + a[offset + 0] = (byte)(v >> 0); + a[offset + 1] = (byte)(v >> 8); + a[offset + 2] = (byte)(v >> 16); + a[offset + 3] = (byte)(v >> 24); + a[offset + 4] = (byte)(v >> 0); + a[offset + 5] = (byte)(v >> 8); + a[offset + 6] = (byte)(v >> 16); + a[offset + 7] = (byte)(v >> 24); + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test3a(byte[] a, int offset, long v) { + a[offset + 0] = (byte)(v >> 0); + a[offset + 1] = (byte)(v >> 8); + a[offset + 2] = (byte)(v >> 16); + a[offset + 3] = (byte)(v >> 24); + a[offset + 4] = (byte)(v >> 0); + a[offset + 5] = (byte)(v >> 8); + a[offset + 6] = (byte)(v >> 16); + a[offset + 7] = (byte)(v >> 24); + return new Object[]{ a }; + } + + @DontCompile + static Object[] test4R(byte[] a, int offset, long v1, int v2, short v3, byte v4) { + a[offset + 0] = (byte)0x00; + a[offset + 1] = (byte)0xFF; + a[offset + 2] = v4; + a[offset + 3] = (byte)0x42; + a[offset + 4] = (byte)(v1 >> 0); + a[offset + 5] = (byte)(v1 >> 8); + a[offset + 6] = (byte)0xAB; + a[offset + 7] = (byte)0xCD; + a[offset + 8] = (byte)0xEF; + a[offset + 9] = (byte)0x01; + a[offset + 10] = (byte)(v2 >> 0); + a[offset + 11] = (byte)(v2 >> 8); + a[offset + 12] = (byte)(v2 >> 16); + a[offset + 13] = (byte)(v2 >> 24); + a[offset + 14] = (byte)(v3 >> 0); + a[offset + 15] = (byte)(v3 >> 8); + a[offset + 16] = (byte)0xEF; + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "4", // 3 (+ 1 for uncommon trap) + IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3", + IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2", + IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test4a(byte[] a, int offset, long v1, int v2, short v3, byte v4) { + a[offset + 0] = (byte)0x00; // individual load expected to go into state of RC + a[offset + 1] = (byte)0xFF; + a[offset + 2] = v4; + a[offset + 3] = (byte)0x42; + a[offset + 4] = (byte)(v1 >> 0); + a[offset + 5] = (byte)(v1 >> 8); + a[offset + 6] = (byte)0xAB; + a[offset + 7] = (byte)0xCD; + a[offset + 8] = (byte)0xEF; + a[offset + 9] = (byte)0x01; + a[offset + 10] = (byte)(v2 >> 0); + a[offset + 11] = (byte)(v2 >> 8); + a[offset + 12] = (byte)(v2 >> 16); + a[offset + 13] = (byte)(v2 >> 24); + a[offset + 14] = (byte)(v3 >> 0); + a[offset + 15] = (byte)(v3 >> 8); + a[offset + 16] = (byte)0xEF; + return new Object[]{ a }; + } + + @DontCompile + static Object[] test5R(byte[] a, int offset) { + a[offset + 0] = (byte)0x01; + a[offset + 1] = (byte)0x02; + a[offset + 2] = (byte)0x03; + a[offset + 3] = (byte)0x04; + a[offset + 4] = (byte)0x11; + a[offset + 5] = (byte)0x22; + a[offset + 6] = (byte)0x33; + a[offset + 7] = (byte)0x44; + a[offset + 8] = (byte)0x55; + a[offset + 9] = (byte)0x66; + a[offset + 10] = (byte)0x77; + a[offset + 11] = (byte)0xAA; + a[offset + 12] = (byte)0xBB; + a[offset + 13] = (byte)0xCC; + a[offset + 14] = (byte)0xDD; + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", + IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", + IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", + IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test5a(byte[] a, int offset) { + a[offset + 0] = (byte)0x01; + a[offset + 1] = (byte)0x02; + a[offset + 2] = (byte)0x03; + a[offset + 3] = (byte)0x04; + a[offset + 4] = (byte)0x11; + a[offset + 5] = (byte)0x22; + a[offset + 6] = (byte)0x33; + a[offset + 7] = (byte)0x44; + a[offset + 8] = (byte)0x55; + a[offset + 9] = (byte)0x66; + a[offset + 10] = (byte)0x77; + a[offset + 11] = (byte)0xAA; + a[offset + 12] = (byte)0xBB; + a[offset + 13] = (byte)0xCC; + a[offset + 14] = (byte)0xDD; + return new Object[]{ a }; + } + + @DontCompile + static Object[] test6R(byte[] a, byte[] b, int offset1, int offset2) { + a[offset1 + 1] = (byte)0x02; + a[offset1 + 3] = (byte)0x04; + b[offset1 + 4] = (byte)0x11; + a[offset1 + 5] = (byte)0x22; + a[offset2 + 6] = (byte)0x33; + a[offset1 + 7] = (byte)0x44; + b[offset1 + 8] = (byte)0x55; + b[offset1 + 10] = (byte)0x66; + return new Object[]{ a, b }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8", + IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + static Object[] test6a(byte[] a, byte[] b, int offset1, int offset2) { + a[offset1 + 1] = (byte)0x02; + a[offset1 + 3] = (byte)0x04; + b[offset1 + 4] = (byte)0x11; + a[offset1 + 5] = (byte)0x22; + a[offset2 + 6] = (byte)0x33; + a[offset1 + 7] = (byte)0x44; + b[offset1 + 8] = (byte)0x55; + b[offset1 + 10] = (byte)0x66; + return new Object[]{ a, b }; + } + + @DontCompile + static Object[] test7R(byte[] a, int offset1, int v1) { + a[offset1 + 1] = (byte)(v1 >> 8); + a[offset1 + 2] = (byte)(v1 >> 16); + a[offset1 + 3] = (byte)(v1 >> 24); + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3", + IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + static Object[] test7a(byte[] a, int offset1, int v1) { + a[offset1 + 1] = (byte)(v1 >> 8); + a[offset1 + 2] = (byte)(v1 >> 16); + a[offset1 + 3] = (byte)(v1 >> 24); + return new Object[]{ a }; + } + + @DontCompile + static Object[] test100R(short[] a, int offset) { + a[offset + 0] = (short)0x0100; + a[offset + 1] = (short)0x0200; + a[offset + 2] = (short)0x0311; + a[offset + 3] = (short)0x0400; + a[offset + 4] = (short)0x1100; + a[offset + 5] = (short)0x2233; + a[offset + 6] = (short)0x3300; + a[offset + 7] = (short)0x4400; + a[offset + 8] = (short)0x5599; + a[offset + 9] = (short)0x6600; + a[offset + 10] = (short)0x7700; + a[offset + 11] = (short)0xAACC; + a[offset + 12] = (short)0xBB00; + a[offset + 13] = (short)0xCC00; + a[offset + 14] = (short)0xDDFF; + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_C_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", + IRNode.STORE_I_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", + IRNode.STORE_L_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test100a(short[] a, int offset) { + a[offset + 0] = (short)0x0100; // stays unchanged -> both used for RC and Return path + a[offset + 1] = (short)0x0200; // I + a[offset + 2] = (short)0x0311; // I + a[offset + 3] = (short)0x0400; // L + a[offset + 4] = (short)0x1100; // L + a[offset + 5] = (short)0x2233; // L + a[offset + 6] = (short)0x3300; // L + a[offset + 7] = (short)0x4400; // L + a[offset + 8] = (short)0x5599; // L + a[offset + 9] = (short)0x6600; // L + a[offset + 10] = (short)0x7700; // L + a[offset + 11] = (short)0xAACC; // L + a[offset + 12] = (short)0xBB00; // L + a[offset + 13] = (short)0xCC00; // L + a[offset + 14] = (short)0xDDFF; // L + return new Object[]{ a }; + } + + @DontCompile + static Object[] test101R(short[] a, int offset) { + a[offset + 0] = (short)0x0100; + a[offset + 1] = (short)0x0200; + a[offset + 2] = (short)0x0311; + a[offset + 3] = (short)0x0400; + a[offset + 4] = (short)0x1100; + a[offset + 5] = (short)0x2233; + a[offset + 6] = (short)0x3300; + a[offset + 7] = (short)0x4400; + a[offset + 8] = (short)0x5599; + a[offset + 9] = (short)0x6600; + a[offset + 10] = (short)0x7700; + a[offset + 11] = (short)0xAACC; + a[offset + 12] = (short)0xBB00; + a[offset + 13] = (short)0xCC00; + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_C_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // only for RC + IRNode.STORE_I_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", + IRNode.STORE_L_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test101a(short[] a, int offset) { + a[offset + 0] = (short)0x0100; // I plus kept unchanged for RC + a[offset + 1] = (short)0x0200; // I + a[offset + 2] = (short)0x0311; // L + a[offset + 3] = (short)0x0400; // L + a[offset + 4] = (short)0x1100; // L + a[offset + 5] = (short)0x2233; // L + a[offset + 6] = (short)0x3300; // L + a[offset + 7] = (short)0x4400; // L + a[offset + 8] = (short)0x5599; // L + a[offset + 9] = (short)0x6600; // L + a[offset + 10] = (short)0x7700; // L + a[offset + 11] = (short)0xAACC; // L + a[offset + 12] = (short)0xBB00; // L + a[offset + 13] = (short)0xCC00; // L + return new Object[]{ a }; + } + + @DontCompile + static Object[] test102R(short[] a, int offset, long v1, int v2, short v3) { + a[offset + 0] = (short)0x0000; + a[offset + 1] = (short)0xFFFF; + a[offset + 2] = v3; + a[offset + 3] = (short)0x4242; + a[offset + 4] = (short)(v1 >> 0); + a[offset + 5] = (short)(v1 >> 16); + a[offset + 6] = (short)0xAB11; + a[offset + 7] = (short)0xCD36; + a[offset + 8] = (short)0xEF89; + a[offset + 9] = (short)0x0156; + a[offset + 10] = (short)(v1 >> 0); + a[offset + 11] = (short)(v1 >> 16); + a[offset + 12] = (short)(v1 >> 32); + a[offset + 13] = (short)(v1 >> 48); + a[offset + 14] = (short)(v2 >> 0); + a[offset + 15] = (short)(v2 >> 16); + a[offset + 16] = (short)0xEFEF; + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_C_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "4", // 3 (+1 that goes into RC) + IRNode.STORE_I_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3", + IRNode.STORE_L_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test102a(short[] a, int offset, long v1, int v2, short v3) { + a[offset + 0] = (short)0x0000; // store goes into RC + a[offset + 1] = (short)0xFFFF; + a[offset + 2] = v3; + a[offset + 3] = (short)0x4242; + a[offset + 4] = (short)(v1 >> 0); + a[offset + 5] = (short)(v1 >> 16); + a[offset + 6] = (short)0xAB11; + a[offset + 7] = (short)0xCD36; + a[offset + 8] = (short)0xEF89; + a[offset + 9] = (short)0x0156; + a[offset + 10] = (short)(v1 >> 0); + a[offset + 11] = (short)(v1 >> 16); + a[offset + 12] = (short)(v1 >> 32); + a[offset + 13] = (short)(v1 >> 48); + a[offset + 14] = (short)(v2 >> 0); + a[offset + 15] = (short)(v2 >> 16); + a[offset + 16] = (short)0xEFEF; + return new Object[]{ a }; + } + + @DontCompile + static Object[] test200R(int[] a, int offset) { + a[offset + 0] = 0x01001236; + a[offset + 1] = 0x02001284; + a[offset + 2] = 0x03111235; + a[offset + 3] = 0x04001294; + a[offset + 4] = 0x11001234; + a[offset + 5] = 0x22331332; + a[offset + 6] = 0x33001234; + a[offset + 7] = 0x44001432; + a[offset + 8] = 0x55991234; + a[offset + 9] = 0x66001233; + a[offset + 10] = 0x77001434; + a[offset + 11] = 0xAACC1234; + a[offset + 12] = 0xBB001434; + a[offset + 13] = 0xCC001236; + a[offset + 14] = 0xDDFF1534; + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", + IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "7"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test200a(int[] a, int offset) { + a[offset + 0] = 0x01001236; // stays unchanged -> both used for RC and Return path + a[offset + 1] = 0x02001284; // L + a[offset + 2] = 0x03111235; // L + a[offset + 3] = 0x04001294; // L + a[offset + 4] = 0x11001234; // L + a[offset + 5] = 0x22331332; // L + a[offset + 6] = 0x33001234; // L + a[offset + 7] = 0x44001432; // L + a[offset + 8] = 0x55991234; // L + a[offset + 9] = 0x66001233; // L + a[offset + 10] = 0x77001434; // L + a[offset + 11] = 0xAACC1234; // L + a[offset + 12] = 0xBB001434; // L + a[offset + 13] = 0xCC001236; // L + a[offset + 14] = 0xDDFF1534; // L + return new Object[]{ a }; + } + + @DontCompile + static Object[] test201R(int[] a, int offset) { + a[offset + 0] = 0x01001236; + a[offset + 1] = 0x02001284; + a[offset + 2] = 0x03111235; + a[offset + 3] = 0x04001294; + a[offset + 4] = 0x11001234; + a[offset + 5] = 0x22331332; + a[offset + 6] = 0x33001234; + a[offset + 7] = 0x44001432; + a[offset + 8] = 0x55991234; + a[offset + 9] = 0x66001233; + a[offset + 10] = 0x77001434; + a[offset + 11] = 0xAACC1234; + a[offset + 12] = 0xBB001434; + a[offset + 13] = 0xCC001236; + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // only for RC + IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "7"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test201a(int[] a, int offset) { + a[offset + 0] = 0x01001236; // L and also kept unchanged for RC + a[offset + 1] = 0x02001284; // L + a[offset + 2] = 0x03111235; // L + a[offset + 3] = 0x04001294; // L + a[offset + 4] = 0x11001234; // L + a[offset + 5] = 0x22331332; // L + a[offset + 6] = 0x33001234; // L + a[offset + 7] = 0x44001432; // L + a[offset + 8] = 0x55991234; // L + a[offset + 9] = 0x66001233; // L + a[offset + 10] = 0x77001434; // L + a[offset + 11] = 0xAACC1234; // L + a[offset + 12] = 0xBB001434; // L + a[offset + 13] = 0xCC001236; // L + return new Object[]{ a }; + } + + @DontCompile + static Object[] test202R(int[] a, int offset, long v1, int v2) { + a[offset + 0] = 0x00000000; + a[offset + 1] = 0xFFFFFFFF; + a[offset + 2] = v2; + a[offset + 3] = 0x42424242; + a[offset + 4] = (int)(v1 >> 0); + a[offset + 5] = (int)(v1 >> 32); + a[offset + 6] = 0xAB110129; + a[offset + 7] = 0xCD360183; + a[offset + 8] = 0xEF890173; + a[offset + 9] = 0x01560124; + a[offset + 10] = (int)(v1 >> 0); + a[offset + 11] = (int)(v1 >> 32); + a[offset + 12] = (int)(v1 >> 0); + a[offset + 13] = (int)(v1 >> 32); + a[offset + 14] = v2; + a[offset + 15] = v2; + a[offset + 16] = 0xEFEFEFEF; + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "6", // 5 (+1 that goes into RC) + IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "6"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test202a(int[] a, int offset, long v1, int v2) { + a[offset + 0] = 0x00000000; // merged with store below, but also kept unchanged for RC + a[offset + 1] = 0xFFFFFFFF; + a[offset + 2] = v2; + a[offset + 3] = 0x42424242; + a[offset + 4] = (int)(v1 >> 0); + a[offset + 5] = (int)(v1 >> 32); + a[offset + 6] = 0xAB110129; + a[offset + 7] = 0xCD360183; + a[offset + 8] = 0xEF890173; + a[offset + 9] = 0x01560124; + a[offset + 10] = (int)(v1 >> 0); + a[offset + 11] = (int)(v1 >> 32); + a[offset + 12] = (int)(v1 >> 0); + a[offset + 13] = (int)(v1 >> 32); + a[offset + 14] = v2; + a[offset + 15] = v2; + a[offset + 16] = 0xEFEFEFEF; + return new Object[]{ a }; + } + + @DontCompile + static Object[] test300R(int[] a) { + a[2] = 42; + a[3] = 42; + a[4] = 42; + a[5] = 42; + int x = a[3]; // dependent load + return new Object[]{ a, new int[]{ x } }; + } + + @Test + @IR(counts = {IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2"}, + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test300a(int[] a) { + a[2] = 42; + a[3] = 42; + a[4] = 42; + a[5] = 42; + int x = a[3]; // dependent load + return new Object[]{ a, new int[]{ x } }; + } + + @DontCompile + static Object[] test400R(int[] a) { + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 0, (byte)0xbe); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 1, (byte)0xba); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 2, (byte)0xad); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 3, (byte)0xba); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 4, (byte)0xef); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 5, (byte)0xbe); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 6, (byte)0xad); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 7, (byte)0xde); + return new Object[]{ a }; + } + + @Test + // We must be careful with mismatched accesses on arrays: + // An int-array can have about 2x max_int size, and hence if we address bytes in it, we can have int-overflows. + // We might consider addresses (x + 0) and (x + 1) as adjacent, even if x = max_int, and therefore the second + // address overflows and is not adjacent at all. + // Therefore, we should only consider stores that have the same size as the element type of the array. + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8", // no merging + IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + static Object[] test400a(int[] a) { + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 0, (byte)0xbe); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 1, (byte)0xba); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 2, (byte)0xad); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 3, (byte)0xba); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 4, (byte)0xef); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 5, (byte)0xbe); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 6, (byte)0xad); + UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 7, (byte)0xde); + return new Object[]{ a }; + } + + @DontCompile + // The 500-series has all the same code, but is executed with different inputs: + // 500a: never violate a RangeCheck -> expect will always merge stores + // 501a: randomly violate RangeCheck, also during warmup -> never merge stores + // 502a: during warmup never violate RangeCheck -> compile once with merged stores + // but then after warmup violate RangeCheck -> recompile without merged stores + static Object[] test500R(byte[] a, int offset, long v) { + int idx = 0; + try { + a[offset + 0] = (byte)(v >> 0); + idx = 1; + a[offset + 1] = (byte)(v >> 8); + idx = 2; + a[offset + 2] = (byte)(v >> 16); + idx = 3; + a[offset + 3] = (byte)(v >> 24); + idx = 4; + a[offset + 4] = (byte)(v >> 32); + idx = 5; + a[offset + 5] = (byte)(v >> 40); + idx = 6; + a[offset + 6] = (byte)(v >> 48); + idx = 7; + a[offset + 7] = (byte)(v >> 56); + idx = 8; + } catch (ArrayIndexOutOfBoundsException _) {} + return new Object[]{ a, new int[]{ idx } }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // for RangeCheck trap + IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, // expect merged + applyIf = {"UseUnalignedAccesses", "true"}) + static Object[] test500a(byte[] a, int offset, long v) { + int idx = 0; + try { + a[offset + 0] = (byte)(v >> 0); + idx = 1; + a[offset + 1] = (byte)(v >> 8); + idx = 2; + a[offset + 2] = (byte)(v >> 16); + idx = 3; + a[offset + 3] = (byte)(v >> 24); + idx = 4; + a[offset + 4] = (byte)(v >> 32); + idx = 5; + a[offset + 5] = (byte)(v >> 40); + idx = 6; + a[offset + 6] = (byte)(v >> 48); + idx = 7; + a[offset + 7] = (byte)(v >> 56); + idx = 8; + } catch (ArrayIndexOutOfBoundsException _) {} + return new Object[]{ a, new int[]{ idx } }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8", // No optimization because of too many RangeChecks + IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + static Object[] test501a(byte[] a, int offset, long v) { + int idx = 0; + try { + a[offset + 0] = (byte)(v >> 0); + idx = 1; + a[offset + 1] = (byte)(v >> 8); + idx = 2; + a[offset + 2] = (byte)(v >> 16); + idx = 3; + a[offset + 3] = (byte)(v >> 24); + idx = 4; + a[offset + 4] = (byte)(v >> 32); + idx = 5; + a[offset + 5] = (byte)(v >> 40); + idx = 6; + a[offset + 6] = (byte)(v >> 48); + idx = 7; + a[offset + 7] = (byte)(v >> 56); + idx = 8; + } catch (ArrayIndexOutOfBoundsException _) {} + return new Object[]{ a, new int[]{ idx } }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8", // No optimization because of too many RangeChecks + IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + static Object[] test502a(byte[] a, int offset, long v) { + int idx = 0; + try { + a[offset + 0] = (byte)(v >> 0); + idx = 1; + a[offset + 1] = (byte)(v >> 8); + idx = 2; + a[offset + 2] = (byte)(v >> 16); + idx = 3; + a[offset + 3] = (byte)(v >> 24); + idx = 4; + a[offset + 4] = (byte)(v >> 32); + idx = 5; + a[offset + 5] = (byte)(v >> 40); + idx = 6; + a[offset + 6] = (byte)(v >> 48); + idx = 7; + a[offset + 7] = (byte)(v >> 56); + idx = 8; + } catch (ArrayIndexOutOfBoundsException _) {} + return new Object[]{ a, new int[]{ idx } }; + } + + @DontCompile + static Object[] test600R(byte[] aB, int[] aI, int i) { + Object a = null; + long base = 0; + if (i % 2 == 0) { + a = aB; + base = UNSAFE.ARRAY_BYTE_BASE_OFFSET; + } else { + a = aI; + base = UNSAFE.ARRAY_INT_BASE_OFFSET; + } + UNSAFE.putByte(a, base + 0, (byte)0xbe); + UNSAFE.putByte(a, base + 1, (byte)0xba); + UNSAFE.putByte(a, base + 2, (byte)0xad); + UNSAFE.putByte(a, base + 3, (byte)0xba); + UNSAFE.putByte(a, base + 4, (byte)0xef); + UNSAFE.putByte(a, base + 5, (byte)0xbe); + UNSAFE.putByte(a, base + 6, (byte)0xad); + UNSAFE.putByte(a, base + 7, (byte)0xde); + return new Object[]{ aB, aI }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8"}) // note: bottom type + static Object[] test600a(byte[] aB, int[] aI, int i) { + Object a = null; + long base = 0; + if (i % 2 == 0) { + a = aB; + base = UNSAFE.ARRAY_BYTE_BASE_OFFSET; + } else { + a = aI; + base = UNSAFE.ARRAY_INT_BASE_OFFSET; + } + // array a is an aryptr, but its element type is unknown, i.e. bottom. + UNSAFE.putByte(a, base + 0, (byte)0xbe); + UNSAFE.putByte(a, base + 1, (byte)0xba); + UNSAFE.putByte(a, base + 2, (byte)0xad); + UNSAFE.putByte(a, base + 3, (byte)0xba); + UNSAFE.putByte(a, base + 4, (byte)0xef); + UNSAFE.putByte(a, base + 5, (byte)0xbe); + UNSAFE.putByte(a, base + 6, (byte)0xad); + UNSAFE.putByte(a, base + 7, (byte)0xde); + return new Object[]{ aB, aI }; + } + + @DontCompile + static Object[] test700R(int[] a, long v1) { + a[0] = (int)(v1 >> -1); + a[1] = (int)(v1 >> -2); + return new Object[]{ a }; + } + + @Test + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2", + IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + static Object[] test700a(int[] a, long v1) { + // Negative shift: cannot optimize + a[0] = (int)(v1 >> -1); + a[1] = (int)(v1 >> -2); + return new Object[]{ a }; + } +} diff --git a/test/hotspot/jtreg/compiler/c2/TestUninitializedKlassField.java b/test/hotspot/jtreg/compiler/c2/TestUninitializedKlassField.java index 3bad2bde7b1..63daec895ef 100644 --- a/test/hotspot/jtreg/compiler/c2/TestUninitializedKlassField.java +++ b/test/hotspot/jtreg/compiler/c2/TestUninitializedKlassField.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/hotspot/jtreg/compiler/c2/irTests/ConstructorBarriers.java b/test/hotspot/jtreg/compiler/c2/irTests/ConstructorBarriers.java new file mode 100644 index 00000000000..7252427ffcd --- /dev/null +++ b/test/hotspot/jtreg/compiler/c2/irTests/ConstructorBarriers.java @@ -0,0 +1,311 @@ +/* + * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package compiler.c2.irTests; + +import compiler.lib.ir_framework.*; + +/* + * @test + * @bug 8300148 + * @summary Test barriers emitted in constructors + * @library /test/lib / + * @requires os.arch=="aarch64" | os.arch=="riscv64" | os.arch=="x86_64" | os.arch=="amd64" + * @run main compiler.c2.irTests.ConstructorBarriers + */ +public class ConstructorBarriers { + public static void main(String[] args) { + TestFramework.run(); + } + + // Checks the barrier coalescing/optimization around field initializations. + // Uses long fields to avoid store merging. + + public static class PlainPlain { + long f1; + long f2; + public PlainPlain(long i) { + f1 = i; + f2 = i; + } + } + + private static class FinalPlain { + final long f1; + long f2; + public FinalPlain(long i) { + f1 = i; + f2 = i; + } + } + + private static class PlainFinal { + long f1; + final long f2; + public PlainFinal(long i) { + f1 = i; + f2 = i; + } + } + + private static class FinalFinal { + final long f1; + final long f2; + public FinalFinal(long i) { + f1 = i; + f2 = i; + } + } + + private static class PlainVolatile { + long f1; + volatile long f2; + public PlainVolatile(long i) { + f1 = i; + f2 = i; + } + } + + private static class VolatilePlain { + volatile long f1; + long f2; + public VolatilePlain(long i) { + f1 = i; + f2 = i; + } + } + + private static class FinalVolatile { + final long f1; + volatile long f2; + public FinalVolatile(long i) { + f1 = i; + f2 = i; + } + } + + private static class VolatileFinal { + volatile long f1; + final long f2; + public VolatileFinal(long i) { + f1 = i; + f2 = i; + } + } + + private static class VolatileVolatile { + volatile long f1; + volatile long f2; + public VolatileVolatile(long i) { + f1 = i; + f2 = i; + } + } + + long l = 42; + + @DontInline + public void consume(Object o) {} + + @Test + @IR(counts = {IRNode.MEMBAR_STORESTORE, "1"}) + @IR(failOn = IRNode.MEMBAR_RELEASE) + @IR(failOn = IRNode.MEMBAR_VOLATILE) + public long escaping_plainPlain() { + PlainPlain c = new PlainPlain(l); + consume(c); + return c.f1 + c.f2; + } + + @Test + @IR(counts = {IRNode.MEMBAR_STORESTORE, "1"}) + @IR(failOn = IRNode.MEMBAR_RELEASE) + @IR(failOn = IRNode.MEMBAR_VOLATILE) + public long escaping_plainFinal() { + PlainFinal c = new PlainFinal(l); + consume(c); + return c.f1 + c.f2; + } + + @Test + @IR(counts = {IRNode.MEMBAR_STORESTORE, "1"}) + @IR(failOn = IRNode.MEMBAR_RELEASE) + @IR(failOn = IRNode.MEMBAR_VOLATILE) + public long escaping_finalPlain() { + FinalPlain c = new FinalPlain(l); + consume(c); + return c.f1 + c.f2; + } + + @Test + @IR(counts = {IRNode.MEMBAR_STORESTORE, "1"}) + @IR(failOn = IRNode.MEMBAR_RELEASE) + @IR(failOn = IRNode.MEMBAR_VOLATILE) + public long escaping_finalFinal() { + FinalFinal c = new FinalFinal(l); + consume(c); + return c.f1 + c.f2; + } + + @Test + @IR(counts = {IRNode.MEMBAR_RELEASE, "1"}) + @IR(counts = {IRNode.MEMBAR_STORESTORE, "1"}) + @IR(counts = {IRNode.MEMBAR_VOLATILE, "1"}) + public long escaping_plainVolatile() { + PlainVolatile c = new PlainVolatile(l); + consume(c); + return c.f1 + c.f2; + } + + @Test + @IR(counts = {IRNode.MEMBAR_RELEASE, "1"}) + @IR(counts = {IRNode.MEMBAR_STORESTORE, "1"}) + @IR(counts = {IRNode.MEMBAR_VOLATILE, "1"}) + public long escaping_volatilePlain() { + VolatilePlain c = new VolatilePlain(l); + consume(c); + return c.f1 + c.f2; + } + + @Test + @IR(counts = {IRNode.MEMBAR_RELEASE, "2"}) + @IR(counts = {IRNode.MEMBAR_STORESTORE, "1"}) + @IR(counts = {IRNode.MEMBAR_VOLATILE, "2"}) + public long escaping_volatileVolatile() { + VolatileVolatile c = new VolatileVolatile(l); + consume(c); + return c.f1 + c.f2; + } + + @Test + @IR(counts = {IRNode.MEMBAR_RELEASE, "1"}) + @IR(counts = {IRNode.MEMBAR_STORESTORE, "1"}) + @IR(counts = {IRNode.MEMBAR_VOLATILE, "1"}) + public long escaping_finalVolatile() { + FinalVolatile c = new FinalVolatile(l); + consume(c); + return c.f1 + c.f2; + } + + @Test + @IR(counts = {IRNode.MEMBAR_RELEASE, "1"}) + @IR(counts = {IRNode.MEMBAR_STORESTORE, "1"}) + @IR(counts = {IRNode.MEMBAR_VOLATILE, "1"}) + public long escaping_volatileFinal() { + VolatileFinal c = new VolatileFinal(l); + consume(c); + return c.f1 + c.f2; + } + + @Test + @IR(failOn = IRNode.MEMBAR) + public long non_escaping_plainPlain() { + PlainPlain c = new PlainPlain(l); + return c.f1 + c.f2; + } + + @Test + @IR(failOn = IRNode.MEMBAR) + public long non_escaping_plainFinal() { + PlainFinal c = new PlainFinal(l); + return c.f1 + c.f2; + } + + @Test + @IR(failOn = IRNode.MEMBAR) + public long non_escaping_finalPlain() { + FinalPlain c = new FinalPlain(l); + return c.f1 + c.f2; + } + + @Test + @IR(failOn = IRNode.MEMBAR) + public long non_escaping_finalFinal() { + FinalFinal c = new FinalFinal(l); + return c.f1 + c.f2; + } + + @Test + @IR(failOn = IRNode.MEMBAR_RELEASE) + @IR(failOn = IRNode.MEMBAR_STORESTORE) + @IR(failOn = IRNode.MEMBAR_VOLATILE) + @IR(counts = {IRNode.MEMBAR_ACQUIRE, "1"}) + public long non_escaping_plainVolatile() { + PlainVolatile c = new PlainVolatile(l); + return c.f1 + c.f2; + } + + @Test + @IR(failOn = IRNode.MEMBAR_RELEASE) + @IR(failOn = IRNode.MEMBAR_STORESTORE) + @IR(failOn = IRNode.MEMBAR_VOLATILE) + @IR(counts = {IRNode.MEMBAR_ACQUIRE, "1"}) + public long non_escaping_volatilePlain() { + VolatilePlain c = new VolatilePlain(l); + return c.f1 + c.f2; + } + + @Test + @IR(failOn = IRNode.MEMBAR_RELEASE) + @IR(failOn = IRNode.MEMBAR_STORESTORE) + @IR(failOn = IRNode.MEMBAR_VOLATILE) + @IR(counts = {IRNode.MEMBAR_ACQUIRE, "2"}) + public long non_escaping_volatileVolatile() { + VolatileVolatile c = new VolatileVolatile(l); + return c.f1 + c.f2; + } + + @Test + @IR(failOn = IRNode.MEMBAR_RELEASE) + @IR(failOn = IRNode.MEMBAR_STORESTORE) + @IR(failOn = IRNode.MEMBAR_VOLATILE) + @IR(counts = {IRNode.MEMBAR_ACQUIRE, "1"}) + public long non_escaping_finalVolatile() { + FinalVolatile c = new FinalVolatile(l); + return c.f1 + c.f2; + } + + @Test + @IR(failOn = IRNode.MEMBAR_RELEASE) + @IR(failOn = IRNode.MEMBAR_STORESTORE) + @IR(failOn = IRNode.MEMBAR_VOLATILE) + @IR(counts = {IRNode.MEMBAR_ACQUIRE, "1"}) + public long non_escaping_volatileFinal() { + VolatileFinal c = new VolatileFinal(l); + return c.f1 + c.f2; + } + + @Setup + Object[] stringBuilderSetup() { + return new Object[] { "foo", "bar", "baz" }; + } + + @Test + @Arguments(setup = "stringBuilderSetup") + @IR(failOn = IRNode.MEMBAR_RELEASE) + @IR(failOn = IRNode.MEMBAR_VOLATILE) + @IR(counts = {IRNode.MEMBAR_STORESTORE, "3"}) + public String stringBuilder(String s1, String s2, String s3) { + return new StringBuilder().append(s1).append(s2).append(s3).toString(); + } +} diff --git a/test/hotspot/jtreg/compiler/c2/irTests/TestIfMinMax.java b/test/hotspot/jtreg/compiler/c2/irTests/TestIfMinMax.java index 80dda306d3b..de0b41e73ea 100644 --- a/test/hotspot/jtreg/compiler/c2/irTests/TestIfMinMax.java +++ b/test/hotspot/jtreg/compiler/c2/irTests/TestIfMinMax.java @@ -30,11 +30,12 @@ /* * @test - * @bug 8324655 + * @bug 8324655 8329797 + * @key randomness * @summary Test that if expressions are properly folded into min/max nodes * @requires os.arch != "riscv64" * @library /test/lib / - * @run main compiler.c2.irTests.TestIfMinMax + * @run driver compiler.c2.irTests.TestIfMinMax */ public class TestIfMinMax { private static final Random RANDOM = Utils.getRandomInstance(); @@ -139,14 +140,62 @@ public long testMaxL2E(long a, long b) { return a <= b ? b : a; } + public class Dummy { + long l; + public Dummy(long l) { this.l = l; } + } + + @Setup + Object[] setupDummyArray() { + Dummy[] arr = new Dummy[512]; + for (int i = 0; i < 512; i++) { + arr[i] = new Dummy(RANDOM.nextLong()); + } + return new Object[] { arr }; + } + + @Test + @Arguments(setup = "setupDummyArray") + @IR(failOn = { IRNode.MAX_L }) + public long testMaxLAndBarrierInLoop(Dummy[] arr) { + long result = 0; + for (int i = 0; i < arr.length; ++i) { + result += Math.max(arr[i].l, 1); + } + return result; + } + + @Test + @Arguments(setup = "setupDummyArray") + @IR(failOn = { IRNode.MIN_L }) + public long testMinLAndBarrierInLoop(Dummy[] arr) { + long result = 0; + for (int i = 0; i < arr.length; ++i) { + result += Math.min(arr[i].l, 1); + } + return result; + } + @Setup static Object[] setupIntArrays() { int[] a = new int[512]; int[] b = new int[512]; - for (int i = 0; i < 512; i++) { + // Fill from 1 to 50 + for (int i = 0; i < 50; i++) { + a[i] = i + 1; + b[i] = 1; + } + + // Fill from -1 to -50 + for (int i = 50; i < 100; i++) { + a[i] = -(i - 49); + b[i] = 1; + } + + for (int i = 100; i < 512; i++) { a[i] = RANDOM.nextInt(); - b[i] = RANDOM.nextInt(); + b[i] = 1; } return new Object[] { a, b }; @@ -157,9 +206,21 @@ static Object[] setupLongArrays() { long[] a = new long[512]; long[] b = new long[512]; - for (int i = 0; i < 512; i++) { + // Fill from 1 to 50 + for (int i = 0; i < 50; i++) { + a[i] = i + 1; + b[i] = 1; + } + + // Fill from -1 to -50 + for (int i = 50; i < 100; i++) { + a[i] = -(i - 49); + b[i] = 1; + } + + for (int i = 100; i < 512; i++) { a[i] = RANDOM.nextLong(); - b[i] = RANDOM.nextLong(); + b[i] = 1; } return new Object[] { a, b }; @@ -173,22 +234,23 @@ static Object[] setupLongArrays() { public Object[] testMaxIntReduction(int[] a, int[] b) { int r = 0; for (int i = 0; i < a.length; i++) { - int aI = a[i] * 2; + int aI = a[i] * b[i]; r = aI > r ? aI : r; } - return new Object[] { a, r }; + return new Object[] { a, b, r }; } @Check(test = "testMaxIntReduction") public void checkTestMaxIntReduction(Object[] vals) { int[] a = (int[]) vals[0]; - int testRet = (int) vals[1]; + int[] b = (int[]) vals[1]; + int testRet = (int) vals[2]; int r = 0; for (int i = 0; i < a.length; i++) { - int aI = a[i] * 2; + int aI = a[i] * b[i]; r = aI > r ? aI : r; } @@ -207,22 +269,23 @@ public Object[] testMinIntReduction(int[] a, int[] b) { int r = 0; for (int i = 0; i < a.length; i++) { - int aI = a[i] * 2; + int aI = a[i] * b[i]; r = aI < r ? aI : r; } - return new Object[] { a, r }; + return new Object[] { a, b, r }; } @Check(test = "testMinIntReduction") public void checkTestMinIntReduction(Object[] vals) { int[] a = (int[]) vals[0]; - int testRet = (int) vals[1]; + int[] b = (int[]) vals[1]; + int testRet = (int) vals[2]; int r = 0; for (int i = 0; i < a.length; i++) { - int aI = a[i] * 2; + int aI = a[i] * b[i]; r = aI < r ? aI : r; } @@ -241,22 +304,23 @@ public Object[] testMaxLongReduction(long[] a, long[] b) { long r = 0; for (int i = 0; i < a.length; i++) { - long aI = a[i] * 2; + long aI = a[i] * b[i]; r = aI > r ? aI : r; } - return new Object[] { a, r }; + return new Object[] { a, b, r }; } @Check(test = "testMaxLongReduction") public void checkTestMaxLongReduction(Object[] vals) { long[] a = (long[]) vals[0]; - long testRet = (long) vals[1]; + long[] b = (long[]) vals[1]; + long testRet = (long) vals[2]; long r = 0; for (int i = 0; i < a.length; i++) { - long aI = a[i] * 2; + long aI = a[i] * b[i]; r = aI > r ? aI : r; } @@ -275,22 +339,23 @@ public Object[] testMinLongReduction(long[] a, long[] b) { long r = 0; for (int i = 0; i < a.length; i++) { - long aI = a[i] * 2; + long aI = a[i] * b[i]; r = aI < r ? aI : r; } - return new Object[] { a, r }; + return new Object[] { a, b, r }; } @Check(test = "testMinLongReduction") public void checkTestMinLongReduction(Object[] vals) { long[] a = (long[]) vals[0]; - long testRet = (long) vals[1]; + long[] b = (long[]) vals[1]; + long testRet = (long) vals[2]; long r = 0; for (int i = 0; i < a.length; i++) { - long aI = a[i] * 2; + long aI = a[i] * b[i]; r = aI < r ? aI : r; } diff --git a/test/hotspot/jtreg/compiler/ccp/TestShiftConvertAndNotification.java b/test/hotspot/jtreg/compiler/ccp/TestShiftConvertAndNotification.java index 7ce44633670..a076a1c2558 100644 --- a/test/hotspot/jtreg/compiler/ccp/TestShiftConvertAndNotification.java +++ b/test/hotspot/jtreg/compiler/ccp/TestShiftConvertAndNotification.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,7 +38,7 @@ * @bug 8313672 * @summary Test CCP notification for value update of AndL through LShiftI and * ConvI2L (no flags). - * @run driver compiler.ccp.TestShiftConvertAndNotification + * @run main compiler.ccp.TestShiftConvertAndNotification * */ diff --git a/test/hotspot/jtreg/compiler/codegen/TestConvertImplicitNullCheck.java b/test/hotspot/jtreg/compiler/codegen/TestConvertImplicitNullCheck.java index 0e0c3545844..c8883b9c04e 100644 --- a/test/hotspot/jtreg/compiler/codegen/TestConvertImplicitNullCheck.java +++ b/test/hotspot/jtreg/compiler/codegen/TestConvertImplicitNullCheck.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/hotspot/jtreg/compiler/intrinsics/math/TestMinMaxOpt.java b/test/hotspot/jtreg/compiler/intrinsics/math/TestMinMaxOpt.java new file mode 100644 index 00000000000..22b5e3e12ab --- /dev/null +++ b/test/hotspot/jtreg/compiler/intrinsics/math/TestMinMaxOpt.java @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2024, Red Hat, Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8323429 + * @summary Test min and max optimizations + * @library /test/lib / + * @run driver compiler.intrinsics.math.TestMinMaxOpt + */ + +package compiler.intrinsics.math; + +import compiler.lib.ir_framework.Argument; +import compiler.lib.ir_framework.Arguments; +import compiler.lib.ir_framework.Check; +import compiler.lib.ir_framework.IR; +import compiler.lib.ir_framework.IRNode; +import compiler.lib.ir_framework.Test; +import compiler.lib.ir_framework.TestFramework; + +public class TestMinMaxOpt { + public static void main(String[] args) { + TestFramework.run(); + } + + @Test + @Arguments(values = {Argument.NUMBER_42}) + @IR(failOn = {IRNode.MIN_I}) + private static int testIntMin(int v) { + return Math.min(v, v); + } + + @Check(test = "testIntMin") + public static void checkTestIntMin(int result) { + if (result != 42) { + throw new RuntimeException("Incorrect result: " + result); + } + } + + @Test + @Arguments(values = {Argument.NUMBER_42}) + @IR(failOn = {IRNode.MAX_I}) + private static int testIntMax(int v) { + return Math.max(v, v); + } + + @Check(test = "testIntMax") + public static void checkTestIntMax(int result) { + if (result != 42) { + throw new RuntimeException("Incorrect result: " + result); + } + } + + @Test + @Arguments(values = {Argument.NUMBER_42}) + @IR(failOn = {IRNode.MIN_L}) + private static long testLongMin(long v) { + return Math.min(v, v); + } + + @Check(test = "testLongMin") + public static void checkTestLongMin(long result) { + if (result != 42) { + throw new RuntimeException("Incorrect result: " + result); + } + } + + @Test + @Arguments(values = {Argument.NUMBER_42}) + @IR(failOn = {IRNode.MAX_L}) + private static long testLongMax(long v) { + return Math.max(v, v); + } + + @Check(test = "testLongMax") + public static void checkTestLongMax(long result) { + if (result != 42) { + throw new RuntimeException("Incorrect result: " + result); + } + } + + @Test + @Arguments(values = {Argument.NUMBER_42}) + @IR(failOn = {IRNode.MIN_F}) + private static float testFloatMin(float v) { + return Math.min(v, v); + } + + @Check(test = "testFloatMin") + public static void checkTestFloatMin(float result) { + if (result != 42) { + throw new RuntimeException("Incorrect result: " + result); + } + } + + @Test + @Arguments(values = {Argument.NUMBER_42}) + @IR(failOn = {IRNode.MAX_F}) + private static float testFloatMax(float v) { + return Math.max(v, v); + } + + @Check(test = "testFloatMax") + public static void checkTestFloatMax(float result) { + if (result != 42) { + throw new RuntimeException("Incorrect result: " + result); + } + } + + @Test + @Arguments(values = {Argument.NUMBER_42}) + @IR(failOn = {IRNode.MIN_D}) + private static double testDoubleMin(double v) { + return Math.min(v, v); + } + + @Check(test = "testDoubleMin") + public static void checkTestDoubleMin(double result) { + if (result != 42) { + throw new RuntimeException("Incorrect result: " + result); + } + } + + @Test + @Arguments(values = {Argument.NUMBER_42}) + @IR(failOn = {IRNode.MAX_D}) + private static double testDoubleMax(double v) { + return Math.max(v, v); + } + + @Check(test = "testDoubleMax") + public static void checkTestDoubleMax(double result) { + if (result != 42) { + throw new RuntimeException("Incorrect result: " + result); + } + } +} diff --git a/test/hotspot/jtreg/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java b/test/hotspot/jtreg/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java index 7310f37f8ab..6e1a8221a73 100644 --- a/test/hotspot/jtreg/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java +++ b/test/hotspot/jtreg/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java @@ -144,8 +144,8 @@ public static HotSpotResolvedObjectType resolveFieldInPool( } public static Object lookupAppendixInPool( - ConstantPool constantPool, int cpi) { - return CTVM.lookupAppendixInPool((HotSpotConstantPool) constantPool, cpi); + ConstantPool constantPool, int cpi, int opcode) { + return CTVM.lookupAppendixInPool((HotSpotConstantPool) constantPool, cpi, opcode); } public static int installCode(TargetDescription target, diff --git a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java index bbbdf79fdaf..2a222c0a0ec 100644 --- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java +++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java @@ -80,7 +80,7 @@ public int getCPCacheIndex(int cpi) { if (constantPoolSS.getTagAt(cpi).equals(Tag.INVOKEDYNAMIC)) { for (int indy_index = 0; indy_index < WB.getIndyInfoLength(this.klass); indy_index++) { if (WB.getIndyCPIndex(this.klass, indy_index) == cpi) { - return ~indy_index; + return indy_index; } } } diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java index 9a77d9cfde3..da95d2e88bf 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java @@ -824,7 +824,12 @@ public class IRNode { public static final String MAX = PREFIX + "MAX" + POSTFIX; static { - beforeMatchingNameRegex(MAX, "Max(I|L)"); + beforeMatchingNameRegex(MAX, "Max(I|L|F|D)"); + } + + public static final String MAX_D = PREFIX + "MAX_D" + POSTFIX; + static { + beforeMatchingNameRegex(MAX_D, "MaxD"); } public static final String MAX_D_REDUCTION_REG = PREFIX + "MAX_D_REDUCTION_REG" + POSTFIX; @@ -837,6 +842,11 @@ public class IRNode { machOnlyNameRegex(MAX_D_REG, "maxD_reg"); } + public static final String MAX_F = PREFIX + "MAX_F" + POSTFIX; + static { + beforeMatchingNameRegex(MAX_F, "MaxF"); + } + public static final String MAX_F_REDUCTION_REG = PREFIX + "MAX_F_REDUCTION_REG" + POSTFIX; static { machOnlyNameRegex(MAX_F_REDUCTION_REG, "maxF_reduction_reg"); @@ -882,16 +892,36 @@ public class IRNode { beforeMatchingNameRegex(MEMBAR, "MemBar"); } + public static final String MEMBAR_ACQUIRE = PREFIX + "MEMBAR_ACQUIRE" + POSTFIX; + static { + beforeMatchingNameRegex(MEMBAR_ACQUIRE, "MemBarAcquire"); + } + + public static final String MEMBAR_RELEASE = PREFIX + "MEMBAR_RELEASE" + POSTFIX; + static { + beforeMatchingNameRegex(MEMBAR_RELEASE, "MemBarRelease"); + } + public static final String MEMBAR_STORESTORE = PREFIX + "MEMBAR_STORESTORE" + POSTFIX; static { beforeMatchingNameRegex(MEMBAR_STORESTORE, "MemBarStoreStore"); } + public static final String MEMBAR_VOLATILE = PREFIX + "MEMBAR_VOLATILE" + POSTFIX; + static { + beforeMatchingNameRegex(MEMBAR_VOLATILE, "MemBarVolatile"); + } + public static final String MIN = PREFIX + "MIN" + POSTFIX; static { beforeMatchingNameRegex(MIN, "Min(I|L)"); } + public static final String MIN_D = PREFIX + "MIN_D" + POSTFIX; + static { + beforeMatchingNameRegex(MIN_D, "MinD"); + } + public static final String MIN_D_REDUCTION_REG = PREFIX + "MIN_D_REDUCTION_REG" + POSTFIX; static { machOnlyNameRegex(MIN_D_REDUCTION_REG, "minD_reduction_reg"); @@ -902,6 +932,11 @@ public class IRNode { machOnlyNameRegex(MIN_D_REG, "minD_reg"); } + public static final String MIN_F = PREFIX + "MIN_F" + POSTFIX; + static { + beforeMatchingNameRegex(MIN_F, "MinF"); + } + public static final String MIN_F_REDUCTION_REG = PREFIX + "MIN_F_REDUCTION_REG" + POSTFIX; static { machOnlyNameRegex(MIN_F_REDUCTION_REG, "minF_reduction_reg"); @@ -2081,6 +2116,12 @@ public class IRNode { machOnly(Z_STORE_P_WITH_BARRIER_FLAG, regex); } + public static final String Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG" + POSTFIX; + static { + String regex = START + "zCompareAndSwapP" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; + machOnly(Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, regex); + } + public static final String Z_GET_AND_SET_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_GET_AND_SET_P_WITH_BARRIER_FLAG" + POSTFIX; static { String regex = START + "(zXChgP)|(zGetAndSetP\\S*)" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END; diff --git a/test/hotspot/jtreg/compiler/loopopts/TestPartialPeelingAtSingleInputRegion.java b/test/hotspot/jtreg/compiler/loopopts/TestPartialPeelingAtSingleInputRegion.java index 2b2231a89f3..9159c3627ec 100644 --- a/test/hotspot/jtreg/compiler/loopopts/TestPartialPeelingAtSingleInputRegion.java +++ b/test/hotspot/jtreg/compiler/loopopts/TestPartialPeelingAtSingleInputRegion.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestMemorySegmentMainLoopAlignment.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestMemorySegmentMainLoopAlignment.java new file mode 100644 index 00000000000..ade91c680fc --- /dev/null +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestMemorySegmentMainLoopAlignment.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8330819 + * @summary Case where VPointer finds an "adr" CastX2P, which contains a CastLL, + * that has a ctrl after the pre-loop. This value cannot be used in the + * pre-loop limit for main-loop adjustment. + * @modules java.base/jdk.internal.misc + * @modules java.base/jdk.internal.util + * @run main/othervm -Xbatch compiler.loopopts.superword.TestMemorySegmentMainLoopAlignment + */ + +package compiler.loopopts.superword; + +import java.lang.foreign.*; +import jdk.internal.misc.Unsafe; +import jdk.internal.util.Preconditions; + +public class TestMemorySegmentMainLoopAlignment { + static final ValueLayout.OfInt ELEMENT_LAYOUT = ValueLayout.JAVA_INT.withByteAlignment(1); + static final Unsafe UNSAFE = Unsafe.getUnsafe(); + static long RANGE = 6400; + + // Type definition for the lambda + interface MSOp { + int apply(MemorySegment memory, long offset, int i); + } + + // Type definition for the lambda + interface MemoryUnsafeOp { + int apply(long base, long offset, int i); + } + + public static void main(String[] args) { + // Allocate some raw memory: + MemorySegment ms = Arena.ofAuto().allocate(6400, Integer.SIZE); + for (int i = 0; i < 10_000; i++) { + test1(ms, 0, TestMemorySegmentMainLoopAlignment::memorySegmentGet); + } + // Allocate some raw memory: + long base = UNSAFE.allocateMemory(6400); + for (int i = 0; i < 10_000; i++) { + test2(base, 0, TestMemorySegmentMainLoopAlignment::memoryUnsafeGet); + } + } + + // Somehow, it is necessary to pass this as a lambda + // the checkIndex inside the "get" method produces the CastLL, which eventually pins the index + // between the pre and main loop. + static int memorySegmentGet(MemorySegment ms, long o, int i) { + return ms.get(ELEMENT_LAYOUT, o + i * 4L); + } + + static int test1(MemorySegment a, long offset, MSOp f) { + // Constant size array size allows a known range for the array access/loop iv i. + int size = 16; + int[] res = new int[size]; + int sum = 0; + for (int i = 0; i < size; i++) { + // With inlining, this eventually becomes: + // sum += LoadI(MemorySegment / unsafe) + LoadI(array) + // and we attempt vectorization. + sum += f.apply(a, offset, i) + res[i]; + } + return sum; + } + + // Somehow, it is necessary to pass this as a lambda + static int memoryUnsafeGet(long base, long o, int i) { + long index = o + i * 4L; + // checkIndex -> CastLL: index >= 0. + // Together with the info about i (known range for phi), this CastLL floats up to + // the offset. Then we get adr = CastX2P(base + CastLL(offset)), where the CastLL + // is pinned between the pre and main loop. + Preconditions.checkIndex(index, RANGE, null); + return UNSAFE.getInt(base + index); + } + + static int test2(long base, long offset, MemoryUnsafeOp f) { + // Constant size array size allows a known range for the array access/loop iv i. + int size = 16; + int[] res = new int[size]; + int sum = 0; + for (int i = 0; i < size; i++) { + // With inlining, this eventually becomes: + // sum += LoadI(unsafe) + LoadI(array) + // and we attempt vectorization. + sum += f.apply(base, offset, i) + res[i]; + } + return sum; + } +} diff --git a/test/hotspot/jtreg/compiler/print/CompileCommandMemLimit.java b/test/hotspot/jtreg/compiler/print/CompileCommandMemLimit.java index d9f9aa3f7d4..c3ac0ae9c81 100644 --- a/test/hotspot/jtreg/compiler/print/CompileCommandMemLimit.java +++ b/test/hotspot/jtreg/compiler/print/CompileCommandMemLimit.java @@ -58,6 +58,7 @@ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import java.io.File; import java.util.ArrayList; import java.util.List; @@ -123,6 +124,20 @@ private static void test(String include, String exclude) throws Exception { oa.shouldMatch("# *Internal Error.*"); oa.shouldMatch("# *fatal error: " + ct + " *" + expectedNameIncl + ".*: Hit MemLimit .*limit: 4096.*"); oa.shouldNotMatch(".*" + expectedNameExcl + ".*"); + // Make sure we get a non-zero-sized replay file (JDK-8331314) + oa.shouldContain("# Compiler replay data is saved as:"); + String replayfile = oa.firstMatch("# (\\S+replay_pid\\d+\\.log)", 1); + if (replayfile == null) { + throw new RuntimeException("Found no replay file in output"); + } + File f = new File(replayfile); + if (!f.exists()) { + throw new RuntimeException("Replayfile " + replayfile + " not found"); + } + if (f.length() == 0) { + throw new RuntimeException("Replayfile " + replayfile + " has size 0"); + } + } else { // Should see trace output when methods are compiled oa.shouldHaveExitValue(0) diff --git a/test/hotspot/jtreg/compiler/vectorapi/TestBiMorphicMismatchedMemSegment.java b/test/hotspot/jtreg/compiler/vectorapi/TestBiMorphicMismatchedMemSegment.java new file mode 100644 index 00000000000..efe1d377454 --- /dev/null +++ b/test/hotspot/jtreg/compiler/vectorapi/TestBiMorphicMismatchedMemSegment.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package compiler.vectorapi; + +/* + * @test + * @bug 8329555 + * @modules jdk.incubator.vector + * + * @run main/othervm -Xbatch -XX:+TieredCompilation compiler.vectorapi.TestBiMorphicMismatchedMemSegment + */ + + +import jdk.incubator.vector.ByteVector; + +import java.lang.foreign.MemorySegment; +import java.nio.ByteOrder; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.atomic.AtomicLong; +import java.util.stream.IntStream; + +public class TestBiMorphicMismatchedMemSegment { + public static void main(String[] args) { + AtomicLong aLong = new AtomicLong(); + + IntStream.range(0, 10000).forEach(j -> { + byte[] bytes = new byte[64]; + ThreadLocalRandom.current().nextBytes(bytes); + var byteSegment = MemorySegment.ofArray(bytes); + var byteFragment = ByteVector.SPECIES_PREFERRED.fromMemorySegment(byteSegment, 0, ByteOrder.LITTLE_ENDIAN); + float[] floats = new float[128]; + byte[] targetBytes = new byte[512]; + var floatSegment = MemorySegment.ofArray(floats); + var targetByteSegment = MemorySegment.ofArray(targetBytes); + byteFragment.intoMemorySegment(floatSegment, ThreadLocalRandom.current().nextInt(0, 448), ByteOrder.LITTLE_ENDIAN); + byteFragment.intoMemorySegment(targetByteSegment, ThreadLocalRandom.current().nextInt(0, 448), ByteOrder.LITTLE_ENDIAN); + var l = 0; + for (int i = 0; i < floats.length; i++) { + l += (int) floats[i]; + } + aLong.addAndGet(l); + }); + + System.out.println(aLong.get()); + } +} diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/BasicDoubleOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/BasicDoubleOpTest.java index a3fcdbaa9b0..c1bef52a8b1 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/BasicDoubleOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/BasicDoubleOpTest.java @@ -240,7 +240,7 @@ public double[] vectorMax() { @Test @IR(applyIfCPUFeatureOr = {"asimd", "true", "avx", "true"}, - counts = {IRNode.MAX_VD, ">0"}) + counts = {IRNode.MAX_VD, "0"}) public double[] vectorMax_8322090() { double[] res = new double[SIZE]; for (int i = 0; i < SIZE; i++) { diff --git a/test/hotspot/jtreg/gc/g1/TestVerificationInConcurrentCycle.java b/test/hotspot/jtreg/gc/g1/TestVerificationInConcurrentCycle.java index 044636c7c5f..7618e8c1708 100644 --- a/test/hotspot/jtreg/gc/g1/TestVerificationInConcurrentCycle.java +++ b/test/hotspot/jtreg/gc/g1/TestVerificationInConcurrentCycle.java @@ -36,7 +36,6 @@ * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+VerifyBeforeGC -XX:+VerifyDuringGC -XX:+VerifyAfterGC * -XX:+UseG1GC -XX:+G1VerifyHeapRegionCodeRoots - * -XX:+VerifyRememberedSets * -XX:+G1VerifyBitmaps * gc.g1.TestVerificationInConcurrentCycle */ @@ -55,7 +54,6 @@ * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+VerifyBeforeGC -XX:+VerifyDuringGC -XX:+VerifyAfterGC * -XX:+UseG1GC -XX:+G1VerifyHeapRegionCodeRoots - * -XX:+VerifyRememberedSets * gc.g1.TestVerificationInConcurrentCycle */ diff --git a/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java b/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java index 8004d34f5ce..f799c0bac21 100644 --- a/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java +++ b/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java @@ -49,7 +49,7 @@ public class TestLinkToNativeRBP { final static Linker abi = Linker.nativeLinker(); static final SymbolLookup lookup = SymbolLookup.loaderLookup(); - final static MethodHandle foo = abi.downcallHandle(lookup.find("foo").get(), + final static MethodHandle foo = abi.downcallHandle(lookup.findOrThrow("foo"), FunctionDescriptor.of(ValueLayout.JAVA_INT)); static int foo() throws Throwable { diff --git a/test/hotspot/jtreg/gc/z/TestRegistersPushPopAtZGCLoadBarrierStub.java b/test/hotspot/jtreg/gc/z/TestRegistersPushPopAtZGCLoadBarrierStub.java new file mode 100644 index 00000000000..71aa634c761 --- /dev/null +++ b/test/hotspot/jtreg/gc/z/TestRegistersPushPopAtZGCLoadBarrierStub.java @@ -0,0 +1,380 @@ +/* + * Copyright (c) 2024, Alibaba Group Holding Limited. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package gc.z; + +/** + * @test TestRegistersPushPopAtZGCLoadBarrierStub + * @bug 8326541 + * @summary Test to verify that registers are saved and restored correctly based on + the actual register usage length on aarch64 when entering load barrier stub. + * @library /test/lib / + * @modules jdk.incubator.vector + * + * @requires vm.gc.ZGenerational & vm.debug + * @requires os.arch=="aarch64" + * + * @run driver gc.z.TestRegistersPushPopAtZGCLoadBarrierStub + */ + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.random.RandomGenerator; +import java.util.random.RandomGeneratorFactory; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import jdk.incubator.vector.FloatVector; +import jdk.incubator.vector.Vector; +import jdk.incubator.vector.VectorShape; +import jdk.incubator.vector.VectorSpecies; + +import jdk.test.lib.Asserts; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +class Inner {} + +class InnerFloat extends Inner { + float data; + public InnerFloat(float f) { + data = f; + } +} + +class InnerDouble extends Inner { + double data; + public InnerDouble(double f) { + data = f; + } +} + +class Outer { + volatile Inner field; + public Outer(Inner i) { + field = i; + } +} + +public class TestRegistersPushPopAtZGCLoadBarrierStub { + + class Launcher { + private final static int NUM = 1024; + private final static int ITERATIONS = 20_000; + private final static RandomGenerator RANDOM = RandomGeneratorFactory.getDefault().create(0); + private final static Map TESTS; + + private static float[] f_array; + private static Outer f_outer; + private static Outer d_outer; + + static { + f_array = new float[NUM]; + for (int i = 0; i < NUM; i++) { + f_array[i] = RANDOM.nextFloat(); + } + + InnerFloat f_inner = new InnerFloat(RANDOM.nextFloat()); + InnerDouble d_inner = new InnerDouble(RANDOM.nextDouble()); + f_outer = new Outer(f_inner); + d_outer = new Outer(d_inner); + + TESTS = new LinkedHashMap<>(); + TESTS.put("test_one_float_push_pop_at_load_barrier", Launcher::test_one_float); + TESTS.put("test_two_floats_push_pop_at_load_barrier", Launcher::test_two_floats); + TESTS.put("test_three_floats_push_pop_at_load_barrier", Launcher::test_three_floats); + TESTS.put("test_one_double_push_pop_at_load_barrier", Launcher::test_one_double); + TESTS.put("test_two_doubles_push_pop_at_load_barrier", Launcher::test_two_doubles); + TESTS.put("test_three_doubles_push_pop_at_load_barrier", Launcher::test_three_doubles); + TESTS.put("test_one_vector_128_push_pop_at_load_barrier", Launcher::test_one_vector_128); + TESTS.put("test_two_vectors_128_push_pop_at_load_barrier", Launcher::test_two_vectors_128); + TESTS.put("test_three_vectors_128_push_pop_at_load_barrier", Launcher::test_three_vectors_128); + TESTS.put("test_vector_max_push_pop_at_load_barrier", Launcher::test_vector_max); + TESTS.put("test_float_and_vector_push_pop_at_load_barrier", Launcher::test_float_and_vector); + } + + static float test_one_float_push_pop_at_load_barrier(Outer outer, float f) { + Inner inner = outer.field; + return f + ((InnerFloat)inner).data; + } + + static float test_two_floats_push_pop_at_load_barrier(Outer outer, float f1, float f2) { + Inner inner = outer.field; + return f1 + f2 + ((InnerFloat)inner).data; + } + + static float test_three_floats_push_pop_at_load_barrier(Outer outer, float f1, float f2, float f3) { + Inner inner = outer.field; + return f1 + f2 + f3 + ((InnerFloat)inner).data; + } + + static double test_one_double_push_pop_at_load_barrier(Outer outer, double d) { + Inner inner = outer.field; + return d + ((InnerDouble)inner).data; + } + + static double test_two_doubles_push_pop_at_load_barrier(Outer outer, double d1, double d2) { + Inner inner = outer.field; + return d1 + d2 + ((InnerDouble)inner).data; + } + + static double test_three_doubles_push_pop_at_load_barrier(Outer outer, double d1, double d2, double d3) { + Inner inner = outer.field; + return d1 + d2 + d3 + ((InnerDouble)inner).data; + } + + static void test_one_vector_128_push_pop_at_load_barrier(float[] b, Outer outer) { + VectorSpecies float_species = FloatVector.SPECIES_128; + + FloatVector av = FloatVector.zero(float_species); + for (int i = 0; i < b.length; i += float_species.length()) { + Inner inner = outer.field; + FloatVector bv = FloatVector.fromArray(float_species, b, i); + float value = ((InnerFloat)inner).data; + av = av.add(bv).add(value); + } + } + + static void test_two_vectors_128_push_pop_at_load_barrier(float[] b, Outer outer) { + VectorSpecies float_species = FloatVector.SPECIES_128; + + FloatVector av1 = FloatVector.zero(float_species); + FloatVector av2 = FloatVector.zero(float_species); + for (int i = 0; i < b.length; i += float_species.length()) { + Inner inner = outer.field; + FloatVector bv = FloatVector.fromArray(float_species, b, i); + float value = ((InnerFloat)inner).data; + av1 = av1.add(bv).add(value); + av2 = av2.add(av1); + } + } + + static void test_three_vectors_128_push_pop_at_load_barrier(float[] b, Outer outer) { + VectorSpecies float_species = FloatVector.SPECIES_128; + + FloatVector av1 = FloatVector.zero(float_species); + FloatVector av2 = FloatVector.zero(float_species); + FloatVector av3 = FloatVector.zero(float_species); + for (int i = 0; i < b.length; i += float_species.length()) { + Inner inner = outer.field; + FloatVector bv = FloatVector.fromArray(float_species, b, i); + float value = ((InnerFloat)inner).data; + av1 = av1.add(bv).add(value); + av2 = av2.add(av1); + av3 = av3.add(av2); + } + } + + static void test_vector_max_push_pop_at_load_barrier(float[] b, Outer outer) { + VectorSpecies float_species = FloatVector.SPECIES_MAX; + + FloatVector av = FloatVector.zero(float_species); + for (int i = 0; i < b.length; i += float_species.length()) { + Inner inner = outer.field; + FloatVector bv = FloatVector.fromArray(float_species, b, i); + float value = ((InnerFloat)inner).data; + av = av.add(bv).add(value); + } + } + + static void test_float_and_vector_push_pop_at_load_barrier(float[] b, Outer outer, float f) { + VectorSpecies float_species = FloatVector.SPECIES_MAX; + + FloatVector av = FloatVector.zero(float_species); + for (int i = 0; i < b.length; i += float_species.length()) { + Inner inner = outer.field; + FloatVector bv = FloatVector.fromArray(float_species, b, i); + float value = ((InnerFloat)inner).data + f; + av = av.add(bv).add(value); + } + } + + static void test_one_float() { + for (int i = 0; i < ITERATIONS; i++) { + test_one_float_push_pop_at_load_barrier(f_outer, RANDOM.nextFloat()); + } + } + + static void test_two_floats() { + for (int i = 0; i < ITERATIONS; i++) { + test_two_floats_push_pop_at_load_barrier(f_outer, RANDOM.nextFloat(), RANDOM.nextFloat()); + } + } + + static void test_three_floats() { + for (int i = 0; i < ITERATIONS; i++) { + test_three_floats_push_pop_at_load_barrier(f_outer, RANDOM.nextFloat(), RANDOM.nextFloat(), RANDOM.nextFloat()); + } + } + + static void test_one_double() { + for (int i = 0; i < ITERATIONS; i++) { + test_one_double_push_pop_at_load_barrier(d_outer, RANDOM.nextDouble()); + } + } + + static void test_two_doubles() { + for (int i = 0; i < ITERATIONS; i++) { + test_two_doubles_push_pop_at_load_barrier(d_outer, RANDOM.nextDouble(), RANDOM.nextDouble()); + } + } + + static void test_three_doubles() { + for (int i = 0; i < ITERATIONS; i++) { + test_three_doubles_push_pop_at_load_barrier(d_outer, RANDOM.nextDouble(), RANDOM.nextDouble(), RANDOM.nextDouble()); + } + } + + static void test_one_vector_128() { + for (int i = 0; i < ITERATIONS; i++) { + test_one_vector_128_push_pop_at_load_barrier(f_array, f_outer); + } + } + + static void test_two_vectors_128() { + for (int i = 0; i < ITERATIONS; i++) { + test_two_vectors_128_push_pop_at_load_barrier(f_array, f_outer); + } + } + + static void test_three_vectors_128() { + for (int i = 0; i < ITERATIONS; i++) { + test_three_vectors_128_push_pop_at_load_barrier(f_array, f_outer); + } + } + + static void test_vector_max() { + for (int i = 0; i < ITERATIONS; i++) { + test_vector_max_push_pop_at_load_barrier(f_array, f_outer); + } + } + + static void test_float_and_vector() { + for (int i = 0; i < ITERATIONS; i++) { + test_float_and_vector_push_pop_at_load_barrier(f_array, f_outer, RANDOM.nextFloat()); + } + } + + public static void main(String args[]) { + Runnable r = TESTS.get(args[0]); + r.run(); + } + } + + static boolean containOnlyOneOccuranceOfKeyword(String text, String keyword) { + int firstIndex = text.indexOf(keyword); + int lastIndex = text.lastIndexOf(keyword); + return firstIndex != -1 && firstIndex == lastIndex; + } + + // Check that registers are pushed and poped with correct register type and number + static void checkPushPopRegNumberAndType(String stdout, String keyword, String expected_freg_type, + int expected_number_of_fregs) throws Exception { + String expected = keyword + expected_number_of_fregs + " " + expected_freg_type + " registers"; + + String regex = keyword + "(\\d+) " + expected_freg_type + " registers"; + Pattern p = Pattern.compile(regex); + Matcher m = p.matcher(stdout); + + if (m.find()) { + String found = m.group(); + Asserts.assertEquals(found, expected, "found '" + found + "' but should print '" + expected + "'"); + } else { + throw new RuntimeException("'" + regex + "' is not found in stdout"); + } + + if (m.find()) { + throw new RuntimeException("Stdout is expected to contain only one occurance of '" + regex + + "'. Found another occurance: '" + m.group() + "'"); + } + } + + static String launchJavaTestProcess(String test_name) throws Exception { + ArrayList command = new ArrayList(); + command.add("-Xbatch"); + command.add("-XX:LoopUnrollLimit=0"); + command.add("-XX:-UseOnStackReplacement"); + command.add("-XX:-TieredCompilation"); + command.add("-XX:+UseZGC"); + command.add("-XX:+ZGenerational"); + command.add("--add-modules=jdk.incubator.vector"); + command.add("-XX:CompileCommand=print," + Launcher.class.getName() + "::" + test_name); + command.add(Launcher.class.getName()); + command.add(test_name); + + ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(command); + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + output.shouldHaveExitValue(0); + return output.getStdout(); + } + + static void run_test(String test_name, String expected_freg_type, int expected_number_of_fregs, + String expected_vector_reg_type, int expected_number_of_vector_regs) throws Exception { + String stdout = launchJavaTestProcess(test_name); + + String keyword = "push_fp: "; + checkPushPopRegNumberAndType(stdout, keyword, expected_freg_type, expected_number_of_fregs); + checkPushPopRegNumberAndType(stdout, keyword, expected_vector_reg_type, expected_number_of_vector_regs); + + keyword = "pop_fp: "; + checkPushPopRegNumberAndType(stdout, keyword, expected_freg_type, expected_number_of_fregs); + checkPushPopRegNumberAndType(stdout, keyword, expected_vector_reg_type, expected_number_of_vector_regs); + } + + static void run_test(String test_name, String expected_freg_type, int expected_number_of_fregs) throws Exception { + String stdout = launchJavaTestProcess(test_name); + + String keyword = "push_fp: "; + if (!containOnlyOneOccuranceOfKeyword(stdout, keyword)) { + throw new RuntimeException("Stdout is expected to contain only one occurance of keyword: " + "'" + keyword + "'"); + } + checkPushPopRegNumberAndType(stdout, keyword, expected_freg_type, expected_number_of_fregs); + + keyword = "pop_fp: "; + if (!containOnlyOneOccuranceOfKeyword(stdout, keyword)) { + throw new RuntimeException("Stdout is expected to contain only one occurance of keyword: " + "'" + keyword + "'"); + } + checkPushPopRegNumberAndType(stdout, keyword, expected_freg_type, expected_number_of_fregs); + } + + public static void main(String[] args) throws Exception { + String vector_max_reg_type; + if (VectorShape.S_Max_BIT.vectorBitSize() > 128) { + vector_max_reg_type = "SVE"; + } else { + vector_max_reg_type = "Neon"; + } + run_test("test_one_float_push_pop_at_load_barrier", "fp", 1); + run_test("test_two_floats_push_pop_at_load_barrier", "fp", 2); + run_test("test_three_floats_push_pop_at_load_barrier", "fp", 3); + run_test("test_one_double_push_pop_at_load_barrier", "fp", 1); + run_test("test_two_doubles_push_pop_at_load_barrier", "fp", 2); + run_test("test_three_doubles_push_pop_at_load_barrier", "fp", 3); + run_test("test_one_vector_128_push_pop_at_load_barrier", "Neon", 1); + run_test("test_two_vectors_128_push_pop_at_load_barrier", "Neon", 2); + run_test("test_three_vectors_128_push_pop_at_load_barrier", "Neon", 3); + run_test("test_vector_max_push_pop_at_load_barrier", vector_max_reg_type, 1); + run_test("test_float_and_vector_push_pop_at_load_barrier", "fp", 1, vector_max_reg_type, 1); + } +} + diff --git a/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java b/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java index 7dc49a05186..fa4ff56b691 100644 --- a/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java +++ b/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java @@ -56,6 +56,8 @@ public class VMDeprecatedOptions { ArrayList deprecated = new ArrayList( Arrays.asList(new String[][] { // deprecated non-alias flags: + {"DontYieldALot", "false"}, + {"UseNotificationThread", "true"}, {"PreserveAllAnnotations", "true"}, {"AllowRedefinitionToAddDeleteMethods", "true"}, {"UseEmptySlotsInSupers", "true"}, diff --git a/test/hotspot/jtreg/runtime/locking/TestRecursiveMonitorChurn.java b/test/hotspot/jtreg/runtime/locking/TestRecursiveMonitorChurn.java new file mode 100644 index 00000000000..47cb5613171 --- /dev/null +++ b/test/hotspot/jtreg/runtime/locking/TestRecursiveMonitorChurn.java @@ -0,0 +1,95 @@ +/* + * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +import java.io.IOException; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/* + * @test + * @summary Tests that recursive locking doesn't cause excessive native memory usage + * @library /test/lib + * @run driver TestRecursiveMonitorChurn + */ +public class TestRecursiveMonitorChurn { + static class Monitor { + public static volatile int i, j; + synchronized void doSomething() { + i++; + doSomethingElse(); + } + synchronized void doSomethingElse() { + j++; + } + } + + public static volatile Monitor monitor; + public static void main(String[] args) throws IOException { + if (args.length == 1 && args[0].equals("test")) { + // The actual test, in a forked JVM. + for (int i = 0; i < 100000; i++) { + monitor = new Monitor(); + monitor.doSomething(); + } + System.out.println("i + j = " + (Monitor.i + Monitor.j)); + } else { + ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder( + "-XX:+UnlockDiagnosticVMOptions", + "-Xmx100M", "-XX:AsyncDeflationInterval=0", "-XX:GuaranteedAsyncDeflationInterval=0", + "-XX:NativeMemoryTracking=summary", "-XX:+PrintNMTStatistics", + "TestRecursiveMonitorChurn", + "test"); + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + output.reportDiagnosticSummary(); + + output.shouldHaveExitValue(0); + + // We want to see, in the final NMT printout, a committed object monitor size that is reasonably low. + // Like this: + // - Object Monitors (reserved=208, committed=208) + // (malloc=208 #1) (at peak) + // + // Without recursive locking support, this would look more like this: + // - Object Monitors (reserved=20800624, committed=20800624) + // (malloc=20800624 #100003) (at peak) + + Pattern pat = Pattern.compile("- *Object Monitors.*reserved=(\\d+), committed=(\\d+).*"); + for (String line : output.asLines()) { + Matcher m = pat.matcher(line); + if (m.matches()) { + long reserved = Long.parseLong(m.group(1)); + long committed = Long.parseLong(m.group(2)); + System.out.println(">>>>> " + line + ": " + reserved + " - " + committed); + if (committed > 1000) { + throw new RuntimeException("Allocated too many monitors"); + } + return; + } + } + throw new RuntimeException("Did not find expected NMT output"); + } + } +} diff --git a/test/hotspot/jtreg/runtime/os/TestTransparentHugePageUsage.java b/test/hotspot/jtreg/runtime/os/TestTransparentHugePageUsage.java deleted file mode 100644 index 2b054fd6f4b..00000000000 --- a/test/hotspot/jtreg/runtime/os/TestTransparentHugePageUsage.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) Ampere Computing and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/** - * @test TestTransparentHugePageUsage - * @bug 8315923 - * @library /test/lib - * @requires vm.gc.Serial & os.family == "linux" & os.maxMemory > 2G - * @summary Check that a pretouched java heap appears to use THPs by checking - * AnonHugePages in smaps - * @comment Use SerialGC to increase the time window for pretouching - * @run driver runtime.os.TestTransparentHugePageUsage - */ - -package runtime.os; - -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.InputStreamReader; -import java.util.AbstractMap.SimpleEntry; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Optional; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import jdk.test.lib.process.ProcessTools; - -public class TestTransparentHugePageUsage { - private static final String[] fixedCmdLine = { - "-XX:+UseTransparentHugePages", "-XX:+AlwaysPreTouch", - "-Xlog:startuptime,pagesize,gc+heap=debug", - "-XX:+UseSerialGC", "-Xms1G", "-Xmx1G", - }; - - public static void main(String[] args) throws Exception { - ArrayList cmdLine = new ArrayList<>(Arrays.asList(fixedCmdLine)); - cmdLine.add("runtime.os.TestTransparentHugePageUsage$CatSmaps"); - ProcessBuilder builder = ProcessTools.createTestJavaProcessBuilder(cmdLine); - checkUsage(new BufferedReader(new InputStreamReader(builder.start().getInputStream()))); - } - - private static void checkUsage(BufferedReader reader) throws Exception { - final Pattern useThp = Pattern.compile(".*\\[info\\]\\[pagesize\\].+UseTransparentHugePages=1.*"); - // Ensure THP is not disabled by OS. - if (reader.lines().filter(line -> useThp.matcher(line).matches()).findFirst().isPresent()) { - final Pattern heapAddr = Pattern.compile(".*\\sHeap:\\s.+base=0x0*(\\p{XDigit}+).*"); - final Optional addr = reader.lines() - .map(line -> new SimpleEntry(line, heapAddr.matcher(line))) - .filter(e -> e.getValue().matches()) - .findFirst() - .map(e -> Long.valueOf(e.getKey().substring(e.getValue().start(1), e.getValue().end(1)), 16)); - if (!addr.isPresent()) throw new RuntimeException("Heap base was not found in smaps."); - // Match the start of a mapping, for example: - // 200000000-800000000 rw-p 00000000 00:00 0 - final Pattern mapping = Pattern.compile("^(\\p{XDigit}+)-\\p{XDigit}+.*"); - reader.lines() - .filter(line -> { - Matcher matcher = mapping.matcher(line); - if (matcher.matches()) { - Long mappingAddr = Long.valueOf(line.substring(matcher.start(1), matcher.end(1)), 16); - if (mappingAddr.equals(addr.get())) return true; - } - return false; - }) - .findFirst(); - final Pattern thpUsage = Pattern.compile("^AnonHugePages:\\s+(\\d+)\\skB"); - final Optional usage = reader.lines() - .map(line -> new SimpleEntry(line, thpUsage.matcher(line))) - .filter(e -> e.getValue().matches()) - .findFirst() - .map(e -> Long.valueOf(e.getKey().substring(e.getValue().start(1), e.getValue().end(1)))); - if (!usage.isPresent()) throw new RuntimeException("The usage of THP was not found."); - // Even with MADV_POPULATE_WRITE, the usage of THP is still one page less than the whole heap. - if (usage.get() < 524288) throw new RuntimeException("The usage of THP is not enough."); - } - } - - public static class CatSmaps { - public static void main(String[] args) throws Exception { - new BufferedReader(new FileReader("/proc/self/smaps")) - .lines() - .forEach(line -> System.out.println(line)); - } - } -} diff --git a/test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java b/test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java index 891306a0c11..bc9a0c5cabc 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java +++ b/test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/ObjectMonitorUsage.java @@ -53,9 +53,9 @@ public class ObjectMonitorUsage { static Object lockCheck = new Object(); native static int getRes(); - native static int waitsToEnter(); - native static int waitsToBeNotified(); native static int setTestedMonitor(Object monitor); + native static void ensureBlockedOnEnter(Thread thread); + native static void ensureWaitingToBeNotified(Thread thread); native static void check(Object obj, Thread owner, int entryCount, int waiterCount, int notifyWaiterCount); @@ -87,10 +87,9 @@ static Thread[] startWaitingThreads(boolean isVirtual) { Thread[] threads = new Thread[NUMBER_OF_WAITING_THREADS]; for (int i = 0; i < NUMBER_OF_WAITING_THREADS; i++) { // the WaitingTask has to wait to be notified in lockCheck.wait() - threads[i] = startTask(i, new WaitingTask(), isVirtual, "Waiting"); - } - while (waitsToBeNotified() < NUMBER_OF_WAITING_THREADS) { - sleep(1); + Thread thread = startTask(i, new WaitingTask(), isVirtual, "Waiting"); + ensureWaitingToBeNotified(thread); + threads[i] = thread; } return threads; } @@ -99,10 +98,9 @@ static Thread[] startEnteringThreads(boolean isVirtual) { Thread[] threads = new Thread[NUMBER_OF_ENTERING_THREADS]; for (int i = 0; i < NUMBER_OF_ENTERING_THREADS; i++) { // the EnteringTask has to be blocked at the lockCheck enter - threads[i] = startTask(i, new EnteringTask(), isVirtual, "Entering"); - } - while (waitsToEnter() < NUMBER_OF_ENTERING_THREADS) { - sleep(1); + Thread thread = startTask(i, new EnteringTask(), isVirtual, "Entering"); + ensureBlockedOnEnter(thread); + threads[i] = thread; } return threads; } diff --git a/test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/libObjectMonitorUsage.cpp b/test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/libObjectMonitorUsage.cpp index 015f64452e8..8575ae454a9 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/libObjectMonitorUsage.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/ObjectMonitorUsage/libObjectMonitorUsage.cpp @@ -32,11 +32,8 @@ extern "C" { #define STATUS_FAILED 2 static jvmtiEnv *jvmti = nullptr; -static jrawMonitorID event_lock = nullptr; static jint result = PASSED; static int check_idx = 0; -static int waits_to_enter = 0; -static int waits_to_be_notified = 0; static jobject tested_monitor = nullptr; static bool is_tested_monitor(JNIEnv *jni, jobject monitor) { @@ -53,47 +50,10 @@ static void log_event(jvmtiEnv *jvmti, JNIEnv *jni, jthread thread, deallocate(jvmti, jni, (void*)tname); } -JNIEXPORT void JNICALL -MonitorContendedEnter(jvmtiEnv *jvmti, JNIEnv *jni, jthread thread, jobject monitor) { - RawMonitorLocker rml(jvmti, jni, event_lock); - if (is_tested_monitor(jni, monitor)) { - waits_to_enter++; - log_event(jvmti, jni, thread, "MonitorContendedEnter", waits_to_enter); - } -} - -JNIEXPORT void JNICALL -MonitorContendedEntered(jvmtiEnv *jvmti, JNIEnv *jni, jthread thread, jobject monitor) { - RawMonitorLocker rml(jvmti, jni, event_lock); - if (is_tested_monitor(jni, monitor)) { - waits_to_enter--; - log_event(jvmti, jni, thread, "MonitorContendedEntered", waits_to_enter); - } -} - -JNIEXPORT void JNICALL -MonitorWait(jvmtiEnv *jvmti, JNIEnv *jni, jthread thread, jobject monitor, jlong timeout) { - RawMonitorLocker rml(jvmti, jni, event_lock); - if (is_tested_monitor(jni, monitor)) { - waits_to_be_notified++; - log_event(jvmti, jni, thread, "MonitorWait", waits_to_be_notified); - } -} - -JNIEXPORT void JNICALL -MonitorWaited(jvmtiEnv *jvmti, JNIEnv *jni, jthread thread, jobject monitor, jboolean timed_out) { - RawMonitorLocker rml(jvmti, jni, event_lock); - if (is_tested_monitor(jni, monitor)) { - waits_to_be_notified--; - log_event(jvmti, jni, thread, "MonitorWaited", waits_to_be_notified); - } -} - jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jint res; jvmtiError err; jvmtiCapabilities caps; - jvmtiEventCallbacks callbacks; res = jvm->GetEnv((void **) &jvmti, JVMTI_VERSION_1_1); if (res != JNI_OK || jvmti == nullptr) { @@ -116,17 +76,6 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { LOG("Warning: Monitor events are not implemented\n"); return JNI_ERR; } - memset(&callbacks, 0, sizeof(callbacks)); - callbacks.MonitorContendedEnter = &MonitorContendedEnter; - callbacks.MonitorContendedEntered = &MonitorContendedEntered; - callbacks.MonitorWait = &MonitorWait; - callbacks.MonitorWaited = &MonitorWaited; - - err = jvmti->SetEventCallbacks(&callbacks, sizeof(jvmtiEventCallbacks)); - check_jvmti_error(err, "Agent_Initialize: error in JVMTI SetEventCallbacks"); - - event_lock = create_raw_monitor(jvmti, "Events Monitor"); - return JNI_OK; } @@ -216,41 +165,20 @@ Java_ObjectMonitorUsage_check(JNIEnv *jni, jclass cls, jobject obj, jthread owne JNIEXPORT void JNICALL Java_ObjectMonitorUsage_setTestedMonitor(JNIEnv *jni, jclass cls, jobject monitor) { - jvmtiError err; - jvmtiEventMode event_mode = (monitor != nullptr) ? JVMTI_ENABLE : JVMTI_DISABLE; - - RawMonitorLocker rml(jvmti, jni, event_lock); - if (tested_monitor != nullptr) { jni->DeleteGlobalRef(tested_monitor); } tested_monitor = (monitor != nullptr) ? jni->NewGlobalRef(monitor) : nullptr; - waits_to_enter = 0; - waits_to_be_notified = 0; - - err = jvmti->SetEventNotificationMode(event_mode, JVMTI_EVENT_MONITOR_CONTENDED_ENTER, nullptr); - check_jvmti_status(jni, err, "setTestedMonitor: error in JVMTI SetEventNotificationMode #1"); - - err = jvmti->SetEventNotificationMode(event_mode, JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, nullptr); - check_jvmti_status(jni, err, "setTestedMonitor: error in JVMTI SetEventNotificationMode #2"); - - err = jvmti->SetEventNotificationMode(event_mode, JVMTI_EVENT_MONITOR_WAIT, nullptr); - check_jvmti_status(jni, err, "setTestedMonitor: error in JVMTI SetEventNotificationMode #3"); - - err = jvmti->SetEventNotificationMode(event_mode, JVMTI_EVENT_MONITOR_WAITED, nullptr); - check_jvmti_status(jni, err, "setTestedMonitor: error in JVMTI SetEventNotificationMode #4"); } -JNIEXPORT jint JNICALL -Java_ObjectMonitorUsage_waitsToEnter(JNIEnv *jni, jclass cls) { - RawMonitorLocker rml(jvmti, jni, event_lock); - return waits_to_enter; +JNIEXPORT void JNICALL +Java_ObjectMonitorUsage_ensureBlockedOnEnter(JNIEnv *jni, jclass cls, jthread thread) { + wait_for_state(jvmti, jni, thread, JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER); } -JNIEXPORT jint JNICALL -Java_ObjectMonitorUsage_waitsToBeNotified(JNIEnv *jni, jclass cls) { - RawMonitorLocker rml(jvmti, jni, event_lock); - return waits_to_be_notified; +JNIEXPORT void JNICALL +Java_ObjectMonitorUsage_ensureWaitingToBeNotified(JNIEnv *jni, jclass cls, jthread thread) { + wait_for_state(jvmti, jni, thread, JVMTI_THREAD_STATE_WAITING_INDEFINITELY); } JNIEXPORT jint JNICALL diff --git a/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResumeAll/libSuspendResumeAll.cpp b/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResumeAll/libSuspendResumeAll.cpp index e53484b575b..bea9a9c19a9 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResumeAll/libSuspendResumeAll.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResumeAll/libSuspendResumeAll.cpp @@ -216,11 +216,7 @@ test_vthread_resume_all(JNIEnv* jni, const jthread* thread_list, int suspend_mas check_jvmti_status(jni, err, "test_vthread_resume_all: error in JVMTI ResumeAllVirtualThreads"); // wait a second to give the breakpoints a chance to be hit. -#ifdef WINDOWS - Sleep(1000); -#else - sleep(1); -#endif + sleep_sec(1); for (int idx = 0; idx < EXCLUDE_CNT; idx++) { // Disable Breakpoint events on excluded thread diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbField.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbField.java index 884f521a02f..2ed557f8e94 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbField.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbField.java @@ -56,7 +56,7 @@ public static void main(String[] args) throws Exception { "field InstanceKlass _constants ConstantPool*", "field Klass _name Symbol*", "field JavaThread _osthread OSThread*", - "field TenuredGeneration _the_space TenuredSpace*", + "field TenuredGeneration _the_space ContiguousSpace*", "field VirtualSpace _low_boundary char*", "field MethodCounters _backedge_counter InvocationCounter", "field nmethod _entry_bci int", diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbLauncher.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbLauncher.java index 961311f5d5b..849ec2eb109 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbLauncher.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbLauncher.java @@ -149,6 +149,7 @@ private String runCmd(List commands, oa.shouldNotMatch("^WARNING in native method:.*$"); // This will detect most SA failures, including during the attach. oa.shouldNotMatch("^sun.jvm.hotspot.debugger.DebuggerException:.*$"); + oa.shouldNotMatch("sun.jvm.hotspot.utilities.AssertionFailure"); // This will detect unexpected exceptions, like NPEs and asserts, that are caught // by sun.jvm.hotspot.CommandProcessor. oa.shouldNotMatch("^Error: .*$"); diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbTestAllocationMerge.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbTestAllocationMerge.java new file mode 100644 index 00000000000..2e17bc038de --- /dev/null +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbTestAllocationMerge.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.List; +import jdk.test.lib.apps.LingeredApp; +import jtreg.SkippedException; + +/** + * @test + * @bug 8318682 + * @summary Test clhsdb that decoding of AllocationMerge objects in debug info works correctly + * @requires vm.hasSA + * @library /test/lib + * @run main/othervm ClhsdbTestAllocationMerge + */ + +public class ClhsdbTestAllocationMerge { + + public static void main(String[] args) throws Exception { + System.out.println("Starting ClhsdbTestDebugInfodDecode test"); + + LingeredApp theApp = null; + try { + ClhsdbLauncher test = new ClhsdbLauncher(); + + theApp = new LingeredAppWithAllocationMerge(); + LingeredApp.startApp(theApp); + System.out.println("Started LingeredAppWithAllocationMerge with pid " + theApp.getPid()); + + List cmds = List.of("jstack -v"); + + // sun.jvm.hotspot.utilities.AssertionFailure is caught by the harness so it's not + // necessary to include extra filters here. + test.run(theApp.getPid(), cmds, null, null); + } catch (SkippedException se) { + throw se; + } catch (Exception ex) { + throw new RuntimeException("Test ERROR " + ex, ex); + } finally { + LingeredApp.stopApp(theApp); + } + System.out.println("Test PASSED"); + } +} diff --git a/test/hotspot/jtreg/serviceability/sa/LingeredAppWithAllocationMerge.java b/test/hotspot/jtreg/serviceability/sa/LingeredAppWithAllocationMerge.java new file mode 100644 index 00000000000..a4743d76307 --- /dev/null +++ b/test/hotspot/jtreg/serviceability/sa/LingeredAppWithAllocationMerge.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jdk.test.lib.apps.LingeredApp; + +// Derived from test/hotspot/jtreg/compiler/c2/TestReduceAllocationAndHeapDump.java +public class LingeredAppWithAllocationMerge extends LingeredApp { + // Helper class + static class Point { + public int x; + + public Point(int xx) { + this.x = xx; + } + } + + + public static Point p = new Point(0); + + public static void main(String[] args) { + for (int i = 0; i < 5000; i++) { + testIt(i, args); + } + } + + public static void testIt(int i, String[] args) { + Point p = (i % 2 == 0) ? new Point(i) : new Point(i); + + dummy(i, args); + + if (i < 5000) { + dummy(i, args); + } else { + dummy(p.x + i, args); + } + } + + public static void dummy(int x, String[] args) { + if (x > 4900) { + LingeredApp.main(args); + throw new InternalError("should never return"); + } + } +} diff --git a/test/hotspot/jtreg/serviceability/sa/TestDebugInfoDecode.java b/test/hotspot/jtreg/serviceability/sa/TestDebugInfoDecode.java new file mode 100644 index 00000000000..257f950b12f --- /dev/null +++ b/test/hotspot/jtreg/serviceability/sa/TestDebugInfoDecode.java @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import sun.jvm.hotspot.HotSpotAgent; +import sun.jvm.hotspot.code.CodeCacheVisitor; +import sun.jvm.hotspot.code.CodeBlob; +import sun.jvm.hotspot.code.NMethod; +import sun.jvm.hotspot.debugger.Address; +import sun.jvm.hotspot.runtime.VM; + +import jdk.test.lib.apps.LingeredApp; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.SA.SATestUtils; + +/** + * @test + * @bug 8318682 + * @summary Test decoding debug info for all nmethods in the code cache + * @requires vm.hasSA + * @library /test/lib + * @modules jdk.hotspot.agent/sun.jvm.hotspot + * jdk.hotspot.agent/sun.jvm.hotspot.code + * jdk.hotspot.agent/sun.jvm.hotspot.debugger + * jdk.hotspot.agent/sun.jvm.hotspot.runtime + * @run main/othervm/timeout=2400 -Xmx1g -Xcomp TestDebugInfoDecode + */ + +public class TestDebugInfoDecode { + + private static LingeredApp theApp = null; + + private static void checkDecode(String pid) throws Exception { + HotSpotAgent agent = new HotSpotAgent(); + + try { + agent.attach(Integer.parseInt(pid)); + + CodeCacheVisitor v = new CodeCacheVisitor() { + Throwable throwable; + public void prologue(Address start, Address end) { + } + public void visit(CodeBlob blob) { + if (throwable != null) { + // Only report the first failure. + return; + } + if (blob instanceof NMethod) { + NMethod nm = (NMethod) blob; + try { + nm.decodeAllScopeDescs(); + } catch (Throwable t) { + System.err.println("Exception while decoding debug info for " + blob); + throwable = t; + throw t; + } + } + } + public void epilogue() { + } + }; + VM.getVM().getCodeCache().iterate(v); + } finally { + agent.detach(); + } + } + + private static void createAnotherToAttach(long lingeredAppPid) throws Exception { + // Start a new process to attach to the lingered app + ProcessBuilder processBuilder = ProcessTools.createLimitedTestJavaProcessBuilder( + "--add-modules=jdk.hotspot.agent", + "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot=ALL-UNNAMED", + "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot.code=ALL-UNNAMED", + "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot.debugger=ALL-UNNAMED", + "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot.runtime=ALL-UNNAMED", + "TestDebugInfoDecode", + Long.toString(lingeredAppPid) + ); + SATestUtils.addPrivilegesIfNeeded(processBuilder); + OutputAnalyzer SAOutput = ProcessTools.executeProcess(processBuilder); + SAOutput.shouldHaveExitValue(0); + System.out.println(SAOutput.getOutput()); + } + + public static void main (String... args) throws Exception { + SATestUtils.skipIfCannotAttach(); // throws SkippedException if attach not expected to work. + if (args == null || args.length == 0) { + try { + theApp = new LingeredApp(); + LingeredApp.startApp(theApp); + createAnotherToAttach(theApp.getPid()); + } finally { + LingeredApp.stopApp(theApp); + } + } else { + checkDecode(args[0]); + } + } +} diff --git a/test/hotspot/jtreg/testlibrary_tests/ir_framework/examples/GCBarrierIRExample.java b/test/hotspot/jtreg/testlibrary_tests/ir_framework/examples/GCBarrierIRExample.java new file mode 100644 index 00000000000..e0287fc39fe --- /dev/null +++ b/test/hotspot/jtreg/testlibrary_tests/ir_framework/examples/GCBarrierIRExample.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package ir_framework.examples; + +import compiler.lib.ir_framework.*; +import java.lang.invoke.VarHandle; +import java.lang.invoke.MethodHandles; + +/** + * @test + * @bug 8330153 + * @summary Example test that illustrates the use of the IR test framework for + * verification of late-expanded GC barriers. + * @library /test/lib / + * @requires vm.gc.ZGenerational + * @run driver ir_framework.examples.GCBarrierIRExample + */ + +public class GCBarrierIRExample { + + static class Outer { + Object f; + } + + static final VarHandle fVarHandle; + static { + MethodHandles.Lookup l = MethodHandles.lookup(); + try { + fVarHandle = l.findVarHandle(Outer.class, "f", Object.class); + } catch (Exception e) { + throw new Error(e); + } + } + static Outer o = new Outer(); + static Object oldVal = new Object(); + static Object newVal = new Object(); + + public static void main(String[] args) { + // These rules apply only to collectors that expand barriers at code + // emission, such as ZGC. Because the collector selection flags are not + // whitelisted (see IR framework's README.md file), the user (as opposed + // to jtreg) needs to set these flags here. + TestFramework.runWithFlags("-XX:+UseZGC", "-XX:+ZGenerational"); + } + + @Test + // IR rules can be used to verify collector-specific barrier info (in this + // case, that a ZGC barrier corresponds to a strong OOP reference). Barrier + // info can only be verified after matching, e.g. at the FINAL_CODE phase. + @IR(counts = {IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, "strong", "1"}, + phase = CompilePhase.FINAL_CODE) + static boolean testBarrierOfCompareAndSwap() { + return fVarHandle.compareAndSet(o, oldVal, newVal); + } +} diff --git a/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/weak006.java b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/weak006.java index 7c0a2e30607..82fda0a3bd3 100644 --- a/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/weak006.java +++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/weak006.java @@ -32,7 +32,7 @@ * /test/lib * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox - * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+IgnoreUnrecognizedVMOptions -XX:-ScavengeBeforeFullGC gc.gctests.WeakReference.weak006.weak006 -t 1 + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+IgnoreUnrecognizedVMOptions gc.gctests.WeakReference.weak006.weak006 -t 1 */ package gc.gctests.WeakReference.weak006; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/newclass02/java.base/java/lang/Object.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/newclass02/java.base/java/lang/Object.java index df2239bcb5e..7593b460c2e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/newclass02/java.base/java/lang/Object.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/newclass02/java.base/java/lang/Object.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -368,16 +368,21 @@ public String toString() { * @see java.lang.Object#notifyAll() */ public final void wait(long timeoutMillis) throws InterruptedException { - long comp = Blocker.begin(); + if (!Thread.currentThread().isVirtual()) { + wait0(timeoutMillis); + return; + } + + // virtual thread waiting + boolean attempted = Blocker.begin(); try { wait0(timeoutMillis); } catch (InterruptedException e) { - Thread thread = Thread.currentThread(); - if (thread.isVirtual()) - thread.getAndClearInterrupt(); + // virtual thread's interrupt status needs to be cleared + Thread.currentThread().getAndClearInterrupt(); throw e; } finally { - Blocker.end(comp); + Blocker.end(attempted); } } diff --git a/test/jdk/java/awt/Focus/6981400/Test1.java b/test/jdk/java/awt/Focus/6981400/Test1.java index 730e10804fa..ab60129ba94 100644 --- a/test/jdk/java/awt/Focus/6981400/Test1.java +++ b/test/jdk/java/awt/Focus/6981400/Test1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -27,8 +27,8 @@ * @bug 6981400 * @summary Tabbing between textfiled do not work properly when ALT+TAB * @author anton.tarasov - * @library ../../regtesthelpers - * @build Util + * @library /java/awt/regtesthelpers /test/lib + * @build Util jdk.test.lib.Platform * @run main Test1 */ @@ -41,12 +41,28 @@ // The FOCUS_LOST/FOCUS_GAINED events order in the original frame is tracked and should be: // b0 -> b1 -> b2 -> b3. -import java.awt.*; -import java.awt.event.*; +import java.awt.AWTEvent; +import java.awt.AWTException; +import java.awt.Button; +import java.awt.Component; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.Robot; +import java.awt.Toolkit; +import java.awt.event.AWTEventListener; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.awt.event.KeyEvent; +import java.awt.event.WindowEvent; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import javax.swing.*; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.SwingUtilities; + +import jdk.test.lib.Platform; import test.java.awt.regtesthelpers.Util; public class Test1 { @@ -72,7 +88,7 @@ public class Test1 { static boolean tracking; - public static void main(String[] args) { + public static void main(String[] args) throws Exception { Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() { public void eventDispatched(AWTEvent e) { System.out.println(e); @@ -81,6 +97,7 @@ public void eventDispatched(AWTEvent e) { try { robot = new Robot(); + robot.setAutoDelay(50); } catch (AWTException ex) { throw new RuntimeException("Error: can't create Robot"); } @@ -90,13 +107,13 @@ public void eventDispatched(AWTEvent e) { f0.add(f0b2); f0.add(f0b3); f0.setLayout(new FlowLayout()); - f0.setBounds(0, 100, 400, 200); + f0.setBounds(100, 100, 400, 200); f1.add(f1b0); - f1.setBounds(0, 400, 400, 200); + f1.setBounds(100, 400, 400, 200); f2.add(f2b0); - f2.setBounds(0, 400, 400, 200); + f2.setBounds(100, 400, 400, 200); f0b0.addFocusListener(new FocusAdapter() { @Override @@ -115,6 +132,7 @@ public void focusLost(FocusEvent e) { f0.setVisible(true); Util.waitForIdle(robot); + robot.delay(500); if (!f0b0.isFocusOwner()) { Util.clickOnComp(f0b0, robot); @@ -152,28 +170,29 @@ public void focusLost(FocusEvent e) { System.out.println("\nTest passed."); } - public static void test(Component compToClick) { + public static void test(Component compToClick) throws Exception { tracking = true; robot.keyPress(KeyEvent.VK_TAB); - robot.delay(50); robot.keyRelease(KeyEvent.VK_TAB); - robot.delay(50); + robot.waitForIdle(); robot.keyPress(KeyEvent.VK_TAB); - robot.delay(50); robot.keyRelease(KeyEvent.VK_TAB); - robot.delay(50); + robot.waitForIdle(); robot.keyPress(KeyEvent.VK_TAB); - robot.delay(50); robot.keyRelease(KeyEvent.VK_TAB); + robot.waitForIdle(); - robot.delay(50); Util.clickOnComp(compToClick, robot); - robot.delay(50); - Util.clickOnTitle(f0, robot); + robot.waitForIdle(); + SwingUtilities.invokeAndWait(f0::toFront); + + if (!Platform.isOnWayland()) { + Util.clickOnTitle(f0, robot); + } Util.waitForIdle(robot); diff --git a/test/jdk/java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java b/test/jdk/java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java index 1e5b2789208..35c6b5cdee6 100644 --- a/test/jdk/java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java +++ b/test/jdk/java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -26,13 +26,27 @@ @key headful @bug 6314575 @summary Tests that previosly focused owned window doesn't steal focus when an owner's component requests focus. - @library ../../regtesthelpers - @build Util + @library /java/awt/regtesthelpers /test/lib + @build Util jdk.test.lib.Platform @run main ActualFocusedWindowBlockingTest */ -import java.awt.*; -import java.awt.event.*; +import java.awt.AWTEvent; +import java.awt.Button; +import java.awt.Color; +import java.awt.Component; +import java.awt.EventQueue; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.KeyboardFocusManager; +import java.awt.Robot; +import java.awt.Toolkit; +import java.awt.Window; +import java.awt.event.AWTEventListener; +import java.awt.event.FocusEvent; +import java.awt.event.WindowEvent; + +import jdk.test.lib.Platform; import test.java.awt.regtesthelpers.Util; public class ActualFocusedWindowBlockingTest { @@ -44,7 +58,7 @@ public class ActualFocusedWindowBlockingTest { Button wButton = new Button("window button") {public String toString() {return "Window_Button";}}; Button aButton = new Button("auxiliary button") {public String toString() {return "Auxiliary_Button";}}; - public static void main(String[] args) { + public static void main(String[] args) throws Exception { ActualFocusedWindowBlockingTest app = new ActualFocusedWindowBlockingTest(); app.init(); app.start(); @@ -68,7 +82,7 @@ public void eventDispatched(AWTEvent e) { tuneAndShowWindows(new Window[] {owner, win, frame}); } - public void start() { + public void start() throws Exception { System.out.println("\nTest started:\n"); // Test 1. @@ -99,7 +113,12 @@ public void start() { clickOnCheckFocus(fButton); clickOnCheckFocus(aButton); - Util.clickOnTitle(owner, robot); + EventQueue.invokeAndWait(owner::toFront); + + if (!Platform.isOnWayland()) { + Util.clickOnTitle(owner, robot); + } + if (!testFocused(fButton)) { throw new TestFailedException("The owner's component [" + fButton + "] couldn't be focused as the most recent focus owner"); } @@ -117,11 +136,15 @@ void tuneAndShowWindows(Window[] arr) { y += 200; Util.waitForIdle(robot); } + robot.delay(500); } - void clickOnCheckFocus(Component c) { + void clickOnCheckFocus(Component c) throws Exception { if (c instanceof Frame) { - Util.clickOnTitle((Frame)c, robot); + EventQueue.invokeAndWait(() -> ((Frame) c).toFront()); + if (!Platform.isOnWayland()) { + Util.clickOnTitle((Frame) c, robot); + } } else { Util.clickOnComp(c, robot); } diff --git a/test/jdk/java/awt/Focus/ModalDialogInFocusEventTest.java b/test/jdk/java/awt/Focus/ModalDialogInFocusEventTest.java index d4f0d65f071..4c659819c3c 100644 --- a/test/jdk/java/awt/Focus/ModalDialogInFocusEventTest.java +++ b/test/jdk/java/awt/Focus/ModalDialogInFocusEventTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -22,11 +22,11 @@ */ /* - test + @test + @key headful @bug 4531693 4636269 4681908 4688142 4691646 4721470 @summary Showing modal dialog during dispatching SequencedEvent - @key headful - @run main AutomaticAppletTest + @run main ModalDialogInFocusEventTest */ import java.awt.AWTEvent; @@ -68,6 +68,8 @@ public class ModalDialogInFocusEventTest static final int MAX_STAGE_NUM = stages.length; static final Object stageMonitor = new Object(); + static boolean isOnWayland; + Robot robot = null; Frame frame; Frame oppositeFrame; @@ -209,18 +211,21 @@ public void windowLostFocus(WindowEvent e) { void clickOnFrameTitle(Frame frame) throws InterruptedException, InvocationTargetException { - System.out.println("click on title of " + frame.getName()); - int[] point = new int[2]; - EventQueue.invokeAndWait(() -> { - Point location = frame.getLocationOnScreen(); - Insets insets = frame.getInsets(); - int width = frame.getWidth(); - point[0] = location.x + width / 2; - point[1] = location.y + insets.top / 2; - }); - robot.mouseMove(point[0], point[1]); - robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); - robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + EventQueue.invokeAndWait(frame::toFront); + if (!isOnWayland) { + System.out.println("click on title of " + frame.getName()); + int[] point = new int[2]; + EventQueue.invokeAndWait(() -> { + Point location = frame.getLocationOnScreen(); + Insets insets = frame.getInsets(); + int width = frame.getWidth(); + point[0] = location.x + width / 2; + point[1] = location.y + insets.top / 2; + }); + robot.mouseMove(point[0], point[1]); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + } EventQueue.invokeAndWait(frame::requestFocusInWindow); } @@ -344,6 +349,7 @@ public void focusLost(FocusEvent e) { public static void main(String[] args) throws InterruptedException, InvocationTargetException { + isOnWayland = System.getenv("WAYLAND_DISPLAY") != null; ModalDialogInFocusEventTest test = new ModalDialogInFocusEventTest(); test.start(); } diff --git a/test/jdk/java/awt/FontMetrics/ExtremeFontSizeTest.java b/test/jdk/java/awt/FontMetrics/ExtremeFontSizeTest.java new file mode 100644 index 00000000000..caa365a3f21 --- /dev/null +++ b/test/jdk/java/awt/FontMetrics/ExtremeFontSizeTest.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Graphics2D; +import java.awt.Rectangle; +import java.awt.font.FontRenderContext; +import java.awt.font.GlyphVector; +import java.awt.geom.AffineTransform; +import java.awt.geom.Rectangle2D; +import java.awt.image.BufferedImage; + +/* + * @test + * @bug 8328896 + * @summary test that using very large font sizes used don't break later uses + */ + +public class ExtremeFontSizeTest { + + static BufferedImage bi = new BufferedImage(1,1,1); + static Graphics2D g2d = bi.createGraphics(); + static String testString = "M"; + static Font font = new Font("SansSerif", Font.PLAIN, 12); + static int fontSize = 0; + static boolean failed = false; + static int[] fontSizes = { 10, 12, 1000, 2000, 20000, 100000, 8 }; + static double[] scales = { 1.0, 900.0}; + static boolean[] fms = { false, true }; + + public static void main(String[] args) { + + /* run tests validating bounds etc are non-zero + * then run with extreme scales for which zero is allowed - but not required + * then run the first tests again to be sure they are still reasonable. + */ + runTests(); + test(5_000_000, 10_000, false, testString, false); + test(5_000_000, 10_000, true, testString, false); + test(0, 0.00000001, false, testString, false); + runTests(); + + if (failed) { + throw new RuntimeException("Test failed. Check stdout log."); + } + } + + static void runTests() { + for (int fontSize : fontSizes) { + for (double scale : scales) { + for (boolean fm : fms) { + test(fontSize, scale, fm, testString, true); + } + } + } + } + + static void test(int size, double scale, boolean fm, String str, boolean checkAll) { + + AffineTransform at = AffineTransform.getScaleInstance(scale, scale); + FontRenderContext frc = new FontRenderContext(at, false, fm); + font = font.deriveFont((float)size); + g2d.setTransform(at); + g2d.setFont(font); + FontMetrics metrics = g2d.getFontMetrics(); + int height = metrics.getHeight(); + double width = font.getStringBounds(str, frc).getWidth(); + + GlyphVector gv = font.createGlyphVector(frc, str.toCharArray()); + Rectangle pixelBounds = gv.getPixelBounds(frc, 0, 0); + Rectangle2D visualBounds = gv.getVisualBounds(); + + System.out.println("Test parameters: size="+size+" scale="+scale+" fm="+fm+" str="+str); + System.out.println("font height="+metrics.getHeight()); + System.out.println("string bounds width="+width); + System.out.println("GlyphVector Pixel Bounds="+ pixelBounds); + System.out.println("GlyphVector Visual Bounds="+ visualBounds); + + + if (height < 0 || width < 0 || pixelBounds.getWidth() < 0 || visualBounds.getWidth() < 0) { + failed = true; + System.out.println(" *** Unexpected negative size reported *** "); + } + if (!checkAll) { + System.out.println(); + return; + } + + if (height == 0 || width == 0 || (pixelBounds.isEmpty()) || visualBounds.isEmpty() ) { + failed = true; + System.out.println("Pixel bounds empty="+pixelBounds.isEmpty()); + System.out.println("Visual bounds empty="+visualBounds.isEmpty()); + System.out.println(" *** RESULTS NOT AS EXPECTED *** "); + } + System.out.println(); + } +} diff --git a/test/jdk/java/awt/Frame/FrameStateTest/FrameStateTest.java b/test/jdk/java/awt/Frame/FrameStateTest/FrameStateTest.java index 496be463513..439332e2ce9 100644 --- a/test/jdk/java/awt/Frame/FrameStateTest/FrameStateTest.java +++ b/test/jdk/java/awt/Frame/FrameStateTest/FrameStateTest.java @@ -21,15 +21,6 @@ * questions. */ -/* - * FrameStateTest.java - * - * summary: Checks that when setState(Frame.ICONIFIED) is called before - * setVisible(true) the Frame is shown in the proper iconified state. - * The problem was that it did not honor the initial iconic state, but - * instead was shown in the NORMAL state. - */ - import java.awt.Button; import java.awt.Checkbox; import java.awt.CheckboxGroup; @@ -52,9 +43,9 @@ * @test * @bug 4157271 * @summary Checks that when a Frame is created it honors the state it - * was set to. The bug was that if setState(Frame.ICONIFIED) was - * called before setVisible(true) the Frame would be shown in NORMAL - * state instead of ICONIFIED. + * was set to. The bug was that if setState(Frame.ICONIFIED) was + * called before setVisible(true) the Frame would be shown in NORMAL + * state instead of ICONIFIED. * @library /java/awt/regtesthelpers * @build PassFailJFrame * @run main/manual FrameStateTest @@ -68,29 +59,33 @@ This test checks that when setState(Frame.ICONIFIED) is called before setVisible(true) the Frame is shown in the proper iconified state. The problem was that it did not honor the initial iconic state, but instead was shown in the NORMAL state. -


          - +


          Steps to try to reproduce this problem: -

          +

          Select the different options for the Frame:

            -
          • {Normal, Non-resizalbe}
          • +
          • {Normal, Non-resizable}
          • {Normal, Resizable}
          • {Iconified, Resizable}
          • -
          • {Iconified, Non-resizalbe}
          • +
          • {Iconified, Non-resizable}
          After choosing the Frame's state click the Create Frame button.
          - After the Frame (Frame State Test (Window2)) comes - up make sure the proper behavior occurred
          - (Frame shown in proper state).
          + After the Frame (Frame State Test (Window2)) comes up make sure the + proper behavior occurred (Frame shown in proper state).
          Click the Dispose button to close the Frame.
          -


          - Do the above steps for all the different Frame state combinations available.
          - If you observe the proper behavior the test has passed, Press the Pass button.
          - Otherwise the test has failed, Press the Fail button. + Do the above steps for all the different Frame state combinations + available.
          + For "Hide, Iconify and Show" case, the frame is hidden then iconified + hence Window2 is not seen on-screen when shown as the frame is still + in the ICONIFIED state. Window2 is visible on-screen when it is restored + to NORMAL state as observed with "Hide, Iconify, Show and Restore" case. +

          + + If you observe the proper behavior for all the combinations, + press PASS else FAIL.

          Note: In Frame State Test (Window2) you can also chose the different buttons to see different Frame behavior.
          An example of a problem that @@ -106,9 +101,9 @@ After the Frame (Frame State Test (Window2)) comes Button btnDispose = new Button("Dispose Frame"); CheckboxGroup cbgState = new CheckboxGroup(); CheckboxGroup cbgResize = new CheckboxGroup(); - Checkbox cbIconState = new Checkbox("Frame state ICONIFIED", cbgState, true); - Checkbox cbNormState = new Checkbox("Frame state NORMAL", cbgState, false); - Checkbox cbNonResize = new Checkbox("Frame non-resizable", cbgResize, false); + Checkbox cbIconState = new Checkbox("Frame State ICONIFIED", cbgState, true); + Checkbox cbNormState = new Checkbox("Frame State NORMAL", cbgState, false); + Checkbox cbNonResize = new Checkbox("Frame Non-Resizable", cbgResize, false); Checkbox cbResize = new Checkbox("Frame Resizable", cbgResize, true); CreateFrame icontst; @@ -116,12 +111,12 @@ After the Frame (Frame State Test (Window2)) comes public static void main(String[] args) throws Exception { PassFailJFrame .builder() - .title("GetBoundsResizeTest Instructions") + .title("Frame State and Size Test Instructions") .instructions(INSTRUCTIONS) .testTimeOut(10) - .rows(25) + .rows(27) .columns(70) - .logArea(10) + .logArea(6) .splitUIBottom(() -> new FrameStateTest().createPanel()) .build() .awaitAndCheck(); @@ -149,7 +144,7 @@ public void actionPerformed(ActionEvent evt) { if (evt.getSource() == btnCreate) { btnCreate.setEnabled(false); btnDispose.setEnabled(true); - icontst =new CreateFrame(cbIconState.getState(), cbResize.getState()); + icontst = new CreateFrame(cbIconState.getState(), cbResize.getState()); icontst.setVisible(true); } else if (evt.getSource() == btnDispose) { btnCreate.setEnabled(true); @@ -166,7 +161,7 @@ static class CreateFrame extends Frame String name = "Frame State Test"; CreateFrame(boolean iconified, boolean resizable) { - setTitle("Frame State Test (Window 2)"); + setTitle("Test Window (Window 2)"); isResizable = resizable; @@ -175,13 +170,13 @@ static class CreateFrame extends Frame ((isResizable) ? "RESIZABLE" : "NON-RESIZABLE")); setLayout(new FlowLayout()); - add(b1 = new Button("resizable")); - add(b2 = new Button("resize")); - add(b3 = new Button("iconify")); - add(b4 = new Button("iconify and restore")); - add(b5 = new Button("hide and show")); - add(b6 = new Button("hide, iconify and show")); - add(b7 = new Button("hide, iconify, show, and restore")); + add(b1 = new Button("Resizable")); + add(b2 = new Button("Resize")); + add(b3 = new Button("Iconify")); + add(b4 = new Button("Iconify and Restore")); + add(b5 = new Button("Hide and Show")); + add(b6 = new Button("Hide, Iconify and Show")); + add(b7 = new Button("Hide, Iconify, Show and Restore")); b1.addActionListener(this); b2.addActionListener(this); b3.addActionListener(this); @@ -191,10 +186,9 @@ static class CreateFrame extends Frame b7.addActionListener(this); addWindowListener(this); - setBounds(100, 2, 200, 200); + setBounds(100, 2, 300, 200); setState(iconified ? Frame.ICONIFIED : Frame.NORMAL); setResizable(isResizable); - pack(); setVisible(true); } @@ -320,11 +314,11 @@ public void windowOpened(WindowEvent e) { public void stateLog(String message) { PassFailJFrame - .log("[State=%d] %s %s".formatted(getState(), name, message)); + .log("[Current State = %d] %s %s".formatted(getState(), name, message)); } public void stateLog() { - PassFailJFrame.log("[State=" + getState() + "]"); + PassFailJFrame.log("[Current State = " + getState() + "]"); } } } diff --git a/test/jdk/java/awt/Mixing/AWT_Mixing/HierarchyBoundsListenerMixingTest.java b/test/jdk/java/awt/Mixing/AWT_Mixing/HierarchyBoundsListenerMixingTest.java index 108cdc99d1f..3dfdfd8b6b8 100644 --- a/test/jdk/java/awt/Mixing/AWT_Mixing/HierarchyBoundsListenerMixingTest.java +++ b/test/jdk/java/awt/Mixing/AWT_Mixing/HierarchyBoundsListenerMixingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -21,12 +21,33 @@ * questions. */ - -import java.awt.*; -import java.awt.event.*; +import java.awt.Button; +import java.awt.Checkbox; +import java.awt.Choice; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.Label; +import java.awt.List; +import java.awt.Panel; +import java.awt.Robot; +import java.awt.Scrollbar; +import java.awt.TextArea; +import java.awt.TextField; +import java.awt.event.HierarchyBoundsListener; +import java.awt.event.HierarchyEvent; +import java.awt.event.InputEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; import java.lang.reflect.InvocationTargetException; import javax.swing.SwingUtilities; -import java.io.*; + +import jdk.test.lib.Platform; /** * AWT Mixing test for HierarchyBoundsListener ancestors. @@ -37,7 +58,8 @@ * @key headful * @bug 6768230 8221823 * @summary Mixing test for HierarchyBoundsListener ancestors - * @build FrameBorderCounter + * @library /test/lib + * @build FrameBorderCounter jdk.test.lib.Platform * @run main HierarchyBoundsListenerMixingTest */ public class HierarchyBoundsListenerMixingTest { @@ -137,9 +159,9 @@ protected boolean performTest() { robot.mouseMove((int) components[0].getLocationOnScreen().x + components[0].getSize().width / 2, (int) components[0].getLocationOnScreen().y + components[0].getSize().height / 2); robot.delay(delay); - robot.mousePress(InputEvent.BUTTON1_MASK); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); robot.delay(delay); - robot.mouseRelease(InputEvent.BUTTON1_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); robot.delay(delay); resetValues(); @@ -177,45 +199,54 @@ public void run() { robot.delay(delay * 5); resetValues(); - int x = (int) frame.getLocationOnScreen().x; - int y = (int) frame.getLocationOnScreen().y; - int w = frame.getSize().width; - int h = frame.getSize().height; - - robot.mouseMove(x + w + BORDER_SHIFT, y + h / 2); - robot.delay(delay); - robot.mousePress(InputEvent.BUTTON1_MASK); - robot.delay(delay); - for (int i = 0; i < 20; i++) { - robot.mouseMove(x + w + i + BORDER_SHIFT, y + h / 2); - robot.delay(50); - } - robot.delay(delay); - robot.mouseRelease(InputEvent.BUTTON1_MASK); - if (! resizeTriggered) { - synchronized (resizeLock) { - try { - resizeLock.wait(delay * 10); - } catch (Exception e) { + int x; + int y; + int w; + int h; + + if (!Platform.isOnWayland()) { + x = frame.getLocationOnScreen().x; + y = frame.getLocationOnScreen().y; + w = frame.getSize().width; + h = frame.getSize().height; + + robot.mouseMove(x + w + BORDER_SHIFT, y + h / 2); + robot.delay(delay); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.delay(delay); + for (int i = 0; i < 20; i++) { + robot.mouseMove(x + w + i + BORDER_SHIFT, y + h / 2); + robot.delay(50); + } + robot.delay(delay); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + + if (!resizeTriggered) { + synchronized (resizeLock) { + try { + resizeLock.wait(delay * 10); + } catch (Exception e) { + } } } - } - for (int i = 0; i < components.length; i++) { - if (! ancestorResized[i]) { - System.err.println("FAIL: Frame resized using mouse action. " + - "Ancestor resized event did not occur for " + - components[i].getClass()); + for (int i = 0; i < components.length; i++) { + if (!ancestorResized[i]) { + System.err.println("FAIL: Frame resized using mouse action. " + + "Ancestor resized event did not occur for " + + components[i].getClass()); + passed = false; + } + } + if (moveCount > 0) { + System.err.println("FAIL: Ancestor moved event occurred when Frame resized using mouse"); passed = false; } - } - if (moveCount > 0) { - System.err.println("FAIL: Ancestor moved event occured when Frame resized using mouse"); - passed = false; + + resetValues(); } - resetValues(); try { EventQueue.invokeAndWait(new Runnable() { public void run() { @@ -250,52 +281,55 @@ public void run() { robot.delay(delay * 10); resetValues(); - x = (int) frame.getLocationOnScreen().x; - y = (int) frame.getLocationOnScreen().y; - w = frame.getSize().width; - h = frame.getSize().height; - - //Click on the dummy frame so that the test frame loses focus. This is to workaround - //a bug in Linux AS. - robot.mouseMove((int) dummy.getLocationOnScreen().x + dummy.getSize().width / 2, - (int) dummy.getLocationOnScreen().y + dummy.getSize().height / 2); - robot.delay(delay); - robot.mousePress(InputEvent.BUTTON1_MASK); - robot.delay(delay); - robot.mouseRelease(InputEvent.BUTTON1_MASK); - robot.delay(delay); - robot.mouseMove(x + w / 2, y + 10); - robot.delay(delay); - robot.mousePress(InputEvent.BUTTON1_MASK); - robot.delay(delay); - for (int i = 1; i <= 20; i++) { - robot.mouseMove(x + w / 2 + i, y + 10); - robot.delay(50); - } - robot.delay(delay); - robot.mouseRelease(InputEvent.BUTTON1_MASK); - - if (! moveTriggered) { - synchronized (moveLock) { - try { - moveLock.wait(delay * 10); - } catch (Exception e) { + if (!Platform.isOnWayland()) { + x = frame.getLocationOnScreen().x; + y = frame.getLocationOnScreen().y; + w = frame.getSize().width; + h = frame.getSize().height; + + //Click on the dummy frame so that the test frame loses focus. This is to workaround + //a bug in Linux AS. + robot.mouseMove((int) dummy.getLocationOnScreen().x + dummy.getSize().width / 2, + (int) dummy.getLocationOnScreen().y + dummy.getSize().height / 2); + robot.delay(delay); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.delay(delay); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + robot.delay(delay); + + robot.mouseMove(x + w / 2, y + 10); + robot.delay(delay); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.delay(delay); + for (int i = 1; i <= 20; i++) { + robot.mouseMove(x + w / 2 + i, y + 10); + robot.delay(50); + } + robot.delay(delay); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + + if (! moveTriggered) { + synchronized (moveLock) { + try { + moveLock.wait(delay * 10); + } catch (Exception e) { + } } } - } - for (int i = 0; i < components.length; i++) { - if (! ancestorMoved[i]) { - System.err.println("FAIL: Frame moved using mouse action. " + - "Ancestor moved event did not occur for " + components[i].getClass()); + for (int i = 0; i < components.length; i++) { + if (! ancestorMoved[i]) { + System.err.println("FAIL: Frame moved using mouse action. " + + "Ancestor moved event did not occur for " + components[i].getClass()); + passed = false; + } + } + if (resizeCount > 0) { + System.err.println("FAIL: Ancestor resized event occured when Frame moved using mouse"); passed = false; } } - if (resizeCount > 0) { - System.err.println("FAIL: Ancestor resized event occured when Frame moved using mouse"); - passed = false; - } return passed; } @@ -450,7 +484,7 @@ private static void init() throws InterruptedException { // instantiated in the same VM. Being static (and using // static vars), it aint gonna work. Not worrying about // it for now. - public static void main(String args[]) throws InterruptedException { + public static void main(String[] args) throws InterruptedException { mainThread = Thread.currentThread(); try { init(); diff --git a/test/jdk/java/awt/font/GlyphVector/LayoutCompatTest.java b/test/jdk/java/awt/font/GlyphVector/LayoutCompatTest.java index 35aa90374d5..11d0c2ee3bc 100644 --- a/test/jdk/java/awt/font/GlyphVector/LayoutCompatTest.java +++ b/test/jdk/java/awt/font/GlyphVector/LayoutCompatTest.java @@ -1,12 +1,10 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/jdk/java/foreign/loaderLookup/TestSymbolLookupFindOrThrow.java b/test/jdk/java/foreign/loaderLookup/TestSymbolLookupFindOrThrow.java new file mode 100644 index 00000000000..d0fdf43b999 --- /dev/null +++ b/test/jdk/java/foreign/loaderLookup/TestSymbolLookupFindOrThrow.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @run junit/othervm --enable-native-access=ALL-UNNAMED TestSymbolLookupFindOrThrow + */ + +import java.lang.foreign.MemorySegment; +import java.lang.foreign.SymbolLookup; +import java.util.NoSuchElementException; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import static org.junit.Assert.*; + +final class TestSymbolLookupFindOrThrow { + + static { + System.loadLibrary("Foo"); + } + + @Test + void findOrThrow() { + MemorySegment symbol = SymbolLookup.loaderLookup().findOrThrow("foo"); + Assertions.assertNotEquals(0, symbol.address()); + } + + @Test + void findOrThrowNotFound() { + assertThrows(NoSuchElementException.class, () -> + SymbolLookup.loaderLookup().findOrThrow("bar")); + } + +} diff --git a/test/jdk/java/io/ByteArrayOutputStream/WriteToReleasesCarrier.java b/test/jdk/java/io/ByteArrayOutputStream/WriteToReleasesCarrier.java new file mode 100644 index 00000000000..c0607fd9494 --- /dev/null +++ b/test/jdk/java/io/ByteArrayOutputStream/WriteToReleasesCarrier.java @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8330748 + * @summary Test ByteArrayOutputStream.writeTo releases carrier thread + * @requires vm.continuations + * @modules java.base/java.lang:+open + * @run main WriteToReleasesCarrier + */ + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.charset.StandardCharsets; +import java.lang.reflect.Constructor; +import java.util.Arrays; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.locks.LockSupport; + +public class WriteToReleasesCarrier { + public static void main(String[] args) throws Exception { + byte[] bytes = "Hello".getBytes(StandardCharsets.UTF_8); + + var baos = new ByteArrayOutputStream(); + baos.write(bytes); + + var target = new ParkingOutputStream(); + + try (ExecutorService scheduler = Executors.newFixedThreadPool(1)) { + Thread.Builder builder = virtualThreadBuilder(scheduler); + var started = new CountDownLatch(1); + var vthread1 = builder.start(() -> { + started.countDown(); + try { + baos.writeTo(target); + } catch (IOException ioe) { } + }); + try { + started.await(); + await(vthread1, Thread.State.WAITING); + + // carrier should be released, use it for another thread + var executed = new AtomicBoolean(); + var vthread2 = builder.start(() -> { + executed.set(true); + }); + vthread2.join(); + if (!executed.get()) { + throw new RuntimeException("Second virtual thread did not run"); + } + } finally { + LockSupport.unpark(vthread1); + vthread1.join(); + } + } + + if (!Arrays.equals(target.toByteArray(), bytes)) { + throw new RuntimeException("Expected bytes not written"); + } + } + + /** + * Waits for a thread to get to the expected state. + */ + private static void await(Thread thread, Thread.State expectedState) throws Exception { + Thread.State state = thread.getState(); + while (state != expectedState) { + Thread.sleep(10); + state = thread.getState(); + } + } + + /** + * An OutputStream that parks when writing. + */ + static class ParkingOutputStream extends OutputStream { + final ByteArrayOutputStream baos = new ByteArrayOutputStream(); + + @Override + public void write(int i) { + LockSupport.park(); + baos.write(i); + } + + @Override + public void write(byte[] b, int off, int len) { + LockSupport.park(); + baos.write(b, off, len); + } + + byte[] toByteArray() { + return baos.toByteArray(); + } + } + + /** + * Returns a builder to create virtual threads that use the given scheduler. + */ + static Thread.Builder.OfVirtual virtualThreadBuilder(Executor scheduler) throws Exception { + Class clazz = Class.forName("java.lang.ThreadBuilders$VirtualThreadBuilder"); + Constructor ctor = clazz.getDeclaredConstructor(Executor.class); + ctor.setAccessible(true); + return (Thread.Builder.OfVirtual) ctor.newInstance(scheduler); + } +} diff --git a/test/jdk/java/io/Serializable/records/ProhibitedMethods.java b/test/jdk/java/io/Serializable/records/ProhibitedMethods.java index 371500497f9..53252aaf558 100644 --- a/test/jdk/java/io/Serializable/records/ProhibitedMethods.java +++ b/test/jdk/java/io/Serializable/records/ProhibitedMethods.java @@ -245,7 +245,7 @@ static byte[] addMethod(byte[] classBytes, var cf = ClassFile.of(); return cf.transform(cf.parse(classBytes), ClassTransform.endHandler(clb -> { clb.withMethodBody(name, desc, ACC_PRIVATE, cob -> { - cob.constantInstruction(name + " should not be invoked"); + cob.loadConstant(name + " should not be invoked"); cob.invokestatic(Assert.class.describeConstable().orElseThrow(), "fail", MethodTypeDesc.of(CD_void, CD_String)); cob.return_(); diff --git a/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java b/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java index 31397ad60cb..4ff15aa84d4 100644 --- a/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java +++ b/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java @@ -270,13 +270,13 @@ public void atEnd(ClassBuilder builder) { cob.bipush(i); cob.new_(CD_ObjectStreamField); cob.dup(); - cob.constantInstruction(osf.getName()); + cob.loadConstant(osf.getName()); if (osf.isPrimitive()) { - cob.constantInstruction(DynamicConstantDesc.ofNamed( + cob.loadConstant(DynamicConstantDesc.ofNamed( ConstantDescs.BSM_PRIMITIVE_CLASS, String.valueOf(osf.getTypeCode()), CD_Class)); } else { // Currently Classfile API cannot encode primitive classdescs as condy - cob.constantInstruction(osf.getType().describeConstable().orElseThrow()); + cob.loadConstant(osf.getType().describeConstable().orElseThrow()); } cob.invokespecial(CD_ObjectStreamField, INIT_NAME, MethodTypeDesc.of(CD_void, CD_String, CD_Class)); cob.aastore(); diff --git a/test/jdk/java/io/Serializable/subclassGC/SubclassGC.java b/test/jdk/java/io/Serializable/subclassGC/SubclassGC.java index ae16712c97f..1a37b960d69 100644 --- a/test/jdk/java/io/Serializable/subclassGC/SubclassGC.java +++ b/test/jdk/java/io/Serializable/subclassGC/SubclassGC.java @@ -31,6 +31,11 @@ * @author Andrey Ozerov * @run main/othervm/policy=security.policy SubclassGC */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved + * =========================================================================== + */ import java.io.*; import java.lang.ref.Reference; @@ -74,6 +79,7 @@ public static final void main(String[] args) throws Exception { System.err.println("\nStart Garbage Collection right now"); System.gc(); + System.gc(); Reference> dequeued = queue.remove(TIMEOUT); if (dequeued == ref) { diff --git a/test/jdk/java/lang/ProcessBuilder/JspawnhelperWarnings.java b/test/jdk/java/lang/ProcessBuilder/JspawnhelperWarnings.java index daffb4b8c84..d9896f16e00 100644 --- a/test/jdk/java/lang/ProcessBuilder/JspawnhelperWarnings.java +++ b/test/jdk/java/lang/ProcessBuilder/JspawnhelperWarnings.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/jdk/java/lang/instrument/NativeMethodPrefixAgent.java b/test/jdk/java/lang/instrument/NativeMethodPrefixAgent.java index e8b5bbe7dd9..daf36c2c0b5 100644 --- a/test/jdk/java/lang/instrument/NativeMethodPrefixAgent.java +++ b/test/jdk/java/lang/instrument/NativeMethodPrefixAgent.java @@ -83,8 +83,8 @@ static class Tr implements ClassFileTransformer { byte[] newcf = Instrumentor.instrFor(classfileBuffer) .addNativeMethodTrackingInjection( "wrapped_" + trname + "_", (name, h) -> { - h.constantInstruction(name); - h.constantInstruction(transformId); + h.loadConstant(name); + h.loadConstant(transformId); h.invokestatic( CD_StringIdCallbackReporter, "tracker", diff --git a/test/jdk/java/lang/instrument/RetransformAgent.java b/test/jdk/java/lang/instrument/RetransformAgent.java index f5eadabad16..89300a43a7d 100644 --- a/test/jdk/java/lang/instrument/RetransformAgent.java +++ b/test/jdk/java/lang/instrument/RetransformAgent.java @@ -91,7 +91,7 @@ public byte[] transform(Module module, .addMethodEntryInjection( nname, cb -> { - cb.constantInstruction(fixedIndex); + cb.loadConstant(fixedIndex); cb.invokestatic( CD_RetransformAgent, "callTracker", MTD_void_int); diff --git a/test/jdk/java/lang/instrument/asmlib/Instrumentor.java b/test/jdk/java/lang/instrument/asmlib/Instrumentor.java index ed5e219dd4d..29f2740a874 100644 --- a/test/jdk/java/lang/instrument/asmlib/Instrumentor.java +++ b/test/jdk/java/lang/instrument/asmlib/Instrumentor.java @@ -122,13 +122,13 @@ public void atEnd(MethodBuilder mb) { // load method parameters for (int i = 0; i < mt.parameterCount(); i++) { TypeKind kind = TypeKind.from(mt.parameterType(i)); - cb.loadInstruction(kind, ptr); + cb.loadLocal(kind, ptr); ptr += kind.slotSize(); } - cb.invokeInstruction(isStatic ? Opcode.INVOKESTATIC : Opcode.INVOKESPECIAL, + cb.invoke(isStatic ? Opcode.INVOKESTATIC : Opcode.INVOKESPECIAL, model.thisClass().asSymbol(), newName, mt, false); - cb.returnInstruction(TypeKind.from(mt.returnType())); + cb.return_(TypeKind.from(mt.returnType())); })); } })); diff --git a/test/jdk/java/lang/invoke/MethodHandleProxies/WrapperHiddenClassTest.java b/test/jdk/java/lang/invoke/MethodHandleProxies/WrapperHiddenClassTest.java index 75935cdb2f7..585f44ae504 100644 --- a/test/jdk/java/lang/invoke/MethodHandleProxies/WrapperHiddenClassTest.java +++ b/test/jdk/java/lang/invoke/MethodHandleProxies/WrapperHiddenClassTest.java @@ -94,7 +94,7 @@ private Comparator createHostileInstance() throws Throwable { // clb.withMethodBody(CLASS_INIT_NAME, MTD_void, ACC_STATIC, cob -> { - cob.constantInstruction(CD_Comparator); + cob.loadConstant(CD_Comparator); cob.putstatic(CD_HostileWrapper, TYPE, CD_Class); cob.return_(); }); diff --git a/test/jdk/java/lang/invoke/MethodHandles/classData/ClassDataTest.java b/test/jdk/java/lang/invoke/MethodHandles/classData/ClassDataTest.java index df475e98119..b88ea33e19c 100644 --- a/test/jdk/java/lang/invoke/MethodHandles/classData/ClassDataTest.java +++ b/test/jdk/java/lang/invoke/MethodHandles/classData/ClassDataTest.java @@ -390,8 +390,8 @@ ClassByteBuilder classData(int accessFlags, Class returnType) { MethodTypeDesc mt = MethodTypeDesc.of(returnDesc); cw = cw.andThen(clb -> { clb.withMethodBody("classData", mt, accessFlags, cob -> { - cob.constantInstruction(DynamicConstantDesc.ofNamed(BSM_CLASS_DATA, DEFAULT_NAME, returnDesc)); - cob.returnInstruction(TypeKind.from(returnType)); + cob.loadConstant(DynamicConstantDesc.ofNamed(BSM_CLASS_DATA, DEFAULT_NAME, returnDesc)); + cob.return_(TypeKind.from(returnType)); }); }); return this; @@ -405,8 +405,8 @@ ClassByteBuilder classDataAt(int accessFlags, Class returnType, int index) { MethodTypeDesc mt = MethodTypeDesc.of(returnDesc); cw = cw.andThen(clb -> { clb.withMethodBody("classData", mt, accessFlags, cob -> { - cob.constantInstruction(DynamicConstantDesc.ofNamed(BSM_CLASS_DATA_AT, DEFAULT_NAME, returnDesc, index)); - cob.returnInstruction(TypeKind.from(returnType)); + cob.loadConstant(DynamicConstantDesc.ofNamed(BSM_CLASS_DATA_AT, DEFAULT_NAME, returnDesc, index)); + cob.return_(TypeKind.from(returnType)); }); }); return this; @@ -417,8 +417,8 @@ ClassByteBuilder classData(int accessFlags, String name, Class returnType, Dy MethodTypeDesc mt = MethodTypeDesc.of(returnDesc); cw = cw.andThen(clb -> { clb.withMethodBody(name, mt, accessFlags, cob -> { - cob.constantInstruction(dynamic); - cob.returnInstruction(TypeKind.from(returnType)); + cob.loadConstant(dynamic); + cob.return_(TypeKind.from(returnType)); }); }); return this; diff --git a/test/jdk/java/lang/invoke/common/test/java/lang/invoke/lib/InstructionHelper.java b/test/jdk/java/lang/invoke/common/test/java/lang/invoke/lib/InstructionHelper.java index b0fb9f87119..22f2db7f233 100644 --- a/test/jdk/java/lang/invoke/common/test/java/lang/invoke/lib/InstructionHelper.java +++ b/test/jdk/java/lang/invoke/common/test/java/lang/invoke/lib/InstructionHelper.java @@ -62,7 +62,7 @@ public static MethodHandle invokedynamic(MethodHandles.Lookup l, String name, Me ClassFile.ACC_PUBLIC + ClassFile.ACC_STATIC, methodBuilder -> methodBuilder .withCode(codeBuilder -> { for (int i = 0; i < type.parameterCount(); i++) { - codeBuilder.loadInstruction(TypeKind.from(type.parameterType(i)), i); + codeBuilder.loadLocal(TypeKind.from(type.parameterType(i)), i); } codeBuilder.invokedynamic(DynamicCallSiteDesc.of( MethodHandleDesc.ofMethod( @@ -74,7 +74,7 @@ public static MethodHandle invokedynamic(MethodHandles.Lookup l, String name, Me name, MethodTypeDesc.ofDescriptor(type.toMethodDescriptorString()), boostrapArgs)); - codeBuilder.returnInstruction(TypeKind.from(type.returnType())); + codeBuilder.return_(TypeKind.from(type.returnType())); })); }); Class gc = l.defineClass(byteArray); @@ -116,7 +116,7 @@ public static MethodHandle ldcDynamicConstant(MethodHandles.Lookup l, String nam name, ClassDesc.ofDescriptor(type), bootstrapArgs)) - .returnInstruction(TypeKind.fromDescriptor(type)))); + .return_(TypeKind.fromDescriptor(type)))); }); Class gc = l.defineClass(bytes); return l.findStatic(gc, "m", fromMethodDescriptorString(methodType, l.lookupClass().getClassLoader())); diff --git a/test/jdk/java/lang/invoke/condy/CondyNestedTest.java b/test/jdk/java/lang/invoke/condy/CondyNestedTest.java index 53275905abb..2cdbff4ffdd 100644 --- a/test/jdk/java/lang/invoke/condy/CondyNestedTest.java +++ b/test/jdk/java/lang/invoke/condy/CondyNestedTest.java @@ -138,7 +138,7 @@ public class CondyNestedTest { // .withCode(codeBuilder -> { // codeBuilder // .aload(2) -// .instanceof_(ConstantDescs.CD_MethodType) +// .instanceOf(ConstantDescs.CD_MethodType) // .iconst_0(); // Label condy = codeBuilder.newLabel(); // codeBuilder diff --git a/test/jdk/java/lang/invoke/lookup/SpecialStatic.java b/test/jdk/java/lang/invoke/lookup/SpecialStatic.java index 59db5d29788..4a44a898a77 100644 --- a/test/jdk/java/lang/invoke/lookup/SpecialStatic.java +++ b/test/jdk/java/lang/invoke/lookup/SpecialStatic.java @@ -164,7 +164,7 @@ public static byte[] dumpT3() { }); clb.withMethodBody("getMethodHandle", MethodTypeDesc.of(CD_MethodHandle), ACC_PUBLIC | ACC_STATIC, cob -> { - cob.constantInstruction(MethodHandleDesc.ofMethod(SPECIAL, CD_T1, METHOD_NAME, MTD_int)); + cob.loadConstant(MethodHandleDesc.ofMethod(SPECIAL, CD_T1, METHOD_NAME, MTD_int)); cob.areturn(); }); clb.withMethodBody("getLookup", MTD_Lookup, diff --git a/test/jdk/java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java b/test/jdk/java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java index 17f9c6665c1..2b19189ceed 100644 --- a/test/jdk/java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java +++ b/test/jdk/java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java @@ -68,7 +68,7 @@ private byte[] loadClassData(String name) { clb.withFlags(AccessFlag.ABSTRACT, AccessFlag.INTERFACE, AccessFlag.PUBLIC); clb.withSuperclass(CD_Object); clb.withMethodBody("privInstance", MethodTypeDesc.of(CD_int), ACC_PRIVATE, cob -> { - cob.constantInstruction(EXPECTED); + cob.loadConstant(EXPECTED); cob.ireturn(); }); }); diff --git a/test/jdk/java/net/httpclient/ForbiddenHeadTest.java b/test/jdk/java/net/httpclient/ForbiddenHeadTest.java index 0c39b44d7f5..4b651eb4813 100644 --- a/test/jdk/java/net/httpclient/ForbiddenHeadTest.java +++ b/test/jdk/java/net/httpclient/ForbiddenHeadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -205,18 +205,18 @@ static final void printFailedTests(ITestContext context) { @DataProvider(name = "all") public Object[][] allcases() { List result = new ArrayList<>(); - for (var client : List.of(authClient, noAuthClient)) { + for (boolean useAuth : List.of(true, false)) { for (boolean async : List.of(true, false)) { for (int code : List.of(UNAUTHORIZED, PROXY_UNAUTHORIZED)) { var srv = code == PROXY_UNAUTHORIZED ? "/proxy" : "/server"; for (var auth : List.of("/auth", "/noauth")) { var pcode = code; if (auth.equals("/noauth")) { - if (client == authClient) continue; + if (useAuth) continue; pcode = FORBIDDEN; } for (var uri : List.of(httpURI, httpsURI, http2URI, https2URI)) { - result.add(new Object[]{uri + srv + auth, pcode, async, client}); + result.add(new Object[]{uri + srv + auth, pcode, async, useAuth}); } } } @@ -237,12 +237,13 @@ protected PasswordAuthentication getPasswordAuthentication() { static final AtomicLong sleepCount = new AtomicLong(); @Test(dataProvider = "all") - void test(String uriString, int code, boolean async, HttpClient client) throws Throwable { + void test(String uriString, int code, boolean async, boolean useAuth) throws Throwable { checkSkip(); + HttpClient client = useAuth ? authClient : noAuthClient; var name = String.format("test(%s, %d, %s, %s)", uriString, code, async ? "async" : "sync", client.authenticator().isPresent() ? "authClient" : "noAuthClient"); out.printf("%n---- starting %s ----%n", name); - assert client.authenticator().isPresent() ? client == authClient : client == noAuthClient; + assert client.authenticator().isPresent() == useAuth; uriString = uriString + "/ForbiddenTest"; for (int i=0; i 1) out.printf("---- ITERATION %d%n",i); @@ -381,13 +382,16 @@ public void teardown() throws Exception { authClient = noAuthClient = null; Thread.sleep(100); AssertionError fail = TRACKER.check(500); - - proxy.stop(); - authproxy.stop(); - httpTestServer.stop(); - httpsTestServer.stop(); - http2TestServer.stop(); - https2TestServer.stop(); + try { + proxy.stop(); + authproxy.stop(); + httpTestServer.stop(); + httpsTestServer.stop(); + http2TestServer.stop(); + https2TestServer.stop(); + } finally { + if (fail != null) throw fail; + } } static class TestProxySelector extends ProxySelector { diff --git a/test/jdk/java/net/httpclient/ProxySelectorTest.java b/test/jdk/java/net/httpclient/ProxySelectorTest.java index bb3ddc84017..fd8f85fa6d7 100644 --- a/test/jdk/java/net/httpclient/ProxySelectorTest.java +++ b/test/jdk/java/net/httpclient/ProxySelectorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -377,15 +377,18 @@ public void teardown() throws Exception { client = null; Thread.sleep(100); AssertionError fail = TRACKER.check(500); - - proxy.stop(); - authproxy.stop(); - httpTestServer.stop(); - proxyHttpTestServer.stop(); - authProxyHttpTestServer.stop(); - httpsTestServer.stop(); - http2TestServer.stop(); - https2TestServer.stop(); + try { + proxy.stop(); + authproxy.stop(); + httpTestServer.stop(); + proxyHttpTestServer.stop(); + authProxyHttpTestServer.stop(); + httpsTestServer.stop(); + http2TestServer.stop(); + https2TestServer.stop(); + } finally { + if (fail != null) throw fail; + } } class TestProxySelector extends ProxySelector { diff --git a/test/jdk/java/net/httpclient/RedirectTimeoutTest.java b/test/jdk/java/net/httpclient/RedirectTimeoutTest.java index e907bcd8228..f549898386c 100644 --- a/test/jdk/java/net/httpclient/RedirectTimeoutTest.java +++ b/test/jdk/java/net/httpclient/RedirectTimeoutTest.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/jdk/java/net/httpclient/http2/ExpectContinueResetTest.java b/test/jdk/java/net/httpclient/http2/ExpectContinueResetTest.java index faab08e2862..b733eb180eb 100644 --- a/test/jdk/java/net/httpclient/http2/ExpectContinueResetTest.java +++ b/test/jdk/java/net/httpclient/http2/ExpectContinueResetTest.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/jdk/java/text/Format/CompactNumberFormat/TestCompactNumber.java b/test/jdk/java/text/Format/CompactNumberFormat/TestCompactNumber.java index 723b6b62687..40da19adfe7 100644 --- a/test/jdk/java/text/Format/CompactNumberFormat/TestCompactNumber.java +++ b/test/jdk/java/text/Format/CompactNumberFormat/TestCompactNumber.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ */ /* * @test - * @bug 8177552 8217721 8222756 8295372 8306116 + * @bug 8177552 8217721 8222756 8295372 8306116 8319990 * @summary Checks the functioning of compact number format * @modules jdk.localedata * @run testng/othervm TestCompactNumber @@ -256,9 +256,9 @@ Object[][] compactFormatData() { // Boundary number {FORMAT_IT_SHORT, 1000, "1.000"}, // Long path - {FORMAT_IT_SHORT, 3000000L, "3\u00a0Mio"}, + {FORMAT_IT_SHORT, 3000000L, "3\u00a0Mln"}, // Double path - {FORMAT_IT_SHORT, 3000000.0, "3\u00a0Mio"}, + {FORMAT_IT_SHORT, 3000000.0, "3\u00a0Mln"}, // BigInteger path {FORMAT_IT_SHORT, new BigInteger("12345678901234567890"), "12345679\u00a0Bln"}, @@ -418,9 +418,9 @@ Object[][] compactParseData() { {FORMAT_JA_JP_SHORT, "12345679\u5146", 1.2345679E19, Double.class}, {FORMAT_JA_JP_SHORT, "-12345679\u5146", -1.2345679E19, Double.class}, {FORMAT_IT_SHORT, "-99", -99L, Long.class}, - {FORMAT_IT_SHORT, "1\u00a0Mio", 1000000L, Long.class}, - {FORMAT_IT_SHORT, "30\u00a0Mio", 30000000L, Long.class}, - {FORMAT_IT_SHORT, "-30\u00a0Mio", -30000000L, Long.class}, + {FORMAT_IT_SHORT, "1\u00a0Mln", 1000000L, Long.class}, + {FORMAT_IT_SHORT, "30\u00a0Mln", 30000000L, Long.class}, + {FORMAT_IT_SHORT, "-30\u00a0Mln", -30000000L, Long.class}, {FORMAT_IT_SHORT, "12345679\u00a0Bln", 1.2345679E19, Double.class}, {FORMAT_IT_SHORT, "-12345679\u00a0Bln", -1.2345679E19, Double.class}, {FORMAT_SW_LONG, "-0.0", -0.0, Double.class}, diff --git a/test/jdk/java/text/Format/CompactNumberFormat/TestParseBigDecimal.java b/test/jdk/java/text/Format/CompactNumberFormat/TestParseBigDecimal.java index b4eaf67b976..dc88ce4de4a 100644 --- a/test/jdk/java/text/Format/CompactNumberFormat/TestParseBigDecimal.java +++ b/test/jdk/java/text/Format/CompactNumberFormat/TestParseBigDecimal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ */ /* * @test - * @bug 8177552 8306116 + * @bug 8177552 8306116 8319990 * @summary Checks CNF.parse() when parseBigDecimal is set to true * @modules jdk.localedata * @run testng/othervm TestParseBigDecimal @@ -133,9 +133,9 @@ Object[][] compactParseData() { {FORMAT_JA_JP_SHORT, "12345679\u5146", new BigDecimal("12345679000000000000")}, {FORMAT_JA_JP_SHORT, "-12345679\u5146", new BigDecimal("-12345679000000000000")}, {FORMAT_IT_SHORT, "-99", new BigDecimal("-99")}, - {FORMAT_IT_SHORT, "1\u00a0Mio", new BigDecimal("1000000")}, - {FORMAT_IT_SHORT, "30\u00a0Mio", new BigDecimal("30000000")}, - {FORMAT_IT_SHORT, "-30\u00a0Mio", new BigDecimal("-30000000")}, + {FORMAT_IT_SHORT, "1\u00a0Mln", new BigDecimal("1000000")}, + {FORMAT_IT_SHORT, "30\u00a0Mln", new BigDecimal("30000000")}, + {FORMAT_IT_SHORT, "-30\u00a0Mln", new BigDecimal("-30000000")}, {FORMAT_IT_SHORT, "12345679\u00a0Bln", new BigDecimal("12345679000000000000")}, {FORMAT_IT_SHORT, "-12345679\u00a0Bln", new BigDecimal("-12345679000000000000")}, {FORMAT_SW_LONG, "-0.0", new BigDecimal("-0.0")}, diff --git a/test/jdk/javax/sound/midi/File/SMFInterruptedRunningStatus.java b/test/jdk/javax/sound/midi/File/SMFInterruptedRunningStatus.java new file mode 100644 index 00000000000..8aac012b455 --- /dev/null +++ b/test/jdk/javax/sound/midi/File/SMFInterruptedRunningStatus.java @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.ByteArrayInputStream; + +import javax.sound.midi.MidiSystem; +import javax.sound.midi.Sequence; +import javax.sound.midi.Track; + +/** + * @test + * @bug 8319598 + * @summary SMFParser bug with running status, interrupted by Meta or SysEx messages + */ +public class SMFInterruptedRunningStatus { + + public static void main(String[] args) throws Exception { + + byte[][] files = new byte[][] {SMF_1, SMF_2, SMF_3}; + for (int i = 0; i < files.length; i++) { + Sequence seq = MidiSystem.getSequence( + new ByteArrayInputStream(files[i])); + testSequence(seq, i + 1); + } + + // no exception thrown, all files have been parsed correctly + System.out.println("Test passed"); + } + + private static void testSequence(Sequence seq, int fileNumber) { + + // check number of tracks and number of events + Track[] tracks = seq.getTracks(); + if (1 != tracks.length) { + throw new RuntimeException("file number " + + fileNumber + " fails (incorrect number of tracks: " + + tracks.length + ")"); + } + Track track = tracks[0]; + if (7 != track.size()) { + throw new RuntimeException("file number " + fileNumber + + " fails (incorrect number of events: " + + track.size() + ")"); + } + + // check status byte of each message + int[] expectedStatusBytes = new int[] { + 0x90, 0xFF, 0x90, 0x90, 0x90, 0xFF, 0xFF}; + for (int i = 0; i < expectedStatusBytes.length; i++) { + int expected = expectedStatusBytes[i]; + if (expected != track.get(i).getMessage().getStatus()) { + throw new RuntimeException("file number " + fileNumber + + " fails (wrong status byte in event " + i + ")"); + } + } + } + + // MIDI file without running status - should work equally before + // and after the bugfix + private static final byte[] SMF_1 = { + 0x4D, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, // file header (start) + 0x00, 0x01, 0x00, 0x01, 0x00, (byte) 0x80, // file header (end) + 0x4D, 0x54, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x24, // track header + 0x00, // delta time + (byte) 0x90, 0x3C, 0x7F, // Note-ON (C) + 0x40, // delta time + (byte) 0xFF, 0x01, 0x04, 0x54, 0x65, 0x73, 0x74, // META (text) + 0x20, // delta time + (byte) 0x90, 0x3C, 0x00, // Note-OFF (C) + 0x20, // delta time + (byte) 0x90, 0x3E, 0x7F, // Note-ON (D) + 0x60, // delta time + (byte) 0x90, 0x3E, 0x00, // Note-OFF (D) + 0x20, // delta time + (byte) 0xFF, 0x01, 0x04, 0x54, 0x65, 0x73, 0x74, // META (text) + 0x00, // delta time + (byte) 0xFF, 0x2F, 0x00 // META (end of track) + }; + + // MIDI file with running status, interrupted by a META message + // - failed before the bugfix + private static final byte[] SMF_2 = { + 0x4D, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, // file header (start) + 0x00, 0x01, 0x00, 0x01, 0x00, (byte) 0x80, // file header (end) + 0x4D, 0x54, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x21, // track header + 0x00, // delta time + (byte) 0x90, 0x3C, 0x7F, // Note-ON (C) + 0x40, // delta time + (byte) 0xFF, 0x01, 0x04, 0x54, 0x65, 0x73, 0x74, // META (interruptor) + 0x20, // delta time + 0x3C, 0x00, // Note-OFF (C) - running status + 0x20, // delta time + 0x3E, 0x7F, // Note-ON (D) - running status + 0x60, // delta time + 0x3E, 0x00, // Note-OFF (D) - running status + 0x20, // delta time + (byte) 0xFF, 0x01, 0x04, 0x54, 0x65, 0x73, 0x74, // META (text) + 0x00, // delta time + (byte) 0xFF, 0x2F, 0x00 // META (end of track) + }; + + // MIDI file with running status, interrupted by a META message + // - succeeded before the bugfix but with wrong interpretation of the data + private static final byte[] SMF_3 = { + 0x4D, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, // file header (start) + 0x00, 0x01, 0x00, 0x01, 0x00, (byte) 0x80, // file header (end) + 0x4D, 0x54, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x21, // track header + 0x00, // delta time + (byte) 0x90, 0x3C, 0x7F, // Note-ON (C) + 0x40, // delta time + (byte) 0xFF, 0x01, 0x04, 0x54, 0x65, 0x73, 0x74, // META (interruptor) + 0x20, // delta time + 0x3C, 0x00, // Note-OFF (C) - running status + 0x0D, // delta time + 0x3E, 0x7F, // Note-ON (D) - running status + 0x60, // delta time + 0x3E, 0x00, // Note-OFF (D) - running status + 0x20, // delta time + (byte) 0xFF, 0x01, 0x04, 0x54, 0x65, 0x73, 0x74, // META (text) + 0x00, // delta time + (byte) 0xFF, 0x2F, 0x00 // META (end of track) + }; +} + diff --git a/test/jdk/javax/swing/JTable/JTableScrollPrintTest.java b/test/jdk/javax/swing/JTable/JTableScrollPrintTest.java index 5621b359346..a2bd03081a9 100644 --- a/test/jdk/javax/swing/JTable/JTableScrollPrintTest.java +++ b/test/jdk/javax/swing/JTable/JTableScrollPrintTest.java @@ -41,7 +41,7 @@ /* * @test * @key headful - * @bug 8210807 8322140 + * @bug 8210807 8322140 8322135 * @library /java/awt/regtesthelpers * @build PassFailJFrame * @summary Test to check if JTable can be printed when JScrollPane added to it. diff --git a/test/jdk/javax/swing/JTable/PrintAllPagesTest.java b/test/jdk/javax/swing/JTable/PrintAllPagesTest.java index 263415f641b..284fbe57097 100644 --- a/test/jdk/javax/swing/JTable/PrintAllPagesTest.java +++ b/test/jdk/javax/swing/JTable/PrintAllPagesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ */ /* * @test - * @bug 8257810 + * @bug 8257810 8322135 * @library /java/awt/regtesthelpers * @build PassFailJFrame * @summary Verifies if all pages are printed if scrollRectToVisible is set. diff --git a/test/jdk/javax/swing/plaf/basic/BasicDirectoryModel/LoaderThreadCount.java b/test/jdk/javax/swing/plaf/basic/BasicDirectoryModel/LoaderThreadCount.java new file mode 100644 index 00000000000..689aca5bbdb --- /dev/null +++ b/test/jdk/javax/swing/plaf/basic/BasicDirectoryModel/LoaderThreadCount.java @@ -0,0 +1,277 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import java.util.concurrent.BrokenBarrierException; +import java.util.concurrent.CyclicBarrier; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.LongStream; +import java.util.stream.Stream; + +import javax.swing.JFileChooser; + +/* + * @test + * @bug 8325179 + * @requires os.family == "windows" + * @summary Verifies there's only one BasicDirectoryModel.FilesLoader thread + * at any given moment + * @run main/othervm -Djava.awt.headless=true LoaderThreadCount + */ +public final class LoaderThreadCount extends ThreadGroup { + /** Initial number of files. */ + private static final long NUMBER_OF_FILES = 500; + + /** + * Number of threads running {@code fileChooser.rescanCurrentDirectory()}. + */ + private static final int NUMBER_OF_THREADS = 5; + + /** Number of snapshots with live threads. */ + private static final int SNAPSHOTS = 20; + + /** The barrier to synchronise scanner threads and capturing live threads. */ + private static final CyclicBarrier start = new CyclicBarrier(NUMBER_OF_THREADS + 1); + + /** List of scanner threads. */ + private static final List threads = new ArrayList<>(NUMBER_OF_THREADS); + + /** + * Stores an exception caught by any of the threads. + * If more exceptions are caught, they're added as suppressed exceptions. + */ + private static final AtomicReference exception = + new AtomicReference<>(); + + /** + * Stores an {@code IOException} thrown while removing the files. + */ + private static final AtomicReference ioException = + new AtomicReference<>(); + + + public static void main(String[] args) throws Throwable { + try { + // Start the test in its own thread group to catch and handle + // all thrown exceptions, in particular in + // BasicDirectoryModel.FilesLoader which is created by Swing. + ThreadGroup threadGroup = new LoaderThreadCount(); + Thread runner = new Thread(threadGroup, + LoaderThreadCount::wrapper, + "Test Runner"); + runner.start(); + runner.join(); + } catch (Throwable throwable) { + handleException(throwable); + } + + if (ioException.get() != null) { + System.err.println("An error occurred while removing files:"); + ioException.get().printStackTrace(); + } + + if (exception.get() != null) { + throw exception.get(); + } + } + + private static void wrapper() { + final long timeStart = System.currentTimeMillis(); + try { + runTest(timeStart); + } catch (Throwable throwable) { + handleException(throwable); + } finally { + System.out.printf("Duration: %,d\n", + (System.currentTimeMillis() - timeStart)); + } + } + + private static void runTest(final long timeStart) throws Throwable { + final Path temp = Files.createDirectory(Paths.get("fileChooser-concurrency-" + timeStart)); + + try { + createFiles(temp); + + final JFileChooser fc = new JFileChooser(temp.toFile()); + + threads.addAll(Stream.generate(() -> new Thread(new Scanner(fc))) + .limit(NUMBER_OF_THREADS) + .toList()); + threads.forEach(Thread::start); + + // Create snapshots of live threads + List threadsCapture = + Stream.generate(LoaderThreadCount::getThreadSnapshot) + .limit(SNAPSHOTS) + .toList(); + + threads.forEach(Thread::interrupt); + + List loaderCount = + threadsCapture.stream() + .map(ta -> Arrays.stream(ta) + .filter(Objects::nonNull) + .map(Thread::getName) + .filter(tn -> tn.startsWith("Basic L&F File Loading Thread")) + .count()) + .filter(c -> c > 0) + .toList(); + + if (loaderCount.isEmpty()) { + throw new RuntimeException("Invalid results: no loader threads detected"); + } + + System.out.println("Number of snapshots: " + loaderCount.size()); + + long ones = loaderCount.stream() + .filter(n -> n == 1) + .count(); + long twos = loaderCount.stream() + .filter(n -> n == 2) + .count(); + long count = loaderCount.stream() + .filter(n -> n > 2) + .count(); + System.out.println("Number of snapshots where number of loader threads:"); + System.out.println(" = 1: " + ones); + System.out.println(" = 2: " + twos); + System.out.println(" > 2: " + count); + if (count > 0) { + throw new RuntimeException("Detected " + count + " snapshots " + + "with several loading threads"); + } + } catch (Throwable e) { + threads.forEach(Thread::interrupt); + throw e; + } finally { + deleteFiles(temp); + deleteFile(temp); + } + } + + private static Thread[] getThreadSnapshot() { + try { + start.await(); + // Allow for the scanner threads to initiate re-scanning + Thread.sleep(10); + + Thread[] array = new Thread[Thread.activeCount()]; + Thread.currentThread() + .getThreadGroup() + .enumerate(array, false); + + // Additional delay between captures + Thread.sleep(500); + + return array; + } catch (InterruptedException | BrokenBarrierException e) { + handleException(e); + throw new RuntimeException("getThreadSnapshot is interrupted"); + } + } + + + private LoaderThreadCount() { + super("bdmConcurrency"); + } + + @Override + public void uncaughtException(Thread t, Throwable e) { + handleException(t, e); + } + + private static void handleException(Throwable throwable) { + handleException(Thread.currentThread(), throwable); + } + + private static void handleException(final Thread thread, + final Throwable throwable) { + System.err.println("Exception in " + thread.getName() + ": " + + throwable.getClass() + + (throwable.getMessage() != null + ? ": " + throwable.getMessage() + : "")); + if (!exception.compareAndSet(null, throwable)) { + exception.get().addSuppressed(throwable); + } + threads.stream() + .filter(t -> t != thread) + .forEach(Thread::interrupt); + } + + + private record Scanner(JFileChooser fileChooser) + implements Runnable { + + @Override + public void run() { + try { + do { + start.await(); + fileChooser.rescanCurrentDirectory(); + } while (!Thread.interrupted()); + } catch (InterruptedException | BrokenBarrierException e) { + // Just exit the loop + } + } + } + + private static void createFiles(final Path parent) { + LongStream.range(0, LoaderThreadCount.NUMBER_OF_FILES) + .mapToObj(n -> parent.resolve(n + ".file")) + .forEach(LoaderThreadCount::createFile); + } + + private static void createFile(final Path file) { + try { + Files.createFile(file); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private static void deleteFiles(final Path parent) throws IOException { + try (var stream = Files.walk(parent)) { + stream.filter(p -> p != parent) + .forEach(LoaderThreadCount::deleteFile); + } + } + + private static void deleteFile(final Path file) { + try { + Files.delete(file); + } catch (IOException e) { + if (!ioException.compareAndSet(null, e)) { + ioException.get().addSuppressed(e); + } + } + } +} diff --git a/test/jdk/jdk/classfile/AdaptCodeTest.java b/test/jdk/jdk/classfile/AdaptCodeTest.java index 2fd9fcb2c95..2a75cd7e020 100644 --- a/test/jdk/jdk/classfile/AdaptCodeTest.java +++ b/test/jdk/jdk/classfile/AdaptCodeTest.java @@ -95,7 +95,7 @@ void testSevenOfThirteenIterator() throws Exception { if ((val instanceof Integer) && ((Integer) val) == 13) { val = 7; } - codeB.constantInstruction(i.opcode(), val); + codeB.loadConstant(i.opcode(), val); } default -> codeB.with(codeE); } diff --git a/test/jdk/jdk/classfile/BSMTest.java b/test/jdk/jdk/classfile/BSMTest.java index 79ecfb2f53e..927549f0210 100644 --- a/test/jdk/jdk/classfile/BSMTest.java +++ b/test/jdk/jdk/classfile/BSMTest.java @@ -78,7 +78,7 @@ void testSevenOfThirteenIterator() throws Exception { BootstrapMethodEntry bme = cpb.bsmEntry(methodHandleEntry, staticArgs); ConstantDynamicEntry cde = cpb.constantDynamicEntry(bme, cpb.nameAndTypeEntry("name", CD_String)); - codeB.constantInstruction(Opcode.LDC, cde.constantValue()); + codeB.ldc(cde.constantValue()); } default -> codeB.with(codeE); } diff --git a/test/jdk/jdk/classfile/BuilderBlockTest.java b/test/jdk/jdk/classfile/BuilderBlockTest.java index c75869f740f..c8e13b79f72 100644 --- a/test/jdk/jdk/classfile/BuilderBlockTest.java +++ b/test/jdk/jdk/classfile/BuilderBlockTest.java @@ -64,7 +64,7 @@ void testStartEnd() throws Exception { mb -> mb.withCode(xb -> { startEnd[0] = xb.startLabel(); startEnd[1] = xb.endLabel(); - xb.returnInstruction(TypeKind.VoidType); + xb.return_(); assertEquals(((LabelImpl) startEnd[0]).getBCI(), 0); assertEquals(((LabelImpl) startEnd[1]).getBCI(), -1); })); @@ -83,13 +83,13 @@ void testStartEndBlock() throws Exception { mb -> mb.withCode(xb -> { startEnd[0] = xb.startLabel(); startEnd[1] = xb.endLabel(); - xb.nopInstruction(); + xb.nop(); xb.block(xxb -> { startEnd[2] = xxb.startLabel(); startEnd[3] = xxb.endLabel(); - xxb.nopInstruction(); + xxb.nop(); }); - xb.returnInstruction(TypeKind.VoidType); + xb.return_(); })); }); @@ -106,9 +106,9 @@ void testIfThenReturn() throws Exception { cb.withMethod("foo", MethodTypeDesc.of(CD_int, CD_int), AccessFlags.ofMethod(AccessFlag.PUBLIC, AccessFlag.STATIC).flagsMask(), mb -> mb.withCode(xb -> xb.iload(0) - .ifThen(xxb -> xxb.iconst_1().returnInstruction(TypeKind.IntType)) + .ifThen(xxb -> xxb.iconst_1().ireturn()) .iconst_2() - .returnInstruction(TypeKind.IntType))); + .ireturn())); }); Method fooMethod = new ByteArrayClassLoader(BuilderBlockTest.class.getClassLoader(), "Foo", bytes) @@ -125,8 +125,8 @@ void testIfThenElseReturn() throws Exception { cb.withMethod("foo", MethodTypeDesc.of(CD_int, CD_int), AccessFlags.ofMethod(AccessFlag.PUBLIC, AccessFlag.STATIC).flagsMask(), mb -> mb.withCode(xb -> xb.iload(0) - .ifThenElse(xxb -> xxb.iconst_1().returnInstruction(TypeKind.IntType), - xxb -> xxb.iconst_2().returnInstruction(TypeKind.IntType)))); + .ifThenElse(xxb -> xxb.iconst_1().ireturn(), + xxb -> xxb.iconst_2().ireturn()))); }); Method fooMethod = new ByteArrayClassLoader(BuilderBlockTest.class.getClassLoader(), "Foo", bytes) diff --git a/test/jdk/jdk/classfile/BuilderTryCatchTest.java b/test/jdk/jdk/classfile/BuilderTryCatchTest.java index 89117d4abd1..666b36e11a7 100644 --- a/test/jdk/jdk/classfile/BuilderTryCatchTest.java +++ b/test/jdk/jdk/classfile/BuilderTryCatchTest.java @@ -66,13 +66,13 @@ void testTryCatchCatchAll() throws Throwable { catchBuilder.catching(CD_IOOBE, tb -> { tb.pop(); - tb.constantInstruction(Opcode.LDC, "IndexOutOfBoundsException"); - tb.returnInstruction(TypeKind.ReferenceType); + tb.ldc("IndexOutOfBoundsException"); + tb.areturn(); }).catchingAll(tb -> { tb.pop(); - tb.constantInstruction(Opcode.LDC, "any"); - tb.returnInstruction(TypeKind.ReferenceType); + tb.ldc("any"); + tb.areturn(); }); }); @@ -91,12 +91,12 @@ void testTryCatchCatchAllReachable() throws Throwable { catchBuilder.catching(CD_IOOBE, tb -> { tb.pop(); - tb.constantInstruction(Opcode.LDC, "IndexOutOfBoundsException"); + tb.ldc("IndexOutOfBoundsException"); tb.astore(1); }).catchingAll(tb -> { tb.pop(); - tb.constantInstruction(Opcode.LDC, "any"); + tb.ldc("any"); tb.astore(1); }); }); @@ -132,8 +132,8 @@ void testTryCatch() throws Throwable { catchBuilder.catching(CD_IOOBE, tb -> { tb.pop(); - tb.constantInstruction(Opcode.LDC, "IndexOutOfBoundsException"); - tb.returnInstruction(TypeKind.ReferenceType); + tb.ldc("IndexOutOfBoundsException"); + tb.areturn(); }); }); @@ -153,8 +153,8 @@ void testTryCatchAll() throws Throwable { catchBuilder.catchingAll(tb -> { tb.pop(); - tb.constantInstruction(Opcode.LDC, "any"); - tb.returnInstruction(TypeKind.ReferenceType); + tb.ldc("any"); + tb.areturn(); }); }); @@ -187,7 +187,7 @@ void testEmptyTry() { AccessFlags.ofMethod(AccessFlag.PUBLIC, AccessFlag.STATIC).flagsMask(), mb -> { mb.withCode(xb -> { int stringSlot = xb.allocateLocal(TypeKind.ReferenceType); - xb.constantInstruction("S"); + xb.loadConstant("S"); xb.astore(stringSlot); assertThrows(IllegalArgumentException.class, () -> { @@ -198,14 +198,14 @@ void testEmptyTry() { catchBuilder.catchingAll(tb -> { tb.pop(); - tb.constantInstruction(Opcode.LDC, "any"); - tb.returnInstruction(TypeKind.ReferenceType); + tb.ldc("any"); + tb.areturn(); }); }); }); xb.aload(stringSlot); - xb.returnInstruction(TypeKind.ReferenceType); + xb.areturn(); }); }); }); @@ -218,14 +218,14 @@ void testLocalAllocation() throws Throwable { AccessFlags.ofMethod(AccessFlag.PUBLIC, AccessFlag.STATIC).flagsMask(), mb -> { mb.withCode(xb -> { int stringSlot = xb.allocateLocal(TypeKind.ReferenceType); - xb.constantInstruction("S"); + xb.loadConstant("S"); xb.astore(stringSlot); xb.trying(tb -> { int intSlot = tb.allocateLocal(TypeKind.IntType); tb.aload(0); - tb.constantInstruction(0); + tb.loadConstant(0); // IndexOutOfBoundsException tb.aaload(); // NullPointerException @@ -240,7 +240,7 @@ void testLocalAllocation() throws Throwable { tb.pop(); int doubleSlot = tb.allocateLocal(TypeKind.DoubleType); - tb.constantInstruction(Math.PI); + tb.loadConstant(Math.PI); tb.dstore(doubleSlot); tb.dload(doubleSlot); @@ -250,7 +250,7 @@ void testLocalAllocation() throws Throwable { tb.pop(); int refSlot = tb.allocateLocal(TypeKind.ReferenceType); - tb.constantInstruction("REF"); + tb.loadConstant("REF"); tb.astore(refSlot); tb.aload(refSlot); @@ -260,7 +260,7 @@ void testLocalAllocation() throws Throwable { }); xb.aload(stringSlot); - xb.returnInstruction(TypeKind.ReferenceType); + xb.areturn(); }); }); }); @@ -281,12 +281,12 @@ static byte[] generateTryCatchMethod(Consumer c) { AccessFlags.ofMethod(AccessFlag.PUBLIC, AccessFlag.STATIC).flagsMask(), mb -> { mb.withCode(xb -> { int stringSlot = xb.allocateLocal(TypeKind.ReferenceType); - xb.constantInstruction("S"); + xb.loadConstant("S"); xb.astore(stringSlot); xb.trying(tb -> { tb.aload(0); - tb.constantInstruction(0); + tb.loadConstant(0); // IndexOutOfBoundsException tb.aaload(); // NullPointerException @@ -295,7 +295,7 @@ static byte[] generateTryCatchMethod(Consumer c) { }, c); xb.aload(stringSlot); - xb.returnInstruction(TypeKind.ReferenceType); + xb.areturn(); }); }); }); diff --git a/test/jdk/jdk/classfile/DiscontinuedInstructionsTest.java b/test/jdk/jdk/classfile/DiscontinuedInstructionsTest.java index 8d5b11c28e6..be7e425c694 100644 --- a/test/jdk/jdk/classfile/DiscontinuedInstructionsTest.java +++ b/test/jdk/jdk/classfile/DiscontinuedInstructionsTest.java @@ -50,9 +50,9 @@ void testJsrAndRetProcessing() throws Exception { .withVersion(JAVA_5_VERSION, 0) .withMethodBody(testMethod, MethodTypeDesc.of(CD_void, cd_list), ACC_PUBLIC | ACC_STATIC, cob -> cob .block(bb -> { - bb.constantInstruction("Hello") + bb.loadConstant("Hello") .with(DiscontinuedInstruction.JsrInstruction.of(bb.breakLabel())); - bb.constantInstruction("World") + bb.loadConstant("World") .with(DiscontinuedInstruction.JsrInstruction.of(Opcode.JSR_W, bb.breakLabel())) .return_(); }) diff --git a/test/jdk/jdk/classfile/LDCTest.java b/test/jdk/jdk/classfile/LDCTest.java index 1ece8967576..1e7639de4bb 100644 --- a/test/jdk/jdk/classfile/LDCTest.java +++ b/test/jdk/jdk/classfile/LDCTest.java @@ -49,9 +49,9 @@ void testLDCisConvertedToLDCW() throws Exception { cb.withFlags(AccessFlag.PUBLIC); cb.withVersion(52, 0); cb.withMethod("", MethodTypeDesc.of(CD_void), 0, mb -> mb - .withCode(codeb -> codeb.loadInstruction(TypeKind.ReferenceType, 0) - .invokeInstruction(INVOKESPECIAL, CD_Object, "", MTD_VOID, false) - .returnInstruction(VoidType) + .withCode(codeb -> codeb.aload(0) + .invokespecial(CD_Object, "", MTD_VOID, false) + .return_() ) ) @@ -62,15 +62,15 @@ void testLDCisConvertedToLDCW() throws Exception { for (int i = 0; i <= 256/2 + 2; i++) { // two entries per String StringEntry s = cpb.stringEntry("string" + i); } - c0.constantInstruction(LDC, "string0") - .constantInstruction(LDC, "string131") - .constantInstruction(LDC, "string50") - .constantInstruction(-0.0f) - .constantInstruction(-0.0d) + c0.loadConstant(LDC, "string0") + .loadConstant(LDC, "string131") + .loadConstant(LDC, "string50") + .loadConstant(-0.0f) + .loadConstant(-0.0d) //non-LDC test cases - .constantInstruction(0.0f) - .constantInstruction(0.0d) - .returnInstruction(VoidType); + .loadConstant(0.0f) + .loadConstant(0.0d) + .return_(); })); }); diff --git a/test/jdk/jdk/classfile/LimitsTest.java b/test/jdk/jdk/classfile/LimitsTest.java index d23a948fe9f..5b39c0d4985 100644 --- a/test/jdk/jdk/classfile/LimitsTest.java +++ b/test/jdk/jdk/classfile/LimitsTest.java @@ -23,15 +23,22 @@ /* * @test - * @bug 8320360 + * @bug 8320360 8330684 8331320 * @summary Testing ClassFile limits. * @run junit LimitsTest */ +import java.lang.classfile.Attributes; +import java.lang.classfile.BufWriter; import java.lang.constant.ClassDesc; import java.lang.constant.ConstantDescs; import java.lang.constant.MethodTypeDesc; import java.lang.classfile.ClassFile; +import java.lang.classfile.Opcode; +import java.lang.classfile.attribute.CodeAttribute; +import java.lang.classfile.constantpool.ConstantPoolException; +import jdk.internal.classfile.impl.DirectMethodBuilder; import jdk.internal.classfile.impl.LabelContext; +import jdk.internal.classfile.impl.UnboundAttribute; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; @@ -92,4 +99,57 @@ void testReadingOutOfBounds() { assertThrows(IllegalArgumentException.class, () -> ClassFile.of().parse(new byte[]{(byte)0xCA, (byte)0xFE, (byte)0xBA, (byte)0xBE}), "reading magic only"); assertThrows(IllegalArgumentException.class, () -> ClassFile.of().parse(new byte[]{(byte)0xCA, (byte)0xFE, (byte)0xBA, (byte)0xBE, 0, 0, 0, 0, 0, 2}), "reading invalid CP size"); } + + @Test + void testInvalidClassEntry() { + assertThrows(ConstantPoolException.class, () -> ClassFile.of().parse(new byte[]{(byte)0xCA, (byte)0xFE, (byte)0xBA, (byte)0xBE, + 0, 0, 0, 0, 0, 2, ClassFile.TAG_METHODREF, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}).thisClass()); + } + + @Test + void testInvalidLookupSwitch() { + assertThrows(IllegalArgumentException.class, () -> + ClassFile.of().parse(ClassFile.of().build(ClassDesc.of("LookupSwitchClass"), cb -> cb.withMethod( + "lookupSwitchMethod", MethodTypeDesc.of(ConstantDescs.CD_void), 0, mb -> + ((DirectMethodBuilder)mb).writeAttribute(new UnboundAttribute.AdHocAttribute(Attributes.CODE) { + @Override + public void writeBody(BufWriter b) { + b.writeU2(-1);//max stack + b.writeU2(-1);//max locals + b.writeInt(16); + b.writeU1(Opcode.NOP.bytecode()); + b.writeU1(Opcode.NOP.bytecode()); + b.writeU1(Opcode.NOP.bytecode()); + b.writeU1(Opcode.NOP.bytecode()); + b.writeU1(Opcode.LOOKUPSWITCH.bytecode()); + b.writeU1(0); //padding + b.writeU2(0); //padding + b.writeInt(0); //default + b.writeInt(-2); //npairs to jump back and cause OOME if not checked + b.writeU2(0);//exception handlers + b.writeU2(0);//attributes + }})))).methods().get(0).code().get().elementList()); + } + + @Test + void testInvalidTableSwitch() { + assertThrows(IllegalArgumentException.class, () -> + ClassFile.of().parse(ClassFile.of().build(ClassDesc.of("TableSwitchClass"), cb -> cb.withMethod( + "tableSwitchMethod", MethodTypeDesc.of(ConstantDescs.CD_void), 0, mb -> + ((DirectMethodBuilder)mb).writeAttribute(new UnboundAttribute.AdHocAttribute(Attributes.CODE) { + @Override + public void writeBody(BufWriter b) { + b.writeU2(-1);//max stack + b.writeU2(-1);//max locals + b.writeInt(16); + b.writeU1(Opcode.TABLESWITCH.bytecode()); + b.writeU1(0); //padding + b.writeU2(0); //padding + b.writeInt(0); //default + b.writeInt(0); //low + b.writeInt(-5); //high to jump back and cause OOME if not checked + b.writeU2(0);//exception handlers + b.writeU2(0);//attributes + }})))).methods().get(0).code().get().elementList()); + } } diff --git a/test/jdk/jdk/classfile/LowAdaptTest.java b/test/jdk/jdk/classfile/LowAdaptTest.java index 4be4a259ac0..46d033a8676 100644 --- a/test/jdk/jdk/classfile/LowAdaptTest.java +++ b/test/jdk/jdk/classfile/LowAdaptTest.java @@ -80,15 +80,15 @@ void testAdapt() throws Exception { cb.withMethod("doit", MethodTypeDesc.of(CD_int, CD_int), AccessFlags.ofMethod(AccessFlag.PUBLIC, AccessFlag.STATIC).flagsMask(), mb -> mb.withCode(xb -> { - xb.invokeDynamicInstruction(indy); - xb.storeInstruction(TypeKind.ReferenceType, 1); - xb.loadInstruction(TypeKind.ReferenceType, 1); - xb.loadInstruction(TypeKind.IntType, 0); - xb.invokeInstruction(Opcode.INVOKEINTERFACE, ClassDesc.of("java.util.function.IntUnaryOperator"), - "applyAsInt", MethodTypeDesc.ofDescriptor("(I)I"), true); - xb.storeInstruction(TypeKind.IntType, 2); - xb.loadInstruction(TypeKind.IntType, 2); - xb.returnInstruction(TypeKind.IntType); + xb.invokedynamic(indy); + xb.astore(1); + xb.aload(1); + xb.iload(0); + xb.invokeinterface(ClassDesc.of("java.util.function.IntUnaryOperator"), + "applyAsInt", MethodTypeDesc.ofDescriptor("(I)I")); + xb.istore(2); + xb.iload(2); + xb.ireturn(); })); }); diff --git a/test/jdk/jdk/classfile/LvtTest.java b/test/jdk/jdk/classfile/LvtTest.java index 1c35b071cc2..35ec8dfcfa3 100644 --- a/test/jdk/jdk/classfile/LvtTest.java +++ b/test/jdk/jdk/classfile/LvtTest.java @@ -122,9 +122,9 @@ void testCreateLoadLVT() throws Exception { cb.withVersion(52, 0); cb.with(SourceFileAttribute.of(cb.constantPool().utf8Entry(("MyClass.java")))) .withMethod("", MethodTypeDesc.of(CD_void), 0, mb -> mb - .withCode(codeb -> codeb.loadInstruction(TypeKind.ReferenceType, 0) - .invokeInstruction(INVOKESPECIAL, CD_Object, "", MTD_VOID, false) - .returnInstruction(VoidType) + .withCode(codeb -> codeb.aload(0) + .invokespecial(CD_Object, "", MTD_VOID, false) + .return_() ) ) .withMethod("main", MethodTypeDesc.of(CD_void, CD_String.arrayType()), @@ -146,27 +146,27 @@ void testCreateLoadLVT() throws Exception { c0.localVariable(1, i1n, intSig, i1, preEnd) // LV Entries can be added before the labels .localVariable(2, i2, intSig, loopTop, preEnd) .labelBinding(start) - .constantInstruction(ICONST_1, 1) // 0 - .storeInstruction(TypeKind.IntType, 1) // 1 + .iconst_1() // 0 + .istore(1) // 1 .labelBinding(i1) - .constantInstruction(ICONST_1, 1) // 2 - .storeInstruction(TypeKind.IntType, 2) // 3 + .iconst_1() // 2 + .istore(2) // 3 .labelBinding(loopTop) - .loadInstruction(TypeKind.IntType, 2) // 4 - .constantInstruction(BIPUSH, 10) // 5 - .branchInstruction(IF_ICMPGE, loopEnd) // 6 - .loadInstruction(TypeKind.IntType, 1) // 7 - .loadInstruction(TypeKind.IntType, 2) // 8 - .operatorInstruction(IMUL) // 9 - .storeInstruction(TypeKind.IntType, 1) // 10 - .incrementInstruction(2, 1) // 11 - .branchInstruction(GOTO, loopTop) // 12 + .iload(2) // 4 + .bipush(10) // 5 + .if_icmpge(loopEnd) // 6 + .iload(1) // 7 + .iload(2) // 8 + .imul() // 9 + .istore(1) // 10 + .iinc(2, 1) // 11 + .goto_(loopTop) // 12 .labelBinding(loopEnd) - .fieldInstruction(GETSTATIC, CD_System, "out", CD_PrintStream) // 13 - .loadInstruction(TypeKind.IntType, 1) - .invokeInstruction(INVOKEVIRTUAL, CD_PrintStream, "println", MTD_INT_VOID, false) // 15 + .getstatic(CD_System, "out", CD_PrintStream) // 13 + .iload(1) + .invokevirtual(CD_PrintStream, "println", MTD_INT_VOID) // 15 .labelBinding(preEnd) - .returnInstruction(VoidType) + .return_() .labelBinding(end) .localVariable(0, slotName, desc, start, end); // and lv entries can be added after the labels })); @@ -236,9 +236,9 @@ void testCreateLoadLVTT() throws Exception { cb.with(SourceFileAttribute.of(cb.constantPool().utf8Entry(("MyClass.java")))) .withMethod("", MethodTypeDesc.of(CD_void), 0, mb -> mb - .withCode(codeb -> codeb.loadInstruction(TypeKind.ReferenceType, 0) - .invokeInstruction(INVOKESPECIAL, CD_Object, "", MTD_VOID, false) - .returnInstruction(VoidType) + .withCode(codeb -> codeb.aload(0) + .invokespecial(CD_Object, "", MTD_VOID, false) + .return_() ) ) @@ -263,14 +263,14 @@ void testCreateLoadLVTT() throws Exception { c0.localVariable(2, l, juList, beforeRet, end) .localVariableType(1, u, TU, start, end) .labelBinding(start) - .newObjectInstruction(ClassDesc.of("java.util.ArrayList")) - .stackInstruction(DUP) - .invokeInstruction(INVOKESPECIAL, CD_ArrayList, "", MTD_VOID, false) - .storeInstruction(TypeKind.ReferenceType, 2) + .new_(ClassDesc.of("java.util.ArrayList")) + .dup() + .invokespecial(CD_ArrayList, "", MTD_VOID, false) + .astore(2) .labelBinding(beforeRet) .localVariableType(2, l, sig, beforeRet, end) - .loadInstruction(TypeKind.ReferenceType, 1) - .returnInstruction(TypeKind.ReferenceType) + .aload(1) + .areturn() .labelBinding(end) .localVariable(0, slotName, desc, start, end) .localVariable(1, u, jlObject, start, end); diff --git a/test/jdk/jdk/classfile/OneToOneTest.java b/test/jdk/jdk/classfile/OneToOneTest.java index 5db0489ac3e..b20d07025e6 100644 --- a/test/jdk/jdk/classfile/OneToOneTest.java +++ b/test/jdk/jdk/classfile/OneToOneTest.java @@ -68,9 +68,9 @@ void testClassWriteRead() { cb.with(SourceFileAttribute.of(cb.constantPool().utf8Entry(("MyClass.java")))) .withMethod("", MethodTypeDesc.of(CD_void), 0, mb -> mb - .withCode(codeb -> codeb.loadInstruction(TypeKind.ReferenceType, 0) - .invokeInstruction(INVOKESPECIAL, CD_Object, "", MTD_VOID, false) - .returnInstruction(TypeKind.VoidType) + .withCode(codeb -> codeb.aload(0) + .invokespecial(CD_Object, "", MTD_VOID, false) + .return_() ) ) .withMethod("main", MethodTypeDesc.of(CD_void, CD_String.arrayType()), @@ -80,25 +80,25 @@ void testClassWriteRead() { Label loopEnd = c0.newLabel(); int fac = 1; int i = 2; - c0.constantInstruction(ICONST_1, 1) // 0 - .storeInstruction(TypeKind.IntType, fac) // 1 - .constantInstruction(ICONST_1, 1) // 2 - .storeInstruction(TypeKind.IntType, i) // 3 + c0.iconst_1() // 0 + .istore(fac) // 1 + .iconst_1() // 2 + .istore(i) // 3 .labelBinding(loopTop) - .loadInstruction(TypeKind.IntType, i) // 4 - .constantInstruction(BIPUSH, 10) // 5 - .branchInstruction(IF_ICMPGE, loopEnd) // 6 - .loadInstruction(TypeKind.IntType, fac) // 7 - .loadInstruction(TypeKind.IntType, i) // 8 - .operatorInstruction(IMUL) // 9 - .storeInstruction(TypeKind.IntType, fac) // 10 - .incrementInstruction(i, 1) // 11 - .branchInstruction(GOTO, loopTop) // 12 + .iload(i) // 4 + .bipush(10) // 5 + .if_icmpge(loopEnd) // 6 + .iload(fac) // 7 + .iload(i) // 8 + .imul() // 9 + .istore(fac) // 10 + .iinc(i, 1) // 11 + .goto_(loopTop) // 12 .labelBinding(loopEnd) - .fieldInstruction(GETSTATIC, CD_System, "out", CD_PrintStream) // 13 - .loadInstruction(TypeKind.IntType, fac) - .invokeInstruction(INVOKEVIRTUAL, CD_PrintStream, "println", MTD_INT_VOID, false) // 15 - .returnInstruction(TypeKind.VoidType); + .getstatic(CD_System, "out", CD_PrintStream) // 13 + .iload(fac) + .invokevirtual(CD_PrintStream, "println", MTD_INT_VOID) // 15 + .return_(); } ) ); diff --git a/test/jdk/jdk/classfile/OpcodesValidationTest.java b/test/jdk/jdk/classfile/OpcodesValidationTest.java index 085ba631349..f44bdfd2725 100644 --- a/test/jdk/jdk/classfile/OpcodesValidationTest.java +++ b/test/jdk/jdk/classfile/OpcodesValidationTest.java @@ -107,7 +107,7 @@ private void testPositiveCase(Opcode opcode, Object constant) { cb -> cb.withFlags(AccessFlag.PUBLIC) .withMethod("", MethodTypeDesc.of(CD_void), 0, mb -> mb.withCode( - codeb -> codeb.constantInstruction(opcode, (ConstantDesc) constant)))); + codeb -> codeb.loadConstant(opcode, (ConstantDesc) constant)))); } @@ -124,6 +124,6 @@ private void testNegativeCase(Opcode opcode, Object constant) { cb -> cb.withFlags(AccessFlag.PUBLIC) .withMethod("", MethodTypeDesc.of(CD_void), 0, mb -> mb .withCode( - codeb -> codeb.constantInstruction(opcode, (ConstantDesc)constant)))); + codeb -> codeb.loadConstant(opcode, (ConstantDesc)constant)))); } } diff --git a/test/jdk/jdk/classfile/OptionsTest.java b/test/jdk/jdk/classfile/OptionsTest.java index 4a47c899d8e..eecc2d7a385 100644 --- a/test/jdk/jdk/classfile/OptionsTest.java +++ b/test/jdk/jdk/classfile/OptionsTest.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/jdk/jdk/classfile/PrimitiveClassConstantTest.java b/test/jdk/jdk/classfile/PrimitiveClassConstantTest.java index 376fe389826..89cf43751f8 100644 --- a/test/jdk/jdk/classfile/PrimitiveClassConstantTest.java +++ b/test/jdk/jdk/classfile/PrimitiveClassConstantTest.java @@ -60,7 +60,7 @@ public void test() throws Throwable { cob.return_(); }); clb.withMethodBody("get", MethodTypeDesc.of(CD_Object), ACC_PUBLIC, cob -> { - cob.constantInstruction(CD_int); + cob.loadConstant(CD_int); cob.areturn(); }); clb.withMethodBody("get2", MethodTypeDesc.of(CD_Class), ACC_PUBLIC, cob -> { diff --git a/test/jdk/jdk/classfile/ShortJumpsFixTest.java b/test/jdk/jdk/classfile/ShortJumpsFixTest.java index 15a777bf713..a259795b551 100644 --- a/test/jdk/jdk/classfile/ShortJumpsFixTest.java +++ b/test/jdk/jdk/classfile/ShortJumpsFixTest.java @@ -211,9 +211,9 @@ private static ClassModel generateFwd(ClassFile cc, Sample sample, boolean overf for (int i = 0; i < sample.expected.length - 4; i++) //cherry-pick XCONST_ instructions from expected output cob.with(ConstantInstruction.ofIntrinsic(sample.expected[i])); var target = cob.newLabel(); - cob.branchInstruction(sample.jumpCode, target); + cob.branch(sample.jumpCode, target); for (int i = overflow ? 40000 : 1; i > 0; i--) - cob.nopInstruction(); + cob.nop(); cob.labelBinding(target); cob.return_(); })))); @@ -228,12 +228,12 @@ private static ClassModel generateBack(ClassFile cc, Sample sample, boolean over cob.goto_w(fwd); cob.labelBinding(target); for (int i = overflow ? 40000 : 1; i > 0; i--) - cob.nopInstruction(); + cob.nop(); cob.return_(); cob.labelBinding(fwd); for (int i = 3; i < sample.expected.length - 3; i++) //cherry-pick XCONST_ instructions from expected output cob.with(ConstantInstruction.ofIntrinsic(sample.expected[i])); - cob.branchInstruction(sample.jumpCode, target); + cob.branch(sample.jumpCode, target); cob.return_(); })))); } @@ -244,7 +244,7 @@ private static ClassTransform overflow() { (cob, coe) -> { if (coe instanceof NopInstruction) for (int i = 0; i < 40000; i++) //cause label overflow during transform - cob.nopInstruction(); + cob.nop(); cob.with(coe); })); } diff --git a/test/jdk/jdk/classfile/StackMapsTest.java b/test/jdk/jdk/classfile/StackMapsTest.java index 88858ce8394..b3df31291bc 100644 --- a/test/jdk/jdk/classfile/StackMapsTest.java +++ b/test/jdk/jdk/classfile/StackMapsTest.java @@ -286,10 +286,10 @@ void testInvalidStack() throws Exception { Label next = cb.newLabel(); cb.iload(0); cb.ifeq(next); - cb.constantInstruction(0.0d); + cb.loadConstant(0.0d); cb.goto_(target); cb.labelBinding(next); - cb.constantInstruction(0); + cb.loadConstant(0); cb.labelBinding(target); cb.pop(); }))); @@ -304,10 +304,10 @@ void testInvalidStack() throws Exception { Label next = cb.newLabel(); cb.iload(0); cb.ifeq(next); - cb.constantInstruction(0.0f); + cb.loadConstant(0.0f); cb.goto_(target); cb.labelBinding(next); - cb.constantInstruction(0); + cb.loadConstant(0); cb.labelBinding(target); cb.pop(); }))); diff --git a/test/jdk/jdk/classfile/StackTrackerTest.java b/test/jdk/jdk/classfile/StackTrackerTest.java index 15a5fe490ba..ba472231079 100644 --- a/test/jdk/jdk/classfile/StackTrackerTest.java +++ b/test/jdk/jdk/classfile/StackTrackerTest.java @@ -58,7 +58,7 @@ void testStackTracker() { assertIterableEquals(stackTracker.stack().get(), List.of(IntType, LongType, ReferenceType, DoubleType, FloatType)); tryb.ifThen(thb -> { assertIterableEquals(stackTracker.stack().get(), List.of(LongType, ReferenceType, DoubleType, FloatType)); - thb.constantInstruction(ClassDesc.of("Phee")); + thb.loadConstant(ClassDesc.of("Phee")); assertIterableEquals(stackTracker.stack().get(), List.of(ReferenceType, LongType, ReferenceType, DoubleType, FloatType)); thb.athrow(); assertFalse(stackTracker.stack().isPresent()); @@ -91,7 +91,7 @@ void testTrackingLost() { var l2 = stcb.newBoundLabel(); //back jump target assertFalse(stackTracker.stack().isPresent()); //no stack assertTrue(stackTracker.maxStackSize().isPresent()); //however still tracking - stcb.constantInstruction(ClassDesc.of("Phee")); //stack instruction on unknown stack cause tracking lost + stcb.loadConstant(ClassDesc.of("Phee")); //stack instruction on unknown stack cause tracking lost assertFalse(stackTracker.stack().isPresent()); //no stack assertFalse(stackTracker.maxStackSize().isPresent()); //because tracking lost stcb.athrow(); diff --git a/test/jdk/jdk/classfile/TempConstantPoolBuilderTest.java b/test/jdk/jdk/classfile/TempConstantPoolBuilderTest.java index 0c324846647..f2debf041e4 100644 --- a/test/jdk/jdk/classfile/TempConstantPoolBuilderTest.java +++ b/test/jdk/jdk/classfile/TempConstantPoolBuilderTest.java @@ -58,9 +58,9 @@ void addAnno() { cb.withFlags(AccessFlag.PUBLIC) .with(SourceFileAttribute.of(cb.constantPool().utf8Entry(("MyClass.java")))) .withMethod("", MethodTypeDesc.of(CD_void), 0, mb -> mb - .withCode(codeb -> codeb.loadInstruction(TypeKind.ReferenceType, 0) - .invokeInstruction(INVOKESPECIAL, CD_Object, "", MTD_VOID, false) - .returnInstruction(VoidType) + .withCode(codeb -> codeb.aload(0) + .invokespecial(CD_Object, "", MTD_VOID, false) + .return_() ) .with(RuntimeVisibleAnnotationsAttribute.of(Annotation.of(INTERFACE, AnnotationElement.ofString("foo", "bar")))) diff --git a/test/jdk/jdk/classfile/TransformTests.java b/test/jdk/jdk/classfile/TransformTests.java index 31e75dc2ef2..13abca0ec52 100644 --- a/test/jdk/jdk/classfile/TransformTests.java +++ b/test/jdk/jdk/classfile/TransformTests.java @@ -59,7 +59,7 @@ class TransformTests { static CodeTransform swapLdc(String x, String y) { return (b, e) -> { if (e instanceof ConstantInstruction ci && ci.constantValue().equals(x)) { - b.constantInstruction(y); + b.loadConstant(y); } else b.with(e); diff --git a/test/jdk/jdk/classfile/Utf8EntryTest.java b/test/jdk/jdk/classfile/Utf8EntryTest.java index e4cc5664992..82815755761 100644 --- a/test/jdk/jdk/classfile/Utf8EntryTest.java +++ b/test/jdk/jdk/classfile/Utf8EntryTest.java @@ -196,7 +196,7 @@ static StringEntry obtainStringEntry(ConstantPool cp) { static byte[] createClassFile(String s) { return ClassFile.of().build(ClassDesc.of("C"), clb -> clb.withMethod("m", MethodTypeDesc.of(CD_void), 0, - mb -> mb.withCode(cb -> cb.constantInstruction(s) - .returnInstruction(VoidType)))); + mb -> mb.withCode(cb -> cb.loadConstant(s) + .return_()))); } } diff --git a/test/jdk/jdk/classfile/WriteTest.java b/test/jdk/jdk/classfile/WriteTest.java index afd5c9f5e34..b4af9135d12 100644 --- a/test/jdk/jdk/classfile/WriteTest.java +++ b/test/jdk/jdk/classfile/WriteTest.java @@ -54,10 +54,10 @@ void testJavapWrite() { cb.withFlags(AccessFlag.PUBLIC); cb.with(SourceFileAttribute.of(cb.constantPool().utf8Entry(("MyClass.java")))) .withMethod("", MethodTypeDesc.of(CD_void), 0, mb -> mb - .withCode(codeb -> codeb.loadInstruction(TypeKind.ReferenceType, 0) - .invokeInstruction(INVOKESPECIAL, CD_Object, "", + .withCode(codeb -> codeb.aload(0) + .invokespecial(CD_Object, "", MethodTypeDesc.ofDescriptor("()V"), false) - .returnInstruction(VoidType) + .return_() ) ) .withMethod("main", MethodTypeDesc.of(CD_void, CD_String.arrayType()), @@ -66,25 +66,25 @@ void testJavapWrite() { Label loopTop = c0.newLabel(); Label loopEnd = c0.newLabel(); c0 - .constantInstruction(ICONST_1, 1) // 0 - .storeInstruction(TypeKind.IntType, 1) // 1 - .constantInstruction(ICONST_1, 1) // 2 - .storeInstruction(TypeKind.IntType, 2) // 3 + .iconst_1() // 0 + .istore(1) // 1 + .iconst_1() // 2 + .istore(2) // 3 .labelBinding(loopTop) - .loadInstruction(TypeKind.IntType, 2) // 4 - .constantInstruction(BIPUSH, 10) // 5 - .branchInstruction(IF_ICMPGE, loopEnd) // 6 - .loadInstruction(TypeKind.IntType, 1) // 7 - .loadInstruction(TypeKind.IntType, 2) // 8 - .operatorInstruction(IMUL) // 9 - .storeInstruction(TypeKind.IntType, 1) // 10 - .incrementInstruction(2, 1) // 11 - .branchInstruction(GOTO, loopTop) // 12 + .iload(2) // 4 + .bipush(10) // 5 + .if_icmpge(loopEnd) // 6 + .iload(1) // 7 + .iload(2) // 8 + .imul() // 9 + .istore(1) // 10 + .iinc(2, 1) // 11 + .goto_(loopTop) // 12 .labelBinding(loopEnd) - .fieldInstruction(GETSTATIC, TestConstants.CD_System, "out", TestConstants.CD_PrintStream) // 13 - .loadInstruction(TypeKind.IntType, 1) - .invokeInstruction(INVOKEVIRTUAL, TestConstants.CD_PrintStream, "println", TestConstants.MTD_INT_VOID, false) // 15 - .returnInstruction(VoidType); + .getstatic(TestConstants.CD_System, "out", TestConstants.CD_PrintStream) // 13 + .iload(1) + .invokevirtual(TestConstants.CD_PrintStream, "println", TestConstants.MTD_INT_VOID) // 15 + .return_(); })); }); } @@ -96,9 +96,9 @@ void testPrimitiveWrite() { cb.withFlags(AccessFlag.PUBLIC) .with(SourceFileAttribute.of(cb.constantPool().utf8Entry(("MyClass.java")))) .withMethod("", MethodTypeDesc.of(CD_void), 0, mb -> mb - .withCode(codeb -> codeb.loadInstruction(ReferenceType, 0) - .invokeInstruction(INVOKESPECIAL, CD_Object, "", MTD_VOID, false) - .returnInstruction(VoidType) + .withCode(codeb -> codeb.aload(0) + .invokespecial(CD_Object, "", MTD_VOID, false) + .return_() ) ) .withMethod("main", MethodTypeDesc.of(CD_void, CD_String.arrayType()), @@ -107,25 +107,25 @@ void testPrimitiveWrite() { Label loopTop = c0.newLabel(); Label loopEnd = c0.newLabel(); c0 - .constantInstruction(ICONST_1, 1) // 0 - .storeInstruction(IntType, 1) // 1 - .constantInstruction(ICONST_1, 1) // 2 - .storeInstruction(IntType, 2) // 3 + .iconst_1() // 0 + .istore(1) // 1 + .iconst_1() // 2 + .istore(2) // 3 .labelBinding(loopTop) - .loadInstruction(IntType, 2) // 4 - .constantInstruction(BIPUSH, 10) // 5 - .branchInstruction(IF_ICMPGE, loopEnd) // 6 - .loadInstruction(IntType, 1) // 7 - .loadInstruction(IntType, 2) // 8 - .operatorInstruction(IMUL) // 9 - .storeInstruction(IntType, 1) // 10 - .incrementInstruction(2, 1) // 11 - .branchInstruction(GOTO, loopTop) // 12 + .iload(2) // 4 + .bipush(10) // 5 + .if_icmpge(loopEnd) // 6 + .iload(1) // 7 + .iload(2) // 8 + .imul() // 9 + .istore(1) // 10 + .iinc(2, 1) // 11 + .goto_(loopTop) // 12 .labelBinding(loopEnd) - .fieldInstruction(GETSTATIC, TestConstants.CD_System, "out", TestConstants.CD_PrintStream) // 13 - .loadInstruction(IntType, 1) - .invokeInstruction(INVOKEVIRTUAL, TestConstants.CD_PrintStream, "println", TestConstants.MTD_INT_VOID, false) // 15 - .returnInstruction(VoidType); + .getstatic(TestConstants.CD_System, "out", TestConstants.CD_PrintStream) // 13 + .iload(1) + .invokevirtual(TestConstants.CD_PrintStream, "println", TestConstants.MTD_INT_VOID) // 15 + .return_(); })); }); } diff --git a/test/jdk/jdk/classfile/examples/ExampleGallery.java b/test/jdk/jdk/classfile/examples/ExampleGallery.java index cb155e6f64a..736725eeebe 100644 --- a/test/jdk/jdk/classfile/examples/ExampleGallery.java +++ b/test/jdk/jdk/classfile/examples/ExampleGallery.java @@ -251,7 +251,7 @@ public byte[] addInstrumentation(ClassModel cm) { @Override public void accept(CodeBuilder codeB, CodeElement codeE) { if (found) { - codeB.nopInstruction(); + codeB.nop(); found = false; } codeB.with(codeE); @@ -265,7 +265,7 @@ public byte[] addInstrumentationBeforeInvoke(ClassModel cm) { return ClassFile.of().transform(cm, ClassTransform.transformingMethodBodies((codeB, codeE) -> { switch (codeE) { case InvokeInstruction i -> { - codeB.nopInstruction(); + codeB.nop(); codeB.with(codeE); } default -> codeB.with(codeE); @@ -277,7 +277,7 @@ public byte[] replaceIntegerConstant(ClassModel cm) { return ClassFile.of().transform(cm, ClassTransform.transformingMethodBodies((codeB, codeE) -> { switch (codeE) { case ConstantInstruction ci -> { - if (ci.constantValue() instanceof Integer i) codeB.constantInstruction(i + 1); + if (ci.constantValue() instanceof Integer i) codeB.loadConstant(i + 1); else codeB.with(codeE); } default -> codeB.with(codeE); diff --git a/test/jdk/jdk/classfile/helpers/InstructionModelToCodeBuilder.java b/test/jdk/jdk/classfile/helpers/InstructionModelToCodeBuilder.java index 828862ef2cc..d7d9e9c267f 100644 --- a/test/jdk/jdk/classfile/helpers/InstructionModelToCodeBuilder.java +++ b/test/jdk/jdk/classfile/helpers/InstructionModelToCodeBuilder.java @@ -35,53 +35,53 @@ public class InstructionModelToCodeBuilder { public static void toBuilder(CodeElement model, CodeBuilder cb) { switch (model) { case LoadInstruction im -> - cb.loadInstruction(im.typeKind(), im.slot()); + cb.loadLocal(im.typeKind(), im.slot()); case StoreInstruction im -> - cb.storeInstruction(im.typeKind(), im.slot()); + cb.storeLocal(im.typeKind(), im.slot()); case IncrementInstruction im -> - cb.incrementInstruction(im.slot(), im.constant()); + cb.iinc(im.slot(), im.constant()); case BranchInstruction im -> - cb.branchInstruction(im.opcode(), im.target()); + cb.branch(im.opcode(), im.target()); case LookupSwitchInstruction im -> - cb.lookupSwitchInstruction(im.defaultTarget(), im.cases()); + cb.lookupswitch(im.defaultTarget(), im.cases()); case TableSwitchInstruction im -> - cb.tableSwitchInstruction(im.lowValue(), im.highValue(), im.defaultTarget(), im.cases()); + cb.tableswitch(im.lowValue(), im.highValue(), im.defaultTarget(), im.cases()); case ReturnInstruction im -> - cb.returnInstruction(im.typeKind()); + cb.return_(im.typeKind()); case ThrowInstruction im -> - cb.throwInstruction(); + cb.athrow(); case FieldInstruction im -> - cb.fieldInstruction(im.opcode(), im.owner().asSymbol(), im.name().stringValue(), im.typeSymbol()); + cb.fieldAccess(im.opcode(), im.owner().asSymbol(), im.name().stringValue(), im.typeSymbol()); case InvokeInstruction im -> - cb.invokeInstruction(im.opcode(), im.owner().asSymbol(), im.name().stringValue(), im.typeSymbol(), im.isInterface()); + cb.invoke(im.opcode(), im.owner().asSymbol(), im.name().stringValue(), im.typeSymbol(), im.isInterface()); case InvokeDynamicInstruction im -> - cb.invokeDynamicInstruction(DynamicCallSiteDesc.of(im.bootstrapMethod(), im.name().stringValue(), MethodTypeDesc.ofDescriptor(im.type().stringValue()), im.bootstrapArgs().toArray(ConstantDesc[]::new))); + cb.invokedynamic(DynamicCallSiteDesc.of(im.bootstrapMethod(), im.name().stringValue(), MethodTypeDesc.ofDescriptor(im.type().stringValue()), im.bootstrapArgs().toArray(ConstantDesc[]::new))); case NewObjectInstruction im -> - cb.newObjectInstruction(im.className().asSymbol()); + cb.new_(im.className().asSymbol()); case NewPrimitiveArrayInstruction im -> - cb.newPrimitiveArrayInstruction(im.typeKind()); + cb.newarray(im.typeKind()); case NewReferenceArrayInstruction im -> - cb.newReferenceArrayInstruction(im.componentType()); + cb.anewarray(im.componentType()); case NewMultiArrayInstruction im -> - cb.newMultidimensionalArrayInstruction(im.dimensions(), im.arrayType()); + cb.multianewarray(im.arrayType(), im.dimensions()); case TypeCheckInstruction im -> - cb.typeCheckInstruction(im.opcode(), im.type().asSymbol()); + cb.with(TypeCheckInstruction.of(im.opcode(), im.type().asSymbol())); case ArrayLoadInstruction im -> - cb.arrayLoadInstruction(im.typeKind()); + cb.arrayLoad(im.typeKind()); case ArrayStoreInstruction im -> - cb.arrayStoreInstruction(im.typeKind()); + cb.arrayStore(im.typeKind()); case StackInstruction im -> - cb.stackInstruction(im.opcode()); + cb.with(StackInstruction.of(im.opcode())); case ConvertInstruction im -> - cb.convertInstruction(im.fromType(), im.toType()); + cb.conversion(im.fromType(), im.toType()); case OperatorInstruction im -> - cb.operatorInstruction(im.opcode()); + cb.with(OperatorInstruction.of(im.opcode())); case ConstantInstruction im -> - cb.constantInstruction(im.opcode(), im.constantValue()); + cb.loadConstant(im.opcode(), im.constantValue()); case MonitorInstruction im -> - cb.monitorInstruction(im.opcode()); + cb.with(MonitorInstruction.of(im.opcode())); case NopInstruction im -> - cb.nopInstruction(); + cb.nop(); case LabelTarget im -> cb.labelBinding(im.label()); case ExceptionCatch im -> diff --git a/test/jdk/jdk/classfile/helpers/RebuildingTransformation.java b/test/jdk/jdk/classfile/helpers/RebuildingTransformation.java index 32c444b9f6d..1c653968033 100644 --- a/test/jdk/jdk/classfile/helpers/RebuildingTransformation.java +++ b/test/jdk/jdk/classfile/helpers/RebuildingTransformation.java @@ -272,7 +272,7 @@ public void accept(CodeBuilder cob, CodeElement coe) { case ConstantInstruction i -> { if (i.constantValue() == null) if (pathSwitch.nextBoolean()) cob.aconst_null(); - else cob.constantInstruction(null); + else cob.loadConstant(null); else switch (i.constantValue()) { case Integer iVal -> { if (iVal == 1 && pathSwitch.nextBoolean()) cob.iconst_1(); @@ -283,25 +283,25 @@ else switch (i.constantValue()) { else if (iVal == -1 && pathSwitch.nextBoolean()) cob.iconst_m1(); else if (iVal >= -128 && iVal <= 127 && pathSwitch.nextBoolean()) cob.bipush(iVal); else if (iVal >= -32768 && iVal <= 32767 && pathSwitch.nextBoolean()) cob.sipush(iVal); - else cob.constantInstruction(iVal); + else cob.loadConstant(iVal); } case Long lVal -> { if (lVal == 0 && pathSwitch.nextBoolean()) cob.lconst_0(); else if (lVal == 1 && pathSwitch.nextBoolean()) cob.lconst_1(); - else cob.constantInstruction(lVal); + else cob.loadConstant(lVal); } case Float fVal -> { if (fVal == 0.0 && pathSwitch.nextBoolean()) cob.fconst_0(); else if (fVal == 1.0 && pathSwitch.nextBoolean()) cob.fconst_1(); else if (fVal == 2.0 && pathSwitch.nextBoolean()) cob.fconst_2(); - else cob.constantInstruction(fVal); + else cob.loadConstant(fVal); } case Double dVal -> { if (dVal == 0.0d && pathSwitch.nextBoolean()) cob.dconst_0(); else if (dVal == 1.0d && pathSwitch.nextBoolean()) cob.dconst_1(); - else cob.constantInstruction(dVal); + else cob.loadConstant(dVal); } - default -> cob.constantInstruction(i.constantValue()); + default -> cob.loadConstant(i.constantValue()); } } case ConvertInstruction i -> { @@ -550,13 +550,13 @@ else switch (i.constantValue()) { if (pathSwitch.nextBoolean()) { switch (i.opcode()) { case CHECKCAST -> cob.checkcast(i.type().asSymbol()); - case INSTANCEOF -> cob.instanceof_(i.type().asSymbol()); + case INSTANCEOF -> cob.instanceOf(i.type().asSymbol()); default -> throw new AssertionError("Should not reach here"); } } else { switch (i.opcode()) { case CHECKCAST -> cob.checkcast(i.type()); - case INSTANCEOF -> cob.instanceof_(i.type()); + case INSTANCEOF -> cob.instanceOf(i.type()); default -> throw new AssertionError("Should not reach here"); } } diff --git a/test/jdk/jdk/classfile/helpers/Transforms.java b/test/jdk/jdk/classfile/helpers/Transforms.java index a08c5d25717..64b4836d50a 100644 --- a/test/jdk/jdk/classfile/helpers/Transforms.java +++ b/test/jdk/jdk/classfile/helpers/Transforms.java @@ -217,7 +217,7 @@ public enum InjectNopTransform { cb.transformMethod(mm, (mb, me) -> { if (me instanceof CodeModel xm) { mb.withCode(xb -> { - xb.nopInstruction(); + xb.nop(); xm.forEachElement(new Consumer<>() { @Override public void accept(CodeElement e) { diff --git a/test/jdk/jdk/internal/vm/Continuation/OSRTest.java b/test/jdk/jdk/internal/vm/Continuation/OSRTest.java index bf0bfeab674..a9eed4e93b6 100644 --- a/test/jdk/jdk/internal/vm/Continuation/OSRTest.java +++ b/test/jdk/jdk/internal/vm/Continuation/OSRTest.java @@ -32,13 +32,13 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * -* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI OSRTest true true true -* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=inline,*::yield0 OSRTest true true false -* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=dontinline,*::yield* OSRTest true true false -* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=exclude,*::bar() OSRTest true false false -* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI OSRTest false true true -* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI OSRTest false true false -* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=exclude,*::bar() OSRTest false false false +* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=dontinline,*::foo* OSRTest true true true +* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=dontinline,*::foo* -XX:CompileCommand=inline,*::yield0 OSRTest true true false +* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=dontinline,*::foo* -XX:CompileCommand=dontinline,*::yield* OSRTest true true false +* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=dontinline,*::foo* -XX:CompileCommand=exclude,*::bar() OSRTest true false false +* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=dontinline,*::foo* OSRTest false true true +* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=dontinline,*::foo* OSRTest false true false +* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=dontinline,*::foo* -XX:CompileCommand=exclude,*::bar() OSRTest false false false * */ diff --git a/test/jdk/jdk/jfr/api/consumer/filestream/TestOrdered.java b/test/jdk/jdk/jfr/api/consumer/filestream/TestOrdered.java index 94383298ddc..8edb74b847a 100644 --- a/test/jdk/jdk/jfr/api/consumer/filestream/TestOrdered.java +++ b/test/jdk/jdk/jfr/api/consumer/filestream/TestOrdered.java @@ -88,46 +88,60 @@ public static void main(String... args) throws Exception { private static void testSetOrderedTrue(Path p) throws Exception { for (boolean reuse : BOOLEAN_STATES) { + System.out.println(); + System.out.println("Testing: testSetOrderedTrue reuse = " + reuse); AtomicReference timestamp = new AtomicReference<>(Instant.MIN); + AtomicBoolean unordered = new AtomicBoolean(false); try (EventStream es = EventStream.openFile(p)) { es.setReuse(reuse); es.setOrdered(true); es.onEvent(e -> { Instant endTime = e.getEndTime(); + printTimestamp(endTime); if (endTime.isBefore(timestamp.get())) { - throw new Error("Events are not ordered! Reuse = " + reuse); + unordered.set(true); } timestamp.set(endTime); }); es.start(); } + if (unordered.get()) { + throw new Exception("Events are not ordered! Reuse = " + reuse); + } } } private static void testSetOrderedFalse(Path p) throws Exception { for (boolean reuse : BOOLEAN_STATES) { + System.out.println(); + System.out.println("Testing: testSetOrderedFalse reuse = " + reuse); AtomicReference timestamp = new AtomicReference<>(Instant.MIN); - AtomicBoolean unoreded = new AtomicBoolean(false); + AtomicBoolean unordered = new AtomicBoolean(false); try (EventStream es = EventStream.openFile(p)) { es.setReuse(reuse); es.setOrdered(false); es.onEvent(e -> { Instant endTime = e.getEndTime(); - System.out.println("testSetOrderedFalse: endTime: " + endTime); + printTimestamp(endTime); if (endTime.isBefore(timestamp.get())) { - unoreded.set(true); - es.close(); + unordered.set(true); } timestamp.set(endTime); }); es.start(); - if (!unoreded.get()) { + if (!unordered.get()) { throw new Exception("Expected at least some events to be out of order! Reuse = " + reuse); } } } } + private static void printTimestamp(Instant timestamp) { + long seconds = timestamp.getEpochSecond(); + long nanos = timestamp.getNano(); + System.out.println(timestamp + " seconds = " + seconds + " nanos = " + nanos); + } + private static Path makeUnorderedRecording() throws Exception { CyclicBarrier barrier = new CyclicBarrier(THREAD_COUNT + 1); diff --git a/test/jdk/jdk/jfr/event/compiler/TestCompilerCompile.java b/test/jdk/jdk/jfr/event/compiler/TestCompilerCompile.java index 775d7789bee..8d070db8262 100644 --- a/test/jdk/jdk/jfr/event/compiler/TestCompilerCompile.java +++ b/test/jdk/jdk/jfr/event/compiler/TestCompilerCompile.java @@ -48,6 +48,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:CompileOnly=jdk.jfr.event.compiler.TestCompilerCompile::dummyMethod,jdk.jfr.event.compiler.TestCompilerCompile::doTest + * -XX:CompileCommand=MemStat,*.* * jdk.jfr.event.compiler.TestCompilerCompile */ public class TestCompilerCompile { @@ -138,5 +139,6 @@ private void verifyEvent(RecordedEvent event) throws Throwable { Events.assertField(event, "inlinedBytes").atLeast(0L); Events.assertField(event, "codeSize").atLeast(0L); Events.assertField(event, "isOsr"); + Events.assertField(event, "arenaBytes").atLeast(1024L); } } diff --git a/test/jdk/jdk/jfr/event/io/TestAsynchronousFileChannelEvents.java b/test/jdk/jdk/jfr/event/io/TestAsynchronousFileChannelEvents.java new file mode 100644 index 00000000000..f1ddba369eb --- /dev/null +++ b/test/jdk/jdk/jfr/event/io/TestAsynchronousFileChannelEvents.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.jfr.event.io; + +import jdk.jfr.Recording; +import jdk.jfr.consumer.RecordedEvent; +import jdk.test.lib.Utils; +import jdk.test.lib.jfr.Events; + +import java.io.File; +import java.nio.ByteBuffer; +import java.nio.channels.AsynchronousFileChannel; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; + +import static java.nio.file.StandardOpenOption.READ; +import static java.nio.file.StandardOpenOption.WRITE; + +/** + * @test + * @key jfr + * @requires vm.hasJFR + * @library /test/lib /test/jdk + * @run main/othervm jdk.jfr.event.io.TestAsynchronousFileChannelEvents + */ +public class TestAsynchronousFileChannelEvents { + + public static void main(String[] args) throws Throwable { + File tmp = Utils.createTempFile("TestAsynchronousFileChannelEvents", ".tmp").toFile(); + String s = "unremarkable data"; + ByteBuffer data = ByteBuffer.allocate(s.length()); + data.put(s.getBytes()); + + try (Recording recording = new Recording(); + AsynchronousFileChannel ch = AsynchronousFileChannel.open(tmp.toPath(), READ, WRITE)) { + + List expectedEvents = new ArrayList<>(); + recording.enable(IOEvent.EVENT_FILE_FORCE).withThreshold(Duration.ofMillis(0)); + recording.start(); + + data.flip(); + ch.write(data, 0).get(); + + // test force(boolean) + ch.force(true); + expectedEvents.add(IOEvent.createFileForceEvent(tmp)); + + recording.stop(); + List events = Events.fromRecording(recording); + IOHelper.verifyEqualsInOrder(events, expectedEvents); + } + } +} diff --git a/test/jdk/jdk/lambda/separate/ClassToInterfaceConverter.java b/test/jdk/jdk/lambda/separate/ClassToInterfaceConverter.java index 44c5c6ab179..26c17901281 100644 --- a/test/jdk/jdk/lambda/separate/ClassToInterfaceConverter.java +++ b/test/jdk/jdk/lambda/separate/ClassToInterfaceConverter.java @@ -43,7 +43,7 @@ private byte[] convertToInterface(ClassModel classModel) { CodeTransform ct = (b, e) -> { if (e instanceof InvokeInstruction i && i.owner() == classModel.thisClass()) { Opcode opcode = i.opcode() == Opcode.INVOKEVIRTUAL ? Opcode.INVOKEINTERFACE : i.opcode(); - b.invokeInstruction(opcode, i.owner().asSymbol(), + b.invoke(opcode, i.owner().asSymbol(), i.name().stringValue(), i.typeSymbol(), true); } else { b.with(e); diff --git a/test/jdk/sun/net/www/http/HttpClient/KeepAliveTest.java b/test/jdk/sun/net/www/http/HttpClient/KeepAliveTest.java index 344ff5f89e9..02e60ebc75f 100644 --- a/test/jdk/sun/net/www/http/HttpClient/KeepAliveTest.java +++ b/test/jdk/sun/net/www/http/HttpClient/KeepAliveTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,177 +24,29 @@ /* * @test * @library /test/lib - * @bug 8291226 8291638 - * @modules java.base/sun.net:+open - * java.base/sun.net.www.http:+open - * java.base/sun.net.www:+open + * @bug 8291226 8291638 8330523 + * @modules java.base/sun.net.www.http:+open * java.base/sun.net.www.protocol.http:+open - * @run main/othervm KeepAliveTest 0 - * @run main/othervm KeepAliveTest 1 - * @run main/othervm KeepAliveTest 2 - * @run main/othervm KeepAliveTest 3 - * @run main/othervm KeepAliveTest 4 - * @run main/othervm KeepAliveTest 5 - * @run main/othervm KeepAliveTest 6 - * @run main/othervm KeepAliveTest 7 - * @run main/othervm KeepAliveTest 8 - * @run main/othervm KeepAliveTest 9 - * @run main/othervm KeepAliveTest 10 - * @run main/othervm KeepAliveTest 11 - * @run main/othervm KeepAliveTest 12 - * @run main/othervm KeepAliveTest 13 - * @run main/othervm KeepAliveTest 14 - * @run main/othervm KeepAliveTest 15 - * @run main/othervm KeepAliveTest 16 - * @run main/othervm KeepAliveTest 17 - * @run main/othervm KeepAliveTest 18 - * @run main/othervm KeepAliveTest 19 - * @run main/othervm KeepAliveTest 20 - * @run main/othervm KeepAliveTest 21 - * @run main/othervm KeepAliveTest 22 - * @run main/othervm KeepAliveTest 23 - * @run main/othervm KeepAliveTest 24 - * @run main/othervm KeepAliveTest 25 - * @run main/othervm KeepAliveTest 26 - * @run main/othervm KeepAliveTest 27 - * @run main/othervm KeepAliveTest 28 - * @run main/othervm KeepAliveTest 29 - * @run main/othervm KeepAliveTest 30 - * @run main/othervm KeepAliveTest 31 - * @run main/othervm KeepAliveTest 32 - * @run main/othervm KeepAliveTest 33 - * @run main/othervm KeepAliveTest 34 - * @run main/othervm KeepAliveTest 35 - * @run main/othervm KeepAliveTest 36 - * @run main/othervm KeepAliveTest 37 - * @run main/othervm KeepAliveTest 38 - * @run main/othervm KeepAliveTest 39 - * @run main/othervm KeepAliveTest 40 - * @run main/othervm KeepAliveTest 41 - * @run main/othervm KeepAliveTest 42 - * @run main/othervm KeepAliveTest 43 - * @run main/othervm KeepAliveTest 44 - * @run main/othervm KeepAliveTest 45 - * @run main/othervm KeepAliveTest 46 - * @run main/othervm KeepAliveTest 47 - * @run main/othervm KeepAliveTest 48 - * @run main/othervm KeepAliveTest 49 - * @run main/othervm KeepAliveTest 50 - * @run main/othervm KeepAliveTest 51 - * @run main/othervm KeepAliveTest 52 - * @run main/othervm KeepAliveTest 53 - * @run main/othervm KeepAliveTest 54 - * @run main/othervm KeepAliveTest 55 - * @run main/othervm KeepAliveTest 56 - * @run main/othervm KeepAliveTest 57 - * @run main/othervm KeepAliveTest 58 - * @run main/othervm KeepAliveTest 59 - * @run main/othervm KeepAliveTest 60 - * @run main/othervm KeepAliveTest 61 - * @run main/othervm KeepAliveTest 62 - * @run main/othervm KeepAliveTest 63 - * @run main/othervm KeepAliveTest 64 - * @run main/othervm KeepAliveTest 65 - * @run main/othervm KeepAliveTest 66 - * @run main/othervm KeepAliveTest 67 - * @run main/othervm KeepAliveTest 68 - * @run main/othervm KeepAliveTest 69 - * @run main/othervm KeepAliveTest 70 - * @run main/othervm KeepAliveTest 71 - * @run main/othervm KeepAliveTest 72 - * @run main/othervm KeepAliveTest 73 - * @run main/othervm KeepAliveTest 74 - * @run main/othervm KeepAliveTest 75 - * @run main/othervm KeepAliveTest 76 - * @run main/othervm KeepAliveTest 77 - * @run main/othervm KeepAliveTest 78 - * @run main/othervm KeepAliveTest 79 - * @run main/othervm KeepAliveTest 80 - * @run main/othervm KeepAliveTest 81 - * @run main/othervm KeepAliveTest 82 - * @run main/othervm KeepAliveTest 83 - * @run main/othervm KeepAliveTest 84 - * @run main/othervm KeepAliveTest 85 - * @run main/othervm KeepAliveTest 86 - * @run main/othervm KeepAliveTest 87 - * @run main/othervm KeepAliveTest 88 - * @run main/othervm KeepAliveTest 89 - * @run main/othervm KeepAliveTest 90 - * @run main/othervm KeepAliveTest 91 - * @run main/othervm KeepAliveTest 92 - * @run main/othervm KeepAliveTest 93 - * @run main/othervm KeepAliveTest 94 - * @run main/othervm KeepAliveTest 95 - * @run main/othervm KeepAliveTest 96 - * @run main/othervm KeepAliveTest 97 - * @run main/othervm KeepAliveTest 98 - * @run main/othervm KeepAliveTest 99 - * @run main/othervm KeepAliveTest 100 - * @run main/othervm KeepAliveTest 101 - * @run main/othervm KeepAliveTest 102 - * @run main/othervm KeepAliveTest 103 - * @run main/othervm KeepAliveTest 104 - * @run main/othervm KeepAliveTest 105 - * @run main/othervm KeepAliveTest 106 - * @run main/othervm KeepAliveTest 107 - * @run main/othervm KeepAliveTest 108 - * @run main/othervm KeepAliveTest 109 - * @run main/othervm KeepAliveTest 110 - * @run main/othervm KeepAliveTest 111 - * @run main/othervm KeepAliveTest 112 - * @run main/othervm KeepAliveTest 113 - * @run main/othervm KeepAliveTest 114 - * @run main/othervm KeepAliveTest 115 - * @run main/othervm KeepAliveTest 116 - * @run main/othervm KeepAliveTest 117 - * @run main/othervm KeepAliveTest 118 - * @run main/othervm KeepAliveTest 119 - * @run main/othervm KeepAliveTest 120 - * @run main/othervm KeepAliveTest 121 - * @run main/othervm KeepAliveTest 122 - * @run main/othervm KeepAliveTest 123 - * @run main/othervm KeepAliveTest 124 - * @run main/othervm KeepAliveTest 125 - * @run main/othervm KeepAliveTest 126 - * @run main/othervm KeepAliveTest 127 - * @run main/othervm KeepAliveTest 128 - * @run main/othervm KeepAliveTest 129 - * @run main/othervm KeepAliveTest 130 - * @run main/othervm KeepAliveTest 131 - * @run main/othervm KeepAliveTest 132 - * @run main/othervm KeepAliveTest 133 - * @run main/othervm KeepAliveTest 134 - * @run main/othervm KeepAliveTest 135 - * @run main/othervm KeepAliveTest 136 - * @run main/othervm KeepAliveTest 137 - * @run main/othervm KeepAliveTest 138 - * @run main/othervm KeepAliveTest 139 - * @run main/othervm KeepAliveTest 140 - * @run main/othervm KeepAliveTest 141 - * @run main/othervm KeepAliveTest 142 - * @run main/othervm KeepAliveTest 143 - * @run main/othervm KeepAliveTest 144 - * @run main/othervm KeepAliveTest 145 - * @run main/othervm KeepAliveTest 146 - * @run main/othervm KeepAliveTest 147 - * @run main/othervm KeepAliveTest 148 - * @run main/othervm KeepAliveTest 149 - * @run main/othervm KeepAliveTest 150 - * @run main/othervm KeepAliveTest 151 - * @run main/othervm KeepAliveTest 152 - * @run main/othervm KeepAliveTest 153 - * @run main/othervm KeepAliveTest 154 - * @run main/othervm KeepAliveTest 155 - * @run main/othervm KeepAliveTest 156 - * @run main/othervm KeepAliveTest 157 - * @run main/othervm KeepAliveTest 158 - * @run main/othervm KeepAliveTest 159 + * @run main/othervm KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.server=100 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.proxy=200 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.server=100 -Dhttp.keepAlive.time.proxy=200 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.server=-100 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.proxy=-200 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.server=-100 -Dhttp.keepAlive.time.proxy=-200 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.server=0 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.proxy=0 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.server=0 -Dhttp.keepAlive.time.proxy=0 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.server=0 -Dhttp.keepAlive.time.proxy=-200 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.server=-100 -Dhttp.keepAlive.time.proxy=0 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.server=100 -Dhttp.keepAlive.time.proxy=0 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.server=0 -Dhttp.keepAlive.time.proxy=200 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.server=100 -Dhttp.keepAlive.time.proxy=-200 KeepAliveTest + * @run main/othervm -Dhttp.keepAlive.time.server=-100 -Dhttp.keepAlive.time.proxy=200 KeepAliveTest */ - -import java.nio.charset.StandardCharsets; -import java.io.InputStream; import java.io.BufferedReader; import java.io.IOException; +import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.lang.reflect.Constructor; @@ -206,841 +58,59 @@ import java.net.ServerSocket; import java.net.Socket; import java.net.URL; +import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map.Entry; -import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Phaser; import java.util.logging.ConsoleHandler; import java.util.logging.Level; import java.util.logging.Logger; + +import jdk.test.lib.net.URIBuilder; + import sun.net.www.http.HttpClient; import sun.net.www.http.KeepAliveCache; import sun.net.www.protocol.http.HttpURLConnection; -import jdk.test.lib.net.URIBuilder; public class KeepAliveTest { - private static final Logger logger = Logger.getLogger("sun.net.www.protocol.http.HttpURLConnection"); - private static final String NOT_CACHED = "NotCached"; - private static final String CLIENT_SEPARATOR = ";"; - private static final String NEW_LINE = "\r\n"; - private volatile int SERVER_PORT = 0; + /* - * isProxySet is shared variable between server thread and client thread(main) and it should be set and reset to false for each and - * every scenario. - * isProxySet variable should be set by server thread before proceeding to client thread(main). + * This test covers a matrix of 10 server scenarios and 16 client scenarios. */ - private volatile boolean isProxySet = false; + private static final Logger logger = Logger.getLogger("sun.net.www.protocol.http.HttpURLConnection"); + + private static final String NEW_LINE = "\r\n"; + private static final String CONNECTION_KEEP_ALIVE_ONLY = "Connection: keep-alive"; private static final String PROXY_CONNECTION_KEEP_ALIVE_ONLY = "Proxy-Connection: keep-alive"; private static final String KEEP_ALIVE_TIMEOUT_NEG = "Keep-alive: timeout=-20"; private static final String KEEP_ALIVE_TIMEOUT_ZERO = "Keep-alive: timeout=0"; private static final String KEEP_ALIVE_TIMEOUT = "Keep-alive: timeout=20"; private static final String KEEP_ALIVE_PROXY_TIMEOUT = "Keep-alive: timeout=120"; - private static final String CLIENT_HTTP_KEEP_ALIVE_TIME_SERVER_NEGATIVE = "http.keepAlive.time.server=-100"; - private static final String CLIENT_HTTP_KEEP_ALIVE_TIME_PROXY_NEGATIVE = "http.keepAlive.time.proxy=-200"; - private static final String CLIENT_HTTP_KEEP_ALIVE_TIME_SERVER_ZERO = "http.keepAlive.time.server=0"; - private static final String CLIENT_HTTP_KEEP_ALIVE_TIME_PROXY_ZERO = "http.keepAlive.time.proxy=0"; - private static final String CLIENT_HTTP_KEEP_ALIVE_TIME_SERVER_POSITIVE = "http.keepAlive.time.server=100"; - private static final String CLIENT_HTTP_KEEP_ALIVE_TIME_PROXY_POSITIVE = "http.keepAlive.time.proxy=200"; - private static final String CONNECTION_KEEP_ALIVE_WITH_TIMEOUT = CONNECTION_KEEP_ALIVE_ONLY + NEW_LINE - + KEEP_ALIVE_TIMEOUT; - /* - * Following Constants represents Client Side Properties and is used as reference in below table as - * CLIENT_INPUT_CONSTANT_NAMES - */ - private static final String SERVER_100_NEGATIVE = CLIENT_HTTP_KEEP_ALIVE_TIME_SERVER_NEGATIVE; - private static final String PROXY_200_NEGATIVE = CLIENT_HTTP_KEEP_ALIVE_TIME_PROXY_NEGATIVE; - private static final String SERVER_ZERO = CLIENT_HTTP_KEEP_ALIVE_TIME_SERVER_ZERO; - private static final String PROXY_ZERO = CLIENT_HTTP_KEEP_ALIVE_TIME_PROXY_ZERO; - private static final String SERVER_100 = CLIENT_HTTP_KEEP_ALIVE_TIME_SERVER_POSITIVE; - private static final String PROXY_200 = CLIENT_HTTP_KEEP_ALIVE_TIME_PROXY_POSITIVE; - - /* - * CONSTANTS A,B,C,D,E,NI,F,G,H,I represents ServerScenarios and is used as reference in below table - * as SERVER_RESPONSE_CONSTANT_NAME - */ - private static final String A = CONNECTION_KEEP_ALIVE_ONLY; - private static final String B = CONNECTION_KEEP_ALIVE_WITH_TIMEOUT; - private static final String C = PROXY_CONNECTION_KEEP_ALIVE_ONLY; - private static final String D = PROXY_CONNECTION_KEEP_ALIVE_ONLY + NEW_LINE + CONNECTION_KEEP_ALIVE_ONLY; - private static final String E = C + NEW_LINE + KEEP_ALIVE_PROXY_TIMEOUT; - private static final String NI = "NO_INPUT"; - private static final String F = A + NEW_LINE + KEEP_ALIVE_TIMEOUT_NEG; - private static final String G = A + NEW_LINE + KEEP_ALIVE_TIMEOUT_ZERO; - private static final String H = C + NEW_LINE + KEEP_ALIVE_TIMEOUT_NEG; - private static final String I = C + NEW_LINE + KEEP_ALIVE_TIMEOUT_ZERO; - - /* - * There are 160 scenarios run by this program. - * For every scenario there is mapping between serverScenarios[int],clientScenarios[int] and expectedOutput[int] - * - * serverScenarios[0] clientScenarios[0] expectedOutput[0] - * serverScenarios[1] clientScenarios[1] expectedOutput[1] - * serverScenarios[2] clientScenarios[2] expectedOutput[2] - * - * ... - * - * serverScenarios[159] cientScenarios[159] expectedOutput[159] - * - * whereas serverScenarios[int] is retrieved using getServerScenario(int) - * whereas clientScenarios[int] is retrieved using clientScenario[getClientScenarioNumber[int]] - * and - * expectedOutput[int] is retrieved using expectedOuput[int] directly. - * - */ - - /* Here is the complete table of server_response, client system properties input and expected cached timeout at client side */ - /* ScNo | SERVER RESPONSE (SERVER_RESPONSE_CONSTANT_NAME)| CLIENT SYSTEM PROPERTIES INPUT (CLIENT_INPUT_CONSTANT_NAMES) | EXPECTED CACHED TIMEOUT AT CLIENT SIDE - ***************************************************************************************************************************************** - * 0 | Connection: keep-alive (A) | No Input Provided (NI) | Default Timeout set to 5 - *--------------------------------------------------------------------------------------------------------------------------- - * 1 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.server=100 (SERVER_100)| Client Timeout set to 100 - *-------------------------------------------------------------------------------------------------------------------------- - * 2 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.proxy=200 (PROXY_200) | Default Timeout set to 5 - *--------------------------------------------------------------------------------------------------------------------------- - * 3 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 100 - * | | (SERVER_100 && PROXY_200) | - *--------------------------------------------------------------------------------------------------------------------------- - * 4 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.server=-100 | Default Timeout set to 5 - * | | (SERVER_100_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------- - * 5 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.proxy=-200 | Default Timeout set to 5 - * | | (PROXY_200_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------- - * 6 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.server=-100 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | Default Timeout set to 5 - * | | (SERVER_100_NEGATIVE && PROXY_200_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------- - * 7 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.server=0 | Connection Closed Immediately - * | | (SERVER_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 8 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.proxy=0 | Default Timeout set to 5 - * | | (PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 9 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=0 | Connection Closed Immediately - * | | (SERVER_ZERO && PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 10 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | Connection Closed Immediately - * | | (SERVER_ZERO && PROXY_200_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------- - * 11 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.server=-100 && | - * | | -Dhttp.keepAlive.time.proxy=0 | Default Timeout set to 5 - * | | (SERVER_100_NEGATIVE && PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 12 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=0 | Timeout set to 100 - * | | (SERVER_100 && PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 13 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Connection Closed Immediately - * | | (SERVER_ZERO && PROXY_200) | - *--------------------------------------------------------------------------------------------------------------------------- - * 14 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | Timeout set to 100 - * | | (SERVER_100 && PROXY_200_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------- - * 15 | Connection: keep-alive (A) | -Dhttp.keepAlive.time.server=-100 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Default Timeout set to 5 - * | | (SERVER_100_NEGATIVE && PROXY_200) | - *--------------------------------------------------------------------------------------------------------------------------- - * 16 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | No Input Provided (NI) | Timeout set to 20 - *------------------------------------------------------------------------------------------------------------------------ - * 17 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.server=100 | Timeout set to 20 - * | | (SERVER_100) | - *--------------------------------------------------------------------------------------------------------------------------- - * 18 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 20 - * | | (PROXY_200) | - *--------------------------------------------------------------------------------------------------------------------------- - * 19 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 20 - * | | (SERVER_100 && PROXY_200) | - *--------------------------------------------------------------------------------------------------------------------------- - * 20 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.server=-100 | Timeout set to 20 - * | | (SERVER_100_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------- - * 21 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.proxy=-200 | Timeout set to 20 - * | | (PROXY_200_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------- - * 22 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.server=-100 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | Timeout set to 20 - * | | (SERVER_100_NEGATIVE && PROXY_200_NEGATIVE)| - *--------------------------------------------------------------------------------------------------------------------------- - * 23 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.server=0 | Timeout set to 20 - * | | (SERVER_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 24 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.proxy=0 | Timeout set to 20 - * | | (PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 25 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=0 | Timeout set to 20 - * | | (SERVER_ZERO && PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 26 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | Timeout set to 20 - * | | (SERVER_ZERO && PROXY_200_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------- - * 27 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.server=-100 &&| - * | | -Dhttp.keepAlive.time.proxy=0 | Timeout set to 20 - * | | (SERVER_100_NEGATIVE && PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 28 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=0 | Timeout set to 20 - * | | (SERVER_100 && PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 29 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 20 - * | | (SERVER_ZERO && PROXY_200) | - *--------------------------------------------------------------------------------------------------------------------------- - * 30 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | Timeout set to 20 - * | | (SERVER_100 && PROXY_200_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------- - * 31 |Connection: keep-alive\r\nKeep-alive: timeout=20 (B) |-Dhttp.keepAlive.time.server=-100 && | - * | |-Dhttp.keepAlive.time.proxy=200 | Timeout set to 20 - * | | (SERVER_100_NEGATIVE && PROXY_200) | - *--------------------------------------------------------------------------------------------------------------------------- - * 32 |Proxy-Connection: keep-alive (C) | No Input Provided (NI) | Default timeout set to 60 - *--------------------------------------------------------------------------------------------------------------------------- - * 33 |Proxy-Connection: keep-alive (C) | -Dhttp.keepAlive.time.server=100 | Default timeout set to 60 - * | | (SERVER_100) | - *--------------------------------------------------------------------------------------------------------------------------- - * 34 |Proxy-Connection: keep-alive (C) | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 200 - * | | (PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------- - * 35 |Proxy-Connection: keep-alive (C) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 200 - * | | (SERVER_100 && PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------- - * 36 |Proxy-Connection: keep-alive (C) | -Dhttp.keepAlive.time.server=-100 | Default timeout set to 60 - * | | (SERVER_100_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------- - * 37 |Proxy-Connection: keep-alive (C) | -Dhttp.keepAlive.time.proxy=-200 | Default timeout set to 60 - * | | (PROXY_200_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------- - * 38 |Proxy-Connection: keep-alive (C) |-Dhttp.keepAlive.time.server=-100 && | - * | |-Dhttp.keepAlive.time.proxy=-200 | Default timeout set to 60 - * | |(SERVER_100_NEGATIVE && PROXY_200_NEGATIVE)| - *--------------------------------------------------------------------------------------------------------------------------- - * 39 |Proxy-Connection: keep-alive (C) | -Dhttp.keepAlive.time.server=0 | Default timeout set to 60 - * | | (SERVER_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 40 |Proxy-Connection: keep-alive (C) | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 41 |Proxy-Connection: keep-alive (C) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_ZERO && PROXY_ZERO) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 42 |Proxy-Connection: keep-alive (C) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | Default timeout set to 60 - * | | (SERVER_ZERO && PROXY_200_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------------- - * 43 |Proxy-Connection: keep-alive (C) | -Dhttp.keepAlive.time.server=-100 &&| - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_100_NEGATIVE && PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------------- - * 44 |Proxy-Connection: keep-alive (C) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_100 && PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 45 |Proxy-Connection: keep-alive (C) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 200 - * | | (SERVER_ZERO && PROXY_200) | - *--------------------------------------------------------------------------------------------------------------------------- - * 46 |Proxy-Connection: keep-alive (C) |-Dhttp.keepAlive.time.server=100 && | - * | |-Dhttp.keepAlive.time.proxy=-200 | Default timeout set to 60 - * | | (SERVER_100 && PROXY_200_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------- - * 47 |Proxy-Connection: keep-alive (C) |-Dhttp.keepAlive.time.server=-100 && | - * | |-Dhttp.keepAlive.time.proxy=200 | Timeout set to 200 - * | | (SERVER_100_NEGATIVE && PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------- - * 48 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | No Input Provided (NI) | Default timeout set to 60 - *----------------------------------------------------------------------------------------------------------------------------- - * 49 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.server=100 | Default timeout set to 60 - * | | (SERVER_100) | - *--------------------------------------------------------------------------------------------------------------------------- - * 50 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 200 - * | | (PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------ - * 51 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 200 - * | | (SERVER_100 && PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------ - * 52 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.server=-100 | Default timeout set to 60 - * | | (SERVER_100_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------ - * 53 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.proxy=-200 | Default timeout set to 60 - * | | (PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------ - * 54 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.server=-100&& | - * | | -Dhttp.keepAlive.time.proxy=-200 | Default timeout set to 60 - * | | (SERVER_100_NEGATIVE && PROXY_200_NEGATIVE | - *------------------------------------------------------------------------------------------------------------------------------- - * 55 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.server=0 | Default timeout set to 60 - * | | (SERVER_ZERO) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 56 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (PROXY_ZERO) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 57 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_ZERO && PROXY_ZERO) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 58 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | Default timeout set to 60 - * | | (SERVER_ZERO && PROXY_200_NEGATIVE) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 59 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.server=-100 &&| - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_100_NEGATIVE && PROXY_ZERO) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 60 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_100 && PROXY_ZERO) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 61 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 200 - * | | (SERVER_ZERO && PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------ - * 62 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | default timeout set to 60 - * | | (SERVER_100 && PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------ - * 63 |Connection:keep-alive\r\nProxy-connection:keep-alive (D) | -Dhttp.keepAlive.time.server=-100 &&| - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 200 - * | | (SERVER_100_NEGATIVE && PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------- - * 64 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| No Input Provided (NI) | Timeout set to 120 - *------------------------------------------------------------------------------------------------------------------------------- - * 65 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.server=100 | Timeout set to 120 - * | | (SERVER_100) | - *------------------------------------------------------------------------------------------------------------------------------- - * 66 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.proxy=200 | Timeout set to 120 - * | | (PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------- - * 67 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 120 - * | | (SERVER_100 && PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------- - * 68 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.server=-100 | Timeout set to 120 - * | | (SERVER_100_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------- - * 69 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.proxy=-200 | Timeout set to 120 - * | | (PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------- - * 70 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.server=-100 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | Timeout set to 120 - * | | (SERVER_100_NEGATIVE && PROXY_200_NEGATIVE)| - *------------------------------------------------------------------------------------------------------------------------------- - * 71 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.server=0 | Timeout set to 120 - * | | (SERVER_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------- - * 72 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.proxy=0 | Timeout set to 120 - * | | (PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------- - * 73 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=0 | Timeout set to 120 - * | | (SERVER_ZERO && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------- - * 74 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | Timeout set to 120 - * | | (SERVER_ZERO && PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------- - * 75 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.server=-100 &&| - * | | -Dhttp.keepAlive.time.proxy=0 | Timeout set to 120 - * | | (SERVER_100_NEGATIVE && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------- - * 76 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=0 | Timeout set to 120 - * | | (SERVER_100 && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------- - * 77 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 120 - * | | (SERVER_ZERO && PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------- - * 78 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | Timeout set to 120 - * | | (SERVER_100_NEGATIVE && PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------- - * 79 |Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 (E)| -Dhttp.keepAlive.time.server=-100 &&| - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 120 - * | | (SERVER_100_NEGATIVE && PROXY_200) | - *----------------------------------------------------------------------------------------------------------------------------- - * 80 |No Input (NI) | No Input Provided (NI) | default timeout set to 5 - *----------------------------------------------------------------------------------------------------------------------------- - * 81 |No Input (NI) | -Dhttp.keepAlive.time.server=100 | Timeout set to 100 - * | | (SERVER_100) | - *----------------------------------------------------------------------------------------------------------------------------- - * 82 |No Input (NI) | -Dhttp.keepAlive.time.proxy=200 | default timeout set to 5 - * | | (PROXY_200) | - *----------------------------------------------------------------------------------------------------------------------------- - * 83 |No Input (NI) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=200 | client timeot set to 100 - * | | (SERVER_100 && PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------ - * 84 |No Input (NI) | -Dhttp.keepAlive.time.server=-100 | default timeout set to 5 - * | | (SERVER_100_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------ - * 85 |No Input (NI) | -Dhttp.keepAlive.time.proxy=-200 | default timeout set to 5 - * | | (PROXY_200_NEGATIVE) | - *---------------------------------------------------------------------------------------------------------------------------- - * 86 |No Input (NI) | -Dhttp.keepAlive.time.server=-100 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | default timeout set to 5 - * | | (SERVER_100_NEGATIVE && PROXY_200_NEGATIVE)| - *------------------------------------------------------------------------------------------------------------------------------ - * 87 |No Input (NI) | -Dhttp.keepAlive.time.server=0 | close connection immediately - * | | (SERVER_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------------- - * 88 |No Input (NI) | -Dhttp.keepAlive.time.proxy=0 | default timeout set to 5 - * | | (PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------------- - * 89 |No Input (NI) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_ZERO && PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------------- - * 90 |No Input (NI) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | close connection immediately - * | | (SERVER_ZERO && PROXY_200_NEGATIVE) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 91 |No Input (NI) | -Dhttp.keepAlive.time.server=-100 &&| - * | | -Dhttp.keepAlive.time.proxy=0 | default timeout set to 5 - * | | (SERVER_100_NEGATIVE && PROXY_ZERO) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 92 |No Input (NI) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=0 | Timeout set to 100 - * | | (SERVER_100 && PROXY_ZERO) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 93 |No Input (NI) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=200 | close connection immediately - * | | (SERVER_ZERO && PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 94 |No Input (NI) |-Dhttp.keepAlive.time.server=100 && | - * | |-Dhttp.keepAlive.time.proxy=-200 | Timeout set to 100 - * | | (SERVER_100 && PROXY_200_NEGATIVE) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 95 |No Input (NI) |-Dhttp.keepAlive.time.server=-100 && | - * | |-Dhttp.keepAlive.time.proxy=200 | default timeout set to 5 - * | | (SERVER_100_NEGATIVE && PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 96 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) | No Input Provided (NI) | default timeout set to 5 - *-------------------------------------------------------------------------------------------------------------------------------- - * 97 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.server=100 | Timeout set to 100 - * | | (SERVER_100) | - *-------------------------------------------------------------------------------------------------------------------------------- - * 98 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.proxy=200 | default timeout set to 5 - * | | (PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 99 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.server=100 && | - * | |-Dhttp.keepAlive.time.proxy=200 | Timeout set to 100 - * | |(SERVER_100 && PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 100 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.server=-100 | default timeout set to 5 - * | |(SERVER_100_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 101 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.proxy=-200 | default timeout set to 5 - * | |(PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 102 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.server=-100 && | - * | |-Dhttp.keepAlive.time.proxy=-200 | default timeout set to 5 - * | | (SERVER_100_NEGATIVE && PROXY_200_NEGATIVE)| - *------------------------------------------------------------------------------------------------------------------------------------- - * 103 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.server=0 | close connection immediately - * | | (SERVER_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 104 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.proxy=0 | default timeout set to 5 - * | | (PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 105 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_ZERO && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 106 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.server=0 && | - * | |-Dhttp.keepAlive.time.proxy=-200 | close connection immediately - * | | (SERVER_ZERO && PROXY_ZERO_NEGATIVE)| - *------------------------------------------------------------------------------------------------------------------------------------- - * 107 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.server=-100 && | - * | |-Dhttp.keepAlive.time.proxy=0 | default timeout set to 5 - * | | (SERVER_100_NEGATIVE && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 108 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.server=100 && | - * | |-Dhttp.keepAlive.time.proxy=0 | Timeout set to 100 - * | | (SERVER_100 && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 109 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.server=0 && | - * | |-Dhttp.keepAlive.time.proxy=200 | close connection immediately - * | | (SERVER_ZERO && PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 110 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.server=100 && | - * | |-Dhttp.keepAlive.time.proxy=-200 | Timeout set to 100 - * | |(SERVER_100 && PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 111 |Connection: keep-alive\r\nKeep-alive: timeout=-20 (F) |-Dhttp.keepAlive.time.server=-100 && | - * | |-Dhttp.keepAlive.time.proxy=200 | default timeout set to 5 - * | | (SERVER_100_NEGATIVE && PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 112 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | No Input Provided (NI) | close connection immediately - *------------------------------------------------------------------------------------------------------------------------------------- - * 113 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.server=100 | close connection immediately - * | | (SERVER_100) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 114 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.proxy=200 | close connection immediately - * | | (PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 115 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=200 | close connection immediately - * | | (SERVER_100 && PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 116 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.server=-100 | close connection immediately - * | | (SERVER_100_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------------ - * 117 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.proxy=-200 | close connection immediately - * | | (PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 118 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) |-Dhttp.keepAlive.time.server=-100 && | - * | |-Dhttp.keepAlive.time.proxy=-200 | close connection immediately - * | | (SERVER_100_NEGATIVE && PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 119 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.server=0 | close connection immediately - * | | (SERVER_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 120 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------ - * 121 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_ZERO && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 122 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | close connection immediately - * | | (SERVER_ZERO && PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 123 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.server=-100 &&| - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_100_NEGATIVE && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 124 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_100 && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 125 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=200 | close connection immediately - * | | (SERVER_ZERO && PROXY_200) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 126 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | close connection immediately - * | | (SERVER_100 && PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 127 |Connection: keep-alive\r\nKeep-alive: timeout=0 (G) | -Dhttp.keepAlive.time.server=-100 &&| - * | | -Dhttp.keepAlive.time.proxy=200 | close connection immediately - * | | (SERVER_100_NEGATIVE && PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 128 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| No Input Provided (NI) | default timeout set to 60 - --------------------------------------------------------------------------------------------------------------------------------------- - * 129 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| -Dhttp.keepAlive.time.server=100 | default timeout set to 60 - * | | (SERVER_100) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 130 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| -Dhttp.keepAlive.time.proxy=200 | Timeout set to 200 - * | | (PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 131 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 200 - * | | (SERVER_100 && PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 132 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| -Dhttp.keepAlive.time.server=-100 | default timeout set to 60 - * | | (SERVER_100_NEGATIVE) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 133 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| -Dhttp.keepAlive.time.proxy=-200 | default timeout set to 60 - * | | (PROXY_200_NEGATIVE) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 134 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)|-Dhttp.keepAlive.time.server=-100 && | - * | |-Dhttp.keepAlive.time.proxy=-200 | default timeout set to 60 - * | | (SERVER_100_NEGATIVE && PROXY_200_NEGATIVE)| - *--------------------------------------------------------------------------------------------------------------------------------- - * 135 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| -Dhttp.keepAlive.time.server=0 | default timeout set to 60 - * | | (SERVER_ZERO) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 136 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (PROXY_ZERO) | - *---------------------------------------------------------------------------------------------------------------------------------- - * 137 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_ZERO && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 138 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | default timeout set to 60 - * | | (SERVER_ZERO && PROXY_200_NEGATIVE) | - *--------------------------------------------------------------------------------------------------------------------------------------- - * 139 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| -Dhttp.keepAlive.time.server=-100 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_100_NEGATIVE && PROXY_ZERO) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 140 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_100 && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 141 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)| -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=200 | Timeout set to 20 - * | | (SERVER_ZERO && PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 142 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)|-Dhttp.keepAlive.time.server=100 && | - * | |-Dhttp.keepAlive.time.proxy=-200 | default timeout set to 60 - * | | (SERVER_100 && PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 143 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=-20 (H)|-Dhttp.keepAlive.time.server=-100 && | - * | |-Dhttp.keepAlive.time.proxy=200 | Timeout set to 200 - * | | (SERVER_100_NEGATIVE && PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 144 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | No Input Provided (NI) | close connection immediately - *-------------------------------------------------------------------------------------------------------------------------------------- - * 145 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.server=100 | close connection immediately - * | | (SERVER_100) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 146 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.proxy=200 | close connection immediately - * | | (PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 147 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=200 | close connection immediately - * | | (SERVER_100 && PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 148 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.server=-100 | close connection immediately - * | | (SERVER_100_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 149 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.proxy=-200 | close connection immediately - * | | (PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 150 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.server=-100 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | close connection immediately - * | | (SERVER_100_NEGATIVE && PROXY_200_NEGATIVE) | - *------------------------------------------------------------------------------------------------------------------------------------ - * 151 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.server=0 | close connection immediately - * | | (SERVER_ZERO) | - *----------------------------------------------------------------------------------------------------------------------------------- - * 152 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (PROXY_ZERO) | - *--------------------------------------------------------------------------------------------------------------------------------- - * 153 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_ZERO && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------ - * 154 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | close connection immediately - * | | (SERVER_ZERO && PROXY_200_NEGATIVE) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 155 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.server=-100 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_100_NEGATIVE && PROXY_ZERO) | - *------------------------------------------------------------------------------------------------------------------------------------- - * 156 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=0 | close connection immediately - * | | (SERVER_100 && PROXY_ZERO) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 157 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.server=0 && | - * | | -Dhttp.keepAlive.time.proxy=200 | close connection immediately - * | | (SERVER_ZERO && PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 158 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.server=100 && | - * | | -Dhttp.keepAlive.time.proxy=-200 | close connection immediately - * | | (SERVER_100 && PROXY_200_NEGATIVE) | - *-------------------------------------------------------------------------------------------------------------------------------------- - * 159 |Proxy-Connection:keep-alive\r\nKeep-alive:timeout=0 (I) | -Dhttp.keepAlive.time.server=-100 && | - * | | -Dhttp.keepAlive.time.proxy=200 | close connection immediately - * | | (SERVER_100_NEGATIVE && PROXY_200) | - *-------------------------------------------------------------------------------------------------------------------------------------- - */ - - /* private static final String[] serverScenarios = { - A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, - B, B, B, B, B, B, B, B, B, B,B, B, B, B, B, B, - C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, - D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, D, - E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, - NI, NI, NI, NI, NI, NI, NI, NI, NI, NI, NI, NI, NI, NI, NI, NI, - F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, - G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, - H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I - }; */ - /* - * following are client scenarios which are repeated. - */ - private static final String[] a = { - NI, SERVER_100, PROXY_200, SERVER_100 + CLIENT_SEPARATOR + PROXY_200, SERVER_100_NEGATIVE, - PROXY_200_NEGATIVE, SERVER_100_NEGATIVE + CLIENT_SEPARATOR + PROXY_200_NEGATIVE, - SERVER_ZERO, PROXY_ZERO, SERVER_ZERO + CLIENT_SEPARATOR + PROXY_ZERO, - SERVER_ZERO + CLIENT_SEPARATOR + PROXY_200_NEGATIVE, SERVER_100_NEGATIVE + CLIENT_SEPARATOR + PROXY_ZERO, - SERVER_100 + CLIENT_SEPARATOR + PROXY_ZERO, SERVER_ZERO + CLIENT_SEPARATOR + PROXY_200, - SERVER_100 + CLIENT_SEPARATOR + PROXY_200_NEGATIVE, SERVER_100_NEGATIVE + CLIENT_SEPARATOR + PROXY_200 - }; + private static final String CONNECTION_KEEP_ALIVE_WITH_TIMEOUT = CONNECTION_KEEP_ALIVE_ONLY + NEW_LINE + KEEP_ALIVE_TIMEOUT; - /* private String[] clientScenarios = { - a[0] , a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], - a[0] , a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], - a[0] , a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], - a[0] , a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], - a[0] , a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], - a[0] , a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], - a[0] , a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], - a[0] , a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], - a[0] , a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], - a[0] , a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], - }; */ - - private static final String[] clientScenarios = { - a[0] , a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15] + private static final String[] serverHeaders = { + null, + CONNECTION_KEEP_ALIVE_ONLY + NEW_LINE, + CONNECTION_KEEP_ALIVE_WITH_TIMEOUT + NEW_LINE, + PROXY_CONNECTION_KEEP_ALIVE_ONLY + NEW_LINE, + PROXY_CONNECTION_KEEP_ALIVE_ONLY + NEW_LINE + CONNECTION_KEEP_ALIVE_ONLY + NEW_LINE, + PROXY_CONNECTION_KEEP_ALIVE_ONLY + NEW_LINE + KEEP_ALIVE_PROXY_TIMEOUT + NEW_LINE, + CONNECTION_KEEP_ALIVE_ONLY + NEW_LINE + KEEP_ALIVE_TIMEOUT_NEG + NEW_LINE, + CONNECTION_KEEP_ALIVE_ONLY + NEW_LINE + KEEP_ALIVE_TIMEOUT_ZERO + NEW_LINE, + PROXY_CONNECTION_KEEP_ALIVE_ONLY + NEW_LINE + KEEP_ALIVE_TIMEOUT_NEG + NEW_LINE, + PROXY_CONNECTION_KEEP_ALIVE_ONLY + NEW_LINE + KEEP_ALIVE_TIMEOUT_ZERO + NEW_LINE }; - private static final int[] expectedValues = { - 5, 100, 5, 100, 5, 5, 5, 0, 5, 0, 0, 5, 100, 0, 100, 5, - 20, 20 , 20, 20, 20, 20, 20, 20, 20, 20 , 20, 20, 20, 20, 20, 20, - 60, 60, 200, 200, 60, 60, 60, 60, 0, 0, 60, 0, 0, 200, 60, 200, - 60, 60, 200, 200, 60, 60, 60, 60, 0, 0, 60, 0, 0, 200, 60, 200, - 120, 120, 120, 120,120,120,120,120,120, 120, 120, 120, 120, 120, 120, 120, - 5, 100, 5, 100, 5, 5, 5, 0, 5, 0, 0, 5, 100, 0, 100, 5, - 5, 100, 5, 100, 5, 5, 5, 0, 5, 0, 0, 5, 100, 0, 100, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 60, 60, 200, 200, 60, 60, 60, 60, 0, 0, 60, 0, 0, 200, 60, 200, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }; - - private final CountDownLatch countDownLatch = new CountDownLatch(1); - - private final CountDownLatch serverCountDownLatch = new CountDownLatch(1); - - /* - * setting of client properties -Dhttp.keepAlive.time.server and -Dhttp.keepAlive.time.proxy is handled through this method. - * There are 16 client scenarios in total starting with scenarioNumber 0(zero) and ending with 15. - * Server Scenarios are grouped into batch of 16 scenarios. - * There are 10 batches in total and each batch contains 16 scenarios so 10 * 16 = 160 scenarios in total. - * 16 Client Scenarios are used repeatedly for every server scenario batch. - * for serverscenario[0],serverscenario[16],serverscenario[32] ... serverscenario[144] is mapped to clientscenario[0] - * for serverscenario[1],serverscenario[17],serverscenario[33] ... serverscenario[145] is mapped to clientscenario[1] - * for serverscenario[2],serverscenario[18],serverscenario[34] ... serverscenario[146] is mapped to clientscenario[2] - * ... - * for serverscenario[15],serverscenario[31],serverscenario[47] ... serverscenario[159] is mapped to clientscenario[15] - */ - private int getClientScenarioNumber(int scenarioNumber) { - return scenarioNumber % 16 ; - } + private static KeepAliveCache keepAliveCache; - /* - * Returns SERVER_RESPONSE as String based on integer inputParameter scenarioNumber. - * Server Scenarios are grouped into batch of 16 scenarios starting with scenarioNumber 0 (zero) - * so there are 10 batches in total and each batch contains 16 scenarios so 10 * 16 = 160 scenarios in total. - * For each batch of 16 scenarios, there will be common SERVER_RESPONSE for all 16 scenarios in batch. - * for scenario numbers from 0 to 15 server response is: Connection:keep-alive - * for scenario numbers from 16 to 31 server response is: SERVER_RESPONSE=Connection: keep-alive\r\nKeep-alive: timeout=20 - * for scenario numbers from 32 to 47 server response is: SERVER_RESPONSE=Proxy-Connection: keep-alive - * for scenario numbers from 48 to 63 server response is: SERVER_RESPONSE=Connection:keep-alive\r\nProxy-connection:keep-alive - * for scenario numbers from 64 to 79 server response is: SERVER_RESPONSE=Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 - * for scenario numbers from 80 to 95 server response is: SERVER_RESPONSE=No Input - * for scenario numbers from 96 to 111 server response is: SERVER_RESPONSE=Connection: keep-alive\r\nKeep-alive: timeout=-20 - * for scenario numbers from 112 to 127 server resonse is: Connection: keep-alive\r\nKeep-alive: timeout=0 - * for scenario numbers from 128 to 143 server response is: Proxy-connection:keep-alive\r\nKeep-alive:timeout=-20 - * for scenario numbers from 144 to 159 server response is: Proxy-connection:keep-alive\r\nKeep-alive:timeout=0 - */ - private String getServerScenario(int scenarioNumber) { - /* - * ServerResponse for scenarios from 0 to 15 - * SERVER_RESPONSE:Connection:keep-alive - */ - if(scenarioNumber >= 0 && scenarioNumber <= 15) { - return A; - } - /* - * ServerResponse for scenarios from 16 to 31 - * SERVER_RESPONSE=Connection: keep-alive\r\nKeep-alive: timeout=20 - */ - else if (scenarioNumber >= 16 && scenarioNumber <= 31){ - return B; - } - /* - * ServerResponse for scenarios from 32 to 47 - * SERVER_RESPONSE=Proxy-Connection: keep-alive - */ - else if (scenarioNumber >= 32 && scenarioNumber <= 47){ - return C; - } - /* - * ServerResponse for scenarios from 48 to 63 - * SERVER_RESPONSE=Connection:keep-alive\r\nProxy-connection:keep-alive - */ - else if (scenarioNumber >= 48 && scenarioNumber <= 63){ - return D; - /* - * ServerResponse for scenarios from 64 to 79 - * SERVER_RESPONSE=Proxy-connection:keep-alive\r\nKeep-alive:timeout=120 - */ - } else if (scenarioNumber >= 64 && scenarioNumber <= 79){ - return E; - } - /* - * ServerResponse for scenarios from 80 to 95 - * SERVER_RESPONSE=No Input - */ - else if (scenarioNumber >= 80 && scenarioNumber <= 95){ - return NI; - } - /* - * ServerResponse for scenarios from 96 to 111 - * SERVER_RESPONSE=Connection: keep-alive\r\nKeep-alive: timeout=-20 - */ - else if (scenarioNumber >= 96 && scenarioNumber <= 111){ - return F; - } - /* - * ServerResponse for scenarios from 112 to 127 - * SERVER_RESPONSE=Connection: keep-alive\r\nKeep-alive: timeout=0 - */ - else if (scenarioNumber >= 112 && scenarioNumber <= 127){ - return G; - } - /* - * ServerResponse for scenarios from 128 to 143 - * SERVER_RESPONSE=Proxy-connection:keep-alive\r\nKeep-alive:timeout=-20 - */ - else if (scenarioNumber >= 128 && scenarioNumber <= 143){ - return H; - } - /* - * ServerResponse for scenarios from 144 to 159 - * SERVER_RESPONSE=Proxy-connection:keep-alive\r\nKeep-alive:timeout=0 - */ - else if (scenarioNumber >= 144 && scenarioNumber <= 159){ - return I; - } - /*Invalid Case*/ - return null; - } + private static Constructor keepAliveKeyClassconstructor; - private void startScenario(int scenarioNumber) throws Exception { - System.out.println("serverScenarios[" + scenarioNumber + "]=" + getServerScenario(scenarioNumber)); - System.out.println("clientScenarios[" + scenarioNumber + "]=" + clientScenarios[getClientScenarioNumber(scenarioNumber)]); - if(expectedValues[scenarioNumber] == 0) { - System.out.println("ExpectedOutput=" + NOT_CACHED); - } else { - System.out.println("ExpectedOutput=" + expectedValues[scenarioNumber]); - } - System.out.println(); - startServer(scenarioNumber); - runClient(scenarioNumber); - } + // variables set by server thread + private volatile int serverPort; + private volatile boolean isProxySet; - private void startServer(int scenarioNumber) { - Thread server = new Thread(new Runnable() { - @Override - public void run() { - try { - executeServer(scenarioNumber); - } catch (IOException e) { - e.printStackTrace(); - } - } - }, "SERVER"); - server.start(); - } + private static final Phaser serverGate = new Phaser(2); private void readAll(Socket s) throws IOException { byte[] buf = new byte[128]; @@ -1058,215 +128,208 @@ private void readAll(Socket s) throws IOException { } } - private void executeServer(int scenarioNumber) throws IOException { - String serverScenarioContent = null; - if (!getServerScenario(scenarioNumber).equalsIgnoreCase(NI)) { - serverScenarioContent = getServerScenario(scenarioNumber) + NEW_LINE; - /* - * isProxySet should be set before Server is moved to Listen State. - */ - if (serverScenarioContent.contains("Proxy")) { - isProxySet = true; - } else { - isProxySet = false; - } + private void executeServer(int scenarioNumber) { + String scenarioHeaders = serverHeaders[scenarioNumber]; + if (scenarioHeaders != null) { + // isProxySet should be set before Server is moved to Listen State. + isProxySet = scenarioHeaders.contains("Proxy"); } - ServerSocket serverSocket = null; - Socket socket = null; - OutputStreamWriter out = null; - InetAddress loopback = InetAddress.getLoopbackAddress(); - try { - serverSocket = new ServerSocket(); - serverSocket.bind(new InetSocketAddress(loopback, 0)); - SERVER_PORT = serverSocket.getLocalPort(); - //serverReady = true; - this.serverCountDownLatch.countDown(); - System.out - .println("SERVER_PORT= " + SERVER_PORT +" isProxySet=" + isProxySet); - /* - * Server will be waiting for clients to connect. - */ - socket = serverSocket.accept(); - readAll(socket); - out = new OutputStreamWriter(socket.getOutputStream()); - String BODY = "SERVER REPLY: Hello world"; - String CLEN = "Content-Length: " + BODY.length() + NEW_LINE; - /* send the header */ - out.write("HTTP/1.1 200 OK\r\n"); - out.write("Content-Type: text/plain; charset=iso-8859-1\r\n"); - /* - * append each scenario content from array. - */ - if(serverScenarioContent != null) { - out.write(serverScenarioContent); - } - out.write(CLEN); - out.write(NEW_LINE); - out.write(BODY); - out.flush(); - } catch (IOException e) { - e.printStackTrace(); - } finally { - if (out != null) { - out.flush(); - out.close(); - } - if (socket != null) { - socket.close(); - } - if (serverSocket != null) { - serverSocket.close(); + try (ServerSocket serverSocket = new ServerSocket()) { + serverSocket.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); + serverPort = serverSocket.getLocalPort(); + serverGate.arrive(); + + // Server will be waiting for clients to connect. + try (Socket socket = serverSocket.accept()) { + readAll(socket); + try (OutputStreamWriter out = new OutputStreamWriter(socket.getOutputStream())) { + String BODY = "SERVER REPLY: Hello world"; + String CLEN = "Content-Length: " + BODY.length() + NEW_LINE; + + // send common headers + out.write("HTTP/1.1 200 OK\r\n"); + out.write("Content-Type: text/plain; charset=iso-8859-1\r\n"); + + // set scenario headers + if (scenarioHeaders != null) { + out.write(scenarioHeaders); + } + + // send content + out.write(CLEN); + out.write(NEW_LINE); + out.write(BODY); + } } + } catch (IOException ioe) { + throw new RuntimeException("IOException in server thread", ioe); } } - private void runClient(int scenarioNumber) throws Exception { - try { - connectToServerURL(scenarioNumber); - } finally { - System.out.println("client count down latch:" + scenarioNumber); - this.countDownLatch.countDown(); - System.out.println(); - System.out.println(); - } - } + private void fetchInfo(int expectedValue, HttpURLConnection httpUrlConnection) throws Exception { + Object expectedKeepAliveKey = keepAliveKeyClassconstructor.newInstance(httpUrlConnection.getURL(), null); + Object clientVectorObjectInMap = keepAliveCache.get(expectedKeepAliveKey); + System.out.println("ClientVector for KeepAliveKey:" + clientVectorObjectInMap); + HttpClient httpClientCached = keepAliveCache.get(httpUrlConnection.getURL(), null); + System.out.println("HttpClient in Cache:" + httpClientCached); - private void connectToServerURL(int scenarioNumber) throws Exception { - // System.setProperty("java.net.useSystemProxies", "false"); - // System.setProperty("http.nonProxyHosts", ""); - // System.setProperty("http.proxyHost", "localhost"); - // System.setProperty("http.proxyPort", String.valueOf(SERVER_PORT)); - System.out.println("Following are Existing System Properties if set any"); - System.out.println("http.keepAlive.time.server:" + System.getProperty("http.keepAlive.time.server")); - System.out.println("http.keepAlive.time.proxy:" + System.getProperty("http.keepAlive.time.proxy")); - System.setProperty("java.net.useSystemProxies", "false"); - System.out.println("http.proxyPort:"+System.getProperty("http.proxyPort")); - System.out.println("http.proxyHost:"+System.getProperty("http.proxyHost")); - System.clearProperty("http.keepAlive.time.server"); - System.clearProperty("http.keepAlive.time.proxy"); - // fetch clientScenearios for each scenarioNumber from array and set it to - // System property. - if (!clientScenarios[getClientScenarioNumber(scenarioNumber)].equalsIgnoreCase(NI)) { - System.out.println("Client Input Parsing"); - for (String clientScenarioString : clientScenarios[getClientScenarioNumber(scenarioNumber)].split(CLIENT_SEPARATOR)) { - System.out.println(clientScenarioString); - String key = clientScenarioString.split("=")[0]; - String value = clientScenarioString.split("=")[1]; - System.setProperty(key, value); + if (httpClientCached != null) { + System.out.println("KeepingAlive:" + httpClientCached.isKeepingAlive()); + System.out.println("UsingProxy:" + httpClientCached.getUsingProxy()); + System.out.println("ProxiedHost:" + httpClientCached.getProxyHostUsed()); + System.out.println("ProxiedPort:" + httpClientCached.getProxyPortUsed()); + Class clientVectorClass = Class.forName("sun.net.www.http.KeepAliveCache$ClientVector"); + Field napField = clientVectorClass.getDeclaredField("nap"); + napField.setAccessible(true); + int napValue = (int) napField.get(clientVectorObjectInMap); + int actualValue = napValue / 1000; + if (expectedValue == actualValue) { + System.out.printf("Cache time:%d\n", actualValue); + } else { + throw new RuntimeException("Sleep time of " + actualValue + " not expected (" + expectedValue + ")"); + } + } else { + if (expectedValue == 0) { + System.out.println("Connection not cached."); + } else { + throw new RuntimeException("Connection was not cached although expected with sleep time of:" + expectedValue); } } + } + + private void connectToServerURL(int expectedValue) throws Exception { // wait until ServerSocket moves to listening state. - this.serverCountDownLatch.await(); - System.out.println("client started"); - URL url = URIBuilder.newBuilder().scheme("http").loopback().port(SERVER_PORT).toURL(); - System.out.println("connecting from client to SERVER URL:" + url); + serverGate.arriveAndAwaitAdvance(); + URL url = URIBuilder.newBuilder().scheme("http").loopback().port(serverPort).toURL(); + System.out.println("connecting to server URL: " + url + ", isProxySet: " + isProxySet); HttpURLConnection httpUrlConnection = null; - /* - * isProxySet is set to true when Expected Server Response contains Proxy-Connection header. - */ + + // isProxySet is set to true when Expected Server Response contains Proxy-Connection header. if (isProxySet) { - httpUrlConnection = (sun.net.www.protocol.http.HttpURLConnection) url - .openConnection(new Proxy(Type.HTTP, new InetSocketAddress("localhost", SERVER_PORT))); + httpUrlConnection = (HttpURLConnection) url + .openConnection(new Proxy(Type.HTTP, new InetSocketAddress("localhost", serverPort))); } else { - httpUrlConnection = (sun.net.www.protocol.http.HttpURLConnection) url.openConnection(); + httpUrlConnection = (HttpURLConnection) url.openConnection(); } - InputStreamReader inputStreamReader = new InputStreamReader(httpUrlConnection.getInputStream()); - BufferedReader bufferedReader = null; - try { - bufferedReader = new BufferedReader(inputStreamReader); + + try (InputStreamReader inputStreamReader = new InputStreamReader(httpUrlConnection.getInputStream()); + BufferedReader bufferedReader = new BufferedReader(inputStreamReader)) { while (true) { - String eachLine = bufferedReader.readLine(); - if (eachLine == null) { + String line = bufferedReader.readLine(); + if (line == null) { break; } - System.out.println(eachLine); - } - } finally { - if (bufferedReader != null) { - bufferedReader.close(); + System.out.println(line); } } - // System.out.println("ResponseCode:" + httpUrlConnection.getResponseCode()); - // System.out.println("ResponseMessage:" + httpUrlConnection.getResponseMessage()); - // System.out.println("Content:" + httpUrlConnection.getContent()); - // Thread.sleep(2000); for (Entry> header : httpUrlConnection.getHeaderFields().entrySet()) { System.out.println(header.getKey() + "=" + header.getValue()); } - fetchInfo(scenarioNumber, httpUrlConnection); + fetchInfo(expectedValue, httpUrlConnection); } - private void fetchInfo(int scenarioNumber, sun.net.www.protocol.http.HttpURLConnection httpUrlConnection) - throws Exception { - Field field = Class.forName("sun.net.www.protocol.http.HttpURLConnection").getDeclaredField("http"); - field.setAccessible(true); - HttpClient httpClient = (HttpClient) field.get(httpUrlConnection); - // System.out.println("httpclient=" + httpClient); - Field keepAliveField = Class.forName("sun.net.www.http.HttpClient").getDeclaredField("kac"); - keepAliveField.setAccessible(true); - KeepAliveCache keepAliveCache = (KeepAliveCache) keepAliveField.get(httpClient); - System.out.println("keepAliveCache" + keepAliveCache); - System.out.println("SERVER URL:" + httpUrlConnection.getURL()); - /* - * create KeepAliveKey(URL,Object) object and compare created KeepAliveKey and - * existing using equals() method: KeepAliveKey.equals() - */ - Class keepAliveKeyClass = Class.forName("sun.net.www.http.KeepAliveKey"); - // System.out.println("keepAliveKeyClass=" + keepAliveKeyClass); - Constructor keepAliveKeyClassconstructor = keepAliveKeyClass.getDeclaredConstructors()[0]; - keepAliveKeyClassconstructor.setAccessible(true); - Object expectedKeepAliveKey = keepAliveKeyClassconstructor.newInstance(httpUrlConnection.getURL(), null); - System.out.println("ExpectedKeepAliveKey=" + expectedKeepAliveKey); - Object clientVectorObjectInMap = keepAliveCache.get(expectedKeepAliveKey); - System.out.println("ClientVector=" + clientVectorObjectInMap); - HttpClient httpClientCached = keepAliveCache.get(httpUrlConnection.getURL(), null); - System.out.println("HttpClient in Cache:" + httpClientCached); - if(httpClientCached != null) { - System.out.println("KeepingAlive:" + httpClientCached.isKeepingAlive()); - System.out.println("UsingProxy:" + httpClientCached.getUsingProxy()); - System.out.println("ProxiedHost:" + httpClientCached.getProxyHostUsed()); - System.out.println("ProxiedPort:" + httpClientCached.getProxyPortUsed()); - System.out.println("ProxyPortUsingSystemProperty:" + System.getProperty("http.proxyPort")); - System.out.println("ProxyHostUsingSystemProperty:" + System.getProperty("http.proxyHost")); - System.out.println("http.keepAlive.time.server=" + System.getProperty("http.keepAlive.time.server")); - System.out.println("http.keepAlive.time.proxy=" + System.getProperty("http.keepAlive.time.proxy")); - Class clientVectorClass = Class.forName("sun.net.www.http.KeepAliveCache$ClientVector"); - // System.out.println("clientVectorClass=" + clientVectorClass); - Field napField = clientVectorClass.getDeclaredField("nap"); - napField.setAccessible(true); - int napValue = (int) napField.get(clientVectorObjectInMap); - int actualValue = napValue / 1000; - // System.out.println("nap=" + napValue / 1000); - System.out.printf("ExpectedOutput:%d ActualOutput:%d ", expectedValues[scenarioNumber], actualValue); - System.out.println(); - if (expectedValues[scenarioNumber] != actualValue) { - throw new RuntimeException( - "ExpectedOutput:" + expectedValues[scenarioNumber] + " ActualOutput: " + actualValue); + private int getExpectedCachingValue(int serverScenario) { + if (serverScenario == 2) { + // Connection: keep-alive && Keep-alive: timeout=20 + // + // server side keep-alive timeout is what counts here + return 20; + } else if (serverScenario == 3 || serverScenario == 4 || serverScenario == 8) { + // Proxy-Connection: keep-alive + // Connection:keep-alive && Proxy-connection:keep-alive + // Proxy-Connection:keep-alive && Keep-alive:timeout=-20 + // + // Proxy-connection:keep-alive is set, timeout could be invalid -> value of http.keepAlive.time.proxy or default of 60 + int httpKeepAliveTimeProxy; + try { + httpKeepAliveTimeProxy = Integer.valueOf(System.getProperty("http.keepAlive.time.proxy")); + } catch (NumberFormatException e) { + httpKeepAliveTimeProxy = -1; } + return httpKeepAliveTimeProxy < 0 ? 60 : httpKeepAliveTimeProxy; + } else if (serverScenario == 5) { + // Proxy-connection:keep-alive && Keep-alive:timeout=120 + // + // server side keep-alive timeout is what counts here + return 120; + } else if (serverScenario == 7 || serverScenario == 9) { + // Connection: keep-alive && Keep-alive: timeout=0 + // Proxy-Connection:keep-alive && Keep-alive:timeout=0 + // + // no caching + return 0; } else { - //executed when value is not cached. - String expected = expectedValues[scenarioNumber] == 0 ? NOT_CACHED - : String.valueOf(expectedValues[scenarioNumber]); - System.out.println("ExpectedOutput:" + expected + " ActualOutput:" + NOT_CACHED); - if (!expected.equalsIgnoreCase(NOT_CACHED)) { - throw new RuntimeException("ExpectedOutput:" + expected + " ActualOutput:" + NOT_CACHED); + // No server parameters + // Connection: keep-alive + // Connection: keep-alive && Keep-alive: timeout=-20 + // + // Nothing or Connection:keep-alive is set, timeout could be invalid -> value of http.keepAlive.time.server or default of 5 + int httpKeepAliveTimeServer; + try { + httpKeepAliveTimeServer = Integer.valueOf(System.getProperty("http.keepAlive.time.server")); + } catch (NumberFormatException e) { + httpKeepAliveTimeServer = -1; } - } + return httpKeepAliveTimeServer < 0 ? 5 : httpKeepAliveTimeServer; + } } - public static void main(String[] args) throws Exception { - if (args.length != 1) { - throw new IllegalArgumentException("Usage:java KeepAliveTest.java "); + private void runScenario(int scenarioNumber) throws Exception { + int expectedValue = getExpectedCachingValue(scenarioNumber); + System.out.println("Expecting Cache Time of " + expectedValue + " for server headers:"); + if (serverHeaders[scenarioNumber] == null) { + System.out.println(); + } else { + System.out.print(serverHeaders[scenarioNumber]); } + Thread server = Thread.ofPlatform().start(() -> executeServer(scenarioNumber)); + connectToServerURL(expectedValue); + server.join(); + System.out.println(); + } + + private static void initialize() throws Exception { + System.clearProperty("http.proxyPort"); + System.clearProperty("http.proxyHost"); + System.setProperty("java.net.useSystemProxies", "false"); + + Field keepAliveField = sun.net.www.http.HttpClient.class.getDeclaredField("kac"); + keepAliveField.setAccessible(true); + keepAliveCache = (KeepAliveCache) keepAliveField.get(null); + System.out.println("KeepAliveCache: " + keepAliveCache); + keepAliveKeyClassconstructor = Class.forName("sun.net.www.http.KeepAliveKey").getDeclaredConstructors()[0]; + keepAliveKeyClassconstructor.setAccessible(true); + logger.setLevel(Level.FINEST); ConsoleHandler h = new ConsoleHandler(); h.setLevel(Level.FINEST); logger.addHandler(h); - KeepAliveTest keepAliveTest = new KeepAliveTest(); - if (args.length != 0) { - keepAliveTest.startScenario(Integer.valueOf(args[0])); + + System.out.println("Client properties: http.keepAlive.time.server=" + System.getProperty("http.keepAlive.time.server") + + ", http.keepAlive.time.proxy=" + System.getProperty("http.keepAlive.time.proxy")); + } + + public static void main(String[] args) throws Exception { + if (args.length > 1) { + throw new IllegalArgumentException("Usage:java KeepAliveTest.java "); + } else if (args.length == 1) { + // an individual test scenario + try { + int scenarioNumber = Integer.valueOf(args[0]); + if (scenarioNumber < 0 || scenarioNumber > 9) { + throw new IllegalArgumentException("Scenario " + scenarioNumber + " does not exist"); + } + initialize(); + new KeepAliveTest().runScenario(scenarioNumber); + } catch (NumberFormatException e) { + throw new IllegalArgumentException("Scenario must be a number, got " + args[0]); + } + } else { + // all server scenarios + initialize(); + for (int i = 0; i < 10; i++) { + new KeepAliveTest().runScenario(i); + } } - // make main thread wait until server and client is completed. - keepAliveTest.countDownLatch.await(); } } diff --git a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/ControlFlowAction.java b/test/jdk/sun/security/jca/NullPreferredList.java similarity index 60% rename from src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/ControlFlowAction.java rename to test/jdk/sun/security/jca/NullPreferredList.java index 43b8fae8f58..0a8cf73443c 100644 --- a/src/utils/IdealGraphVisualizer/ControlFlow/src/main/java/com/sun/hotspot/igv/controlflow/ControlFlowAction.java +++ b/test/jdk/sun/security/jca/NullPreferredList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -19,28 +19,23 @@ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. - * */ -package com.sun.hotspot.igv.controlflow; -import java.awt.event.ActionEvent; -import javax.swing.AbstractAction; -import org.openide.util.NbBundle; -import org.openide.windows.TopComponent; +import java.security.*; /** - * - * @author Thomas Wuerthinger + * @test + * @bug 8328864 + * @summary Test that ProviderList.getService checks configs when + * ProviderList.getProvider fails for preferred providers. + * @run main/othervm + * -Djava.security.properties=${test.src}/app-security.properties NullPreferredList */ -public class ControlFlowAction extends AbstractAction { - public ControlFlowAction() { - super(NbBundle.getMessage(ControlFlowAction.class, "CTL_ControlFlowAction")); - } +public class NullPreferredList { - public void actionPerformed(ActionEvent evt) { - TopComponent win = ControlFlowTopComponent.findInstance(); - win.open(); - win.requestActive(); + public static void main(final String[] args) throws Exception { + final KeyStore ks = KeyStore.getInstance("PKCS12"); + System.out.println("Got keystore " + ks); } } diff --git a/test/jdk/sun/security/jca/app-security.properties b/test/jdk/sun/security/jca/app-security.properties new file mode 100644 index 00000000000..1f15a7797c2 --- /dev/null +++ b/test/jdk/sun/security/jca/app-security.properties @@ -0,0 +1 @@ +jdk.security.provider.preferred=KeyStore.PKCS12:NonExistingProvider diff --git a/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java b/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java index 4af51070468..ff6e5ec8dff 100644 --- a/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java +++ b/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 8004834 8007610 8129909 8182765 8247815 + * @bug 8004834 8007610 8129909 8182765 8247815 8296175 * @summary Add doclint support into javadoc * @modules jdk.compiler/com.sun.tools.javac.main */ @@ -117,7 +117,10 @@ private enum Message { // javadoc messages for bad options OPT_BADARG(ERROR, "error: Invalid argument for -Xdoclint option"), OPT_BADQUAL(ERROR, "error: Access qualifiers not permitted for -Xdoclint arguments"), - OPT_BADPACKAGEARG(ERROR, "error: Invalid argument for -Xdoclint/package option"); + OPT_BADPACKAGEARG(ERROR, "error: Invalid argument for -Xdoclint/package option"), + + // javadoc notice about markers for invalid input + JD_NOTE_MARK(NOTE, "The generated documentation contains diagnostic markers for invalid input."); final Diagnostic.Kind kind; final String text; @@ -151,11 +154,13 @@ void run() throws Exception { test(List.of(htmlVersion), Main.Result.ERROR, - EnumSet.of(Message.DL_ERR10A, Message.DL_WRN14A)); + EnumSet.of(Message.DL_ERR10A, Message.DL_WRN14A, + Message.JD_NOTE_MARK)); test(List.of(htmlVersion, rawDiags), Main.Result.ERROR, - EnumSet.of(Message.DL_ERR10, Message.DL_WRN14)); + EnumSet.of(Message.DL_ERR10, Message.DL_WRN14, + Message.JD_NOTE_MARK)); // test(List.of("-Xdoclint:none"), // Main.Result.OK, @@ -163,7 +168,8 @@ void run() throws Exception { test(List.of(htmlVersion, rawDiags, "-Xdoclint"), Main.Result.ERROR, - EnumSet.of(Message.DL_ERR10, Message.DL_WRN14)); + EnumSet.of(Message.DL_ERR10, Message.DL_WRN14, + Message.JD_NOTE_MARK)); test(List.of(htmlVersion, rawDiags, "-Xdoclint:all/public"), Main.Result.ERROR, @@ -175,19 +181,21 @@ void run() throws Exception { test(List.of(htmlVersion, rawDiags, "-Xdoclint:missing"), Main.Result.OK, - EnumSet.of(Message.DL_WRN14)); + EnumSet.of(Message.DL_WRN14, Message.JD_NOTE_MARK)); test(List.of(htmlVersion, rawDiags, "-private"), Main.Result.ERROR, - EnumSet.of(Message.DL_ERR6, Message.DL_ERR10, Message.DL_WRN14)); + EnumSet.of(Message.DL_ERR6, Message.DL_ERR10, + Message.DL_WRN14, Message.JD_NOTE_MARK)); test(List.of(htmlVersion, rawDiags, "-Xdoclint:missing,syntax", "-private"), Main.Result.ERROR, - EnumSet.of(Message.DL_ERR6, Message.DL_WRN14)); + EnumSet.of(Message.DL_ERR6, Message.DL_WRN14, + Message.JD_NOTE_MARK)); test(List.of(htmlVersion, rawDiags, "-Xdoclint:reference"), Main.Result.ERROR, - EnumSet.of(Message.DL_ERR10)); + EnumSet.of(Message.DL_ERR10, Message.JD_NOTE_MARK)); test(List.of(htmlVersion, rawDiags, "-Xdoclint:badarg"), Main.Result.ERROR, @@ -199,12 +207,13 @@ void run() throws Exception { test(List.of(htmlVersion, rawDiags), Main.Result.ERROR, EnumSet.of(Message.DL_ERR_P1TEST, Message.DL_ERR_P2TEST, - Message.DL_WARN_P1TEST, Message.DL_WARN_P2TEST)); + Message.DL_WARN_P1TEST, Message.DL_WARN_P2TEST, Message.JD_NOTE_MARK)); test(List.of(htmlVersion, rawDiags, "-Xdoclint/package:p1"), Main.Result.ERROR, EnumSet.of(Message.DL_ERR_P1TEST, - Message.DL_WARN_P1TEST)); + Message.DL_WARN_P1TEST, + Message.JD_NOTE_MARK)); test(List.of(htmlVersion, rawDiags, "-Xdoclint/package:*p"), Main.Result.ERROR, diff --git a/test/langtools/jdk/jshell/JLCollisionTest.java b/test/langtools/jdk/jshell/JLCollisionTest.java new file mode 100644 index 00000000000..2859c1a49f7 --- /dev/null +++ b/test/langtools/jdk/jshell/JLCollisionTest.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8327512 + * @summary Clashes between java.lang classes and custom-defined classes with + * the same simple names + * @modules jdk.jshell/jdk.jshell + * @build KullaTesting + * @run testng JLCollisionTest + */ + +import org.testng.annotations.Test; + +@Test +public class JLCollisionTest extends KullaTesting { + + public void testObject() { + assertEval("class Object {}"); + assertEval("1"); + assertEval("null"); + assertEval("$2 = \"\""); + } + + public void testThrowable() { + assertEval("class Throwable {}"); + assertEval("1"); + //var with an "enhanced" (non-denotable) type: + assertEval("var _ = new Object() {};"); + } + + public void testSuppressWarnings() { + assertEval("class SuppressWarnings {}"); + //var with an "enhanced" (non-denotable) type: + assertEval("var _ = new Object() {};"); + } + +} diff --git a/test/langtools/tools/javac/OverrideChecks/6199153/T6199153.java b/test/langtools/tools/javac/OverrideChecks/6199153/T6199153.java index 4a800d1f415..d696301f6d2 100644 --- a/test/langtools/tools/javac/OverrideChecks/6199153/T6199153.java +++ b/test/langtools/tools/javac/OverrideChecks/6199153/T6199153.java @@ -1,4 +1,4 @@ -/** +/* * @test /nodynamiccopyright/ * @bug 6199153 * @summary Generic throws and overriding diff --git a/test/langtools/tools/javac/TypeToString.java b/test/langtools/tools/javac/TypeToString.java new file mode 100644 index 00000000000..422eb7e2314 --- /dev/null +++ b/test/langtools/tools/javac/TypeToString.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8309881 + * @library /tools/javac/lib + * @modules java.compiler + * jdk.compiler + * @build JavacTestingAbstractProcessor TypeToString + * @compile -cp . -processor TypeToString -proc:only TypeToString.java + * @compile/process -cp . -processor TypeToString -proc:only Test + */ +import java.lang.Runtime.Version; +import java.util.*; +import javax.annotation.processing.*; +import javax.lang.model.element.*; +import javax.lang.model.util.*; + +@SupportedAnnotationTypes("*") +public class TypeToString extends JavacTestingAbstractProcessor { + + public boolean process(Set typeElementSet,RoundEnvironment renv) { + if (renv.processingOver()) { + TypeElement testClass = processingEnv.getElementUtils().getTypeElement("Test"); + ExecutableElement method = ElementFilter.methodsIn(testClass.getEnclosedElements()) + .iterator() + .next(); + String expectedTypeToString = "java.lang.Runtime.Version"; + String actualToString = method.getReturnType().toString(); + + if (!Objects.equals(expectedTypeToString, actualToString)) { + throw new AssertionError("Unexpected toString value. " + + "Expected: " + expectedTypeToString + ", " + + "but got: " + actualToString); + } + + actualToString = method.getParameters().get(0).asType().toString(); + + if (!Objects.equals(expectedTypeToString, actualToString)) { + throw new AssertionError("Unexpected toString value. " + + "Expected: " + expectedTypeToString + ", " + + "but got: " + actualToString); + } + } + return false; + } +} + +class Test { + public Version get(Version v) { + return null; + } +} diff --git a/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsClass.enabled.out b/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsClass.enabled.out new file mode 100644 index 00000000000..76082537ed9 --- /dev/null +++ b/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsClass.enabled.out @@ -0,0 +1,7 @@ +DanglingDocCommentsClass.java:8:1: compiler.warn.dangling.doc.comment +DanglingDocCommentsClass.java:11:1: compiler.warn.dangling.doc.comment +DanglingDocCommentsClass.java:12:8: compiler.warn.dangling.doc.comment +DanglingDocCommentsClass.java:12:69: compiler.warn.dangling.doc.comment +DanglingDocCommentsClass.java:13:5: compiler.warn.dangling.doc.comment +DanglingDocCommentsClass.java:17:5: compiler.warn.dangling.doc.comment +6 warnings diff --git a/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsClass.java b/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsClass.java new file mode 100644 index 00000000000..2075bf4495a --- /dev/null +++ b/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsClass.java @@ -0,0 +1,46 @@ +/* + * @test /nodynamiccopyright/ + * @compile -Xlint:dangling-doc-comments DanglingDocCommentsClass.java + * @compile/ref=empty.out -XDrawDiagnostics DanglingDocCommentsClass.java + * @compile/ref=DanglingDocCommentsClass.enabled.out -XDrawDiagnostics -Xlint:dangling-doc-comments DanglingDocCommentsClass.java + */ + +/** Bad/Extra Class Comment. */ +/** Good Class Comment. */ +@Deprecated +/** Misplaced: after anno. */ +public /** Misplaced: after mods. */ class DanglingDocCommentsClass /** Misplaced: after ident */ { + /** Bad/Extra Field Comment. */ + /** Good Field Comment. */ + public int i; + + /** Bad/Extra Method Comment. */ + /** Good Method Comment. */ + public void m1() { } + + @SuppressWarnings("dangling-doc-comments") + /** Bad/misplaced/suppressed comment. */ + public void m2() { } + + public void m3(boolean b) { + /**************** + * Box comment * + ***************/ + if (b) return; + } + + public void m4a() { + /** Not a doc comment. */ + System.out.println(); + /** Not a doc comment; not dangling for m4b */ + } + + /** Good comment for m4b; no dangling comments. */ + public void m4b() { } + + /** Comment ignored here: does not affect decls in block */ + static { + /** Good comment. */ + int i = 0; + } +} \ No newline at end of file diff --git a/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsEnum.enabled.out b/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsEnum.enabled.out new file mode 100644 index 00000000000..78dfd6e9633 --- /dev/null +++ b/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsEnum.enabled.out @@ -0,0 +1,8 @@ +DanglingDocCommentsEnum.java:8:1: compiler.warn.dangling.doc.comment +DanglingDocCommentsEnum.java:11:1: compiler.warn.dangling.doc.comment +DanglingDocCommentsEnum.java:12:8: compiler.warn.dangling.doc.comment +DanglingDocCommentsEnum.java:12:67: compiler.warn.dangling.doc.comment +DanglingDocCommentsEnum.java:14:5: compiler.warn.dangling.doc.comment +DanglingDocCommentsEnum.java:20:5: compiler.warn.dangling.doc.comment +DanglingDocCommentsEnum.java:26:5: compiler.warn.dangling.doc.comment +7 warnings diff --git a/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsEnum.java b/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsEnum.java new file mode 100644 index 00000000000..eae98433b70 --- /dev/null +++ b/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsEnum.java @@ -0,0 +1,37 @@ +/* + * @test /nodynamiccopyright/ + * @compile -Xlint:dangling-doc-comments DanglingDocCommentsEnum.java + * @compile/ref=empty.out -XDrawDiagnostics DanglingDocCommentsEnum.java + * @compile/ref=DanglingDocCommentsEnum.enabled.out -XDrawDiagnostics -Xlint:dangling-doc-comments DanglingDocCommentsEnum.java + */ + +/** Bad/Extra Enum Comment. */ +/** Good Enum Comment. */ +@Deprecated +/** Misplaced: after anno. */ +public /** Misplaced: after mods. */ enum DanglingDocCommentsEnum /** Misplaced: after ident */ +{ + /** Bad/Extra enum-member Comment. */ + /** + * Good enum-member Comment. + */ + E1; + + /** Bad/Extra Field Comment. */ + /** + * Good Field Comment. + */ + public int i; + + /** Bad/Extra Method Comment. */ + /** + * Good Method Comment. + */ + public void m1() { + } + + @SuppressWarnings("dangling-doc-comments") + /** Bad/misplaced/suppressed comment. */ + public void m2() { + } +} \ No newline at end of file diff --git a/test/langtools/tools/javac/danglingDocComments/empty.out b/test/langtools/tools/javac/danglingDocComments/empty.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/langtools/tools/javac/depDocComment/DeprecatedDocComment3.java b/test/langtools/tools/javac/depDocComment/DeprecatedDocComment3.java index d7f4dbc0f2c..4765444f069 100644 --- a/test/langtools/tools/javac/depDocComment/DeprecatedDocComment3.java +++ b/test/langtools/tools/javac/depDocComment/DeprecatedDocComment3.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -21,11 +21,11 @@ * questions. */ -/** +/* * @test * @bug 7096014 * @summary Javac tokens should retain state - * @compile -Xlint -Werror DeprecatedDocComment3.java + * @compile -Xlint:-dangling-doc-comments -Werror DeprecatedDocComment3.java */ class DeprecatedDocComment3 { diff --git a/test/langtools/tools/javac/diags/examples/DanglingDocCommentWarning/DanglingDocCommentWarning.java b/test/langtools/tools/javac/diags/examples/DanglingDocCommentWarning/DanglingDocCommentWarning.java new file mode 100644 index 00000000000..9e87c2d0482 --- /dev/null +++ b/test/langtools/tools/javac/diags/examples/DanglingDocCommentWarning/DanglingDocCommentWarning.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// key: compiler.warn.dangling.doc.comment +// options: -Xlint:dangling-doc-comments + +/** Comment 1. */ +/** Comment 2. */ +class DanglingDocCommentWarning { } diff --git a/test/langtools/tools/javac/launcher/BasicSourceLauncherTests.java b/test/langtools/tools/javac/launcher/BasicSourceLauncherTests.java index bf44a704b31..eb000276e14 100644 --- a/test/langtools/tools/javac/launcher/BasicSourceLauncherTests.java +++ b/test/langtools/tools/javac/launcher/BasicSourceLauncherTests.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/langtools/tools/javac/launcher/ModuleSourceLauncherTests.java b/test/langtools/tools/javac/launcher/ModuleSourceLauncherTests.java index d5103525f57..908674eb692 100644 --- a/test/langtools/tools/javac/launcher/ModuleSourceLauncherTests.java +++ b/test/langtools/tools/javac/launcher/ModuleSourceLauncherTests.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/langtools/tools/javac/launcher/MultiFileSourceLauncherTests.java b/test/langtools/tools/javac/launcher/MultiFileSourceLauncherTests.java index 6148bcaf67c..dbf6be5b121 100644 --- a/test/langtools/tools/javac/launcher/MultiFileSourceLauncherTests.java +++ b/test/langtools/tools/javac/launcher/MultiFileSourceLauncherTests.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/langtools/tools/javac/launcher/ProgramDescriptorTests.java b/test/langtools/tools/javac/launcher/ProgramDescriptorTests.java index 8e0f1cdba90..93dd7a42072 100644 --- a/test/langtools/tools/javac/launcher/ProgramDescriptorTests.java +++ b/test/langtools/tools/javac/launcher/ProgramDescriptorTests.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/langtools/tools/javac/launcher/Run.java b/test/langtools/tools/javac/launcher/Run.java index 4d40d9d6a4c..f6fd6abb0e3 100644 --- a/test/langtools/tools/javac/launcher/Run.java +++ b/test/langtools/tools/javac/launcher/Run.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/langtools/tools/javac/launcher/src/p/q/CLTest.java b/test/langtools/tools/javac/launcher/src/p/q/CLTest.java index e4517e78fc4..9f7e5577847 100644 --- a/test/langtools/tools/javac/launcher/src/p/q/CLTest.java +++ b/test/langtools/tools/javac/launcher/src/p/q/CLTest.java @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/langtools/tools/javac/patterns/SOEDeeplyNestedBlocksTest.java b/test/langtools/tools/javac/patterns/SOEDeeplyNestedBlocksTest.java index e521f062748..4e738cce028 100644 --- a/test/langtools/tools/javac/patterns/SOEDeeplyNestedBlocksTest.java +++ b/test/langtools/tools/javac/patterns/SOEDeeplyNestedBlocksTest.java @@ -23,1165 +23,38 @@ /** * @test - * @bug 8322992 + * @bug 8322992 8331030 * @summary Javac fails with StackOverflowError when compiling deeply nested synchronized blocks - * @compile SOEDeeplyNestedBlocksTest.java + * @run main SOEDeeplyNestedBlocksTest */ +import java.net.*; +import java.util.*; +import javax.tools.*; + public class SOEDeeplyNestedBlocksTest { - public static void test() { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - synchronized (SOEDeeplyNestedBlocksTest.class) { - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } + static final int NESTING_DEPTH = 1000; + + public static void main(String... args) { + var lines = new ArrayList(); + lines.add("class Test {"); + lines.add(" static { "); + for (int i = 0; i < NESTING_DEPTH; i++) lines.add(" synchronized (Test.class) {"); + for (int i = 0; i < NESTING_DEPTH; i++) lines.add(" }"); + lines.add(" }"); + lines.add("}"); + + var source = SimpleJavaFileObject.forSource(URI.create("mem://Test.java"), String.join("\n", lines)); + var compiler = ToolProvider.getSystemJavaCompiler(); + var task = compiler.getTask(null, null, noErrors, null, null, List.of(source)); + task.call(); + } + + static DiagnosticListener noErrors = d -> { + System.out.println(d); + if (d.getKind() == Diagnostic.Kind.ERROR) { + throw new AssertionError(d.getMessage(null)); } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } + }; } diff --git a/test/langtools/tools/javac/platform/PreviewAPIsWithRelease.java b/test/langtools/tools/javac/platform/PreviewAPIsWithRelease.java index 155dd5335d9..a9167fc34df 100644 --- a/test/langtools/tools/javac/platform/PreviewAPIsWithRelease.java +++ b/test/langtools/tools/javac/platform/PreviewAPIsWithRelease.java @@ -1,4 +1,4 @@ -/** +/* * @test /nodynamiccopyright/ * @bug 8246704 * @summary Verify preview APIs are reported correctly when using --release. diff --git a/test/langtools/tools/javac/platform/VerifyCTSymClassFiles.java b/test/langtools/tools/javac/platform/VerifyCTSymClassFiles.java new file mode 100644 index 00000000000..c97b15a2b15 --- /dev/null +++ b/test/langtools/tools/javac/platform/VerifyCTSymClassFiles.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8331027 + * @summary Verify classfile inside ct.sym + * @enablePreview + * @library /tools/lib + * @modules jdk.compiler/com.sun.tools.javac.api + * jdk.compiler/com.sun.tools.javac.main + * jdk.compiler/com.sun.tools.javac.platform + * jdk.compiler/com.sun.tools.javac.util:+open + * @build toolbox.ToolBox VerifyCTSymClassFiles + * @run main VerifyCTSymClassFiles + */ + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.lang.classfile.ClassFile; +import java.lang.classfile.attribute.ModuleMainClassAttribute; +import java.net.URISyntaxException; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +public class VerifyCTSymClassFiles { + + public static void main(String... args) throws IOException, URISyntaxException { + VerifyCTSymClassFiles t = new VerifyCTSymClassFiles(); + + t.checkClassFiles(); + } + + void checkClassFiles() throws IOException { + Path ctSym = Paths.get(System.getProperty("java.home"), "lib", "ct.sym"); + + if (!Files.exists(ctSym)) { + //no ct.sym, nothing to check: + return ; + } + try (FileSystem fs = FileSystems.newFileSystem(ctSym)) { + Files.walk(fs.getRootDirectories().iterator().next()) + .filter(p -> Files.isRegularFile(p)) + .forEach(p -> checkClassFile(p)); + } + } + + void checkClassFile(Path p) { + if (!"module-info.sig".equals(p.getFileName().toString())) { + return ; + } + try { + ClassFile.of().parse(p).attributes().forEach(attr -> { + if (attr instanceof ModuleMainClassAttribute mmca) { + mmca.mainClass(); + } + }); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + } + +} diff --git a/test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTest.java b/test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTest.java index c54c21bfc0d..7f7400a65b4 100644 --- a/test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTest.java +++ b/test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -23,8 +23,9 @@ /** * @test - * @bug 8072480 8277106 + * @bug 8072480 8277106 8331027 * @summary Unit test for CreateSymbols + * @enablePreview * @modules java.compiler * jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.jvm @@ -101,6 +102,9 @@ void doRun() throws Exception { null, List.of("-d", compileDir.toAbsolutePath().toString(), + "--enable-preview", + "--source", + "" + System.getProperty("java.specification.version"), "-g", "--add-modules", "jdk.jdeps", "--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", diff --git a/test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTestImpl.java b/test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTestImpl.java index 9e747d43112..9811b2c10b0 100644 --- a/test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTestImpl.java +++ b/test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTestImpl.java @@ -26,6 +26,11 @@ import java.io.Writer; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.lang.classfile.ClassFile; +import java.lang.classfile.ClassModel; +import java.lang.classfile.attribute.ModuleAttribute; +import java.lang.classfile.attribute.ModulePackagesAttribute; +import java.lang.constant.PackageDesc; import java.lang.reflect.Method; import java.util.Arrays; import java.util.ArrayList; @@ -58,14 +63,11 @@ import build.tools.symbolgenerator.CreateSymbols.ClassList; import build.tools.symbolgenerator.CreateSymbols.ExcludeIncludeList; import build.tools.symbolgenerator.CreateSymbols.VersionDescription; -import com.sun.tools.classfile.Attribute; -import com.sun.tools.classfile.Attributes; -import com.sun.tools.classfile.ClassFile; -import com.sun.tools.classfile.ClassWriter; -import com.sun.tools.classfile.ConstantPool; -import com.sun.tools.classfile.ConstantPool.CPInfo; -import com.sun.tools.classfile.ConstantPool.CONSTANT_Utf8_info; -import com.sun.tools.classfile.ModulePackages_attribute; +import java.io.UncheckedIOException; +import java.lang.classfile.attribute.ModuleMainClassAttribute; +import java.lang.constant.ClassDesc; +import java.util.Objects; +import java.util.function.Consumer; public class CreateSymbolsTestImpl { @@ -981,14 +983,19 @@ void doTestIncluded(String code, String... includedClasses) throws Exception { } Path prepareVersionedCTSym(String[] code7, String[] code8) throws Exception { + return prepareVersionedCTSym(code7, code8, _ -> {}); + } + + Path prepareVersionedCTSym(String[] code7, String[] code8, + Consumer adjustClassFiles) throws Exception { String testClasses = System.getProperty("test.classes"); Path output = Paths.get(testClasses, "test-data" + i++); deleteRecursively(output); Files.createDirectories(output); Path ver7Jar = output.resolve("7.jar"); - compileAndPack(output, ver7Jar, code7); + compileAndPack(output, ver7Jar, adjustClassFiles, code7); Path ver8Jar = output.resolve("8.jar"); - compileAndPack(output, ver8Jar, code8); + compileAndPack(output, ver8Jar, adjustClassFiles, code8); Path classes = output.resolve("classes.zip"); @@ -1048,7 +1055,112 @@ protected boolean includeEffectiveAccess(ClassList classes, ClassDescription cla new CreateSymbols().createSymbols(null, symbolsDesc.toAbsolutePath().toString(), classDest, 0, "8", "", modules.toString(), modulesList.toString()); } + @Test + void testModuleMainClass() throws Exception { + ClassFile cf = ClassFile.of(); + ToolBox tb = new ToolBox(); + String testClasses = System.getProperty("test.classes"); + Path output = Paths.get(testClasses, "test-data" + i++); + deleteRecursively(output); + Files.createDirectories(output); + Path ver9Jar = output.resolve("9.jar"); + compileAndPack(output, + ver9Jar, + classesDir -> { + try { + Path moduleInfo = classesDir.resolve("module-info.class"); + byte[] newClassData = + cf.transform(cf.parse(moduleInfo), + (builder, element) -> { + builder.with(element); + if (element instanceof ModuleAttribute) { + builder.with(ModuleMainClassAttribute.of(ClassDesc.of("main.Main"))); + } + }); + try (OutputStream out = Files.newOutputStream(moduleInfo)) { + out.write(newClassData); + } + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + }, + """ + module m { + } + """, + """ + package main; + public class Main {} + """); + + + Path ctSym = output.resolve("ct.sym"); + + deleteRecursively(ctSym); + + CreateSymbols.ALLOW_NON_EXISTING_CLASSES = true; + CreateSymbols.EXTENSION = ".class"; + + List versions = + Arrays.asList(new VersionDescription(ver9Jar.toAbsolutePath().toString(), "9", null)); + + ExcludeIncludeList acceptAll = new ExcludeIncludeList(null, null) { + @Override public boolean accepts(String className, boolean includePrivateClasses) { + return true; + } + }; + new CreateSymbols().createBaseLine(versions, acceptAll, ctSym, new String[0]); + Path symbolsDesc = ctSym.resolve("symbols"); + Path modules = ctSym.resolve("modules"); + Path modulesList = ctSym.resolve("modules-list"); + + Files.createDirectories(modules); + try (Writer w = Files.newBufferedWriter(modulesList)) {} + + Path classesZip = output.resolve("classes.zip"); + Path classesDir = output.resolve("classes"); + + new CreateSymbols().createSymbols(null, symbolsDesc.toAbsolutePath().toString(), classesZip.toAbsolutePath().toString(), 0, "9", "", modules.toString(), modulesList.toString()); + + try (JarFile jf = new JarFile(classesZip.toFile())) { + Enumeration en = jf.entries(); + + while (en.hasMoreElements()) { + JarEntry je = en.nextElement(); + if (je.isDirectory()) continue; + Path target = classesDir.resolve(je.getName()); + Files.createDirectories(target.getParent()); + Files.copy(jf.getInputStream(je), target); + } + } + + Path moduleInfo = classesDir.resolve("9") + .resolve("m") + .resolve("module-info.class"); + + cf.parse(moduleInfo) + .attributes() + .stream() + .filter(attr -> attr instanceof ModuleMainClassAttribute) + .forEach(attr -> { + String expectedMain = "Lmain/Main;"; + String mainClass = + ((ModuleMainClassAttribute) attr).mainClass() + .asSymbol() + .descriptorString(); + if (!Objects.equals(expectedMain, mainClass)) { + throw new AssertionError("Expected " + expectedMain + " as a main class, " + + "but got: " + mainClass); + } + }); + } + void compileAndPack(Path output, Path outputFile, String... code) throws Exception { + compileAndPack(output, outputFile, _ -> {}, code); + } + + void compileAndPack(Path output, Path outputFile, + Consumer adjustClassFiles, String... code) throws Exception { ToolBox tb = new ToolBox(); Path scratch = output.resolve("temp"); deleteRecursively(scratch); @@ -1065,27 +1177,21 @@ void compileAndPack(Path output, Path outputFile, String... code) throws Excepti packages.add(cf.substring(0, sep)); } } - ClassFile cf = ClassFile.read(moduleInfo); - List cp = new ArrayList<>(); - cp.add(null); - cf.constant_pool.entries().forEach(cp::add); - Map attrs = new HashMap<>(cf.attributes.map); - int[] encodedPackages = new int[packages.size()]; - int i = 0; - for (String p : packages) { - int nameIndex = cp.size(); - cp.add(new CONSTANT_Utf8_info(p)); - encodedPackages[i++] = cp.size(); - cp.add(new ConstantPool.CONSTANT_Package_info(null, nameIndex)); - } - int attrName = cp.size(); - cp.add(new CONSTANT_Utf8_info(Attribute.ModulePackages)); - attrs.put(Attribute.ModulePackages, new ModulePackages_attribute(attrName, encodedPackages)); - ClassFile newFile = new ClassFile(cf.magic, cf.minor_version, cf.major_version, new ConstantPool(cp.toArray(new CPInfo[0])), cf.access_flags, cf.this_class, cf.super_class, cf.interfaces, cf.fields, cf.methods, new Attributes(attrs)); + ClassFile cf = ClassFile.of(); + ClassModel cm = cf.parse(moduleInfo); + byte[] newData = cf.transform(cm, (builder, element) -> { + builder.with(element); + if (element instanceof ModuleAttribute) { + builder.with(ModulePackagesAttribute.ofNames(packages.stream() + .map(pack -> PackageDesc.of(pack)) + .toList())); + } + }); try (OutputStream out = Files.newOutputStream(moduleInfo)) { - new ClassWriter().write(newFile, out); + out.write(newData); } } + adjustClassFiles.accept(scratch); try (Writer out = Files.newBufferedWriter(outputFile)) { for (String classFile : classFiles) { try (InputStream in = Files.newInputStream(scratch.resolve(classFile))) { diff --git a/test/langtools/tools/javac/recovery/FlowRecovery.java b/test/langtools/tools/javac/recovery/FlowRecovery.java new file mode 100644 index 00000000000..930f230222b --- /dev/null +++ b/test/langtools/tools/javac/recovery/FlowRecovery.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8331212 + * @summary Verify error recovery w.r.t. Flow + * @library /tools/lib + * @enablePreview + * @modules jdk.compiler/com.sun.tools.javac.api + * jdk.compiler/com.sun.tools.javac.main + * java.base/jdk.internal.classfile.impl + * @build toolbox.ToolBox toolbox.JavacTask + * @run main FlowRecovery + */ + +import java.nio.file.Path; +import java.util.List; +import java.util.Objects; + +import toolbox.JavacTask; +import toolbox.Task.Expect; +import toolbox.Task.OutputKind; +import toolbox.TestRunner; +import toolbox.ToolBox; + +public class FlowRecovery extends TestRunner { + + ToolBox tb; + + public FlowRecovery() { + super(System.err); + tb = new ToolBox(); + } + + public static void main(String[] args) throws Exception { + FlowRecovery t = new FlowRecovery(); + t.runTests(); + } + + @Test //8331212 + public void testYieldErrors() throws Exception { + String code = """ + class Test { + public boolean test() { + return switch (0) { + case 0 -> true; + default -> {} + }; + } + } + """; + Path curPath = Path.of("."); + List actual = new JavacTask(tb) + .options("-XDrawDiagnostics", "-XDdev") + .sources(code) + .outdir(curPath) + .run(Expect.FAIL) + .writeAll() + .getOutputLines(OutputKind.DIRECT); + + List expected = List.of( + "Test.java:5:25: compiler.err.rule.completes.normally", + "1 error" + ); + + if (!Objects.equals(actual, expected)) { + error("Expected: " + expected + ", but got: " + actual); + } + } + +} diff --git a/test/langtools/tools/javac/warnings/DepAnn.java b/test/langtools/tools/javac/warnings/DepAnn.java index 4f25d290e7b..d725258cf3a 100644 --- a/test/langtools/tools/javac/warnings/DepAnn.java +++ b/test/langtools/tools/javac/warnings/DepAnn.java @@ -1,7 +1,7 @@ /* * @test /nodynamiccopyright/ * @bug 4986256 - * @compile/ref=DepAnn.out -XDrawDiagnostics -Xlint:all DepAnn.java + * @compile/ref=DepAnn.out -XDrawDiagnostics -Xlint:all,-dangling-doc-comments DepAnn.java */ // control: this class should generate warnings diff --git a/test/langtools/tools/javac/warnings/Deprecation.java b/test/langtools/tools/javac/warnings/Deprecation.java index 4a9d4fb2b3a..551ce6dc13e 100644 --- a/test/langtools/tools/javac/warnings/Deprecation.java +++ b/test/langtools/tools/javac/warnings/Deprecation.java @@ -1,4 +1,4 @@ -/** +/* * @test /nodynamiccopyright/ * @bug 4986256 6598104 8032211 8194764 * @compile/ref=Deprecation.noLint.out -XDrawDiagnostics Deprecation.java diff --git a/test/langtools/tools/javac/warnings/NestedDeprecation/NestedDeprecation.java b/test/langtools/tools/javac/warnings/NestedDeprecation/NestedDeprecation.java index 2e41f72b58b..0e4d19826ee 100644 --- a/test/langtools/tools/javac/warnings/NestedDeprecation/NestedDeprecation.java +++ b/test/langtools/tools/javac/warnings/NestedDeprecation/NestedDeprecation.java @@ -1,4 +1,4 @@ -/** +/* * @test /nodynamiccopyright/ * @bug 6598104 8032211 * @build p.Dep1 p.Dep2 diff --git a/test/langtools/tools/javac/warnings/Unchecked.java b/test/langtools/tools/javac/warnings/Unchecked.java index 7d5e4aa83a4..e64fd760a07 100644 --- a/test/langtools/tools/javac/warnings/Unchecked.java +++ b/test/langtools/tools/javac/warnings/Unchecked.java @@ -1,4 +1,4 @@ -/** +/* * @test /nodynamiccopyright/ * @bug 4986256 * @compile/ref=Unchecked.noLint.out -XDrawDiagnostics Unchecked.java diff --git a/test/langtools/tools/javac/warnings/VerifyLintDescriptions.java b/test/langtools/tools/javac/warnings/VerifyLintDescriptions.java index 54472a3b682..4a025ca497f 100644 --- a/test/langtools/tools/javac/warnings/VerifyLintDescriptions.java +++ b/test/langtools/tools/javac/warnings/VerifyLintDescriptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 8033961 * @summary Verify that all LintCategories have their descriptions filled. diff --git a/test/langtools/tools/javac/warnings/suppress/T6480588.java b/test/langtools/tools/javac/warnings/suppress/T6480588.java index 84454d251a1..da9513709d9 100644 --- a/test/langtools/tools/javac/warnings/suppress/T6480588.java +++ b/test/langtools/tools/javac/warnings/suppress/T6480588.java @@ -1,4 +1,4 @@ -/** +/* * @test /nodynamiccopyright/ * @bug 6470588 * @summary Verify that \\@SuppressWarnings("deprecation") works OK for all parts diff --git a/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java b/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java index f8ce856bddd..e78e200ac24 100644 --- a/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java +++ b/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -53,7 +53,7 @@ private static enum MethodGroup { IGNORED("isEmulatedClient", "isDebugBuild", "isFastDebugBuild", "isMusl", "isSlowDebugBuild", "hasSA", "isRoot", "isTieredSupported", "areCustomLoadersSupportedForCDS", "isDefaultCDSArchiveSupported", - "isHardenedOSX", "hasOSXPlistEntries", "isOracleLinux7"); + "isHardenedOSX", "hasOSXPlistEntries", "isOracleLinux7", "isOnWayland"); public final List methodNames; diff --git a/test/lib/jdk/test/lib/Platform.java b/test/lib/jdk/test/lib/Platform.java index 9032d02e215..55ebba29993 100644 --- a/test/lib/jdk/test/lib/Platform.java +++ b/test/lib/jdk/test/lib/Platform.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -483,4 +483,13 @@ public static boolean isDefaultCDSArchiveSupported() { public static boolean areCustomLoadersSupportedForCDS() { return (is64bit() && (isLinux() || isOSX() || isWindows())); } + + /** + * Checks if the current system is running on Wayland display server on Linux. + * + * @return {@code true} if the system is running on Wayland display server + */ + public static boolean isOnWayland() { + return System.getenv("WAYLAND_DISPLAY") != null; + } } diff --git a/test/lib/jdk/test/lib/jvmti/jvmti_common.hpp b/test/lib/jdk/test/lib/jvmti/jvmti_common.hpp index 01e061d5272..00a8c799dd8 100644 --- a/test/lib/jdk/test/lib/jvmti/jvmti_common.hpp +++ b/test/lib/jdk/test/lib/jvmti/jvmti_common.hpp @@ -61,7 +61,7 @@ #define COMPLAIN LOG - +void sleep_ms(int millis); const char* TranslateState(jint flags); const char* TranslateError(jvmtiError err); @@ -385,6 +385,24 @@ find_method(jvmtiEnv *jvmti, JNIEnv *jni, jclass klass, const char* mname) { return method; } +// Wait for target thread to reach the required JVMTI thread state. +// The state jint bitmask is returned by the JVMTI GetThreadState. +// Some examples are: +// - JVMTI_THREAD_STATE_WAITING +// - JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER +// - JVMTI_THREAD_STATE_SLEEPING +static void +wait_for_state(jvmtiEnv *jvmti, JNIEnv *jni, jthread thread, jint exp_state) { + while (true) { + // Allow a bitmask to designate expected thread state. E.g., if two bits are expected + // than check they both are present in the state mask returned by JVMTI GetThreadState. + if ((get_thread_state(jvmti, jni, thread) & exp_state) == exp_state) { + break; + } + sleep_ms(100); + } +} + #define MAX_FRAME_COUNT_PRINT_STACK_TRACE 200 static void diff --git a/test/micro/org/openjdk/bench/java/lang/StringConcat.java b/test/micro/org/openjdk/bench/java/lang/StringConcat.java index 82254f56e79..c4d2d1bfe11 100644 --- a/test/micro/org/openjdk/bench/java/lang/StringConcat.java +++ b/test/micro/org/openjdk/bench/java/lang/StringConcat.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -149,4 +149,74 @@ public String concatConst6Object() { return "string" + objectValue + objectValue + objectValue + objectValue + objectValue + objectValue; } + private String + f0="1", f1="1", f2="1", f3="1", f4="1", f5="1", f6="1", f7="1", f8="1", f9="1", + f10="1", f11="1", f12="1", f13="1", f14="1", f15="1", f16="1", f17="1", f18="1", f19="1", + f20="1", f21="1", f22="1", f23="1", f24="1", f25="1", f26="1", f27="1", f28="1", f29="1", + f30="1", f31="1", f32="1", f33="1", f34="1", f35="1", f36="1", f37="1", f38="1", f39="1", + f40="1", f41="1", f42="1", f43="1", f44="1", f45="1", f46="1", f47="1", f48="1", f49="1", + f50="1", f51="1", f52="1", f53="1", f54="1", f55="1", f56="1", f57="1", f58="1", f59="1", + f60="1", f61="1", f62="1", f63="1", f64="1", f65="1", f66="1", f67="1", f68="1", f69="1", + f70="1", f71="1", f72="1", f73="1", f74="1", f75="1", f76="1", f77="1", f78="1", f79="1", + f80="1", f81="1", f82="1", f83="1", f84="1", f85="1", f86="1", f87="1", f88="1", f89="1", + f90="1", f91="1", f92="1", f93="1", f94="1", f95="1", f96="1", f97="1", f98="1", f99="1", + f100="1",f101="1",f102="1",f103="1",f104="1",f105="1",f106="1",f107="1",f108="1",f109="1", + f110="1",f111="1",f112="1",f113="1",f114="1",f115="1",f116="1",f117="1",f118="1",f119="1", + f120="1",f121="1",f122="1"; + + @Benchmark + public String concat13String() { + return f0 + ","+ f1 + ","+ f2 + ","+ f3 + ","+ f4 + ","+ f5 + ","+ f6 + ","+ f7 + ","+ f8 + ","+ f9 + "," + + f10 + ","+ f11 + ","+ f12; + } + + @Benchmark + public String concat23String() { + return f0 + ","+ f1 + ","+ f2 + ","+ f3 + ","+ f4 + ","+ f5 + ","+ f6 + ","+ f7 + ","+ f8 + ","+ f9 + "," + + f10 + ","+ f11 + ","+ f12 + ","+ f13 + ","+ f14 + ","+ f15 + ","+ f16 + ","+ f17 + ","+ f18 + ","+ f19 + "," + + f20 + ","+ f21 + ","+ f22; + } + @Benchmark + public String concat123String() { + return f0 + ","+ f1 + ","+ f2 + ","+ f3 + ","+ f4 + ","+ f5 + ","+ f6 + ","+ f7 + ","+ f8 + ","+ f9 + "," + + f10 + ","+ f11 + ","+ f12 + ","+ f13 + ","+ f14 + ","+ f15 + ","+ f16 + ","+ f17 + ","+ f18 + ","+ f19 + "," + + f20 + ","+ f21 + ","+ f22 + ","+ f23 + ","+ f24 + ","+ f25 + ","+ f26 + ","+ f27 + ","+ f28 + ","+ f29 + "," + + f30 + ","+ f31 + ","+ f32 + ","+ f33 + ","+ f34 + ","+ f35 + ","+ f36 + ","+ f37 + ","+ f38 + ","+ f39 + "," + + f40 + ","+ f41 + ","+ f42 + ","+ f43 + ","+ f44 + ","+ f45 + ","+ f46 + ","+ f47 + ","+ f48 + ","+ f49 + "," + + f50 + ","+ f51 + ","+ f52 + ","+ f53 + ","+ f54 + ","+ f55 + ","+ f56 + ","+ f57 + ","+ f58 + ","+ f59 + "," + + f60 + ","+ f61 + ","+ f62 + ","+ f63 + ","+ f64 + ","+ f65 + ","+ f66 + ","+ f67 + ","+ f68 + ","+ f69 + "," + + f70 + ","+ f71 + ","+ f72 + ","+ f73 + ","+ f74 + ","+ f75 + ","+ f76 + ","+ f77 + ","+ f78 + ","+ f79 + "," + + f80 + ","+ f81 + ","+ f82 + ","+ f83 + ","+ f84 + ","+ f85 + ","+ f86 + ","+ f87 + ","+ f88 + ","+ f89 + "," + + f90 + ","+ f91 + ","+ f92 + ","+ f93 + ","+ f94 + ","+ f95 + ","+ f96 + ","+ f97 + ","+ f98 + ","+ f99 + "," + +f100 + ","+f101 + ","+f102 + ","+f103 + ","+f104 + ","+f105 + ","+f106 + ","+f107 + ","+f108 + ","+f109 + "," + +f110 + ","+f111 + ","+f112 + ","+f113 + ","+f114 + ","+f115 + ","+f116 + ","+f117 + ","+f118 + ","+f119 + "," + +f120 + ","+f121 + ","+f122; + } + + @Benchmark + public String concat23StringConst() { + return f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + f0 + """ + A really long constant string. Such as a copyright header: + * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + """; + } } diff --git a/test/micro/org/openjdk/bench/java/lang/constant/ClassDescFactories.java b/test/micro/org/openjdk/bench/java/lang/constant/ClassDescFactories.java new file mode 100644 index 00000000000..c74271995d5 --- /dev/null +++ b/test/micro/org/openjdk/bench/java/lang/constant/ClassDescFactories.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package org.openjdk.bench.java.lang.constant; + +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Param; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; + +import java.lang.constant.ClassDesc; +import java.util.concurrent.TimeUnit; + +/** + * Performance of conversion from and to method type descriptor symbols with + * descriptor strings and class descriptor symbols + */ +@BenchmarkMode(Mode.AverageTime) +@OutputTimeUnit(TimeUnit.NANOSECONDS) +@Warmup(iterations = 3, time = 2) +@Measurement(iterations = 6, time = 1) +@Fork(1) +@State(Scope.Thread) +public class ClassDescFactories { + + @Param({ + "Ljava/lang/Object;", + "V", + "I" + }) + public String descString; + + @Benchmark + public ClassDesc ofDescriptor() { + return ClassDesc.ofDescriptor(descString); + } +} diff --git a/test/micro/org/openjdk/bench/java/lang/constant/MethodTypeDescFactories.java b/test/micro/org/openjdk/bench/java/lang/constant/MethodTypeDescFactories.java index b9614fccfd2..64019c37c14 100644 --- a/test/micro/org/openjdk/bench/java/lang/constant/MethodTypeDescFactories.java +++ b/test/micro/org/openjdk/bench/java/lang/constant/MethodTypeDescFactories.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,11 +54,14 @@ public class MethodTypeDescFactories { private static final ClassDesc DUMMY_CD = ClassDesc.of("Dummy_invalid"); + /** Dots will be replaced by the descriptor of this benchmark class. */ @Param({ "(Ljava/lang/Object;Ljava/lang/String;)I", "()V", "([IJLjava/lang/String;Z)Ljava/util/List;", - "()[Ljava/lang/String;" + "()[Ljava/lang/String;", + "(..IIJ)V", + "(.....................)." }) public String descString; public MethodTypeDesc desc; @@ -68,6 +71,7 @@ public class MethodTypeDescFactories { @Setup public void setup() { + descString = descString.replaceAll("\\.", MethodTypeDescFactories.class.descriptorString()); desc = MethodTypeDesc.ofDescriptor(descString); ret = desc.returnType(); args = desc.parameterArray(); diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/AllocTest.java b/test/micro/org/openjdk/bench/java/lang/foreign/AllocTest.java index b7e4bfd5f57..4ae2c0364dc 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/AllocTest.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/AllocTest.java @@ -88,7 +88,7 @@ public static class CallocArena implements Arena { static final MethodHandle CALLOC = Linker.nativeLinker() .downcallHandle( - Linker.nativeLinker().defaultLookup().find("calloc").get(), + Linker.nativeLinker().defaultLookup().findOrThrow("calloc"), FunctionDescriptor.of(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG)); static MemorySegment calloc(long size) { diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/CLayouts.java b/test/micro/org/openjdk/bench/java/lang/foreign/CLayouts.java index bfe5ce61b1c..4028b408559 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/CLayouts.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/CLayouts.java @@ -33,7 +33,7 @@ import java.lang.invoke.MethodHandle; public class CLayouts { - private static Linker LINKER = Linker.nativeLinker(); + private static final Linker LINKER = Linker.nativeLinker(); // the constants below are useful aliases for C types. The type/carrier association is only valid for 64-bit platforms. @@ -73,10 +73,10 @@ public class CLayouts { .withTargetLayout(MemoryLayout.sequenceLayout(Long.MAX_VALUE, C_CHAR)); private static final MethodHandle FREE = LINKER.downcallHandle( - LINKER.defaultLookup().find("free").get(), FunctionDescriptor.ofVoid(C_POINTER)); + LINKER.defaultLookup().findOrThrow("free"), FunctionDescriptor.ofVoid(C_POINTER)); private static final MethodHandle MALLOC = LINKER.downcallHandle( - LINKER.defaultLookup().find("malloc").get(), FunctionDescriptor.of(C_POINTER, ValueLayout.JAVA_LONG)); + LINKER.defaultLookup().findOrThrow("malloc"), FunctionDescriptor.of(C_POINTER, ValueLayout.JAVA_LONG)); public static void freeMemory(MemorySegment address) { try { diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/CallOverheadHelper.java b/test/micro/org/openjdk/bench/java/lang/foreign/CallOverheadHelper.java index 290d40f1202..f0841989e76 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/CallOverheadHelper.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/CallOverheadHelper.java @@ -109,7 +109,7 @@ public class CallOverheadHelper extends CLayouts { System.loadLibrary("CallOverhead"); SymbolLookup loaderLibs = SymbolLookup.loaderLookup(); { - func_addr = loaderLibs.find("func").orElseThrow(); + func_addr = loaderLibs.findOrThrow("func"); MethodType mt = MethodType.methodType(void.class); FunctionDescriptor fd = FunctionDescriptor.ofVoid(); func_v = abi.downcallHandle(fd); @@ -118,59 +118,59 @@ public class CallOverheadHelper extends CLayouts { func_critical = insertArguments(func_critical_v, 0, func_addr); } { - identity_addr = loaderLibs.find("identity").orElseThrow(); + identity_addr = loaderLibs.findOrThrow("identity"); FunctionDescriptor fd = FunctionDescriptor.of(C_INT, C_INT); identity_v = abi.downcallHandle(fd); identity_critical_v = abi.downcallHandle(fd, Linker.Option.critical(false)); identity = insertArguments(identity_v, 0, identity_addr); identity_critical = insertArguments(identity_critical_v, 0, identity_addr); } - identity_struct_addr = loaderLibs.find("identity_struct").orElseThrow(); + identity_struct_addr = loaderLibs.findOrThrow("identity_struct"); identity_struct_v = abi.downcallHandle( FunctionDescriptor.of(POINT_LAYOUT, POINT_LAYOUT)); identity_struct = insertArguments(identity_struct_v, 0, identity_struct_addr); - identity_struct_3_addr = loaderLibs.find("identity_struct_3").orElseThrow(); + identity_struct_3_addr = loaderLibs.findOrThrow("identity_struct_3"); identity_struct_3_v = abi.downcallHandle( FunctionDescriptor.of(POINT_LAYOUT, POINT_LAYOUT, POINT_LAYOUT, POINT_LAYOUT)); identity_struct_3 = insertArguments(identity_struct_3_v, 0, identity_struct_3_addr); - identity_memory_address_addr = loaderLibs.find("identity_memory_address").orElseThrow(); + identity_memory_address_addr = loaderLibs.findOrThrow("identity_memory_address"); identity_memory_address_v = abi.downcallHandle( FunctionDescriptor.of(C_POINTER, C_POINTER)); identity_memory_address = insertArguments(identity_memory_address_v, 0, identity_memory_address_addr); - identity_memory_address_3_addr = loaderLibs.find("identity_memory_address_3").orElseThrow(); + identity_memory_address_3_addr = loaderLibs.findOrThrow("identity_memory_address_3"); identity_memory_address_3_v = abi.downcallHandle( FunctionDescriptor.of(C_POINTER, C_POINTER, C_POINTER, C_POINTER)); identity_memory_address_3 = insertArguments(identity_memory_address_3_v, 0, identity_memory_address_3_addr); - args1_addr = loaderLibs.find("args1").orElseThrow(); + args1_addr = loaderLibs.findOrThrow("args1"); args1_v = abi.downcallHandle( FunctionDescriptor.ofVoid(C_LONG_LONG)); args1 = insertArguments(args1_v, 0, args1_addr); - args2_addr = loaderLibs.find("args2").orElseThrow(); + args2_addr = loaderLibs.findOrThrow("args2"); args2_v = abi.downcallHandle( FunctionDescriptor.ofVoid(C_LONG_LONG, C_DOUBLE)); args2 = insertArguments(args2_v, 0, args2_addr); - args3_addr = loaderLibs.find("args3").orElseThrow(); + args3_addr = loaderLibs.findOrThrow("args3"); args3_v = abi.downcallHandle( FunctionDescriptor.ofVoid(C_LONG_LONG, C_DOUBLE, C_LONG_LONG)); args3 = insertArguments(args3_v, 0, args3_addr); - args4_addr = loaderLibs.find("args4").orElseThrow(); + args4_addr = loaderLibs.findOrThrow("args4"); args4_v = abi.downcallHandle( FunctionDescriptor.ofVoid(C_LONG_LONG, C_DOUBLE, C_LONG_LONG, C_DOUBLE)); args4 = insertArguments(args4_v, 0, args4_addr); - args5_addr = loaderLibs.find("args5").orElseThrow(); + args5_addr = loaderLibs.findOrThrow("args5"); args5_v = abi.downcallHandle( FunctionDescriptor.ofVoid(C_LONG_LONG, C_DOUBLE, C_LONG_LONG, C_DOUBLE, C_LONG_LONG)); args5 = insertArguments(args5_v, 0, args5_addr); - args10_addr = loaderLibs.find("args10").orElseThrow(); + args10_addr = loaderLibs.findOrThrow("args10"); args10_v = abi.downcallHandle( FunctionDescriptor.ofVoid(C_LONG_LONG, C_DOUBLE, C_LONG_LONG, C_DOUBLE, C_LONG_LONG, C_DOUBLE, C_LONG_LONG, C_DOUBLE, C_LONG_LONG, C_DOUBLE)); diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/CriticalCalls.java b/test/micro/org/openjdk/bench/java/lang/foreign/CriticalCalls.java index de44b695775..0f384f81685 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/CriticalCalls.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/CriticalCalls.java @@ -61,7 +61,7 @@ public class CriticalCalls { System.loadLibrary("CriticalCalls"); SymbolLookup lookup = SymbolLookup.loaderLookup(); - MemorySegment sumIntsSym = lookup.find("sum_ints").get(); + MemorySegment sumIntsSym = lookup.findOrThrow("sum_ints"); FunctionDescriptor sumIntsDesc = FunctionDescriptor.of(JAVA_INT, ADDRESS, JAVA_INT); PINNED = Linker.nativeLinker().downcallHandle( diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/PointerInvoke.java b/test/micro/org/openjdk/bench/java/lang/foreign/PointerInvoke.java index 47e6c0b1fd1..ab77ae630c1 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/PointerInvoke.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/PointerInvoke.java @@ -58,13 +58,13 @@ public class PointerInvoke extends CLayouts { static { Linker abi = Linker.nativeLinker(); SymbolLookup loaderLibs = SymbolLookup.loaderLookup(); - F_LONG_LONG = abi.downcallHandle(loaderLibs.find("id_long_long").get(), + F_LONG_LONG = abi.downcallHandle(loaderLibs.findOrThrow("id_long_long"), FunctionDescriptor.of(C_LONG_LONG, C_LONG_LONG)); - F_PTR_LONG = abi.downcallHandle(loaderLibs.find("id_ptr_long").get(), + F_PTR_LONG = abi.downcallHandle(loaderLibs.findOrThrow("id_ptr_long"), FunctionDescriptor.of(C_LONG_LONG, C_POINTER)); - F_LONG_PTR = abi.downcallHandle(loaderLibs.find("id_long_ptr").get(), + F_LONG_PTR = abi.downcallHandle(loaderLibs.findOrThrow("id_long_ptr"), FunctionDescriptor.of(C_POINTER, C_LONG_LONG)); - F_PTR_PTR = abi.downcallHandle(loaderLibs.find("id_ptr_ptr").get(), + F_PTR_PTR = abi.downcallHandle(loaderLibs.findOrThrow("id_ptr_ptr"), FunctionDescriptor.of(C_POINTER, C_POINTER)); } diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/QSort.java b/test/micro/org/openjdk/bench/java/lang/foreign/QSort.java index 2050b3b2fb2..76298ae0739 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/QSort.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/QSort.java @@ -58,7 +58,7 @@ public class QSort extends CLayouts { static final int[] INPUT = { 5, 3, 2, 7, 8, 12, 1, 7 }; static final MemorySegment INPUT_SEGMENT; - static MemorySegment qsort_addr = abi.defaultLookup().find("qsort").get(); + static MemorySegment qsort_addr = abi.defaultLookup().findOrThrow("qsort"); static { MemoryLayout layout = MemoryLayout.sequenceLayout(INPUT.length, JAVA_INT); @@ -74,7 +74,7 @@ public class QSort extends CLayouts { FunctionDescriptor.ofVoid(C_POINTER, C_LONG_LONG, C_LONG_LONG, C_POINTER) ); System.loadLibrary("QSort"); - native_compar = SymbolLookup.loaderLookup().find("compar").orElseThrow(); + native_compar = SymbolLookup.loaderLookup().findOrThrow("compar"); panama_upcall_compar = abi.upcallStub( lookup().findStatic(QSort.class, "panama_upcall_compar", diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/StrLenTest.java b/test/micro/org/openjdk/bench/java/lang/foreign/StrLenTest.java index 574268f1ffa..2ad723eadf3 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/StrLenTest.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/StrLenTest.java @@ -69,7 +69,7 @@ public class StrLenTest extends CLayouts { static { Linker abi = Linker.nativeLinker(); - STRLEN = abi.downcallHandle(abi.defaultLookup().find("strlen").get(), + STRLEN = abi.downcallHandle(abi.defaultLookup().findOrThrow("strlen"), FunctionDescriptor.of(C_INT, C_POINTER)); } diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/ToCStringTest.java b/test/micro/org/openjdk/bench/java/lang/foreign/ToCStringTest.java index 051ad94758e..7ba9384958e 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/ToCStringTest.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/ToCStringTest.java @@ -66,7 +66,7 @@ public class ToCStringTest extends CLayouts { static { Linker abi = Linker.nativeLinker(); - STRLEN = abi.downcallHandle(abi.defaultLookup().find("strlen").get(), + STRLEN = abi.downcallHandle(abi.defaultLookup().findOrThrow("strlen"), FunctionDescriptor.of(C_INT, C_POINTER)); } diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/Upcalls.java b/test/micro/org/openjdk/bench/java/lang/foreign/Upcalls.java index 4f1c0d5b528..1b852e6ff9d 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/Upcalls.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/Upcalls.java @@ -120,7 +120,7 @@ public class Upcalls extends CLayouts { static MethodHandle linkFunc(String name, FunctionDescriptor baseDesc) { return abi.downcallHandle( - SymbolLookup.loaderLookup().find(name).orElseThrow(), + SymbolLookup.loaderLookup().findOrThrow(name), baseDesc.appendArgumentLayouts(C_POINTER) ); } diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/libToJavaString.c b/test/micro/org/openjdk/bench/java/lang/foreign/libToJavaString.c index f4c407c1ab6..e7da435b43d 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/libToJavaString.c +++ b/test/micro/org/openjdk/bench/java/lang/foreign/libToJavaString.c @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute 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. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/points/support/PanamaPoint.java b/test/micro/org/openjdk/bench/java/lang/foreign/points/support/PanamaPoint.java index fbcf3ba5528..dca63267dc7 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/points/support/PanamaPoint.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/points/support/PanamaPoint.java @@ -48,11 +48,11 @@ public class PanamaPoint extends CLayouts implements AutoCloseable { System.loadLibrary("Point"); SymbolLookup loaderLibs = SymbolLookup.loaderLookup(); MH_distance = abi.downcallHandle( - loaderLibs.find("distance").get(), + loaderLibs.findOrThrow("distance"), FunctionDescriptor.of(C_DOUBLE, LAYOUT, LAYOUT) ); MH_distance_ptrs = abi.downcallHandle( - loaderLibs.find("distance_ptrs").get(), + loaderLibs.findOrThrow("distance_ptrs"), FunctionDescriptor.of(C_DOUBLE, C_POINTER, C_POINTER) ); } diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayForeignXorOpCriticalImpl.java b/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayForeignXorOpCriticalImpl.java index 250ba1157d7..38d4c72a20a 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayForeignXorOpCriticalImpl.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayForeignXorOpCriticalImpl.java @@ -17,7 +17,7 @@ public class GetArrayForeignXorOpCriticalImpl implements XorOp { Linker linker; linker = Linker.nativeLinker(); FunctionDescriptor xor_op_func = FunctionDescriptor.ofVoid(C_POINTER, C_POINTER, C_INT); - xor_op = linker.downcallHandle(SymbolLookup.loaderLookup().find("xor_op").orElseThrow(), xor_op_func, critical(true)); + xor_op = linker.downcallHandle(SymbolLookup.loaderLookup().findOrThrow("xor_op"), xor_op_func, critical(true)); } static final MethodHandle xor_op; diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayForeignXorOpImpl.java b/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayForeignXorOpImpl.java index e033127de6a..d59203155cd 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayForeignXorOpImpl.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayForeignXorOpImpl.java @@ -19,7 +19,7 @@ public class GetArrayForeignXorOpImpl implements XorOp { Linker linker; linker = Linker.nativeLinker(); FunctionDescriptor xor_op_func = FunctionDescriptor.ofVoid(C_POINTER, C_POINTER, C_INT); - xor_op = linker.downcallHandle(SymbolLookup.loaderLookup().find("xor_op").orElseThrow(), xor_op_func, critical(false)); + xor_op = linker.downcallHandle(SymbolLookup.loaderLookup().findOrThrow("xor_op"), xor_op_func, critical(false)); } static final MethodHandle xor_op; diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayForeignXorOpInitImpl.java b/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayForeignXorOpInitImpl.java index 8a3df5d4f39..489255ad111 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayForeignXorOpInitImpl.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayForeignXorOpInitImpl.java @@ -20,7 +20,7 @@ public class GetArrayForeignXorOpInitImpl implements XorOp { Linker linker; linker = Linker.nativeLinker(); FunctionDescriptor xor_op_func = FunctionDescriptor.ofVoid(C_POINTER, C_POINTER, C_INT); - xor_op = linker.downcallHandle(SymbolLookup.loaderLookup().find("xor_op").orElseThrow(), xor_op_func, critical(false)); + xor_op = linker.downcallHandle(SymbolLookup.loaderLookup().findOrThrow("xor_op"), xor_op_func, critical(false)); } static final MethodHandle xor_op; diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayUnsafeXorOpImpl.java b/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayUnsafeXorOpImpl.java index 4175dd03121..ae6869c40d5 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayUnsafeXorOpImpl.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/xor/GetArrayUnsafeXorOpImpl.java @@ -25,7 +25,7 @@ public class GetArrayUnsafeXorOpImpl implements XorOp { Linker linker; linker = Linker.nativeLinker(); FunctionDescriptor xor_op_func = FunctionDescriptor.ofVoid(C_POINTER, C_POINTER, C_INT); - xor_op = linker.downcallHandle(SymbolLookup.loaderLookup().find("xor_op").orElseThrow(), xor_op_func, critical(false)); + xor_op = linker.downcallHandle(SymbolLookup.loaderLookup().findOrThrow("xor_op"), xor_op_func, critical(false)); } static final MethodHandle xor_op; diff --git a/test/micro/org/openjdk/bench/java/lang/invoke/LazyStaticColdStart.java b/test/micro/org/openjdk/bench/java/lang/invoke/LazyStaticColdStart.java index 45fc67aea25..fb73901adf4 100644 --- a/test/micro/org/openjdk/bench/java/lang/invoke/LazyStaticColdStart.java +++ b/test/micro/org/openjdk/bench/java/lang/invoke/LazyStaticColdStart.java @@ -76,7 +76,7 @@ class Holder { static final byte[] classBytes = ClassFile.of().build(describedClass, clb -> { clb.withField("v", CD_long, ACC_STATIC); clb.withMethodBody(CLASS_INIT_NAME, MTD_void, ACC_STATIC, cob -> { - cob.constantInstruction(100L); + cob.loadConstant(100L); cob.invokestatic(CD_Blackhole, "consumeCPU", MTD_void_long); cob.invokestatic(CD_ThreadLocalRandom, "current", MTD_ThreadLocalRandom); cob.invokevirtual(CD_ThreadLocalRandom, "nextLong", MTD_long); diff --git a/test/micro/org/openjdk/bench/jdk/classfile/CodeAttributeTools.java b/test/micro/org/openjdk/bench/jdk/classfile/CodeAttributeTools.java index 1a9d989c546..d2defd6c5ef 100644 --- a/test/micro/org/openjdk/bench/jdk/classfile/CodeAttributeTools.java +++ b/test/micro/org/openjdk/bench/jdk/classfile/CodeAttributeTools.java @@ -122,6 +122,7 @@ public void benchmarkStackMapsGenerator(Blackhole bh) { public void benchmarkStackCounter(Blackhole bh) { for (var d : data) bh.consume(new StackCounter( d.labelContext(), + d.thisClass(), d.methodName(), d.methodDesc(), d.isStatic(), diff --git a/test/micro/org/openjdk/bench/jdk/classfile/RebuildMethodBodies.java b/test/micro/org/openjdk/bench/jdk/classfile/RebuildMethodBodies.java index 4c657b961b1..d5e77c1a2a7 100644 --- a/test/micro/org/openjdk/bench/jdk/classfile/RebuildMethodBodies.java +++ b/test/micro/org/openjdk/bench/jdk/classfile/RebuildMethodBodies.java @@ -91,11 +91,11 @@ private static void transform(ClassFile cc, ClassModel clm) { cc.transform(clm, ClassTransform.transformingMethodBodies((cob, coe) -> { switch (coe) { case FieldInstruction i -> - cob.fieldInstruction(i.opcode(), i.owner().asSymbol(), i.name().stringValue(), i.typeSymbol()); + cob.fieldAccess(i.opcode(), i.owner().asSymbol(), i.name().stringValue(), i.typeSymbol()); case InvokeDynamicInstruction i -> cob.invokedynamic(i.invokedynamic().asSymbol()); case InvokeInstruction i -> - cob.invokeInstruction(i.opcode(), i.owner().asSymbol(), i.name().stringValue(), i.typeSymbol(), i.isInterface()); + cob.invoke(i.opcode(), i.owner().asSymbol(), i.name().stringValue(), i.typeSymbol(), i.isInterface()); case NewMultiArrayInstruction i -> cob.multianewarray(i.arrayType().asSymbol(), i.dimensions()); case NewObjectInstruction i -> @@ -103,7 +103,7 @@ private static void transform(ClassFile cc, ClassModel clm) { case NewReferenceArrayInstruction i -> cob.anewarray(i.componentType().asSymbol()); case TypeCheckInstruction i -> - cob.typeCheckInstruction(i.opcode(), i.type().asSymbol()); + cob.with(TypeCheckInstruction.of(i.opcode(), i.type().asSymbol())); default -> cob.with(coe); } })); diff --git a/test/micro/org/openjdk/bench/jdk/classfile/Transforms.java b/test/micro/org/openjdk/bench/jdk/classfile/Transforms.java index b5582bcf52e..def55b5f20c 100644 --- a/test/micro/org/openjdk/bench/jdk/classfile/Transforms.java +++ b/test/micro/org/openjdk/bench/jdk/classfile/Transforms.java @@ -203,7 +203,7 @@ public enum InjectNopTransform { cb.transformMethod(mm, (mb, me) -> { if (me instanceof CodeModel xm) { mb.withCode(xb -> { - xb.nopInstruction(); + xb.nop(); xm.forEachElement(new Consumer<>() { @Override public void accept(CodeElement e) { diff --git a/test/micro/org/openjdk/bench/jdk/classfile/Write.java b/test/micro/org/openjdk/bench/jdk/classfile/Write.java index 96aafb6f38e..59d07b05927 100644 --- a/test/micro/org/openjdk/bench/jdk/classfile/Write.java +++ b/test/micro/org/openjdk/bench/jdk/classfile/Write.java @@ -141,9 +141,9 @@ public byte[] jdkTree() { cb.withVersion(52, 0); cb.with(SourceFileAttribute.of(cb.constantPool().utf8Entry(("MyClass.java")))) .withMethod(INIT_NAME, MTD_void, 0, mb -> mb - .withCode(codeb -> codeb.loadInstruction(TypeKind.ReferenceType, 0) - .invokeInstruction(INVOKESPECIAL, CD_Object, INIT_NAME, MTD_void, false) - .returnInstruction(VoidType) + .withCode(codeb -> codeb.loadLocal(TypeKind.ReferenceType, 0) + .invoke(INVOKESPECIAL, CD_Object, INIT_NAME, MTD_void, false) + .return_(VoidType) ) ); for (int xi = 0; xi < 40; ++xi) { @@ -154,25 +154,25 @@ public byte[] jdkTree() { java.lang.classfile.Label loopEnd = c0.newLabel(); int vFac = 1; int vI = 2; - c0.constantInstruction(ICONST_1, 1) // 0 - .storeInstruction(IntType, vFac) // 1 - .constantInstruction(ICONST_1, 1) // 2 - .storeInstruction(IntType, vI) // 3 + c0.iconst_1() // 0 + .istore(vFac) // 1 + .iconst_1() // 2 + .istore(vI) // 3 .labelBinding(loopTop) - .loadInstruction(IntType, vI) // 4 - .constantInstruction(BIPUSH, 10) // 5 - .branchInstruction(IF_ICMPGE, loopEnd) // 6 - .loadInstruction(IntType, vFac) // 7 - .loadInstruction(IntType, vI) // 8 - .operatorInstruction(IMUL) // 9 - .storeInstruction(IntType, vFac) // 10 - .incrementInstruction(vI, 1) // 11 - .branchInstruction(GOTO, loopTop) // 12 + .iload(vI) // 4 + .bipush(10) // 5 + .if_icmpge(loopEnd) // 6 + .iload(vFac) // 7 + .iload(vI) // 8 + .imul() // 9 + .istore(vFac) // 10 + .iinc(vI, 1) // 11 + .goto_(loopTop) // 12 .labelBinding(loopEnd) - .fieldInstruction(GETSTATIC, CD_System, "out", CD_PrintStream) // 13 - .loadInstruction(IntType, vFac) - .invokeInstruction(INVOKEVIRTUAL, CD_PrintStream, "println", MTD_void_int, false) // 15 - .returnInstruction(VoidType); + .getstatic(CD_System, "out", CD_PrintStream) // 13 + .iload(vFac) + .invokevirtual(CD_PrintStream, "println", MTD_void_int) // 15 + .return_(); })); } }); @@ -189,9 +189,9 @@ public byte[] jdkTreePrimitive() { cb.withVersion(52, 0); cb.with(SourceFileAttribute.of(cb.constantPool().utf8Entry(("MyClass.java")))) .withMethod(INIT_NAME, MTD_void, 0, - mb -> mb.withCode(codeb -> codeb.loadInstruction(ReferenceType, 0) - .invokeInstruction(INVOKESPECIAL, CD_Object, INIT_NAME, MTD_void, false) - .returnInstruction(VoidType) + mb -> mb.withCode(codeb -> codeb.loadLocal(ReferenceType, 0) + .invokespecial(CD_Object, INIT_NAME, MTD_void, false) + .return_() ) ); for (int xi = 0; xi < 40; ++xi) { @@ -202,25 +202,25 @@ public byte[] jdkTreePrimitive() { java.lang.classfile.Label loopEnd = c0.newLabel(); int vFac = 1; int vI = 2; - c0.constantInstruction(ICONST_1, 1) // 0 - .storeInstruction(IntType, 1) // 1 - .constantInstruction(ICONST_1, 1) // 2 - .storeInstruction(IntType, 2) // 3 + c0.iconst_1() // 0 + .istore(1) // 1 + .iconst_1() // 2 + .istore(2) // 3 .labelBinding(loopTop) - .loadInstruction(IntType, 2) // 4 - .constantInstruction(BIPUSH, 10) // 5 - .branchInstruction(IF_ICMPGE, loopEnd) // 6 - .loadInstruction(IntType, 1) // 7 - .loadInstruction(IntType, 2) // 8 - .operatorInstruction(IMUL) // 9 - .storeInstruction(IntType, 1) // 10 - .incrementInstruction(2, 1) // 11 - .branchInstruction(GOTO, loopTop) // 12 + .iload(2) // 4 + .bipush(10) // 5 + .if_icmpge(loopEnd) // 6 + .iload(1) // 7 + .iload(2) // 8 + .imul() // 9 + .istore(1) // 10 + .iinc(2, 1) // 11 + .goto_(loopTop) // 12 .labelBinding(loopEnd) - .fieldInstruction(GETSTATIC, CD_System, "out", CD_PrintStream) // 13 - .loadInstruction(IntType, 1) - .invokeInstruction(INVOKEVIRTUAL, CD_PrintStream, "println", MTD_void_int, false) // 15 - .returnInstruction(VoidType); + .getstatic(CD_System, "out", CD_PrintStream) // 13 + .iload(1) + .invokevirtual(CD_PrintStream, "println", MTD_void_int) // 15 + .return_(); })); } }); diff --git a/test/micro/org/openjdk/bench/vm/compiler/ConstructorBarriers.java b/test/micro/org/openjdk/bench/vm/compiler/ConstructorBarriers.java new file mode 100644 index 00000000000..7adbbe0e1a7 --- /dev/null +++ b/test/micro/org/openjdk/bench/vm/compiler/ConstructorBarriers.java @@ -0,0 +1,269 @@ +/* + * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package org.openjdk.bench.vm.compiler; + +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.CompilerControl; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Param; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; +import org.openjdk.jmh.infra.Blackhole; +import java.util.concurrent.TimeUnit; + +@BenchmarkMode(Mode.AverageTime) +@OutputTimeUnit(TimeUnit.NANOSECONDS) +@State(Scope.Thread) +@Warmup(iterations = 3, time = 1, timeUnit = TimeUnit.SECONDS) +@Measurement(iterations = 3, time = 1, timeUnit = TimeUnit.SECONDS) +@Fork(value = 3, jvmArgsAppend = {"-Xms512m", "-Xmx512m", "-XX:+AlwaysPreTouch", "-XX:+UseParallelGC"}) +public class ConstructorBarriers { + + // Checks the barrier coalescing/optimization around field initializations. + // Uses long fields to avoid store merging. + + public static class PlainPlain { + long f1; + long f2; + public PlainPlain(long i) { + f1 = i; + f2 = i; + } + } + + private static class FinalPlain { + final long f1; + long f2; + public FinalPlain(long i) { + f1 = i; + f2 = i; + } + } + + private static class PlainFinal { + long f1; + final long f2; + public PlainFinal(long i) { + f1 = i; + f2 = i; + } + } + + private static class FinalFinal { + final long f1; + final long f2; + public FinalFinal(long i) { + f1 = i; + f2 = i; + } + } + + private static class PlainVolatile { + long f1; + volatile long f2; + public PlainVolatile(long i) { + f1 = i; + f2 = i; + } + } + + private static class VolatilePlain { + volatile long f1; + long f2; + public VolatilePlain(long i) { + f1 = i; + f2 = i; + } + } + + private static class FinalVolatile { + final long f1; + volatile long f2; + public FinalVolatile(long i) { + f1 = i; + f2 = i; + } + } + + private static class VolatileFinal { + volatile long f1; + final long f2; + public VolatileFinal(long i) { + f1 = i; + f2 = i; + } + } + + private static class VolatileVolatile { + volatile long f1; + volatile long f2; + public VolatileVolatile(long i) { + f1 = i; + f2 = i; + } + } + + long l = 42; + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long escaping_plainPlain(Blackhole bh) { + PlainPlain c = new PlainPlain(l); + bh.consume(c); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long escaping_plainFinal(Blackhole bh) { + PlainFinal c = new PlainFinal(l); + bh.consume(c); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long escaping_finalPlain(Blackhole bh) { + FinalPlain c = new FinalPlain(l); + bh.consume(c); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long escaping_finalFinal(Blackhole bh) { + FinalFinal c = new FinalFinal(l); + bh.consume(c); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long escaping_plainVolatile(Blackhole bh) { + PlainVolatile c = new PlainVolatile(l); + bh.consume(c); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long escaping_volatilePlain(Blackhole bh) { + VolatilePlain c = new VolatilePlain(l); + bh.consume(c); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long escaping_volatileVolatile(Blackhole bh) { + VolatileVolatile c = new VolatileVolatile(l); + bh.consume(c); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long escaping_finalVolatile(Blackhole bh) { + FinalVolatile c = new FinalVolatile(l); + bh.consume(c); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long escaping_volatileFinal(Blackhole bh) { + VolatileFinal c = new VolatileFinal(l); + bh.consume(c); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long non_escaping_plainPlain() { + PlainPlain c = new PlainPlain(l); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long non_escaping_plainFinal() { + PlainFinal c = new PlainFinal(l); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long non_escaping_finalPlain() { + FinalPlain c = new FinalPlain(l); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long non_escaping_finalFinal() { + FinalFinal c = new FinalFinal(l); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long non_escaping_plainVolatile() { + PlainVolatile c = new PlainVolatile(l); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long non_escaping_volatilePlain() { + VolatilePlain c = new VolatilePlain(l); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long non_escaping_volatileVolatile() { + VolatileVolatile c = new VolatileVolatile(l); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long non_escaping_finalVolatile() { + FinalVolatile c = new FinalVolatile(l); + return c.f1 + c.f2; + } + + @Benchmark + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + public long non_escaping_volatileFinal() { + VolatileFinal c = new VolatileFinal(l); + return c.f1 + c.f2; + } + +} + diff --git a/test/micro/org/openjdk/bench/vm/compiler/MergeStores.java b/test/micro/org/openjdk/bench/vm/compiler/MergeStores.java new file mode 100644 index 00000000000..84017573c07 --- /dev/null +++ b/test/micro/org/openjdk/bench/vm/compiler/MergeStores.java @@ -0,0 +1,694 @@ +/* + * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package org.openjdk.bench.vm.compiler; + +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Param; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; + + +import jdk.internal.misc.Unsafe; +import jdk.internal.util.ByteArrayLittleEndian; +import java.util.concurrent.TimeUnit; + +@BenchmarkMode(Mode.AverageTime) +@OutputTimeUnit(TimeUnit.NANOSECONDS) +@Warmup(iterations = 3, time = 3) +@Measurement(iterations = 3, time = 3) +@Fork(value = 3, jvmArgsAppend = { + "--add-exports", "java.base/jdk.internal.misc=ALL-UNNAMED", + "--add-exports", "java.base/jdk.internal.util=ALL-UNNAMED"}) +@State(Scope.Benchmark) +public class MergeStores { + + public static final int RANGE = 100; + + static Unsafe UNSAFE = Unsafe.getUnsafe(); + + @Param("1") + public static short vS; + + @Param("1") + public static int vI; + + @Param("1") + public static long vL; + + public static int offset = 5; + public static byte[] aB = new byte[RANGE]; + public static short[] aS = new short[RANGE]; + public static int[] aI = new int[RANGE]; + + // ------------------------------------------- + // ------- Little-Endian API ---------- + // ------------------------------------------- + + // Store a short LE into an array using store bytes in an array + static void storeShortLE(byte[] bytes, int offset, short value) { + storeBytes(bytes, offset, (byte)(value >> 0), + (byte)(value >> 8)); + } + + // Store an int LE into an array using store bytes in an array + static void storeIntLE(byte[] bytes, int offset, int value) { + storeBytes(bytes, offset, (byte)(value >> 0 ), + (byte)(value >> 8 ), + (byte)(value >> 16), + (byte)(value >> 24)); + } + + // Store an int LE into an array using store bytes in an array + static void storeLongLE(byte[] bytes, int offset, long value) { + storeBytes(bytes, offset, (byte)(value >> 0 ), + (byte)(value >> 8 ), + (byte)(value >> 16), + (byte)(value >> 24), + (byte)(value >> 32), + (byte)(value >> 40), + (byte)(value >> 48), + (byte)(value >> 56)); + } + + // Store 2 bytes into an array + static void storeBytes(byte[] bytes, int offset, byte b0, byte b1) { + bytes[offset + 0] = b0; + bytes[offset + 1] = b1; + } + + // Store 4 bytes into an array + static void storeBytes(byte[] bytes, int offset, byte b0, byte b1, byte b2, byte b3) { + bytes[offset + 0] = b0; + bytes[offset + 1] = b1; + bytes[offset + 2] = b2; + bytes[offset + 3] = b3; + } + + // Store 8 bytes into an array + static void storeBytes(byte[] bytes, int offset, byte b0, byte b1, byte b2, byte b3, + byte b4, byte b5, byte b6, byte b7) { + bytes[offset + 0] = b0; + bytes[offset + 1] = b1; + bytes[offset + 2] = b2; + bytes[offset + 3] = b3; + bytes[offset + 4] = b4; + bytes[offset + 5] = b5; + bytes[offset + 6] = b6; + bytes[offset + 7] = b7; + } + + // -------------------------------- BENCHMARKS -------------------------------- + + @Benchmark + public void baseline() { + } + + @Benchmark + public byte[] baseline_allocate() { + byte[] aB = new byte[RANGE]; + return aB; + } + + @Benchmark + public byte[] store_B2_con_adr0_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[0] = (byte)0x01; + aB[1] = (byte)0x02; + return aB; + } + + @Benchmark + public byte[] store_B2_con_adr1_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[1] = (byte)0x01; + aB[2] = (byte)0x02; + return aB; + } + + @Benchmark + public byte[] store_B2_con_offs_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[offset + 0] = (byte)0x01; + aB[offset + 1] = (byte)0x02; + return aB; + } + + @Benchmark + public byte[] store_B2_con_offs_allocate_unsafe() { + byte[] aB = new byte[RANGE]; + UNSAFE.putShortUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset, (short)0x0201); + return aB; + } + + @Benchmark + public byte[] store_B2_con_offs_allocate_bale() { + byte[] aB = new byte[RANGE]; + ByteArrayLittleEndian.setShort(aB, offset, (short)0x0201); + return aB; + } + + @Benchmark + public byte[] store_B2_con_offs_allocate_leapi() { + byte[] aB = new byte[RANGE]; + storeShortLE(aB, offset, (short)0x0201); + return aB; + } + + @Benchmark + public byte[] store_B2_con_offs_nonalloc_direct() { + aB[offset + 0] = (byte)0x01; + aB[offset + 1] = (byte)0x02; + return aB; + } + + @Benchmark + public byte[] store_B2_con_offs_nonalloc_unsafe() { + UNSAFE.putShortUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset, (short)0x0201); + return aB; + } + + @Benchmark + public byte[] store_B2_con_offs_nonalloc_bale() { + ByteArrayLittleEndian.setShort(aB, offset, (short)0x0201); + return aB; + } + + @Benchmark + public byte[] store_B2_con_offs_nonalloc_leapi() { + storeShortLE(aB, offset, (short)0x0201); + return aB; + } + + @Benchmark + public byte[] store_B2_S_offs_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[offset + 0] = (byte)(vS >> 0 ); + aB[offset + 1] = (byte)(vS >> 8 ); + return aB; + } + + @Benchmark + public byte[] store_B2_S_offs_allocate_unsafe() { + byte[] aB = new byte[RANGE]; + UNSAFE.putShortUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset, vS); + return aB; + } + + @Benchmark + public byte[] store_B2_S_offs_allocate_bale() { + byte[] aB = new byte[RANGE]; + ByteArrayLittleEndian.setShort(aB, offset, vS); + return aB; + } + + @Benchmark + public byte[] store_B2_S_offs_allocate_leapi() { + byte[] aB = new byte[RANGE]; + storeShortLE(aB, offset, vS); + return aB; + } + + @Benchmark + public byte[] store_B2_S_offs_nonalloc_direct() { + aB[offset + 0] = (byte)(vS >> 0 ); + aB[offset + 1] = (byte)(vS >> 8 ); + return aB; + } + + @Benchmark + public byte[] store_B2_S_offs_nonalloc_unsafe() { + UNSAFE.putShortUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset, vS); + return aB; + } + + @Benchmark + public byte[] store_B2_S_offs_nonalloc_bale() { + ByteArrayLittleEndian.setShort(aB, offset, vS); + return aB; + } + + @Benchmark + public byte[] store_B2_S_offs_nonalloc_leapi() { + storeShortLE(aB, offset, vS); + return aB; + } + + @Benchmark + public byte[] store_B4_con_adr0_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[0] = (byte)0x01; + aB[1] = (byte)0x02; + aB[2] = (byte)0x03; + aB[3] = (byte)0x04; + return aB; + } + + @Benchmark + public byte[] store_B4_con_adr1_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[1] = (byte)0x01; + aB[2] = (byte)0x02; + aB[3] = (byte)0x03; + aB[4] = (byte)0x04; + return aB; + } + + @Benchmark + public byte[] store_B4_con_offs_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[offset + 0] = (byte)0x01; + aB[offset + 1] = (byte)0x02; + aB[offset + 2] = (byte)0x03; + aB[offset + 3] = (byte)0x04; + return aB; + } + + @Benchmark + public byte[] store_B4_con_offs_allocate_unsafe() { + byte[] aB = new byte[RANGE]; + UNSAFE.putIntUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset, 0x04030201); + return aB; + } + + @Benchmark + public byte[] store_B4_con_offs_allocate_bale() { + byte[] aB = new byte[RANGE]; + ByteArrayLittleEndian.setInt(aB, offset, 0x04030201); + return aB; + } + + @Benchmark + public byte[] store_B4_con_offs_allocate_leapi() { + byte[] aB = new byte[RANGE]; + storeIntLE(aB, offset, 0x04030201); + return aB; + } + + @Benchmark + public byte[] store_B4_con_offs_nonalloc_direct() { + aB[offset + 0] = (byte)0x01; + aB[offset + 1] = (byte)0x02; + aB[offset + 2] = (byte)0x03; + aB[offset + 3] = (byte)0x04; + return aB; + } + + @Benchmark + public byte[] store_B4_con_offs_nonalloc_unsafe() { + UNSAFE.putIntUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset, 0x04030201); + return aB; + } + + @Benchmark + public byte[] store_B4_con_offs_nonalloc_bale() { + ByteArrayLittleEndian.setInt(aB, offset, 0x04030201); + return aB; + } + + @Benchmark + public byte[] store_B4_con_offs_nonalloc_leapi() { + storeIntLE(aB, offset, 0x04030201); + return aB; + } + + @Benchmark + public byte[] store_B4_I_offs_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[offset + 0] = (byte)(vI >> 0 ); + aB[offset + 1] = (byte)(vI >> 8 ); + aB[offset + 2] = (byte)(vI >> 16); + aB[offset + 3] = (byte)(vI >> 24); + return aB; + } + + @Benchmark + public byte[] store_B4_I_offs_allocate_unsafe() { + byte[] aB = new byte[RANGE]; + UNSAFE.putIntUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset, vI); + return aB; + } + + @Benchmark + public byte[] store_B4_I_offs_allocate_bale() { + byte[] aB = new byte[RANGE]; + ByteArrayLittleEndian.setInt(aB, offset, vI); + return aB; + } + + @Benchmark + public byte[] store_B4_I_offs_allocate_leapi() { + byte[] aB = new byte[RANGE]; + storeIntLE(aB, offset, vI); + return aB; + } + + @Benchmark + public byte[] store_B4_I_offs_nonalloc_direct() { + aB[offset + 0] = (byte)(vI >> 0 ); + aB[offset + 1] = (byte)(vI >> 8 ); + aB[offset + 2] = (byte)(vI >> 16); + aB[offset + 3] = (byte)(vI >> 24); + return aB; + } + + @Benchmark + public byte[] store_B4_I_offs_nonalloc_unsafe() { + UNSAFE.putIntUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset, vI); + return aB; + } + + @Benchmark + public byte[] store_B4_I_offs_nonalloc_bale() { + ByteArrayLittleEndian.setInt(aB, offset, vI); + return aB; + } + + @Benchmark + public byte[] store_B4_I_offs_nonalloc_leapi() { + storeIntLE(aB, offset, vI); + return aB; + } + + @Benchmark + public byte[] store_B8_con_adr0_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[0] = (byte)0x01; + aB[1] = (byte)0x02; + aB[2] = (byte)0x03; + aB[3] = (byte)0x04; + aB[4] = (byte)0x05; + aB[5] = (byte)0x06; + aB[6] = (byte)0x07; + aB[7] = (byte)0x08; + return aB; + } + + @Benchmark + public byte[] store_B8_con_adr1_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[1] = (byte)0x01; + aB[2] = (byte)0x02; + aB[3] = (byte)0x03; + aB[4] = (byte)0x04; + aB[5] = (byte)0x05; + aB[6] = (byte)0x06; + aB[7] = (byte)0x07; + aB[8] = (byte)0x08; + return aB; + } + + @Benchmark + public byte[] store_B8_con_offs_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[offset + 0] = (byte)0x01; + aB[offset + 1] = (byte)0x02; + aB[offset + 2] = (byte)0x03; + aB[offset + 3] = (byte)0x04; + aB[offset + 4] = (byte)0x05; + aB[offset + 5] = (byte)0x06; + aB[offset + 6] = (byte)0x07; + aB[offset + 7] = (byte)0x08; + return aB; + } + + @Benchmark + public byte[] store_B8_con_offs_allocate_unsafe() { + byte[] aB = new byte[RANGE]; + UNSAFE.putLongUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset, 0x0807060504030201L); + return aB; + } + + @Benchmark + public byte[] store_B8_con_offs_allocate_bale() { + byte[] aB = new byte[RANGE]; + ByteArrayLittleEndian.setLong(aB, offset, 0x0807060504030201L); + return aB; + } + + @Benchmark + public byte[] store_B8_con_offs_allocate_leapi() { + byte[] aB = new byte[RANGE]; + storeLongLE(aB, offset, 0x0807060504030201L); + return aB; + } + + @Benchmark + public byte[] store_B8_con_offs_nonalloc_direct() { + aB[offset + 0] = (byte)0x01; + aB[offset + 1] = (byte)0x02; + aB[offset + 2] = (byte)0x03; + aB[offset + 3] = (byte)0x04; + aB[offset + 4] = (byte)0x05; + aB[offset + 5] = (byte)0x06; + aB[offset + 6] = (byte)0x07; + aB[offset + 7] = (byte)0x08; + return aB; + } + + @Benchmark + public byte[] store_B8_con_offs_nonalloc_unsafe() { + UNSAFE.putLongUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset, 0x0807060504030201L); + return aB; + } + + @Benchmark + public byte[] store_B8_con_offs_nonalloc_bale() { + ByteArrayLittleEndian.setLong(aB, offset, 0x0807060504030201L); + return aB; + } + + @Benchmark + public byte[] store_B8_con_offs_nonalloc_leapi() { + storeLongLE(aB, offset, 0x0807060504030201L); + return aB; + } + + @Benchmark + public byte[] store_B8_L_offs_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[offset + 0] = (byte)(vL >> 0 ); + aB[offset + 1] = (byte)(vL >> 8 ); + aB[offset + 2] = (byte)(vL >> 16); + aB[offset + 3] = (byte)(vL >> 24); + aB[offset + 4] = (byte)(vL >> 32); + aB[offset + 5] = (byte)(vL >> 40); + aB[offset + 6] = (byte)(vL >> 48); + aB[offset + 7] = (byte)(vL >> 56); + return aB; + } + + @Benchmark + public byte[] store_B8_L_offs_allocate_unsafe() { + byte[] aB = new byte[RANGE]; + UNSAFE.putLongUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset, vL); + return aB; + } + + @Benchmark + public byte[] store_B8_L_offs_allocate_bale() { + byte[] aB = new byte[RANGE]; + ByteArrayLittleEndian.setLong(aB, offset, vL); + return aB; + } + + @Benchmark + public byte[] store_B8_L_offs_allocate_leapi() { + byte[] aB = new byte[RANGE]; + storeLongLE(aB, offset, vL); + return aB; + } + + @Benchmark + public byte[] store_B8_L_offs_nonalloc_direct() { + aB[offset + 0] = (byte)(vL >> 0 ); + aB[offset + 1] = (byte)(vL >> 8 ); + aB[offset + 2] = (byte)(vL >> 16); + aB[offset + 3] = (byte)(vL >> 24); + aB[offset + 4] = (byte)(vL >> 32); + aB[offset + 5] = (byte)(vL >> 40); + aB[offset + 6] = (byte)(vL >> 48); + aB[offset + 7] = (byte)(vL >> 56); + return aB; + } + + @Benchmark + public byte[] store_B8_L_offs_nonalloc_unsafe() { + UNSAFE.putLongUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset, vL); + return aB; + } + + @Benchmark + public byte[] store_B8_L_offs_nonalloc_bale() { + ByteArrayLittleEndian.setLong(aB, offset, vL); + return aB; + } + + @Benchmark + public byte[] store_B8_L_offs_nonalloc_leapi() { + storeLongLE(aB, offset, vL); + return aB; + } + + @Benchmark + public byte[] store_B8_I2_offs_allocate_direct() { + byte[] aB = new byte[RANGE]; + aB[offset + 0] = (byte)(vI >> 0 ); + aB[offset + 1] = (byte)(vI >> 8 ); + aB[offset + 2] = (byte)(vI >> 16); + aB[offset + 3] = (byte)(vI >> 24); + aB[offset + 4] = (byte)(vI >> 0 ); + aB[offset + 5] = (byte)(vI >> 8 ); + aB[offset + 6] = (byte)(vI >> 16); + aB[offset + 7] = (byte)(vI >> 24); + return aB; + } + + @Benchmark + public byte[] store_B8_I2_offs_allocate_unsafe() { + byte[] aB = new byte[RANGE]; + UNSAFE.putLongUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset + 0, vI); + UNSAFE.putLongUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset + 4, vI); + return aB; + } + + @Benchmark + public byte[] store_B8_I2_offs_allocate_bale() { + byte[] aB = new byte[RANGE]; + ByteArrayLittleEndian.setInt(aB, offset + 0, vI); + ByteArrayLittleEndian.setInt(aB, offset + 4, vI); + return aB; + } + + @Benchmark + public byte[] store_B8_I2_offs_allocate_leapi() { + byte[] aB = new byte[RANGE]; + storeIntLE(aB, offset + 0, vI); + storeIntLE(aB, offset + 4, vI); + return aB; + } + + @Benchmark + public byte[] store_B8_I2_offs_nonalloc_direct() { + aB[offset + 0] = (byte)(vI >> 0 ); + aB[offset + 1] = (byte)(vI >> 8 ); + aB[offset + 2] = (byte)(vI >> 16); + aB[offset + 3] = (byte)(vI >> 24); + aB[offset + 4] = (byte)(vI >> 0 ); + aB[offset + 5] = (byte)(vI >> 8 ); + aB[offset + 6] = (byte)(vI >> 16); + aB[offset + 7] = (byte)(vI >> 24); + return aB; + } + + @Benchmark + public byte[] store_B8_I2_offs_nonalloc_unsafe() { + UNSAFE.putLongUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset + 0, vI); + UNSAFE.putLongUnaligned(aB, Unsafe.ARRAY_BYTE_BASE_OFFSET + offset + 4, vI); + return aB; + } + + @Benchmark + public byte[] store_B8_I2_offs_nonalloc_bale() { + ByteArrayLittleEndian.setInt(aB, offset + 0, vI); + ByteArrayLittleEndian.setInt(aB, offset + 4, vI); + return aB; + } + + @Benchmark + public byte[] store_B8_I2_offs_nonalloc_leapi() { + storeIntLE(aB, offset + 0, vI); + storeIntLE(aB, offset + 4, vI); + return aB; + } + + @Benchmark + public short[] store_S2_con_offs_allocate_direct() { + short[] aS = new short[RANGE]; + aS[offset + 0] = (short)0x0102; + aS[offset + 1] = (short)0x0304; + return aS; + } + + @Benchmark + public short[] store_S2_con_offs_nonalloc_direct() { + aS[offset + 0] = (short)0x0102; + aS[offset + 1] = (short)0x0304; + return aS; + } + + @Benchmark + public short[] store_S4_con_offs_allocate_direct() { + short[] aS = new short[RANGE]; + aS[offset + 0] = (short)0x0102; + aS[offset + 1] = (short)0x0304; + aS[offset + 2] = (short)0x0506; + aS[offset + 3] = (short)0x0708; + return aS; + } + + @Benchmark + public short[] store_S4_con_offs_nonalloc_direct() { + aS[offset + 0] = (short)0x0102; + aS[offset + 1] = (short)0x0304; + aS[offset + 2] = (short)0x0506; + aS[offset + 3] = (short)0x0708; + return aS; + } + + @Benchmark + public int[] store_I2_con_offs_allocate_direct() { + int[] aI = new int[RANGE]; + aI[offset + 0] = 0x01020304; + aI[offset + 1] = 0x05060708; + return aI; + } + + @Benchmark + public int[] store_I2_con_offs_nonalloc_direct() { + aI[offset + 0] = 0x01020304; + aI[offset + 1] = 0x05060708; + return aI; + } + + @Benchmark + public int[] store_I2_zero_offs_allocate_direct() { + int[] aI = new int[RANGE]; + aI[offset + 0] = 0; + aI[offset + 1] = 0; + return aI; + } + + @Benchmark + public int[] store_I2_zero_offs_nonalloc_direct() { + aI[offset + 0] = 0; + aI[offset + 1] = 0; + return aI; + } +}