2 public class Parameter {
8 public Parameter() { a = 0; b = 0; f = null; g = null; }
10 public void bar() { foo(); }
11 public void foo() { bar(); }
14 public class Penguin {
17 public Penguin() { x = 0; y = 0; }
19 public void bar() { x = 1; }
23 flag f; int x; Baw b; Baw bb;
34 public void doTheBaw( Voo v ) { v = new Voo(); }
45 public void ruinSomeFoos( Foo a, Foo b ) {
49 static public void test( Foo p0, Foo p1 ) {
62 // this empty task should still create a non-empty
63 // ownership graph showing parameter allocation
64 // look for the parameter s as a label referencing
65 // a heap region that is multi-object, flagged, not summary
66 task Startup( StartupObject s{ initialstate } ) {
102 // to look like Foo a above
121 taskexit( s{ !initialstate } );
125 task methodTest( Foo p0{ f } ) {
144 taskexit( p0{ !f } );
148 task NewObject( Foo a{ f }, Foo b{ f } ) {
154 taskexit( a{ !f }, b{ !f } );
159 task NewObjectA( Foo a{ f }, Foo b{ f } ) {
167 taskexit( a{ !f }, b{ !f } );
170 task NewObjectB( Foo a{ f }, Foo b{ f } ) {
178 taskexit( a{ !f }, b{ !f } );
183 task NewObject2( Foo a{ f }, Foo b{ f } ) {
192 taskexit( a{ !f }, b{ !f } );
198 // this task allocates a new object, so there should
199 // be a heap region for the parameter, and several
200 // heap regions for the allocation site, but the label
201 // merely points to the newest region
202 task NewObject( Voo v{ f } ) {
212 task Branch( Voo v{ f } ) {
227 task NoAliasNewInLoop( Voo v{ f } ) {
229 for( int i = 0; i < 10; ++i ) {
239 task NoAliasNewInLoopAnotherWay( Voo v{ f } ) {
241 for( int i = 0; i < 10; ++i ) {
254 task ClobberInitParamReflex( Voo v{ f }, Voo w{ f } ) {
257 taskexit( v{ !f }, w{ !f } );