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(); }
46 public void ruinSomeFoos( Foo a, Foo b ) {
51 static public void test( Foo p0, Foo p1 ) {
65 // this empty task should still create a non-empty
66 // ownership graph showing parameter allocation
67 // look for the parameter s as a label referencing
68 // a heap region that is multi-object, flagged, not summary
69 task Startup( StartupObject s{ initialstate } ) {
105 // to look like Foo a above
117 taskexit( s{ !initialstate } );
121 task basics( Foo p0{ f }, Foo p1{ f } ) {
136 taskexit( p0{ !f }, p1{ !f } );
140 task methodTest( Foo p0{ f } ) {
153 //Foo temp = new Foo();
168 // Foo.test( a0, a1 );
170 taskexit( p0{ !f } );
177 task NewObject( Foo a{ f }, Foo b{ f } ) {
183 taskexit( a{ !f }, b{ !f } );
188 task NewObjectA( Foo a{ f }, Foo b{ f } ) {
196 taskexit( a{ !f }, b{ !f } );
199 task NewObjectB( Foo a{ f }, Foo b{ f } ) {
207 taskexit( a{ !f }, b{ !f } );
212 task NewObject2( Foo a{ f }, Foo b{ f } ) {
221 taskexit( a{ !f }, b{ !f } );
227 // this task allocates a new object, so there should
228 // be a heap region for the parameter, and several
229 // heap regions for the allocation site, but the label
230 // merely points to the newest region
231 task NewObject( Voo v{ f } ) {
241 task Branch( Voo v{ f } ) {
256 task NoAliasNewInLoop( Voo v{ f } ) {
258 for( int i = 0; i < 10; ++i ) {
268 task NoAliasNewInLoopAnotherWay( Voo v{ f } ) {
270 for( int i = 0; i < 10; ++i ) {
283 task ClobberInitParamReflex( Voo v{ f }, Voo w{ f } ) {
286 taskexit( v{ !f }, w{ !f } );