# HG changeset patch # User Tom Rodriguez # Date 1397013195 25200 # Node ID c47ff5fd532fc9d2d8e9eb12477a11a6528e2a91 # Parent 9806a98bcf9a20a17a9beddfb481611be20419da eliminate old 1.7 signatures for CBC methods diff -r 9806a98bcf9a -r c47ff5fd532f graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CipherBlockChainingSubstitutions.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CipherBlockChainingSubstitutions.java Tue Apr 08 20:09:36 2014 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CipherBlockChainingSubstitutions.java Tue Apr 08 20:13:15 2014 -0700 @@ -67,31 +67,8 @@ return AESCryptSubstitutions.AESCryptClass; } - @MethodSubstitution(isStatic = false, optional = true) - static void encrypt(Object rcvr, byte[] in, int inOffset, int inLength, byte[] out, int outOffset) { - Object embeddedCipher = UnsafeLoadNode.load(rcvr, embeddedCipherOffset, Kind.Object, LocationIdentity.ANY_LOCATION); - if (getAESCryptClass().isInstance(embeddedCipher)) { - Object aesCipher = PiNode.piCastNonNull(embeddedCipher, AESCryptSubstitutions.AESCryptClass); - crypt(rcvr, in, inOffset, inLength, out, outOffset, aesCipher, true); - } else { - encrypt(rcvr, in, inOffset, inLength, out, outOffset); - } - } - - @MethodSubstitution(isStatic = false, optional = true) - static void decrypt(Object rcvr, byte[] in, int inOffset, int inLength, byte[] out, int outOffset) { - Object realReceiver = PiNode.piCastNonNull(rcvr, cipherBlockChainingClass); - Object embeddedCipher = UnsafeLoadNode.load(realReceiver, embeddedCipherOffset, Kind.Object, LocationIdentity.ANY_LOCATION); - if (in != out && getAESCryptClass().isInstance(embeddedCipher)) { - Object aesCipher = PiNode.piCastNonNull(embeddedCipher, AESCryptSubstitutions.AESCryptClass); - crypt(realReceiver, in, inOffset, inLength, out, outOffset, aesCipher, false); - } else { - decrypt(realReceiver, in, inOffset, inLength, out, outOffset); - } - } - - @MethodSubstitution(value = "encrypt", isStatic = false, optional = true) - static int encryptInt(Object rcvr, byte[] in, int inOffset, int inLength, byte[] out, int outOffset) { + @MethodSubstitution(isStatic = false) + static int encrypt(Object rcvr, byte[] in, int inOffset, int inLength, byte[] out, int outOffset) { Object realReceiver = PiNode.piCastNonNull(rcvr, cipherBlockChainingClass); Object embeddedCipher = UnsafeLoadNode.load(realReceiver, embeddedCipherOffset, Kind.Object, LocationIdentity.ANY_LOCATION); if (getAESCryptClass().isInstance(embeddedCipher)) { @@ -99,12 +76,12 @@ crypt(realReceiver, in, inOffset, inLength, out, outOffset, aesCipher, true); return inLength; } else { - return encryptInt(realReceiver, in, inOffset, inLength, out, outOffset); + return encrypt(realReceiver, in, inOffset, inLength, out, outOffset); } } - @MethodSubstitution(value = "decrypt", isStatic = false, optional = true) - static int decryptInt(Object rcvr, byte[] in, int inOffset, int inLength, byte[] out, int outOffset) { + @MethodSubstitution(isStatic = false) + static int decrypt(Object rcvr, byte[] in, int inOffset, int inLength, byte[] out, int outOffset) { Object realReceiver = PiNode.piCastNonNull(rcvr, cipherBlockChainingClass); Object embeddedCipher = UnsafeLoadNode.load(realReceiver, embeddedCipherOffset, Kind.Object, LocationIdentity.ANY_LOCATION); if (in != out && getAESCryptClass().isInstance(embeddedCipher)) { @@ -112,7 +89,7 @@ crypt(realReceiver, in, inOffset, inLength, out, outOffset, aesCipher, false); return inLength; } else { - return decryptInt(realReceiver, in, inOffset, inLength, out, outOffset); + return decrypt(realReceiver, in, inOffset, inLength, out, outOffset); } }