2 public class Parameter {
9 public Parameter() { a = 0; b = 0; f = null; g = null; }
11 public void bar() { foo(); }
12 public void foo() { bar(); }
15 public class Penguin {
19 public Penguin() { x = 0; y = 0; }
21 public void bar() { x = 1; }
25 flag f; int x; Baw b; Baw bb;
36 public void doTheBaw( Voo v ) { v = new Voo(); }
49 public void ruinSomeFoos( Foo a, Foo b ) {
53 static public void aStaticMethod( Foo p0, Foo p1 ) {
67 // this empty task should still create a non-empty
68 // ownership graph showing parameter allocation
69 // look for the parameter s as a label referencing
70 // a heap region that is multi-object, flagged, not summary
71 task Startup( StartupObject s{ initialstate } ) {
72 taskexit( s{ !initialstate } );
76 task NewObjectA( Foo a{ f }, Foo b{ f } ) {
84 taskexit( a{ !f }, b{ !f } );
87 task NewObjectB( Foo a{ f }, Foo b{ f } ) {
95 taskexit( a{ !f }, b{ !f } );
100 task NewObjectC( Foo a{ f }, Foo b{ f } ) {
115 taskexit( a{ !f }, b{ !f } );
120 task forMethod( Foo p0{ f } ) {
137 taskexit( p0{ !f } );
143 // this task allocates a new object, so there should
144 // be a heap region for the parameter, and several
145 // heap regions for the allocation site, but the label
146 // merely points to the newest region
147 task NewObjectInMethod( Voo v{ f } ) {
156 task ClobberInitParamReflex( Voo v{ f }, Voo w{ f } ) {
159 taskexit( v{ !f }, w{ !f } );
163 task BackToItself( Parameter p0{ w } ) {
165 Penguin p = new Penguin();
170 Parameter p1 = new Parameter();
172 Penguin q = new Penguin();
177 taskexit( p0{ !w } );
181 task SummaryNodeTokens( Foo p0{ f } ) {
196 taskexit( p0{ !f } );
200 task strongUpdates( Foo p0{ f } ) {
213 // this should effect a strong update
225 // p0 points to a multiple-object heap region
226 // so this should not make a strong update
229 taskexit( p0{ !f } );
233 task methodTest( Foo p0{ f } ) {
246 //Foo temp = new Foo();
261 // Foo.test( a0, a1 );
263 taskexit( p0{ !f } );