[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.
|