home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 20 09 09 09 09 09 | 2d 2a 2d 20 44 69 63 74 |% .....|-*- Dict|
|00000010| 69 6f 6e 61 72 79 3a 20 | 64 65 73 69 67 6e 3b 20 |ionary: |design; |
|00000020| 50 61 63 6b 61 67 65 3a | 20 43 20 2d 2a 2d 0a 0a |Package:| C -*-..|
|00000030| 5c 23 7c 0a 5c 63 68 61 | 70 74 65 72 7b 44 65 62 |\#|.\cha|pter{Deb|
|00000040| 75 67 67 65 72 20 49 6e | 66 6f 72 6d 61 74 69 6f |ugger In|formatio|
|00000050| 6e 7d 0a 5c 69 6e 64 65 | 78 7b 64 65 62 75 67 67 |n}.\inde|x{debugg|
|00000060| 65 72 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 7d 0a |er infor|mation}.|
|00000070| 5c 6c 61 62 65 6c 7b 64 | 65 62 75 67 2d 69 6e 66 |\label{d|ebug-inf|
|00000080| 6f 7d 0a 0a 41 6c 74 68 | 6f 75 67 68 20 74 68 65 |o}..Alth|ough the|
|00000090| 20 63 6f 6d 70 69 6c 65 | 72 27 73 20 67 72 65 61 | compile|r's grea|
|000000a0| 74 20 66 72 65 65 64 6f | 6d 20 69 6e 20 63 68 6f |t freedo|m in cho|
|000000b0| 69 63 65 20 6f 66 20 66 | 75 6e 63 74 69 6f 6e 20 |ice of f|unction |
|000000c0| 63 61 6c 6c 20 63 6f 6e | 76 65 6e 74 69 6f 6e 73 |call con|ventions|
|000000d0| 0a 61 6e 64 20 76 61 72 | 69 61 62 6c 65 20 72 65 |.and var|iable re|
|000000e0| 70 72 65 73 65 6e 74 61 | 74 69 6f 6e 73 20 68 61 |presenta|tions ha|
|000000f0| 73 20 6d 61 6a 6f 72 20 | 65 66 66 69 63 69 65 6e |s major |efficien|
|00000100| 63 79 20 61 64 76 61 6e | 74 61 67 65 73 2c 20 69 |cy advan|tages, i|
|00000110| 74 20 61 6c 73 6f 20 68 | 61 73 0a 75 6e 66 6f 72 |t also h|as.unfor|
|00000120| 74 75 6e 61 74 65 20 63 | 6f 6e 73 65 71 75 65 6e |tunate c|onsequen|
|00000130| 63 65 73 20 66 6f 72 20 | 74 68 65 20 64 65 62 75 |ces for |the debu|
|00000140| 67 67 65 72 2e 20 20 54 | 68 65 20 64 65 62 75 67 |gger. T|he debug|
|00000150| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 74 68 61 | informa|tion tha|
|00000160| 74 20 77 65 20 6e 65 65 | 64 0a 69 73 20 65 76 65 |t we nee|d.is eve|
|00000170| 6e 20 6d 6f 72 65 20 65 | 6c 61 62 6f 72 61 74 65 |n more e|laborate|
|00000180| 20 74 68 61 6e 20 66 6f | 72 20 63 6f 6e 76 65 6e | than fo|r conven|
|00000190| 74 69 6f 6e 61 6c 20 22 | 63 6f 6d 70 69 6c 65 64 |tional "|compiled|
|000001a0| 22 20 6c 61 6e 67 75 61 | 67 65 73 2c 20 73 69 6e |" langua|ges, sin|
|000001b0| 63 65 20 77 65 0a 63 61 | 6e 6e 6f 74 20 65 76 65 |ce we.ca|nnot eve|
|000001c0| 6e 20 64 6f 20 61 20 73 | 69 6d 70 6c 65 20 62 61 |n do a s|imple ba|
|000001d0| 63 6b 74 72 61 63 65 20 | 77 69 74 68 6f 75 74 20 |cktrace |without |
|000001e0| 73 6f 6d 65 20 64 65 62 | 75 67 20 69 6e 66 6f 72 |some deb|ug infor|
|000001f0| 6d 61 74 69 6f 6e 2e 20 | 20 48 6f 77 65 76 65 72 |mation. | However|
|00000200| 2c 0a 6f 6e 63 65 20 68 | 61 76 69 6e 67 20 67 6f |,.once h|aving go|
|00000210| 6e 65 20 74 68 69 73 20 | 66 61 72 2c 20 69 74 20 |ne this |far, it |
|00000220| 69 73 20 6e 6f 74 20 74 | 68 61 74 20 64 69 66 66 |is not t|hat diff|
|00000230| 69 63 75 6c 74 20 74 6f | 20 67 6f 20 74 68 65 20 |icult to| go the |
|00000240| 65 78 74 72 61 20 64 69 | 73 74 61 6e 63 65 2c 0a |extra di|stance,.|
|00000250| 61 6e 64 20 70 72 6f 76 | 69 64 65 20 66 75 6c 6c |and prov|ide full|
|00000260| 20 73 6f 75 72 63 65 20 | 6c 65 76 65 6c 20 64 65 | source |level de|
|00000270| 62 75 67 67 69 6e 67 20 | 6f 66 20 63 6f 6d 70 69 |bugging |of compi|
|00000280| 6c 65 64 20 63 6f 64 65 | 2e 0a 0a 46 75 6c 6c 20 |led code|...Full |
|00000290| 64 65 62 75 67 20 69 6e | 66 6f 72 6d 61 74 69 6f |debug in|formatio|
|000002a0| 6e 20 68 61 73 20 61 20 | 73 75 62 73 74 61 6e 74 |n has a |substant|
|000002b0| 69 61 6c 20 73 70 61 63 | 65 20 70 65 6e 61 6c 74 |ial spac|e penalt|
|000002c0| 79 2c 20 73 6f 20 77 65 | 20 61 6c 6c 6f 77 20 64 |y, so we| allow d|
|000002d0| 69 66 66 65 72 65 6e 74 | 0a 6c 65 76 65 6c 73 20 |ifferent|.levels |
|000002e0| 6f 66 20 64 65 62 75 67 | 20 69 6e 66 6f 72 6d 61 |of debug| informa|
|000002f0| 74 69 6f 6e 20 74 6f 20 | 62 65 20 73 70 65 63 69 |tion to |be speci|
|00000300| 66 69 65 64 2e 20 20 49 | 6e 20 74 68 65 20 65 78 |fied. I|n the ex|
|00000310| 74 72 65 6d 65 20 63 61 | 73 65 2c 20 77 65 20 63 |treme ca|se, we c|
|00000320| 61 6e 0a 74 6f 74 61 6c | 6c 79 20 6f 6d 69 74 20 |an.total|ly omit |
|00000330| 64 65 62 75 67 20 69 6e | 66 6f 72 6d 61 74 69 6f |debug in|formatio|
|00000340| 6e 2e 0a 0a 0c 0a 5c 73 | 65 63 74 69 6f 6e 7b 54 |n.....\s|ection{T|
|00000350| 68 65 20 44 65 62 75 67 | 2d 49 6e 66 6f 20 53 74 |he Debug|-Info St|
|00000360| 72 75 63 74 75 72 65 7d | 0a 5c 69 6e 64 65 78 7b |ructure}|.\index{|
|00000370| 64 65 62 75 67 2d 69 6e | 66 6f 20 73 74 72 75 63 |debug-in|fo struc|
|00000380| 74 75 72 65 7d 0a 0a 54 | 68 65 20 44 65 62 75 67 |ture}..T|he Debug|
|00000390| 2d 49 6e 66 6f 20 73 74 | 72 75 63 74 75 72 65 20 |-Info st|ructure |
|000003a0| 64 69 72 65 63 74 6c 79 | 20 72 65 70 72 65 73 65 |directly| represe|
|000003b0| 6e 74 73 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |nts info|rmation |
|000003c0| 61 62 6f 75 74 20 74 68 | 65 0a 73 6f 75 72 63 65 |about th|e.source|
|000003d0| 20 63 6f 64 65 2c 20 61 | 6e 64 20 70 6f 69 6e 74 | code, a|nd point|
|000003e0| 73 20 74 6f 20 6f 74 68 | 65 72 20 73 74 72 75 63 |s to oth|er struc|
|000003f0| 74 75 72 65 73 20 74 68 | 61 74 20 64 65 73 63 72 |tures th|at descr|
|00000400| 69 62 65 20 74 68 65 20 | 6c 61 79 6f 75 74 20 6f |ibe the |layout o|
|00000410| 66 0a 72 75 6e 2d 74 69 | 6d 65 20 64 61 74 61 20 |f.run-ti|me data |
|00000420| 73 74 72 75 63 74 75 72 | 65 73 2e 0a 0a 0a 4d 61 |structur|es....Ma|
|00000430| 6b 65 20 73 6f 6d 65 20 | 73 6f 72 74 20 6f 66 20 |ke some |sort of |
|00000440| 6d 69 6e 69 6d 61 6c 20 | 64 65 62 75 67 2d 69 6e |minimal |debug-in|
|00000450| 66 6f 20 66 6f 72 6d 61 | 74 20 74 68 61 74 20 77 |fo forma|t that w|
|00000460| 6f 75 6c 64 20 73 75 70 | 70 6f 72 74 20 61 74 20 |ould sup|port at |
|00000470| 6c 65 61 73 74 20 74 68 | 65 0a 63 6f 6d 6d 6f 6e |least th|e.common|
|00000480| 20 63 61 73 65 73 20 6f | 66 20 6c 65 76 65 6c 20 | cases o|f level |
|00000490| 31 20 28 73 69 6e 63 65 | 20 74 68 61 74 20 69 73 |1 (since| that is|
|000004a0| 20 77 68 61 74 20 77 65 | 20 77 6f 75 6c 64 20 72 | what we| would r|
|000004b0| 65 6c 65 61 73 65 29 2c | 20 61 6e 64 20 70 65 72 |elease),| and per|
|000004c0| 68 61 70 73 0a 6c 65 76 | 65 6c 20 30 2e 20 20 41 |haps.lev|el 0. A|
|000004d0| 63 74 75 61 6c 6c 79 2c | 20 69 74 20 73 65 65 6d |ctually,| it seem|
|000004e0| 73 20 69 74 20 77 6f 75 | 6c 64 6e 27 74 20 62 65 |s it wou|ldn't be|
|000004f0| 20 68 61 72 64 20 74 6f | 20 63 72 75 6e 63 68 20 | hard to| crunch |
|00000500| 6e 65 61 72 6c 79 20 61 | 6c 6c 20 6f 66 20 74 68 |nearly a|ll of th|
|00000510| 65 0a 64 65 62 75 67 2d | 66 75 6e 63 74 69 6f 6e |e.debug-|function|
|00000520| 20 73 74 72 75 63 74 75 | 72 65 20 61 6e 64 20 64 | structu|re and d|
|00000530| 65 62 75 67 2d 69 6e 66 | 6f 20 66 75 6e 63 74 69 |ebug-inf|o functi|
|00000540| 6f 6e 20 6d 61 70 20 69 | 6e 74 6f 20 61 20 73 69 |on map i|nto a si|
|00000550| 6e 67 6c 65 20 62 79 74 | 65 2d 76 65 63 74 6f 72 |ngle byt|e-vector|
|00000560| 2e 0a 57 65 20 63 6f 75 | 6c 64 20 68 61 76 65 20 |..We cou|ld have |
|00000570| 61 6e 20 75 6e 63 72 75 | 6e 63 68 20 66 75 6e 63 |an uncru|nch func|
|00000580| 74 69 6f 6e 20 74 68 61 | 74 20 72 65 73 74 6f 72 |tion tha|t restor|
|00000590| 65 64 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 66 |ed the c|urrent f|
|000005a0| 6f 72 6d 61 74 2e 20 20 | 54 68 69 73 0a 77 6f 75 |ormat. |This.wou|
|000005b0| 6c 64 20 62 65 20 75 73 | 65 64 20 62 79 20 74 68 |ld be us|ed by th|
|000005c0| 65 20 64 65 62 75 67 67 | 65 72 2c 20 61 6e 64 20 |e debugg|er, and |
|000005d0| 61 6c 73 6f 20 63 6f 75 | 6c 64 20 62 65 20 75 73 |also cou|ld be us|
|000005e0| 65 64 20 62 79 20 70 75 | 72 69 66 79 20 74 6f 20 |ed by pu|rify to |
|000005f0| 64 65 6c 65 74 65 20 70 | 61 72 74 73 0a 6f 66 20 |delete p|arts.of |
|00000600| 74 68 65 20 64 65 62 75 | 67 2d 69 6e 66 6f 20 65 |the debu|g-info e|
|00000610| 76 65 6e 20 77 68 65 6e | 20 74 68 65 20 63 6f 6d |ven when| the com|
|00000620| 70 69 6c 65 72 20 64 75 | 6d 70 73 20 69 74 20 69 |piler du|mps it i|
|00000630| 6e 20 63 72 75 6e 63 68 | 65 64 20 66 6f 72 6d 2e |n crunch|ed form.|
|00000640| 0a 5b 4e 6f 74 65 20 74 | 68 61 74 20 74 68 69 73 |.[Note t|hat this|
|00000650| 20 69 73 6e 27 74 20 74 | 65 72 72 69 62 6c 79 20 | isn't t|erribly |
|00000660| 69 6d 70 6f 72 74 61 6e | 74 20 69 66 20 70 75 72 |importan|t if pur|
|00000670| 69 66 79 20 69 73 20 73 | 6d 61 72 74 20 61 62 6f |ify is s|mart abo|
|00000680| 75 74 0a 64 65 62 75 67 | 2d 69 6e 66 6f 2e 2e 2e |ut.debug|-info...|
|00000690| 5d 0a 7c 5c 23 0a 0a 0c | 0a 43 6f 6d 70 69 6c 65 |].|\#...|.Compile|
|000006a0| 64 20 73 6f 75 72 63 65 | 20 6d 61 70 20 72 65 70 |d source| map rep|
|000006b0| 72 65 73 65 6e 74 61 74 | 69 6f 6e 3a 0a 0a 5b 5c |resentat|ion:..[\|
|000006c0| 23 5c 23 5c 23 20 73 74 | 6f 72 65 20 69 6e 20 64 |#\#\# st|ore in d|
|000006d0| 65 62 75 67 2d 66 75 6e | 63 74 69 6f 6e 20 50 43 |ebug-fun|ction PC|
|000006e0| 20 61 74 20 77 68 69 63 | 68 20 65 6e 76 20 69 73 | at whic|h env is|
|000006f0| 20 70 72 6f 70 65 72 6c | 79 20 69 6e 69 74 69 61 | properl|y initia|
|00000700| 6c 69 7a 65 64 2c 20 69 | 2e 65 2e 0a 61 72 67 73 |lized, i|.e..args|
|00000710| 20 28 61 6e 64 20 72 65 | 74 75 72 6e 2d 70 63 2c | (and re|turn-pc,|
|00000720| 20 65 74 63 2e 29 20 69 | 6e 20 69 6e 74 65 72 6e | etc.) i|n intern|
|00000730| 61 6c 20 6c 6f 63 61 74 | 69 6f 6e 73 2e 20 20 54 |al locat|ions. T|
|00000740| 68 69 73 20 69 73 20 77 | 68 65 72 65 20 61 0a 3a |his is w|here a.:|
|00000750| 66 75 6e 63 74 69 6f 6e | 2d 73 74 61 72 74 20 62 |function|-start b|
|00000760| 72 65 61 6b 70 6f 69 6e | 74 20 77 6f 75 6c 64 20 |reakpoin|t would |
|00000770| 62 72 65 61 6b 2e 5d 0a | 0a 5b 5c 23 5c 23 5c 23 |break.].|.[\#\#\#|
|00000780| 20 4e 6f 74 65 20 74 68 | 61 74 20 74 68 61 74 20 | Note th|at that |
|00000790| 77 65 20 63 61 6e 20 65 | 61 73 69 6c 79 20 63 61 |we can e|asily ca|
|000007a0| 63 68 65 20 74 68 65 20 | 66 6f 72 6d 2d 6e 75 6d |che the |form-num|
|000007b0| 62 65 72 20 3d 3e 20 73 | 6f 75 72 63 65 2d 70 61 |ber => s|ource-pa|
|000007c0| 74 68 20 6f 72 0a 66 6f | 72 6d 2d 6e 75 6d 62 65 |th or.fo|rm-numbe|
|000007d0| 72 20 3d 3e 20 66 6f 72 | 6d 20 74 72 61 6e 73 6c |r => for|m transl|
|000007e0| 61 74 69 6f 6e 20 75 73 | 69 6e 67 20 61 20 76 65 |ation us|ing a ve|
|000007f0| 63 74 6f 72 20 69 6e 64 | 65 78 65 64 20 62 79 20 |ctor ind|exed by |
|00000800| 66 6f 72 6d 20 6e 75 6d | 62 65 72 73 20 74 68 61 |form num|bers tha|
|00000810| 74 20 77 65 0a 62 75 69 | 6c 64 20 64 75 72 69 6e |t we.bui|ld durin|
|00000820| 67 20 61 20 77 61 6c 6b | 2e 5d 0a 0a 0a 0a 0a 49 |g a walk|.].....I|
|00000830| 6e 73 74 65 61 64 20 6f | 66 20 75 73 69 6e 67 20 |nstead o|f using |
|00000840| 73 6f 75 72 63 65 20 70 | 61 74 68 73 20 69 6e 20 |source p|aths in |
|00000850| 74 68 65 20 64 65 62 75 | 67 2d 69 6e 66 6f 2c 20 |the debu|g-info, |
|00000860| 75 73 65 20 22 66 6f 72 | 6d 20 6e 75 6d 62 65 72 |use "for|m number|
|00000870| 73 22 2e 20 20 54 68 65 | 20 66 6f 72 6d 0a 6e 75 |s". The| form.nu|
|00000880| 6d 62 65 72 20 6f 66 20 | 61 20 66 6f 72 6d 20 69 |mber of |a form i|
|00000890| 73 20 74 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |s the nu|mber of |
|000008a0| 66 6f 72 6d 73 20 74 68 | 61 74 20 77 65 20 77 61 |forms th|at we wa|
|000008b0| 6c 6b 20 74 6f 20 72 65 | 61 63 68 20 74 68 61 74 |lk to re|ach that|
|000008c0| 20 66 6f 72 6d 20 77 68 | 65 6e 0a 64 6f 69 6e 67 | form wh|en.doing|
|000008d0| 20 61 20 70 72 65 2d 6f | 72 64 65 72 20 77 61 6c | a pre-o|rder wal|
|000008e0| 6b 20 6f 66 20 74 68 65 | 20 73 6f 75 72 63 65 20 |k of the| source |
|000008f0| 66 6f 72 6d 2e 20 20 5b | 4d 69 67 68 74 20 77 61 |form. [|Might wa|
|00000900| 6e 74 20 74 6f 20 75 73 | 65 20 61 20 70 6f 73 74 |nt to us|e a post|
|00000910| 2d 6f 72 64 65 72 0a 77 | 61 6c 6b 2c 20 61 73 20 |-order.w|alk, as |
|00000920| 74 68 61 74 20 77 6f 75 | 6c 64 20 6d 6f 72 65 20 |that wou|ld more |
|00000930| 63 6c 6f 73 65 6c 79 20 | 61 70 70 72 6f 78 69 6d |closely |approxim|
|00000940| 61 74 65 20 65 76 61 6c | 75 61 74 69 6f 6e 20 6f |ate eval|uation o|
|00000950| 72 64 65 72 2e 5d 0a 0a | 0a 57 65 20 70 72 6f 62 |rder.]..|.We prob|
|00000960| 61 62 6c 79 20 77 61 6e | 74 20 74 6f 20 63 6f 6e |ably wan|t to con|
|00000970| 74 69 6e 75 65 20 75 73 | 69 6e 67 20 73 6f 75 72 |tinue us|ing sour|
|00000980| 63 65 2d 70 61 74 68 73 | 20 69 6e 20 74 68 65 20 |ce-paths| in the |
|00000990| 63 6f 6d 70 69 6c 65 72 | 2c 20 73 69 6e 63 65 20 |compiler|, since |
|000009a0| 74 68 65 79 20 61 72 65 | 0a 71 75 69 63 6b 20 74 |they are|.quick t|
|000009b0| 6f 20 63 6f 6d 70 75 74 | 65 20 61 6e 64 20 74 6f |o comput|e and to|
|000009c0| 20 67 65 74 20 79 6f 75 | 20 74 6f 20 61 20 70 61 | get you| to a pa|
|000009d0| 72 74 69 63 75 6c 61 72 | 20 66 6f 72 6d 2e 20 20 |rticular| form. |
|000009e0| 5b 5c 23 5c 23 5c 23 20 | 42 75 74 20 61 63 74 75 |[\#\#\# |But actu|
|000009f0| 61 6c 6c 79 2c 20 49 0a | 67 75 65 73 73 20 77 65 |ally, I.|guess we|
|00000a00| 20 64 6f 6e 27 74 20 68 | 61 76 65 20 74 6f 20 70 | don't h|ave to p|
|00000a10| 72 65 63 6f 6d 70 75 74 | 65 20 74 68 65 20 73 6f |recomput|e the so|
|00000a20| 75 72 63 65 20 70 61 74 | 68 73 20 61 6e 64 20 61 |urce pat|hs and a|
|00000a30| 6e 6e 6f 74 61 74 65 20 | 6e 6f 64 65 73 20 77 69 |nnotate |nodes wi|
|00000a40| 74 68 0a 74 68 65 6d 3a | 20 69 6e 73 74 65 61 64 |th.them:| instead|
|00000a50| 20 77 65 20 63 6f 75 6c | 64 20 61 6e 6e 6f 74 61 | we coul|d annota|
|00000a60| 74 65 20 74 68 65 20 6e | 6f 64 65 73 20 77 69 74 |te the n|odes wit|
|00000a70| 68 20 74 68 65 20 61 63 | 74 75 61 6c 20 6f 72 69 |h the ac|tual ori|
|00000a80| 67 69 6e 61 6c 20 73 6f | 75 72 63 65 20 66 6f 72 |ginal so|urce for|
|00000a90| 6d 2e 0a 54 68 65 6e 20 | 69 66 20 77 65 20 77 61 |m..Then |if we wa|
|00000aa0| 6e 74 65 64 20 74 6f 20 | 66 69 6e 64 20 74 68 65 |nted to |find the|
|00000ab0| 20 6c 6f 63 61 74 69 6f | 6e 20 6f 66 20 74 68 61 | locatio|n of tha|
|00000ac0| 74 20 66 6f 72 6d 2c 20 | 77 65 20 63 6f 75 6c 64 |t form, |we could|
|00000ad0| 20 77 61 6c 6b 20 74 68 | 65 20 72 6f 6f 74 0a 73 | walk th|e root.s|
|00000ae0| 6f 75 72 63 65 20 66 6f | 72 6d 2c 20 6c 6f 6f 6b |ource fo|rm, look|
|00000af0| 69 6e 67 20 74 68 61 74 | 20 6f 72 69 67 69 6e 61 |ing that| origina|
|00000b00| 6c 20 66 6f 72 6d 2e 20 | 20 42 75 74 20 77 65 20 |l form. | But we |
|00000b10| 6d 69 67 68 74 20 73 74 | 69 6c 6c 20 6e 65 65 64 |might st|ill need|
|00000b20| 20 74 6f 20 65 6e 74 65 | 72 20 61 6c 6c 0a 74 68 | to ente|r all.th|
|00000b30| 65 20 66 6f 72 6d 73 20 | 69 6e 20 61 20 68 61 73 |e forms |in a has|
|00000b40| 68 74 61 62 6c 65 20 73 | 6f 20 74 68 61 74 20 77 |htable s|o that w|
|00000b50| 65 20 63 61 6e 20 74 65 | 6c 6c 20 64 75 72 69 6e |e can te|ll durin|
|00000b60| 67 20 49 52 31 20 63 6f | 6e 76 65 72 73 69 6f 6e |g IR1 co|nversion|
|00000b70| 20 74 68 61 74 20 61 20 | 67 69 76 65 6e 0a 66 6f | that a |given.fo|
|00000b80| 72 6d 20 61 70 70 65 61 | 72 65 64 20 69 6e 20 74 |rm appea|red in t|
|00000b90| 68 65 20 6f 72 69 67 69 | 6e 61 6c 20 73 6f 75 72 |he origi|nal sour|
|00000ba0| 63 65 2e 5d 0a 0a 0a 4e | 6f 74 65 20 74 68 61 74 |ce.]...N|ote that|
|00000bb0| 20 66 6f 72 6d 20 6e 75 | 6d 62 65 72 73 20 68 61 | form nu|mbers ha|
|00000bc0| 76 65 20 61 6e 20 69 6e | 74 65 72 65 73 74 69 6e |ve an in|terestin|
|00000bd0| 67 20 70 72 6f 70 65 72 | 74 79 3a 20 69 74 20 69 |g proper|ty: it i|
|00000be0| 73 20 71 75 69 74 65 20 | 65 66 66 69 63 69 65 6e |s quite |efficien|
|00000bf0| 74 20 74 6f 0a 64 65 74 | 65 72 6d 69 6e 65 20 77 |t to.det|ermine w|
|00000c00| 68 65 74 68 65 72 20 61 | 6e 20 61 72 62 69 74 72 |hether a|n arbitr|
|00000c10| 61 72 79 20 66 6f 72 6d | 20 69 73 20 61 20 73 75 |ary form| is a su|
|00000c20| 62 66 6f 72 6d 20 6f 66 | 20 73 6f 6d 65 20 6f 74 |bform of| some ot|
|00000c30| 68 65 72 20 66 6f 72 6d | 2c 20 73 69 6e 63 65 20 |her form|, since |
|00000c40| 74 68 65 0a 66 6f 72 6d | 20 6e 75 6d 62 65 72 20 |the.form| number |
|00000c50| 6f 66 20 42 20 77 69 6c | 6c 20 62 65 20 3e 20 74 |of B wil|l be > t|
|00000c60| 68 61 6e 20 41 27 73 20 | 6e 75 6d 62 65 72 20 61 |han A's |number a|
|00000c70| 6e 64 20 3c 20 41 27 73 | 20 6e 65 78 74 20 73 69 |nd < A's| next si|
|00000c80| 62 6c 69 6e 67 27 73 20 | 6e 75 6d 62 65 72 20 69 |bling's |number i|
|00000c90| 66 66 0a 42 20 69 73 20 | 61 20 73 75 62 66 6f 72 |ff.B is |a subfor|
|00000ca0| 6d 20 6f 66 20 41 2e 20 | 20 0a 0a 54 68 69 73 20 |m of A. | ..This |
|00000cb0| 73 68 6f 75 6c 64 20 62 | 65 20 71 75 69 74 65 20 |should b|e quite |
|00000cc0| 75 73 65 66 75 6c 20 66 | 6f 72 20 64 6f 69 6e 67 |useful f|or doing|
|00000cd0| 20 74 68 65 20 73 6f 75 | 72 63 65 3d 3e 70 63 20 | the sou|rce=>pc |
|00000ce0| 6d 61 70 70 69 6e 67 20 | 69 6e 20 74 68 65 20 64 |mapping |in the d|
|00000cf0| 65 62 75 67 67 65 72 2c | 0a 73 69 6e 63 65 20 74 |ebugger,|.since t|
|00000d00| 68 61 74 20 70 72 6f 62 | 6c 65 6d 20 72 65 64 75 |hat prob|lem redu|
|00000d10| 63 65 73 20 74 6f 20 66 | 69 6e 64 69 6e 67 20 74 |ces to f|inding t|
|00000d20| 68 65 20 73 75 62 73 65 | 74 20 6f 66 20 74 68 65 |he subse|t of the|
|00000d30| 20 6b 6e 6f 77 6e 20 6c | 6f 63 61 74 69 6f 6e 73 | known l|ocations|
|00000d40| 20 74 68 61 74 0a 61 72 | 65 20 66 6f 72 20 73 75 | that.ar|e for su|
|00000d50| 62 66 6f 72 6d 73 20 6f | 66 20 74 68 65 20 73 70 |bforms o|f the sp|
|00000d60| 65 63 69 66 69 65 64 20 | 66 6f 72 6d 2e 0a 0a 0a |ecified |form....|
|00000d70| 41 73 73 75 6d 65 20 61 | 20 62 79 74 65 20 76 65 |Assume a| byte ve|
|00000d80| 63 74 6f 72 20 77 69 74 | 68 20 61 20 73 74 61 6e |ctor wit|h a stan|
|00000d90| 64 61 72 64 20 76 61 72 | 69 61 62 6c 65 2d 6c 65 |dard var|iable-le|
|00000da0| 6e 67 74 68 20 69 6e 74 | 65 67 65 72 20 66 6f 72 |ngth int|eger for|
|00000db0| 6d 61 74 2c 20 73 6f 6d | 65 74 68 69 6e 67 0a 6c |mat, som|ething.l|
|00000dc0| 69 6b 65 20 74 68 69 73 | 3a 0a 20 20 20 20 30 2e |ike this|:. 0.|
|00000dd0| 2e 32 35 33 20 3d 3e 20 | 74 68 65 20 69 6e 74 65 |.253 => |the inte|
|00000de0| 67 65 72 0a 20 20 20 20 | 32 35 34 20 3d 3e 20 72 |ger. |254 => r|
|00000df0| 65 61 64 20 6e 65 78 74 | 20 74 77 6f 20 62 79 74 |ead next| two byt|
|00000e00| 65 73 20 66 6f 72 20 69 | 6e 74 65 67 65 72 0a 20 |es for i|nteger. |
|00000e10| 20 20 20 32 35 35 20 3d | 3e 20 72 65 61 64 20 6e | 255 =|> read n|
|00000e20| 65 78 74 20 66 6f 75 72 | 20 62 79 74 65 73 20 66 |ext four| bytes f|
|00000e30| 6f 72 20 69 6e 74 65 67 | 65 72 0a 0a 54 68 65 6e |or integ|er..Then|
|00000e40| 20 61 20 63 6f 6d 70 69 | 6c 65 64 20 64 65 62 75 | a compi|led debu|
|00000e50| 67 20 62 6c 6f 63 6b 20 | 69 73 20 6a 75 73 74 20 |g block |is just |
|00000e60| 61 20 73 65 71 75 65 6e | 63 65 20 6f 66 20 76 61 |a sequen|ce of va|
|00000e70| 72 69 61 62 6c 65 2d 6c | 65 6e 67 74 68 20 69 6e |riable-l|ength in|
|00000e80| 74 65 67 65 72 73 20 69 | 6e 20 61 0a 70 61 72 74 |tegers i|n a.part|
|00000e90| 69 63 75 6c 61 72 20 6f | 72 64 65 72 2c 20 73 6f |icular o|rder, so|
|00000ea0| 6d 65 74 68 69 6e 67 20 | 6c 69 6b 65 20 74 68 69 |mething |like thi|
|00000eb0| 73 3a 0a 20 20 20 20 6e | 75 6d 62 65 72 20 6f 66 |s:. n|umber of|
|00000ec0| 20 73 75 63 63 65 73 73 | 6f 72 73 0a 20 20 20 20 | success|ors. |
|00000ed0| 2e 2e 2e 6f 66 66 73 65 | 74 73 20 6f 66 20 65 61 |...offse|ts of ea|
|00000ee0| 63 68 20 73 75 63 63 65 | 73 73 6f 72 20 69 6e 20 |ch succe|ssor in |
|00000ef0| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 27 73 20 62 |the func|tion's b|
|00000f00| 6c 6f 63 6b 73 20 76 65 | 63 74 6f 72 2e 2e 2e 0a |locks ve|ctor....|
|00000f10| 20 20 20 20 66 69 72 73 | 74 20 50 43 0a 20 20 20 | firs|t PC. |
|00000f20| 20 5b 6f 66 66 73 65 74 | 20 6f 66 20 66 69 72 73 | [offset| of firs|
|00000f30| 74 20 74 6f 70 2d 6c 65 | 76 65 6c 20 66 6f 72 6d |t top-le|vel form|
|00000f40| 20 28 69 6e 20 66 6f 72 | 6d 73 29 20 28 6f 6e 6c | (in for|ms) (onl|
|00000f50| 79 20 69 66 20 6e 6f 74 | 20 63 6f 6d 70 6f 6e 65 |y if not| compone|
|00000f60| 6e 74 20 64 65 66 61 75 | 6c 74 29 5d 0a 20 20 20 |nt defau|lt)]. |
|00000f70| 20 66 6f 72 6d 20 6e 75 | 6d 62 65 72 20 6f 66 20 | form nu|mber of |
|00000f80| 66 69 72 73 74 20 73 6f | 75 72 63 65 20 66 6f 72 |first so|urce for|
|00000f90| 6d 0a 20 20 20 20 66 69 | 72 73 74 20 6c 69 76 65 |m. fi|rst live|
|00000fa0| 20 6d 61 73 6b 20 28 6c | 65 6e 67 74 68 20 69 6e | mask (l|ength in|
|00000fb0| 20 62 79 74 65 73 20 64 | 65 74 65 72 6d 69 6e 65 | bytes d|etermine|
|00000fc0| 64 20 62 79 20 6e 75 6d | 62 65 72 20 6f 66 20 56 |d by num|ber of V|
|00000fd0| 41 52 49 41 42 4c 45 53 | 29 0a 20 20 20 20 2e 2e |ARIABLES|). ..|
|00000fe0| 2e 6d 6f 72 65 20 3c 50 | 43 2c 20 74 6f 70 2d 6c |.more <P|C, top-l|
|00000ff0| 65 76 65 6c 20 66 6f 72 | 6d 20 6f 66 66 73 65 74 |evel for|m offset|
|00001000| 2c 20 66 6f 72 6d 2d 6e | 75 6d 62 65 72 2c 20 6c |, form-n|umber, l|
|00001010| 69 76 65 2d 73 65 74 3e | 20 74 75 70 6c 65 73 2e |ive-set>| tuples.|
|00001020| 2e 2e 0a 0a 57 65 20 64 | 65 74 65 72 6d 69 6e 65 |....We d|etermine|
|00001030| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 6c | the num|ber of l|
|00001040| 6f 63 61 74 69 6f 6e 73 | 20 72 65 63 6f 72 64 65 |ocations| recorde|
|00001050| 64 20 69 6e 20 61 20 62 | 6c 6f 63 6b 20 62 79 20 |d in a b|lock by |
|00001060| 74 68 65 20 66 69 6e 64 | 69 6e 67 20 74 68 65 0a |the find|ing the.|
|00001070| 73 74 61 72 74 20 6f 66 | 20 74 68 65 20 6e 65 78 |start of| the nex|
|00001080| 74 20 63 6f 6d 70 69 6c | 65 64 20 64 65 62 75 67 |t compil|ed debug|
|00001090| 20 62 6c 6f 63 6b 20 69 | 6e 20 74 68 65 20 62 6c | block i|n the bl|
|000010a0| 6f 63 6b 73 20 76 65 63 | 74 6f 72 2e 0a 0a 5b 5c |ocks vec|tor...[\|
|000010b0| 23 5c 23 5c 23 20 41 63 | 74 75 61 6c 6c 79 2c 20 |#\#\# Ac|tually, |
|000010c0| 6f 6e 6c 79 20 6e 65 65 | 64 20 32 20 62 69 74 73 |only nee|d 2 bits|
|000010d0| 20 66 6f 72 20 6e 75 6d | 62 65 72 20 6f 66 20 73 | for num|ber of s|
|000010e0| 75 63 63 65 73 73 6f 72 | 73 20 7b 30 2c 31 2c 32 |uccessor|s {0,1,2|
|000010f0| 7d 2e 20 20 57 65 20 6d | 69 67 68 74 0a 77 61 6e |}. We m|ight.wan|
|00001100| 74 20 74 6f 20 75 73 65 | 20 6f 74 68 65 72 20 62 |t to use| other b|
|00001110| 69 74 73 20 69 6e 20 74 | 68 65 20 66 69 72 73 74 |its in t|he first|
|00001120| 20 62 79 74 65 20 74 6f | 20 69 6e 64 69 63 61 74 | byte to| indicat|
|00001130| 65 20 74 68 65 20 6b 69 | 6e 64 20 6f 66 20 6c 6f |e the ki|nd of lo|
|00001140| 63 61 74 69 6f 6e 2e 5d | 0a 5b 5c 23 5c 23 5c 23 |cation.]|.[\#\#\#|
|00001150| 20 57 65 20 63 6f 75 6c | 64 20 73 75 70 70 6f 72 | We coul|d suppor|
|00001160| 74 20 6c 6f 63 61 6c 20 | 70 61 63 6b 69 6e 67 20 |t local |packing |
|00001170| 62 79 20 68 61 76 69 6e | 67 20 61 20 67 65 6e 65 |by havin|g a gene|
|00001180| 72 61 6c 20 63 6f 6e 63 | 65 70 74 20 6f 66 20 22 |ral conc|ept of "|
|00001190| 61 6c 74 65 72 6e 61 74 | 65 0a 6c 6f 63 61 74 69 |alternat|e.locati|
|000011a0| 6f 6e 73 22 20 69 6e 73 | 74 65 61 64 20 6f 66 20 |ons" ins|tead of |
|000011b0| 6a 75 73 74 20 72 65 67 | 75 6c 61 72 20 61 6e 64 |just reg|ular and|
|000011c0| 20 73 61 76 65 20 6c 6f | 63 61 74 69 6f 6e 73 2e | save lo|cations.|
|000011d0| 20 20 54 68 65 20 6c 6f | 63 61 74 69 6f 6e 20 77 | The lo|cation w|
|000011e0| 6f 75 6c 64 20 68 61 76 | 65 0a 61 20 62 69 74 20 |ould hav|e.a bit |
|000011f0| 69 6e 64 69 63 61 74 69 | 6e 67 20 74 68 61 74 20 |indicati|ng that |
|00001200| 74 68 65 72 65 20 61 72 | 65 20 61 6c 74 65 72 6e |there ar|e altern|
|00001210| 61 74 65 20 6c 6f 63 61 | 74 69 6f 6e 73 2c 20 69 |ate loca|tions, i|
|00001220| 6e 20 77 68 69 63 68 20 | 63 61 73 65 20 77 65 20 |n which |case we |
|00001230| 72 65 61 64 20 74 68 65 | 0a 6e 75 6d 62 65 72 20 |read the|.number |
|00001240| 6f 66 20 61 6c 74 65 72 | 6e 61 74 65 20 6c 6f 63 |of alter|nate loc|
|00001250| 61 74 69 6f 6e 73 20 61 | 6e 64 20 74 68 65 6e 20 |ations a|nd then |
|00001260| 74 68 61 74 20 6d 61 6e | 79 20 6d 6f 72 65 20 53 |that man|y more S|
|00001270| 43 2d 4f 46 46 53 45 54 | 73 2e 20 20 49 6e 20 74 |C-OFFSET|s. In t|
|00001280| 68 65 0a 64 65 62 75 67 | 2d 62 6c 6f 63 6b 2c 20 |he.debug|-block, |
|00001290| 77 65 20 77 6f 75 6c 64 | 20 68 61 76 65 20 61 20 |we would| have a |
|000012a0| 73 65 63 6f 6e 64 20 62 | 69 74 20 6d 61 73 6b 20 |second b|it mask |
|000012b0| 77 69 74 68 20 62 69 74 | 73 20 73 65 74 20 66 6f |with bit|s set fo|
|000012c0| 72 20 54 4e 73 20 74 68 | 61 74 20 61 72 65 20 69 |r TNs th|at are i|
|000012d0| 6e 0a 61 6e 20 61 6c 74 | 65 72 6e 61 74 65 20 6c |n.an alt|ernate l|
|000012e0| 6f 63 61 74 69 6f 6e 2e | 20 20 57 65 20 74 68 65 |ocation.| We the|
|000012f0| 6e 20 72 65 61 64 20 61 | 20 6e 75 6d 62 65 72 20 |n read a| number |
|00001300| 66 6f 72 20 65 61 63 68 | 20 73 75 63 68 20 54 4e |for each| such TN|
|00001310| 2c 20 77 69 74 68 20 74 | 68 65 20 76 61 6c 75 65 |, with t|he value|
|00001320| 0a 62 65 69 6e 67 20 69 | 6e 74 65 72 70 72 65 74 |.being i|nterpret|
|00001330| 65 64 20 61 73 20 61 6e | 20 69 6e 64 65 78 20 69 |ed as an| index i|
|00001340| 6e 74 6f 20 74 68 65 20 | 4c 6f 63 61 74 69 6f 6e |nto the |Location|
|00001350| 27 73 20 61 6c 74 65 72 | 6e 61 74 65 20 6c 6f 63 |'s alter|nate loc|
|00001360| 61 74 69 6f 6e 73 2e 5d | 0a 0a 0a 0a 49 74 20 6c |ations.]|....It l|
|00001370| 6f 6f 6b 73 20 6c 69 6b | 65 20 75 73 69 6e 67 20 |ooks lik|e using |
|00001380| 73 74 72 75 63 74 75 72 | 65 73 20 66 6f 72 20 74 |structur|es for t|
|00001390| 68 65 20 63 6f 6d 70 69 | 6c 65 64 2d 6c 6f 63 61 |he compi|led-loca|
|000013a0| 74 69 6f 6e 2d 69 6e 66 | 6f 20 69 73 20 74 6f 6f |tion-inf|o is too|
|000013b0| 20 62 75 6c 6b 79 2e 0a | 49 6e 73 74 65 61 64 20 | bulky..|Instead |
|000013c0| 77 65 20 6e 65 65 64 20 | 73 6f 6d 65 20 70 61 63 |we need |some pac|
|000013d0| 6b 65 64 20 62 69 6e 61 | 72 79 20 72 65 70 72 65 |ked bina|ry repre|
|000013e0| 73 65 6e 74 61 74 69 6f | 6e 2e 0a 0a 46 69 72 73 |sentatio|n...Firs|
|000013f0| 74 2c 20 6c 65 74 27 73 | 20 72 65 70 72 65 73 65 |t, let's| represe|
|00001400| 6e 74 20 61 20 53 43 2f | 6f 66 66 73 65 74 20 70 |nt a SC/|offset p|
|00001410| 61 69 72 20 77 69 74 68 | 20 61 6e 20 22 53 43 2d |air with| an "SC-|
|00001420| 4f 66 66 73 65 74 22 2c | 20 77 68 69 63 68 20 69 |Offset",| which i|
|00001430| 73 20 61 6e 0a 69 6e 74 | 65 67 65 72 20 77 69 74 |s an.int|eger wit|
|00001440| 68 20 74 68 65 20 53 43 | 20 69 6e 20 74 68 65 20 |h the SC| in the |
|00001450| 6c 6f 77 20 35 20 62 69 | 74 73 20 61 6e 64 20 74 |low 5 bi|ts and t|
|00001460| 68 65 20 6f 66 66 73 65 | 74 20 69 6e 20 74 68 65 |he offse|t in the|
|00001470| 20 72 65 6d 61 69 6e 69 | 6e 67 20 62 69 74 73 3a | remaini|ng bits:|
|00001480| 0a 20 20 20 20 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |. ---|--------|
|00001490| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000014a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000014b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 20 20 20 20 7c 20 |--------|-. | |
|000014c0| 4f 66 66 73 65 74 20 28 | 61 73 20 6d 61 6e 79 20 |Offset (|as many |
|000014d0| 62 69 74 73 20 61 73 20 | 6e 65 63 65 73 73 61 72 |bits as |necessar|
|000014e0| 79 29 20 7c 20 53 43 20 | 28 35 20 62 69 74 73 29 |y) | SC |(5 bits)|
|000014f0| 20 7c 0a 20 20 20 20 2d | 2d 2d 2d 2d 2d 2d 2d 2d | |. -|--------|
|00001500| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001510| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001520| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 50 72 6f 62 |--------|---.Prob|
|00001530| 61 62 6c 79 20 74 68 65 | 20 72 65 73 75 6c 74 20 |ably the| result |
|00001540| 73 68 6f 75 6c 64 20 62 | 65 20 63 6f 6e 73 74 72 |should b|e constr|
|00001550| 61 69 6e 65 64 20 74 6f | 20 66 69 74 20 69 6e 20 |ained to| fit in |
|00001560| 61 20 66 69 78 6e 75 6d | 2c 20 73 69 6e 63 65 20 |a fixnum|, since |
|00001570| 69 74 20 77 69 6c 6c 20 | 62 65 0a 6d 6f 72 65 20 |it will |be.more |
|00001580| 65 66 66 69 63 69 65 6e | 74 20 61 6e 64 20 67 69 |efficien|t and gi|
|00001590| 76 65 73 20 6d 6f 72 65 | 20 74 68 61 6e 20 65 6e |ves more| than en|
|000015a0| 6f 75 67 68 20 70 6f 73 | 73 69 62 6c 65 20 6f 66 |ough pos|sible of|
|000015b0| 66 73 65 74 73 2e 0a 0a | 57 65 20 63 61 6e 20 74 |fsets...|We can t|
|000015c0| 68 65 20 72 65 70 72 65 | 73 65 6e 74 20 61 20 63 |he repre|sent a c|
|000015d0| 6f 6d 70 69 6c 65 64 20 | 6c 6f 63 61 74 69 6f 6e |ompiled |location|
|000015e0| 20 6c 69 6b 65 20 74 68 | 69 73 3a 0a 20 20 20 20 | like th|is:. |
|000015f0| 73 69 6e 67 6c 65 20 62 | 79 74 65 20 6f 66 20 62 |single b|yte of b|
|00001600| 6f 6f 6c 65 61 6e 20 66 | 6c 61 67 73 3a 0a 09 75 |oolean f|lags:..u|
|00001610| 6e 69 6e 74 65 72 6e 65 | 64 20 6e 61 6d 65 0a 09 |ninterne|d name..|
|00001620| 70 61 63 6b 61 67 65 64 | 20 6e 61 6d 65 0a 09 65 |packaged| name..e|
|00001630| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2d 6c 69 76 65 0a |nvironme|nt-live.|
|00001640| 09 68 61 73 20 64 69 73 | 74 69 6e 63 74 20 73 61 |.has dis|tinct sa|
|00001650| 76 65 20 6c 6f 63 61 74 | 69 6f 6e 0a 20 20 20 20 |ve locat|ion. |
|00001660| 20 20 20 20 68 61 73 20 | 49 44 20 28 6e 61 6d 65 | has |ID (name|
|00001670| 20 6e 6f 74 20 75 6e 69 | 71 75 65 20 69 6e 20 74 | not uni|que in t|
|00001680| 68 69 73 20 66 75 6e 29 | 0a 20 20 20 20 6e 61 6d |his fun)|. nam|
|00001690| 65 20 6c 65 6e 67 74 68 | 20 69 6e 20 62 79 74 65 |e length| in byte|
|000016a0| 73 20 28 61 73 20 76 61 | 72 2d 6c 65 6e 67 74 68 |s (as va|r-length|
|000016b0| 20 69 6e 74 65 67 65 72 | 29 0a 20 20 20 20 2e 2e | integer|). ..|
|000016c0| 2e 6e 61 6d 65 20 62 79 | 74 65 73 2e 2e 2e 0a 20 |.name by|tes.... |
|000016d0| 20 20 20 5b 69 66 20 70 | 61 63 6b 61 67 65 64 2c | [if p|ackaged,|
|000016e0| 20 76 61 72 2d 6c 65 6e | 67 74 68 20 69 6e 74 65 | var-len|gth inte|
|000016f0| 67 65 72 20 74 68 61 74 | 20 69 73 20 70 61 63 6b |ger that| is pack|
|00001700| 61 67 65 20 6e 61 6d 65 | 20 6c 65 6e 67 74 68 5d |age name| length]|
|00001710| 0a 20 20 20 20 20 2e 2e | 2e 70 61 63 6b 61 67 65 |. ..|.package|
|00001720| 20 6e 61 6d 65 20 62 79 | 74 65 73 2e 2e 2e 5d 0a | name by|tes...].|
|00001730| 20 20 20 20 5b 49 66 20 | 68 61 73 20 49 44 2c 20 | [If |has ID, |
|00001740| 49 44 20 61 73 20 76 61 | 72 2d 6c 65 6e 67 74 68 |ID as va|r-length|
|00001750| 20 69 6e 74 65 67 65 72 | 5d 0a 20 20 20 20 53 43 | integer|]. SC|
|00001760| 2d 4f 66 66 73 65 74 20 | 6f 66 20 70 72 69 6d 61 |-Offset |of prima|
|00001770| 72 79 20 6c 6f 63 61 74 | 69 6f 6e 20 28 61 73 20 |ry locat|ion (as |
|00001780| 76 61 72 2d 6c 65 6e 67 | 74 68 20 69 6e 74 65 67 |var-leng|th integ|
|00001790| 65 72 29 0a 20 20 20 20 | 5b 49 66 20 68 61 73 20 |er). |[If has |
|000017a0| 73 61 76 65 20 53 43 2c | 20 53 43 2d 4f 66 66 73 |save SC,| SC-Offs|
|000017b0| 65 74 20 6f 66 20 73 61 | 76 65 20 6c 6f 63 61 74 |et of sa|ve locat|
|000017c0| 69 6f 6e 20 28 61 73 20 | 76 61 72 2d 6c 65 6e 67 |ion (as |var-leng|
|000017d0| 74 68 20 69 6e 74 65 67 | 65 72 29 5d 0a 0a 0a 0c |th integ|er)]....|
|000017e0| 0a 0a 42 75 74 20 66 6f | 72 20 61 20 77 68 69 7a |..But fo|r a whiz|
|000017f0| 7a 79 20 62 72 65 61 6b | 70 6f 69 6e 74 20 66 61 |zy break|point fa|
|00001800| 63 69 6c 69 74 79 2c 20 | 77 65 20 77 6f 75 6c 64 |cility, |we would|
|00001810| 20 6e 65 65 64 20 61 20 | 67 6f 6f 64 20 73 6f 75 | need a |good sou|
|00001820| 72 63 65 3d 3e 63 6f 64 | 65 20 6d 61 70 2e 0a 44 |rce=>cod|e map..D|
|00001830| 75 6d 70 69 6e 67 20 61 | 20 63 6f 6d 70 6c 65 74 |umping a| complet|
|00001840| 65 20 63 6f 64 65 3d 3e | 73 6f 75 72 63 65 20 6d |e code=>|source m|
|00001850| 61 70 20 6d 69 67 68 74 | 20 62 65 20 61 73 20 67 |ap might| be as g|
|00001860| 6f 6f 64 20 61 20 77 61 | 79 20 61 73 20 61 6e 79 |ood a wa|y as any|
|00001870| 20 74 6f 20 72 65 70 72 | 65 73 65 6e 74 0a 74 68 | to repr|esent.th|
|00001880| 69 73 2c 20 64 75 65 20 | 74 6f 20 74 68 65 20 6f |is, due |to the o|
|00001890| 6e 65 2d 74 6f 2d 6d 61 | 6e 79 20 72 65 6c 61 74 |ne-to-ma|ny relat|
|000018a0| 69 6f 6e 73 68 69 70 20 | 62 65 74 77 65 65 6e 20 |ionship |between |
|000018b0| 73 6f 75 72 63 65 20 61 | 6e 64 20 63 6f 64 65 20 |source a|nd code |
|000018c0| 6c 6f 63 61 74 69 6f 6e | 73 2e 0a 0a 57 65 20 6d |location|s...We m|
|000018d0| 69 67 68 74 20 62 65 20 | 61 62 6c 65 20 74 6f 20 |ight be |able to |
|000018e0| 67 65 74 20 61 77 61 79 | 20 77 69 74 68 20 6a 75 |get away| with ju|
|000018f0| 73 74 20 73 74 6f 72 69 | 6e 67 20 74 68 65 20 73 |st stori|ng the s|
|00001900| 6f 75 72 63 65 20 6c 6f | 63 61 74 69 6f 6e 73 20 |ource lo|cations |
|00001910| 66 6f 72 20 74 68 65 0a | 62 65 67 69 6e 6e 69 6e |for the.|beginnin|
|00001920| 67 73 20 6f 66 20 62 6c | 6f 63 6b 73 20 61 6e 64 |gs of bl|ocks and|
|00001930| 20 6d 61 69 6e 74 61 69 | 6e 69 6e 67 20 61 20 6d | maintai|ning a m|
|00001940| 61 70 70 69 6e 67 20 66 | 72 6f 6d 20 63 6f 64 65 |apping f|rom code|
|00001950| 20 72 61 6e 67 65 73 20 | 74 6f 20 62 6c 6f 63 6b | ranges |to block|
|00001960| 73 2e 0a 54 68 69 73 20 | 77 6f 75 6c 64 20 62 65 |s..This |would be|
|00001970| 20 66 69 6e 65 20 62 6f | 74 68 20 66 6f 72 20 74 | fine bo|th for t|
|00001980| 68 65 20 70 72 6f 66 69 | 6c 65 72 20 61 6e 64 20 |he profi|ler and |
|00001990| 66 6f 72 20 74 68 65 20 | 22 77 68 65 72 65 20 61 |for the |"where a|
|000019a0| 6d 20 49 20 72 75 6e 6e | 69 6e 67 20 6e 6f 77 22 |m I runn|ing now"|
|000019b0| 0a 69 6e 64 69 63 61 74 | 69 6f 6e 2e 20 20 55 73 |.indicat|ion. Us|
|000019c0| 65 72 73 20 6d 69 67 68 | 74 20 61 6c 73 6f 20 62 |ers migh|t also b|
|000019d0| 65 20 63 6f 6e 76 69 6e | 63 65 64 20 74 68 61 74 |e convin|ced that|
|000019e0| 20 69 74 20 77 61 73 20 | 6d 6f 73 74 20 69 6e 74 | it was |most int|
|000019f0| 65 72 65 73 74 69 6e 67 | 20 74 6f 0a 62 72 65 61 |eresting| to.brea|
|00001a00| 6b 20 61 74 20 62 6c 6f | 63 6b 20 73 74 61 72 74 |k at blo|ck start|
|00001a10| 73 2c 20 62 75 74 20 49 | 20 64 6f 6e 27 74 20 72 |s, but I| don't r|
|00001a20| 65 61 6c 6c 79 20 6b 6e | 6f 77 20 68 6f 77 20 65 |eally kn|ow how e|
|00001a30| 61 73 69 6c 79 20 70 65 | 6f 70 6c 65 20 63 6f 75 |asily pe|ople cou|
|00001a40| 6c 64 20 64 65 76 65 6c | 6f 70 0a 61 6e 20 75 6e |ld devel|op.an un|
|00001a50| 64 65 72 73 74 61 6e 64 | 69 6e 67 20 6f 66 20 62 |derstand|ing of b|
|00001a60| 61 73 69 63 20 62 6c 6f | 63 6b 73 2e 0a 0a 49 74 |asic blo|cks...It|
|00001a70| 20 63 6f 75 6c 64 20 61 | 6c 73 6f 20 62 65 20 61 | could a|lso be a|
|00001a80| 20 62 69 74 20 74 72 69 | 63 6b 79 20 74 6f 20 6d | bit tri|cky to m|
|00001a90| 61 70 20 61 6e 20 61 72 | 62 69 74 72 61 72 79 20 |ap an ar|bitrary |
|00001aa0| 75 73 65 72 2d 64 65 73 | 69 67 6e 61 74 65 64 20 |user-des|ignated |
|00001ab0| 73 6f 75 72 63 65 0a 6c | 6f 63 61 74 69 6f 6e 20 |source.l|ocation |
|00001ac0| 74 6f 20 73 6f 6d 65 20 | 22 63 6c 6f 73 65 73 74 |to some |"closest|
|00001ad0| 22 20 73 6f 75 72 63 65 | 20 6c 6f 63 61 74 69 6f |" source| locatio|
|00001ae0| 6e 20 61 63 74 75 61 6c | 6c 79 20 69 6e 20 74 68 |n actual|ly in th|
|00001af0| 65 20 64 65 62 75 67 20 | 69 6e 66 6f 2e 0a 54 68 |e debug |info..Th|
|00001b00| 69 73 20 70 72 6f 62 6c | 65 6d 20 70 72 6f 62 61 |is probl|em proba|
|00001b10| 62 6c 79 20 65 78 69 73 | 74 73 20 74 6f 20 73 6f |bly exis|ts to so|
|00001b20| 6d 65 20 64 65 67 72 65 | 65 20 65 76 65 6e 20 77 |me degre|e even w|
|00001b30| 69 74 68 20 61 20 66 75 | 6c 6c 20 73 6f 75 72 63 |ith a fu|ll sourc|
|00001b40| 65 20 6d 61 70 2c 20 73 | 69 6e 63 65 0a 73 6f 6d |e map, s|ince.som|
|00001b50| 65 20 66 6f 72 6d 73 20 | 77 69 6c 6c 20 6e 65 76 |e forms |will nev|
|00001b60| 65 72 20 61 70 70 65 61 | 72 20 61 73 20 74 68 65 |er appea|r as the|
|00001b70| 20 73 6f 75 72 63 65 20 | 6f 66 20 61 6e 79 20 6e | source |of any n|
|00001b80| 6f 64 65 2e 20 20 49 74 | 20 73 65 65 6d 73 20 79 |ode. It| seems y|
|00001b90| 6f 75 20 6d 69 67 68 74 | 0a 68 61 76 65 20 74 6f |ou might|.have to|
|00001ba0| 20 6e 65 67 6f 74 69 61 | 74 65 20 77 69 74 68 20 | negotia|te with |
|00001bb0| 74 68 65 20 75 73 65 72 | 2e 20 20 48 65 20 77 6f |the user|. He wo|
|00001bc0| 75 6c 64 20 6d 6f 75 73 | 65 20 73 6f 6d 65 74 68 |uld mous|e someth|
|00001bd0| 69 6e 67 2c 20 61 6e 64 | 20 74 68 65 6e 20 79 6f |ing, and| then yo|
|00001be0| 75 20 77 6f 75 6c 64 0a | 68 69 67 68 6c 69 67 68 |u would.|highligh|
|00001bf0| 74 20 73 6f 6d 65 20 73 | 6f 75 72 63 65 20 66 6f |t some s|ource fo|
|00001c00| 72 6d 20 74 68 61 74 20 | 68 61 73 20 61 20 63 6f |rm that |has a co|
|00001c10| 6d 6d 6f 6e 20 70 72 65 | 66 69 78 20 28 69 2e 65 |mmon pre|fix (i.e|
|00001c20| 2e 20 69 73 20 61 20 70 | 72 65 66 69 78 20 6f 66 |. is a p|refix of|
|00001c30| 20 74 68 65 0a 75 73 65 | 72 20 70 61 74 68 2c 20 | the.use|r path, |
|00001c40| 6f 72 20 76 69 63 65 2d | 76 65 72 73 61 2e 29 20 |or vice-|versa.) |
|00001c50| 20 49 66 20 74 68 65 79 | 20 61 72 65 6e 27 74 20 | If they| aren't |
|00001c60| 68 61 70 70 79 20 77 69 | 74 68 20 74 68 65 20 72 |happy wi|th the r|
|00001c70| 65 73 75 6c 74 2c 20 74 | 68 65 79 20 63 6f 75 6c |esult, t|hey coul|
|00001c80| 64 0a 74 72 79 20 73 6f | 6d 65 74 68 69 6e 67 20 |d.try so|mething |
|00001c90| 65 6c 73 65 2e 20 20 49 | 6e 20 73 6f 6d 65 20 63 |else. I|n some c|
|00001ca0| 61 73 65 73 2c 20 74 68 | 65 20 64 65 73 69 67 6e |ases, th|e design|
|00001cb0| 61 74 65 64 20 70 61 74 | 68 20 6d 69 67 68 74 20 |ated pat|h might |
|00001cc0| 62 65 20 61 20 70 72 65 | 66 69 78 20 6f 66 0a 73 |be a pre|fix of.s|
|00001cd0| 65 76 65 72 61 6c 20 70 | 61 74 68 73 2e 20 20 54 |everal p|aths. T|
|00001ce0| 68 69 73 20 61 6d 62 69 | 67 75 69 74 79 20 6d 69 |his ambi|guity mi|
|00001cf0| 67 68 74 20 62 65 20 72 | 65 73 6f 6c 76 65 64 20 |ght be r|esolved |
|00001d00| 62 79 20 70 69 63 6b 69 | 6e 67 20 74 68 65 20 73 |by picki|ng the s|
|00001d10| 68 6f 72 74 65 73 74 20 | 70 61 74 68 0a 6f 72 20 |hortest |path.or |
|00001d20| 6c 65 74 74 69 6e 67 20 | 74 68 65 20 75 73 65 72 |letting |the user|
|00001d30| 20 63 68 6f 6f 73 65 2e | 0a 0a 41 74 20 74 68 65 | choose.|..At the|
|00001d40| 20 70 72 69 6d 69 74 69 | 76 65 20 6c 65 76 65 6c | primiti|ve level|
|00001d50| 2c 20 49 20 67 75 65 73 | 73 20 77 68 61 74 20 74 |, I gues|s what t|
|00001d60| 68 69 73 20 6d 65 61 6e | 73 20 69 73 20 74 68 61 |his mean|s is tha|
|00001d70| 74 20 74 68 65 20 73 74 | 72 75 63 74 75 72 65 20 |t the st|ructure |
|00001d80| 6f 66 20 73 6f 75 72 63 | 65 0a 6c 6f 63 61 74 69 |of sourc|e.locati|
|00001d90| 6f 6e 73 20 28 69 2e 65 | 2e 20 73 6f 75 72 63 65 |ons (i.e|. source|
|00001da0| 20 70 61 74 68 73 29 20 | 6d 75 73 74 20 62 65 20 | paths) |must be |
|00001db0| 6b 6e 6f 77 6e 2c 20 61 | 6e 64 20 74 68 65 20 73 |known, a|nd the s|
|00001dc0| 6f 75 72 63 65 3d 3e 63 | 6f 64 65 20 6f 70 65 72 |ource=>c|ode oper|
|00001dd0| 61 74 69 6f 6e 0a 73 68 | 6f 75 6c 64 20 72 65 74 |ation.sh|ould ret|
|00001de0| 75 72 6e 20 61 20 6c 69 | 73 74 20 6f 66 20 3c 73 |urn a li|st of <s|
|00001df0| 6f 75 72 63 65 2c 63 6f | 64 65 3e 20 70 61 69 72 |ource,co|de> pair|
|00001e00| 73 2c 20 72 61 74 68 65 | 72 20 74 68 61 6e 20 6a |s, rathe|r than j|
|00001e10| 75 73 74 20 61 20 6c 69 | 73 74 20 6f 66 20 63 6f |ust a li|st of co|
|00001e20| 64 65 0a 6c 6f 63 61 74 | 69 6f 6e 73 2e 20 20 54 |de.locat|ions. T|
|00001e30| 68 69 73 20 61 6c 6c 6f | 77 73 20 74 68 65 20 64 |his allo|ws the d|
|00001e40| 65 62 75 67 67 65 72 20 | 74 6f 20 72 65 73 6f 6c |ebugger |to resol|
|00001e50| 76 65 20 74 68 65 20 61 | 6d 62 69 67 75 69 74 79 |ve the a|mbiguity|
|00001e60| 20 68 6f 77 65 76 65 72 | 20 69 74 20 77 61 6e 74 | however| it want|
|00001e70| 73 2e 0a 0a 49 20 67 75 | 65 73 73 20 74 68 65 20 |s...I gu|ess the |
|00001e80| 66 6f 72 6d 61 6c 20 64 | 65 66 69 6e 69 74 69 6f |formal d|efinitio|
|00001e90| 6e 20 6f 66 20 77 68 69 | 63 68 20 73 6f 75 72 63 |n of whi|ch sourc|
|00001ea0| 65 20 70 61 74 68 73 20 | 77 65 20 77 6f 75 6c 64 |e paths |we would|
|00001eb0| 20 72 65 74 75 72 6e 20 | 69 73 3a 0a 20 20 20 20 | return |is:. |
|00001ec0| 41 6c 6c 20 73 6f 75 72 | 63 65 20 70 61 74 68 73 |All sour|ce paths|
|00001ed0| 20 69 6e 20 74 68 65 20 | 64 65 62 75 67 20 69 6e | in the |debug in|
|00001ee0| 66 6f 20 74 68 61 74 20 | 68 61 76 65 20 61 20 6d |fo that |have a m|
|00001ef0| 61 78 69 6d 61 6c 20 63 | 6f 6d 6d 6f 6e 20 70 72 |aximal c|ommon pr|
|00001f00| 65 66 69 78 20 77 69 74 | 68 0a 20 20 20 20 74 68 |efix wit|h. th|
|00001f10| 65 20 73 70 65 63 69 66 | 69 65 64 20 70 61 74 68 |e specif|ied path|
|00001f20| 2e 20 20 69 2e 65 2e 20 | 69 66 20 73 65 76 65 72 |. i.e. |if sever|
|00001f30| 61 6c 20 70 61 74 68 73 | 20 68 61 76 65 20 74 68 |al paths| have th|
|00001f40| 65 20 63 6f 6d 70 6c 65 | 74 65 20 73 70 65 63 69 |e comple|te speci|
|00001f50| 66 69 65 64 20 70 61 74 | 68 0a 20 20 20 20 61 73 |fied pat|h. as|
|00001f60| 20 61 20 70 72 65 66 69 | 78 2c 20 77 65 20 72 65 | a prefi|x, we re|
|00001f70| 74 75 72 6e 20 74 68 65 | 6d 20 61 6c 6c 2e 20 20 |turn the|m all. |
|00001f80| 4f 74 68 65 72 77 69 73 | 65 2c 20 61 6c 6c 20 70 |Otherwis|e, all p|
|00001f90| 61 74 68 73 20 77 69 74 | 68 20 61 6e 20 65 71 75 |aths wit|h an equ|
|00001fa0| 61 6c 6c 79 0a 20 20 20 | 20 6c 61 72 67 65 20 63 |ally. | large c|
|00001fb0| 6f 6d 6d 6f 6e 20 70 72 | 65 66 69 78 20 61 72 65 |ommon pr|efix are|
|00001fc0| 20 72 65 74 75 72 6e 65 | 64 3a 20 69 66 20 74 68 | returne|d: if th|
|00001fd0| 65 20 70 61 74 68 20 77 | 69 74 68 20 74 68 65 20 |e path w|ith the |
|00001fe0| 6d 6f 73 74 20 69 6e 20 | 63 6f 6d 6d 6f 6e 0a 20 |most in |common. |
|00001ff0| 20 20 20 6d 61 74 63 68 | 65 73 20 6f 6e 6c 79 20 | match|es only |
|00002000| 74 68 65 20 66 69 72 73 | 74 20 74 68 72 65 65 20 |the firs|t three |
|00002010| 65 6c 65 6d 65 6e 74 73 | 2c 20 74 68 65 6e 20 77 |elements|, then w|
|00002020| 65 20 72 65 74 75 72 6e | 20 61 6c 6c 20 70 61 74 |e return| all pat|
|00002030| 68 73 20 74 68 61 74 20 | 6d 61 74 63 68 0a 20 20 |hs that |match. |
|00002040| 20 20 69 6e 20 74 68 65 | 20 66 69 72 73 74 20 74 | in the| first t|
|00002050| 68 72 65 65 20 65 6c 65 | 6d 65 6e 74 73 2e 20 20 |hree ele|ments. |
|00002060| 41 73 20 61 20 64 65 67 | 65 6e 65 72 61 74 65 20 |As a deg|enerate |
|00002070| 63 61 73 65 20 28 77 68 | 69 63 68 20 70 72 6f 62 |case (wh|ich prob|
|00002080| 61 62 6c 79 0a 20 20 20 | 20 73 68 6f 75 6c 64 6e |ably. | shouldn|
|00002090| 27 74 20 68 61 70 70 65 | 6e 29 2c 20 69 66 20 74 |'t happe|n), if t|
|000020a0| 68 65 72 65 20 69 73 20 | 6e 6f 20 70 61 74 68 20 |here is |no path |
|000020b0| 77 69 74 68 20 61 6e 79 | 74 68 69 6e 67 20 69 6e |with any|thing in|
|000020c0| 20 63 6f 6d 6d 6f 6e 2c | 20 74 68 65 6e 20 77 65 | common,| then we|
|000020d0| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 2a 61 6c 6c |. ret|urn *all|
|000020e0| 2a 20 6f 66 20 74 68 65 | 20 70 61 74 68 73 2e 0a |* of the| paths..|
|000020f0| 0a 0a 0a 49 6e 20 74 68 | 65 20 44 45 42 55 47 2d |...In th|e DEBUG-|
|00002100| 53 4f 55 52 43 45 20 73 | 74 72 75 63 74 75 72 65 |SOURCE s|tructure|
|00002110| 20 77 65 20 6d 61 79 20 | 75 6c 74 69 6d 61 74 65 | we may |ultimate|
|00002120| 6c 79 20 77 61 6e 74 20 | 61 20 76 65 63 74 6f 72 |ly want |a vector|
|00002130| 20 6f 66 20 74 68 65 20 | 73 74 61 72 74 0a 70 6f | of the |start.po|
|00002140| 73 69 74 69 6f 6e 73 20 | 6f 66 20 65 61 63 68 20 |sitions |of each |
|00002150| 73 6f 75 72 63 65 20 66 | 6f 72 6d 2c 20 73 69 6e |source f|orm, sin|
|00002160| 63 65 20 74 68 61 74 20 | 77 6f 75 6c 64 20 6d 61 |ce that |would ma|
|00002170| 6b 65 20 69 74 20 65 61 | 73 69 65 72 20 66 6f 72 |ke it ea|sier for|
|00002180| 20 74 68 65 20 64 65 62 | 75 67 67 65 72 0a 74 6f | the deb|ugger.to|
|00002190| 20 6c 6f 63 61 74 65 20 | 74 68 65 20 73 6f 75 72 | locate |the sour|
|000021a0| 63 65 2e 20 20 49 74 20 | 63 6f 75 6c 64 20 6a 75 |ce. It |could ju|
|000021b0| 73 74 20 6f 70 65 6e 20 | 74 68 65 20 66 69 6c 65 |st open |the file|
|000021c0| 2c 20 46 49 4c 45 2d 50 | 4f 53 49 54 49 4f 4e 20 |, FILE-P|OSITION |
|000021d0| 74 6f 20 74 68 65 20 66 | 6f 72 6d 2c 0a 64 6f 20 |to the f|orm,.do |
|000021e0| 61 20 52 45 41 44 2c 20 | 74 68 65 6e 20 6c 6f 6f |a READ, |then loo|
|000021f0| 70 20 64 6f 77 6e 20 74 | 68 65 20 73 6f 75 72 63 |p down t|he sourc|
|00002200| 65 20 70 61 74 68 2e 20 | 20 4f 66 20 63 6f 75 72 |e path. | Of cour|
|00002210| 73 65 2c 20 69 74 20 63 | 6f 75 6c 64 20 72 65 61 |se, it c|ould rea|
|00002220| 64 20 65 61 63 68 20 66 | 6f 72 6d 0a 73 74 61 72 |d each f|orm.star|
|00002230| 74 69 6e 67 20 66 72 6f | 6d 20 74 68 65 20 62 65 |ting fro|m the be|
|00002240| 67 69 6e 6e 69 6e 67 2c | 20 62 75 74 20 74 68 61 |ginning,| but tha|
|00002250| 74 20 6d 69 67 68 74 20 | 62 65 20 74 6f 6f 20 73 |t might |be too s|
|00002260| 6c 6f 77 2e 0a 0a 0a 44 | 6f 20 58 45 50 73 20 72 |low....D|o XEPs r|
|00002270| 65 61 6c 6c 79 20 6e 65 | 65 64 20 44 65 62 75 67 |eally ne|ed Debug|
|00002280| 2d 46 75 6e 63 74 69 6f | 6e 73 3f 20 20 54 68 65 |-Functio|ns? The|
|00002290| 20 6f 6e 6c 79 20 74 69 | 6d 65 20 74 68 61 74 20 | only ti|me that |
|000022a0| 77 65 20 77 69 6c 6c 20 | 63 6f 6d 6d 6f 6e 6c 79 |we will |commonly|
|000022b0| 20 65 6e 64 0a 75 70 20 | 69 6e 20 74 68 65 20 64 | end.up |in the d|
|000022c0| 65 62 75 67 67 65 72 20 | 6f 6e 20 61 6e 20 58 45 |ebugger |on an XE|
|000022d0| 50 20 69 73 20 77 68 65 | 6e 20 61 6e 20 61 72 67 |P is whe|n an arg|
|000022e0| 75 6d 65 6e 74 20 74 79 | 70 65 20 63 68 65 63 6b |ument ty|pe check|
|000022f0| 20 66 61 69 6c 73 2e 20 | 20 42 75 74 20 49 0a 73 | fails. | But I.s|
|00002300| 75 70 70 6f 73 65 20 69 | 74 20 77 6f 75 6c 64 20 |uppose i|t would |
|00002310| 62 65 20 6e 69 63 65 20 | 74 6f 20 62 65 20 61 62 |be nice |to be ab|
|00002320| 6c 65 20 74 6f 20 70 72 | 69 6e 74 20 74 68 65 20 |le to pr|int the |
|00002330| 61 72 67 75 6d 65 6e 74 | 73 20 70 61 73 73 65 64 |argument|s passed|
|00002340| 2e 2e 2e 0a 0a 0a 4e 6f | 74 65 20 74 68 61 74 20 |......No|te that |
|00002350| 61 73 73 65 6d 62 6c 65 | 72 2d 6c 65 76 65 6c 20 |assemble|r-level |
|00002360| 63 6f 64 65 20 6d 6f 74 | 69 6f 6e 20 73 75 63 68 |code mot|ion such|
|00002370| 20 61 73 20 70 69 70 65 | 6c 69 6e 65 20 72 65 6f | as pipe|line reo|
|00002380| 72 67 61 6e 69 7a 61 74 | 69 6f 6e 20 63 61 6e 20 |rganizat|ion can |
|00002390| 63 61 75 73 65 0a 70 72 | 6f 62 6c 65 6d 73 20 77 |cause.pr|oblems w|
|000023a0| 69 74 68 20 6f 75 72 20 | 50 43 20 6d 61 70 73 2e |ith our |PC maps.|
|000023b0| 20 20 54 68 65 20 61 73 | 73 65 6d 62 6c 65 72 20 | The as|sembler |
|000023c0| 6e 65 65 64 73 20 74 6f | 20 6b 6e 6f 77 20 74 68 |needs to| know th|
|000023d0| 61 74 20 64 65 62 75 67 | 20 69 6e 66 6f 20 6d 61 |at debug| info ma|
|000023e0| 72 6b 65 72 73 0a 61 72 | 65 20 64 69 66 66 65 72 |rkers.ar|e differ|
|000023f0| 65 6e 74 20 66 72 6f 6d | 20 72 65 61 6c 20 6c 61 |ent from| real la|
|00002400| 62 65 6c 73 20 61 6e 79 | 77 61 79 2c 20 73 6f 20 |bels any|way, so |
|00002410| 49 20 73 75 70 70 6f 73 | 65 20 69 74 20 63 6f 75 |I suppos|e it cou|
|00002420| 6c 64 20 69 6e 68 69 62 | 69 74 20 6d 6f 74 69 6f |ld inhib|it motio|
|00002430| 6e 0a 61 63 72 6f 73 73 | 20 64 65 62 75 67 20 6d |n.across| debug m|
|00002440| 61 72 6b 65 72 73 20 63 | 6f 6e 64 69 74 69 6f 6e |arkers c|ondition|
|00002450| 61 6c 20 6f 6e 20 70 6f | 6c 69 63 79 2e 20 20 49 |al on po|licy. I|
|00002460| 74 20 73 65 65 6d 73 20 | 75 6e 77 6f 72 74 68 77 |t seems |unworthw|
|00002470| 68 69 6c 65 20 74 6f 20 | 72 65 6d 65 6d 62 65 72 |hile to |remember|
|00002480| 0a 74 68 65 20 6e 6f 64 | 65 20 66 6f 72 20 65 61 |.the nod|e for ea|
|00002490| 63 68 20 69 6e 64 69 76 | 69 64 75 61 6c 20 69 6e |ch indiv|idual in|
|000024a0| 73 74 72 75 63 74 69 6f | 6e 2e 0a 0a 0a 46 6f 72 |structio|n....For|
|000024b0| 20 74 72 61 63 69 6e 67 | 20 62 6c 6f 63 6b 2d 63 | tracing| block-c|
|000024c0| 6f 6d 70 69 6c 65 64 20 | 63 61 6c 6c 73 3a 0a 20 |ompiled |calls:. |
|000024d0| 20 20 20 49 6e 66 6f 20 | 61 62 6f 75 74 20 72 65 | Info |about re|
|000024e0| 74 75 72 6e 20 76 61 6c | 75 65 20 70 61 73 73 69 |turn val|ue passi|
|000024f0| 6e 67 20 6c 6f 63 61 74 | 69 6f 6e 73 3f 0a 20 20 |ng locat|ions?. |
|00002500| 20 20 49 6e 66 6f 20 61 | 62 6f 75 74 20 77 68 65 | Info a|bout whe|
|00002510| 72 65 20 61 6c 6c 20 74 | 68 65 20 72 65 74 75 72 |re all t|he retur|
|00002520| 6e 73 20 61 72 65 3f 0a | 0a 57 65 20 64 65 66 69 |ns are?.|.We defi|
|00002530| 6e 69 74 65 6c 79 20 6e | 65 65 64 20 74 68 65 20 |nitely n|eed the |
|00002540| 72 65 74 75 72 6e 2d 76 | 61 6c 75 65 20 70 61 73 |return-v|alue pas|
|00002550| 73 69 6e 67 20 6c 6f 63 | 61 74 69 6f 6e 73 20 66 |sing loc|ations f|
|00002560| 6f 72 20 64 65 62 75 67 | 2d 72 65 74 75 72 6e 2e |or debug|-return.|
|00002570| 20 20 54 68 65 0a 71 75 | 65 73 74 69 6f 6e 20 69 | The.qu|estion i|
|00002580| 73 20 77 68 61 74 20 74 | 68 65 20 69 6e 74 65 72 |s what t|he inter|
|00002590| 66 61 63 65 20 73 68 6f | 75 6c 64 20 62 65 2e 20 |face sho|uld be. |
|000025a0| 20 57 65 20 64 6f 6e 27 | 74 20 72 65 61 6c 6c 79 | We don'|t really|
|000025b0| 20 77 61 6e 74 20 74 6f | 20 68 61 76 65 20 61 0a | want to| have a.|
|000025c0| 76 69 73 69 62 6c 65 20 | 64 65 62 75 67 2d 66 75 |visible |debug-fu|
|000025d0| 6e 63 74 69 6f 6e 2d 72 | 65 74 75 72 6e 2d 6c 6f |nction-r|eturn-lo|
|000025e0| 63 61 74 69 6f 6e 73 20 | 6f 70 65 72 61 74 69 6f |cations |operatio|
|000025f0| 6e 2c 20 73 69 6e 63 65 | 20 74 68 65 72 65 20 61 |n, since| there a|
|00002600| 72 65 20 76 61 72 69 6f | 75 73 0a 76 61 6c 75 65 |re vario|us.value|
|00002610| 20 70 61 73 73 69 6e 67 | 20 63 6f 6e 76 65 6e 74 | passing| convent|
|00002620| 69 6f 6e 73 2c 20 61 6e | 64 20 77 65 20 77 61 6e |ions, an|d we wan|
|00002630| 74 20 74 6f 20 70 61 70 | 65 72 20 6f 76 65 72 20 |t to pap|er over |
|00002640| 74 68 65 20 64 69 66 66 | 65 72 65 6e 63 65 73 2e |the diff|erences.|
|00002650| 0a 0a 0a 50 72 6f 62 61 | 62 6c 79 20 73 68 6f 75 |...Proba|bly shou|
|00002660| 6c 64 20 62 65 20 61 20 | 63 6f 6d 70 69 6c 65 72 |ld be a |compiler|
|00002670| 20 6f 70 74 69 6f 6e 20 | 74 6f 20 69 6e 69 74 69 | option |to initi|
|00002680| 61 6c 69 7a 65 20 73 74 | 61 63 6b 20 66 72 61 6d |alize st|ack fram|
|00002690| 65 20 74 6f 20 61 20 73 | 70 65 63 69 61 6c 0a 75 |e to a s|pecial.u|
|000026a0| 6e 69 6e 69 74 69 61 6c | 69 7a 65 64 20 6f 62 6a |ninitial|ized obj|
|000026b0| 65 63 74 20 28 73 6f 6d | 65 20 72 61 6e 64 6f 6d |ect (som|e random|
|000026c0| 20 69 6d 6d 65 64 69 61 | 74 65 20 74 79 70 65 29 | immedia|te type)|
|000026d0| 2e 20 20 54 68 69 73 20 | 77 6f 75 6c 64 20 61 69 |. This |would ai|
|000026e0| 64 20 64 65 62 75 67 67 | 69 6e 67 2c 0a 61 6e 64 |d debugg|ing,.and|
|000026f0| 20 77 6f 75 6c 64 20 61 | 6c 73 6f 20 68 65 6c 70 | would a|lso help|
|00002700| 20 47 43 20 70 72 6f 62 | 6c 65 6d 73 2e 20 20 46 | GC prob|lems. F|
|00002710| 6f 72 20 74 68 65 20 6c | 61 74 74 65 72 20 72 65 |or the l|atter re|
|00002720| 61 73 6f 6e 20 65 73 70 | 65 63 69 61 6c 6c 79 2c |ason esp|ecially,|
|00002730| 20 74 68 69 73 20 73 68 | 6f 75 6c 64 0a 62 65 20 | this sh|ould.be |
|00002740| 6c 6f 63 61 6c 6c 79 2d | 74 75 72 6e 2d 6f 6e 61 |locally-|turn-ona|
|00002750| 62 6c 65 20 28 6f 66 66 | 20 6f 66 20 70 6f 6c 69 |ble (off| of poli|
|00002760| 63 79 3f 20 20 74 68 65 | 20 6e 65 77 20 64 65 62 |cy? the| new deb|
|00002770| 75 67 2d 69 6e 66 6f 20 | 71 75 61 6c 69 74 79 3f |ug-info |quality?|
|00002780| 29 2e 0a 0a 0a 57 68 61 | 74 20 61 62 6f 75 74 20 |)....Wha|t about |
|00002790| 74 68 65 20 69 6e 74 65 | 72 66 61 63 65 20 62 65 |the inte|rface be|
|000027a0| 74 77 65 65 6e 20 74 68 | 65 20 65 76 61 6c 75 61 |tween th|e evalua|
|000027b0| 74 6f 72 20 61 6e 64 20 | 74 68 65 20 64 65 62 75 |tor and |the debu|
|000027c0| 67 67 65 72 3f 20 28 69 | 2e 65 2e 20 77 68 61 74 |gger? (i|.e. what|
|000027d0| 0a 68 61 70 70 65 6e 73 | 20 6f 6e 20 61 6e 20 65 |.happens| on an e|
|000027e0| 72 72 6f 72 2c 20 65 74 | 63 2e 29 20 20 43 6f 6d |rror, et|c.) Com|
|000027f0| 70 69 6c 65 72 20 65 72 | 72 6f 72 20 68 61 6e 64 |piler er|ror hand|
|00002800| 6c 69 6e 67 20 73 68 6f | 75 6c 64 20 62 65 20 69 |ling sho|uld be i|
|00002810| 6e 74 65 67 72 61 74 65 | 64 20 77 69 74 68 0a 72 |ntegrate|d with.r|
|00002820| 75 6e 2d 74 69 6d 65 20 | 65 72 72 6f 72 20 68 61 |un-time |error ha|
|00002830| 6e 64 6c 69 6e 67 2e 20 | 20 49 64 65 61 6c 6c 79 |ndling. | Ideally|
|00002840| 20 74 68 65 20 65 72 72 | 6f 72 20 6d 65 73 73 61 | the err|or messa|
|00002850| 67 65 73 20 73 68 6f 75 | 6c 64 20 6c 6f 6f 6b 20 |ges shou|ld look |
|00002860| 74 68 65 20 73 61 6d 65 | 2e 0a 50 72 61 63 74 69 |the same|..Practi|
|00002870| 63 61 6c 6c 79 2c 20 69 | 6e 20 73 6f 6d 65 20 63 |cally, i|n some c|
|00002880| 61 73 65 73 20 74 68 65 | 20 72 75 6e 2d 74 69 6d |ases the| run-tim|
|00002890| 65 20 65 72 72 6f 72 73 | 20 77 69 6c 6c 20 68 61 |e errors| will ha|
|000028a0| 76 65 20 6c 65 73 73 20 | 69 6e 66 6f 72 6d 61 74 |ve less |informat|
|000028b0| 69 6f 6e 2e 20 20 42 75 | 74 0a 74 68 65 20 65 72 |ion. Bu|t.the er|
|000028c0| 72 6f 72 20 73 68 6f 75 | 6c 64 20 6c 6f 6f 6b 20 |ror shou|ld look |
|000028d0| 74 68 65 20 73 61 6d 65 | 20 74 6f 20 74 68 65 20 |the same| to the |
|000028e0| 64 65 62 75 67 67 65 72 | 20 28 6f 72 20 61 74 20 |debugger| (or at |
|000028f0| 6c 65 61 73 74 20 73 69 | 6d 69 6c 61 72 29 2e 0a |least si|milar)..|
|00002900| 0a 0a 0c 0a 3b 3b 3b 3b | 20 44 65 62 75 67 67 65 |....;;;;| Debugge|
|00002910| 72 20 69 6e 74 65 72 66 | 61 63 65 3a 0a 0a 48 6f |r interf|ace:..Ho|
|00002920| 77 20 64 6f 65 73 20 74 | 68 65 20 64 65 62 75 67 |w does t|he debug|
|00002930| 67 65 72 20 69 6e 74 65 | 72 66 61 63 65 20 74 6f |ger inte|rface to|
|00002940| 20 74 68 65 20 22 65 76 | 61 6c 75 61 74 6f 72 22 | the "ev|aluator"|
|00002950| 20 28 77 68 65 72 65 20 | 74 68 65 20 65 76 61 6c | (where |the eval|
|00002960| 75 61 74 6f 72 20 6d 65 | 61 6e 73 0a 61 6c 6c 20 |uator me|ans.all |
|00002970| 6f 66 20 6e 61 74 69 76 | 65 20 63 6f 64 65 2c 20 |of nativ|e code, |
|00002980| 62 79 74 65 2d 63 6f 64 | 65 20 61 6e 64 20 69 6e |byte-cod|e and in|
|00002990| 74 65 72 70 72 65 74 65 | 64 20 49 52 31 29 3f 20 |terprete|d IR1)? |
|000029a0| 20 49 74 20 73 65 65 6d | 73 20 74 68 61 74 20 69 | It seem|s that i|
|000029b0| 74 20 77 6f 75 6c 64 20 | 62 65 0a 6d 75 63 68 20 |t would |be.much |
|000029c0| 6d 6f 72 65 20 73 74 72 | 61 69 67 68 74 66 6f 72 |more str|aightfor|
|000029d0| 77 61 72 64 20 74 6f 20 | 68 61 76 65 20 61 20 63 |ward to |have a c|
|000029e0| 6f 6e 73 69 73 74 65 6e | 74 20 75 73 65 72 20 69 |onsisten|t user i|
|000029f0| 6e 74 65 72 66 61 63 65 | 20 74 6f 20 64 65 62 75 |nterface| to debu|
|00002a00| 67 67 69 6e 67 0a 61 6c | 6c 20 63 6f 64 65 20 72 |gging.al|l code r|
|00002a10| 65 70 72 65 73 65 6e 74 | 61 74 69 6f 6e 73 20 69 |epresent|ations i|
|00002a20| 66 20 74 68 65 72 65 20 | 77 61 73 20 61 20 75 6e |f there |was a un|
|00002a30| 69 66 6f 72 6d 20 64 65 | 62 75 67 67 65 72 20 69 |iform de|bugger i|
|00002a40| 6e 74 65 72 66 61 63 65 | 20 74 6f 20 74 68 65 0a |nterface| to the.|
|00002a50| 75 6e 64 65 72 6c 79 69 | 6e 67 20 73 74 75 66 66 |underlyi|ng stuff|
|00002a60| 2c 20 61 6e 64 20 76 69 | 63 65 2d 76 65 72 73 61 |, and vi|ce-versa|
|00002a70| 2e 20 20 0a 0a 4f 66 20 | 63 6f 75 72 73 65 2c 20 |. ..Of |course, |
|00002a80| 73 6f 6d 65 20 6f 70 65 | 72 61 74 69 6f 6e 73 20 |some ope|rations |
|00002a90| 6d 69 67 68 74 20 6e 6f | 74 20 62 65 20 73 75 70 |might no|t be sup|
|00002aa0| 70 6f 72 74 65 64 20 62 | 79 20 73 6f 6d 65 20 72 |ported b|y some r|
|00002ab0| 65 70 72 65 73 65 6e 74 | 61 74 69 6f 6e 73 2c 20 |epresent|ations, |
|00002ac0| 65 74 63 2e 0a 46 6f 72 | 20 65 78 61 6d 70 6c 65 |etc..For| example|
|00002ad0| 2c 20 66 69 6e 65 2d 63 | 6f 6e 74 72 6f 6c 20 73 |, fine-c|ontrol s|
|00002ae0| 74 65 70 70 69 6e 67 20 | 6d 69 67 68 74 20 6e 6f |tepping |might no|
|00002af0| 74 20 62 65 20 61 76 61 | 69 6c 61 62 6c 65 20 69 |t be ava|ilable i|
|00002b00| 6e 20 6e 61 74 69 76 65 | 20 63 6f 64 65 2e 0a 49 |n native| code..I|
|00002b10| 6e 20 6f 74 68 65 72 20 | 63 61 73 65 73 2c 20 77 |n other |cases, w|
|00002b20| 65 20 6d 69 67 68 74 20 | 72 65 64 75 63 65 20 61 |e might |reduce a|
|00002b30| 6e 20 6f 70 65 72 61 74 | 69 6f 6e 20 74 6f 20 74 |n operat|ion to t|
|00002b40| 68 65 20 6c 6f 77 65 73 | 74 20 63 6f 6d 6d 6f 6e |he lowes|t common|
|00002b50| 20 64 65 6e 6f 6d 69 6e | 61 74 6f 72 2c 0a 66 6f | denomin|ator,.fo|
|00002b60| 72 20 65 78 61 6d 70 6c | 65 20 66 65 74 63 68 69 |r exampl|e fetchi|
|00002b70| 6e 67 20 6c 65 78 69 63 | 61 6c 20 76 61 72 69 61 |ng lexic|al varia|
|00002b80| 62 6c 65 73 20 62 79 20 | 73 74 72 69 6e 67 20 61 |bles by |string a|
|00002b90| 6e 64 20 61 64 6d 69 74 | 74 69 6e 67 20 74 68 65 |nd admit|ting the|
|00002ba0| 20 70 6f 73 73 69 62 69 | 6c 69 74 79 0a 6f 66 20 | possibi|lity.of |
|00002bb0| 61 6d 62 69 67 75 6f 75 | 73 20 6d 61 74 63 68 65 |ambiguou|s matche|
|00002bc0| 73 2e 20 20 5b 41 63 74 | 75 61 6c 6c 79 2c 20 69 |s. [Act|ually, i|
|00002bd0| 74 20 77 6f 75 6c 64 20 | 70 72 6f 62 61 62 6c 79 |t would |probably|
|00002be0| 20 62 65 20 61 20 67 6f | 6f 64 20 69 64 65 61 20 | be a go|od idea |
|00002bf0| 74 6f 20 73 74 6f 72 65 | 20 74 68 65 0a 70 61 63 |to store| the.pac|
|00002c00| 6b 61 67 65 20 69 66 20 | 77 65 20 61 72 65 20 67 |kage if |we are g|
|00002c10| 6f 69 6e 67 20 74 6f 20 | 61 6c 6c 6f 77 20 76 61 |oing to |allow va|
|00002c20| 72 69 61 62 6c 65 73 20 | 74 6f 20 62 65 20 63 6c |riables |to be cl|
|00002c30| 6f 73 65 64 20 6f 76 65 | 72 2e 5d 0a 0a 53 6f 6d |osed ove|r.]..Som|
|00002c40| 65 20 6f 62 6a 65 63 74 | 73 20 77 65 20 77 6f 75 |e object|s we wou|
|00002c50| 6c 64 20 6e 65 65 64 3a | 0a 4c 6f 63 61 74 69 6f |ld need:|.Locatio|
|00002c60| 6e 3a 0a 09 54 68 65 20 | 63 6f 6e 73 74 61 6e 74 |n:..The |constant|
|00002c70| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 61 62 6f | informa|tion abo|
|00002c80| 75 74 20 74 68 65 20 70 | 6c 61 63 65 20 77 68 65 |ut the p|lace whe|
|00002c90| 72 65 20 61 20 76 61 6c | 75 65 20 69 73 20 73 74 |re a val|ue is st|
|00002ca0| 6f 72 65 64 2c 0a 20 20 | 20 20 20 20 20 20 65 76 |ored,. | ev|
|00002cb0| 65 72 79 74 68 69 6e 67 | 20 62 75 74 20 77 68 69 |erything| but whi|
|00002cc0| 63 68 20 70 61 72 74 69 | 63 75 6c 61 72 20 66 72 |ch parti|cular fr|
|00002cd0| 61 6d 65 20 69 74 20 69 | 73 20 69 6e 2e 20 20 4f |ame it i|s in. O|
|00002ce0| 70 65 72 61 74 69 6f 6e | 73 3a 0a 20 20 20 20 20 |peration|s:. |
|00002cf0| 20 20 20 6c 6f 63 61 74 | 69 6f 6e 20 6e 61 6d 65 | locat|ion name|
|00002d00| 2c 20 74 79 70 65 2c 20 | 65 74 63 2e 0a 20 20 20 |, type, |etc.. |
|00002d10| 20 20 20 20 20 6c 6f 63 | 61 74 69 6f 6e 2d 76 61 | loc|ation-va|
|00002d20| 6c 75 65 20 66 72 61 6d | 65 20 6c 6f 63 61 74 69 |lue fram|e locati|
|00002d30| 6f 6e 20 28 73 65 74 66 | 27 61 62 6c 65 29 0a 09 |on (setf|'able)..|
|00002d40| 6d 6f 6e 69 74 6f 72 2d | 6c 6f 63 61 74 69 6f 6e |monitor-|location|
|00002d50| 20 6c 6f 63 61 74 69 6f | 6e 20 66 75 6e 63 74 69 | locatio|n functi|
|00002d60| 6f 6e 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 46 |on. | F|
|00002d70| 75 6e 63 74 69 6f 6e 20 | 69 73 20 63 61 6c 6c 65 |unction |is calle|
|00002d80| 64 20 77 68 65 6e 65 76 | 65 72 20 6c 6f 63 61 74 |d whenev|er locat|
|00002d90| 69 6f 6e 20 69 73 20 73 | 65 74 20 77 69 74 68 20 |ion is s|et with |
|00002da0| 74 68 65 20 6c 6f 63 61 | 74 69 6f 6e 2c 0a 20 20 |the loca|tion,. |
|00002db0| 20 20 20 20 20 20 20 20 | 20 20 66 72 61 6d 65 20 | | frame |
|00002dc0| 61 6e 64 20 6f 6c 64 20 | 76 61 6c 75 65 2e 20 20 |and old |value. |
|00002dd0| 49 66 20 61 63 74 69 76 | 65 20 76 61 6c 75 65 73 |If activ|e values|
|00002de0| 20 61 72 65 6e 27 74 20 | 73 75 70 70 6f 72 74 65 | aren't |supporte|
|00002df0| 64 2c 20 74 68 65 6e 20 | 77 65 0a 20 20 20 20 20 |d, then |we. |
|00002e00| 20 20 20 20 20 20 20 64 | 75 6d 6d 79 20 74 68 65 | d|ummy the|
|00002e10| 20 65 66 66 65 63 74 20 | 75 73 69 6e 67 20 62 72 | effect |using br|
|00002e20| 65 61 6b 70 6f 69 6e 74 | 73 2c 20 69 6e 20 77 68 |eakpoint|s, in wh|
|00002e30| 69 63 68 20 63 61 73 65 | 20 74 68 65 20 63 68 61 |ich case| the cha|
|00002e40| 6e 67 65 20 77 6f 6e 27 | 74 0a 20 20 20 20 20 20 |nge won'|t. |
|00002e50| 20 20 20 20 20 20 62 65 | 20 6e 6f 74 69 63 65 64 | be| noticed|
|00002e60| 20 75 6e 74 69 6c 20 74 | 68 65 20 65 6e 64 20 6f | until t|he end o|
|00002e70| 66 20 74 68 65 20 62 6c | 6f 63 6b 20 28 61 6e 64 |f the bl|ock (and|
|00002e80| 20 69 6e 74 65 72 6d 65 | 64 69 61 74 65 20 63 68 | interme|diate ch|
|00002e90| 61 6e 67 65 73 0a 20 20 | 20 20 20 20 20 20 20 20 |anges. | |
|00002ea0| 20 20 77 69 6c 6c 20 62 | 65 20 6c 6f 73 74 2e 29 | will b|e lost.)|
|00002eb0| 0a 64 65 62 75 67 20 69 | 6e 66 6f 3a 0a 20 20 20 |.debug i|nfo:. |
|00002ec0| 20 20 20 20 20 41 6c 6c | 20 74 68 65 20 64 65 62 | All| the deb|
|00002ed0| 75 67 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 66 |ug infor|mation f|
|00002ee0| 6f 72 20 61 20 63 6f 6d | 70 6f 6e 65 6e 74 2e 0a |or a com|ponent..|
|00002ef0| 46 72 61 6d 65 3a 0a 09 | 66 72 61 6d 65 2d 63 68 |Frame:..|frame-ch|
|00002f00| 61 6e 67 65 64 2d 6c 6f | 63 61 74 69 6f 6e 73 20 |anged-lo|cations |
|00002f10| 66 72 61 6d 65 20 3d 3e | 20 6c 6f 63 61 74 69 6f |frame =>| locatio|
|00002f20| 6e 2a 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 52 |n*. | R|
|00002f30| 65 74 75 72 6e 20 61 20 | 6c 69 73 74 20 6f 66 20 |eturn a |list of |
|00002f40| 74 68 65 20 6c 6f 63 61 | 74 69 6f 6e 73 20 69 6e |the loca|tions in|
|00002f50| 20 66 72 61 6d 65 20 74 | 68 61 74 20 77 65 72 65 | frame t|hat were|
|00002f60| 20 63 68 61 6e 67 65 64 | 20 73 69 6e 63 65 20 74 | changed| since t|
|00002f70| 68 65 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 6c |he. | l|
|00002f80| 61 73 74 20 74 69 6d 65 | 20 74 68 69 73 20 66 75 |ast time| this fu|
|00002f90| 6e 63 74 69 6f 6e 20 77 | 61 73 20 63 61 6c 6c 65 |nction w|as calle|
|00002fa0| 64 2e 20 20 4f 72 20 73 | 6f 6d 65 74 68 69 6e 67 |d. Or s|omething|
|00002fb0| 2e 20 20 54 68 69 73 20 | 69 73 20 66 6f 72 0a 20 |. This |is for. |
|00002fc0| 20 20 20 20 20 20 20 20 | 20 20 20 64 69 73 70 6c | | displ|
|00002fd0| 61 79 69 6e 67 20 69 6e | 74 65 72 65 73 74 69 6e |aying in|terestin|
|00002fe0| 67 20 73 74 61 74 65 20 | 63 68 61 6e 67 65 73 20 |g state |changes |
|00002ff0| 61 74 20 62 72 65 61 6b | 70 6f 69 6e 74 73 2e 0a |at break|points..|
|00003000| 09 73 61 76 65 2d 66 72 | 61 6d 65 2d 73 74 61 74 |.save-fr|ame-stat|
|00003010| 65 20 66 72 61 6d 65 20 | 3d 3e 20 66 72 61 6d 65 |e frame |=> frame|
|00003020| 2d 73 74 61 74 65 0a 09 | 72 65 73 74 6f 72 65 2d |-state..|restore-|
|00003030| 66 72 61 6d 65 2d 73 74 | 61 74 65 20 66 72 61 6d |frame-st|ate fram|
|00003040| 65 20 66 72 61 6d 65 2d | 73 74 61 74 65 0a 09 20 |e frame-|state.. |
|00003050| 20 20 20 54 68 65 73 65 | 20 6f 70 65 72 61 74 69 | These| operati|
|00003060| 6f 6e 73 20 61 6c 6c 6f | 77 20 74 68 65 20 64 65 |ons allo|w the de|
|00003070| 62 75 67 67 65 72 20 74 | 6f 20 62 61 63 6b 20 75 |bugger t|o back u|
|00003080| 70 20 65 76 61 6c 75 61 | 74 69 6f 6e 2c 20 6d 6f |p evalua|tion, mo|
|00003090| 64 75 6c 6f 0a 09 20 20 | 20 20 73 69 64 65 2d 65 |dulo.. | side-e|
|000030a0| 66 66 65 63 74 73 20 61 | 6e 64 20 6e 6f 6e 2d 6c |ffects a|nd non-l|
|000030b0| 6f 63 61 6c 20 63 6f 6e | 74 72 6f 6c 20 74 72 61 |ocal con|trol tra|
|000030c0| 6e 73 66 65 72 73 2e 20 | 20 54 68 69 73 20 63 6f |nsfers. | This co|
|000030d0| 70 69 65 73 20 61 6e 64 | 0a 09 20 20 20 20 72 65 |pies and|.. re|
|000030e0| 73 74 6f 72 65 73 20 61 | 6c 6c 20 76 61 72 69 61 |stores a|ll varia|
|000030f0| 62 6c 65 73 2c 20 74 65 | 6d 70 6f 72 61 72 69 65 |bles, te|mporarie|
|00003100| 73 2c 20 65 74 63 2c 20 | 6c 6f 63 61 6c 20 74 6f |s, etc, |local to|
|00003110| 20 74 68 65 20 66 72 61 | 6d 65 2c 20 61 6e 64 0a | the fra|me, and.|
|00003120| 09 20 20 20 20 61 6c 73 | 6f 20 74 68 65 20 63 75 |. als|o the cu|
|00003130| 72 72 65 6e 74 20 50 43 | 20 61 6e 64 20 64 79 6e |rrent PC| and dyn|
|00003140| 61 6d 69 63 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |amic env|ironment|
|00003150| 20 28 63 75 72 72 65 6e | 74 20 63 61 74 63 68 2c | (curren|t catch,|
|00003160| 20 65 74 63 2e 29 0a 0a | 09 20 20 20 20 41 74 20 | etc.)..|. At |
|00003170| 74 68 65 20 74 69 6d 65 | 20 6f 66 20 74 68 65 20 |the time| of the |
|00003180| 73 61 76 65 2c 20 74 68 | 65 20 66 72 61 6d 65 20 |save, th|e frame |
|00003190| 6d 75 73 74 20 62 65 20 | 66 6f 72 20 74 68 65 20 |must be |for the |
|000031a0| 72 75 6e 6e 69 6e 67 20 | 66 75 6e 63 74 69 6f 6e |running |function|
|000031b0| 0a 09 20 20 20 20 28 6e | 6f 74 20 77 61 69 74 69 |.. (n|ot waiti|
|000031c0| 6e 67 20 66 6f 72 20 61 | 20 63 61 6c 6c 20 74 6f |ng for a| call to|
|000031d0| 20 72 65 74 75 72 6e 2e | 29 20 20 57 68 65 6e 20 | return.|) When |
|000031e0| 77 65 20 72 65 73 74 6f | 72 65 2c 20 74 68 65 20 |we resto|re, the |
|000031f0| 66 72 61 6d 65 0a 09 20 | 20 20 20 62 65 63 6f 6d |frame.. | becom|
|00003200| 65 73 20 63 75 72 72 65 | 6e 74 20 61 67 61 69 6e |es curre|nt again|
|00003210| 2c 20 65 66 66 65 63 74 | 69 76 65 6c 79 20 65 78 |, effect|ively ex|
|00003220| 69 74 69 6e 67 20 66 72 | 6f 6d 20 61 6e 79 20 66 |iting fr|om any f|
|00003230| 72 61 6d 65 73 20 6f 6e | 20 74 6f 70 2e 0a 09 20 |rames on| top... |
|00003240| 20 20 20 28 4f 66 20 63 | 6f 75 72 73 65 2c 20 66 | (Of c|ourse, f|
|00003250| 72 61 6d 65 20 6d 75 73 | 74 20 6e 6f 74 20 61 6c |rame mus|t not al|
|00003260| 72 65 61 64 79 20 62 65 | 20 65 78 69 74 65 64 2e |ready be| exited.|
|00003270| 29 0a 20 20 20 20 20 20 | 20 0a 54 68 72 65 61 64 |). | .Thread|
|00003280| 3a 0a 20 20 20 20 20 20 | 20 20 52 65 70 72 65 73 |:. | Repres|
|00003290| 65 6e 74 61 74 69 6f 6e | 20 6f 66 20 77 68 69 63 |entation| of whic|
|000032a0| 68 20 73 74 61 63 6b 20 | 74 6f 20 75 73 65 2c 20 |h stack |to use, |
|000032b0| 65 74 63 2e 0a 42 6c 6f | 63 6b 3a 0a 20 20 20 20 |etc..Blo|ck:. |
|000032c0| 20 20 20 20 57 68 61 74 | 20 73 75 63 63 65 73 73 | What| success|
|000032d0| 6f 72 73 20 74 68 65 20 | 62 6c 6f 63 6b 20 68 61 |ors the |block ha|
|000032e0| 73 2c 20 77 68 61 74 20 | 63 61 6c 6c 73 20 74 68 |s, what |calls th|
|000032f0| 65 72 65 20 61 72 65 20 | 69 6e 20 74 68 65 20 62 |ere are |in the b|
|00003300| 6c 6f 63 6b 2e 0a 20 20 | 20 20 20 20 20 20 28 44 |lock.. | (D|
|00003310| 6f 6e 27 74 20 6e 65 65 | 64 20 74 6f 20 6b 6e 6f |on't nee|d to kno|
|00003320| 77 20 77 68 65 72 65 20 | 63 61 6c 6c 73 20 61 72 |w where |calls ar|
|00003330| 65 20 61 73 20 6c 6f 6e | 67 20 61 73 20 77 65 20 |e as lon|g as we |
|00003340| 6b 6e 6f 77 20 63 61 6c | 6c 65 64 20 66 75 6e 63 |know cal|led func|
|00003350| 74 69 6f 6e 2c 0a 20 20 | 20 20 20 20 20 20 73 69 |tion,. | si|
|00003360| 6e 63 65 20 63 61 6e 20 | 62 72 65 61 6b 70 6f 69 |nce can |breakpoi|
|00003370| 6e 74 20 61 74 20 74 68 | 65 20 66 75 6e 63 74 69 |nt at th|e functi|
|00003380| 6f 6e 2e 29 20 20 57 68 | 65 74 68 65 72 20 63 6f |on.) Wh|ether co|
|00003390| 64 65 20 69 6e 20 74 68 | 69 73 20 62 6c 6f 63 6b |de in th|is block|
|000033a0| 20 69 73 0a 20 20 20 20 | 20 20 20 20 77 69 6c 64 | is. | wild|
|000033b0| 6c 79 20 6f 75 74 20 6f | 66 20 6f 72 64 65 72 20 |ly out o|f order |
|000033c0| 64 75 65 20 74 6f 20 62 | 65 69 6e 67 20 74 68 65 |due to b|eing the|
|000033d0| 20 72 65 73 75 6c 74 20 | 6f 66 20 6c 6f 6f 70 2d | result |of loop-|
|000033e0| 69 6e 76 61 72 69 61 6e | 74 0a 20 20 20 20 20 20 |invarian|t. |
|000033f0| 20 20 6f 70 74 69 6d 69 | 7a 61 74 69 6f 6e 2c 20 | optimi|zation, |
|00003400| 65 74 63 2e 20 20 4f 70 | 65 72 61 74 69 6f 6e 73 |etc. Op|erations|
|00003410| 3a 0a 20 20 20 20 20 20 | 20 20 62 6c 6f 63 6b 2d |:. | block-|
|00003420| 73 75 63 63 65 73 73 6f | 72 73 20 62 6c 6f 63 6b |successo|rs block|
|00003430| 20 3d 3e 20 63 6f 64 65 | 2d 6c 6f 63 61 74 69 6f | => code|-locatio|
|00003440| 6e 2a 0a 20 20 20 20 20 | 20 20 20 62 6c 6f 63 6b |n*. | block|
|00003450| 2d 66 6f 72 6d 73 20 62 | 6c 6f 63 6b 20 3d 3e 20 |-forms b|lock => |
|00003460| 28 73 6f 75 72 63 65 2d | 6c 6f 63 61 74 69 6f 6e |(source-|location|
|00003470| 20 63 6f 64 65 2d 6c 6f | 63 61 74 69 6f 6e 29 2a | code-lo|cation)*|
|00003480| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 52 65 74 |. | Ret|
|00003490| 75 72 6e 20 74 68 65 20 | 63 6f 72 72 65 73 70 6f |urn the |correspo|
|000034a0| 6e 64 69 6e 67 20 73 6f | 75 72 63 65 20 6c 6f 63 |nding so|urce loc|
|000034b0| 61 74 69 6f 6e 73 20 61 | 6e 64 20 63 6f 64 65 20 |ations a|nd code |
|000034c0| 6c 6f 63 61 74 69 6f 6e | 73 20 66 6f 72 0a 20 20 |location|s for. |
|000034d0| 20 20 20 20 20 20 20 20 | 20 20 61 6c 6c 20 66 6f | | all fo|
|000034e0| 72 6d 73 20 28 61 6e 64 | 20 66 6f 72 6d 20 66 72 |rms (and| form fr|
|000034f0| 61 67 6d 65 6e 74 73 29 | 20 69 6e 20 74 68 65 20 |agments)| in the |
|00003500| 62 6c 6f 63 6b 2e 0a 0a | 0c 0a 56 61 72 69 61 62 |block...|..Variab|
|00003510| 6c 65 20 6d 61 70 73 3a | 0a 0a 54 68 65 72 65 20 |le maps:|..There |
|00003520| 61 72 65 20 61 62 6f 75 | 74 20 66 69 76 65 20 74 |are abou|t five t|
|00003530| 68 69 6e 67 73 20 74 68 | 61 74 20 74 68 65 20 64 |hings th|at the d|
|00003540| 65 62 75 67 67 65 72 20 | 6d 69 67 68 74 20 77 61 |ebugger |might wa|
|00003550| 6e 74 20 74 6f 20 6b 6e | 6f 77 20 61 62 6f 75 74 |nt to kn|ow about|
|00003560| 20 61 0a 76 61 72 69 61 | 62 6c 65 3a 0a 0a 20 20 | a.varia|ble:.. |
|00003570| 20 20 4e 61 6d 65 0a 09 | 41 6c 74 68 6f 75 67 68 | Name..|Although|
|00003580| 20 61 20 6c 65 78 69 63 | 61 6c 20 76 61 72 69 61 | a lexic|al varia|
|00003590| 62 6c 65 27 73 20 6e 61 | 6d 65 20 69 73 20 22 72 |ble's na|me is "r|
|000035a0| 65 61 6c 6c 79 22 20 61 | 20 73 79 6d 62 6f 6c 20 |eally" a| symbol |
|000035b0| 28 70 61 63 6b 61 67 65 | 20 61 6e 64 0a 09 61 6c |(package| and..al|
|000035c0| 6c 29 2c 20 69 6e 20 70 | 72 61 63 74 69 63 65 20 |l), in p|ractice |
|000035d0| 69 74 20 64 6f 65 73 6e | 27 74 20 73 65 65 6d 20 |it doesn|'t seem |
|000035e0| 77 6f 72 74 68 77 68 69 | 6c 65 20 74 6f 20 72 65 |worthwhi|le to re|
|000035f0| 71 75 69 72 65 20 61 6c | 6c 20 74 68 65 20 73 79 |quire al|l the sy|
|00003600| 6d 62 6f 6c 73 0a 09 66 | 6f 72 20 6c 6f 63 61 6c |mbols..f|or local|
|00003610| 20 76 61 72 69 61 62 6c | 65 20 6e 61 6d 65 73 20 | variabl|e names |
|00003620| 74 6f 20 62 65 20 72 65 | 74 61 69 6e 65 64 2e 20 |to be re|tained. |
|00003630| 20 54 68 65 72 65 20 69 | 73 20 6d 75 63 68 20 6c | There i|s much l|
|00003640| 65 73 73 20 56 4d 20 61 | 6e 64 20 47 43 0a 09 6f |ess VM a|nd GC..o|
|00003650| 76 65 72 68 65 61 64 20 | 66 6f 72 20 61 20 63 6f |verhead |for a co|
|00003660| 6e 73 74 61 6e 74 20 73 | 74 72 69 6e 67 20 74 68 |nstant s|tring th|
|00003670| 61 6e 20 66 6f 72 20 61 | 20 73 79 6d 62 6f 6c 2e |an for a| symbol.|
|00003680| 20 20 28 41 6c 73 6f 20 | 69 74 20 69 73 20 75 73 | (Also |it is us|
|00003690| 65 66 75 6c 0a 09 74 6f | 20 62 65 20 61 62 6c 65 |eful..to| be able|
|000036a0| 20 74 6f 20 61 63 63 65 | 73 73 20 67 65 6e 73 79 | to acce|ss gensy|
|000036b0| 6d 73 20 69 6e 20 74 68 | 65 20 64 65 62 75 67 67 |ms in th|e debugg|
|000036c0| 65 72 2c 20 65 76 65 6e | 20 74 68 6f 75 67 68 20 |er, even| though |
|000036d0| 74 68 65 79 20 61 72 65 | 0a 09 74 68 65 6f 72 65 |they are|..theore|
|000036e0| 74 69 63 61 6c 6c 79 20 | 69 6e 65 66 66 61 62 6c |tically |ineffabl|
|000036f0| 65 29 2e 0a 0a 20 20 20 | 20 49 44 0a 09 57 68 69 |e)... | ID..Whi|
|00003700| 63 68 20 76 61 72 69 61 | 62 6c 65 20 77 69 74 68 |ch varia|ble with|
|00003710| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 6e | the spe|cified n|
|00003720| 61 6d 65 20 69 73 20 74 | 68 69 73 3f 20 20 49 74 |ame is t|his? It|
|00003730| 20 69 73 20 70 6f 73 73 | 69 62 6c 65 20 74 6f 20 | is poss|ible to |
|00003740| 68 61 76 65 0a 09 6d 75 | 6c 74 69 70 6c 65 20 76 |have..mu|ltiple v|
|00003750| 61 72 69 61 62 6c 65 73 | 20 77 69 74 68 20 74 68 |ariables| with th|
|00003760| 65 20 73 61 6d 65 20 6e | 61 6d 65 20 69 6e 20 61 |e same n|ame in a|
|00003770| 20 67 69 76 65 6e 20 66 | 75 6e 63 74 69 6f 6e 2e | given f|unction.|
|00003780| 20 20 54 68 65 20 49 44 | 20 69 73 0a 09 73 6f 6d | The ID| is..som|
|00003790| 65 74 68 69 6e 67 20 74 | 68 61 74 20 6d 61 6b 65 |ething t|hat make|
|000037a0| 73 20 4e 61 6d 65 20 75 | 6e 69 71 75 65 2c 20 70 |s Name u|nique, p|
|000037b0| 72 6f 62 61 62 6c 79 20 | 61 20 73 6d 61 6c 6c 20 |robably |a small |
|000037c0| 69 6e 74 65 67 65 72 2e | 20 20 57 68 65 6e 0a 09 |integer.| When..|
|000037d0| 76 61 72 69 61 62 6c 65 | 73 20 61 72 65 6e 27 74 |variable|s aren't|
|000037e0| 20 75 6e 69 71 75 65 2c | 20 77 65 20 63 6f 75 6c | unique,| we coul|
|000037f0| 64 20 6d 61 6b 65 20 74 | 68 69 73 20 62 65 20 70 |d make t|his be p|
|00003800| 61 72 74 20 6f 66 20 74 | 68 65 20 6e 61 6d 65 2c |art of t|he name,|
|00003810| 20 65 2e 67 2e 0a 09 22 | 46 4f 4f 5c 23 31 22 2c | e.g..."|FOO\#1",|
|00003820| 20 22 46 4f 4f 5c 23 32 | 22 2e 20 20 42 75 74 20 | "FOO\#2|". But |
|00003830| 74 68 65 72 65 20 61 72 | 65 20 61 64 76 61 6e 74 |there ar|e advant|
|00003840| 61 67 65 73 20 74 6f 20 | 6b 65 65 70 69 6e 67 20 |ages to |keeping |
|00003850| 74 68 69 73 20 73 65 70 | 61 72 61 74 65 2c 0a 09 |this sep|arate,..|
|00003860| 73 69 6e 63 65 20 69 6e | 20 6d 61 6e 79 20 63 61 |since in| many ca|
|00003870| 73 65 73 20 6c 69 66 65 | 74 69 6d 65 20 69 6e 66 |ses life|time inf|
|00003880| 6f 72 6d 61 74 69 6f 6e | 20 63 61 6e 20 62 65 20 |ormation| can be |
|00003890| 75 73 65 64 20 74 6f 20 | 64 69 73 61 6d 62 69 67 |used to |disambig|
|000038a0| 75 61 74 65 2c 0a 09 6d | 61 6b 69 6e 67 20 71 75 |uate,..m|aking qu|
|000038b0| 61 6c 69 66 69 63 61 74 | 69 6f 6e 20 75 6e 6e 65 |alificat|ion unne|
|000038c0| 63 65 73 73 61 72 79 2e | 0a 0a 20 20 20 20 53 43 |cessary.|.. SC|
|000038d0| 0a 09 57 68 65 6e 20 75 | 6e 62 6f 78 65 64 20 72 |..When u|nboxed r|
|000038e0| 65 70 72 65 73 65 6e 74 | 61 74 69 6f 6e 73 20 61 |epresent|ations a|
|000038f0| 72 65 20 69 6e 20 75 73 | 65 2c 20 77 65 20 6d 75 |re in us|e, we mu|
|00003900| 73 74 20 68 61 76 65 20 | 74 79 70 65 20 69 6e 66 |st have |type inf|
|00003910| 6f 72 6d 61 74 69 6f 6e | 0a 09 74 6f 20 70 72 6f |ormation|..to pro|
|00003920| 70 65 72 6c 79 20 72 65 | 61 64 20 61 6e 64 20 77 |perly re|ad and w|
|00003930| 72 69 74 65 20 61 20 6c | 6f 63 61 74 69 6f 6e 2e |rite a l|ocation.|
|00003940| 20 20 57 65 20 6f 6e 6c | 79 20 6e 65 65 64 20 74 | We onl|y need t|
|00003950| 6f 20 6b 6e 6f 77 20 74 | 68 65 0a 09 53 43 20 66 |o know t|he..SC f|
|00003960| 6f 72 20 74 68 69 73 2c | 20 77 68 69 63 68 20 77 |or this,| which w|
|00003970| 6f 75 6c 64 20 62 65 20 | 61 6d 65 6e 61 62 6c 65 |ould be |amenable|
|00003980| 20 74 6f 20 61 20 73 70 | 61 63 65 2d 73 61 76 69 | to a sp|ace-savi|
|00003990| 6e 67 0a 09 6e 75 6d 65 | 72 69 63 20 65 6e 63 6f |ng..nume|ric enco|
|000039a0| 64 69 6e 67 2e 0a 0a 20 | 20 20 20 4c 6f 63 61 74 |ding... | Locat|
|000039b0| 69 6f 6e 0a 09 53 69 6d | 70 6c 65 3a 20 74 68 65 |ion..Sim|ple: the|
|000039c0| 20 6f 66 66 73 65 74 20 | 69 6e 20 53 43 2e 20 20 | offset |in SC. |
|000039d0| 5b 41 63 74 75 61 6c 6c | 79 2c 20 77 65 20 6e 65 |[Actuall|y, we ne|
|000039e0| 65 64 20 74 68 65 20 73 | 61 76 65 20 6c 6f 63 61 |ed the s|ave loca|
|000039f0| 74 69 6f 6e 20 74 6f 6f | 2e 5d 0a 0a 20 20 20 20 |tion too|.].. |
|00003a00| 4c 69 66 65 74 69 6d 65 | 0a 09 49 6e 20 77 68 61 |Lifetime|..In wha|
|00003a10| 74 20 70 61 72 74 73 20 | 6f 66 20 74 68 65 20 70 |t parts |of the p|
|00003a20| 72 6f 67 72 61 6d 20 64 | 6f 65 73 20 74 68 69 73 |rogram d|oes this|
|00003a30| 20 76 61 72 69 61 62 6c | 65 20 68 6f 6c 64 20 61 | variabl|e hold a|
|00003a40| 20 6d 65 61 6e 69 6e 67 | 66 75 6c 0a 09 76 61 6c | meaning|ful..val|
|00003a50| 75 65 3f 20 20 49 74 20 | 73 65 65 6d 73 20 70 72 |ue? It |seems pr|
|00003a60| 6f 68 69 62 69 74 69 76 | 65 20 74 6f 20 72 65 63 |ohibitiv|e to rec|
|00003a70| 6f 72 64 20 70 72 65 63 | 69 73 65 20 6c 69 66 65 |ord prec|ise life|
|00003a80| 74 69 6d 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |time inf|ormation|
|00003a90| 2c 0a 09 62 6f 74 68 20 | 69 6e 20 73 70 61 63 65 |,..both |in space|
|00003aa0| 20 61 6e 64 20 63 6f 6d | 70 69 6c 65 72 20 65 66 | and com|piler ef|
|00003ab0| 66 6f 72 74 2c 20 73 6f | 20 77 65 20 77 69 6c 6c |fort, so| we will|
|00003ac0| 20 68 61 76 65 20 74 6f | 20 73 65 74 74 6c 65 20 | have to| settle |
|00003ad0| 66 6f 72 20 73 6f 6d 65 | 0a 09 73 6f 72 74 20 6f |for some|..sort o|
|00003ae0| 66 20 61 70 70 72 6f 78 | 69 6d 61 74 69 6f 6e 2e |f approx|imation.|
|00003af0| 0a 0a 09 54 68 65 20 66 | 69 6e 65 73 74 20 67 72 |...The f|inest gr|
|00003b00| 61 6e 75 6c 61 72 69 74 | 79 20 61 74 20 77 68 69 |anularit|y at whi|
|00003b10| 63 68 20 69 74 20 69 73 | 20 65 61 73 79 20 74 6f |ch it is| easy to|
|00003b20| 20 64 65 74 65 72 6d 69 | 6e 65 20 6c 69 76 65 6e | determi|ne liven|
|00003b30| 65 73 73 20 69 73 20 74 | 68 65 0a 09 74 68 65 20 |ess is t|he..the |
|00003b40| 62 6c 6f 63 6b 3a 20 77 | 65 20 63 61 6e 20 72 65 |block: w|e can re|
|00003b50| 67 61 72 64 20 74 68 65 | 20 76 61 72 69 61 62 6c |gard the| variabl|
|00003b60| 65 20 6c 69 66 65 74 69 | 6d 65 20 61 73 20 74 68 |e lifeti|me as th|
|00003b70| 65 20 73 65 74 20 6f 66 | 20 62 6c 6f 63 6b 73 0a |e set of| blocks.|
|00003b80| 09 74 68 61 74 20 74 68 | 65 20 76 61 72 69 61 62 |.that th|e variab|
|00003b90| 6c 65 20 69 73 20 6c 69 | 76 65 20 69 6e 2e 20 20 |le is li|ve in. |
|00003ba0| 4f 66 20 63 6f 75 72 73 | 65 2c 20 74 68 65 20 76 |Of cours|e, the v|
|00003bb0| 61 72 69 61 62 6c 65 20 | 6d 61 79 20 62 65 20 64 |ariable |may be d|
|00003bc0| 65 61 64 20 28 61 6e 64 | 0a 09 74 68 75 73 20 63 |ead (and|..thus c|
|00003bd0| 6f 6e 74 61 69 6e 20 6d | 65 61 6e 69 6e 67 6c 65 |ontain m|eaningle|
|00003be0| 73 73 20 67 61 72 62 61 | 67 65 29 20 64 75 72 69 |ss garba|ge) duri|
|00003bf0| 6e 67 20 61 72 62 69 74 | 72 61 72 69 6c 79 20 6c |ng arbit|rarily l|
|00003c00| 61 72 67 65 20 70 6f 72 | 74 69 6f 6e 73 20 6f 66 |arge por|tions of|
|00003c10| 0a 09 74 68 65 20 62 6c | 6f 63 6b 2e 0a 0a 09 4e |..the bl|ock....N|
|00003c20| 6f 74 65 20 74 68 61 74 | 20 74 68 69 73 20 73 75 |ote that| this su|
|00003c30| 62 73 75 6d 65 73 20 74 | 68 65 20 6e 6f 74 69 6f |bsumes t|he notio|
|00003c40| 6e 20 6f 66 20 77 68 69 | 63 68 20 66 75 6e 63 74 |n of whi|ch funct|
|00003c50| 69 6f 6e 20 61 20 76 61 | 72 69 61 62 6c 65 20 62 |ion a va|riable b|
|00003c60| 65 6c 6f 6e 67 73 0a 09 | 74 6f 2e 20 20 41 20 67 |elongs..|to. A g|
|00003c70| 69 76 65 6e 20 62 6c 6f | 63 6b 20 69 73 20 6f 6e |iven blo|ck is on|
|00003c80| 6c 79 20 69 6e 20 6f 6e | 65 20 66 75 6e 63 74 69 |ly in on|e functi|
|00003c90| 6f 6e 2c 20 73 6f 20 74 | 68 65 20 66 75 6e 63 74 |on, so t|he funct|
|00003ca0| 69 6f 6e 20 69 73 0a 09 | 69 6d 70 6c 69 63 69 74 |ion is..|implicit|
|00003cb0| 2e 0a 0a 0a 54 68 65 20 | 76 61 72 69 61 62 6c 65 |....The |variable|
|00003cc0| 20 6d 61 70 20 73 68 6f | 75 6c 64 20 72 65 70 72 | map sho|uld repr|
|00003cd0| 65 73 65 6e 74 20 74 68 | 69 73 20 69 6e 66 6f 72 |esent th|is infor|
|00003ce0| 6d 61 74 69 6f 6e 20 73 | 70 61 63 65 2d 65 66 66 |mation s|pace-eff|
|00003cf0| 69 63 69 65 6e 74 6c 79 | 20 61 6e 64 20 77 69 74 |iciently| and wit|
|00003d00| 68 0a 61 64 65 71 75 61 | 74 65 20 63 6f 6d 70 75 |h.adequa|te compu|
|00003d10| 74 61 74 69 6f 6e 61 6c | 20 65 66 66 69 63 69 65 |tational| efficie|
|00003d20| 6e 63 79 2e 0a 0a 54 68 | 65 20 53 43 20 61 6e 64 |ncy...Th|e SC and|
|00003d30| 20 49 44 20 63 61 6e 20 | 62 65 20 72 65 70 72 65 | ID can |be repre|
|00003d40| 73 65 6e 74 65 64 20 61 | 73 20 73 6d 61 6c 6c 20 |sented a|s small |
|00003d50| 69 6e 74 65 67 65 72 73 | 2e 20 20 41 6c 74 68 6f |integers|. Altho|
|00003d60| 75 67 68 20 74 68 65 20 | 49 44 20 63 61 6e 20 69 |ugh the |ID can i|
|00003d70| 6e 0a 70 72 69 6e 63 69 | 70 6c 65 20 62 65 20 61 |n.princi|ple be a|
|00003d80| 72 62 69 74 72 61 72 69 | 6c 79 20 6c 61 72 67 65 |rbitrari|ly large|
|00003d90| 2c 20 69 74 20 73 68 6f | 75 6c 64 20 62 65 20 3c |, it sho|uld be <|
|00003da0| 31 30 30 20 69 6e 20 70 | 72 61 63 74 69 63 65 2e |100 in p|ractice.|
|00003db0| 20 20 54 68 65 20 6c 6f | 63 61 74 69 6f 6e 0a 63 | The lo|cation.c|
|00003dc0| 61 6e 20 62 65 20 72 65 | 70 72 65 73 65 6e 74 65 |an be re|presente|
|00003dd0| 64 20 62 79 20 6a 75 73 | 74 20 74 68 65 20 6f 66 |d by jus|t the of|
|00003de0| 66 73 65 74 20 28 61 20 | 6d 6f 64 65 72 61 74 65 |fset (a |moderate|
|00003df0| 6c 79 20 73 6d 61 6c 6c | 20 69 6e 74 65 67 65 72 |ly small| integer|
|00003e00| 29 2c 20 73 69 6e 63 65 | 20 74 68 65 0a 53 42 20 |), since| the.SB |
|00003e10| 69 73 20 69 6d 70 6c 69 | 63 69 74 20 69 6e 20 74 |is impli|cit in t|
|00003e20| 68 65 20 53 43 2e 0a 0a | 54 68 65 20 6c 69 66 65 |he SC...|The life|
|00003e30| 74 69 6d 65 20 69 6e 66 | 6f 20 63 61 6e 20 62 65 |time inf|o can be|
|00003e40| 20 72 65 70 72 65 73 65 | 6e 74 65 64 20 65 69 74 | represe|nted eit|
|00003e50| 68 65 72 20 61 73 20 61 | 20 62 69 74 2d 76 65 63 |her as a| bit-vec|
|00003e60| 74 6f 72 20 69 6e 64 65 | 78 65 64 20 62 79 20 62 |tor inde|xed by b|
|00003e70| 6c 6f 63 6b 0a 6e 75 6d | 62 65 72 73 2c 20 6f 72 |lock.num|bers, or|
|00003e80| 20 62 79 20 61 20 6c 69 | 73 74 20 6f 66 20 62 6c | by a li|st of bl|
|00003e90| 6f 63 6b 20 6e 75 6d 62 | 65 72 73 2e 20 20 57 68 |ock numb|ers. Wh|
|00003ea0| 69 63 68 20 69 73 20 6d | 6f 72 65 20 63 6f 6d 70 |ich is m|ore comp|
|00003eb0| 61 63 74 20 64 65 70 65 | 6e 64 73 20 62 6f 74 68 |act depe|nds both|
|00003ec0| 20 6f 6e 0a 74 68 65 20 | 73 69 7a 65 20 6f 66 20 | on.the |size of |
|00003ed0| 74 68 65 20 63 6f 6d 70 | 6f 6e 65 6e 74 20 61 6e |the comp|onent an|
|00003ee0| 64 20 6f 6e 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |d on the| number |
|00003ef0| 6f 66 20 62 6c 6f 63 6b | 73 20 74 68 65 20 76 61 |of block|s the va|
|00003f00| 72 69 61 62 6c 65 20 69 | 73 20 6c 69 76 65 20 69 |riable i|s live i|
|00003f10| 6e 2e 0a 49 6e 20 74 68 | 65 20 6c 69 6d 69 74 20 |n..In th|e limit |
|00003f20| 6f 66 20 6c 61 72 67 65 | 20 63 6f 6d 70 6f 6e 65 |of large| compone|
|00003f30| 6e 74 20 73 69 7a 65 2c | 20 74 68 65 20 73 70 61 |nt size,| the spa|
|00003f40| 72 73 65 20 72 65 70 72 | 65 73 65 6e 74 61 74 69 |rse repr|esentati|
|00003f50| 6f 6e 20 77 69 6c 6c 20 | 62 65 20 6d 6f 72 65 0a |on will |be more.|
|00003f60| 63 6f 6d 70 61 63 74 2c | 20 62 75 74 20 69 74 20 |compact,| but it |
|00003f70| 69 73 6e 27 74 20 63 6c | 65 61 72 20 77 68 65 72 |isn't cl|ear wher|
|00003f80| 65 20 74 68 69 73 20 63 | 72 6f 73 73 6f 76 65 72 |e this c|rossover|
|00003f90| 20 6f 63 63 75 72 73 2e | 20 20 4f 66 20 63 6f 75 | occurs.| Of cou|
|00003fa0| 72 73 65 2c 20 69 74 20 | 77 6f 75 6c 64 0a 62 65 |rse, it |would.be|
|00003fb0| 20 70 6f 73 73 69 62 6c | 65 20 74 6f 20 75 73 65 | possibl|e to use|
|00003fc0| 20 62 6f 74 68 20 72 65 | 70 72 65 73 65 6e 74 61 | both re|presenta|
|00003fd0| 74 69 6f 6e 73 2c 20 63 | 68 6f 6f 73 69 6e 67 20 |tions, c|hoosing |
|00003fe0| 74 68 65 20 6d 6f 72 65 | 20 63 6f 6d 70 61 63 74 |the more| compact|
|00003ff0| 20 6f 6e 65 20 6f 6e 20 | 61 0a 70 65 72 2d 76 61 | one on |a.per-va|
|00004000| 72 69 61 62 6c 65 20 62 | 61 73 69 73 2e 20 20 41 |riable b|asis. A|
|00004010| 6e 6f 74 68 65 72 20 69 | 6e 74 65 72 65 73 74 69 |nother i|nteresti|
|00004020| 6e 67 20 73 70 65 63 69 | 61 6c 20 63 61 73 65 20 |ng speci|al case |
|00004030| 69 73 20 77 68 65 6e 20 | 74 68 65 20 76 61 72 69 |is when |the vari|
|00004040| 61 62 6c 65 20 69 73 0a | 6c 69 76 65 20 69 6e 20 |able is.|live in |
|00004050| 6f 6e 6c 79 20 6f 6e 65 | 20 62 6c 6f 63 6b 3a 20 |only one| block: |
|00004060| 74 68 69 73 20 6d 61 79 | 20 62 65 20 63 6f 6d 6d |this may| be comm|
|00004070| 6f 6e 20 65 6e 6f 75 67 | 68 20 74 6f 20 62 65 20 |on enoug|h to be |
|00004080| 77 6f 72 74 68 20 70 69 | 63 6b 69 6e 67 20 6f 66 |worth pi|cking of|
|00004090| 66 2c 0a 61 6c 74 68 6f | 75 67 68 20 69 74 20 69 |f,.altho|ugh it i|
|000040a0| 73 20 70 72 6f 62 61 62 | 6c 79 20 72 61 72 65 72 |s probab|ly rarer|
|000040b0| 20 66 6f 72 20 6e 61 6d | 65 64 20 76 61 72 69 61 | for nam|ed varia|
|000040c0| 62 6c 65 73 20 74 68 61 | 6e 20 66 6f 72 20 54 4e |bles tha|n for TN|
|000040d0| 73 20 69 6e 20 67 65 6e | 65 72 61 6c 2e 0a 0a 49 |s in gen|eral...I|
|000040e0| 66 20 77 65 20 64 75 6d | 70 20 74 68 65 20 74 79 |f we dum|p the ty|
|000040f0| 70 65 2c 20 74 68 65 6e | 20 61 20 6e 6f 72 6d 61 |pe, then| a norma|
|00004100| 6c 20 6c 69 73 74 2d 73 | 74 79 6c 65 20 74 79 70 |l list-s|tyle typ|
|00004110| 65 20 64 65 73 63 72 69 | 70 74 6f 72 20 69 73 20 |e descri|ptor is |
|00004120| 66 69 6e 65 3a 20 74 68 | 65 0a 73 70 61 63 65 20 |fine: th|e.space |
|00004130| 6f 76 65 72 68 65 61 64 | 20 69 73 20 73 6d 61 6c |overhead| is smal|
|00004140| 6c 2c 20 73 69 6e 63 65 | 20 74 68 65 20 73 68 61 |l, since| the sha|
|00004150| 72 65 61 62 69 6c 69 74 | 79 20 69 73 20 68 69 67 |reabilit|y is hig|
|00004160| 68 2e 0a 0a 57 65 20 63 | 6f 75 6c 64 20 70 72 6f |h...We c|ould pro|
|00004170| 62 61 62 6c 79 20 73 61 | 76 65 20 73 6f 6d 65 20 |bably sa|ve some |
|00004180| 73 70 61 63 65 20 62 79 | 20 63 6c 65 76 65 72 6c |space by| cleverl|
|00004190| 79 20 72 65 70 72 65 73 | 65 6e 74 69 6e 67 20 74 |y repres|enting t|
|000041a0| 68 65 20 76 61 72 2d 69 | 6e 66 6f 20 61 73 0a 70 |he var-i|nfo as.p|
|000041b0| 61 72 61 6c 6c 65 6c 20 | 76 65 63 74 6f 72 73 20 |arallel |vectors |
|000041c0| 6f 66 20 64 69 66 66 65 | 72 65 6e 74 20 74 79 70 |of diffe|rent typ|
|000041d0| 65 73 2c 20 62 75 74 20 | 74 68 69 73 20 77 6f 75 |es, but |this wou|
|000041e0| 6c 64 20 62 65 20 6d 6f | 72 65 20 70 61 69 6e 66 |ld be mo|re painf|
|000041f0| 75 6c 20 69 6e 20 75 73 | 65 2e 0a 49 74 20 73 65 |ul in us|e..It se|
|00004200| 65 6d 73 20 62 65 74 74 | 65 72 20 74 6f 20 6a 75 |ems bett|er to ju|
|00004210| 73 74 20 75 73 65 20 61 | 20 73 74 72 75 63 74 75 |st use a| structu|
|00004220| 72 65 2c 20 65 6e 63 6f | 64 69 6e 67 20 74 68 65 |re, enco|ding the|
|00004230| 20 75 6e 62 6f 78 65 64 | 20 66 69 65 6c 64 73 20 | unboxed| fields |
|00004240| 69 6e 20 61 0a 66 69 78 | 6e 75 6d 2e 20 20 54 68 |in a.fix|num. Th|
|00004250| 69 73 20 77 61 79 2c 20 | 77 65 20 63 61 6e 20 70 |is way, |we can p|
|00004260| 61 73 73 20 61 72 6f 75 | 6e 64 20 74 68 65 20 73 |ass arou|nd the s|
|00004270| 74 72 75 63 74 75 72 65 | 20 69 6e 20 74 68 65 20 |tructure| in the |
|00004280| 64 65 62 75 67 67 65 72 | 2c 20 70 65 72 68 61 70 |debugger|, perhap|
|00004290| 73 0a 65 76 65 6e 20 65 | 78 70 6f 72 74 69 6e 67 |s.even e|xporting|
|000042a0| 20 69 74 20 66 72 6f 6d | 20 74 68 65 20 74 68 65 | it from| the the|
|000042b0| 20 6c 6f 77 2d 6c 65 76 | 65 6c 20 64 65 62 75 67 | low-lev|el debug|
|000042c0| 67 65 72 20 69 6e 74 65 | 72 66 61 63 65 2e 0a 0a |ger inte|rface...|
|000042d0| 5b 5c 23 5c 23 5c 23 20 | 57 65 20 6e 65 65 64 20 |[\#\#\# |We need |
|000042e0| 74 68 65 20 73 61 76 65 | 20 6c 6f 63 61 74 69 6f |the save| locatio|
|000042f0| 6e 20 74 6f 6f 2e 20 20 | 54 68 69 73 20 70 72 6f |n too. |This pro|
|00004300| 62 61 62 6c 79 20 6d 65 | 61 6e 73 20 74 68 61 74 |bably me|ans that|
|00004310| 20 77 65 20 6e 65 65 64 | 20 74 77 6f 20 73 6c 6f | we need| two slo|
|00004320| 74 73 0a 6f 66 20 62 69 | 74 73 2c 20 73 69 6e 63 |ts.of bi|ts, sinc|
|00004330| 65 20 77 65 20 6e 65 65 | 64 20 74 68 65 20 73 61 |e we nee|d the sa|
|00004340| 76 65 20 6f 66 66 73 65 | 74 20 61 6e 64 20 73 61 |ve offse|t and sa|
|00004350| 76 65 20 53 43 2e 20 20 | 41 63 74 75 61 6c 6c 79 |ve SC. |Actually|
|00004360| 2c 20 77 65 20 63 6f 75 | 6c 64 20 6c 65 74 20 74 |, we cou|ld let t|
|00004370| 68 65 0a 73 61 76 65 20 | 53 43 20 62 65 20 69 6d |he.save |SC be im|
|00004380| 70 6c 69 65 64 20 62 79 | 20 74 68 65 20 6e 6f 72 |plied by| the nor|
|00004390| 6d 61 6c 20 53 43 2c 20 | 73 69 6e 63 65 20 61 74 |mal SC, |since at|
|000043a0| 20 6c 65 61 73 74 20 63 | 75 72 72 65 6e 74 6c 79 | least c|urrently|
|000043b0| 2c 20 77 65 20 61 6c 77 | 61 79 73 20 63 68 6f 6f |, we alw|ays choo|
|000043c0| 73 65 0a 74 68 65 20 73 | 61 6d 65 20 73 61 76 65 |se.the s|ame save|
|000043d0| 20 53 43 20 66 6f 72 20 | 61 20 67 69 76 65 6e 20 | SC for |a given |
|000043e0| 53 43 2e 20 20 42 75 74 | 20 65 76 65 6e 20 73 6f |SC. But| even so|
|000043f0| 2c 20 77 65 20 70 72 6f | 62 61 62 6c 79 20 63 61 |, we pro|bably ca|
|00004400| 6e 27 74 20 66 69 74 20 | 61 6c 6c 20 74 68 61 74 |n't fit |all that|
|00004410| 0a 73 74 75 66 66 20 69 | 6e 20 6f 6e 65 20 66 69 |.stuff i|n one fi|
|00004420| 78 6e 75 6d 20 77 69 74 | 68 6f 75 74 20 73 71 75 |xnum wit|hout squ|
|00004430| 65 65 7a 69 6e 67 20 61 | 20 6c 6f 74 2c 20 73 6f |eezing a| lot, so|
|00004440| 20 77 65 20 6d 69 67 68 | 74 20 61 73 20 77 65 6c | we migh|t as wel|
|00004450| 6c 20 73 70 6c 69 74 20 | 61 6e 64 0a 72 65 63 6f |l split |and.reco|
|00004460| 72 64 20 62 6f 74 68 20 | 53 43 73 2e 0a 0a 49 6e |rd both |SCs...In|
|00004470| 20 61 20 6c 6f 63 61 6c | 69 7a 65 64 20 70 61 63 | a local|ized pac|
|00004480| 6b 69 6e 67 20 73 63 68 | 65 6d 65 2c 20 77 65 20 |king sch|eme, we |
|00004490| 77 6f 75 6c 64 20 68 61 | 76 65 20 74 6f 20 64 75 |would ha|ve to du|
|000044a0| 6d 70 20 61 20 64 69 66 | 66 65 72 65 6e 74 20 76 |mp a dif|ferent v|
|000044b0| 61 72 2d 69 6e 66 6f 0a | 77 68 65 6e 65 76 65 72 |ar-info.|whenever|
|000044c0| 20 65 69 74 68 65 72 20 | 74 68 65 20 6d 61 69 6e | either |the main|
|000044d0| 20 6c 6f 63 61 74 69 6f | 6e 20 6f 72 20 74 68 65 | locatio|n or the|
|000044e0| 20 73 61 76 65 20 6c 6f | 63 61 74 69 6f 6e 20 63 | save lo|cation c|
|000044f0| 68 61 6e 67 65 73 2e 20 | 20 41 73 20 61 20 70 72 |hanges. | As a pr|
|00004500| 61 63 74 69 63 61 6c 0a | 6d 61 74 74 65 72 2c 20 |actical.|matter, |
|00004510| 74 68 65 20 73 61 76 65 | 20 6c 6f 63 61 74 69 6f |the save| locatio|
|00004520| 6e 20 69 73 20 6c 65 73 | 73 20 6c 69 6b 65 6c 79 |n is les|s likely|
|00004530| 20 74 6f 20 63 68 61 6e | 67 65 20 74 68 61 6e 20 | to chan|ge than |
|00004540| 74 68 65 20 6d 61 69 6e | 20 6c 6f 63 61 74 69 6f |the main| locatio|
|00004550| 6e 2c 20 61 6e 64 0a 73 | 68 6f 75 6c 64 20 6e 65 |n, and.s|hould ne|
|00004560| 76 65 72 20 63 68 61 6e | 67 65 20 77 69 74 68 6f |ver chan|ge witho|
|00004570| 75 74 20 74 68 65 20 6d | 61 69 6e 20 6c 6f 63 61 |ut the m|ain loca|
|00004580| 74 69 6f 6e 20 63 68 61 | 6e 67 69 6e 67 2e 0a 0a |tion cha|nging...|
|00004590| 4f 6e 65 20 63 61 6e 20 | 63 6f 6e 63 65 69 76 65 |One can |conceive|
|000045a0| 20 6f 66 20 6c 6f 63 61 | 6c 69 7a 65 64 20 70 61 | of loca|lized pa|
|000045b0| 63 6b 69 6e 67 20 73 63 | 68 65 6d 65 73 20 74 68 |cking sc|hemes th|
|000045c0| 61 74 20 64 6f 20 73 61 | 76 69 6e 67 20 61 73 20 |at do sa|ving as |
|000045d0| 61 20 73 70 65 63 69 61 | 6c 20 63 61 73 65 0a 6f |a specia|l case.o|
|000045e0| 66 20 6c 6f 63 61 6c 69 | 7a 65 64 20 70 61 63 6b |f locali|zed pack|
|000045f0| 69 6e 67 2e 20 20 49 66 | 20 77 65 20 64 69 64 20 |ing. If| we did |
|00004600| 74 68 69 73 2c 20 74 68 | 65 6e 20 74 68 65 20 63 |this, th|en the c|
|00004610| 6f 6e 63 65 70 74 20 6f | 66 20 61 20 73 61 76 65 |oncept o|f a save|
|00004620| 20 6c 6f 63 61 74 69 6f | 6e 0a 6d 69 67 68 74 20 | locatio|n.might |
|00004630| 62 65 20 65 6c 69 6d 69 | 6e 61 74 65 64 2c 20 62 |be elimi|nated, b|
|00004640| 75 74 20 74 68 69 73 20 | 77 6f 75 6c 64 20 72 65 |ut this |would re|
|00004650| 71 75 69 72 65 20 6d 61 | 6a 6f 72 20 63 68 61 6e |quire ma|jor chan|
|00004660| 67 65 73 20 69 6e 20 74 | 68 65 20 49 52 32 0a 72 |ges in t|he IR2.r|
|00004670| 65 70 72 65 73 65 6e 74 | 61 74 69 6f 6e 20 66 6f |epresent|ation fo|
|00004680| 72 20 63 61 6c 6c 20 61 | 6e 64 2f 6f 72 20 6c 69 |r call a|nd/or li|
|00004690| 66 65 74 69 6d 65 20 69 | 6e 66 6f 2e 20 20 50 72 |fetime i|nfo. Pr|
|000046a0| 6f 62 61 62 6c 79 20 77 | 65 20 77 69 6c 6c 20 77 |obably w|e will w|
|000046b0| 61 6e 74 20 73 61 76 69 | 6e 67 20 74 6f 0a 63 6f |ant savi|ng to.co|
|000046c0| 6e 74 69 6e 75 65 20 74 | 6f 20 62 65 20 73 6f 6d |ntinue t|o be som|
|000046d0| 65 77 68 61 74 20 6d 61 | 67 69 63 61 6c 2e 5d 0a |ewhat ma|gical.].|
|000046e0| 0a 0a 48 6f 77 20 61 62 | 6f 75 74 3a 0a 0a 28 64 |..How ab|out:..(d|
|000046f0| 65 66 73 74 72 75 63 74 | 20 76 61 72 2d 69 6e 66 |efstruct| var-inf|
|00004700| 6f 0a 20 20 3b 3b 0a 20 | 20 3b 3b 20 54 68 69 73 |o. ;;. | ;; This|
|00004710| 20 76 61 72 69 61 62 6c | 65 27 73 20 6e 61 6d 65 | variabl|e's name|
|00004720| 2e 20 28 73 79 6d 62 6f | 6c 2d 6e 61 6d 65 20 6f |. (symbo|l-name o|
|00004730| 66 20 74 68 65 20 73 79 | 6d 62 6f 6c 29 0a 20 20 |f the sy|mbol). |
|00004740| 28 6e 61 6d 65 20 6e 69 | 6c 20 3a 74 79 70 65 20 |(name ni|l :type |
|00004750| 73 69 6d 70 6c 65 2d 73 | 74 72 69 6e 67 29 0a 20 |simple-s|tring). |
|00004760| 20 3b 3b 0a 20 20 3b 3b | 20 54 68 65 20 53 43 2c | ;;. ;;| The SC,|
|00004770| 20 49 44 20 61 6e 64 20 | 6f 66 66 73 65 74 2c 20 | ID and |offset, |
|00004780| 65 6e 63 6f 64 65 64 20 | 61 73 20 62 69 74 2d 66 |encoded |as bit-f|
|00004790| 69 65 6c 64 73 2e 0a 20 | 20 28 62 69 74 73 20 6e |ields.. | (bits n|
|000047a0| 69 6c 20 3a 74 79 70 65 | 20 66 69 78 6e 75 6d 29 |il :type| fixnum)|
|000047b0| 0a 20 20 3b 3b 0a 20 20 | 3b 3b 20 54 68 65 20 73 |. ;;. |;; The s|
|000047c0| 65 74 20 6f 66 20 62 6c | 6f 63 6b 73 20 74 68 69 |et of bl|ocks thi|
|000047d0| 73 20 76 61 72 69 61 62 | 6c 65 20 69 73 20 6c 69 |s variab|le is li|
|000047e0| 76 65 20 69 6e 2e 20 20 | 49 66 20 61 20 62 69 74 |ve in. |If a bit|
|000047f0| 2d 76 65 63 74 6f 72 2c | 20 74 68 65 6e 20 69 74 |-vector,| then it|
|00004800| 20 68 61 73 0a 20 20 3b | 3b 20 61 20 31 20 77 68 | has. ;|; a 1 wh|
|00004810| 65 6e 20 69 6e 64 65 78 | 65 64 20 62 79 20 74 68 |en index|ed by th|
|00004820| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 61 20 62 6c |e number| of a bl|
|00004830| 6f 63 6b 20 74 68 61 74 | 20 69 74 20 69 73 20 6c |ock that| it is l|
|00004840| 69 76 65 20 69 6e 2e 20 | 20 49 66 20 61 6e 0a 20 |ive in. | If an. |
|00004850| 20 3b 3b 20 49 2d 76 65 | 63 74 6f 72 2c 20 74 68 | ;; I-ve|ctor, th|
|00004860| 65 6e 20 69 74 20 6c 69 | 73 74 73 20 74 68 65 20 |en it li|sts the |
|00004870| 6c 69 76 65 20 62 6c 6f | 63 6b 20 6e 75 6d 62 65 |live blo|ck numbe|
|00004880| 72 73 2e 20 20 49 66 20 | 61 20 66 69 78 6e 75 6d |rs. If |a fixnum|
|00004890| 2c 20 74 68 65 6e 20 74 | 68 61 74 20 69 73 0a 20 |, then t|hat is. |
|000048a0| 20 3b 3b 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f | ;; the |number o|
|000048b0| 66 20 74 68 65 20 73 6f | 6c 65 20 6c 69 76 65 20 |f the so|le live |
|000048c0| 62 6c 6f 63 6b 2e 0a 20 | 20 28 6c 69 66 65 74 69 |block.. | (lifeti|
|000048d0| 6d 65 20 6e 69 6c 20 3a | 74 79 70 65 20 28 6f 72 |me nil :|type (or|
|000048e0| 20 76 65 63 74 6f 72 20 | 66 69 78 6e 75 6d 29 29 | vector |fixnum))|
|000048f0| 0a 20 20 3b 3b 0a 20 20 | 3b 3b 20 54 68 65 20 76 |. ;;. |;; The v|
|00004900| 61 72 69 61 62 6c 65 27 | 73 20 74 79 70 65 2c 20 |ariable'|s type, |
|00004910| 72 65 70 72 65 73 65 6e | 74 65 64 20 61 73 20 6c |represen|ted as l|
|00004920| 69 73 74 2d 73 74 79 6c | 65 20 74 79 70 65 20 64 |ist-styl|e type d|
|00004930| 65 73 63 72 69 70 74 6f | 72 2e 0a 20 20 74 79 70 |escripto|r.. typ|
|00004940| 65 29 0a 0a 54 68 65 6e | 20 74 68 65 20 64 65 62 |e)..Then| the deb|
|00004950| 75 67 2d 69 6e 66 6f 20 | 68 6f 6c 64 73 20 61 20 |ug-info |holds a |
|00004960| 73 69 6d 70 6c 65 2d 76 | 65 63 74 6f 72 20 6f 66 |simple-v|ector of|
|00004970| 20 61 6c 6c 20 74 68 65 | 20 76 61 72 2d 69 6e 66 | all the| var-inf|
|00004980| 6f 20 73 74 72 75 63 74 | 75 72 65 73 20 66 6f 72 |o struct|ures for|
|00004990| 0a 74 68 61 74 20 63 6f | 6d 70 6f 6e 65 6e 74 2e |.that co|mponent.|
|000049a0| 20 20 57 65 20 6d 69 67 | 68 74 20 61 73 20 77 65 | We mig|ht as we|
|000049b0| 6c 6c 20 6d 61 6b 65 20 | 69 74 20 73 6f 72 74 65 |ll make |it sorte|
|000049c0| 64 20 61 6c 70 68 61 62 | 65 74 69 63 61 6c 6c 79 |d alphab|etically|
|000049d0| 20 62 79 20 6e 61 6d 65 | 2c 20 73 6f 0a 74 68 61 | by name|, so.tha|
|000049e0| 74 20 77 65 20 63 61 6e | 20 62 69 6e 61 72 79 2d |t we can| binary-|
|000049f0| 73 65 61 72 63 68 20 74 | 6f 20 66 69 6e 64 20 74 |search t|o find t|
|00004a00| 68 65 20 76 61 72 69 61 | 62 6c 65 20 63 6f 72 72 |he varia|ble corr|
|00004a10| 65 73 70 6f 6e 64 69 6e | 67 20 74 6f 20 61 20 70 |espondin|g to a p|
|00004a20| 61 72 74 69 63 75 6c 61 | 72 0a 6e 61 6d 65 2e 0a |articula|r.name..|
|00004a30| 0a 57 65 20 6e 65 65 64 | 20 74 6f 20 62 65 20 61 |.We need| to be a|
|00004a40| 62 6c 65 20 74 6f 20 74 | 72 61 6e 73 6c 61 74 65 |ble to t|ranslate|
|00004a50| 20 50 43 73 20 74 6f 20 | 62 6c 6f 63 6b 20 6e 75 | PCs to |block nu|
|00004a60| 6d 62 65 72 73 2e 20 20 | 54 68 69 73 20 63 61 6e |mbers. |This can|
|00004a70| 20 62 65 20 64 6f 6e 65 | 20 62 79 20 61 6e 0a 49 | be done| by an.I|
|00004a80| 2d 56 65 63 74 6f 72 20 | 69 6e 20 74 68 65 20 63 |-Vector |in the c|
|00004a90| 6f 6d 70 6f 6e 65 6e 74 | 20 74 68 61 74 20 63 6f |omponent| that co|
|00004aa0| 6e 74 61 69 6e 73 20 74 | 68 65 20 73 74 61 72 74 |ntains t|he start|
|00004ab0| 20 6c 6f 63 61 74 69 6f | 6e 20 6f 66 20 65 61 63 | locatio|n of eac|
|00004ac0| 68 20 62 6c 6f 63 6b 2e | 20 20 54 68 65 0a 62 6c |h block.| The.bl|
|00004ad0| 6f 63 6b 20 6e 75 6d 62 | 65 72 20 69 73 20 74 68 |ock numb|er is th|
|00004ae0| 65 20 69 6e 64 65 78 20 | 61 74 20 77 68 69 63 68 |e index |at which|
|00004af0| 20 77 65 20 66 69 6e 64 | 20 74 68 65 20 63 6f 72 | we find| the cor|
|00004b00| 72 65 63 74 20 50 43 20 | 72 61 6e 67 65 2e 20 20 |rect PC |range. |
|00004b10| 54 68 69 73 20 72 65 71 | 75 69 72 65 73 0a 74 68 |This req|uires.th|
|00004b20| 61 74 20 77 65 20 75 73 | 65 20 61 6e 20 65 6d 69 |at we us|e an emi|
|00004b30| 74 2d 6f 72 64 65 72 20 | 62 6c 6f 63 6b 20 6e 75 |t-order |block nu|
|00004b40| 6d 62 65 72 69 6e 67 20 | 64 69 73 74 69 6e 63 74 |mbering |distinct|
|00004b50| 20 66 72 6f 6d 20 74 68 | 65 20 49 52 32 2d 42 6c | from th|e IR2-Bl|
|00004b60| 6f 63 6b 2d 4e 75 6d 62 | 65 72 2c 0a 62 75 74 20 |ock-Numb|er,.but |
|00004b70| 74 68 61 74 20 69 73 6e | 27 74 20 61 6e 79 20 62 |that isn|'t any b|
|00004b80| 69 67 20 64 65 61 6c 2e | 20 20 54 68 69 73 20 73 |ig deal.| This s|
|00004b90| 65 65 6d 73 20 73 70 61 | 63 65 2d 65 78 70 65 6e |eems spa|ce-expen|
|00004ba0| 73 69 76 65 2c 20 62 75 | 74 20 69 74 20 69 73 6e |sive, bu|t it isn|
|00004bb0| 27 74 20 74 6f 6f 20 62 | 61 64 2c 0a 73 69 6e 63 |'t too b|ad,.sinc|
|00004bc0| 65 20 69 74 20 77 6f 75 | 6c 64 20 6f 6e 6c 79 20 |e it wou|ld only |
|00004bd0| 62 65 20 61 20 66 72 61 | 63 74 69 6f 6e 20 6f 66 |be a fra|ction of|
|00004be0| 20 74 68 65 20 63 6f 64 | 65 20 73 69 7a 65 20 69 | the cod|e size i|
|00004bf0| 66 20 74 68 65 20 61 76 | 65 72 61 67 65 20 62 6c |f the av|erage bl|
|00004c00| 6f 63 6b 20 6c 65 6e 67 | 74 68 0a 69 73 20 61 20 |ock leng|th.is a |
|00004c10| 66 65 77 20 77 6f 72 64 | 73 20 6f 72 20 6d 6f 72 |few word|s or mor|
|00004c20| 65 2e 0a 0a 41 6e 20 61 | 64 76 61 6e 74 61 67 65 |e...An a|dvantage|
|00004c30| 20 6f 66 20 6f 75 72 20 | 70 65 72 2d 62 6c 6f 63 | of our |per-bloc|
|00004c40| 6b 20 6c 69 66 65 74 69 | 6d 65 20 72 65 70 72 65 |k lifeti|me repre|
|00004c50| 73 65 6e 74 61 74 69 6f | 6e 20 69 73 20 74 68 61 |sentatio|n is tha|
|00004c60| 74 20 69 74 20 64 69 72 | 65 63 74 6c 79 0a 73 75 |t it dir|ectly.su|
|00004c70| 70 70 6f 72 74 73 20 6b | 65 65 70 69 6e 67 20 61 |pports k|eeping a|
|00004c80| 20 76 61 72 69 61 62 6c | 65 20 69 6e 20 64 69 66 | variabl|e in dif|
|00004c90| 66 65 72 65 6e 74 20 6c | 6f 63 61 74 69 6f 6e 73 |ferent l|ocations|
|00004ca0| 20 77 68 65 6e 20 69 6e | 20 64 69 66 66 65 72 65 | when in| differe|
|00004cb0| 6e 74 20 62 6c 6f 63 6b | 73 2c 0a 69 2e 65 2e 20 |nt block|s,.i.e. |
|00004cc0| 6d 75 6c 74 69 2d 6c 6f | 63 61 74 69 6f 6e 20 70 |multi-lo|cation p|
|00004cd0| 61 63 6b 69 6e 67 2e 20 | 20 57 65 20 75 73 65 20 |acking. | We use |
|00004ce0| 61 20 64 69 66 66 65 72 | 65 6e 74 20 76 61 72 2d |a differ|ent var-|
|00004cf0| 69 6e 66 6f 20 66 6f 72 | 20 65 61 63 68 20 64 69 |info for| each di|
|00004d00| 66 66 65 72 65 6e 74 0a | 70 61 63 6b 69 6e 67 2c |fferent.|packing,|
|00004d10| 20 73 69 6e 63 65 20 74 | 68 65 20 53 43 20 61 6e | since t|he SC an|
|00004d20| 64 20 6f 66 66 73 65 74 | 20 61 72 65 20 70 6f 74 |d offset| are pot|
|00004d30| 65 6e 74 69 61 6c 6c 79 | 20 64 69 66 66 65 72 65 |entially| differe|
|00004d40| 6e 74 2e 20 20 54 68 65 | 20 4e 61 6d 65 20 61 6e |nt. The| Name an|
|00004d50| 64 20 49 44 0a 61 72 65 | 20 74 68 65 20 73 61 6d |d ID.are| the sam|
|00004d60| 65 2c 20 72 65 70 72 65 | 73 65 6e 74 69 6e 67 20 |e, repre|senting |
|00004d70| 74 68 65 20 66 61 63 74 | 20 74 68 61 74 20 69 74 |the fact| that it|
|00004d80| 20 69 73 20 74 68 65 20 | 73 61 6d 65 20 76 61 72 | is the |same var|
|00004d90| 69 61 62 6c 65 2e 20 20 | 49 74 20 69 73 20 68 65 |iable. |It is he|
|00004da0| 72 65 0a 74 68 61 74 20 | 74 68 65 20 49 44 20 69 |re.that |the ID i|
|00004db0| 73 20 6d 6f 73 74 20 73 | 69 67 6e 69 66 69 63 61 |s most s|ignifica|
|00004dc0| 6e 74 2c 20 73 69 6e 63 | 65 20 74 68 65 20 64 65 |nt, sinc|e the de|
|00004dd0| 62 75 67 67 65 72 20 63 | 6f 75 6c 64 20 6f 74 68 |bugger c|ould oth|
|00004de0| 65 72 77 69 73 65 20 6d | 61 6b 65 0a 73 61 6d 65 |erwise m|ake.same|
|00004df0| 2d 6e 61 6d 65 20 76 61 | 72 69 61 62 6c 65 73 20 |-name va|riables |
|00004e00| 75 6e 69 71 75 65 20 61 | 6c 6c 20 62 79 20 69 74 |unique a|ll by it|
|00004e10| 73 65 6c 66 2e 0a 0a 0a | 0a 53 74 61 63 6b 20 70 |self....|.Stack p|
|00004e20| 61 72 73 69 6e 67 3a 0a | 0a 5b 5c 23 5c 23 5c 23 |arsing:.|.[\#\#\#|
|00004e30| 20 50 72 6f 62 61 62 6c | 79 20 6e 6f 74 20 77 6f | Probabl|y not wo|
|00004e40| 72 74 68 20 74 72 79 69 | 6e 67 20 74 6f 20 6d 61 |rth tryi|ng to ma|
|00004e50| 6b 65 20 74 68 65 20 73 | 74 61 63 6b 20 70 61 72 |ke the s|tack par|
|00004e60| 73 65 61 62 6c 65 20 66 | 72 6f 6d 20 74 68 65 20 |seable f|rom the |
|00004e70| 62 6f 74 74 6f 6d 20 75 | 70 2e 0a 54 68 65 72 65 |bottom u|p..There|
|00004e80| 20 61 72 65 20 74 6f 6f | 20 6d 61 6e 79 20 63 6f | are too| many co|
|00004e90| 6d 70 6c 69 63 61 74 69 | 6f 6e 73 20 77 68 65 6e |mplicati|ons when|
|00004ea0| 20 77 65 20 73 74 61 72 | 74 20 68 61 76 69 6e 67 | we star|t having|
|00004eb0| 20 76 61 72 69 61 62 6c | 65 20 73 69 7a 65 64 20 | variabl|e sized |
|00004ec0| 73 74 75 66 66 20 6f 6e | 0a 74 68 65 20 73 74 61 |stuff on|.the sta|
|00004ed0| 63 6b 2e 20 20 49 74 20 | 73 65 65 6d 73 20 6d 6f |ck. It |seems mo|
|00004ee0| 72 65 20 70 72 6f 66 69 | 74 61 62 6c 65 20 74 6f |re profi|table to|
|00004ef0| 20 77 6f 72 6b 20 6f 6e | 20 6d 61 6b 69 6e 67 20 | work on| making |
|00004f00| 74 6f 70 2d 64 6f 77 6e | 20 70 61 72 73 69 6e 67 |top-down| parsing|
|00004f10| 20 72 6f 62 75 73 74 2e | 0a 53 69 6e 63 65 20 77 | robust.|.Since w|
|00004f20| 65 20 61 72 65 20 6e 6f | 77 20 70 6c 61 6e 6e 69 |e are no|w planni|
|00004f30| 6e 67 20 74 6f 20 77 69 | 72 65 20 74 68 65 20 62 |ng to wi|re the b|
|00004f40| 6f 74 74 6f 6d 2d 75 70 | 20 6c 69 6e 6b 61 67 65 |ottom-up| linkage|
|00004f50| 20 69 6e 66 6f 2c 20 73 | 63 61 6e 6e 69 6e 67 20 | info, s|canning |
|00004f60| 66 72 6f 6d 20 74 68 65 | 0a 62 6f 74 74 6f 6d 20 |from the|.bottom |
|00004f70| 74 6f 20 66 69 6e 64 20 | 74 68 65 20 74 6f 70 20 |to find |the top |
|00004f80| 66 72 61 6d 65 20 73 68 | 6f 75 6c 64 6e 27 74 20 |frame sh|ouldn't |
|00004f90| 62 65 20 74 6f 6f 20 69 | 6e 65 66 66 69 63 69 65 |be too i|nefficie|
|00004fa0| 6e 74 2c 20 65 76 65 6e | 20 77 68 65 6e 20 74 68 |nt, even| when th|
|00004fb0| 65 72 65 20 77 61 73 0a | 61 20 72 75 6e 61 77 61 |ere was.|a runawa|
|00004fc0| 79 20 72 65 63 75 72 73 | 69 6f 6e 2e 20 20 49 66 |y recurs|ion. If|
|00004fd0| 20 77 65 20 73 6f 6d 65 | 68 6f 77 20 6a 75 6d 70 | we some|how jump|
|00004fe0| 20 69 6e 74 6f 20 68 79 | 70 65 72 73 70 61 63 65 | into hy|perspace|
|00004ff0| 2c 20 74 68 65 6e 20 74 | 68 65 20 64 65 62 75 67 |, then t|he debug|
|00005000| 67 65 72 20 6d 61 79 0a | 67 65 74 20 63 6f 6e 66 |ger may.|get conf|
|00005010| 75 73 65 64 2c 20 62 75 | 74 20 77 65 20 63 61 6e |used, bu|t we can|
|00005020| 20 64 65 62 75 67 20 74 | 68 69 73 20 73 6f 72 74 | debug t|his sort|
|00005030| 20 6f 66 20 6c 6f 77 2d | 6c 65 76 65 6c 20 73 79 | of low-|level sy|
|00005040| 73 74 65 6d 20 6c 6f 73 | 73 61 67 65 20 75 73 69 |stem los|sage usi|
|00005050| 6e 67 0a 41 44 42 2e 5d | 0a 0a 0a 54 68 65 72 65 |ng.ADB.]|...There|
|00005060| 20 61 72 65 20 63 75 72 | 72 65 6e 74 6c 79 20 74 | are cur|rently t|
|00005070| 68 72 65 65 20 72 65 6c | 65 76 61 6e 74 20 63 6f |hree rel|evant co|
|00005080| 6e 74 65 78 74 20 70 6f | 69 6e 74 65 72 73 3a 0a |ntext po|inters:.|
|00005090| 20 20 2d 2d 20 54 68 65 | 20 50 43 2e 20 20 54 68 | -- The| PC. Th|
|000050a0| 65 20 63 75 72 72 65 6e | 74 20 50 43 20 69 73 20 |e curren|t PC is |
|000050b0| 77 69 72 65 64 20 28 69 | 6d 70 6c 69 63 69 74 20 |wired (i|mplicit |
|000050c0| 69 6e 20 74 68 65 20 6d | 61 63 68 69 6e 65 29 2e |in the m|achine).|
|000050d0| 20 20 41 20 73 61 76 65 | 64 0a 20 20 20 20 20 50 | A save|d. P|
|000050e0| 43 20 28 52 45 54 55 52 | 4e 2d 50 43 29 20 6d 61 |C (RETUR|N-PC) ma|
|000050f0| 79 20 62 65 20 61 6e 79 | 77 68 65 72 65 20 69 6e |y be any|where in|
|00005100| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 66 72 61 | the cur|rent fra|
|00005110| 6d 65 2e 0a 20 20 2d 2d | 20 54 68 65 20 63 75 72 |me.. --| The cur|
|00005120| 72 65 6e 74 20 73 74 61 | 63 6b 20 63 6f 6e 74 65 |rent sta|ck conte|
|00005130| 78 74 20 28 43 4f 4e 54 | 29 2e 20 20 54 68 65 20 |xt (CONT|). The |
|00005140| 63 75 72 72 65 6e 74 20 | 43 4f 4e 54 20 69 73 20 |current |CONT is |
|00005150| 77 69 72 65 64 2e 20 20 | 41 20 73 61 76 65 64 0a |wired. |A saved.|
|00005160| 20 20 20 20 20 43 4f 4e | 54 20 28 4f 4c 44 2d 43 | CON|T (OLD-C|
|00005170| 4f 4e 54 29 20 6d 61 79 | 20 62 65 20 61 6e 79 77 |ONT) may| be anyw|
|00005180| 68 65 72 65 20 69 6e 20 | 74 68 65 20 63 75 72 72 |here in |the curr|
|00005190| 65 6e 74 20 66 72 61 6d | 65 2e 0a 20 20 2d 2d 20 |ent fram|e.. -- |
|000051a0| 54 68 65 20 63 75 72 72 | 65 6e 74 20 63 6f 64 65 |The curr|ent code|
|000051b0| 20 6f 62 6a 65 63 74 20 | 28 45 4e 56 29 2e 20 20 | object |(ENV). |
|000051c0| 54 68 65 20 63 75 72 72 | 65 6e 74 20 45 4e 56 20 |The curr|ent ENV |
|000051d0| 69 73 20 77 69 72 65 64 | 2e 20 20 57 68 65 6e 20 |is wired|. When |
|000051e0| 73 61 76 65 64 2c 0a 20 | 20 20 20 20 74 68 69 73 |saved,. | this|
|000051f0| 20 69 73 20 65 78 74 72 | 61 2d 64 69 66 66 69 63 | is extr|a-diffic|
|00005200| 75 6c 74 20 74 6f 20 6c | 6f 63 61 74 65 2c 20 73 |ult to l|ocate, s|
|00005210| 69 6e 63 65 20 69 74 20 | 69 73 20 73 61 76 65 64 |ince it |is saved|
|00005220| 20 62 79 20 74 68 65 20 | 63 61 6c 6c 65 72 2c 20 | by the |caller, |
|00005230| 61 6e 64 20 69 73 0a 20 | 20 20 20 20 74 68 75 73 |and is. | thus|
|00005240| 20 61 74 20 61 6e 20 75 | 6e 6b 6e 6f 77 6e 20 6f | at an u|nknown o|
|00005250| 66 66 73 65 74 20 69 6e | 20 4f 4c 44 2d 43 4f 4e |ffset in| OLD-CON|
|00005260| 54 2c 20 72 61 74 68 65 | 72 20 74 68 61 6e 20 61 |T, rathe|r than a|
|00005270| 6e 79 77 68 65 72 65 20 | 69 6e 20 74 68 65 20 63 |nywhere |in the c|
|00005280| 75 72 72 65 6e 74 0a 20 | 20 20 20 20 66 72 61 6d |urrent. | fram|
|00005290| 65 2e 0a 0a 57 65 20 6d | 75 73 74 20 68 61 76 65 |e...We m|ust have|
|000052a0| 20 61 6c 6c 20 6f 66 20 | 74 68 65 73 65 20 74 6f | all of |these to|
|000052b0| 20 70 61 72 73 65 20 74 | 68 65 20 73 74 61 63 6b | parse t|he stack|
|000052c0| 2e 0a 0a 57 69 74 68 20 | 74 68 65 20 70 72 6f 70 |...With |the prop|
|000052d0| 6f 73 65 64 20 44 65 62 | 75 67 2d 46 75 6e 63 74 |osed Deb|ug-Funct|
|000052e0| 69 6f 6e 2c 20 77 65 20 | 70 61 72 73 65 20 74 68 |ion, we |parse th|
|000052f0| 65 20 73 74 61 63 6b 20 | 28 73 74 61 72 74 69 6e |e stack |(startin|
|00005300| 67 20 61 74 20 74 68 65 | 20 74 6f 70 29 20 6c 69 |g at the| top) li|
|00005310| 6b 65 0a 74 68 69 73 3a | 0a 20 31 5d 20 55 73 65 |ke.this:|. 1] Use|
|00005320| 20 45 4e 56 20 74 6f 20 | 6c 6f 63 61 74 65 20 74 | ENV to |locate t|
|00005330| 68 65 20 63 75 72 72 65 | 6e 74 20 44 65 62 75 67 |he curre|nt Debug|
|00005340| 2d 49 6e 66 6f 0a 20 32 | 5d 20 55 73 65 20 74 68 |-Info. 2|] Use th|
|00005350| 65 20 44 65 62 75 67 2d | 49 6e 66 6f 20 61 6e 64 |e Debug-|Info and|
|00005360| 20 50 43 20 74 6f 20 64 | 65 74 65 72 6d 69 6e 65 | PC to d|etermine|
|00005370| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 44 65 62 | the cur|rent Deb|
|00005380| 75 67 2d 46 75 6e 63 74 | 69 6f 6e 2e 0a 20 33 5d |ug-Funct|ion.. 3]|
|00005390| 20 55 73 65 20 74 68 65 | 20 44 65 62 75 67 2d 46 | Use the| Debug-F|
|000053a0| 75 6e 63 74 69 6f 6e 20 | 74 6f 20 66 69 6e 64 20 |unction |to find |
|000053b0| 74 68 65 20 4f 4c 44 2d | 43 4f 4e 54 20 61 6e 64 |the OLD-|CONT and|
|000053c0| 20 52 45 54 55 52 4e 2d | 50 43 2e 0a 20 34 5d 20 | RETURN-|PC.. 4] |
|000053d0| 46 69 6e 64 20 74 68 65 | 20 6f 6c 64 20 45 4e 56 |Find the| old ENV|
|000053e0| 20 62 79 20 73 65 61 72 | 63 68 69 6e 67 20 75 70 | by sear|ching up|
|000053f0| 20 74 68 65 20 73 74 61 | 63 6b 20 66 6f 72 20 61 | the sta|ck for a|
|00005400| 20 73 61 76 65 64 20 63 | 6f 64 65 20 6f 62 6a 65 | saved c|ode obje|
|00005410| 63 74 0a 20 20 20 20 63 | 6f 6e 74 61 69 6e 69 6e |ct. c|ontainin|
|00005420| 67 20 74 68 65 20 52 45 | 54 55 52 4e 2d 50 43 2e |g the RE|TURN-PC.|
|00005430| 0a 20 35 5d 20 41 73 73 | 69 67 6e 20 6f 6c 64 20 |. 5] Ass|ign old |
|00005440| 45 4e 56 20 74 6f 20 45 | 4e 56 2c 20 4f 4c 44 2d |ENV to E|NV, OLD-|
|00005450| 43 4f 4e 54 20 74 6f 20 | 43 4f 4e 54 2c 20 52 45 |CONT to |CONT, RE|
|00005460| 54 55 52 4e 2d 50 43 20 | 74 6f 20 50 43 20 61 6e |TURN-PC |to PC an|
|00005470| 64 20 67 6f 74 6f 20 31 | 2e 0a 0a 49 66 20 77 65 |d goto 1|...If we|
|00005480| 20 63 68 61 6e 67 65 64 | 20 74 68 65 20 66 75 6e | changed| the fun|
|00005490| 63 74 69 6f 6e 20 72 65 | 70 72 65 73 65 6e 74 61 |ction re|presenta|
|000054a0| 74 69 6f 6e 20 73 6f 20 | 74 68 61 74 20 74 68 65 |tion so |that the|
|000054b0| 20 63 6f 64 65 20 61 6e | 64 20 65 6e 76 69 72 6f | code an|d enviro|
|000054c0| 6e 6d 65 6e 74 20 77 65 | 72 65 0a 61 20 73 69 6e |nment we|re.a sin|
|000054d0| 67 6c 65 20 6f 62 6a 65 | 63 74 2c 20 74 68 65 6e |gle obje|ct, then|
|000054e0| 20 74 68 65 20 6c 6f 63 | 61 74 69 6f 6e 20 6f 66 | the loc|ation of|
|000054f0| 20 74 68 65 20 6f 6c 64 | 20 45 4e 56 20 77 6f 75 | the old| ENV wou|
|00005500| 6c 64 20 62 65 20 73 69 | 6d 70 6c 69 66 69 65 64 |ld be si|mplified|
|00005510| 2e 20 20 42 75 74 20 77 | 65 0a 73 74 69 6c 6c 20 |. But w|e.still |
|00005520| 6e 65 65 64 20 74 6f 20 | 72 65 70 72 65 73 65 6e |need to |represen|
|00005530| 74 20 45 4e 56 20 61 73 | 20 73 65 70 61 72 61 74 |t ENV as| separat|
|00005540| 65 20 66 72 6f 6d 20 50 | 43 2c 20 73 69 6e 63 65 |e from P|C, since|
|00005550| 20 69 6e 74 65 72 72 75 | 70 74 73 20 61 6e 64 20 | interru|pts and |
|00005560| 65 72 72 6f 72 73 0a 63 | 61 6e 20 68 61 70 70 65 |errors.c|an happe|
|00005570| 6e 20 77 68 65 6e 20 74 | 68 65 20 63 75 72 72 65 |n when t|he curre|
|00005580| 6e 74 20 50 43 20 69 73 | 6e 27 74 20 70 6f 73 69 |nt PC is|n't posi|
|00005590| 74 69 6f 6e 65 64 20 61 | 74 20 61 20 76 61 6c 69 |tioned a|t a vali|
|000055a0| 64 20 72 65 74 75 72 6e | 20 50 43 2e 0a 0a 49 74 |d return| PC...It|
|000055b0| 20 73 65 65 6d 73 20 6c | 69 6b 65 20 69 74 20 6d | seems l|ike it m|
|000055c0| 69 67 68 74 20 62 65 20 | 61 20 67 6f 6f 64 20 69 |ight be |a good i|
|000055d0| 64 65 61 20 74 6f 20 73 | 61 76 65 20 4f 4c 44 2d |dea to s|ave OLD-|
|000055e0| 43 4f 4e 54 2c 20 52 45 | 54 55 52 4e 2d 50 43 20 |CONT, RE|TURN-PC |
|000055f0| 61 6e 64 20 45 4e 56 20 | 61 74 0a 74 68 65 20 62 |and ENV |at.the b|
|00005600| 65 67 69 6e 6e 69 6e 67 | 20 6f 66 20 74 68 65 20 |eginning| of the |
|00005610| 66 72 61 6d 65 20 28 62 | 65 66 6f 72 65 20 61 6e |frame (b|efore an|
|00005620| 79 20 73 74 61 63 6b 20 | 61 72 67 75 6d 65 6e 74 |y stack |argument|
|00005630| 73 29 2e 20 20 54 68 65 | 6e 20 77 65 20 77 6f 75 |s). The|n we wou|
|00005640| 6c 64 6e 27 74 20 68 61 | 76 65 0a 74 6f 20 73 65 |ldn't ha|ve.to se|
|00005650| 61 72 63 68 20 74 6f 20 | 6c 6f 63 61 74 65 20 45 |arch to |locate E|
|00005660| 4e 56 2c 20 61 6e 64 20 | 77 65 20 61 6c 73 6f 20 |NV, and |we also |
|00005670| 68 61 76 65 20 61 20 68 | 6f 70 65 20 6f 66 20 70 |have a h|ope of p|
|00005680| 61 72 73 69 6e 67 20 74 | 68 65 20 73 74 61 63 6b |arsing t|he stack|
|00005690| 20 65 76 65 6e 20 69 66 | 0a 69 74 20 69 73 20 64 | even if|.it is d|
|000056a0| 61 6d 61 67 65 64 2e 20 | 20 41 73 20 6c 6f 6e 67 |amaged. | As long|
|000056b0| 20 61 73 20 77 65 20 63 | 61 6e 20 6c 6f 63 61 74 | as we c|an locat|
|000056c0| 65 20 74 68 65 20 73 74 | 61 72 74 20 6f 66 20 73 |e the st|art of s|
|000056d0| 6f 6d 65 20 66 72 61 6d | 65 2c 20 77 65 20 63 61 |ome fram|e, we ca|
|000056e0| 6e 20 74 72 61 63 65 0a | 74 68 65 20 73 74 61 63 |n trace.|the stac|
|000056f0| 6b 20 61 62 6f 76 65 20 | 74 68 61 74 20 66 72 61 |k above |that fra|
|00005700| 6d 65 2e 20 20 57 65 20 | 63 61 6e 20 72 65 63 6f |me. We |can reco|
|00005710| 67 6e 69 7a 65 20 61 20 | 70 72 6f 62 61 62 6c 65 |gnize a |probable|
|00005720| 20 66 72 61 6d 65 20 73 | 74 61 72 74 20 62 79 0a | frame s|tart by.|
|00005730| 73 63 61 6e 6e 69 6e 67 | 20 74 68 65 20 73 74 61 |scanning| the sta|
|00005740| 63 6b 20 66 6f 72 20 61 | 20 63 6f 64 65 20 6f 62 |ck for a| code ob|
|00005750| 6a 65 63 74 20 28 70 72 | 65 73 75 6d 61 62 6c 79 |ject (pr|esumably|
|00005760| 20 61 20 73 61 76 65 64 | 20 45 4e 56 29 2e 0a 0a | a saved| ENV)...|
|00005770| 20 50 72 6f 62 61 62 6c | 79 20 77 65 20 77 61 6e | Probabl|y we wan|
|00005780| 74 20 73 6f 6d 65 20 66 | 61 69 72 6c 79 20 67 65 |t some f|airly ge|
|00005790| 6e 65 72 61 6c 0a 6d 65 | 63 68 61 6e 69 73 6d 20 |neral.me|chanism |
|000057a0| 66 6f 72 20 73 70 65 63 | 69 66 79 69 6e 67 20 74 |for spec|ifying t|
|000057b0| 68 61 74 20 61 20 54 4e | 20 73 68 6f 75 6c 64 20 |hat a TN| should |
|000057c0| 62 65 20 63 6f 6e 73 69 | 64 65 72 65 64 20 74 6f |be consi|dered to|
|000057d0| 20 62 65 20 6c 69 76 65 | 20 66 6f 72 20 74 68 65 | be live| for the|
|000057e0| 0a 64 75 72 61 74 69 6f | 6e 20 6f 66 20 61 20 73 |.duratio|n of a s|
|000057f0| 70 65 63 69 66 69 65 64 | 20 65 6e 76 69 72 6f 6e |pecified| environ|
|00005800| 6d 65 6e 74 2e 20 20 49 | 74 20 77 6f 75 6c 64 20 |ment. I|t would |
|00005810| 62 65 20 73 6f 6d 65 77 | 68 61 74 20 65 61 73 69 |be somew|hat easi|
|00005820| 65 72 20 74 6f 20 73 70 | 65 63 69 66 79 0a 74 68 |er to sp|ecify.th|
|00005830| 61 74 20 74 68 65 20 54 | 4e 20 69 73 20 6c 69 76 |at the T|N is liv|
|00005840| 65 20 66 6f 72 20 61 6c | 6c 20 74 69 6d 65 2c 20 |e for al|l time, |
|00005850| 62 75 74 20 74 68 69 73 | 20 77 6f 75 6c 64 20 62 |but this| would b|
|00005860| 65 63 6f 6d 65 20 76 65 | 72 79 20 73 70 61 63 65 |ecome ve|ry space|
|00005870| 2d 69 6e 65 66 66 69 63 | 69 65 6e 74 0a 69 6e 20 |-ineffic|ient.in |
|00005880| 6c 61 72 67 65 20 62 6c | 6f 63 6b 20 63 6f 6d 70 |large bl|ock comp|
|00005890| 69 6c 61 74 69 6f 6e 73 | 2e 0a 0a 54 68 69 73 20 |ilations|...This |
|000058a0| 6d 65 63 68 61 6e 69 73 | 6d 20 63 6f 75 6c 64 20 |mechanis|m could |
|000058b0| 62 65 20 71 75 69 74 65 | 20 75 73 65 66 75 6c 20 |be quite| useful |
|000058c0| 66 6f 72 20 6f 74 68 65 | 72 20 64 65 62 75 67 67 |for othe|r debugg|
|000058d0| 65 72 2d 72 65 6c 61 74 | 65 64 20 74 68 69 6e 67 |er-relat|ed thing|
|000058e0| 73 2e 20 20 46 6f 72 0a | 65 78 61 6d 70 6c 65 2c |s. For.|example,|
|000058f0| 20 77 68 65 6e 20 64 65 | 62 75 67 67 61 62 69 6c | when de|buggabil|
|00005900| 69 74 79 20 69 73 20 69 | 6d 70 6f 72 74 61 6e 74 |ity is i|mportant|
|00005910| 2c 20 77 65 20 63 6f 75 | 6c 64 20 6d 61 6b 65 20 |, we cou|ld make |
|00005920| 74 68 65 20 54 4e 73 20 | 68 6f 6c 64 69 6e 67 0a |the TNs |holding.|
|00005930| 61 72 67 75 6d 65 6e 74 | 73 20 6c 69 76 65 20 66 |argument|s live f|
|00005940| 6f 72 20 74 68 65 20 65 | 6e 74 69 72 65 20 65 6e |or the e|ntire en|
|00005950| 76 69 72 6f 6e 6d 65 6e | 74 2e 20 20 54 68 69 73 |vironmen|t. This|
|00005960| 20 77 6f 75 6c 64 20 67 | 75 61 72 61 6e 74 65 65 | would g|uarantee|
|00005970| 20 74 68 61 74 20 61 0a | 62 61 63 6b 74 72 61 63 | that a.|backtrac|
|00005980| 65 20 77 6f 75 6c 64 20 | 61 6c 77 61 79 73 20 67 |e would |always g|
|00005990| 65 74 20 74 68 65 20 72 | 69 67 68 74 20 76 61 6c |et the r|ight val|
|000059a0| 75 65 20 28 6d 6f 64 75 | 6c 6f 20 73 65 74 71 73 |ue (modu|lo setqs|
|000059b0| 29 2e 20 20 0a 0a 4e 6f | 74 65 20 74 68 61 74 20 |). ..No|te that |
|000059c0| 69 6e 20 74 68 69 73 20 | 63 6f 6e 74 65 78 74 2c |in this |context,|
|000059d0| 20 22 65 6e 76 69 72 6f | 6e 6d 65 6e 74 22 20 6d | "enviro|nment" m|
|000059e0| 65 61 6e 73 20 74 68 65 | 20 45 6e 76 69 72 6f 6e |eans the| Environ|
|000059f0| 6d 65 6e 74 20 73 74 72 | 75 63 74 75 72 65 20 28 |ment str|ucture (|
|00005a00| 6f 6e 65 0a 70 65 72 20 | 6e 6f 6e 2d 6c 65 74 20 |one.per |non-let |
|00005a10| 66 75 6e 63 74 69 6f 6e | 29 2e 20 20 41 74 20 6c |function|). At l|
|00005a20| 65 61 73 74 20 61 63 63 | 6f 72 64 69 6e 67 20 74 |east acc|ording t|
|00005a30| 6f 20 63 75 72 72 65 6e | 74 20 70 6c 61 6e 73 2c |o curren|t plans,|
|00005a40| 20 65 76 65 6e 20 77 68 | 65 6e 20 77 65 20 64 6f | even wh|en we do|
|00005a50| 0a 69 6e 74 65 72 2d 72 | 6f 75 74 69 6e 65 20 72 |.inter-r|outine r|
|00005a60| 65 67 69 73 74 65 72 20 | 61 6c 6c 6f 63 61 74 69 |egister |allocati|
|00005a70| 6f 6e 2c 20 74 68 65 20 | 64 69 66 66 65 72 65 6e |on, the |differen|
|00005a80| 74 20 66 75 6e 63 74 69 | 6f 6e 73 20 77 69 6c 6c |t functi|ons will|
|00005a90| 20 68 61 76 65 20 64 69 | 66 66 65 72 65 6e 74 0a | have di|fferent.|
|00005aa0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 73 3a 20 77 65 |environm|ents: we|
|00005ab0| 20 6a 75 73 74 20 22 65 | 71 75 61 74 65 22 20 74 | just "e|quate" t|
|00005ac0| 68 65 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 73 2e |he envir|onments.|
|00005ad0| 20 20 53 6f 20 74 68 65 | 20 6e 75 6d 62 65 72 20 | So the| number |
|00005ae0| 6f 66 20 6c 69 76 65 0a | 70 65 72 2d 65 6e 76 69 |of live.|per-envi|
|00005af0| 72 6f 6e 6d 65 6e 74 20 | 54 4e 73 20 69 73 20 62 |ronment |TNs is b|
|00005b00| 6f 75 6e 64 65 64 20 62 | 79 20 74 68 65 20 73 69 |ounded b|y the si|
|00005b10| 7a 65 20 6f 66 20 61 20 | 22 66 75 6e 63 74 69 6f |ze of a |"functio|
|00005b20| 6e 22 2c 20 61 6e 64 20 | 64 6f 65 73 6e 27 74 20 |n", and |doesn't |
|00005b30| 62 6c 6f 77 20 75 70 0a | 69 6e 20 62 6c 6f 63 6b |blow up.|in block|
|00005b40| 20 63 6f 6d 70 69 6c 61 | 74 69 6f 6e 2e 0a 0a 54 | compila|tion...T|
|00005b50| 68 65 20 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |he imple|mentatio|
|00005b60| 6e 20 69 73 20 73 69 6d | 70 6c 65 3a 20 70 65 72 |n is sim|ple: per|
|00005b70| 2d 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 54 4e 73 |-environ|ment TNs|
|00005b80| 20 61 72 65 20 66 6c 61 | 67 67 65 64 20 62 79 20 | are fla|gged by |
|00005b90| 74 68 65 0a 3a 45 6e 76 | 69 72 6f 6e 6d 65 6e 74 |the.:Env|ironment|
|00005ba0| 20 6b 69 6e 64 2e 20 20 | 3a 45 6e 76 69 72 6f 6e | kind. |:Environ|
|00005bb0| 6d 65 6e 74 20 54 4e 73 | 20 61 72 65 20 74 72 65 |ment TNs| are tre|
|00005bc0| 61 74 65 64 20 74 68 65 | 20 73 61 6d 65 20 61 73 |ated the| same as|
|00005bd0| 20 3a 4e 6f 72 6d 61 6c | 20 54 4e 73 20 62 79 0a | :Normal| TNs by.|
|00005be0| 65 76 65 72 79 6f 6e 65 | 20 65 78 63 65 70 74 20 |everyone| except |
|00005bf0| 66 6f 72 20 6c 69 66 65 | 74 69 6d 65 2f 63 6f 6e |for life|time/con|
|00005c00| 66 6c 69 63 74 20 61 6e | 61 6c 79 73 69 73 2e 20 |flict an|alysis. |
|00005c10| 20 41 6e 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 27 | An envi|ronment'|
|00005c20| 73 20 54 4e 73 20 61 72 | 65 20 61 6c 73 6f 0a 73 |s TNs ar|e also.s|
|00005c30| 74 61 73 68 65 64 20 69 | 6e 20 61 20 6c 69 73 74 |tashed i|n a list|
|00005c40| 20 69 6e 20 74 68 65 20 | 49 52 32 2d 45 6e 76 69 | in the |IR2-Envi|
|00005c50| 72 6f 6e 6d 65 6e 74 20 | 73 74 72 75 63 74 75 72 |ronment |structur|
|00005c60| 65 2e 20 20 44 75 72 69 | 6e 67 20 64 75 72 69 6e |e. Duri|ng durin|
|00005c70| 67 20 74 68 65 20 63 6f | 6e 66 6c 69 63 74 0a 61 |g the co|nflict.a|
|00005c80| 6e 61 6c 79 73 69 73 20 | 70 6f 73 74 2d 70 61 73 |nalysis |post-pas|
|00005c90| 73 2c 20 77 65 20 6c 6f | 6f 6b 20 61 74 20 65 61 |s, we lo|ok at ea|
|00005ca0| 63 68 20 62 6c 6f 63 6b | 27 73 20 65 6e 76 69 72 |ch block|'s envir|
|00005cb0| 6f 6e 6d 65 6e 74 2c 20 | 61 6e 64 20 6d 61 6b 65 |onment, |and make|
|00005cc0| 20 61 6c 6c 20 74 68 65 | 0a 65 6e 76 69 72 6f 6e | all the|.environ|
|00005cd0| 6d 65 6e 74 27 73 20 54 | 4e 73 20 61 6c 77 61 79 |ment's T|Ns alway|
|00005ce0| 73 2d 6c 69 76 65 20 69 | 6e 20 74 68 61 74 20 62 |s-live i|n that b|
|00005cf0| 6c 6f 63 6b 2e 0a 0a 57 | 65 20 63 61 6e 20 69 6d |lock...W|e can im|
|00005d00| 70 6c 65 6d 65 6e 74 20 | 74 68 65 20 22 66 69 78 |plement |the "fix|
|00005d10| 65 64 20 73 61 76 65 20 | 6c 6f 63 61 74 69 6f 6e |ed save |location|
|00005d20| 22 20 63 6f 6e 63 65 70 | 74 20 6e 65 65 64 65 64 |" concep|t needed|
|00005d30| 20 66 6f 72 20 6c 61 7a | 79 20 66 72 61 6d 65 0a | for laz|y frame.|
|00005d40| 63 72 65 61 74 69 6f 6e | 20 62 79 20 61 6c 6c 6f |creation| by allo|
|00005d50| 63 61 74 69 6e 67 20 74 | 68 65 20 73 61 76 65 20 |cating t|he save |
|00005d60| 54 4e 73 20 61 73 20 77 | 69 72 65 64 20 54 4e 73 |TNs as w|ired TNs|
|00005d70| 20 61 74 20 49 52 32 20 | 63 6f 6e 76 65 72 73 69 | at IR2 |conversi|
|00005d80| 6f 6e 20 74 69 6d 65 2e | 20 20 57 65 0a 77 6f 75 |on time.| We.wou|
|00005d90| 6c 64 20 75 73 65 20 74 | 68 65 20 6e 65 77 20 22 |ld use t|he new "|
|00005da0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 6c 69 66 65 |environm|ent life|
|00005db0| 74 69 6d 65 22 20 63 6f | 6e 63 65 70 74 20 74 6f |time" co|ncept to|
|00005dc0| 20 73 70 65 63 69 66 79 | 20 74 68 65 20 6c 69 66 | specify| the lif|
|00005dd0| 65 74 69 6d 65 73 20 6f | 66 0a 74 68 65 20 73 61 |etimes o|f.the sa|
|00005de0| 76 65 20 6c 6f 63 61 74 | 69 6f 6e 73 2e 20 20 54 |ve locat|ions. T|
|00005df0| 68 65 72 65 20 69 73 6e | 27 74 20 61 6e 79 20 72 |here isn|'t any r|
|00005e00| 75 6e 2d 74 69 6d 65 20 | 6f 76 65 72 68 65 61 64 |un-time |overhead|
|00005e10| 20 69 66 20 77 65 20 6e | 65 76 65 72 20 67 65 74 | if we n|ever get|
|00005e20| 20 61 72 6f 75 6e 64 0a | 74 6f 20 75 73 69 6e 67 | around.|to using|
|00005e30| 20 74 68 65 20 73 61 76 | 65 20 54 4e 73 2e 20 20 | the sav|e TNs. |
|00005e40| 5b 50 61 63 6b 20 77 6f | 75 6c 64 20 61 6c 73 6f |[Pack wo|uld also|
|00005e50| 20 68 61 76 65 20 74 6f | 20 6e 6f 74 69 63 65 20 | have to| notice |
|00005e60| 54 4e 73 20 77 69 74 68 | 20 70 72 65 2d 61 6c 6c |TNs with| pre-all|
|00005e70| 6f 63 61 74 65 64 0a 73 | 61 76 65 20 54 4e 73 2c |ocated.s|ave TNs,|
|00005e80| 20 70 61 63 6b 69 6e 67 | 20 74 68 65 20 6f 72 69 | packing| the ori|
|00005e90| 67 69 6e 61 6c 20 54 4e | 20 69 6e 20 74 68 65 20 |ginal TN| in the |
|00005ea0| 73 74 61 63 6b 20 6c 6f | 63 61 74 69 6f 6e 20 69 |stack lo|cation i|
|00005eb0| 66 20 69 74 73 20 46 53 | 43 20 69 73 20 74 68 65 |f its FS|C is the|
|00005ec0| 0a 73 74 61 63 6b 2e 5d | 0a 0a 0a 57 65 20 77 61 |.stack.]|...We wa|
|00005ed0| 6e 74 20 61 20 73 74 61 | 6e 64 61 72 64 20 28 72 |nt a sta|ndard (r|
|00005ee0| 65 63 6f 67 6e 69 7a 61 | 62 6c 65 29 20 66 6f 72 |ecogniza|ble) for|
|00005ef0| 6d 61 74 20 66 6f 72 20 | 61 6e 20 22 65 73 63 61 |mat for |an "esca|
|00005f00| 70 65 22 20 66 72 61 6d | 65 2e 20 20 57 65 20 6d |pe" fram|e. We m|
|00005f10| 75 73 74 20 6d 61 6b 65 | 0a 61 6e 20 65 73 63 61 |ust make|.an esca|
|00005f20| 70 65 20 66 72 61 6d 65 | 20 77 68 65 6e 65 76 65 |pe frame| wheneve|
|00005f30| 72 20 77 65 20 73 74 61 | 72 74 20 72 75 6e 6e 69 |r we sta|rt runni|
|00005f40| 6e 67 20 61 6e 6f 74 68 | 65 72 20 66 75 6e 63 74 |ng anoth|er funct|
|00005f50| 69 6f 6e 20 77 69 74 68 | 6f 75 74 20 74 68 65 20 |ion with|out the |
|00005f60| 63 75 72 72 65 6e 74 0a | 66 75 6e 63 74 69 6f 6e |current.|function|
|00005f70| 20 67 65 74 74 69 6e 67 | 20 61 20 63 68 61 6e 63 | getting| a chanc|
|00005f80| 65 20 74 6f 20 73 61 76 | 65 20 69 74 73 20 72 65 |e to sav|e its re|
|00005f90| 67 69 73 74 65 72 73 2e | 20 20 54 68 69 73 20 6d |gisters.| This m|
|00005fa0| 61 79 20 62 65 20 64 75 | 65 20 65 69 74 68 65 72 |ay be du|e either|
|00005fb0| 20 74 6f 20 61 0a 74 72 | 75 6c 79 20 61 73 79 6e | to a.tr|uly asyn|
|00005fc0| 63 68 72 6f 6e 6f 75 73 | 20 65 76 65 6e 74 20 73 |chronous| event s|
|00005fd0| 75 63 68 20 61 73 20 61 | 20 73 6f 66 74 77 61 72 |uch as a| softwar|
|00005fe0| 65 20 69 6e 74 65 72 72 | 75 70 74 2c 20 6f 72 20 |e interr|upt, or |
|00005ff0| 64 75 65 20 74 6f 20 61 | 6e 20 22 65 73 63 61 70 |due to a|n "escap|
|00006000| 65 22 0a 66 72 6f 6d 20 | 61 20 6d 69 73 63 6f 70 |e".from |a miscop|
|00006010| 2e 20 20 41 6e 20 65 73 | 63 61 70 65 20 66 72 61 |. An es|cape fra|
|00006020| 6d 65 20 6d 61 72 6b 73 | 20 61 20 62 72 69 65 66 |me marks| a brief|
|00006030| 20 63 6f 6e 76 65 72 73 | 69 6f 6e 20 74 6f 20 61 | convers|ion to a|
|00006040| 20 63 61 6c 6c 65 65 2d | 73 61 76 65 73 0a 63 6f | callee-|saves.co|
|00006050| 6e 76 65 6e 74 69 6f 6e | 2e 0a 0a 57 68 65 6e 65 |nvention|...Whene|
|00006060| 76 65 72 20 61 20 6d 69 | 73 63 6f 70 20 73 61 76 |ver a mi|scop sav|
|00006070| 65 73 20 72 65 67 69 73 | 74 65 72 73 2c 20 69 74 |es regis|ters, it|
|00006080| 20 73 68 6f 75 6c 64 20 | 6d 61 6b 65 20 61 6e 20 | should |make an |
|00006090| 65 73 63 61 70 65 20 66 | 72 61 6d 65 2e 20 20 54 |escape f|rame. T|
|000060a0| 68 69 73 0a 65 6e 73 75 | 72 65 73 20 74 68 61 74 |his.ensu|res that|
|000060b0| 20 74 68 65 20 22 63 75 | 72 72 65 6e 74 22 20 72 | the "cu|rrent" r|
|000060c0| 65 67 69 73 74 65 72 20 | 63 6f 6e 74 65 6e 74 73 |egister |contents|
|000060d0| 20 63 61 6e 20 61 6c 77 | 61 79 73 20 62 65 20 6c | can alw|ays be l|
|000060e0| 6f 63 61 74 65 64 20 62 | 79 20 74 68 65 0a 64 65 |ocated b|y the.de|
|000060f0| 62 75 67 67 65 72 2e 20 | 20 49 6e 20 74 68 69 73 |bugger. | In this|
|00006100| 20 63 61 73 65 2c 20 69 | 74 20 6d 61 79 20 62 65 | case, i|t may be|
|00006110| 20 64 65 73 69 72 61 62 | 6c 65 20 74 6f 20 62 65 | desirab|le to be|
|00006120| 20 61 62 6c 65 20 74 6f | 20 69 6e 64 69 63 61 74 | able to| indicat|
|00006130| 65 20 74 68 61 74 20 6f | 6e 6c 79 0a 70 61 72 74 |e that o|nly.part|
|00006140| 69 61 6c 20 73 61 76 69 | 6e 67 20 68 61 73 20 62 |ial savi|ng has b|
|00006150| 65 65 6e 20 64 6f 6e 65 | 2e 20 20 46 6f 72 20 65 |een done|. For e|
|00006160| 78 61 6d 70 6c 65 2c 20 | 77 65 20 64 6f 6e 27 74 |xample, |we don't|
|00006170| 20 77 61 6e 74 20 74 6f | 20 68 61 76 65 20 74 6f | want to| have to|
|00006180| 20 73 61 76 65 20 61 6c | 6c 0a 74 68 65 20 46 50 | save al|l.the FP|
|00006190| 20 72 65 67 69 73 74 65 | 72 73 20 6a 75 73 74 20 | registe|rs just |
|000061a0| 73 6f 20 74 68 61 74 20 | 77 65 20 63 61 6e 20 75 |so that |we can u|
|000061b0| 73 65 20 61 20 63 6f 75 | 70 6c 65 20 65 78 74 72 |se a cou|ple extr|
|000061c0| 61 20 67 65 6e 65 72 61 | 6c 20 72 65 67 69 73 74 |a genera|l regist|
|000061d0| 65 72 73 2e 0a 0a 57 68 | 65 6e 20 77 68 65 6e 20 |ers...Wh|en when |
|000061e0| 74 68 65 20 64 65 62 75 | 67 67 65 72 20 73 65 65 |the debu|gger see|
|000061f0| 20 61 6e 20 65 73 63 61 | 70 65 20 66 72 61 6d 65 | an esca|pe frame|
|00006200| 2c 20 69 74 20 6b 6e 6f | 77 73 20 74 68 61 74 20 |, it kno|ws that |
|00006210| 72 65 67 69 73 74 65 72 | 20 76 61 6c 75 65 73 20 |register| values |
|00006220| 61 72 65 0a 6c 6f 63 61 | 74 65 64 20 69 6e 20 74 |are.loca|ted in t|
|00006230| 68 65 20 65 73 63 61 70 | 65 20 66 72 61 6d 65 27 |he escap|e frame'|
|00006240| 73 20 22 72 65 67 69 73 | 74 65 72 20 73 61 76 65 |s "regis|ter save|
|00006250| 22 20 61 72 65 61 2c 20 | 72 61 74 68 65 72 20 74 |" area, |rather t|
|00006260| 68 61 6e 20 69 6e 20 74 | 68 65 20 6e 6f 72 6d 61 |han in t|he norma|
|00006270| 6c 0a 73 61 76 65 20 6c | 6f 63 61 74 69 6f 6e 73 |l.save l|ocations|
|00006280| 2e 0a 0a 49 74 20 77 6f | 75 6c 64 20 62 65 20 6e |...It wo|uld be n|
|00006290| 69 63 65 20 69 66 20 74 | 68 65 72 65 20 77 61 73 |ice if t|here was|
|000062a0| 20 61 20 62 65 74 74 65 | 72 20 73 6f 6c 75 74 69 | a bette|r soluti|
|000062b0| 6f 6e 20 74 6f 20 74 68 | 69 73 20 69 6e 74 65 72 |on to th|is inter|
|000062c0| 6e 61 6c 20 65 72 72 6f | 72 20 63 6f 6e 63 65 70 |nal erro|r concep|
|000062d0| 74 2e 0a 4f 6e 65 20 70 | 72 6f 62 6c 65 6d 20 69 |t..One p|roblem i|
|000062e0| 73 20 74 68 61 74 20 69 | 74 20 73 65 65 6d 73 20 |s that i|t seems |
|000062f0| 74 68 65 72 65 20 69 73 | 20 61 20 73 75 62 73 74 |there is| a subst|
|00006300| 61 6e 74 69 61 6c 20 73 | 70 61 63 65 20 70 65 6e |antial s|pace pen|
|00006310| 61 6c 74 79 20 66 6f 72 | 20 65 6d 69 74 74 69 6e |alty for| emittin|
|00006320| 67 0a 61 6c 6c 20 74 68 | 61 74 20 65 72 72 6f 72 |g.all th|at error|
|00006330| 20 63 6f 64 65 2c 20 65 | 73 70 65 63 69 61 6c 6c | code, e|speciall|
|00006340| 79 20 6e 6f 77 20 74 68 | 61 74 20 77 65 20 64 6f |y now th|at we do|
|00006350| 6e 27 74 20 73 68 61 72 | 65 20 65 72 72 6f 72 20 |n't shar|e error |
|00006360| 63 6f 64 65 20 62 65 74 | 77 65 65 6e 0a 65 72 72 |code bet|ween.err|
|00006370| 6f 72 73 20 62 65 63 61 | 75 73 65 20 77 65 20 77 |ors beca|use we w|
|00006380| 61 6e 74 20 74 6f 20 70 | 72 65 73 65 72 76 65 20 |ant to p|reserve |
|00006390| 74 68 65 20 73 6f 75 72 | 63 65 20 63 6f 6e 74 65 |the sour|ce conte|
|000063a0| 78 74 20 69 6e 20 74 68 | 65 20 50 43 2e 20 20 42 |xt in th|e PC. B|
|000063b0| 75 74 20 74 68 69 73 0a | 70 72 6f 62 61 62 6c 79 |ut this.|probably|
|000063c0| 20 69 73 6e 27 74 20 72 | 65 61 6c 6c 79 20 61 6c | isn't r|eally al|
|000063d0| 6c 20 74 68 61 74 20 62 | 61 64 20 77 68 65 6e 20 |l that b|ad when |
|000063e0| 63 6f 6e 73 69 64 65 72 | 65 64 20 61 73 20 61 20 |consider|ed as a |
|000063f0| 66 72 61 63 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |fraction| of the |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.