
     1  %begin
     2  
503 @ 4405:         LINE   1 "regression-compile-tmp/unwinding.imp"
504 @ 4445:         BEGIN  _lev0id0 {lev=0 --> 1}

     3     %on %event 15 %start
505 @ 4446:            LINE   3 "regression-compile-tmp/unwinding.imp"
506 @ 4486:            ON     MASK=8000 L_0004

     4       print string("END OF DIAGNOSTICS"); newline
507 @ 4492:            LINE   4 "regression-compile-tmp/unwinding.imp"
508 @ 4532:            PUSH   PRINTSTRING
509 @ 4535:            PUSHS  "END OF DIAGNOSTICS"
510 @ 4555:            ASSPAR
511 @ 4556:            CALL  
512 @ 4557:            LINE   4 "regression-compile-tmp/unwinding.imp"
513 @ 4597:            PUSH   NEWLINE
514 @ 4600:            CALL  

     5       %stop
515 @ 4601:            LINE   5 "regression-compile-tmp/unwinding.imp"
516 @ 4641:            STOP  

     6     %finish
     7     
517 @ 4642:            LINE   6 "regression-compile-tmp/unwinding.imp"
518 @ 4682:            LOCATE L_0004

     8     %routine the procedure(%integer i)
519 @ 4685:            LINE   8 "regression-compile-tmp/unwinding.imp"
520 @ 4725:            DEF    THEPROCEDURE (_lev0id0_THEPROCEDURE) p1=V_0081 a/tf=7 b/format=0 c/ostate=0  type=0 (<type:0>) form=7 (routine) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0
521 @ 4749:               START  ( FORMAL PARAMETERS  {lev=2 --> 3, nested=0 --> 1}
522 @ 4750:                  DEF    I p1=V_0082 a/tf=11 b/format=1 c/ostate=0  type=1 (integer) form=1 (simple) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0
523 @ 4763:               FINISH ) {lev=2}

     9       %integer local variable
524 @ 4764:               LINE   9 "regression-compile-tmp/unwinding.imp"
525 @ 4804:               DEF    LOCALVARIABLE p1=V_0083 a/tf=11 b/format=1 c/ostate=0  type=1 (integer) form=1 (simple) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0

    10       local variable = i
    11  
526 @ 4829:               LINE   10 "regression-compile-tmp/unwinding.imp"
527 @ 4869:               PUSH   LOCALVARIABLE
528 @ 4872:               PUSH   I
529 @ 4875:               ASSVAL

    12       %on %event 15 %start
530 @ 4876:               LINE   12 "regression-compile-tmp/unwinding.imp"
531 @ 4916:               ON     MASK=8000 L_0004

    13         print string("Entered from THEPROCEDURE "); write(i, -1); newlines(2)
532 @ 4922:               LINE   13 "regression-compile-tmp/unwinding.imp"
533 @ 4962:               PUSH   PRINTSTRING
534 @ 4965:               PUSHS  "Entered from THEPROCEDURE "
535 @ 4993:               ASSPAR
536 @ 4994:               CALL  
537 @ 4995:               LINE   13 "regression-compile-tmp/unwinding.imp"
538 @ 5035:               PUSH   WRITE
539 @ 5038:               PUSH   I
540 @ 5041:               ASSPAR
541 @ 5042:               PUSHI  #0x00000001
542 @ 5047:               NEGATE
543 @ 5048:               ASSPAR
544 @ 5049:               CALL  
545 @ 5050:               LINE   13 "regression-compile-tmp/unwinding.imp"
546 @ 5090:               PUSH   NEWLINES
547 @ 5093:               PUSHI  #0x00000002
548 @ 5098:               ASSPAR
549 @ 5099:               CALL  

    14         print string("LOCALVARIABLE = "); write(local variable, 0); newline
    15         ! For comparative testing: Vax compiler needs event_extra not event_info
550 @ 5100:               LINE   14 "regression-compile-tmp/unwinding.imp"
551 @ 5140:               PUSH   PRINTSTRING
552 @ 5143:               PUSHS  "LOCALVARIABLE = "
553 @ 5161:               ASSPAR
554 @ 5162:               CALL  
555 @ 5163:               LINE   14 "regression-compile-tmp/unwinding.imp"
556 @ 5203:               PUSH   WRITE
557 @ 5206:               PUSH   LOCALVARIABLE
558 @ 5209:               ASSPAR
559 @ 5210:               PUSHI  #0x00000000
560 @ 5215:               ASSPAR
561 @ 5216:               CALL  
562 @ 5217:               LINE   14 "regression-compile-tmp/unwinding.imp"
563 @ 5257:               PUSH   NEWLINE
564 @ 5260:               CALL  

    16         %signal 15, event_sub, event_info  { pass up one level to caller }
565 @ 5261:               LINE   16 "regression-compile-tmp/unwinding.imp"
566 @ 5301:               PUSH   EVENT
567 @ 5304:               CALL  
568 @ 5305:               SELECT 2
569 @ 5308:               PUSH   EVENT
570 @ 5311:               CALL  
571 @ 5312:               SELECT 3
572 @ 5315:               EVENT  000f

    17       %finish
    18  
573 @ 5318:               LINE   17 "regression-compile-tmp/unwinding.imp"
574 @ 5358:               LOCATE L_0004

    19       %signal 15, 1 %if i >= 10
575 @ 5361:               LINE   19 "regression-compile-tmp/unwinding.imp"
576 @ 5401:               PUSH   I
577 @ 5404:               PUSHI  #0x0000000a
578 @ 5409:               JUMPIF < L_0004
579 @ 5413:               PUSHI  #0x00000001
580 @ 5418:               EVENT  000f
581 @ 5421:               LOCATE L_0004

    20       the procedure(i+3)
582 @ 5424:               LINE   20 "regression-compile-tmp/unwinding.imp"
583 @ 5464:               PUSH   THEPROCEDURE
584 @ 5467:               PUSH   I
585 @ 5470:               PUSHI  #0x00000003
586 @ 5475:               ADD   
587 @ 5476:               ASSPAR
588 @ 5477:               CALL  

    21     %end
    22  
589 @ 5478:               LINE   21 "regression-compile-tmp/unwinding.imp"
590 @ 5518:            END    _lev0id0_THEPROCEDURE {lev=2 --> 1}

    23     the procedure(1)
    24  
591 @ 5519:            LINE   23 "regression-compile-tmp/unwinding.imp"
592 @ 5559:            PUSH   THEPROCEDURE
593 @ 5562:            PUSHI  #0x00000001
594 @ 5567:            ASSPAR
595 @ 5568:            CALL  

    25  %endofprogram
    26  $ imp unwinding
    27  $ link unwinding
    28  $ run unwinding
    29  Entered from THEPROCEDURE 10
    30  
    31  LOCALVARIABLE = 10
    32  Entered from THEPROCEDURE 7
    33  
    34  LOCALVARIABLE = 7
    35  Entered from THEPROCEDURE 4
    36  
    37  LOCALVARIABLE = 4
    38  Entered from THEPROCEDURE 1
    39  
    40  LOCALVARIABLE = 1
    41  END OF DIAGNOSTICS
596 @ 5569:            LINE   25 "regression-compile-tmp/unwinding.imp"
597 @ 5609:         END    _lev0id0 {lev=1 --> 0}
598 @ 5610:         END     {lev=0 --> -1}
599 @ 5611: 

