| 1 | # Begin generated code |
|---|
| 2 | |
|---|
| 3 | .namespace [ 'A' ] |
|---|
| 4 | |
|---|
| 5 | .sub 'a' :method |
|---|
| 6 | |
|---|
| 7 | .annotate 'file', 'test.winxed' |
|---|
| 8 | .annotate 'line', 2 |
|---|
| 9 | # Body |
|---|
| 10 | # { |
|---|
| 11 | # predefined say |
|---|
| 12 | .annotate 'line', 3 |
|---|
| 13 | say "a" |
|---|
| 14 | # predefined Error |
|---|
| 15 | .annotate 'line', 4 |
|---|
| 16 | root_new $P1, ['parrot';'Exception'] |
|---|
| 17 | $P1['message'] = "erra" |
|---|
| 18 | throw $P1 |
|---|
| 19 | .annotate 'line', 5 |
|---|
| 20 | .return(0) |
|---|
| 21 | # } |
|---|
| 22 | .annotate 'line', 6 |
|---|
| 23 | |
|---|
| 24 | .end # a |
|---|
| 25 | |
|---|
| 26 | .sub Winxed_class_init :anon :load :init |
|---|
| 27 | newclass $P0, [ 'A' ] |
|---|
| 28 | .end |
|---|
| 29 | .namespace [ ] |
|---|
| 30 | |
|---|
| 31 | .sub 'b' |
|---|
| 32 | |
|---|
| 33 | .annotate 'line', 9 |
|---|
| 34 | # Body |
|---|
| 35 | # { |
|---|
| 36 | # predefined say |
|---|
| 37 | .annotate 'line', 10 |
|---|
| 38 | say "b" |
|---|
| 39 | # predefined Error |
|---|
| 40 | .annotate 'line', 11 |
|---|
| 41 | root_new $P1, ['parrot';'Exception'] |
|---|
| 42 | $P1['message'] = "errb" |
|---|
| 43 | throw $P1 |
|---|
| 44 | .annotate 'line', 12 |
|---|
| 45 | .return(0) |
|---|
| 46 | # } |
|---|
| 47 | .annotate 'line', 13 |
|---|
| 48 | |
|---|
| 49 | .end # b |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | .sub 'main' :main |
|---|
| 53 | .param pmc __ARG_1 |
|---|
| 54 | |
|---|
| 55 | .annotate 'line', 15 |
|---|
| 56 | # Body |
|---|
| 57 | # { |
|---|
| 58 | .annotate 'line', 16 |
|---|
| 59 | # try: create handler |
|---|
| 60 | new $P2, 'ExceptionHandler' |
|---|
| 61 | set_label $P2, __label_0 |
|---|
| 62 | push_eh $P2 |
|---|
| 63 | # try: begin |
|---|
| 64 | # { |
|---|
| 65 | .annotate 'line', 17 |
|---|
| 66 | $P3 = __ARG_1[1] |
|---|
| 67 | if_null $P3, __label_2 |
|---|
| 68 | unless $P3 goto __label_2 |
|---|
| 69 | .annotate 'line', 18 |
|---|
| 70 | new $P4, [ 'A' ] |
|---|
| 71 | .tailcall $P4.'a'() |
|---|
| 72 | goto __label_3 |
|---|
| 73 | __label_2: # else |
|---|
| 74 | .annotate 'line', 20 |
|---|
| 75 | .tailcall 'b'() |
|---|
| 76 | __label_3: # endif |
|---|
| 77 | # } |
|---|
| 78 | # try: end |
|---|
| 79 | pop_eh |
|---|
| 80 | goto __label_1 |
|---|
| 81 | .annotate 'line', 16 |
|---|
| 82 | # catch |
|---|
| 83 | __label_0: |
|---|
| 84 | .get_results($P1) |
|---|
| 85 | finalize $P1 |
|---|
| 86 | pop_eh |
|---|
| 87 | # { |
|---|
| 88 | # predefined say |
|---|
| 89 | .annotate 'line', 22 |
|---|
| 90 | say "caught exception" |
|---|
| 91 | # } |
|---|
| 92 | # catch end |
|---|
| 93 | __label_1: |
|---|
| 94 | # } |
|---|
| 95 | .annotate 'line', 24 |
|---|
| 96 | |
|---|
| 97 | .end # main |
|---|
| 98 | |
|---|
| 99 | # End generated code |
|---|