|
2 | 2 | ==== |
3 | 3 |
|
4 | 4 | not all source lines are correctly reported in the IR file, |
5 | | -for example the below subroutine only shows the sub() line: |
6 | | - sub two() { |
7 | | - cx16.r0 = peekw(ww + cx16.r0L * 2) |
8 | | - } |
| 5 | +for example the below subroutine only shows the sub() line:: |
9 | 6 |
|
10 | | -and for example the below code omits line 5: |
11 | | -[examples/test.p8: line 4 col 6-8] sub start() { |
12 | | -[examples/test.p8: line 6 col 10-13] cx16.r2 = select2() |
13 | | -[examples/test.p8: line 7 col 10-13] cx16.r3 = select3() |
14 | | -[examples/test.p8: line 8 col 10-13] cx16.r4 = select4() |
15 | | -[examples/test.p8: line 9 col 10-13] cx16.r5 = select5() |
| 7 | + sub two() { |
| 8 | + cx16.r0 = peekw(ww + cx16.r0L * 2) |
| 9 | + } |
16 | 10 |
|
| 11 | +and for example the below code omits line 5:: |
17 | 12 |
|
18 | | -%option enable_floats |
| 13 | + [examples/test.p8: line 4 col 6-8] sub start() { |
| 14 | + [examples/test.p8: line 6 col 10-13] cx16.r2 = select2() |
| 15 | + [examples/test.p8: line 7 col 10-13] cx16.r3 = select3() |
| 16 | + [examples/test.p8: line 8 col 10-13] cx16.r4 = select4() |
| 17 | + [examples/test.p8: line 9 col 10-13] cx16.r5 = select5() |
19 | 18 |
|
20 | | -main { |
21 | | - sub start() { |
22 | | - cx16.r1 = select1() |
23 | | - cx16.r2 = select2() |
24 | | - cx16.r3 = select3() |
25 | | - cx16.r4 = select4() |
26 | | - cx16.r5 = select5() |
27 | | - } |
28 | 19 |
|
29 | | - sub select1() -> uword { |
30 | | - cx16.r0L++ |
31 | | - return 2000 |
32 | | - } |
| 20 | + %option enable_floats |
33 | 21 |
|
34 | | - sub select2() -> str { |
35 | | - cx16.r0L++ |
36 | | - return 2000 |
37 | | - } |
| 22 | + main { |
| 23 | + sub start() { |
| 24 | + cx16.r1 = select1() |
| 25 | + cx16.r2 = select2() |
| 26 | + cx16.r3 = select3() |
| 27 | + cx16.r4 = select4() |
| 28 | + cx16.r5 = select5() |
| 29 | + } |
38 | 30 |
|
39 | | - sub select3() -> ^^ubyte { |
40 | | - cx16.r0L++ |
41 | | - return 2000 |
42 | | - } |
| 31 | + sub select1() -> uword { |
| 32 | + cx16.r0L++ |
| 33 | + return 2000 |
| 34 | + } |
43 | 35 |
|
44 | | - sub select4() -> ^^bool { |
45 | | - cx16.r0L++ |
46 | | - return 2000 |
47 | | - } |
| 36 | + sub select2() -> str { |
| 37 | + cx16.r0L++ |
| 38 | + return 2000 |
| 39 | + } |
| 40 | + |
| 41 | + sub select3() -> ^^ubyte { |
| 42 | + cx16.r0L++ |
| 43 | + return 2000 |
| 44 | + } |
48 | 45 |
|
49 | | - sub select5() -> ^^float { |
50 | | - cx16.r0L++ |
51 | | - return 2000 |
| 46 | + sub select4() -> ^^bool { |
| 47 | + cx16.r0L++ |
| 48 | + return 2000 |
| 49 | + } |
| 50 | + |
| 51 | + sub select5() -> ^^float { |
| 52 | + cx16.r0L++ |
| 53 | + return 2000 |
| 54 | + } |
52 | 55 | } |
53 | | -} |
54 | 56 |
|
55 | 57 |
|
56 | 58 | STRUCTS and TYPED POINTERS |
|
0 commit comments