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;
36 public void doTheBaw( Voo v ) { v = new Voo(); }
50 public void ruinSomeFoos( Foo a, Foo b ) {
54 static public void aStaticMethod( Foo p0, Foo p1 ) {
66 static public void m1_( Foo p0 ) {
74 static public void m2_( Foo p0 ) {
81 static public void m3_( Foo p0 ) {
88 static public void m4_( Foo p0 ) {
92 static public void m5_( Foo p0 ) {
98 static public void m6_( Foo p0, Foo p1 ) {
113 static public void m7_( Foo p0, Foo p1 ) {
129 static public void m8_( Foo p0, Foo p1 ) {
147 // this empty task should still create a non-empty
148 // ownership graph showing parameter allocation
149 // look for the parameter s as a label referencing
150 // a heap region that is multi-object, flagged, not summary
151 task Startup( StartupObject s{ initialstate } ) {
152 taskexit( s{ !initialstate } );
156 task NewObjectA( Foo a{ f }, Foo b{ f } ) {
164 taskexit( a{ !f }, b{ !f } );
167 task NewObjectB( Foo a{ f }, Foo b{ f } ) {
175 taskexit( a{ !f }, b{ !f } );
180 task NewObjectC( Foo a{ f }, Foo b{ f } ) {
195 taskexit( a{ !f }, b{ !f } );
200 task forMethod( Foo p0{ f } ) {
217 taskexit( p0{ !f } );
223 // this task allocates a new object, so there should
224 // be a heap region for the parameter, and several
225 // heap regions for the allocation site, but the label
226 // merely points to the newest region
227 task NewObjectInMethod( Voo v{ f } ) {
236 task ClobberInitParamReflex( Voo v{ f }, Voo w{ f } ) {
239 taskexit( v{ !f }, w{ !f } );
243 task BackToItself( Parameter p0{ w } ) {
245 Penguin p = new Penguin();
250 Parameter p1 = new Parameter();
252 Penguin q = new Penguin();
257 taskexit( p0{ !w } );
261 task SummaryNodeTokens( Foo p0{ f } ) {
276 taskexit( p0{ !f } );
280 task strongUpdates( Foo p0{ f } ) {
293 // this should effect a strong update
305 // p0 points to a multiple-object heap region
306 // so this should not make a strong update
309 taskexit( p0{ !f } );
313 task methodTest( Foo p0{ f } ) {
326 //Foo temp = new Foo();
341 // Foo.test( a0, a1 );
343 taskexit( p0{ !f } );
348 task methodTest01_( Foo p0{ f }, Foo p1{ f } ) {
350 Foo a0before = new Foo();
352 a0before.x = new Foo();
354 a0before.x = new Foo();
357 Foo a0after = new Foo();
359 a0after.x = new Foo();
361 a0after.x = new Foo();
367 taskexit( p0{ !f }, p1{ !f } );
371 task methodTest02_( Foo p0{ f }, Foo p1{ f } ) {
373 Foo a0before = new Foo();
375 a0before.x = new Foo();
377 a0before.x = new Foo();
380 Foo a0after = new Foo();
382 a0after.x = new Foo();
384 a0after.x = new Foo();
390 taskexit( p0{ !f }, p1{ !f } );
394 task methodTest03_( Foo p0{ f }, Foo p1{ f } ) {
396 Foo a0before = new Foo();
398 a0before.x = new Foo();
400 a0before.x = new Foo();
403 Foo a0after = new Foo();
405 a0after.x = new Foo();
407 a0after.x = new Foo();
413 taskexit( p0{ !f }, p1{ !f } );
417 task methodTest04_( Foo p0{ f }, Foo p1{ f } ) {
419 Foo a0before = new Foo();
421 a0before.x = new Foo();
423 a0before.x = new Foo();
426 Foo a0after = new Foo();
428 a0after.x = new Foo();
430 a0after.x = new Foo();
436 taskexit( p0{ !f }, p1{ !f } );
440 task methodTest05_( Foo p0{ f }, Foo p1{ f } ) {
442 Foo a0before = new Foo();
444 a0before.x = new Foo();
446 a0before.x = new Foo();
449 Foo a0after = new Foo();
451 a0after.x = new Foo();
453 a0after.x = new Foo();
459 taskexit( p0{ !f }, p1{ !f } );
463 task methodTest06_( Foo p0{ f }, Foo p1{ f } ) {
465 Foo a0before = new Foo();
467 a0before.x = new Foo();
469 a0before.x = new Foo();
472 Foo a0after = new Foo();
474 a0after.x = new Foo();
476 a0after.x = new Foo();
479 Foo a1before = new Foo();
481 a1before.x = new Foo();
483 a1before.x = new Foo();
486 Foo a1after = new Foo();
488 a1after.x = new Foo();
490 a1after.x = new Foo();
493 Foo.m6_( a0after, a1after );
496 taskexit( p0{ !f }, p1{ !f } );
500 task methodTest07_( Foo p0{ f }, Foo p1{ f } ) {
502 Foo a0before = new Foo();
504 a0before.x = new Foo();
506 a0before.x = new Foo();
509 Foo a0after = new Foo();
511 a0after.x = new Foo();
513 a0after.x = new Foo();
516 Foo a1before = new Foo();
518 a1before.x = new Foo();
520 a1before.x = new Foo();
523 Foo a1after = new Foo();
525 a1after.x = new Foo();
527 a1after.x = new Foo();
530 Foo.m7_( a0after, a1after );
533 taskexit( p0{ !f }, p1{ !f } );
537 task methodTest08_( Foo p0{ f }, Foo p1{ f } ) {
539 Foo a0before = new Foo();
541 a0before.x = new Foo();
543 a0before.x = new Foo();
546 Foo a0after = new Foo();
548 a0after.x = new Foo();
550 a0after.x = new Foo();
553 Foo a1before = new Foo();
555 a1before.x = new Foo();
557 a1before.x = new Foo();
560 Foo a1after = new Foo();
562 a1after.x = new Foo();
564 a1after.x = new Foo();
567 Foo.m8_( a0after, a1after );
570 taskexit( p0{ !f }, p1{ !f } );