about summary refs log blame commit diff stats
path: root/arc/.traces/jump-label
blob: 2f811d38199c6a1e312417ee8b923849bdae7140 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt
c{0: 0 (((1 integer)) <- ((copy)) ((2 literal))) -- nil
c{0: 1 (((2 integer)) <- ((copy)) ((1 literal))) -- nil
c{0: 2 loop -- nil
c{0: 3 (((2 integer)) <- ((add)) ((2 integer)) ((2 integer))) -- nil
c{0: 4 (((3 boolean)) <- ((equal)) ((1 integer)) ((2 integer))) -- nil
c{0: 5 (((jump-if)) ((3 boolean)) ((loop offset))) -- nil
c{0: 6 (((4 integer)) <- ((copy)) ((3 literal))) -- nil
c{0: 7 (((reply))) -- nil
c{0: 8 (((3 integer)) <- ((copy)) ((34 literal))) -- nil
c{1: 0 ✓ (((1 integer)) <- ((copy)) ((2 literal)))
c{1: 1 ✓ (((2 integer)) <- ((copy)) ((1 literal)))
c{1: 3 ✓ (((2 integer)) <- ((add)) ((2 integer)) ((2 integer)))
c{1: 4 ✓ (((3 boolean)) <- ((equal)) ((1 integer)) ((2 integer)))
c{1: 5 ✓ (((jump-if)) ((3 boolean)) ((loop offset)))
c{1: 6 ✓ (((4 integer)) <- ((copy)) ((3 literal)))
c{1: 7 ✓ (((reply)))
c{1: 8 ✓ (((3 integer)) <- ((copy)) ((34 literal)))
cn0: convert-names in main
cn0: (((1 integer)) <- ((copy)) ((2 literal))) nil nil
cn0: checking arg ((2 literal))
cn0: checking oarg ((1 integer))
maybe-add: ((1 integer))
cn0: (((2 integer)) <- ((copy)) ((1 literal))) nil nil
cn0: checking arg ((1 literal))
cn0: checking oarg ((2 integer))
maybe-add: ((2 integer))
cn0: (((2 integer)) <- ((add)) ((2 integer)) ((2 integer))) nil nil
cn0: checking arg ((2 integer))
maybe-add: ((2 integer))
cn0: checking arg ((2 integer))
maybe-add: ((2 integer))
cn0: checking oarg ((2 integer))
maybe-add: ((2 integer))
cn0: (((3 boolean)) <- ((equal)) ((1 integer)) ((2 integer))) nil nil
cn0: checking arg ((1 integer))
maybe-add: ((1 integer))
cn0: checking arg ((2 integer))
maybe-add: ((2 integer))
cn0: checking oarg ((3 boolean))
maybe-add: ((3 boolean))
cn0: (((jump-if)) ((3 boolean)) ((-4 offset))) nil nil
cn0: checking arg ((3 boolean))
maybe-add: ((3 boolean))
cn0: checking arg ((-4 offset))
cn0: (((4 integer)) <- ((copy)) ((3 literal))) nil nil
cn0: checking arg ((3 literal))
cn0: checking oarg ((4 integer))
maybe-add: ((4 integer))
cn0: (((reply))) nil nil
cn0: (((3 integer)) <- ((copy)) ((34 literal))) nil nil
cn0: checking arg ((34 literal))
cn0: checking oarg ((3 integer))
maybe-add: ((3 integer))
cn1: (((1 integer)) <- ((copy)) ((2 literal)))
cn1: (((2 integer)) <- ((copy)) ((1 literal)))
cn1: loop
cn1: (((2 integer)) <- ((add)) ((2 integer)) ((2 integer)))
cn1: (((3 boolean)) <- ((equal)) ((1 integer)) ((2 integer)))
cn1: (((jump-if)) ((3 boolean)) ((-4 offset)))
cn1: (((4 integer)) <- ((copy)) ((3 literal)))
cn1: (((reply)))
cn1: (((3 integer)) <- ((copy)) ((34 literal)))
schedule: main
run: main 0: (((1 integer)) <- ((copy)) ((2 literal)))
run: main 0: 2 => ((1 integer))
mem: ((1 integer)): 1 <= 2
run: main 1: (((2 integer)) <- ((copy)) ((1 literal)))
run: main 1: 1 => ((2 integer))
mem: ((2 integer)): 2 <= 1
run: main 2: loop
run: main 3: (((2 integer)) <- ((add)) ((2 integer)) ((2 integer)))
mem: ((2 integer)) => 1
mem: ((2 integer)) => 1
run: main 3: 2 => ((2 integer))
mem: ((2 integer)): 2 <= 2
run: main 4: (((3 boolean)) <- ((equal)) ((1 integer)) ((2 integer)))
mem: ((1 integer)) => 2
mem: ((2 integer)) => 2
run: main 4: t => ((3 boolean))
mem: ((3 boolean)): 3 <= t
run: main 5: (((jump-if)) ((3 boolean)) ((-4 offset)))
mem: ((3 boolean)) => t
run: main 2: loop
run: main 3: (((2 integer)) <- ((add)) ((2 integer)) ((2 integer)))
mem: ((2 integer)) => 2
mem: ((2 integer)) => 2
run: main 3: 4 => ((2 integer))
mem: ((2 integer)): 2 <= 4
run: main 4: (((3 boolean)) <- ((equal)) ((1 integer)) ((2 integer)))
mem: ((1 integer)) => 2
mem: ((2 integer)) => 4
run: main 4: nil => ((3 boolean))
mem: ((3 boolean)): 3 <= nil
run: main 5: (((jump-if)) ((3 boolean)) ((-4 offset)))
mem: ((3 boolean)) => nil
run: main 6: (((4 integer)) <- ((copy)) ((3 literal)))
run: main 6: 3 => ((4 integer))
mem: ((4 integer)): 4 <= 3
run: main 7: (((reply)))
schedule: done with routine nil
or: #af5f00; text-decoration: underline; } .Constant { color: #008787; } .PreProc { color: #c000c0; } --> </style> <script type='text/javascript'> <!-- /* function to open any folds containing a jumped-to line before jumping to it */ function JumpToLine() { var lineNum; lineNum = window.location.hash; lineNum = lineNum.substr(1); /* strip off '#' */ if (lineNum.indexOf('L') == -1) { lineNum = 'L'+lineNum; } var lineElem = document.getElementById(lineNum); /* Always jump to new location even if the line was hidden inside a fold, or * we corrected the raw number to a line ID. */ if (lineElem) { lineElem.scrollIntoView(true); } return true; } if ('onhashchange' in window) { window.onhashchange = JumpToLine; } --> </script> </head> <body onload='JumpToLine();'> <a href='https://github.com/akkartik/mu/blob/main/407right-justify.mu'>https://github.com/akkartik/mu/blob/main/407right-justify.mu</a> <pre id='vimCodeElement'> <span id="L1" class="LineNr"> 1 </span><span class="muComment"># print 'n' with enough leading spaces to be right-justified in 'width'</span> <span id="L2" class="LineNr"> 2 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='407right-justify.mu.html#L2'>right-justify</a></span> <a href='405screen.mu.html#L9'>screen</a>: (addr <a href='405screen.mu.html#L9'>screen</a>), n: int, _width: int <span class="Delimiter">{</span> <span id="L3" class="LineNr"> 3 </span> <span class="muComment"># tweak things for negative numbers</span> <span id="L4" class="LineNr"> 4 </span> <span class="PreProc">var</span> n-width/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='311decimal-int.subx.html#L312'>decimal-size</a> n <span id="L5" class="LineNr"> 5 </span> <span class="PreProc">var</span> width/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy _width <span id="L6" class="LineNr"> 6 </span> <span class="Delimiter">{</span> <span id="L7" class="LineNr"> 7 </span> compare n-width, width <span id="L8" class="LineNr"> 8 </span> <span class="PreProc">break-if-&gt;=</span> <span id="L9" class="LineNr"> 9 </span> <a href='405screen.mu.html#L210'>print-grapheme</a> <a href='405screen.mu.html#L9'>screen</a>, <span class="Constant">0x20</span> <span class="muComment"># space</span> <span id="L10" class="LineNr">10 </span> width <span class="SpecialChar">&lt;-</span> decrement <span id="L11" class="LineNr">11 </span> <span class="PreProc">loop</span> <span id="L12" class="LineNr">12 </span> <span class="Delimiter">}</span> <span id="L13" class="LineNr">13 </span> <a href='405screen.mu.html#L480'>print-int32-decimal</a> <a href='405screen.mu.html#L9'>screen</a>, n <span id="L14" class="LineNr">14 </span><span class="Delimiter">}</span> </pre> </body> </html> <!-- vim: set foldmethod=manual : -->