BytecodeAnalysis: force purity of enum.ordinal() and array.clone()

This commit is contained in:
Tagir Valeev
2018-01-15 16:20:11 +07:00
parent 9a4239100b
commit b414748d24
10 changed files with 90 additions and 8 deletions

View File

@@ -453,6 +453,11 @@
<item name='java.io.ObjectInputStream java.lang.Enum readEnum(boolean)'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
<item name='java.io.ObjectInputStream java.lang.Object cloneArray(java.lang.Object)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='java.io.ObjectInputStream java.lang.Object cloneArray(java.lang.Object) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -1710,6 +1710,11 @@
<item name='java.lang.invoke.MethodType java.lang.Class&lt;?&gt;[] listToArray(java.util.List&lt;java.lang.Class&lt;?&gt;&gt;) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='java.lang.invoke.MethodType java.lang.Class&lt;?&gt;[] parameterArray()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='java.lang.invoke.MethodType java.lang.Class&lt;?&gt;[] ptypes()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
@@ -1806,6 +1811,9 @@
</annotation>
</item>
<item name='java.lang.invoke.MethodType java.util.List&lt;java.lang.Class&lt;?&gt;&gt; parameterList()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='java.lang.invoke.MethodType void MethodType_init(java.lang.Class&lt;?&gt;, java.lang.Class&lt;?&gt;[]) 0'>

View File

@@ -1225,6 +1225,11 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='java.util.Arrays.ArrayList java.lang.Object[] toArray()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='java.util.Arrays.LegacyMergeSort LegacyMergeSort()'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>

View File

@@ -66,6 +66,11 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='java.util.concurrent.atomic.AtomicIntegerArray AtomicIntegerArray(int[])'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='java.util.concurrent.atomic.AtomicIntegerArray AtomicIntegerArray(int[]) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
@@ -179,6 +184,11 @@
<val name="pure" val="true"/>
</annotation>
</item>
<item name='java.util.concurrent.atomic.AtomicLongArray AtomicLongArray(long[])'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="pure" val="true"/>
</annotation>
</item>
<item name='java.util.concurrent.atomic.AtomicLongArray AtomicLongArray(long[]) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>