From ac745e4fc2380a7bedef408c2d510cb3808251d2 Mon Sep 17 00:00:00 2001 From: jjenista Date: Thu, 9 Oct 2008 21:58:36 +0000 Subject: [PATCH] Added specific method call improvement test case for global sweep --- .../OwnershipAnalysisTest/test02/test02.java | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/Robust/src/Tests/OwnershipAnalysisTest/test02/test02.java b/Robust/src/Tests/OwnershipAnalysisTest/test02/test02.java index ae7d234f..acea48cd 100644 --- a/Robust/src/Tests/OwnershipAnalysisTest/test02/test02.java +++ b/Robust/src/Tests/OwnershipAnalysisTest/test02/test02.java @@ -51,6 +51,37 @@ public class Foo { } } +public class Zub { + flag q; + public Zub() {} + public Fub f; + public Zod z; + + public void addStuff() { + f = new Fub(); + z.h = new Hod(); + } +} + +public class Zod { + flag r; + public Zod() {} + public Hod h; +} + +public class Fub { public Fub() {} } +public class Hod { public Hod() {} } + +task improveMethodCallWithGlobal( Parameter notUsed{w} ) { + + Zub a0 = new Zub(); + a0.z = new Zod(); + a0.addStuff(); + + taskexit( notUsed{!w} ); +} + + task Startup( StartupObject s{ initialstate } ) { /* @@ -74,7 +105,7 @@ task Startup( StartupObject s{ initialstate } ) { taskexit( s{ !initialstate } ); } - +/* task aliasFromObjectAssignment ( Parameter p1{!w}, Parameter p2{!w} ) { @@ -254,3 +285,4 @@ task AliasNewToNew( Voo v{ f }, Voo w{ f } ) { taskexit( v{ !f }, w{ !f } ); } +*/ -- 2.34.1