2 public class Parameter {
13 public void bar() { foo(); }
14 public void foo() { bar(); }
16 static public void proof( Fooz p0, Fooz p1 ) {
31 public class Penguin {
36 public Penguin() { x = 0; y = 0; }
38 public void bar() { x = 1; }
42 flag f; int x; Baw b; Baw bb;
46 static Voo getAVoo( Voo bogus ) {
65 public void doTheBaw( Voo v ) { v = new Voo(); }
79 public Foo getAFoo() {
83 public Foo newFooChain( Foo a ) {
89 public void ruinSomeFoos( Foo a, Foo b ) {
93 static public void aStaticMethod( Foo p0, Foo p1 ) {
104 static public void m1_( Foo p0 ) {
112 static public void m2_( Foo p0 ) {
119 static public void m3_( Foo p0 ) {
126 static public void m4_( Foo p0 ) {
130 static public void m5_( Foo p0 ) {
136 static public void m6_( Foo p0, Foo p1 ) {
151 static public void m7_( Foo p0, Foo p1 ) {
167 static public void m8_( Foo p0, Foo p1 ) {
183 static public void m9_( Foo p0, Foo p1 ) {
193 // this empty task should still create a non-empty
194 // ownership graph showing parameter allocation
195 // look for the parameter s as a label referencing
196 // a heap region that is multi-object, flagged, not summary
197 task Startup( StartupObject s{ initialstate } ) {
199 //Parameter p0 = new Parameter();
203 Parameter.proof( null, null );
205 taskexit( s{ !initialstate } );
210 task NewObjectA( Foo a{ f }, Foo b{ f } ) {
218 taskexit( a{ !f }, b{ !f } );
222 task NewObjectB( Foo a{ f }, Foo b{ f } ) {
230 taskexit( a{ !f }, b{ !f } );
234 task NewObjectC( Foo a{ f }, Foo b{ f } ) {
249 taskexit( a{ !f }, b{ !f } );
253 task forMethod( Foo p0{ f } ) {
270 taskexit( p0{ !f } );
274 // this task allocates a new object, so there should
275 // be a heap region for the parameter, and several
276 // heap regions for the allocation site, but the label
277 // merely points to the newest region
278 task NewObjectInMethod( Voo v{ f } ) {
287 task ClobberInitParamReflex( Voo v{ f }, Voo w{ f } ) {
290 taskexit( v{ !f }, w{ !f } );
294 task BackToItself( Parameter p0{ w } ) {
296 Penguin p = new Penguin();
301 Parameter p1 = new Parameter();
303 Penguin q = new Penguin();
308 taskexit( p0{ !w } );
312 task SummaryNodeTokens( Foo p0{ f } ) {
327 taskexit( p0{ !f } );
331 task strongUpdates( Foo p0{ f } ) {
344 // this should effect a strong update
356 // p0 points to a multiple-object heap region
357 // so this should not make a strong update
360 taskexit( p0{ !f } );
364 task ObjectChainByMethodCalls( Foo a{ f } ) {
367 Foo g = a.newFooChain( f );
374 task arrayAssignments( Foo a{ f } ) {
376 Foo f[] = new Foo[3];
393 public static void FooToBaw( Baw x, Foo y ) {
398 task showPrunedEdgesInMethodCall( Foo a{ f } ) {
409 Zool.FooToBaw( c, b );
414 task showStringIsImmutable( Foo a{ f } ) {
420 String s = new String();
432 task methodTest( Foo p0{ f } ) {
445 //Foo temp = new Foo();
460 // Foo.test( a0, a1 );
462 taskexit( p0{ !f } );
466 task getNewFromMethod( Foo p0{ f } ) {
467 Voo g = Voo.getAVoo( null );
469 taskexit( p0{ !f } );
473 task methodTest01_( Foo p0{ f }, Foo p1{ f } ) {
475 Foo a0before = new Foo();
477 a0before.x = new Foo();
479 a0before.x = new Foo();
482 Foo a0after = new Foo();
484 a0after.x = new Foo();
486 a0after.x = new Foo();
492 taskexit( p0{ !f }, p1{ !f } );
496 task methodTest02_( Foo p0{ f }, Foo p1{ f } ) {
498 Foo a0before = new Foo();
500 a0before.x = new Foo();
502 a0before.x = new Foo();
505 Foo a0after = new Foo();
507 a0after.x = new Foo();
509 a0after.x = new Foo();
515 taskexit( p0{ !f }, p1{ !f } );
519 task methodTest03_( Foo p0{ f }, Foo p1{ f } ) {
521 Foo a0before = new Foo();
523 a0before.x = new Foo();
525 a0before.x = new Foo();
528 Foo a0after = new Foo();
530 a0after.x = new Foo();
532 a0after.x = new Foo();
538 taskexit( p0{ !f }, p1{ !f } );
542 task methodTest04_( Foo p0{ f }, Foo p1{ f } ) {
544 Foo a0before = new Foo();
546 a0before.x = new Foo();
548 a0before.x = new Foo();
551 Foo a0after = new Foo();
553 a0after.x = new Foo();
555 a0after.x = new Foo();
561 taskexit( p0{ !f }, p1{ !f } );
565 task methodTest05_( Foo p0{ f }, Foo p1{ f } ) {
567 Foo a0before = new Foo();
569 a0before.x = new Foo();
571 a0before.x = new Foo();
574 Foo a0after = new Foo();
576 a0after.x = new Foo();
578 a0after.x = new Foo();
584 taskexit( p0{ !f }, p1{ !f } );
588 task methodTest06_( Foo p0{ f }, Foo p1{ f } ) {
590 Foo a0before = new Foo();
592 a0before.x = new Foo();
594 a0before.x = new Foo();
597 Foo a0after = new Foo();
599 a0after.x = new Foo();
601 a0after.x = new Foo();
604 Foo a1before = new Foo();
606 a1before.x = new Foo();
608 a1before.x = new Foo();
611 Foo a1after = new Foo();
613 a1after.x = new Foo();
615 a1after.x = new Foo();
618 //Foo.m6_( a0after, a1after );
621 taskexit( p0{ !f }, p1{ !f } );
625 task methodTest07_( Foo p0{ f }, Foo p1{ f } ) {
627 Foo a0before = new Foo();
629 a0before.x = new Foo();
631 a0before.x = new Foo();
634 Foo a0after = new Foo();
636 a0after.x = new Foo();
638 a0after.x = new Foo();
641 Foo a1before = new Foo();
643 a1before.x = new Foo();
645 a1before.x = new Foo();
648 Foo a1after = new Foo();
650 a1after.x = new Foo();
652 a1after.x = new Foo();
655 //Foo.m7_( a0after, a1after );
658 taskexit( p0{ !f }, p1{ !f } );
662 task methodTest08_( Foo p0{ f }, Foo p1{ f } ) {
664 Foo a0before = new Foo();
666 a0before.x = new Foo();
668 a0before.x = new Foo();
671 Foo a0after = new Foo();
673 a0after.x = new Foo();
675 a0after.x = new Foo();
678 Foo a1before = new Foo();
680 a1before.x = new Foo();
682 a1before.x = new Foo();
685 Foo a1after = new Foo();
687 a1after.x = new Foo();
689 a1after.x = new Foo();
692 //Foo.m8_( a0after, a1after );
695 taskexit( p0{ !f }, p1{ !f } );
700 task methodTest09_( Foo p0{ f }, Foo p1{ f } ) {
702 Foo a0before = new Foo();
704 a0before.x = new Foo();
706 a0before.x = new Foo();
709 Foo a0after = new Foo();
711 a0after.x = new Foo();
713 a0after.x = new Foo();
716 Foo a1before = new Foo();
718 a1before.x = new Foo();
720 a1before.x = new Foo();
723 Foo a1after = new Foo();
725 a1after.x = new Foo();
727 a1after.x = new Foo();
730 Foo.m9_( a0after, a1after );
733 taskexit( p0{ !f }, p1{ !f } );