Thread: [Fb-contrib-commit] SF.net SVN: fb-contrib:[1528] trunk/fb-contrib/samples/PCAIL_Sample.java
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2010-04-04 06:27:03
|
Revision: 1528
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1528&view=rev
Author: dbrosius
Date: 2010-04-04 06:26:57 +0000 (Sun, 04 Apr 2010)
Log Message:
-----------
add test case for PossibleConstantAllocationInLoop
Added Paths:
-----------
trunk/fb-contrib/samples/PCAIL_Sample.java
Added: trunk/fb-contrib/samples/PCAIL_Sample.java
===================================================================
--- trunk/fb-contrib/samples/PCAIL_Sample.java (rev 0)
+++ trunk/fb-contrib/samples/PCAIL_Sample.java 2010-04-04 06:26:57 UTC (rev 1528)
@@ -0,0 +1,62 @@
+import java.net.URL;
+
+
+public class PCAIL_Sample
+{
+ PCAIL_Sample smpl;
+
+ public void testBasicCase()
+ {
+ for (int i = 0; i < 10; i++)
+ {
+ PCAIL_Sample sample = new PCAIL_Sample();
+ URL u = sample.getClass().getResource("/foo");
+ }
+ }
+
+ public void fpPutField()
+ {
+ for (int i = 0; i < 10; i++)
+ {
+ PCAIL_Sample sample = new PCAIL_Sample();
+ URL u = sample.getClass().getResource("/foo");
+ if (i == 0)
+ smpl = sample;
+ }
+ }
+
+ public void fpTwoRegs()
+ {
+ for (int i = 0; i < 10; i++)
+ {
+ PCAIL_Sample sample = new PCAIL_Sample();
+ URL u = sample.getClass().getResource("/foo");
+ PCAIL_Sample s2 = sample;
+ }
+ }
+
+ public PCAIL_Sample fpReturnAlloc()
+ {
+ for (int i = 0; i < 10; i++)
+ {
+ PCAIL_Sample sample = new PCAIL_Sample();
+ URL u = sample.getClass().getResource("/foo");
+ if (u != null)
+ return sample;
+ }
+
+ return null;
+ }
+
+ public void fpMethodParm()
+ {
+ for (int i = 0; i < 10; i++)
+ {
+ PCAIL_Sample sample = new PCAIL_Sample();
+ if (sample.equals(sample))
+ {
+ return;
+ }
+ }
+ }
+}
Property changes on: trunk/fb-contrib/samples/PCAIL_Sample.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2010-04-04 06:53:54
|
Revision: 1530
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1530&view=rev
Author: dbrosius
Date: 2010-04-04 06:53:48 +0000 (Sun, 04 Apr 2010)
Log Message:
-----------
add fp for array stores
Modified Paths:
--------------
trunk/fb-contrib/samples/PCAIL_Sample.java
Modified: trunk/fb-contrib/samples/PCAIL_Sample.java
===================================================================
--- trunk/fb-contrib/samples/PCAIL_Sample.java 2010-04-04 06:30:22 UTC (rev 1529)
+++ trunk/fb-contrib/samples/PCAIL_Sample.java 2010-04-04 06:53:48 UTC (rev 1530)
@@ -59,4 +59,11 @@
}
}
}
+
+ public void fpArrayStore()
+ {
+ PCAIL_Sample[] samples = new PCAIL_Sample[3];
+ for (int i = 0; i < 3; i++)
+ samples[i] = new PCAIL_Sample();
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2010-04-04 08:12:38
|
Revision: 1537
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1537&view=rev
Author: dbrosius
Date: 2010-04-04 08:12:31 +0000 (Sun, 04 Apr 2010)
Log Message:
-----------
add test for throw fp
Modified Paths:
--------------
trunk/fb-contrib/samples/PCAIL_Sample.java
Modified: trunk/fb-contrib/samples/PCAIL_Sample.java
===================================================================
--- trunk/fb-contrib/samples/PCAIL_Sample.java 2010-04-04 08:03:04 UTC (rev 1536)
+++ trunk/fb-contrib/samples/PCAIL_Sample.java 2010-04-04 08:12:31 UTC (rev 1537)
@@ -66,4 +66,13 @@
for (int i = 0; i < 3; i++)
samples[i] = new PCAIL_Sample();
}
+
+ public void fpThrow()
+ {
+ for (int i = 0; i < 3; i++)
+ {
+ if (i == 3)
+ throw new RuntimeException();
+ }
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2010-04-04 08:27:31
|
Revision: 1540
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1540&view=rev
Author: dbrosius
Date: 2010-04-04 08:27:25 +0000 (Sun, 04 Apr 2010)
Log Message:
-----------
add fp based on two assigns to the same reg
Modified Paths:
--------------
trunk/fb-contrib/samples/PCAIL_Sample.java
Modified: trunk/fb-contrib/samples/PCAIL_Sample.java
===================================================================
--- trunk/fb-contrib/samples/PCAIL_Sample.java 2010-04-04 08:21:52 UTC (rev 1539)
+++ trunk/fb-contrib/samples/PCAIL_Sample.java 2010-04-04 08:27:25 UTC (rev 1540)
@@ -1,4 +1,7 @@
import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.TreeSet;
public class PCAIL_Sample
@@ -75,4 +78,19 @@
throw new RuntimeException();
}
}
+
+ public void fpTwoAssigns()
+ {
+ for (int i = 0; i < 10; i++)
+ {
+ Set<String> s;
+
+ if ((i % 2) == 0)
+ s = new HashSet<String>();
+ else
+ s = new TreeSet<String>();
+
+ s.add(String.valueOf(i));
+ }
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2011-06-04 05:21:56
|
Revision: 1670
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1670&view=rev
Author: dbrosius
Date: 2011-06-04 05:21:49 +0000 (Sat, 04 Jun 2011)
Log Message:
-----------
add fp from ID: 3309113
Modified Paths:
--------------
trunk/fb-contrib/samples/PCAIL_Sample.java
Modified: trunk/fb-contrib/samples/PCAIL_Sample.java
===================================================================
--- trunk/fb-contrib/samples/PCAIL_Sample.java 2011-06-04 04:45:20 UTC (rev 1669)
+++ trunk/fb-contrib/samples/PCAIL_Sample.java 2011-06-04 05:21:49 UTC (rev 1670)
@@ -1,5 +1,7 @@
import java.net.URL;
+import java.util.ArrayList;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
import java.util.TreeSet;
@@ -93,4 +95,21 @@
s.add(String.valueOf(i));
}
}
+
+ public void fpChaining()
+ {
+ List<Foo> list = new ArrayList<Foo>();
+ for (int i = 0; i<= 10; i++)
+ {
+ list.add(new Foo().withNumber(i));
+ }
+ }
+
+ class Foo
+ {
+ public Foo withNumber(int i)
+ {
+ return this;
+ }
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dbr...@us...> - 2011-06-04 05:49:29
|
Revision: 1672
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1672&view=rev
Author: dbrosius
Date: 2011-06-04 05:49:23 +0000 (Sat, 04 Jun 2011)
Log Message:
-----------
PCAIL class can't be an inner class (with reference)
Modified Paths:
--------------
trunk/fb-contrib/samples/PCAIL_Sample.java
Modified: trunk/fb-contrib/samples/PCAIL_Sample.java
===================================================================
--- trunk/fb-contrib/samples/PCAIL_Sample.java 2011-06-04 05:30:56 UTC (rev 1671)
+++ trunk/fb-contrib/samples/PCAIL_Sample.java 2011-06-04 05:49:23 UTC (rev 1672)
@@ -105,7 +105,7 @@
}
}
- class Foo
+ static class Foo
{
public Foo withNumber(int i)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|