Merge remote-tracking branch 'origin/master' into IAnalysisCacheView
This commit is contained in:
commit
d95b6e33f0
|
@ -167,7 +167,7 @@
|
|||
<param name="destdir" value="${temp.folder}/dalvik/@dot"/>
|
||||
<param name="jsv" value="1.6"/>
|
||||
<param name="jtv" value="1.6"/>
|
||||
<param name="excludes" value="**/bak/,**/SortingExample.java,defaultMethods/*.java,special/A.java,annotations/TypeAnnotatedClass*.java, annotations/TypeAnnotationTypeUse.java"/>
|
||||
<param name="excludes" value="**/bak/,**/SortingExample.java,defaultMethods/*.java,special/A.java,bug144/A.java,annotations/TypeAnnotatedClass*.java, annotations/TypeAnnotationTypeUse.java"/>
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package bug144;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class A {
|
||||
void m() {
|
||||
Set<Object> set = new HashSet<>();
|
||||
Stream<Object> stream = set.parallelStream();
|
||||
stream.sorted();
|
||||
stream.collect(Collectors.toList()); // this call forces the error.
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
new A().m();
|
||||
}
|
||||
}
|
|
@ -41,7 +41,17 @@ import com.ibm.wala.util.strings.Atom;
|
|||
*/
|
||||
public class LambdaTest extends WalaTestCase {
|
||||
|
||||
@Test public void testStreamExample_137() throws IOException, ClassHierarchyException, IllegalArgumentException, CancelException {
|
||||
@Test public void testBug144() throws IOException, ClassHierarchyException, IllegalArgumentException, CancelException {
|
||||
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.WALA_TESTDATA, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
|
||||
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha,
|
||||
"Lbug144/A");
|
||||
AnalysisOptions options = CallGraphTestUtil.makeAnalysisOptions(scope, entrypoints);
|
||||
|
||||
CallGraph cg = CallGraphTestUtil.buildZeroCFA(options, new AnalysisCacheImpl(), cha, scope, false);
|
||||
}
|
||||
|
||||
@Test public void testBug137() throws IOException, ClassHierarchyException, IllegalArgumentException, CancelException {
|
||||
AnalysisScope scope = CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.WALA_TESTDATA, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
||||
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
|
||||
Iterable<Entrypoint> entrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha,
|
||||
|
|
|
@ -276,13 +276,14 @@ public class LambdaSummaryClass extends SyntheticClass {
|
|||
for(int i = isNew? 1: 0; i < invoke.getNumberOfParameters(); i++) {
|
||||
params[i] = args + i + 1;
|
||||
}
|
||||
for(int n = 2, i = invoke.getNumberOfParameters(); i < numParams; i++) {
|
||||
int n = 2;
|
||||
for(int i = invoke.getNumberOfParameters(); i < numParams; i++) {
|
||||
params[i] = n++;
|
||||
}
|
||||
|
||||
if (isNew) {
|
||||
v++;
|
||||
summary.addStatement(insts.NewInstruction(inst++, new_v=v++, NewSiteReference.make(inst, callee.getDeclaringClass())));
|
||||
//v++;
|
||||
summary.addStatement(insts.NewInstruction(inst++, new_v=n++, NewSiteReference.make(inst, callee.getDeclaringClass())));
|
||||
params[0] = new_v;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue