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;
29 static Voo getAVoo( Voo bogus ) {
47 public void doTheBaw( Voo v ) { v = new Voo(); }
61 public void ruinSomeFoos( Foo a, Foo b ) {
65 static public void aStaticMethod( Foo p0, Foo p1 ) {
77 static public void m1_( Foo p0 ) {
86 static public void m2_( Foo p0 ) {
93 static public void m3_( Foo p0 ) {
100 static public void m4_( Foo p0 ) {
104 static public void m5_( Foo p0 ) {
110 static public void m6_( Foo p0, Foo p1 ) {
125 static public void m7_( Foo p0, Foo p1 ) {
141 static public void m8_( Foo p0, Foo p1 ) {
160 // this empty task should still create a non-empty
161 // ownership graph showing parameter allocation
162 // look for the parameter s as a label referencing
163 // a heap region that is multi-object, flagged, not summary
164 task Startup( StartupObject s{ initialstate } ) {
165 taskexit( s{ !initialstate } );
169 task NewObjectA( Foo a{ f }, Foo b{ f } ) {
177 taskexit( a{ !f }, b{ !f } );
180 task NewObjectB( Foo a{ f }, Foo b{ f } ) {
188 taskexit( a{ !f }, b{ !f } );
193 task NewObjectC( Foo a{ f }, Foo b{ f } ) {
208 taskexit( a{ !f }, b{ !f } );
213 task forMethod( Foo p0{ f } ) {
230 taskexit( p0{ !f } );
236 // this task allocates a new object, so there should
237 // be a heap region for the parameter, and several
238 // heap regions for the allocation site, but the label
239 // merely points to the newest region
240 task NewObjectInMethod( Voo v{ f } ) {
249 task ClobberInitParamReflex( Voo v{ f }, Voo w{ f } ) {
252 taskexit( v{ !f }, w{ !f } );
256 task BackToItself( Parameter p0{ w } ) {
258 Penguin p = new Penguin();
263 Parameter p1 = new Parameter();
265 Penguin q = new Penguin();
270 taskexit( p0{ !w } );
274 task SummaryNodeTokens( Foo p0{ f } ) {
289 taskexit( p0{ !f } );
293 task strongUpdates( Foo p0{ f } ) {
306 // this should effect a strong update
318 // p0 points to a multiple-object heap region
319 // so this should not make a strong update
322 taskexit( p0{ !f } );
326 task methodTest( Foo p0{ f } ) {
339 //Foo temp = new Foo();
354 // Foo.test( a0, a1 );
356 taskexit( p0{ !f } );
361 task getNewFromMethod( Foo p0{ f } ) {
362 Voo g = Voo.getAVoo( null );
364 taskexit( p0{ !f } );
368 task methodTest01_( Foo p0{ f }, Foo p1{ f } ) {
370 Foo a0before = new Foo();
372 a0before.x = new Foo();
374 a0before.x = new Foo();
377 Foo a0after = new Foo();
379 a0after.x = new Foo();
381 a0after.x = new Foo();
387 taskexit( p0{ !f }, p1{ !f } );
391 task methodTest02_( Foo p0{ f }, Foo p1{ f } ) {
393 Foo a0before = new Foo();
395 a0before.x = new Foo();
397 a0before.x = new Foo();
400 Foo a0after = new Foo();
402 a0after.x = new Foo();
404 a0after.x = new Foo();
410 taskexit( p0{ !f }, p1{ !f } );
414 task methodTest03_( Foo p0{ f }, Foo p1{ f } ) {
416 Foo a0before = new Foo();
418 a0before.x = new Foo();
420 a0before.x = new Foo();
423 Foo a0after = new Foo();
425 a0after.x = new Foo();
427 a0after.x = new Foo();
433 taskexit( p0{ !f }, p1{ !f } );
437 task methodTest04_( Foo p0{ f }, Foo p1{ f } ) {
439 Foo a0before = new Foo();
441 a0before.x = new Foo();
443 a0before.x = new Foo();
446 Foo a0after = new Foo();
448 a0after.x = new Foo();
450 a0after.x = new Foo();
456 taskexit( p0{ !f }, p1{ !f } );
460 task methodTest05_( Foo p0{ f }, Foo p1{ f } ) {
462 Foo a0before = new Foo();
464 a0before.x = new Foo();
466 a0before.x = new Foo();
469 Foo a0after = new Foo();
471 a0after.x = new Foo();
473 a0after.x = new Foo();
479 taskexit( p0{ !f }, p1{ !f } );
483 task methodTest06_( Foo p0{ f }, Foo p1{ f } ) {
485 Foo a0before = new Foo();
487 a0before.x = new Foo();
489 a0before.x = new Foo();
492 Foo a0after = new Foo();
494 a0after.x = new Foo();
496 a0after.x = new Foo();
499 Foo a1before = new Foo();
501 a1before.x = new Foo();
503 a1before.x = new Foo();
506 Foo a1after = new Foo();
508 a1after.x = new Foo();
510 a1after.x = new Foo();
513 Foo.m6_( a0after, a1after );
516 taskexit( p0{ !f }, p1{ !f } );
520 task methodTest07_( Foo p0{ f }, Foo p1{ f } ) {
522 Foo a0before = new Foo();
524 a0before.x = new Foo();
526 a0before.x = new Foo();
529 Foo a0after = new Foo();
531 a0after.x = new Foo();
533 a0after.x = new Foo();
536 Foo a1before = new Foo();
538 a1before.x = new Foo();
540 a1before.x = new Foo();
543 Foo a1after = new Foo();
545 a1after.x = new Foo();
547 a1after.x = new Foo();
550 Foo.m7_( a0after, a1after );
553 taskexit( p0{ !f }, p1{ !f } );
557 task methodTest08_( Foo p0{ f }, Foo p1{ f } ) {
559 Foo a0before = new Foo();
561 a0before.x = new Foo();
563 a0before.x = new Foo();
566 Foo a0after = new Foo();
568 a0after.x = new Foo();
570 a0after.x = new Foo();
573 Foo a1before = new Foo();
575 a1before.x = new Foo();
577 a1before.x = new Foo();
580 Foo a1after = new Foo();
582 a1after.x = new Foo();
584 a1after.x = new Foo();
587 Foo.m8_( a0after, a1after );
590 taskexit( p0{ !f }, p1{ !f } );