mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
792684b935
This is a bunch of commits squashed into one per Josh's request. add dynamicTable field add invokedynamic instruction add defaultDynamic bootimage field add dummy invokedynamic support in bootimage-generator add defaultDynamic thunk check dynamicTable offset comment defaultDynamicThunk to fix unused function comment defaultDynamicThunk to fix unused function add dynamicTable / dynamicIndex stuff comment dynamicIndex and dynamicTable add invokedynamic instruction impl stub out addDynamic unstub addDynamic don't allow tail calls in invokedynamic implement stub JVM_GetTemporaryDirectory method (build broken) begin add InvokeDynamicTest Revert "(build broken) begin add InvokeDynamicTest" This reverts commit 77f9c54e32ac66d0803eeab93e4a10d3541987a8. add InternalError add URLClassPath.c for openjdk-src builds implement stub JVM_KnownToNotExist and JVM_GetResourceLookupCache methods intercept open0 / open for openjdk add basic java/lang/invoke stubs remove non-public java/lang/invoke classes fix invokedynamic example building <wip debugging>
44 lines
1.8 KiB
Bash
44 lines
1.8 KiB
Bash
#!/bin/bash
|
|
|
|
unzip -l /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/rt.jar | \
|
|
grep java/lang/invoke | \
|
|
grep -E '\$' | \
|
|
awk '{print $4}' | \
|
|
sed -E -e 's/\.class//g' | \
|
|
while read path; do
|
|
echo $path
|
|
name=$(echo $path | sed -e 's|/|.|g')
|
|
|
|
if javap -public $name | grep -q "public.*interface"; then
|
|
javap -public $name | grep -v "Compiled from" | \
|
|
sed -E \
|
|
-e 's/java.lang.invoke.//g' \
|
|
-e 's/java.lang.Object/Object o/g' \
|
|
-e 's/java.lang.reflect.Method/Method o/g' \
|
|
-e 's/java.lang.String/String s/g' \
|
|
-e 's/java.lang.Throwable/Throwable/g' \
|
|
-e 's/int/int i/g' \
|
|
-e 's/byte/byte b/g' \
|
|
-e 's/boolean/boolean b/g' \
|
|
-e 's/MethodType/MethodType mt/g' \
|
|
-e 's/MethodHandle/MethodHandle mh/g' \
|
|
-e 's/java.lang.Class\<\?\>/Class\<\?\> c/g' \
|
|
-e 's/;/ { throw new RuntimeException(); }/g' \
|
|
-e 's/public String s/public String/g' \
|
|
-e 's/public static String s/public static String/g' \
|
|
-e 's/public abstract MethodHandle mh/public abstract MethodHandle/g' \
|
|
-e 's/public abstract MethodHandle mh/public abstract MethodHandle/g' \
|
|
-e 's/public boolean b/public boolean/g' \
|
|
-e 's/public int i/public int/g' \
|
|
-e 's/public static final int i/public static final int/g' \
|
|
-e 's/public byte b/public byte/g' \
|
|
-e 's/public Object o/public Object/g' \
|
|
-e 's/public MethodType mt/public MethodType/g' \
|
|
-e 's/public MethodHandle mh/public MethodHandle/g' \
|
|
-e 's/Object o\.\.\./Object... o/g' \
|
|
-e 's/public final native Object o/public final native Object/g' \
|
|
-e 's/public Class<?> c/public Class<?>/g' \
|
|
> classpath/${path}.java
|
|
fi
|
|
done
|