blob: dd59192b4005cb7fef9b296007c4269c4ab40f83 [file] [log] [blame]
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import static art.Redefinition.doCommonClassRedefinition;
import java.util.Base64;
import java.util.Random;
import java.util.function.*;
import java.util.stream.*;
public class Main {
// The bytes below define the following java program.
// To generate the bytes from the following Long.java file:
// 1. Commit your Long.java change: git commit -- libcore/ojluni/src/main/java/java/lang/Long.java
// 2. Copy the following java program into libcore/ojluni/src/main/java/java/lang/Long.java
// 3. Run this build command: m core-all && d8 --classpath out/soong/.intermediates/libcore/core-all/android_common/javac/classes/ out/soong/.intermediates/libcore/core-all/android_common/javac/classes/java/lang/Long.class && base64 out/soong/.intermediates/libcore/core-all/android_common/javac/classes/java/lang/Long.class > class_Long.txt && base64 classes.dex > dex_Long.txt
// 4. Copy class_Long.txt into CLASS_BYTES String and dex_Long.txt into DEX_BYTES
// 5. Checkout the original Long.java: croot libcore && git checkout ojluni/src/main/java/java/lang/Long.java
// package java.lang;
// import java.lang.constant.Constable;
// import java.lang.constant.ConstantDesc;
// import java.lang.invoke.MethodHandles;
// import java.math.*;
//
// import java.util.Optional;
// public final class Long extends Number implements Comparable<Long>, Constable, ConstantDesc {
// public static final long MIN_VALUE = 0;
// public static final long MAX_VALUE = 0;
// public static final Class<Long> TYPE = null;
// static { }
// // Used for Stream.count for some reason.
// public static long sum(long a, long b) {
// return a + b;
// }
// // Used in stream/lambda functions.
// public Long(long value) {
// this.value = value;
// }
// // Used in stream/lambda functions.
// public static Long valueOf(long l) {
// return new Long(l);
// }
// // Intrinsic! Do something cool. Return i + 1
// public static long highestOneBit(long i) {
// return i + 1;
// }
// // Intrinsic! Do something cool. Return i - 1
// public static long lowestOneBit(long i) {
// return i - 1;
// }
// // Intrinsic! Do something cool. Return i + i
// public static int numberOfLeadingZeros(long i) {
// return (int)(i + i);
// }
// // Intrinsic! Do something cool. Return i & (i >>> 1);
// public static int numberOfTrailingZeros(long i) {
// return (int)(i & (i >>> 1));
// }
// // Intrinsic! Do something cool. Return 5
// public static int bitCount(long i) {
// return 5;
// }
// // Intrinsic! Do something cool. Return i
// public static long rotateLeft(long i, int distance) {
// return i;
// }
// // Intrinsic! Do something cool. Return 10 * i
// public static long rotateRight(long i, int distance) {
// return 10 * i;
// }
// // Intrinsic! Do something cool. Return -i
// public static long reverse(long i) {
// return -i;
// }
// // Intrinsic! Do something cool. Return 0
// public static int signum(long i) {
// return 0;
// }
// // Intrinsic! Do something cool. Return 0
// public static long reverseBytes(long i) {
// return 0;
// }
// public String toString() {
// return "Redefined Long! value (as double)=" + ((double)value);
// }
// public static String toString(long i, int radix) {
// throw new Error("Method redefined away!");
// }
// public static String toUnsignedString(long i, int radix) {
// throw new Error("Method redefined away!");
// }
// private static BigInteger toUnsignedBigInteger(long i) {
// throw new Error("Method redefined away!");
// }
// public static String toHexString(long i) {
// throw new Error("Method redefined away!");
// }
// public static String toOctalString(long i) {
// throw new Error("Method redefined away!");
// }
// public static String toBinaryString(long i) {
// throw new Error("Method redefined away!");
// }
// static String toUnsignedString0(long val, int shift) {
// throw new Error("Method redefined away!");
// }
// static void formatUnsignedLong0(long val, int shift, byte[] buf, int offset, int len) {
// throw new Error("Method redefined away!");
// }
// public static String toString(long i) {
// throw new Error("Method redefined away!");
// }
// public static String toUnsignedString(long i) {
// throw new Error("Method redefined away!");
// }
// static int getChars(long i, int index, byte[] buf) {
// throw new Error("Method redefined away!");
// }
// static int getChars(long i, int index, char[] buf) {
// throw new Error("Method redefined away!");
// }
// static int stringSize(long x) {
// throw new Error("Method redefined away!");
// }
// public static long parseLong(String s, int radix) throws NumberFormatException {
// throw new Error("Method redefined away!");
// }
// public static long parseLong(String s) throws NumberFormatException {
// throw new Error("Method redefined away!");
// }
// public static long parseLong(CharSequence s, int beginIndex, int endIndex, int radix) throws NumberFormatException {
// throw new Error("Method redefined away!");
// }
// public static long parseUnsignedLong(String s, int radix) throws NumberFormatException {
// throw new Error("Method redefined away!");
// }
// public static long parseUnsignedLong(String s) throws NumberFormatException {
// throw new Error("Method redefined away!");
// }
// public static long parseUnsignedLong(CharSequence s, int beginIndex, int endIndex, int radix) throws NumberFormatException {
// throw new Error("Method redefined away!");
// }
// public static Long valueOf(String s, int radix) throws NumberFormatException {
// throw new Error("Method redefined away!");
// }
// public static Long valueOf(String s) throws NumberFormatException {
// throw new Error("Method redefined away!");
// }
// public static Long decode(String nm) throws NumberFormatException {
// throw new Error("Method redefined away!");
// }
// private final long value;
// public Long(String s) throws NumberFormatException {
// this(0);
// throw new Error("Method redefined away!");
// }
// public byte byteValue() {
// throw new Error("Method redefined away!");
// }
// public short shortValue() {
// throw new Error("Method redefined away!");
// }
// public int intValue() {
// throw new Error("Method redefined away!");
// }
// public long longValue() {
// return value;
// }
// public float floatValue() {
// throw new Error("Method redefined away!");
// }
// public double doubleValue() {
// throw new Error("Method redefined away!");
// }
// public int hashCode() {
// throw new Error("Method redefined away!");
// }
// public static int hashCode(long value) {
// throw new Error("Method redefined away!");
// }
// public boolean equals(Object obj) {
// throw new Error("Method redefined away!");
// }
// public static Long getLong(String nm) {
// throw new Error("Method redefined away!");
// }
// public static Long getLong(String nm, long val) {
// throw new Error("Method redefined away!");
// }
// public static Long getLong(String nm, Long val) {
// throw new Error("Method redefined away!");
// }
// public int compareTo(Long anotherLong) {
// throw new Error("Method redefined away!");
// }
// public static int compare(long x, long y) {
// throw new Error("Method redefined away!");
// }
// public static int compareUnsigned(long x, long y) {
// throw new Error("Method redefined away!");
// }
// public static long divideUnsigned(long dividend, long divisor) {
// throw new Error("Method redefined away!");
// }
// public static long remainderUnsigned(long dividend, long divisor) {
// throw new Error("Method redefined away!");
// }
// public static final int SIZE = 64;
// public static final int BYTES = SIZE / Byte.SIZE;
// public static long max(long a, long b) {
// throw new Error("Method redefined away!");
// }
// public static long min(long a, long b) {
// throw new Error("Method redefined away!");
// }
// private static final long serialVersionUID = 0;
//
// /** @hide */
// @Override
// public Optional<? extends ConstantDesc> describeConstable() {
// throw new Error("Method redefined away!");
// }
//
// /** @hide */
// @Override
// public Object resolveConstantDesc(MethodHandles.Lookup lookup) {
// throw new Error("Method redefined away!");
// }
// }
private static final byte[] CLASS_BYTES = Base64.getDecoder().decode(
"yv66vgAAAD0AwQcAAgEADmphdmEvbGFuZy9Mb25nBwAEAQAOamF2YS9sYW5nL0J5dGUKAAYABwcA" +
"CAwACQAKAQAQamF2YS9sYW5nL051bWJlcgEABjxpbml0PgEAAygpVgkAAQAMDAANAA4BAAV2YWx1" +
"ZQEAAUoKAAEAEAwACQARAQAEKEopVgUAAAAAAAAACgcAFQEAF2phdmEvbGFuZy9TdHJpbmdCdWls" +
"ZGVyCgAUAAcIABgBACJSZWRlZmluZWQgTG9uZyEgdmFsdWUgKGFzIGRvdWJsZSk9CgAUABoMABsA" +
"HAEABmFwcGVuZAEALShMamF2YS9sYW5nL1N0cmluZzspTGphdmEvbGFuZy9TdHJpbmdCdWlsZGVy" +
"OwoAFAAeDAAbAB8BABwoRClMamF2YS9sYW5nL1N0cmluZ0J1aWxkZXI7CgAUACEMACIAIwEACHRv" +
"U3RyaW5nAQAUKClMamF2YS9sYW5nL1N0cmluZzsHACUBAA9qYXZhL2xhbmcvRXJyb3IIACcBABZN" +
"ZXRob2QgcmVkZWZpbmVkIGF3YXkhCgAkACkMAAkAKgEAFShMamF2YS9sYW5nL1N0cmluZzspVgoA" +
"AQAsDAAtAC4BAAljb21wYXJlVG8BABMoTGphdmEvbGFuZy9Mb25nOylJCgABADAMADEAMgEAE3Jl" +
"c29sdmVDb25zdGFudERlc2MBADkoTGphdmEvbGFuZy9pbnZva2UvTWV0aG9kSGFuZGxlcyR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QA2AAEAQgAAAAIAQwASAA0ADgAAABkARABFAAEAPgAAAAIARgAZ" +
"AEcARQABAD4AAAACAEgAGgBJAA4AAQA+AAAAAgA/AD0ACQBKAEsAAQBMAAAAOAAEAAQAAAAEHiBh" +
"rQAAAAIATQAAAAYAAQAAABAATgAAABYAAgAAAAQATwAOAAAAAAAEAFAADgACAAEACQARAAEATAAA" +
"AEYAAwADAAAACiq3AAUqH7UAC7EAAAACAE0AAAAOAAMAAAATAAQAFAAJABUATgAAABYAAgAAAAoA" +
"UQBSAAAAAAAKAA0ADgABAAkAUwBUAAEATAAAADMABAACAAAACbsAAVketwAPsAAAAAIATQAAAAYA" +
"AQAAABgATgAAAAwAAQAAAAkAVQAOAAAACQBWAFcAAQBMAAAALgAEAAIAAAAEHgphrQAAAAIATQAA" +
"AAYAAQAAABwATgAAAAwAAQAAAAQAWAAOAAAACQBZAFcAAQBMAAAALgAEAAIAAAAEHgplrQAAAAIA" +
"TQAAAAYAAQAAACAATgAAAAwAAQAAAAQAWAAOAAAACQBaAFsAAQBMAAAALwAEAAIAAAAFHh5hiKwA" +
"AAACAE0AAAAGAAEAAAAkAE4AAAAMAAEAAAAFAFgADgAAAAkAXABbAAEATAAAADEABQACAAAABx4e" +
"BH1/iKwAAAACAE0AAAAGAAEAAAAoAE4AAAAMAAEAAAAHAFgADgAAAAkAXQBbAAEATAAAACwAAQAC" +
"AAAAAgisAAAAAgBNAAAABgABAAAALABOAAAADAABAAAAAgBYAA4AAAAJAF4AXwABAEwAAAA2AAIA" +
"AwAAAAIerQAAAAIATQAAAAYAAQAAADAATgAAABYAAgAAAAIAWAAOAAAAAAACAGAARQACAAkAYQBf" +
"AAEATAAAADoABAADAAAABhQAEh5prQAAAAIATQAAAAYAAQAAADQATgAAABYAAgAAAAYAWAAOAAAA" +
"AAAGAGAARQACAAkAYgBXAAEATAAAAC0AAgACAAAAAx51rQAAAAIATQAAAAYAAQAAADgATgAAAAwA" +
"AQAAAAMAWAAOAAAACQBjAFsA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OAAAAAAAKAKoADgACAAkAqwBLAAEATAAAAD4AAwAEAAAACrsAJFkS" +
"JrcAKL8AAAACAE0AAAAGAAEAAAC9AE4AAAAWAAIAAAAKAKkADgAAAAAACgCqAA4AAgAJAKwASwAB" +
"AEwAAAA+AAMABAAAAAq7ACRZEia3ACi/AAAAAgBNAAAABgABAAAAwgBOAAAAFgACAAAACgBPAA4A" +
"AAAAAAoAUAAOAAIACQCtAEsAAQBMAAAAPgADAAQAAAAKuwAkWRImtwAovwAAAAIATQAAAAYAAQAA" +
"AMUATgAAABYAAgAAAAoATwAOAAAAAAAKAFAADgACAAEArgCvAAIATAAAADQAAwABAAAACrsAJFkS" +
"JrcAKL8AAAACAE0AAAAGAAEAAADMAE4AAAAMAAEAAAAKAFEAUgAAAEIAAAACALAAAQAxADIAAQBM" +
"AAAAPgADAAIAAAAKuwAkWRImtwAovwAAAAIATQAAAAYAAQAAANIATgAAABYAAgAAAAoAUQBSAAAA" +
"AAAKALEAsgABEEEALQCzAAEATAAAADMAAgACAAAACSorwAABtgArrAAAAAIATQAAAAYAAQAAAAkA" +
"TgAAAAwAAQAAAAkAUQBSAAAQQQAxALQAAgBMAAAAMAACAAIAAAAGKiu2AC+wAAAAAgBNAAAABgAB" +
"AAAACQBOAAAADAABAAAABgBRAFIAAACCAAAABAABALUACAC3AAoAAQBMAAAAIQABAAAAAAAFAbMA" +
"M7EAAAABAE0AAAAKAAIAAAAMAAQADQADAEIAAAACALgAuQAAAAIAugC7AAAACgABALwAvgDAABk="
);
private static final byte[] DEX_BYTES = Base64.getDecoder().decode(
"ZGV4CjAzNQCC6NqF6YcFy4KrMQ61yOakOSk9scYPTAY0GgAAcAAAAHhWNBIAAAAAAAAAAGQZAACI" +
"AAAAcAAAABwAAACQAgAAJQAAAAADAAAHAAAAvAQAAEMAAAD0BAAAAQAAAAwHAAAIEwAALAcAAH4Q" +
"AACCEAAAjBAAAJQQAACYEAAAmxAAAKIQAAClEAAAqBAAAKsQAACvEAAAtRAAAL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AA0EAAAEQAAAAQAAABAEAAAEgAAAAQAAABI" +
"EAAAFgAAAAsAAAD0DwAAGAAAAAsAAABAEAAAGQAAAAsAAABIEAAAGgAAAAsAAABQEAAAGwAAAAsA" +
"AABYEAAAGAAAAAsAAABgEAAAGAAAAA4AAABgEAAAFAAAABAAAAAAAAAAFgAAABAAAAD0DwAAFwAA" +
"ABAAAAAsEAAAFQAAABEAAABoEAAAGAAAABEAAABAEAAAFgAAABUAAAD0DwAAFAAAABYAAAAAAAAA" +
"NwAAABcAAAAAAAAAOgAAABgAAAAAAAAAOwAAABgAAAD0DwAAPAAAABgAAABwEAAAPQAAABgAAABA" +
"EAAAPwAAABkAAAAkEAAACwADAAUAAAALAAQAMwAAAAsABAA0AAAACwADADgAAAALAAgAOQAAAAsA" +
"BAB1AAAACwAEAIMAAAAKACMAAgAAAAsAIAABAAAACwAhAAIAAAALACMAAgAAAAsABABHAAAACwAA" +
"AEkAAAALAAcASgAAAAsACABLAAAACwAJAEsAAAALAAcATAAAAAsAEgBNAAAACwAeAE4AAAALAA0A" +
"UAAAAAsAAQBTAAAACwAkAFUAAAALAAIAVgAAAAsAIgBXAAAACwAFAFgAAAALAAYAWAAAAAsAEgBZ" +
"AAAACwAUAFkAAAALABUAWQAAAAsAAwBaAAAACwAEAFoAAAALAAsAWwAAAAsAAwBeAAAACwAKAGEA" +
"AAALAAsAYwAAAAsADQBkAAAACwANAGUAAAALAAQAZwAAAAsABABoAAAACwAOAGsAAAALAA8AawAA" +
"AAsAEABrAAAACwAOAGwAAAALAA8AbAAAAAsAEABsAAAACwANAG4AAAALABYAbwAAAAsAFwBvAAAA" +
"CwALAHAAAAALAAsAcQAAAAsADAByAAAACwAMAHMAAAALAB8AdwAAAAsABAB4AAAACwAEAHkAAAAL" +
"AA0AegAAAAsAGQB7AAAACwAZAHwAAAALABkAfQAAAAsAGAB+AAAACwAZAH4AAAALABoAfgAAAAsA" +
"HQB/AAAACwAZAIAAAAALABoAgAAAAAsAGgCBAAAACwARAIQAAAALABIAhAAAAAsAEwCEAAAADAAg" +
"AAIAAAARACAAAgAAABEAGwBEAAAAEQAcAEQAAAARABgAfgAAAAsAAAARAAAADAAAAOgPAAAyAAAA" +
"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" +
"JwAGAAQAAgAAAI8PAAAIAAAAIgAK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AADkGAAA" +
"AQAAAAwAAAAAAAAABAAAANwYAAADAAAAxBgAAAoAAADEGAAACwAAAMwYAAAgAAAAxBgAACEAAADE" +
"GAAAIgAAAMQYAAAjAAAAxBgAACQAAADEGAAAJQAAAMQYAAAoAAAA1BgAADwAAADEGAAAPQAAAMQY" +
"AAARAAAAAAAAAAEAAAAAAAAAAQAAAIgAAABwAAAAAgAAABwAAACQAgAAAwAAACUAAAAAAwAABAAA" +
"AAcAAAC8BAAABQAAAEMAAAD0BAAABgAAAAEAAAAMBwAAASAAAD0AAAAsBwAAAyAAADwAAACADgAA" +
"ARAAABAAAADoDwAAAiAAAIgAAAB+EAAABCAAAAUAAABlFwAAACAAAAEAAACmFwAABSAAAAEAAAC0" +
"GAAAAxAAAAYAAADAGAAABiAAAAEAAADsGAAAABAAAAEAAABkGQAA"
);
static class FuncCmp implements LongPredicate {
final String name;
final LongPredicate p;
public FuncCmp(String name, LongPredicate p) {
this.name = name;
this.p = p;
}
public boolean test(long l) {
return p.test(l);
}
}
static FuncCmp l2l(String name, final LongUnaryOperator a, final LongUnaryOperator b) {
return new FuncCmp(name, (v) -> a.applyAsLong(v) == b.applyAsLong(v));
}
static FuncCmp l2i(String name, final LongToIntFunction a, final LongToIntFunction b) {
return new FuncCmp(name, (v) -> a.applyAsInt(v) == b.applyAsInt(v));
}
/** Interface for a long, int -> long function. */
static interface LI2IFunction { public long applyToLongInt(long a, int b); }
static FuncCmp li2l(String name, final Random r, final LI2IFunction a, final LI2IFunction b) {
return new FuncCmp(name, new LongPredicate() {
public boolean test(long v) {
int i = r.nextInt();
return a.applyToLongInt(v, i) == b.applyToLongInt(v, i);
}
});
}
public static void main(String[] args) {
doTest(10000);
}
public static void doTest(int iters) {
// Just transform immediately.
doCommonClassRedefinition(Long.class, CLASS_BYTES, DEX_BYTES);
final Random r = new Random();
FuncCmp[] comps = new FuncCmp[] {
l2l("highestOneBit", Long::highestOneBit, RedefinedLongIntrinsics::highestOneBit),
l2l("lowestOneBit", Long::lowestOneBit, RedefinedLongIntrinsics::lowestOneBit),
l2i("numberOfLeadingZeros",
Long::numberOfLeadingZeros,
RedefinedLongIntrinsics::numberOfLeadingZeros),
l2i("numberOfTrailingZeros",
Long::numberOfTrailingZeros,
RedefinedLongIntrinsics::numberOfTrailingZeros),
l2i("bitCount", Long::bitCount, RedefinedLongIntrinsics::bitCount),
li2l("rotateLeft", r, Long::rotateLeft, RedefinedLongIntrinsics::rotateLeft),
li2l("rotateRight", r, Long::rotateRight, RedefinedLongIntrinsics::rotateRight),
l2l("reverse", Long::reverse, RedefinedLongIntrinsics::reverse),
l2i("signum", Long::signum, RedefinedLongIntrinsics::signum),
l2l("reverseBytes", Long::reverseBytes, RedefinedLongIntrinsics::reverseBytes),
};
for (FuncCmp f : comps) {
// Just actually use ints so we can cast them back int the tests to print them (since we
// deleted a bunch of the Long methods needed for printing longs)!
int failures = (int)r.ints(iters)
.mapToLong((v) -> (long)v)
.filter(f.negate()) // Get all the test cases that failed.
.count();
if (failures != 0) {
double percent = 100.0d*((double)failures/(double)iters);
System.out.println("for intrinsic " + f.name + " " + failures + "/" + iters
+ " (" + Double.toString(percent) + "%) tests failed!");
}
}
System.out.println("Finished!");
}
}