1 public class Parameter {
7 public Parameter() { a = 0; b = 0; f = null; g = null; }
9 public void bar() { foo(); }
10 public void foo() { bar(); }
13 public class Penguin {
16 public Penguin() { x = 0; y = 0; }
18 public void bar() { x = 1; }
22 flag f; int x; Baw b; Baw bb;
33 public void doTheBaw( Voo v ) { v = new Voo(); }
44 public void ruinSomeFoos( Foo a, Foo b ) {
48 static public void aStaticMethod( Foo p0, Foo p1 ) {
61 // this empty task should still create a non-empty
62 // ownership graph showing parameter allocation
63 // look for the parameter s as a label referencing
64 // a heap region that is multi-object, flagged, not summary
65 task Startup( StartupObject s{ initialstate } ) {
66 taskexit( s{ !initialstate } );
70 task NewObjectA( Foo a{ f }, Foo b{ f } ) {
78 taskexit( a{ !f }, b{ !f } );
81 task NewObjectB( Foo a{ f }, Foo b{ f } ) {
89 taskexit( a{ !f }, b{ !f } );
92 task NewObjectC( Foo a{ f }, Foo b{ f } ) {
101 taskexit( a{ !f }, b{ !f } );
107 // this task allocates a new object, so there should
108 // be a heap region for the parameter, and several
109 // heap regions for the allocation site, but the label
110 // merely points to the newest region
111 task NewObjectInMethod( Voo v{ f } ) {
120 task ClobberInitParamReflex( Voo v{ f }, Voo w{ f } ) {
123 taskexit( v{ !f }, w{ !f } );
127 task SummaryNodeTokens( Foo p0{ f } ) {
142 taskexit( p0{ !f } );
146 task strongUpdates( Foo p0{ f } ) {
159 // this should effect a strong update
171 // p0 points to a multiple-object heap region
172 // so this should not make a strong update
175 taskexit( p0{ !f } );
179 task methodTest( Foo p0{ f } ) {
192 //Foo temp = new Foo();
207 // Foo.test( a0, a1 );
209 taskexit( p0{ !f } );