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, 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| 5c 70 61 72 74 7b 43 6f | 6d 70 69 6c 65 72 20 52 |\part{Co|mpiler R|
|00000010| 65 74 61 72 67 65 74 69 | 6e 67 7d 0a 0a 5b 5c 23 |etargeti|ng}..[\#|
|00000020| 5c 23 5c 23 0a 0a 49 6e | 20 67 65 6e 65 72 61 6c |\#\#..In| general|
|00000030| 2c 20 69 74 20 69 73 20 | 61 20 64 61 6e 67 65 72 |, it is |a danger|
|00000040| 20 73 69 67 6e 20 69 66 | 20 61 20 67 65 6e 65 72 | sign if| a gener|
|00000050| 61 74 6f 72 20 72 65 66 | 65 72 65 6e 63 65 73 20 |ator ref|erences |
|00000060| 61 20 54 4e 20 74 68 61 | 74 20 69 73 6e 27 74 20 |a TN tha|t isn't |
|00000070| 61 6e 0a 6f 70 65 72 61 | 6e 64 20 6f 72 20 74 65 |an.opera|nd or te|
|00000080| 6d 70 6f 72 61 72 79 2c | 20 73 69 6e 63 65 20 6c |mporary,| since l|
|00000090| 69 66 65 74 69 6d 65 20 | 61 6e 61 6c 79 73 69 73 |ifetime |analysis|
|000000a0| 20 68 61 73 6e 27 74 20 | 62 65 65 6e 20 64 6f 6e | hasn't |been don|
|000000b0| 65 20 66 6f 72 20 74 68 | 61 74 20 75 73 65 2e 0a |e for th|at use..|
|000000c0| 57 65 20 61 72 65 20 64 | 6f 69 6e 67 20 77 65 69 |We are d|oing wei|
|000000d0| 72 64 20 73 74 75 66 66 | 20 66 6f 72 20 74 68 65 |rd stuff| for the|
|000000e0| 20 6f 6c 64 2d 63 6f 6e | 74 20 61 6e 64 20 72 65 | old-con|t and re|
|000000f0| 74 75 72 6e 2d 70 63 20 | 70 61 73 73 69 6e 67 20 |turn-pc |passing |
|00000100| 6c 6f 63 61 74 69 6f 6e | 73 2c 0a 68 6f 70 69 6e |location|s,.hopin|
|00000110| 67 20 74 68 61 74 20 74 | 68 65 20 63 6f 6e 66 6c |g that t|he confl|
|00000120| 69 63 74 73 20 61 74 20 | 74 68 65 20 63 61 6c 6c |icts at |the call|
|00000130| 65 64 20 66 75 6e 63 74 | 69 6f 6e 20 68 61 76 65 |ed funct|ion have|
|00000140| 20 74 68 65 20 64 65 73 | 69 72 65 64 20 65 66 66 | the des|ired eff|
|00000150| 65 63 74 2e 0a 4f 74 68 | 65 72 20 73 74 75 66 66 |ect..Oth|er stuff|
|00000160| 3f 20 20 57 68 65 6e 20 | 61 20 66 75 6e 63 74 69 |? When |a functi|
|00000170| 6f 6e 20 72 65 74 75 72 | 6e 73 20 75 6e 6b 6e 6f |on retur|ns unkno|
|00000180| 77 6e 20 76 61 6c 75 65 | 73 2c 20 77 65 20 64 6f |wn value|s, we do|
|00000190| 6e 27 74 20 72 65 66 65 | 72 65 6e 63 65 20 74 68 |n't refe|rence th|
|000001a0| 65 0a 76 61 6c 75 65 73 | 20 6c 6f 63 61 74 69 6f |e.values| locatio|
|000001b0| 6e 73 20 77 68 65 6e 20 | 61 20 73 69 6e 67 6c 65 |ns when |a single|
|000001c0| 2d 76 61 6c 75 65 20 72 | 65 74 75 72 6e 20 69 73 |-value r|eturn is|
|000001d0| 20 64 6f 6e 65 2e 20 20 | 42 75 74 20 6e 6f 74 68 | done. |But noth|
|000001e0| 69 6e 67 20 69 73 20 6c | 69 76 65 20 61 74 20 61 |ing is l|ive at a|
|000001f0| 0a 72 65 74 75 72 6e 20 | 70 6f 69 6e 74 20 61 6e |.return |point an|
|00000200| 79 77 61 79 2e 0a 0a 0a | 0a 48 61 76 65 20 61 20 |yway....|.Have a |
|00000210| 77 61 79 20 66 6f 72 20 | 74 65 6d 70 6c 61 74 65 |way for |template|
|00000220| 20 63 6f 6e 76 65 72 73 | 69 6f 6e 20 74 6f 20 73 | convers|ion to s|
|00000230| 70 65 63 69 61 6c 2d 63 | 61 73 65 20 63 6f 6e 73 |pecial-c|ase cons|
|00000240| 74 61 6e 74 20 61 72 67 | 75 6d 65 6e 74 73 3f 20 |tant arg|uments? |
|00000250| 20 0a 48 6f 77 20 61 62 | 6f 75 74 3a 0a 20 20 20 | .How ab|out:. |
|00000260| 20 49 66 20 61 6e 20 61 | 72 67 20 72 65 73 74 72 | If an a|rg restr|
|00000270| 69 63 74 69 6f 6e 20 69 | 73 20 28 3a 73 61 74 69 |iction i|s (:sati|
|00000280| 73 66 69 65 73 20 5b 3c | 70 72 65 64 69 63 61 74 |sfies [<|predicat|
|00000290| 65 20 66 75 6e 63 74 69 | 6f 6e 3e 5d 29 2c 20 61 |e functi|on>]), a|
|000002a0| 6e 64 20 74 68 65 0a 20 | 20 20 20 63 6f 72 72 65 |nd the. | corre|
|000002b0| 73 70 6f 6e 64 69 6e 67 | 20 61 72 67 75 6d 65 6e |sponding| argumen|
|000002c0| 74 20 69 73 20 63 6f 6e | 73 74 61 6e 74 2c 20 77 |t is con|stant, w|
|000002d0| 69 74 68 20 74 68 65 20 | 63 6f 6e 73 74 61 6e 74 |ith the |constant|
|000002e0| 20 76 61 6c 75 65 20 73 | 61 74 69 73 66 79 69 6e | value s|atisfyin|
|000002f0| 67 20 74 68 65 0a 20 20 | 20 20 70 72 65 64 69 63 |g the. | predic|
|00000300| 61 74 65 2c 20 74 68 65 | 6e 20 28 69 66 20 61 6e |ate, the|n (if an|
|00000310| 79 20 6f 74 68 65 72 20 | 72 65 73 74 72 69 63 74 |y other |restrict|
|00000320| 69 6f 6e 73 20 61 72 65 | 20 73 61 74 69 73 66 69 |ions are| satisfi|
|00000330| 65 64 29 2c 20 74 68 65 | 20 74 65 6d 70 6c 61 74 |ed), the| templat|
|00000340| 65 0a 20 20 20 20 77 69 | 6c 6c 20 62 65 20 65 6d |e. wi|ll be em|
|00000350| 69 74 74 65 64 20 77 69 | 74 68 20 74 68 65 20 6c |itted wi|th the l|
|00000360| 69 74 65 72 61 6c 20 76 | 61 6c 75 65 20 70 61 73 |iteral v|alue pas|
|00000370| 73 65 64 20 61 73 20 61 | 6e 20 69 6e 66 6f 20 61 |sed as a|n info a|
|00000380| 72 67 75 6d 65 6e 74 2e | 20 20 49 66 20 74 68 65 |rgument.| If the|
|00000390| 0a 20 20 20 20 70 72 65 | 64 69 63 61 74 65 20 69 |. pre|dicate i|
|000003a0| 73 20 6f 6d 69 74 74 65 | 64 2c 20 74 68 65 6e 20 |s omitte|d, then |
|000003b0| 61 6e 79 20 63 6f 6e 73 | 74 61 6e 74 20 77 69 6c |any cons|tant wil|
|000003c0| 6c 20 64 6f 2e 0a 0a 20 | 20 20 20 57 65 20 63 6f |l do... | We co|
|000003d0| 75 6c 64 20 73 75 67 61 | 72 20 74 68 69 73 20 75 |uld suga|r this u|
|000003e0| 70 20 61 20 62 69 74 20 | 62 79 20 61 6c 6c 6f 77 |p a bit |by allow|
|000003f0| 69 6e 67 20 28 3a 6d 65 | 6d 62 65 72 20 3c 6f 62 |ing (:me|mber <ob|
|00000400| 6a 65 63 74 3e 2a 29 20 | 66 6f 72 0a 20 20 20 20 |ject>*) |for. |
|00000410| 28 3a 73 61 74 69 73 66 | 69 65 73 20 28 6c 61 6d |(:satisf|ies (lam|
|00000420| 62 64 61 20 28 78 29 20 | 28 6d 65 6d 62 65 72 20 |bda (x) |(member |
|00000430| 78 20 27 28 3c 6f 62 6a | 65 63 74 3e 2a 29 29 29 |x '(<obj|ect>*)))|
|00000440| 29 0a 0a 57 65 20 63 6f | 75 6c 64 20 61 6c 6c 6f |)..We co|uld allo|
|00000450| 77 20 74 68 69 73 20 74 | 6f 20 62 65 20 74 72 61 |w this t|o be tra|
|00000460| 6e 73 6c 61 74 65 64 20 | 69 6e 74 6f 20 61 20 4c |nslated |into a L|
|00000470| 69 73 70 20 74 79 70 65 | 20 62 79 20 61 64 64 69 |isp type| by addi|
|00000480| 6e 67 20 61 20 6e 65 77 | 20 43 6f 6e 73 74 61 6e |ng a new| Constan|
|00000490| 74 0a 74 79 70 65 20 73 | 70 65 63 69 66 69 65 72 |t.type s|pecifier|
|000004a0| 2e 20 20 54 68 69 73 20 | 63 6f 75 6c 64 20 6f 6e |. This |could on|
|000004b0| 6c 79 20 61 70 70 65 61 | 72 20 61 73 20 61 6e 20 |ly appea|r as an |
|000004c0| 61 72 67 75 6d 65 6e 74 | 20 74 6f 20 61 20 66 75 |argument| to a fu|
|000004d0| 6e 63 74 69 6f 6e 20 74 | 79 70 65 2e 0a 54 6f 20 |nction t|ype..To |
|000004e0| 73 61 74 69 73 66 79 20 | 28 43 6f 6e 73 74 61 6e |satisfy |(Constan|
|000004f0| 74 20 3c 74 79 70 65 3e | 29 2c 20 74 68 65 20 61 |t <type>|), the a|
|00000500| 72 67 75 6d 65 6e 74 20 | 6d 75 73 74 20 62 65 20 |rgument |must be |
|00000510| 61 20 63 6f 6d 70 69 6c | 65 2d 74 69 6d 65 20 63 |a compil|e-time c|
|00000520| 6f 6e 73 74 61 6e 74 20 | 6f 66 0a 74 68 65 20 73 |onstant |of.the s|
|00000530| 70 65 63 69 66 69 65 64 | 20 74 79 70 65 2e 20 20 |pecified| type. |
|00000540| 4a 75 73 74 20 43 6f 6e | 73 74 61 6e 74 20 6d 65 |Just Con|stant me|
|00000550| 61 6e 73 20 61 6e 79 20 | 63 6f 6e 73 74 61 6e 74 |ans any |constant|
|00000560| 20 28 69 2e 65 2e 20 28 | 43 6f 6e 73 74 61 6e 74 | (i.e. (|Constant|
|00000570| 20 2a 29 29 2e 0a 54 68 | 69 73 20 77 6f 75 6c 64 | *))..Th|is would|
|00000580| 20 62 65 20 75 73 65 66 | 75 6c 20 66 6f 72 20 74 | be usef|ul for t|
|00000590| 68 65 20 74 79 70 65 20 | 63 6f 6e 73 74 72 61 69 |he type |constrai|
|000005a0| 6e 74 73 20 6f 6e 20 49 | 43 52 20 74 72 61 6e 73 |nts on I|CR trans|
|000005b0| 66 6f 72 6d 73 2e 0a 0a | 0a 43 6f 6e 73 74 61 6e |forms...|.Constan|
|000005c0| 74 20 54 4e 73 3a 20 77 | 65 20 63 6f 75 6e 74 20 |t TNs: w|e count |
|000005d0| 6f 6e 20 62 65 69 6e 67 | 20 61 62 6c 65 20 74 6f |on being| able to|
|000005e0| 20 69 6e 64 69 72 65 63 | 74 20 74 6f 20 74 68 65 | indirec|t to the|
|000005f0| 20 6c 65 61 66 2c 20 61 | 6e 64 20 64 6f 6e 27 74 | leaf, a|nd don't|
|00000600| 20 74 72 79 20 74 6f 0a | 77 65 64 67 65 20 74 68 | try to.|wedge th|
|00000610| 65 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 69 6e |e inform|ation in|
|00000620| 74 6f 20 74 68 65 20 6f | 66 66 73 65 74 2e 20 20 |to the o|ffset. |
|00000630| 57 65 20 73 65 74 20 74 | 68 65 20 46 53 43 20 74 |We set t|he FSC t|
|00000640| 6f 20 61 6e 20 61 70 70 | 72 6f 70 72 69 61 74 65 |o an app|ropriate|
|00000650| 0a 69 6d 6d 65 64 69 61 | 74 65 20 53 43 2e 0a 0a |.immedia|te SC...|
|00000660| 20 20 20 20 41 6c 6c 6f | 77 20 22 6d 6f 72 65 20 | Allo|w "more |
|00000670| 6f 70 65 72 61 6e 64 73 | 22 20 74 6f 20 56 4f 50 |operands|" to VOP|
|00000680| 73 20 69 6e 20 64 65 66 | 69 6e 65 2d 76 6f 70 2e |s in def|ine-vop.|
|00000690| 20 20 59 6f 75 20 63 61 | 6e 27 74 20 64 6f 20 6d | You ca|n't do m|
|000006a0| 75 63 68 20 77 69 74 68 | 20 74 68 65 0a 20 20 20 |uch with| the. |
|000006b0| 20 6d 6f 72 65 20 6f 70 | 65 72 61 6e 64 73 3a 20 | more op|erands: |
|000006c0| 64 65 66 69 6e 65 2d 76 | 6f 70 20 6a 75 73 74 20 |define-v|op just |
|000006d0| 66 69 6c 6c 73 20 69 6e | 20 74 68 65 20 63 6f 73 |fills in| the cos|
|000006e0| 74 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 61 63 |t inform|ation ac|
|000006f0| 63 6f 72 64 69 6e 67 20 | 74 6f 0a 20 20 20 20 74 |cording |to. t|
|00000700| 68 65 20 6c 6f 61 64 69 | 6e 67 20 63 6f 73 74 73 |he loadi|ng costs|
|00000710| 20 66 6f 72 20 61 20 53 | 43 20 79 6f 75 20 73 70 | for a S|C you sp|
|00000720| 65 63 69 66 79 2e 20 20 | 59 6f 75 20 63 61 6e 27 |ecify. |You can'|
|00000730| 74 20 72 65 73 74 72 69 | 63 74 20 6d 6f 72 65 20 |t restri|ct more |
|00000740| 6f 70 65 72 61 6e 64 73 | 2c 0a 20 20 20 20 61 6e |operands|,. an|
|00000750| 64 20 79 6f 75 20 63 61 | 6e 27 74 20 6d 61 6b 65 |d you ca|n't make|
|00000760| 20 6c 6f 63 61 6c 20 70 | 72 65 66 65 72 65 6e 63 | local p|referenc|
|00000770| 65 73 2e 20 20 49 6e 20 | 74 68 65 20 67 65 6e 65 |es. In |the gene|
|00000780| 72 61 74 6f 72 2c 20 74 | 68 65 20 6e 61 6d 65 64 |rator, t|he named|
|00000790| 20 76 61 72 69 61 62 6c | 65 0a 20 20 20 20 69 73 | variabl|e. is|
|000007a0| 20 62 6f 75 6e 64 20 74 | 6f 20 74 68 65 20 54 4e | bound t|o the TN|
|000007b0| 2d 72 65 66 20 66 6f 72 | 20 74 68 65 20 66 69 72 |-ref for| the fir|
|000007c0| 73 74 20 65 78 74 72 61 | 20 6f 70 65 72 61 6e 64 |st extra| operand|
|000007d0| 2e 20 20 54 68 69 73 20 | 73 68 6f 75 6c 64 20 62 |. This |should b|
|000007e0| 65 20 67 6f 6f 64 0a 20 | 20 20 20 65 6e 6f 75 67 |e good. | enoug|
|000007f0| 68 20 74 6f 20 68 61 6e | 64 6c 65 20 61 6c 6c 20 |h to han|dle all |
|00000800| 74 68 65 20 76 61 72 69 | 61 62 6c 65 20 61 72 67 |the vari|able arg|
|00000810| 20 56 4f 50 73 20 28 70 | 72 69 6d 61 72 69 6c 79 | VOPs (p|rimarily|
|00000820| 20 66 75 6e 63 74 69 6f | 6e 20 63 61 6c 6c 20 61 | functio|n call a|
|00000830| 6e 64 0a 20 20 20 20 72 | 65 74 75 72 6e 29 2e 20 |nd. r|eturn). |
|00000840| 20 55 73 75 61 6c 6c 79 | 20 6d 6f 72 65 20 6f 70 | Usually| more op|
|00000850| 65 72 61 6e 64 73 20 61 | 72 65 20 75 73 65 64 20 |erands a|re used |
|00000860| 6a 75 73 74 20 74 6f 20 | 67 65 74 20 54 4e 20 6c |just to |get TN l|
|00000870| 69 66 65 74 69 6d 65 73 | 20 74 6f 20 77 6f 72 6b |ifetimes| to work|
|00000880| 0a 20 20 20 20 6f 75 74 | 3b 20 74 68 65 20 67 65 |. out|; the ge|
|00000890| 6e 65 72 61 74 6f 72 20 | 61 63 74 75 61 6c 6c 79 |nerator |actually|
|000008a0| 20 69 67 6e 6f 72 65 73 | 20 74 68 65 6d 2e 0a 0a | ignores| them...|
|000008b0| 20 20 20 20 56 61 72 69 | 61 62 6c 65 2d 61 72 67 | Vari|able-arg|
|000008c0| 20 56 4f 50 73 20 63 61 | 6e 27 74 20 62 65 20 75 | VOPs ca|n't be u|
|000008d0| 73 65 64 20 77 69 74 68 | 20 74 68 65 20 56 4f 50 |sed with| the VOP|
|000008e0| 20 6d 61 63 72 6f 2e 20 | 20 59 6f 75 20 6d 75 73 | macro. | You mus|
|000008f0| 74 20 75 73 65 20 56 4f | 50 2a 2e 0a 20 20 20 20 |t use VO|P*.. |
|00000900| 56 4f 50 2a 20 64 6f 65 | 73 6e 27 74 20 64 6f 20 |VOP* doe|sn't do |
|00000910| 61 6e 79 74 68 69 6e 67 | 20 77 69 74 68 20 74 68 |anything| with th|
|00000920| 65 73 65 20 65 78 74 72 | 61 20 6f 70 65 72 61 6e |ese extr|a operan|
|00000930| 64 20 65 78 63 65 70 74 | 20 73 74 69 63 6b 20 74 |d except| stick t|
|00000940| 68 65 6d 20 6f 6e 20 74 | 68 65 0a 20 20 20 20 65 |hem on t|he. e|
|00000950| 6e 64 73 20 6f 66 20 74 | 68 65 20 6f 70 65 72 61 |nds of t|he opera|
|00000960| 6e 64 20 6c 69 73 74 73 | 20 70 61 73 73 65 64 20 |nd lists| passed |
|00000970| 69 6e 74 6f 20 74 68 65 | 20 74 65 6d 70 6c 61 74 |into the| templat|
|00000980| 65 2e 20 20 56 4f 50 2a | 20 69 73 20 6f 66 74 65 |e. VOP*| is ofte|
|00000990| 6e 20 75 73 65 66 75 6c | 0a 20 20 20 20 77 69 74 |n useful|. wit|
|000009a0| 68 69 6e 20 74 68 65 20 | 63 6f 6e 76 65 72 74 20 |hin the |convert |
|000009b0| 66 75 6e 63 74 69 6f 6e | 73 20 66 6f 72 20 6e 6f |function|s for no|
|000009c0| 6e 2d 56 4f 50 20 74 65 | 6d 70 6c 61 74 65 73 2c |n-VOP te|mplates,|
|000009d0| 20 73 69 6e 63 65 20 69 | 74 20 63 61 6e 20 65 6d | since i|t can em|
|000009e0| 69 74 20 61 20 56 4f 50 | 0a 20 20 20 20 75 73 69 |it a VOP|. usi|
|000009f0| 6e 67 20 61 6e 20 61 6c | 72 65 61 64 79 20 70 72 |ng an al|ready pr|
|00000a00| 65 70 61 72 65 64 20 54 | 4e 2d 52 65 66 20 6c 69 |epared T|N-Ref li|
|00000a10| 73 74 2e 0a 20 20 20 20 | 0a 0a 20 20 20 20 49 74 |st.. |.. It|
|00000a20| 20 69 73 20 70 72 65 74 | 74 79 20 62 61 73 69 63 | is pret|ty basic|
|00000a30| 20 74 6f 20 74 68 65 20 | 77 68 6f 6c 65 20 70 72 | to the |whole pr|
|00000a40| 69 6d 69 74 69 76 65 2d | 74 79 70 65 20 69 64 65 |imitive-|type ide|
|00000a50| 61 20 74 68 61 74 20 74 | 68 65 72 65 20 69 73 20 |a that t|here is |
|00000a60| 6f 6e 6c 79 20 6f 6e 65 | 0a 20 20 20 20 70 72 69 |only one|. pri|
|00000a70| 6d 69 74 69 76 65 2d 74 | 79 70 65 20 66 6f 72 20 |mitive-t|ype for |
|00000a80| 61 20 67 69 76 65 6e 20 | 6c 69 73 70 20 74 79 70 |a given |lisp typ|
|00000a90| 65 2e 20 20 54 68 69 73 | 20 69 73 20 72 65 61 6c |e. This| is real|
|00000aa0| 6c 79 20 74 68 65 20 73 | 61 6d 65 20 61 73 20 73 |ly the s|ame as s|
|00000ab0| 61 79 69 6e 67 0a 20 20 | 20 20 70 72 69 6d 69 74 |aying. | primit|
|00000ac0| 69 76 65 20 74 79 70 65 | 73 20 61 72 65 20 64 69 |ive type|s are di|
|00000ad0| 73 6a 6f 69 6e 74 2e 20 | 20 41 20 70 72 69 6d 69 |sjoint. | A primi|
|00000ae0| 74 69 76 65 20 74 79 70 | 65 20 73 65 72 76 65 73 |tive typ|e serves|
|00000af0| 20 74 77 6f 20 73 6f 6d | 65 77 68 61 74 0a 20 20 | two som|ewhat. |
|00000b00| 20 20 75 6e 72 65 6c 61 | 74 65 64 20 70 75 72 70 | unrela|ted purp|
|00000b10| 6f 73 65 73 3a 0a 20 20 | 20 20 20 2d 2d 20 49 74 |oses:. | -- It|
|00000b20| 20 69 73 20 61 6e 20 61 | 62 73 74 72 61 63 74 69 | is an a|bstracti|
|00000b30| 6f 6e 20 61 20 4c 69 73 | 70 20 74 79 70 65 20 75 |on a Lis|p type u|
|00000b40| 73 65 64 20 74 6f 20 73 | 65 6c 65 63 74 20 74 79 |sed to s|elect ty|
|00000b50| 70 65 20 73 70 65 63 69 | 66 69 63 0a 20 20 20 20 |pe speci|fic. |
|00000b60| 20 20 20 20 6f 70 65 72 | 61 74 69 6f 6e 73 2e 20 | oper|ations. |
|00000b70| 20 4f 72 69 67 69 6e 61 | 6c 6c 79 20 6b 69 6e 64 | Origina|lly kind|
|00000b80| 20 6f 66 20 61 6e 20 65 | 66 66 69 63 69 65 6e 63 | of an e|fficienc|
|00000b90| 79 20 68 61 63 6b 2c 20 | 62 75 74 20 69 74 20 6c |y hack, |but it l|
|00000ba0| 65 74 73 20 61 0a 20 20 | 20 20 20 20 20 20 74 65 |ets a. | te|
|00000bb0| 6d 70 6c 61 74 65 27 73 | 20 74 79 70 65 20 73 69 |mplate's| type si|
|00000bc0| 67 6e 61 74 75 72 65 20 | 62 65 20 75 73 65 64 20 |gnature |be used |
|00000bd0| 62 6f 74 68 20 66 6f 72 | 20 73 65 6c 65 63 74 69 |both for| selecti|
|00000be0| 6f 6e 20 61 6e 64 20 6f | 70 65 72 61 6e 64 0a 20 |on and o|perand. |
|00000bf0| 20 20 20 20 20 20 20 72 | 65 70 72 65 73 65 6e 74 | r|epresent|
|00000c00| 61 74 69 6f 6e 20 64 65 | 74 65 72 6d 69 6e 61 74 |ation de|terminat|
|00000c10| 69 6f 6e 2e 0a 20 20 20 | 20 20 2d 2d 20 49 74 20 |ion.. | -- It |
|00000c20| 72 65 70 72 65 73 65 6e | 74 73 20 61 20 73 65 74 |represen|ts a set|
|00000c30| 20 6f 66 20 70 6f 73 73 | 69 62 6c 65 20 72 65 70 | of poss|ible rep|
|00000c40| 72 65 73 65 6e 74 61 74 | 69 6f 6e 73 20 66 6f 72 |resentat|ions for|
|00000c50| 20 61 20 76 61 6c 75 65 | 20 28 53 43 73 29 2e 20 | a value| (SCs). |
|00000c60| 20 54 68 65 0a 20 20 20 | 20 20 20 20 20 70 72 69 | The. | pri|
|00000c70| 6d 69 74 69 76 65 20 74 | 79 70 65 20 69 73 20 75 |mitive t|ype is u|
|00000c80| 73 65 64 20 74 6f 20 64 | 65 74 65 72 6d 69 6e 65 |sed to d|etermine|
|00000c90| 20 74 68 65 20 6c 65 67 | 61 6c 20 53 43 73 20 66 | the leg|al SCs f|
|00000ca0| 6f 72 20 61 20 54 4e 2c | 20 61 6e 64 20 69 73 20 |or a TN,| and is |
|00000cb0| 61 6c 73 6f 0a 20 20 20 | 20 20 20 20 20 75 73 65 |also. | use|
|00000cc0| 64 20 74 6f 20 64 65 74 | 65 72 6d 69 6e 65 20 77 |d to det|ermine w|
|00000cd0| 68 69 63 68 20 74 79 70 | 65 2d 63 6f 65 72 63 69 |hich typ|e-coerci|
|00000ce0| 6f 6e 2f 6d 6f 76 65 20 | 56 4f 50 20 74 6f 20 75 |on/move |VOP to u|
|00000cf0| 73 65 2e 0a 0a 5d 0a 0a | 54 68 65 72 65 20 61 72 |se...]..|There ar|
|00000d00| 65 20 62 61 73 69 63 61 | 6c 6c 79 20 74 68 72 65 |e basica|lly thre|
|00000d10| 65 20 6c 65 76 65 6c 73 | 20 6f 66 20 74 61 72 67 |e levels| of targ|
|00000d20| 65 74 20 64 65 70 65 6e | 64 65 6e 63 65 3a 0a 0a |et depen|dence:..|
|00000d30| 20 2d 2d 20 43 6f 64 65 | 20 69 6e 20 74 68 65 20 | -- Code| in the |
|00000d40| 22 66 72 6f 6e 74 20 65 | 6e 64 22 20 28 62 65 66 |"front e|nd" (bef|
|00000d50| 6f 72 65 20 56 4d 52 20 | 63 6f 6e 76 65 72 73 69 |ore VMR |conversi|
|00000d60| 6f 6e 29 20 64 65 61 6c | 73 20 6f 6e 6c 79 20 77 |on) deal|s only w|
|00000d70| 69 74 68 20 4c 69 73 70 | 0a 20 20 20 20 73 65 6d |ith Lisp|. sem|
|00000d80| 61 6e 74 69 63 73 2c 20 | 61 6e 64 20 69 73 20 74 |antics, |and is t|
|00000d90| 6f 74 61 6c 6c 79 20 74 | 61 72 67 65 74 20 69 6e |otally t|arget in|
|00000da0| 64 65 70 65 6e 64 65 6e | 74 2e 0a 0a 20 2d 2d 20 |dependen|t... -- |
|00000db0| 43 6f 64 65 20 61 66 74 | 65 72 20 56 4d 52 20 63 |Code aft|er VMR c|
|00000dc0| 6f 6e 76 65 72 73 69 6f | 6e 20 61 6e 64 20 62 65 |onversio|n and be|
|00000dd0| 66 6f 72 65 20 63 6f 64 | 65 20 67 65 6e 65 72 61 |fore cod|e genera|
|00000de0| 74 69 6f 6e 20 64 65 70 | 65 6e 64 73 20 6f 6e 20 |tion dep|ends on |
|00000df0| 74 68 65 20 56 4d 2c 0a | 20 20 20 20 62 75 74 20 |the VM,.| but |
|00000e00| 73 68 6f 75 6c 64 20 77 | 6f 72 6b 20 77 69 74 68 |should w|ork with|
|00000e10| 20 6c 69 74 74 6c 65 20 | 6d 6f 64 69 66 69 63 61 | little |modifica|
|00000e20| 74 69 6f 6e 20 61 63 72 | 6f 73 73 20 61 20 77 69 |tion acr|oss a wi|
|00000e30| 64 65 20 72 61 6e 67 65 | 20 6f 66 0a 20 20 20 20 |de range| of. |
|00000e40| 22 63 6f 6e 76 65 6e 74 | 69 6f 6e 61 6c 22 20 61 |"convent|ional" a|
|00000e50| 72 63 68 69 74 65 63 74 | 75 72 65 73 2e 0a 0a 20 |rchitect|ures... |
|00000e60| 2d 2d 20 43 6f 64 65 20 | 67 65 6e 65 72 61 74 69 |-- Code |generati|
|00000e70| 6f 6e 20 64 65 70 65 6e | 64 73 20 6f 6e 20 74 68 |on depen|ds on th|
|00000e80| 65 20 6d 61 63 68 69 6e | 65 27 73 20 69 6e 73 74 |e machin|e's inst|
|00000e90| 72 75 63 74 69 6f 6e 20 | 73 65 74 20 61 6e 64 20 |ruction |set and |
|00000ea0| 6f 74 68 65 72 0a 20 20 | 20 20 69 6d 70 6c 65 6d |other. | implem|
|00000eb0| 65 6e 74 61 74 69 6f 6e | 20 64 65 74 61 69 6c 73 |entation| details|
|00000ec0| 2c 20 73 6f 20 69 74 20 | 77 69 6c 6c 20 68 61 76 |, so it |will hav|
|00000ed0| 65 20 74 6f 20 62 65 20 | 72 65 64 6f 6e 65 20 66 |e to be |redone f|
|00000ee0| 6f 72 20 65 61 63 68 0a | 20 20 20 20 69 6d 70 6c |or each.| impl|
|00000ef0| 65 6d 65 6e 74 61 74 69 | 6f 6e 2e 20 20 4d 6f 73 |ementati|on. Mos|
|00000f00| 74 20 6f 66 20 74 68 65 | 20 77 6f 72 6b 20 68 65 |t of the| work he|
|00000f10| 72 65 20 69 73 20 69 6e | 20 64 65 66 69 6e 69 6e |re is in| definin|
|00000f20| 67 20 74 68 65 20 74 72 | 61 6e 73 6c 61 74 69 6f |g the tr|anslatio|
|00000f30| 6e 20 69 6e 74 6f 0a 20 | 20 20 20 61 73 73 65 6d |n into. | assem|
|00000f40| 62 6c 79 20 63 6f 64 65 | 20 6f 66 20 61 6c 6c 20 |bly code| of all |
|00000f50| 74 68 65 20 73 75 70 70 | 6f 72 74 65 64 20 56 4f |the supp|orted VO|
|00000f60| 50 73 2e 0a 0a 0a 0c 0a | 5c 63 68 61 70 74 65 72 |Ps......|\chapter|
|00000f70| 7b 53 74 6f 72 61 67 65 | 20 62 61 73 65 73 20 61 |{Storage| bases a|
|00000f80| 6e 64 20 63 6c 61 73 73 | 65 73 7d 0a 4e 65 77 20 |nd class|es}.New |
|00000f90| 69 6e 74 65 72 66 61 63 | 65 3a 20 69 6e 73 74 65 |interfac|e: inste|
|00000fa0| 61 64 20 6f 66 20 43 55 | 52 52 45 4e 54 2d 46 52 |ad of CU|RRENT-FR|
|00000fb0| 41 4d 45 2d 53 49 5a 45 | 2c 20 68 61 76 65 20 43 |AME-SIZE|, have C|
|00000fc0| 55 52 52 45 4e 54 2d 53 | 42 2d 53 49 5a 45 20 3c |URRENT-S|B-SIZE <|
|00000fd0| 6e 61 6d 65 3e 20 77 68 | 69 63 68 0a 72 65 74 75 |name> wh|ich.retu|
|00000fe0| 72 6e 73 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |rns the |current |
|00000ff0| 65 6c 65 6d 65 6e 74 20 | 73 69 7a 65 20 6f 66 20 |element |size of |
|00001000| 74 68 65 20 6e 61 6d 65 | 64 20 53 42 2e 0a 0a 48 |the name|d SB...H|
|00001010| 6f 77 20 63 61 6e 20 77 | 65 20 68 61 76 65 20 70 |ow can w|e have p|
|00001020| 72 69 6d 69 74 69 76 65 | 20 74 79 70 65 73 20 74 |rimitive| types t|
|00001030| 68 61 74 20 6f 76 65 72 | 6c 61 70 2c 20 69 2e 65 |hat over|lap, i.e|
|00001040| 2e 20 28 55 4e 53 49 47 | 4e 45 44 2d 42 59 54 45 |. (UNSIG|NED-BYTE|
|00001050| 20 33 32 29 2c 0a 28 53 | 49 47 4e 45 44 2d 42 59 | 32),.(S|IGNED-BY|
|00001060| 54 45 20 33 32 29 2c 20 | 46 49 58 4e 55 4d 3f 0a |TE 32), |FIXNUM?.|
|00001070| 50 72 69 6d 69 74 69 76 | 65 20 74 79 70 65 73 20 |Primitiv|e types |
|00001080| 61 72 65 20 75 73 65 64 | 20 66 6f 72 20 74 77 6f |are used| for two|
|00001090| 20 74 68 69 6e 67 73 3a | 0a 20 20 20 20 52 65 70 | things:|. Rep|
|000010a0| 72 65 73 65 6e 74 61 74 | 69 6f 6e 20 73 65 6c 65 |resentat|ion sele|
|000010b0| 63 74 69 6f 6e 3a 20 77 | 68 69 63 68 20 53 43 73 |ction: w|hich SCs|
|000010c0| 20 63 61 6e 20 62 65 20 | 75 73 65 64 20 74 6f 20 | can be |used to |
|000010d0| 72 65 70 72 65 73 65 6e | 74 20 74 68 69 73 20 76 |represen|t this v|
|000010e0| 61 6c 75 65 3f 0a 09 46 | 6f 72 20 74 68 69 73 20 |alue?..F|or this |
|000010f0| 70 75 72 70 6f 73 65 2c | 20 69 74 20 69 73 6e 27 |purpose,| it isn'|
|00001100| 74 20 6e 65 63 65 73 73 | 61 72 79 20 74 68 61 74 |t necess|ary that|
|00001110| 20 70 72 69 6d 69 74 69 | 76 65 20 74 79 70 65 73 | primiti|ve types|
|00001120| 20 62 65 20 64 69 73 6a | 6f 69 6e 74 2c 0a 09 73 | be disj|oint,..s|
|00001130| 69 6e 63 65 20 61 6e 79 | 20 70 72 69 6d 69 74 69 |ince any| primiti|
|00001140| 76 65 20 74 79 70 65 20 | 63 61 6e 20 63 68 6f 6f |ve type |can choo|
|00001150| 73 65 20 61 6e 20 61 72 | 62 69 74 72 61 72 79 20 |se an ar|bitrary |
|00001160| 73 65 74 20 6f 66 0a 09 | 72 65 70 72 65 73 65 6e |set of..|represen|
|00001170| 74 61 74 69 6f 6e 73 2e | 20 20 46 6f 72 20 6d 6f |tations.| For mo|
|00001180| 76 65 73 20 62 65 74 77 | 65 65 6e 20 74 68 65 20 |ves betw|een the |
|00001190| 6f 76 65 72 6c 61 70 70 | 69 6e 67 20 72 65 70 72 |overlapp|ing repr|
|000011a0| 65 73 65 6e 74 61 74 69 | 6f 6e 73 2c 0a 09 74 68 |esentati|ons,..th|
|000011b0| 65 20 6d 6f 76 65 2f 6c | 6f 61 64 20 6f 70 65 72 |e move/l|oad oper|
|000011c0| 61 74 69 6f 6e 73 20 63 | 61 6e 20 6a 75 73 74 20 |ations c|an just |
|000011d0| 62 65 20 6e 6f 6f 70 73 | 20 77 68 65 6e 20 74 68 |be noops| when th|
|000011e0| 65 20 6c 6f 63 61 74 69 | 6f 6e 73 20 61 72 65 20 |e locati|ons are |
|000011f0| 74 68 65 0a 09 73 61 6d | 65 20 28 76 61 6e 69 6c |the..sam|e (vanil|
|00001200| 6c 61 20 4d 4f 56 45 29 | 2c 20 73 69 6e 63 65 20 |la MOVE)|, since |
|00001210| 61 6e 79 20 62 61 64 20 | 6d 6f 76 65 73 20 73 68 |any bad |moves sh|
|00001220| 6f 75 6c 64 20 62 65 20 | 63 61 75 67 68 74 20 6f |ould be |caught o|
|00001230| 75 74 20 62 79 20 74 79 | 70 65 0a 09 63 68 65 63 |ut by ty|pe..chec|
|00001240| 6b 69 6e 67 2e 0a 20 20 | 20 20 56 4f 50 20 73 65 |king.. | VOP se|
|00001250| 6c 65 63 74 69 6f 6e 3a | 0a 09 49 73 20 74 68 69 |lection:|..Is thi|
|00001260| 73 20 6f 70 65 72 61 6e | 64 20 6c 65 67 61 6c 20 |s operan|d legal |
|00001270| 66 6f 72 20 74 68 69 73 | 20 56 4f 50 3f 20 20 57 |for this| VOP? W|
|00001280| 68 65 6e 20 70 74 79 70 | 65 73 20 6f 76 65 72 6c |hen ptyp|es overl|
|00001290| 61 70 20 69 6e 20 69 6e | 74 65 72 65 73 74 69 6e |ap in in|terestin|
|000012a0| 67 0a 09 77 61 79 73 2c | 20 74 68 65 72 65 20 69 |g..ways,| there i|
|000012b0| 73 20 61 20 70 72 6f 62 | 6c 65 6d 20 77 69 74 68 |s a prob|lem with|
|000012c0| 20 61 6c 6c 6f 77 69 6e | 67 20 6a 75 73 74 20 61 | allowin|g just a|
|000012d0| 20 73 69 6d 70 6c 65 20 | 70 74 79 70 65 20 72 65 | simple |ptype re|
|000012e0| 73 74 72 69 63 74 69 6f | 6e 2c 0a 09 73 69 6e 63 |strictio|n,..sinc|
|000012f0| 65 20 77 65 20 6d 69 67 | 68 74 20 77 61 6e 74 20 |e we mig|ht want |
|00001300| 74 6f 20 61 6c 6c 6f 77 | 20 6d 75 6c 74 69 70 6c |to allow| multipl|
|00001310| 65 20 70 74 79 70 65 73 | 2e 20 20 54 68 69 73 20 |e ptypes|. This |
|00001320| 63 6f 75 6c 64 20 62 65 | 20 68 61 6e 64 6c 65 64 |could be| handled|
|00001330| 0a 09 62 79 20 61 6c 6c | 6f 77 69 6e 67 20 22 75 |..by all|owing "u|
|00001340| 6e 69 6f 6e 20 70 72 69 | 6d 69 74 69 76 65 20 74 |nion pri|mitive t|
|00001350| 79 70 65 73 22 2c 20 6f | 72 20 62 79 20 61 6c 6c |ypes", o|r by all|
|00001360| 6f 77 69 6e 67 20 6d 75 | 6c 74 69 70 6c 65 20 70 |owing mu|ltiple p|
|00001370| 72 69 6d 69 74 69 76 65 | 0a 09 74 79 70 65 73 20 |rimitive|..types |
|00001380| 74 6f 20 62 65 20 73 70 | 65 63 69 66 69 65 64 20 |to be sp|ecified |
|00001390| 28 6f 6e 6c 79 20 69 6e | 20 74 68 65 20 6f 70 65 |(only in| the ope|
|000013a0| 72 61 6e 64 20 72 65 73 | 74 72 69 63 74 69 6f 6e |rand res|triction|
|000013b0| 2e 29 20 20 54 68 65 20 | 6c 61 74 74 65 72 0a 09 |.) The |latter..|
|000013c0| 77 6f 75 6c 64 20 62 65 | 20 6c 6f 6e 67 20 74 68 |would be| long th|
|000013d0| 65 20 6c 69 6e 65 73 20 | 6f 66 20 6f 74 68 65 72 |e lines |of other|
|000013e0| 20 6d 6f 72 65 20 66 6c | 65 78 69 62 6c 65 20 56 | more fl|exible V|
|000013f0| 4f 50 20 6f 70 65 72 61 | 6e 64 20 72 65 73 74 72 |OP opera|nd restr|
|00001400| 69 63 74 69 6f 6e 0a 09 | 6d 65 63 68 61 6e 69 73 |iction..|mechanis|
|00001410| 6d 73 2c 20 28 63 6f 6e | 73 74 61 6e 74 2c 20 65 |ms, (con|stant, e|
|00001420| 74 63 2e 29 0a 0a 0a 0a | 45 6e 73 75 72 65 20 74 |tc.)....|Ensure t|
|00001430| 68 61 74 20 6c 6f 61 64 | 2f 73 61 76 65 2d 6f 70 |hat load|/save-op|
|00001440| 65 72 61 6e 64 20 6e 65 | 76 65 72 20 6e 65 65 64 |erand ne|ver need|
|00001450| 20 74 6f 20 64 6f 20 72 | 65 70 72 65 73 65 6e 74 | to do r|epresent|
|00001460| 61 74 69 6f 6e 20 63 6f | 6e 76 65 72 73 69 6f 6e |ation co|nversion|
|00001470| 2e 0a 0a 54 68 65 20 50 | 52 49 4d 49 54 49 56 45 |...The P|RIMITIVE|
|00001480| 2d 54 59 50 45 20 6d 6f | 72 65 2f 63 6f 65 72 63 |-TYPE mo|re/coerc|
|00001490| 65 20 69 6e 66 6f 20 77 | 6f 75 6c 64 20 62 65 20 |e info w|ould be |
|000014a0| 6d 6f 76 65 64 20 69 6e | 74 6f 20 74 68 65 20 53 |moved in|to the S|
|000014b0| 43 2e 20 20 54 68 69 73 | 20 63 6f 75 6c 64 0a 70 |C. This| could.p|
|000014c0| 65 72 68 61 70 73 20 67 | 6f 20 61 6c 6f 6e 67 20 |erhaps g|o along |
|000014d0| 77 69 74 68 20 66 6c 75 | 73 68 69 6e 67 20 74 68 |with flu|shing th|
|000014e0| 65 20 54 4e 2d 43 4f 53 | 54 53 2e 20 20 57 65 20 |e TN-COS|TS. We |
|000014f0| 77 6f 75 6c 64 20 61 6e | 6e 6f 74 61 74 65 20 74 |would an|notate t|
|00001500| 68 65 20 54 4e 20 77 69 | 74 68 0a 62 65 73 74 20 |he TN wi|th.best |
|00001510| 53 43 2c 20 77 68 69 63 | 68 20 69 6d 70 6c 69 65 |SC, whic|h implie|
|00001520| 73 20 74 68 65 20 72 65 | 70 72 65 73 65 6e 74 61 |s the re|presenta|
|00001530| 74 69 6f 6e 20 28 62 6f | 78 65 64 20 6f 72 20 75 |tion (bo|xed or u|
|00001540| 6e 62 6f 78 65 64 29 2e | 20 20 57 65 20 77 6f 75 |nboxed).| We wou|
|00001550| 6c 64 20 73 74 69 6c 6c | 0a 6e 65 65 64 20 72 65 |ld still|.need re|
|00001560| 70 72 65 73 65 6e 74 20 | 74 68 65 20 6c 65 67 61 |present |the lega|
|00001570| 6c 20 53 43 73 20 66 6f | 72 20 72 65 73 74 72 69 |l SCs fo|r restri|
|00001580| 63 74 65 64 20 54 4e 73 | 20 73 6f 6d 65 68 6f 77 |cted TNs| somehow|
|00001590| 2c 20 61 6e 64 20 61 6c | 73 6f 20 77 6f 75 6c 64 |, and al|so would|
|000015a0| 20 68 61 76 65 20 74 6f | 0a 63 6f 6d 65 20 75 70 | have to|.come up|
|000015b0| 20 77 69 74 68 20 73 6f | 6d 65 20 6f 74 68 65 72 | with so|me other|
|000015c0| 20 77 61 79 20 66 6f 72 | 20 70 61 63 6b 20 74 6f | way for| pack to|
|000015d0| 20 6b 65 65 70 20 74 72 | 61 63 6b 20 6f 66 20 77 | keep tr|ack of w|
|000015e0| 68 69 63 68 20 53 43 73 | 20 77 65 20 68 61 76 65 |hich SCs| we have|
|000015f0| 20 61 6c 72 65 61 64 79 | 0a 74 72 69 65 64 2e 0a | already|.tried..|
|00001600| 0a 41 20 53 43 20 77 6f | 75 6c 64 20 68 61 76 65 |.A SC wo|uld have|
|00001610| 20 61 20 6c 69 73 74 20 | 6f 66 20 22 61 6c 74 65 | a list |of "alte|
|00001620| 72 6e 61 74 65 22 20 53 | 43 73 20 61 6e 64 20 61 |rnate" S|Cs and a|
|00001630| 20 62 6f 6f 6c 65 61 6e | 20 53 41 56 45 2d 50 20 | boolean| SAVE-P |
|00001640| 76 61 6c 75 65 20 74 68 | 61 74 0a 69 6e 64 69 63 |value th|at.indic|
|00001650| 61 74 65 73 20 69 74 20 | 6e 65 65 64 73 20 74 6f |ates it |needs to|
|00001660| 20 62 65 20 73 61 76 65 | 64 20 61 63 72 6f 73 73 | be save|d across|
|00001670| 20 63 61 6c 6c 73 20 69 | 6e 20 73 6f 6d 65 20 6e | calls i|n some n|
|00001680| 6f 6e 2d 53 41 56 45 2d | 50 20 53 43 2e 20 20 41 |on-SAVE-|P SC. A|
|00001690| 20 54 4e 20 69 73 0a 69 | 6e 69 74 69 61 6c 6c 79 | TN is.i|nitially|
|000016a0| 20 67 69 76 65 6e 20 69 | 74 73 20 22 62 65 73 74 | given i|ts "best|
|000016b0| 22 20 53 43 2e 20 20 54 | 68 65 20 53 43 20 69 73 |" SC. T|he SC is|
|000016c0| 20 61 6e 6e 6f 74 61 74 | 65 64 20 77 69 74 68 20 | annotat|ed with |
|000016d0| 56 4f 50 73 20 74 68 61 | 74 20 61 72 65 20 75 73 |VOPs tha|t are us|
|000016e0| 65 64 20 66 6f 72 0a 6d | 6f 76 69 6e 67 20 62 65 |ed for.m|oving be|
|000016f0| 74 77 65 65 6e 20 74 68 | 65 20 53 43 20 61 6e 64 |tween th|e SC and|
|00001700| 20 69 74 73 20 61 6c 74 | 65 72 6e 61 74 65 20 53 | its alt|ernate S|
|00001710| 43 73 20 28 6c 6f 61 64 | 2f 73 61 76 65 20 6f 70 |Cs (load|/save op|
|00001720| 65 72 61 6e 64 2c 20 73 | 61 76 65 2f 72 65 73 74 |erand, s|ave/rest|
|00001730| 6f 72 65 0a 72 65 67 69 | 73 74 65 72 29 2e 20 20 |ore.regi|ster). |
|00001740| 49 74 20 69 73 20 61 6c | 73 6f 20 61 6e 6e 6f 74 |It is al|so annot|
|00001750| 61 74 65 64 20 77 69 74 | 68 20 74 68 65 20 22 6d |ated wit|h the "m|
|00001760| 6f 76 65 22 20 56 4f 50 | 73 20 75 73 65 64 20 66 |ove" VOP|s used f|
|00001770| 6f 72 20 6d 6f 76 69 6e | 67 20 62 65 74 77 65 65 |or movin|g betwee|
|00001780| 6e 0a 74 68 69 73 20 53 | 43 20 61 6e 64 20 61 6c |n.this S|C and al|
|00001790| 6c 20 6f 74 68 65 72 20 | 53 43 73 20 69 74 20 69 |l other |SCs it i|
|000017a0| 73 20 70 6f 73 73 69 62 | 6c 65 20 74 6f 20 6d 6f |s possib|le to mo|
|000017b0| 76 65 20 62 65 74 77 65 | 65 6e 2e 20 20 57 65 20 |ve betwe|en. We |
|000017c0| 66 6c 75 73 68 20 74 68 | 65 20 69 64 65 61 0a 74 |flush th|e idea.t|
|000017d0| 68 61 74 20 74 68 65 72 | 65 20 69 73 20 6f 6e 6c |hat ther|e is onl|
|000017e0| 79 20 63 2d 74 6f 2d 74 | 20 61 6e 64 20 63 2d 66 |y c-to-t| and c-f|
|000017f0| 72 6f 6d 2d 74 2e 0a 0a | 42 75 74 20 68 6f 77 20 |rom-t...|But how |
|00001800| 64 6f 65 73 20 74 68 69 | 73 20 6d 65 73 68 20 77 |does thi|s mesh w|
|00001810| 69 74 68 20 74 68 65 20 | 69 64 65 61 20 6f 66 20 |ith the |idea of |
|00001820| 70 75 74 74 69 6e 67 20 | 6f 70 65 72 61 6e 64 20 |putting |operand |
|00001830| 6c 6f 61 64 2f 73 61 76 | 65 20 62 61 63 6b 20 69 |load/sav|e back i|
|00001840| 6e 74 6f 20 74 68 65 0a | 67 65 6e 65 72 61 74 6f |nto the.|generato|
|00001850| 72 3f 20 20 4d 61 79 62 | 65 20 77 65 20 73 68 6f |r? Mayb|e we sho|
|00001860| 75 6c 64 20 69 6e 73 74 | 65 61 64 20 73 70 65 63 |uld inst|ead spec|
|00001870| 69 66 79 20 61 20 6c 6f | 61 64 2f 73 61 76 65 20 |ify a lo|ad/save |
|00001880| 66 75 6e 63 74 69 6f 6e | 3f 20 20 54 68 65 0a 6c |function|? The.l|
|00001890| 6f 61 64 2f 73 61 76 65 | 20 66 75 6e 63 74 69 6f |oad/save| functio|
|000018a0| 6e 73 20 77 6f 75 6c 64 | 20 61 6c 73 6f 20 64 69 |ns would| also di|
|000018b0| 66 66 65 72 20 66 72 6f | 6d 20 74 68 65 20 6d 6f |ffer fro|m the mo|
|000018c0| 76 65 20 56 4f 50 73 20 | 69 6e 20 74 68 61 74 20 |ve VOPs |in that |
|000018d0| 74 68 65 79 20 77 6f 75 | 6c 64 0a 6f 6e 6c 79 20 |they wou|ld.only |
|000018e0| 62 65 20 63 61 6c 6c 65 | 64 20 77 68 65 6e 20 74 |be calle|d when t|
|000018f0| 68 65 20 54 4e 20 69 73 | 20 69 6e 20 66 61 63 74 |he TN is| in fact|
|00001900| 20 69 6e 20 74 68 61 74 | 20 70 61 72 74 69 63 75 | in that| particu|
|00001910| 6c 61 72 20 61 6c 74 65 | 72 6e 61 74 65 20 53 43 |lar alte|rnate SC|
|00001920| 2c 20 77 68 65 72 65 61 | 73 0a 74 68 65 20 6d 6f |, wherea|s.the mo|
|00001930| 76 65 20 56 4f 50 73 20 | 77 69 6c 6c 20 62 65 20 |ve VOPs |will be |
|00001940| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|00001950| 74 68 65 20 70 72 69 6d | 61 72 79 20 53 43 2c 20 |the prim|ary SC, |
|00001960| 61 6e 64 20 77 69 6c 6c | 20 62 65 20 65 6d 69 74 |and will| be emit|
|00001970| 74 65 64 0a 62 65 66 6f | 72 65 20 69 74 20 69 73 |ted.befo|re it is|
|00001980| 20 6b 6e 6f 77 6e 20 77 | 68 65 74 68 65 72 20 74 | known w|hether t|
|00001990| 68 65 20 54 4e 20 77 69 | 6c 6c 20 62 65 20 70 61 |he TN wi|ll be pa|
|000019a0| 63 6b 65 64 20 69 6e 20 | 74 68 65 20 70 72 69 6d |cked in |the prim|
|000019b0| 61 72 79 20 53 43 20 6f | 72 20 61 6e 0a 61 6c 74 |ary SC o|r an.alt|
|000019c0| 65 72 6e 61 74 65 2e 0a | 0a 49 20 67 75 65 73 73 |ernate..|.I guess|
|000019d0| 20 61 20 70 61 63 6b 65 | 64 20 53 43 20 63 6f 75 | a packe|d SC cou|
|000019e0| 6c 64 20 61 6c 73 6f 20 | 68 61 76 65 20 69 6d 6d |ld also |have imm|
|000019f0| 65 64 69 61 74 65 20 53 | 43 73 20 61 73 20 61 6c |ediate S|Cs as al|
|00001a00| 74 65 72 6e 61 74 65 20 | 53 43 73 2c 20 61 6e 64 |ternate |SCs, and|
|00001a10| 0a 63 6f 6e 73 74 61 6e | 74 20 6c 6f 61 64 69 6e |.constan|t loadin|
|00001a20| 67 20 66 75 6e 63 74 69 | 6f 6e 73 20 63 6f 75 6c |g functi|ons coul|
|00001a30| 64 20 62 65 20 61 73 73 | 6f 63 69 61 74 65 64 20 |d be ass|ociated |
|00001a40| 77 69 74 68 20 53 43 73 | 20 75 73 69 6e 67 20 74 |with SCs| using t|
|00001a50| 68 69 73 20 6d 65 63 68 | 61 6e 69 73 6d 2e 0a 0a |his mech|anism...|
|00001a60| 53 6f 20 67 69 76 65 6e | 20 61 20 54 4e 20 70 61 |So given| a TN pa|
|00001a70| 63 6b 65 64 20 69 6e 20 | 53 43 20 58 20 61 6e 64 |cked in |SC X and|
|00001a80| 20 61 20 53 43 20 72 65 | 73 74 72 69 63 74 69 6f | a SC re|strictio|
|00001a90| 6e 20 66 6f 72 20 59 20 | 61 6e 64 20 5a 2c 20 68 |n for Y |and Z, h|
|00001aa0| 6f 77 20 64 6f 20 77 65 | 20 6b 6e 6f 77 0a 77 68 |ow do we| know.wh|
|00001ab0| 69 63 68 20 6c 6f 61 64 | 20 66 75 6e 63 74 69 6f |ich load| functio|
|00001ac0| 6e 20 74 6f 20 63 61 6c | 6c 3f 20 20 54 68 65 72 |n to cal|l? Ther|
|00001ad0| 65 20 77 6f 75 6c 64 20 | 62 65 20 61 6d 62 69 67 |e would |be ambig|
|00001ae0| 75 69 74 79 20 69 66 20 | 58 20 77 61 73 20 61 6e |uity if |X was an|
|00001af0| 20 61 6c 74 65 72 6e 61 | 74 65 0a 66 6f 72 20 62 | alterna|te.for b|
|00001b00| 6f 74 68 20 59 20 61 6e | 64 20 5a 20 61 6e 64 20 |oth Y an|d Z and |
|00001b10| 74 68 65 79 20 73 70 65 | 63 69 66 69 65 64 20 64 |they spe|cified d|
|00001b20| 69 66 66 65 72 65 6e 74 | 20 6c 6f 61 64 20 66 75 |ifferent| load fu|
|00001b30| 6e 63 74 69 6f 6e 73 2e | 20 20 54 68 69 73 20 73 |nctions.| This s|
|00001b40| 65 65 6d 73 0a 75 6e 6c | 69 6b 65 6c 79 20 74 6f |eems.unl|ikely to|
|00001b50| 20 61 72 69 73 65 20 69 | 6e 20 70 72 61 63 74 69 | arise i|n practi|
|00001b60| 63 65 2c 20 74 68 6f 75 | 67 68 2c 20 73 6f 20 77 |ce, thou|gh, so w|
|00001b70| 65 20 63 6f 75 6c 64 20 | 6a 75 73 74 20 64 65 74 |e could |just det|
|00001b80| 65 63 74 20 74 68 65 20 | 61 6d 62 69 67 75 69 74 |ect the |ambiguit|
|00001b90| 79 0a 61 6e 64 20 67 69 | 76 65 20 61 6e 20 65 72 |y.and gi|ve an er|
|00001ba0| 72 6f 72 20 61 74 20 64 | 65 66 69 6e 65 2d 76 6f |ror at d|efine-vo|
|00001bb0| 70 20 74 69 6d 65 2e 20 | 20 49 66 20 74 68 65 79 |p time. | If they|
|00001bc0| 20 61 72 65 20 64 6f 69 | 6e 67 20 73 6f 6d 65 74 | are doi|ng somet|
|00001bd0| 68 69 6e 67 20 74 6f 74 | 61 6c 6c 79 0a 77 65 69 |hing tot|ally.wei|
|00001be0| 72 64 2c 20 74 68 65 79 | 20 63 61 6e 20 61 6c 77 |rd, they| can alw|
|00001bf0| 61 79 73 20 69 6e 68 69 | 62 69 74 20 6c 6f 61 64 |ays inhi|bit load|
|00001c00| 69 6e 67 20 61 6e 64 20 | 72 6f 6c 6c 20 74 68 65 |ing and |roll the|
|00001c10| 69 72 20 6f 77 6e 2e 0a | 0a 4e 6f 74 65 20 74 68 |ir own..|.Note th|
|00001c20| 61 74 20 6c 6f 61 64 69 | 6e 67 20 63 6f 73 74 73 |at loadi|ng costs|
|00001c30| 20 63 61 6e 20 62 65 20 | 73 70 65 63 69 66 69 65 | can be |specifie|
|00001c40| 64 20 61 74 20 74 68 65 | 20 73 61 6d 65 20 74 69 |d at the| same ti|
|00001c50| 6d 65 20 28 73 61 6d 65 | 20 73 79 6e 74 61 78 29 |me (same| syntax)|
|00001c60| 20 61 73 0a 61 73 73 6f | 63 69 61 74 69 6f 6e 20 | as.asso|ciation |
|00001c70| 6f 66 20 6c 6f 61 64 69 | 6e 67 20 66 75 6e 63 74 |of loadi|ng funct|
|00001c80| 69 6f 6e 73 20 77 69 74 | 68 20 53 43 73 2e 20 20 |ions wit|h SCs. |
|00001c90| 49 74 20 73 65 65 6d 73 | 20 74 68 61 74 20 6d 61 |It seems| that ma|
|00001ca0| 79 62 65 20 77 65 20 77 | 69 6c 6c 20 62 65 0a 72 |ybe we w|ill be.r|
|00001cb0| 6f 6c 6c 69 6e 67 20 44 | 45 46 49 4e 45 2d 53 41 |olling D|EFINE-SA|
|00001cc0| 56 45 2d 53 43 53 20 61 | 6e 64 20 44 45 46 49 4e |VE-SCS a|nd DEFIN|
|00001cd0| 45 2d 4d 4f 56 45 2d 43 | 4f 53 54 53 20 69 6e 74 |E-MOVE-C|OSTS int|
|00001ce0| 6f 20 44 45 46 49 4e 45 | 2d 53 54 4f 52 41 47 45 |o DEFINE|-STORAGE|
|00001cf0| 2d 43 4c 41 53 53 2e 0a | 0a 46 6f 72 74 75 6e 61 |-CLASS..|.Fortuna|
|00001d00| 74 65 6c 79 2c 20 74 68 | 65 73 65 20 63 68 61 6e |tely, th|ese chan|
|00001d10| 67 65 73 20 77 69 6c 6c | 20 61 66 66 65 63 74 20 |ges will| affect |
|00001d20| 6d 6f 73 74 20 56 4f 50 | 20 64 65 66 69 6e 69 74 |most VOP| definit|
|00001d30| 69 6f 6e 73 20 76 65 72 | 79 20 6c 69 74 74 6c 65 |ions ver|y little|
|00001d40| 2e 0a 0a 0a 41 20 53 74 | 6f 72 61 67 65 20 42 61 |....A St|orage Ba|
|00001d50| 73 65 20 72 65 70 72 65 | 73 65 6e 74 73 20 61 20 |se repre|sents a |
|00001d60| 70 68 79 73 69 63 61 6c | 20 73 74 6f 72 61 67 65 |physical| storage|
|00001d70| 20 72 65 73 6f 75 72 63 | 65 20 73 75 63 68 20 61 | resourc|e such a|
|00001d80| 73 20 61 20 72 65 67 69 | 73 74 65 72 20 73 65 74 |s a regi|ster set|
|00001d90| 20 6f 72 0a 73 74 61 63 | 6b 20 66 72 61 6d 65 2e | or.stac|k frame.|
|00001da0| 20 20 53 74 6f 72 61 67 | 65 20 62 61 73 65 73 20 | Storag|e bases |
|00001db0| 66 6f 72 20 6e 6f 6e 2d | 67 6c 6f 62 61 6c 20 72 |for non-|global r|
|00001dc0| 65 73 6f 75 72 63 65 73 | 20 73 75 63 68 20 61 73 |esources| such as|
|00001dd0| 20 74 68 65 20 73 74 61 | 63 6b 20 61 72 65 0a 72 | the sta|ck are.r|
|00001de0| 65 6c 61 74 69 76 69 7a | 65 64 20 62 79 20 74 68 |elativiz|ed by th|
|00001df0| 65 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 20 74 68 |e enviro|nment th|
|00001e00| 61 74 20 74 68 65 20 54 | 4e 20 69 73 20 61 6c 6c |at the T|N is all|
|00001e10| 6f 63 61 74 65 64 20 69 | 6e 2e 20 20 50 61 63 6b |ocated i|n. Pack|
|00001e20| 69 6e 67 20 63 6f 6e 66 | 6c 69 63 74 0a 69 6e 66 |ing conf|lict.inf|
|00001e30| 6f 72 6d 61 74 69 6f 6e | 20 69 73 20 6b 65 70 74 |ormation| is kept|
|00001e40| 20 69 6e 20 74 68 65 20 | 73 74 6f 72 61 67 65 20 | in the |storage |
|00001e50| 62 61 73 65 2c 20 62 75 | 74 20 6e 6f 6e 2d 70 61 |base, bu|t non-pa|
|00001e60| 63 6b 65 64 20 73 74 6f | 72 61 67 65 20 72 65 73 |cked sto|rage res|
|00001e70| 6f 75 72 63 65 73 20 73 | 75 63 68 0a 61 73 20 63 |ources s|uch.as c|
|00001e80| 6c 6f 73 75 72 65 20 65 | 6e 76 69 72 6f 6e 6d 65 |losure e|nvironme|
|00001e90| 6e 74 73 20 61 6c 73 6f | 20 68 61 76 65 20 73 74 |nts also| have st|
|00001ea0| 6f 72 61 67 65 20 62 61 | 73 65 73 2e 0a 53 6f 6d |orage ba|ses..Som|
|00001eb0| 65 20 73 74 6f 72 61 67 | 65 20 62 61 73 65 73 3a |e storag|e bases:|
|00001ec0| 0a 20 20 20 20 47 65 6e | 65 72 61 6c 20 70 75 72 |. Gen|eral pur|
|00001ed0| 70 6f 73 65 20 72 65 67 | 69 73 74 65 72 73 0a 20 |pose reg|isters. |
|00001ee0| 20 20 20 46 6c 6f 61 74 | 69 6e 67 20 70 6f 69 6e | Float|ing poin|
|00001ef0| 74 20 72 65 67 69 73 74 | 65 72 73 0a 20 20 20 20 |t regist|ers. |
|00001f00| 42 6f 78 65 64 20 28 63 | 6f 6e 74 72 6f 6c 29 20 |Boxed (c|ontrol) |
|00001f10| 73 74 61 63 6b 20 65 6e | 76 69 72 6f 6e 6d 65 6e |stack en|vironmen|
|00001f20| 74 0a 20 20 20 20 55 6e | 62 6f 78 65 64 20 28 6e |t. Un|boxed (n|
|00001f30| 75 6d 62 65 72 29 20 73 | 74 61 63 6b 20 65 6e 76 |umber) s|tack env|
|00001f40| 69 72 6f 6e 6d 65 6e 74 | 0a 20 20 20 20 43 6c 6f |ironment|. Clo|
|00001f50| 73 75 72 65 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |sure env|ironment|
|00001f60| 0a 0a 41 20 73 74 6f 72 | 61 67 65 20 63 6c 61 73 |..A stor|age clas|
|00001f70| 73 20 69 73 20 61 20 70 | 6f 74 65 6e 74 69 61 6c |s is a p|otential|
|00001f80| 6c 79 20 61 72 62 69 74 | 72 61 72 79 20 73 65 74 |ly arbit|rary set|
|00001f90| 20 6f 66 20 74 68 65 20 | 65 6c 65 6d 65 6e 74 73 | of the |elements|
|00001fa0| 20 69 6e 20 61 20 73 74 | 6f 72 61 67 65 0a 62 61 | in a st|orage.ba|
|00001fb0| 73 65 2e 20 20 41 6c 74 | 68 6f 75 67 68 20 63 6f |se. Alt|hough co|
|00001fc0| 6e 63 65 70 74 75 61 6c | 6c 79 20 74 68 65 72 65 |nceptual|ly there|
|00001fd0| 20 6d 61 79 20 62 65 20 | 61 20 68 69 65 72 61 72 | may be |a hierar|
|00001fe0| 63 68 79 20 6f 66 20 73 | 74 6f 72 61 67 65 20 63 |chy of s|torage c|
|00001ff0| 6c 61 73 73 65 73 20 73 | 75 63 68 0a 61 73 20 22 |lasses s|uch.as "|
|00002000| 61 6c 6c 20 72 65 67 69 | 73 74 65 72 73 22 2c 20 |all regi|sters", |
|00002010| 22 62 6f 78 65 64 20 72 | 65 67 69 73 74 65 72 73 |"boxed r|egisters|
|00002020| 22 2c 20 22 62 6f 78 65 | 64 20 73 63 72 61 74 63 |", "boxe|d scratc|
|00002030| 68 20 72 65 67 69 73 74 | 65 72 73 22 2c 20 74 68 |h regist|ers", th|
|00002040| 69 73 20 64 6f 65 73 6e | 27 74 0a 65 78 69 73 74 |is doesn|'t.exist|
|00002050| 20 61 74 20 74 68 65 20 | 69 6d 70 6c 65 6d 65 6e | at the |implemen|
|00002060| 74 61 74 69 6f 6e 20 6c | 65 76 65 6c 2e 20 20 53 |tation l|evel. S|
|00002070| 75 63 68 20 74 68 69 6e | 67 73 20 63 61 6e 20 62 |uch thin|gs can b|
|00002080| 65 20 64 6f 6e 65 20 62 | 79 20 73 70 65 63 69 66 |e done b|y specif|
|00002090| 79 69 6e 67 0a 73 74 6f | 72 61 67 65 20 63 6c 61 |ying.sto|rage cla|
|000020a0| 73 73 65 73 20 77 68 6f | 73 65 20 6c 6f 63 61 74 |sses who|se locat|
|000020b0| 69 6f 6e 73 20 6f 76 65 | 72 6c 61 70 2e 20 20 41 |ions ove|rlap. A|
|000020c0| 20 54 4e 20 73 68 6f 75 | 6c 64 6e 27 74 20 68 61 | TN shou|ldn't ha|
|000020d0| 76 65 20 6c 6f 74 73 20 | 6f 66 0a 6f 76 65 72 6c |ve lots |of.overl|
|000020e0| 61 70 70 69 6e 67 20 53 | 43 27 73 20 61 73 20 6c |apping S|C's as l|
|000020f0| 65 67 61 6c 20 53 43 27 | 73 2c 20 73 69 6e 63 65 |egal SC'|s, since|
|00002100| 20 74 69 6d 65 20 77 6f | 75 6c 64 20 62 65 20 77 | time wo|uld be w|
|00002110| 61 73 74 65 64 20 72 65 | 70 65 61 74 65 64 6c 79 |asted re|peatedly|
|00002120| 0a 61 74 74 65 6d 70 74 | 69 6e 67 20 74 6f 20 70 |.attempt|ing to p|
|00002130| 61 63 6b 20 69 6e 20 74 | 68 65 20 73 61 6d 65 20 |ack in t|he same |
|00002140| 6c 6f 63 61 74 69 6f 6e | 73 2e 0a 0a 54 68 65 72 |location|s...Ther|
|00002150| 65 20 77 69 6c 6c 20 62 | 65 20 73 6f 6d 65 20 53 |e will b|e some S|
|00002160| 43 27 73 20 77 68 6f 73 | 65 20 6c 6f 63 61 74 69 |C's whos|e locati|
|00002170| 6f 6e 73 20 6f 76 65 72 | 6c 61 70 20 61 20 67 72 |ons over|lap a gr|
|00002180| 65 61 74 20 64 65 61 6c | 2c 20 73 69 6e 63 65 20 |eat deal|, since |
|00002190| 77 65 20 67 65 74 20 50 | 61 63 6b 0a 74 6f 20 64 |we get P|ack.to d|
|000021a0| 6f 20 6f 75 72 20 72 65 | 70 72 65 73 65 6e 74 61 |o our re|presenta|
|000021b0| 74 69 6f 6e 20 61 6e 61 | 6c 79 73 69 73 20 62 79 |tion ana|lysis by|
|000021c0| 20 68 61 76 69 6e 67 20 | 6c 6f 74 73 20 6f 66 20 | having |lots of |
|000021d0| 53 43 27 73 2e 20 20 41 | 20 53 43 20 69 73 20 62 |SC's. A| SC is b|
|000021e0| 61 73 69 63 61 6c 6c 79 | 20 61 0a 77 61 79 20 6f |asically| a.way o|
|000021f0| 66 20 6c 6f 6f 6b 69 6e | 67 20 61 74 20 61 20 73 |f lookin|g at a s|
|00002200| 74 6f 72 61 67 65 20 72 | 65 73 6f 75 72 63 65 2e |torage r|esource.|
|00002210| 20 20 41 6c 74 68 6f 75 | 67 68 20 77 65 20 63 6f | Althou|gh we co|
|00002220| 75 6c 64 20 6b 65 65 70 | 20 61 20 66 69 78 6e 75 |uld keep| a fixnu|
|00002230| 6d 20 61 6e 64 20 61 6e | 0a 75 6e 62 6f 78 65 64 |m and an|.unboxed|
|00002240| 20 72 65 70 72 65 73 65 | 6e 74 61 74 69 6f 6e 20 | represe|ntation |
|00002250| 6f 66 20 74 68 65 20 73 | 61 6d 65 20 6e 75 6d 62 |of the s|ame numb|
|00002260| 65 72 20 69 6e 20 74 68 | 65 20 73 61 6d 65 20 72 |er in th|e same r|
|00002270| 65 67 69 73 74 65 72 2c | 20 74 68 65 79 20 63 6f |egister,| they co|
|00002280| 72 72 65 73 70 6f 6e 64 | 0a 74 6f 20 64 69 66 66 |rrespond|.to diff|
|00002290| 65 72 65 6e 74 20 53 43 | 27 73 20 73 69 6e 63 65 |erent SC|'s since|
|000022a0| 20 74 68 65 79 20 61 72 | 65 20 64 69 66 66 65 72 | they ar|e differ|
|000022b0| 65 6e 74 20 72 65 70 72 | 65 73 65 6e 74 61 74 69 |ent repr|esentati|
|000022c0| 6f 6e 20 63 68 6f 69 63 | 65 73 2e 0a 0a 54 4e 73 |on choic|es...TNs|
|000022d0| 20 61 72 65 20 61 6e 6e | 6f 74 61 74 65 64 20 77 | are ann|otated w|
|000022e0| 69 74 68 20 74 68 65 20 | 70 72 69 6d 69 74 69 76 |ith the |primitiv|
|000022f0| 65 20 74 79 70 65 20 6f | 66 20 74 68 65 20 6f 62 |e type o|f the ob|
|00002300| 6a 65 63 74 20 74 68 61 | 74 20 74 68 65 79 20 68 |ject tha|t they h|
|00002310| 6f 6c 64 3a 0a 20 20 20 | 20 54 3a 20 72 61 6e 64 |old:. | T: rand|
|00002320| 6f 6d 20 62 6f 78 65 64 | 20 6f 62 6a 65 63 74 20 |om boxed| object |
|00002330| 77 69 74 68 20 6f 6e 6c | 79 20 6f 6e 65 20 72 65 |with onl|y one re|
|00002340| 70 72 65 73 65 6e 74 61 | 74 69 6f 6e 2e 0a 20 20 |presenta|tion.. |
|00002350| 20 20 46 69 78 6e 75 6d | 2c 20 49 6e 74 65 67 65 | Fixnum|, Intege|
|00002360| 72 2c 20 58 58 58 2d 46 | 6c 6f 61 74 3a 20 4f 62 |r, XXX-F|loat: Ob|
|00002370| 6a 65 63 74 20 69 73 20 | 61 6c 77 61 79 73 20 6f |ject is |always o|
|00002380| 66 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |f the sp|ecified |
|00002390| 6e 75 6d 65 72 69 63 20 | 74 79 70 65 2e 0a 20 20 |numeric |type.. |
|000023a0| 20 20 53 74 72 69 6e 67 | 2d 43 68 61 72 3a 20 4f | String|-Char: O|
|000023b0| 62 6a 65 63 74 20 69 73 | 20 61 6c 77 61 79 73 20 |bject is| always |
|000023c0| 61 20 73 74 72 69 6e 67 | 2d 63 68 61 72 2e 0a 0a |a string|-char...|
|000023d0| 57 68 65 6e 20 61 20 54 | 4e 20 69 73 20 70 61 63 |When a T|N is pac|
|000023e0| 6b 65 64 2c 20 69 74 20 | 69 73 20 61 6e 6e 6f 74 |ked, it |is annot|
|000023f0| 61 74 65 64 20 77 69 74 | 68 20 74 68 65 20 53 43 |ated wit|h the SC|
|00002400| 20 69 74 20 77 61 73 20 | 70 61 63 6b 65 64 20 69 | it was |packed i|
|00002410| 6e 74 6f 2e 20 20 54 68 | 65 20 63 6f 64 65 0a 67 |nto. Th|e code.g|
|00002420| 65 6e 65 72 61 74 6f 72 | 20 66 6f 72 20 61 20 56 |enerator| for a V|
|00002430| 4f 50 20 6d 75 73 74 20 | 62 65 20 61 62 6c 65 20 |OP must |be able |
|00002440| 74 6f 20 75 6e 69 71 75 | 65 6c 79 20 64 65 74 65 |to uniqu|ely dete|
|00002450| 72 6d 69 6e 65 20 74 68 | 65 20 72 65 70 72 65 73 |rmine th|e repres|
|00002460| 65 6e 74 61 74 69 6f 6e | 20 6f 66 0a 69 74 73 20 |entation| of.its |
|00002470| 6f 70 65 72 61 6e 64 73 | 20 66 72 6f 6d 20 74 68 |operands| from th|
|00002480| 65 20 53 43 2e 20 28 64 | 65 62 75 67 67 65 72 20 |e SC. (d|ebugger |
|00002490| 61 6c 73 6f 2e 2e 2e 29 | 0a 0a 53 6f 6d 65 20 53 |also...)|..Some S|
|000024a0| 43 73 3a 0a 20 20 20 20 | 52 65 67 3a 20 61 6e 79 |Cs:. |Reg: any|
|000024b0| 20 72 65 67 69 73 74 65 | 72 20 28 69 6d 6d 65 64 | registe|r (immed|
|000024c0| 69 61 74 65 20 6f 62 6a | 65 63 74 73 29 0a 20 20 |iate obj|ects). |
|000024d0| 20 20 53 61 76 65 2d 52 | 65 67 3a 20 61 20 62 6f | Save-R|eg: a bo|
|000024e0| 78 65 64 20 72 65 67 69 | 73 74 65 72 20 6e 65 61 |xed regi|ster nea|
|000024f0| 72 20 72 31 35 20 28 72 | 65 67 69 73 74 65 72 73 |r r15 (r|egisters|
|00002500| 20 65 61 73 69 6c 79 20 | 73 61 76 65 64 20 69 6e | easily |saved in|
|00002510| 20 61 20 63 61 6c 6c 29 | 0a 20 20 20 20 42 6f 78 | a call)|. Box|
|00002520| 65 64 2d 52 65 67 3a 20 | 61 6e 79 20 62 6f 78 65 |ed-Reg: |any boxe|
|00002530| 64 20 72 65 67 69 73 74 | 65 72 20 28 61 6e 79 20 |d regist|er (any |
|00002540| 62 6f 78 65 64 20 6f 62 | 6a 65 63 74 29 0a 20 20 |boxed ob|ject). |
|00002550| 20 20 55 6e 62 6f 78 65 | 64 2d 52 65 67 3a 20 61 | Unboxe|d-Reg: a|
|00002560| 6e 79 20 75 6e 62 6f 78 | 65 64 20 72 65 67 69 73 |ny unbox|ed regis|
|00002570| 74 65 72 20 28 61 6e 79 | 20 75 6e 62 6f 78 65 64 |ter (any| unboxed|
|00002580| 20 6f 62 6a 65 63 74 29 | 0a 20 20 20 20 46 6c 6f | object)|. Flo|
|00002590| 61 74 2d 52 65 67 2c 20 | 44 6f 75 62 6c 65 2d 46 |at-Reg, |Double-F|
|000025a0| 6c 6f 61 74 2d 52 65 67 | 3a 20 66 6c 6f 61 74 20 |loat-Reg|: float |
|000025b0| 69 6e 20 46 50 20 72 65 | 67 69 73 74 65 72 2e 0a |in FP re|gister..|
|000025c0| 20 20 20 20 53 74 61 63 | 6b 3a 20 62 6f 78 65 64 | Stac|k: boxed|
|000025d0| 20 6f 62 6a 65 63 74 20 | 6f 6e 20 74 68 65 20 73 | object |on the s|
|000025e0| 74 61 63 6b 20 28 6f 6e | 20 63 73 74 61 63 6b 29 |tack (on| cstack)|
|000025f0| 0a 20 20 20 20 57 6f 72 | 64 3a 20 61 6e 79 20 33 |. Wor|d: any 3|
|00002600| 32 62 69 74 20 75 6e 62 | 6f 78 65 64 20 6f 62 6a |2bit unb|oxed obj|
|00002610| 65 63 74 20 6f 6e 20 6e | 73 74 61 63 6b 2e 0a 20 |ect on n|stack.. |
|00002620| 20 20 20 44 6f 75 62 6c | 65 3a 20 61 6e 79 20 36 | Doubl|e: any 6|
|00002630| 34 62 69 74 20 75 6e 62 | 6f 78 65 64 20 6f 62 6a |4bit unb|oxed obj|
|00002640| 65 63 74 20 6f 6e 20 6e | 73 74 61 63 6b 2e 0a 0a |ect on n|stack...|
|00002650| 57 65 20 68 61 76 65 20 | 61 20 6e 75 6d 62 65 72 |We have |a number|
|00002660| 20 6f 66 20 6e 6f 6e 2d | 70 61 63 6b 65 64 20 73 | of non-|packed s|
|00002670| 74 6f 72 61 67 65 20 63 | 6c 61 73 73 65 73 20 77 |torage c|lasses w|
|00002680| 68 69 63 68 20 73 65 72 | 76 65 20 74 6f 20 72 65 |hich ser|ve to re|
|00002690| 70 72 65 73 65 6e 74 20 | 61 63 63 65 73 73 0a 63 |present |access.c|
|000026a0| 6f 73 74 73 20 61 73 73 | 6f 63 69 61 74 65 64 20 |osts ass|ociated |
|000026b0| 77 69 74 68 20 76 61 6c | 75 65 73 20 74 68 61 74 |with val|ues that|
|000026c0| 20 61 72 65 20 6e 6f 74 | 20 61 6c 6c 6f 63 61 74 | are not| allocat|
|000026d0| 65 64 20 75 73 69 6e 67 | 20 63 6f 6e 66 6c 69 63 |ed using| conflic|
|000026e0| 74 73 0a 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 2e 20 |ts.infor|mation. |
|000026f0| 20 4e 6f 6e 2d 70 61 63 | 6b 65 64 20 54 4e 73 20 | Non-pac|ked TNs |
|00002700| 61 70 70 65 61 72 20 74 | 6f 20 61 6c 72 65 61 64 |appear t|o alread|
|00002710| 79 20 62 65 20 70 61 63 | 6b 65 64 20 69 6e 20 74 |y be pac|ked in t|
|00002720| 68 65 20 61 70 70 72 6f | 70 72 69 61 74 65 0a 73 |he appro|priate.s|
|00002730| 74 6f 72 61 67 65 20 62 | 61 73 65 20 73 6f 20 74 |torage b|ase so t|
|00002740| 68 61 74 20 50 61 63 6b | 20 64 6f 65 73 6e 27 74 |hat Pack| doesn't|
|00002750| 20 67 65 74 20 63 6f 6e | 66 75 73 65 64 2e 20 20 | get con|fused. |
|00002760| 43 6f 73 74 73 20 66 6f | 72 20 72 65 6c 65 76 61 |Costs fo|r releva|
|00002770| 6e 74 20 6e 6f 6e 2d 70 | 61 63 6b 65 64 0a 53 43 |nt non-p|acked.SC|
|00002780| 27 73 20 61 70 70 65 61 | 72 20 69 6e 20 74 68 65 |'s appea|r in the|
|00002790| 20 54 4e 2d 52 65 66 20 | 63 6f 73 74 20 69 6e 66 | TN-Ref |cost inf|
|000027a0| 6f 72 6d 61 74 69 6f 6e | 2c 20 62 75 74 20 6e 65 |ormation|, but ne|
|000027b0| 65 64 20 6e 6f 74 20 65 | 76 65 72 20 62 65 20 73 |ed not e|ver be s|
|000027c0| 75 6d 6d 65 64 20 69 6e | 74 6f 0a 74 68 65 20 54 |ummed in|to.the T|
|000027d0| 4e 20 63 6f 73 74 20 76 | 65 63 74 6f 72 73 2c 20 |N cost v|ectors, |
|000027e0| 73 69 6e 63 65 20 54 4e | 73 20 63 61 6e 6e 6f 74 |since TN|s cannot|
|000027f0| 20 62 65 20 70 61 63 6b | 65 64 20 69 6e 74 6f 20 | be pack|ed into |
|00002800| 74 68 65 6d 2e 0a 0a 54 | 68 65 72 65 20 61 72 65 |them...T|here are|
|00002810| 20 53 43 73 20 66 6f 72 | 20 6e 6f 6e 2d 69 6d 6d | SCs for| non-imm|
|00002820| 65 64 69 61 74 65 20 63 | 6f 6e 73 74 61 6e 74 73 |ediate c|onstants|
|00002830| 20 61 6e 64 20 66 6f 72 | 20 65 61 63 68 20 73 69 | and for| each si|
|00002840| 67 6e 69 66 69 63 61 6e | 74 20 6b 69 6e 64 20 6f |gnifican|t kind o|
|00002850| 66 0a 69 6d 6d 65 64 69 | 61 74 65 20 6f 70 65 72 |f.immedi|ate oper|
|00002860| 61 6e 64 20 69 6e 20 74 | 68 65 20 61 72 63 68 69 |and in t|he archi|
|00002870| 74 65 63 74 75 72 65 2e | 20 20 4f 6e 20 74 68 65 |tecture.| On the|
|00002880| 20 52 54 2c 20 34 2c 20 | 38 20 61 6e 64 20 32 30 | RT, 4, |8 and 20|
|00002890| 20 62 69 74 20 69 6e 74 | 65 67 65 72 20 53 43 73 | bit int|eger SCs|
|000028a0| 0a 61 72 65 20 70 72 6f | 62 61 62 6c 79 20 77 6f |.are pro|bably wo|
|000028b0| 72 74 68 20 68 61 76 69 | 6e 67 2e 0a 0a 4e 6f 6e |rth havi|ng...Non|
|000028c0| 2d 70 61 63 6b 65 64 20 | 53 43 73 3a 0a 20 20 20 |-packed |SCs:. |
|000028d0| 20 43 6f 6e 73 74 61 6e | 74 0a 20 20 20 20 49 6d | Constan|t. Im|
|000028e0| 6d 65 64 69 61 74 65 20 | 63 6f 6e 73 74 61 6e 74 |mediate |constant|
|000028f0| 20 53 43 73 3a 0a 20 20 | 20 20 20 20 20 20 53 69 | SCs:. | Si|
|00002900| 67 6e 65 64 2d 42 79 74 | 65 2d 3c 4e 3e 2c 20 55 |gned-Byt|e-<N>, U|
|00002910| 6e 73 69 67 6e 65 64 2d | 42 79 74 65 2d 3c 4e 3e |nsigned-|Byte-<N>|
|00002920| 2c 20 66 6f 72 20 76 61 | 72 69 6f 75 73 20 61 72 |, for va|rious ar|
|00002930| 63 68 69 74 65 63 74 75 | 72 65 20 64 65 70 65 6e |chitectu|re depen|
|00002940| 64 65 6e 74 0a 09 20 20 | 20 20 76 61 6c 75 65 73 |dent.. | values|
|00002950| 20 6f 66 20 3c 4e 3e 0a | 09 53 74 72 69 6e 67 2d | of <N>.|.String-|
|00002960| 43 68 61 72 0a 09 58 58 | 58 2d 46 6c 6f 61 74 0a |Char..XX|X-Float.|
|00002970| 09 4d 61 67 69 63 20 76 | 61 6c 75 65 73 3a 20 54 |.Magic v|alues: T|
|00002980| 2c 20 4e 49 4c 2c 20 30 | 2e 0a 0a 0c 0a 5c 63 68 |, NIL, 0|.....\ch|
|00002990| 61 70 74 65 72 7b 54 79 | 70 65 20 73 79 73 74 65 |apter{Ty|pe syste|
|000029a0| 6d 20 70 61 72 61 6d 65 | 74 65 72 69 7a 61 74 69 |m parame|terizati|
|000029b0| 6f 6e 7d 0a 0a 54 68 65 | 20 6d 61 69 6e 20 61 73 |on}..The| main as|
|000029c0| 70 65 63 74 20 6f 66 20 | 74 68 65 20 56 4d 20 74 |pect of |the VM t|
|000029d0| 68 61 74 20 69 73 20 6c | 69 6b 65 6c 79 20 74 6f |hat is l|ikely to|
|000029e0| 20 76 61 72 79 20 66 6f | 72 20 67 6f 6f 64 20 72 | vary fo|r good r|
|000029f0| 65 61 73 6f 6e 20 69 73 | 20 74 68 65 20 74 79 70 |eason is| the typ|
|00002a00| 65 0a 73 79 73 74 65 6d | 3a 0a 0a 20 2d 2d 20 44 |e.system|:.. -- D|
|00002a10| 69 66 66 65 72 65 6e 74 | 20 73 79 73 74 65 6d 73 |ifferent| systems|
|00002a20| 20 77 69 6c 6c 20 68 61 | 76 65 20 64 69 66 66 65 | will ha|ve diffe|
|00002a30| 72 65 6e 74 20 77 61 79 | 73 20 6f 66 20 72 65 70 |rent way|s of rep|
|00002a40| 72 65 73 65 6e 74 69 6e | 67 20 64 79 6e 61 6d 69 |resentin|g dynami|
|00002a50| 63 20 74 79 70 65 0a 20 | 20 20 20 69 6e 66 6f 72 |c type. | infor|
|00002a60| 6d 61 74 69 6f 6e 2e 20 | 20 54 68 65 20 70 72 69 |mation. | The pri|
|00002a70| 6d 61 72 79 20 65 66 66 | 65 63 74 20 74 68 69 73 |mary eff|ect this|
|00002a80| 20 68 61 73 20 6f 6e 20 | 74 68 65 20 63 6f 6d 70 | has on |the comp|
|00002a90| 69 6c 65 72 20 69 73 20 | 63 61 75 73 69 6e 67 20 |iler is |causing |
|00002aa0| 56 4d 52 0a 20 20 20 20 | 63 6f 6e 76 65 72 73 69 |VMR. |conversi|
|00002ab0| 6f 6e 20 6f 66 20 74 79 | 70 65 20 74 65 73 74 73 |on of ty|pe tests|
|00002ac0| 20 61 6e 64 20 63 68 65 | 63 6b 73 20 74 6f 20 62 | and che|cks to b|
|00002ad0| 65 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |e implem|entation|
|00002ae0| 20 64 65 70 65 6e 64 65 | 6e 74 2e 0a 20 20 20 20 | depende|nt.. |
|00002af0| 52 65 77 72 69 74 69 6e | 67 20 74 68 69 73 20 63 |Rewritin|g this c|
|00002b00| 6f 64 65 20 66 6f 72 20 | 65 61 63 68 20 69 6d 70 |ode for |each imp|
|00002b10| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 73 68 6f 75 |lementat|ion shou|
|00002b20| 6c 64 6e 27 74 20 62 65 | 20 61 20 62 69 67 20 70 |ldn't be| a big p|
|00002b30| 72 6f 62 6c 65 6d 2c 0a | 20 20 20 20 73 69 6e 63 |roblem,.| sinc|
|00002b40| 65 20 74 68 65 20 70 6f | 72 74 61 62 6c 65 20 73 |e the po|rtable s|
|00002b50| 65 6d 61 6e 74 69 63 73 | 20 6f 66 20 74 79 70 65 |emantics| of type|
|00002b60| 73 20 68 61 73 20 61 6c | 72 65 61 64 79 20 62 65 |s has al|ready be|
|00002b70| 65 6e 20 64 65 61 6c 74 | 20 77 69 74 68 2e 0a 0a |en dealt| with...|
|00002b80| 20 2d 2d 20 44 69 66 66 | 65 72 65 6e 74 20 73 79 | -- Diff|erent sy|
|00002b90| 73 74 65 6d 73 20 77 69 | 6c 6c 20 68 61 76 65 20 |stems wi|ll have |
|00002ba0| 64 69 66 66 65 72 65 6e | 74 20 73 70 65 63 69 61 |differen|t specia|
|00002bb0| 6c 69 7a 65 64 20 6e 75 | 6d 62 65 72 20 61 6e 64 |lized nu|mber and|
|00002bc0| 20 61 72 72 61 79 20 74 | 79 70 65 73 2c 0a 20 20 | array t|ypes,. |
|00002bd0| 20 20 61 6e 64 20 64 69 | 66 66 65 72 65 6e 74 20 | and di|fferent |
|00002be0| 56 4f 50 73 20 73 70 65 | 63 69 61 6c 69 7a 65 64 |VOPs spe|cialized|
|00002bf0| 20 66 6f 72 20 74 68 65 | 73 65 20 74 79 70 65 73 | for the|se types|
|00002c00| 2e 20 20 49 74 20 69 73 | 20 65 61 73 79 20 61 64 |. It is| easy ad|
|00002c10| 64 20 74 68 69 73 20 6b | 69 6e 64 0a 20 20 20 20 |d this k|ind. |
|00002c20| 6f 66 20 6b 6e 6f 77 6c | 65 64 67 65 20 77 69 74 |of knowl|edge wit|
|00002c30| 68 6f 75 74 20 61 66 66 | 65 63 74 69 6e 67 20 74 |hout aff|ecting t|
|00002c40| 68 65 20 72 65 73 74 20 | 6f 66 20 74 68 65 20 63 |he rest |of the c|
|00002c50| 6f 6d 70 69 6c 65 72 2e | 20 20 41 6c 6c 20 79 6f |ompiler.| All yo|
|00002c60| 75 20 68 61 76 65 20 74 | 6f 0a 20 20 20 20 64 6f |u have t|o. do|
|00002c70| 20 69 73 20 64 65 66 69 | 6e 65 20 74 68 65 20 56 | is defi|ne the V|
|00002c80| 4f 50 73 20 61 6e 64 20 | 74 72 61 6e 73 6c 61 74 |OPs and |translat|
|00002c90| 69 6f 6e 73 2e 0a 0a 20 | 2d 2d 20 44 69 66 66 65 |ions... |-- Diffe|
|00002ca0| 72 65 6e 74 20 73 79 73 | 74 65 6d 73 20 77 69 6c |rent sys|tems wil|
|00002cb0| 6c 20 6f 66 66 65 72 20 | 64 69 66 66 65 72 65 6e |l offer |differen|
|00002cc0| 74 20 73 70 65 63 69 61 | 6c 69 7a 65 64 20 73 74 |t specia|lized st|
|00002cd0| 6f 72 61 67 65 20 72 65 | 73 6f 75 72 63 65 73 0a |orage re|sources.|
|00002ce0| 20 20 20 20 73 75 63 68 | 20 61 73 20 66 6c 6f 61 | such| as floa|
|00002cf0| 74 69 6e 67 2d 70 6f 69 | 6e 74 20 72 65 67 69 73 |ting-poi|nt regis|
|00002d00| 74 65 72 73 2c 20 61 6e | 64 20 77 69 6c 6c 20 68 |ters, an|d will h|
|00002d10| 61 76 65 20 61 64 64 69 | 74 69 6f 6e 61 6c 20 6b |ave addi|tional k|
|00002d20| 69 6e 64 73 20 6f 66 0a | 20 20 20 20 70 72 69 6d |inds of.| prim|
|00002d30| 69 74 69 76 65 2d 74 79 | 70 65 73 2e 20 20 54 68 |itive-ty|pes. Th|
|00002d40| 65 20 73 74 6f 72 61 67 | 65 20 63 6c 61 73 73 20 |e storag|e class |
|00002d50| 6d 65 63 68 61 6e 69 73 | 6d 20 68 61 6e 64 6c 65 |mechanis|m handle|
|00002d60| 73 20 61 20 6c 61 72 67 | 65 20 70 61 72 74 20 6f |s a larg|e part o|
|00002d70| 66 20 74 68 69 73 2c 0a | 20 20 20 20 62 75 74 20 |f this,.| but |
|00002d80| 74 68 65 72 65 20 6d 61 | 79 20 62 65 20 73 6f 6d |there ma|y be som|
|00002d90| 65 20 70 72 6f 62 6c 65 | 6d 20 69 6e 20 67 65 74 |e proble|m in get|
|00002da0| 74 69 6e 67 20 56 4d 52 | 20 63 6f 6e 76 65 72 73 |ting VMR| convers|
|00002db0| 69 6f 6e 20 74 6f 20 72 | 65 61 6c 69 7a 65 20 74 |ion to r|ealize t|
|00002dc0| 68 65 0a 20 20 20 20 70 | 6f 73 73 69 62 6c 79 20 |he. p|ossibly |
|00002dd0| 6c 61 72 67 65 20 68 69 | 64 64 65 6e 20 63 6f 73 |large hi|dden cos|
|00002de0| 74 73 20 69 6e 20 69 6d | 70 6c 69 63 69 74 20 6d |ts in im|plicit m|
|00002df0| 6f 76 65 73 20 74 6f 20 | 61 6e 64 20 66 72 6f 6d |oves to |and from|
|00002e00| 20 74 68 65 73 65 20 73 | 70 65 63 69 61 6c 69 7a | these s|pecializ|
|00002e10| 65 64 0a 20 20 20 20 73 | 74 6f 72 61 67 65 20 72 |ed. s|torage r|
|00002e20| 65 73 6f 75 72 63 65 73 | 2e 20 20 50 72 6f 62 61 |esources|. Proba|
|00002e30| 62 6c 79 20 74 68 65 20 | 61 6e 73 77 65 72 20 69 |bly the |answer i|
|00002e40| 73 20 74 6f 20 68 61 76 | 65 20 73 6f 6d 65 20 73 |s to hav|e some s|
|00002e50| 6f 72 74 20 6f 66 20 67 | 65 6e 65 72 61 6c 0a 20 |ort of g|eneral. |
|00002e60| 20 20 20 6d 65 63 68 61 | 6e 69 73 6d 20 66 6f 72 | mecha|nism for|
|00002e70| 20 64 65 74 65 72 6d 69 | 6e 69 6e 67 20 74 68 65 | determi|ning the|
|00002e80| 20 70 72 69 6d 69 74 69 | 76 65 2d 74 79 70 65 20 | primiti|ve-type |
|00002e90| 66 6f 72 20 61 20 54 4e | 20 67 69 76 65 6e 20 74 |for a TN| given t|
|00002ea0| 68 65 20 4c 69 73 70 20 | 74 79 70 65 2c 0a 20 20 |he Lisp |type,. |
|00002eb0| 20 20 61 6e 64 20 74 68 | 65 6e 20 74 6f 20 68 61 | and th|en to ha|
|00002ec0| 76 65 20 73 6f 6d 65 20 | 73 6f 72 74 20 6f 66 20 |ve some |sort of |
|00002ed0| 6d 65 63 68 61 6e 69 73 | 6d 20 66 6f 72 20 61 75 |mechanis|m for au|
|00002ee0| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 75 73 69 6e |tomatica|lly usin|
|00002ef0| 67 20 73 70 65 63 69 61 | 6c 69 7a 65 64 0a 20 20 |g specia|lized. |
|00002f00| 20 20 4d 6f 76 65 20 56 | 4f 50 73 20 77 68 65 6e | Move V|OPs when|
|00002f10| 20 74 68 65 20 73 6f 75 | 72 63 65 20 6f 72 20 64 | the sou|rce or d|
|00002f20| 65 73 74 69 6e 61 74 69 | 6f 6e 20 68 61 73 20 73 |estinati|on has s|
|00002f30| 6f 6d 65 20 70 61 72 74 | 69 63 75 6c 61 72 20 70 |ome part|icular p|
|00002f40| 72 69 6d 69 74 69 76 65 | 2d 74 79 70 65 2e 0a 0a |rimitive|-type...|
|00002f50| 5c 23 7c 0a 48 6f 77 20 | 74 6f 20 64 65 61 6c 20 |\#|.How |to deal |
|00002f60| 77 69 74 68 20 6c 69 73 | 74 2f 6e 75 6c 6c 28 73 |with lis|t/null(s|
|00002f70| 79 6d 62 6f 6c 29 2f 63 | 6f 6e 73 20 69 6e 20 70 |ymbol)/c|ons in p|
|00002f80| 72 69 6d 69 74 69 76 65 | 2d 74 79 70 65 20 73 74 |rimitive|-type st|
|00002f90| 72 75 63 74 75 72 65 3f | 20 20 53 69 6e 63 65 0a |ructure?| Since.|
|00002fa0| 63 6f 6e 73 20 61 6e 64 | 20 73 79 6d 62 6f 6c 20 |cons and| symbol |
|00002fb0| 61 72 65 6e 27 74 20 75 | 73 65 64 20 66 6f 72 20 |aren't u|sed for |
|00002fc0| 74 79 70 65 2d 73 70 65 | 63 69 66 69 63 20 74 65 |type-spe|cific te|
|00002fd0| 6d 70 6c 61 74 65 20 73 | 65 6c 65 63 74 69 6f 6e |mplate s|election|
|00002fe0| 2c 20 69 74 20 69 73 6e | 27 74 0a 72 65 61 6c 6c |, it isn|'t.reall|
|00002ff0| 79 20 61 6c 6c 20 74 68 | 61 74 20 63 72 69 74 69 |y all th|at criti|
|00003000| 63 61 6c 2e 20 20 50 72 | 6f 62 61 62 6c 79 20 50 |cal. Pr|obably P|
|00003010| 72 69 6d 69 74 69 76 65 | 2d 54 79 70 65 20 73 68 |rimitive|-Type sh|
|00003020| 6f 75 6c 64 20 72 65 74 | 75 72 6e 20 74 68 65 20 |ould ret|urn the |
|00003030| 4c 69 73 74 0a 70 72 69 | 6d 69 74 69 76 65 20 74 |List.pri|mitive t|
|00003040| 79 70 65 20 66 6f 72 20 | 61 6c 6c 20 6f 66 20 43 |ype for |all of C|
|00003050| 6f 6e 73 2c 20 4c 69 73 | 74 20 61 6e 64 20 4e 75 |ons, Lis|t and Nu|
|00003060| 6c 6c 20 28 69 6e 64 69 | 63 61 74 69 6e 67 20 77 |ll (indi|cating w|
|00003070| 68 65 6e 20 69 74 20 69 | 73 20 65 78 61 63 74 29 |hen it i|s exact)|
|00003080| 2e 0a 54 68 69 73 20 77 | 6f 75 6c 64 20 61 6c 6c |..This w|ould all|
|00003090| 6f 77 20 74 79 70 65 2d | 64 69 73 70 61 74 63 68 |ow type-|dispatch|
|000030a0| 20 66 6f 72 20 73 69 6d | 70 6c 65 20 73 65 71 75 | for sim|ple sequ|
|000030b0| 65 6e 63 65 20 66 75 6e | 63 74 69 6f 6e 73 20 28 |ence fun|ctions (|
|000030c0| 73 75 63 68 20 61 73 20 | 6c 65 6e 67 74 68 29 0a |such as |length).|
|000030d0| 74 6f 20 62 65 20 64 6f | 6e 65 20 75 73 69 6e 67 |to be do|ne using|
|000030e0| 20 74 68 65 20 73 74 61 | 6e 64 61 72 64 20 74 65 | the sta|ndard te|
|000030f0| 6d 70 6c 61 74 65 2d 73 | 65 6c 65 63 74 69 6f 6e |mplate-s|election|
|00003100| 20 6d 65 63 68 61 6e 69 | 73 6d 2e 20 20 5b 4e 6f | mechani|sm. [No|
|00003110| 74 20 61 20 77 69 72 65 | 64 0a 61 73 73 75 6d 70 |t a wire|d.assump|
|00003120| 74 69 6f 6e 5d 20 0a 7c | 5c 23 0a 0a 0a 0c 0a 5c |tion] .||\#.....\|
|00003130| 63 68 61 70 74 65 72 7b | 56 4f 50 20 44 65 66 69 |chapter{|VOP Defi|
|00003140| 6e 69 74 69 6f 6e 7d 0a | 0a 42 65 66 6f 72 65 20 |nition}.|.Before |
|00003150| 74 68 65 20 6f 70 65 72 | 61 6e 64 20 54 4e 2d 72 |the oper|and TN-r|
|00003160| 65 66 73 20 61 72 65 20 | 70 61 73 73 65 64 20 74 |efs are |passed t|
|00003170| 6f 20 74 68 65 20 65 6d | 69 74 20 66 75 6e 63 74 |o the em|it funct|
|00003180| 69 6f 6e 2c 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |ion, the| followi|
|00003190| 6e 67 0a 73 74 75 66 66 | 20 69 73 20 64 6f 6e 65 |ng.stuff| is done|
|000031a0| 3a 0a 20 2d 2d 20 54 68 | 65 20 72 65 66 73 20 69 |:. -- Th|e refs i|
|000031b0| 6e 20 74 68 65 20 6f 70 | 65 72 61 6e 64 20 61 6e |n the op|erand an|
|000031c0| 64 20 72 65 73 75 6c 74 | 20 6c 69 73 74 73 20 61 |d result| lists a|
|000031d0| 72 65 20 6c 69 6e 6b 65 | 64 20 74 6f 67 65 74 68 |re linke|d togeth|
|000031e0| 65 72 20 69 6e 20 6f 72 | 64 65 72 20 75 73 69 6e |er in or|der usin|
|000031f0| 67 0a 20 20 20 20 74 68 | 65 20 41 63 72 6f 73 73 |g. th|e Across|
|00003200| 20 73 6c 6f 74 2e 20 20 | 54 68 69 73 20 6c 69 73 | slot. |This lis|
|00003210| 74 20 69 73 20 70 72 6f | 70 65 72 6c 79 20 4e 49 |t is pro|perly NI|
|00003220| 4c 20 74 65 72 6d 69 6e | 61 74 65 64 2e 0a 20 2d |L termin|ated.. -|
|00003230| 2d 20 54 68 65 20 54 4e | 20 73 6c 6f 74 20 69 6e |- The TN| slot in|
|00003240| 20 65 61 63 68 20 72 65 | 66 20 69 73 20 73 65 74 | each re|f is set|
|00003250| 2c 20 61 6e 64 20 74 68 | 65 20 72 65 66 20 69 73 |, and th|e ref is|
|00003260| 20 6c 69 6e 6b 65 64 20 | 69 6e 74 6f 20 74 68 61 | linked |into tha|
|00003270| 74 20 54 4e 27 73 20 72 | 65 66 73 0a 20 20 20 20 |t TN's r|efs. |
|00003280| 75 73 69 6e 67 20 74 68 | 65 20 4e 65 78 74 20 73 |using th|e Next s|
|00003290| 6c 6f 74 2e 0a 20 2d 2d | 20 54 68 65 20 57 72 69 |lot.. --| The Wri|
|000032a0| 74 65 2d 50 20 73 6c 6f | 74 20 69 73 20 73 65 74 |te-P slo|t is set|
|000032b0| 20 64 65 70 65 6e 64 69 | 6e 67 20 6f 6e 20 77 68 | dependi|ng on wh|
|000032c0| 65 74 68 65 72 20 74 68 | 65 20 72 65 66 20 69 73 |ether th|e ref is|
|000032d0| 20 61 6e 20 61 72 67 75 | 6d 65 6e 74 20 6f 72 0a | an argu|ment or.|
|000032e0| 20 20 20 20 72 65 73 75 | 6c 74 2e 0a 20 2d 2d 20 | resu|lt.. -- |
|000032f0| 54 68 65 20 6f 74 68 65 | 72 20 73 6c 6f 74 73 20 |The othe|r slots |
|00003300| 68 61 76 65 20 74 68 65 | 20 64 65 66 61 75 6c 74 |have the| default|
|00003310| 20 76 61 6c 75 65 73 2e | 0a 0a 54 68 65 20 74 65 | values.|..The te|
|00003320| 6d 70 6c 61 74 65 20 65 | 6d 69 74 20 66 75 6e 63 |mplate e|mit func|
|00003330| 74 69 6f 6e 20 66 69 6c | 6c 73 20 69 6e 20 74 68 |tion fil|ls in th|
|00003340| 65 20 56 6f 70 2c 20 43 | 6f 73 74 73 2c 20 43 6f |e Vop, C|osts, Co|
|00003350| 73 74 2d 46 75 6e 63 74 | 69 6f 6e 2c 0a 53 43 2d |st-Funct|ion,.SC-|
|00003360| 52 65 73 74 72 69 63 74 | 69 6f 6e 20 61 6e 64 20 |Restrict|ion and |
|00003370| 50 72 65 66 65 72 65 6e | 63 65 20 73 6c 6f 74 73 |Preferen|ce slots|
|00003380| 2c 20 61 6e 64 20 6c 69 | 6e 6b 73 20 74 6f 67 65 |, and li|nks toge|
|00003390| 74 68 65 72 20 74 68 65 | 20 4e 65 78 74 2d 52 65 |ther the| Next-Re|
|000033a0| 66 20 63 68 61 69 6e 20 | 61 73 0a 61 70 70 72 6f |f chain |as.appro|
|000033b0| 70 72 69 61 74 65 2e 0a | 0a 0c 0a 5c 73 65 63 74 |priate..|...\sect|
|000033c0| 69 6f 6e 7b 4c 69 66 65 | 74 69 6d 65 20 6d 6f 64 |ion{Life|time mod|
|000033d0| 65 6c 7d 0a 0a 5c 23 7c | 0a 4e 6f 74 65 20 69 6e |el}..\#||.Note in|
|000033e0| 20 64 6f 63 20 74 68 61 | 74 20 74 68 65 20 73 61 | doc tha|t the sa|
|000033f0| 6d 65 20 54 4e 20 6d 61 | 79 20 6e 6f 74 20 62 65 |me TN ma|y not be|
|00003400| 20 75 73 65 64 20 61 73 | 20 62 6f 74 68 20 61 20 | used as| both a |
|00003410| 6d 6f 72 65 20 6f 70 65 | 72 61 6e 64 20 61 6e 64 |more ope|rand and|
|00003420| 20 61 73 20 61 6e 79 0a | 6f 74 68 65 72 20 6f 70 | as any.|other op|
|00003430| 65 72 61 6e 64 20 74 6f | 20 74 68 65 20 73 61 6d |erand to| the sam|
|00003440| 65 20 56 4f 50 2c 20 74 | 6f 20 73 69 6d 70 6c 69 |e VOP, t|o simpli|
|00003450| 66 79 20 6d 6f 72 65 20 | 6f 70 65 72 61 6e 64 20 |fy more |operand |
|00003460| 4c 54 4e 20 6e 75 6d 62 | 65 72 20 63 6f 61 6c 65 |LTN numb|er coale|
|00003470| 73 63 69 6e 67 2e 0a 7c | 5c 23 0a 0a 49 74 20 73 |scing..||\#..It s|
|00003480| 65 65 6d 73 20 77 65 20 | 6e 65 65 64 20 61 20 66 |eems we |need a f|
|00003490| 61 69 72 6c 79 20 65 6c | 61 62 6f 72 61 74 65 20 |airly el|aborate |
|000034a0| 6d 6f 64 65 6c 20 66 6f | 72 20 69 6e 74 72 61 2d |model fo|r intra-|
|000034b0| 56 4f 50 20 63 6f 6e 66 | 6c 69 63 74 73 20 69 6e |VOP conf|licts in|
|000034c0| 20 6f 72 64 65 72 20 74 | 6f 0a 61 6c 6c 6f 63 61 | order t|o.alloca|
|000034d0| 74 65 20 74 65 6d 70 6f | 72 61 72 69 65 73 20 77 |te tempo|raries w|
|000034e0| 69 74 68 6f 75 74 20 69 | 6e 74 72 6f 64 75 63 69 |ithout i|ntroduci|
|000034f0| 6e 67 20 73 70 75 72 69 | 6f 75 73 20 63 6f 6e 66 |ng spuri|ous conf|
|00003500| 6c 69 63 74 73 2e 20 20 | 43 6f 6e 73 69 64 65 72 |licts. |Consider|
|00003510| 20 74 68 65 0a 69 6d 70 | 6f 72 74 61 6e 74 20 63 | the.imp|ortant c|
|00003520| 61 73 65 20 6f 66 20 61 | 20 56 4f 50 20 73 75 63 |ase of a| VOP suc|
|00003530| 68 20 61 73 20 61 20 6d | 69 73 63 6f 70 20 74 68 |h as a m|iscop th|
|00003540| 61 74 20 6d 75 73 74 20 | 68 61 76 65 20 6f 70 65 |at must |have ope|
|00003550| 72 61 6e 64 73 20 69 6e | 20 63 65 72 74 61 69 6e |rands in| certain|
|00003560| 0a 72 65 67 69 73 74 65 | 72 73 2e 20 20 57 65 20 |.registe|rs. We |
|00003570| 61 6c 6c 6f 63 61 74 65 | 20 61 20 77 69 72 65 64 |allocate| a wired|
|00003580| 20 74 65 6d 70 6f 72 61 | 72 79 2c 20 63 72 65 61 | tempora|ry, crea|
|00003590| 74 65 20 61 20 6c 6f 63 | 61 6c 20 70 72 65 66 65 |te a loc|al prefe|
|000035a0| 72 65 6e 63 65 20 66 6f | 72 20 74 68 65 0a 63 6f |rence fo|r the.co|
|000035b0| 72 72 65 73 70 6f 6e 64 | 69 6e 67 20 6f 70 65 72 |rrespond|ing oper|
|000035c0| 61 6e 64 2c 20 61 6e 64 | 20 6d 6f 76 65 20 74 6f |and, and| move to|
|000035d0| 20 28 6f 72 20 66 72 6f | 6d 29 20 74 68 65 20 74 | (or fro|m) the t|
|000035e0| 65 6d 70 6f 72 61 72 79 | 2e 20 20 49 66 20 61 6c |emporary|. If al|
|000035f0| 6c 20 74 65 6d 70 6f 72 | 61 72 69 65 73 0a 63 6f |l tempor|aries.co|
|00003600| 6e 66 6c 69 63 74 20 77 | 69 74 68 20 61 6c 6c 20 |nflict w|ith all |
|00003610| 61 72 67 75 6d 65 6e 74 | 73 2c 20 74 68 65 20 72 |argument|s, the r|
|00003620| 65 73 75 6c 74 20 77 69 | 6c 6c 20 62 65 20 63 6f |esult wi|ll be co|
|00003630| 72 72 65 63 74 2c 20 62 | 75 74 20 61 72 67 75 6d |rrect, b|ut argum|
|00003640| 65 6e 74 73 20 63 6f 75 | 6c 64 0a 6e 65 76 65 72 |ents cou|ld.never|
|00003650| 20 62 65 20 70 61 63 6b | 65 64 20 69 6e 20 74 68 | be pack|ed in th|
|00003660| 65 20 61 63 74 75 61 6c | 20 70 61 73 73 69 6e 67 |e actual| passing|
|00003670| 20 72 65 67 69 73 74 65 | 72 2e 20 20 49 66 20 74 | registe|r. If t|
|00003680| 65 6d 70 6f 72 61 72 69 | 65 73 20 64 69 64 6e 27 |emporari|es didn'|
|00003690| 74 20 63 6f 6e 66 6c 69 | 63 74 0a 77 69 74 68 20 |t confli|ct.with |
|000036a0| 61 6e 79 20 61 72 67 75 | 6d 65 6e 74 73 2c 20 74 |any argu|ments, t|
|000036b0| 68 65 6e 20 74 68 65 20 | 74 65 6d 70 6f 72 61 72 |hen the |temporar|
|000036c0| 79 20 66 6f 72 20 61 6e | 20 65 61 72 6c 69 65 72 |y for an| earlier|
|000036d0| 20 61 72 67 75 6d 65 6e | 74 20 6d 69 67 68 74 20 | argumen|t might |
|000036e0| 67 65 74 20 70 61 63 6b | 65 64 0a 69 6e 20 74 68 |get pack|ed.in th|
|000036f0| 65 20 73 61 6d 65 20 6c | 6f 63 61 74 69 6f 6e 20 |e same l|ocation |
|00003700| 61 73 20 74 68 65 20 6f | 70 65 72 61 6e 64 20 66 |as the o|perand f|
|00003710| 6f 72 20 61 20 6c 61 74 | 65 72 20 61 72 67 75 6d |or a lat|er argum|
|00003720| 65 6e 74 3b 20 6c 6f 61 | 64 69 6e 67 20 77 6f 75 |ent; loa|ding wou|
|00003730| 6c 64 20 74 68 65 6e 0a | 64 65 73 74 72 6f 79 20 |ld then.|destroy |
|00003740| 61 6e 20 61 72 67 75 6d | 65 6e 74 20 62 65 66 6f |an argum|ent befo|
|00003750| 72 65 20 69 74 20 77 61 | 73 20 72 65 61 64 2e 0a |re it wa|s read..|
|00003760| 0a 41 20 74 65 6d 70 6f | 72 61 72 79 27 73 20 69 |.A tempo|rary's i|
|00003770| 6e 74 72 61 2d 56 4f 50 | 20 6c 69 66 65 74 69 6d |ntra-VOP| lifetim|
|00003780| 65 20 69 73 20 72 65 70 | 72 65 73 65 6e 74 65 64 |e is rep|resented|
|00003790| 20 62 79 20 74 68 65 20 | 74 69 6d 65 73 20 61 74 | by the |times at|
|000037a0| 20 77 68 69 63 68 20 69 | 74 73 20 6c 69 66 65 0a | which i|ts life.|
|000037b0| 73 74 61 72 74 73 20 61 | 6e 64 20 65 6e 64 73 2e |starts a|nd ends.|
|000037c0| 20 20 54 68 65 72 65 20 | 61 72 65 20 76 61 72 69 | There |are vari|
|000037d0| 6f 75 73 20 69 6e 73 74 | 61 6e 74 73 20 64 75 72 |ous inst|ants dur|
|000037e0| 69 6e 67 20 74 68 65 20 | 65 76 61 6c 75 61 74 69 |ing the |evaluati|
|000037f0| 6f 6e 20 74 68 61 74 20 | 73 74 61 72 74 0a 61 6e |on that |start.an|
|00003800| 64 20 65 6e 64 20 56 4f | 50 20 6c 69 66 65 74 69 |d end VO|P lifeti|
|00003810| 6d 65 73 2e 20 20 54 77 | 6f 20 54 4e 73 20 63 6f |mes. Tw|o TNs co|
|00003820| 6e 66 6c 69 63 74 20 69 | 66 20 74 68 65 20 6c 69 |nflict i|f the li|
|00003830| 76 65 20 69 6e 74 65 72 | 76 61 6c 73 20 6f 76 65 |ve inter|vals ove|
|00003840| 72 6c 61 70 2e 0a 4c 69 | 66 65 74 69 6d 65 73 20 |rlap..Li|fetimes |
|00003850| 61 72 65 20 6f 70 65 6e | 20 69 6e 74 65 72 76 61 |are open| interva|
|00003860| 6c 73 3a 20 69 66 20 6f | 6e 65 20 54 4e 27 73 20 |ls: if o|ne TN's |
|00003870| 6c 69 66 65 74 69 6d 65 | 20 62 65 67 69 6e 73 20 |lifetime| begins |
|00003880| 61 74 20 61 20 70 6f 69 | 6e 74 20 77 68 65 72 65 |at a poi|nt where|
|00003890| 0a 61 6e 6f 74 68 65 72 | 27 73 20 65 6e 64 73 2c |.another|'s ends,|
|000038a0| 20 74 68 65 6e 20 74 68 | 65 20 54 4e 73 20 64 6f | then th|e TNs do|
|000038b0| 6e 27 74 20 63 6f 6e 66 | 6c 69 63 74 2e 0a 0a 54 |n't conf|lict...T|
|000038c0| 68 65 20 74 69 6d 65 73 | 20 77 69 74 68 69 6e 20 |he times| within |
|000038d0| 61 20 56 4f 50 20 61 72 | 65 20 74 68 65 20 66 6f |a VOP ar|e the fo|
|000038e0| 6c 6c 6f 77 69 6e 67 3a | 0a 0a 3a 4c 6f 61 64 0a |llowing:|..:Load.|
|000038f0| 20 20 20 20 54 68 69 73 | 20 69 73 20 74 68 65 20 | This| is the |
|00003900| 62 65 67 69 6e 6e 69 6e | 67 20 6f 66 20 74 68 65 |beginnin|g of the|
|00003910| 20 61 72 67 75 6d 65 6e | 74 27 73 20 6c 69 76 65 | argumen|t's live|
|00003920| 73 2c 20 61 73 20 66 61 | 72 20 61 73 20 69 6e 74 |s, as fa|r as int|
|00003930| 72 61 2d 76 6f 70 0a 20 | 20 20 20 63 6f 6e 66 6c |ra-vop. | confl|
|00003940| 69 63 74 73 20 61 72 65 | 20 63 6f 6e 63 65 72 6e |icts are| concern|
|00003950| 65 64 2e 20 20 49 66 20 | 6c 6f 61 64 2d 54 4e 73 |ed. If |load-TNs|
|00003960| 20 61 72 65 20 61 6c 6c | 6f 63 61 74 65 64 2c 20 | are all|ocated, |
|00003970| 74 68 65 6e 20 74 68 69 | 73 20 69 73 20 74 68 65 |then thi|s is the|
|00003980| 0a 20 20 20 20 62 65 67 | 69 6e 6e 69 6e 67 20 6f |. beg|inning o|
|00003990| 66 20 74 68 65 69 72 20 | 6c 69 76 65 73 2e 0a 0a |f their |lives...|
|000039a0| 28 3a 41 72 67 75 6d 65 | 6e 74 20 3c 6e 3e 29 0a |(:Argume|nt <n>).|
|000039b0| 20 20 20 20 54 68 65 20 | 70 6f 69 6e 74 20 61 74 | The |point at|
|000039c0| 20 77 68 69 63 68 20 74 | 68 65 20 4e 27 74 68 20 | which t|he N'th |
|000039d0| 61 72 67 75 6d 65 6e 74 | 20 69 73 20 72 65 61 64 |argument| is read|
|000039e0| 20 66 6f 72 20 74 68 65 | 20 6c 61 73 74 20 74 69 | for the| last ti|
|000039f0| 6d 65 20 28 62 79 20 74 | 68 69 73 0a 20 20 20 20 |me (by t|his. |
|00003a00| 56 4f 50 29 2e 20 20 49 | 66 20 74 68 65 20 61 72 |VOP). I|f the ar|
|00003a10| 67 75 6d 65 6e 74 20 69 | 73 20 64 65 61 64 20 61 |gument i|s dead a|
|00003a20| 66 74 65 72 20 74 68 69 | 73 20 56 4f 50 2c 20 74 |fter thi|s VOP, t|
|00003a30| 68 65 6e 20 74 68 65 20 | 61 72 67 75 6d 65 6e 74 |hen the |argument|
|00003a40| 20 62 65 63 6f 6d 65 73 | 0a 20 20 20 20 64 65 61 | becomes|. dea|
|00003a50| 64 20 61 74 20 74 68 69 | 73 20 74 69 6d 65 2c 20 |d at thi|s time, |
|00003a60| 61 6e 64 20 6d 61 79 20 | 62 65 20 72 65 75 73 65 |and may |be reuse|
|00003a70| 64 20 61 73 20 61 20 74 | 65 6d 70 6f 72 61 72 79 |d as a t|emporary|
|00003a80| 20 6f 72 20 72 65 73 75 | 6c 74 20 6c 6f 61 64 2d | or resu|lt load-|
|00003a90| 54 4e 2e 0a 0a 28 3a 45 | 76 61 6c 20 3c 6e 3e 29 |TN...(:E|val <n>)|
|00003aa0| 0a 20 20 20 20 54 68 65 | 20 4e 27 74 68 20 65 76 |. The| N'th ev|
|00003ab0| 61 6c 75 61 74 69 6f 6e | 20 73 74 65 70 2e 20 20 |aluation| step. |
|00003ac0| 54 68 65 72 65 20 6d 61 | 79 20 62 65 20 61 6e 79 |There ma|y be any|
|00003ad0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 65 76 61 6c 75 | number |of evalu|
|00003ae0| 61 74 69 6f 6e 20 73 74 | 65 70 73 2c 20 62 75 74 |ation st|eps, but|
|00003af0| 0a 20 20 20 20 69 74 20 | 69 73 20 75 6e 6c 69 6b |. it |is unlik|
|00003b00| 65 6c 79 20 74 68 61 74 | 20 6d 6f 72 65 20 74 68 |ely that| more th|
|00003b10| 61 6e 20 74 77 6f 20 61 | 72 65 20 6e 65 65 64 65 |an two a|re neede|
|00003b20| 64 2e 0a 0a 28 3a 52 65 | 73 75 6c 74 20 3c 6e 3e |d...(:Re|sult <n>|
|00003b30| 29 20 0a 20 20 20 20 54 | 68 65 20 70 6f 69 6e 74 |) . T|he point|
|00003b40| 20 61 74 20 77 68 69 63 | 68 20 74 68 65 20 4e 27 | at whic|h the N'|
|00003b50| 74 68 20 72 65 73 75 6c | 74 20 69 73 20 66 69 72 |th resul|t is fir|
|00003b60| 73 74 20 77 72 69 74 74 | 65 6e 20 69 6e 74 6f 2e |st writt|en into.|
|00003b70| 20 20 54 68 69 73 20 69 | 73 20 74 68 65 0a 20 20 | This i|s the. |
|00003b80| 20 20 70 6f 69 6e 74 20 | 61 74 20 77 68 69 63 68 | point |at which|
|00003b90| 20 74 68 61 74 20 72 65 | 73 75 6c 74 20 62 65 63 | that re|sult bec|
|00003ba0| 6f 6d 65 73 20 6c 69 76 | 65 2e 0a 0a 3a 53 61 76 |omes liv|e...:Sav|
|00003bb0| 65 0a 20 20 20 20 53 69 | 6d 69 6c 61 72 20 74 6f |e. Si|milar to|
|00003bc0| 20 3a 4c 6f 61 64 2c 20 | 62 75 74 20 6d 61 72 6b | :Load, |but mark|
|00003bd0| 73 20 74 68 65 20 65 6e | 64 20 6f 66 20 74 69 6d |s the en|d of tim|
|00003be0| 65 2e 20 20 54 68 69 73 | 20 69 73 20 70 6f 69 6e |e. This| is poin|
|00003bf0| 74 20 61 74 20 77 68 69 | 63 68 20 72 65 73 75 6c |t at whi|ch resul|
|00003c00| 74 0a 20 20 20 20 6c 6f | 61 64 2d 54 4e 73 20 61 |t. lo|ad-TNs a|
|00003c10| 72 65 20 73 74 6f 72 65 | 64 20 62 61 63 6b 20 74 |re store|d back t|
|00003c20| 6f 20 74 68 65 20 61 63 | 74 75 61 6c 20 6c 6f 63 |o the ac|tual loc|
|00003c30| 61 74 69 6f 6e 2e 0a 0a | 49 6e 20 61 6e 79 20 6f |ation...|In any o|
|00003c40| 66 20 74 68 65 20 6c 69 | 73 74 2d 73 74 79 6c 65 |f the li|st-style|
|00003c50| 20 74 69 6d 65 20 73 70 | 65 63 69 66 69 63 61 74 | time sp|ecificat|
|00003c60| 69 6f 6e 73 2c 20 74 68 | 65 20 6b 65 79 77 6f 72 |ions, th|e keywor|
|00003c70| 64 20 62 79 20 69 74 73 | 65 6c 66 20 73 74 61 6e |d by its|elf stan|
|00003c80| 64 73 20 66 6f 72 0a 74 | 68 65 20 66 69 72 73 74 |ds for.t|he first|
|00003c90| 20 73 75 63 68 20 74 69 | 6d 65 2c 20 69 2e 65 2e | such ti|me, i.e.|
|00003ca0| 0a 20 20 20 20 3a 61 72 | 67 75 6d 65 6e 74 20 20 |. :ar|gument |
|00003cb0| 3c 3d 3d 3e 20 20 28 3a | 61 72 67 75 6d 65 6e 74 |<==> (:|argument|
|00003cc0| 20 30 29 0a 0a 0a 4e 6f | 74 65 20 74 68 61 74 20 | 0)...No|te that |
|00003cd0| 61 72 67 75 6d 65 6e 74 | 2f 72 65 73 75 6c 74 20 |argument|/result |
|00003ce0| 72 65 61 64 2f 77 72 69 | 74 65 20 74 69 6d 65 73 |read/wri|te times|
|00003cf0| 20 64 6f 6e 27 74 20 61 | 63 74 75 61 6c 6c 79 20 | don't a|ctually |
|00003d00| 68 61 76 65 20 74 6f 20 | 62 65 20 69 6e 20 74 68 |have to |be in th|
|00003d10| 65 0a 6f 72 64 65 72 20 | 73 70 65 63 69 66 69 65 |e.order |specifie|
|00003d20| 64 2c 20 62 75 74 20 74 | 68 65 79 20 6d 75 73 74 |d, but t|hey must|
|00003d30| 20 2a 61 70 70 65 61 72 | 2a 20 74 6f 20 68 61 70 | *appear|* to hap|
|00003d40| 70 65 6e 20 69 6e 20 74 | 68 61 74 20 6f 72 64 65 |pen in t|hat orde|
|00003d50| 72 20 61 73 20 66 61 72 | 20 61 73 0a 63 6f 6e 66 |r as far| as.conf|
|00003d60| 6c 69 63 74 20 61 6e 61 | 6c 79 73 69 73 20 69 73 |lict ana|lysis is|
|00003d70| 20 63 6f 6e 63 65 72 6e | 65 64 2e 20 20 46 6f 72 | concern|ed. For|
|00003d80| 20 65 78 61 6d 70 6c 65 | 2c 20 74 68 65 20 61 72 | example|, the ar|
|00003d90| 67 75 6d 65 6e 74 73 20 | 63 61 6e 20 62 65 20 72 |guments |can be r|
|00003da0| 65 61 64 20 69 6e 20 61 | 6e 79 0a 6f 72 64 65 72 |ead in a|ny.order|
|00003db0| 20 61 73 20 6c 6f 6e 67 | 20 6e 6f 20 54 4e 20 69 | as long| no TN i|
|00003dc0| 73 20 77 72 69 74 74 65 | 6e 20 74 68 61 74 20 68 |s writte|n that h|
|00003dd0| 61 73 20 61 20 6c 69 66 | 65 20 62 65 67 69 6e 6e |as a lif|e beginn|
|00003de0| 69 6e 67 20 61 74 20 6f | 72 20 61 66 74 65 72 0a |ing at o|r after.|
|00003df0| 28 3a 41 72 67 75 6d 65 | 6e 74 20 3c 6e 3e 29 2c |(:Argume|nt <n>),|
|00003e00| 20 77 68 65 72 65 20 4e | 20 69 73 20 74 68 65 20 | where N| is the |
|00003e10| 6e 75 6d 62 65 72 20 6f | 66 20 61 6e 20 61 72 67 |number o|f an arg|
|00003e20| 75 6d 65 6e 74 20 77 68 | 6f 73 65 20 72 65 61 64 |ument wh|ose read|
|00003e30| 69 6e 67 20 77 61 73 0a | 70 6f 73 74 70 6f 6e 65 |ing was.|postpone|
|00003e40| 64 2e 0a 0a 5b 5c 23 5c | 23 5c 23 20 28 3f 3f 3f |d...[\#\|#\# (???|
|00003e50| 29 0a 0a 57 65 20 70 72 | 6f 62 61 62 6c 79 20 61 |)..We pr|obably a|
|00003e60| 6c 73 6f 20 77 61 6e 74 | 20 73 6f 6d 65 20 73 79 |lso want| some sy|
|00003e70| 6e 74 61 63 74 69 63 20 | 73 75 67 61 72 20 69 6e |ntactic |sugar in|
|00003e80| 20 44 65 66 69 6e 65 2d | 56 4f 50 20 66 6f 72 20 | Define-|VOP for |
|00003e90| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 0a 6d 6f |automati|cally.mo|
|00003ea0| 76 69 6e 67 20 6f 70 65 | 72 61 6e 64 73 20 74 6f |ving ope|rands to|
|00003eb0| 2f 66 72 6f 6d 20 65 78 | 70 6c 69 63 69 74 6c 79 |/from ex|plicitly|
|00003ec0| 20 61 6c 6c 6f 63 61 74 | 65 64 20 74 65 6d 70 6f | allocat|ed tempo|
|00003ed0| 72 61 72 69 65 73 20 73 | 6f 20 74 68 61 74 20 74 |raries s|o that t|
|00003ee0| 68 69 73 20 6b 69 6e 64 | 20 6f 66 0a 74 68 69 6e |his kind| of.thin|
|00003ef0| 67 20 69 73 20 73 6f 6d | 65 77 68 61 74 20 65 61 |g is som|ewhat ea|
|00003f00| 73 79 2e 20 20 54 68 65 | 72 65 20 69 73 6e 27 74 |sy. The|re isn't|
|00003f10| 20 72 65 61 6c 6c 79 20 | 61 6e 79 20 72 65 61 73 | really |any reas|
|00003f20| 6f 6e 20 74 6f 20 63 6f | 6e 73 69 64 65 72 20 74 |on to co|nsider t|
|00003f30| 68 65 0a 74 65 6d 70 6f | 72 61 72 79 20 74 6f 20 |he.tempo|rary to |
|00003f40| 62 65 20 61 20 6c 6f 61 | 64 2d 54 4e 2c 20 62 75 |be a loa|d-TN, bu|
|00003f50| 74 20 77 65 20 77 61 6e | 74 20 74 6f 20 63 6f 6d |t we wan|t to com|
|00003f60| 70 75 74 65 20 63 6f 73 | 74 73 20 61 73 20 74 68 |pute cos|ts as th|
|00003f70| 6f 75 67 68 20 69 74 20 | 77 61 73 20 61 6e 64 0a |ough it |was and.|
|00003f80| 77 61 6e 74 20 74 6f 20 | 75 73 65 20 74 68 65 20 |want to |use the |
|00003f90| 73 61 6d 65 20 6f 70 65 | 72 61 6e 64 20 6c 6f 61 |same ope|rand loa|
|00003fa0| 64 69 6e 67 20 72 6f 75 | 74 69 6e 65 73 2e 0a 0a |ding rou|tines...|
|00003fb0| 57 65 20 61 6c 73 6f 20 | 6d 69 67 68 74 20 63 6f |We also |might co|
|00003fc0| 6e 73 69 64 65 72 20 61 | 6c 6c 6f 77 69 6e 67 20 |nsider a|llowing |
|00003fd0| 74 68 65 20 6c 69 66 65 | 74 69 6d 65 20 6f 66 20 |the life|time of |
|00003fe0| 61 6e 20 61 72 67 75 6d | 65 6e 74 2f 72 65 73 75 |an argum|ent/resu|
|00003ff0| 6c 74 20 74 6f 20 62 65 | 0a 65 78 74 65 6e 64 65 |lt to be|.extende|
|00004000| 64 20 66 6f 72 77 61 72 | 64 2f 62 61 63 6b 77 61 |d forwar|d/backwa|
|00004010| 72 64 2e 20 20 54 68 69 | 73 20 77 6f 75 6c 64 20 |rd. Thi|s would |
|00004020| 69 6e 20 6d 61 6e 79 20 | 63 61 73 65 73 20 65 6c |in many |cases el|
|00004030| 69 6d 69 6e 61 74 65 20 | 74 68 65 20 6e 65 65 64 |iminate |the need|
|00004040| 20 66 6f 72 0a 74 65 6d | 70 6f 72 61 72 69 65 73 | for.tem|poraries|
|00004050| 20 77 68 65 6e 20 6f 70 | 65 72 61 6e 64 73 20 61 | when op|erands a|
|00004060| 72 65 20 72 65 61 64 2f | 77 72 69 74 74 65 6e 20 |re read/|written |
|00004070| 6f 75 74 20 6f 66 20 6f | 72 64 65 72 2e 0a 5d 0a |out of o|rder..].|
|00004080| 0a 0c 0a 5c 73 65 63 74 | 69 6f 6e 7b 56 4f 50 20 |...\sect|ion{VOP |
|00004090| 43 6f 73 74 20 6d 6f 64 | 65 6c 7d 0a 0a 4e 6f 74 |Cost mod|el}..Not|
|000040a0| 65 20 74 68 61 74 20 69 | 6e 20 74 68 69 73 20 6d |e that i|n this m|
|000040b0| 6f 64 65 6c 2c 20 69 66 | 20 61 20 6f 70 65 72 61 |odel, if| a opera|
|000040c0| 6e 64 20 68 61 73 20 6e | 6f 20 72 65 73 74 72 69 |nd has n|o restri|
|000040d0| 63 74 69 6f 6e 73 2c 20 | 69 74 20 68 61 73 20 6e |ctions, |it has n|
|000040e0| 6f 20 63 6f 73 74 2e 0a | 54 68 69 73 20 6d 61 6b |o cost..|This mak|
|000040f0| 65 73 20 6d 61 6b 65 20 | 73 65 6e 73 65 2c 20 73 |es make |sense, s|
|00004100| 69 6e 63 65 20 74 68 65 | 20 70 75 72 70 6f 73 65 |ince the| purpose|
|00004110| 20 6f 66 20 74 68 65 20 | 63 6f 73 74 20 69 73 20 | of the |cost is |
|00004120| 74 6f 20 69 6e 64 69 63 | 61 74 65 20 74 68 65 0a |to indic|ate the.|
|00004130| 72 65 6c 61 74 69 76 65 | 20 76 61 6c 75 65 20 6f |relative| value o|
|00004140| 66 20 70 61 63 6b 69 6e | 67 20 69 6e 20 64 69 66 |f packin|g in dif|
|00004150| 66 65 72 65 6e 74 20 53 | 43 73 2e 20 20 49 66 20 |ferent S|Cs. If |
|00004160| 74 68 65 20 6f 70 65 72 | 61 6e 64 20 69 73 6e 27 |the oper|and isn'|
|00004170| 74 20 72 65 71 75 69 72 | 65 64 20 74 6f 0a 62 65 |t requir|ed to.be|
|00004180| 20 69 6e 20 61 20 67 6f | 6f 64 20 53 43 20 28 69 | in a go|od SC (i|
|00004190| 2e 65 2e 20 61 20 72 65 | 67 69 73 74 65 72 29 2c |.e. a re|gister),|
|000041a0| 20 74 68 65 6e 20 77 65 | 20 6d 69 67 68 74 20 61 | then we| might a|
|000041b0| 73 20 77 65 6c 6c 20 6c | 65 61 76 65 20 69 74 20 |s well l|eave it |
|000041c0| 69 6e 20 6d 65 6d 6f 72 | 79 2e 0a 54 68 65 20 53 |in memor|y..The S|
|000041d0| 43 20 72 65 73 74 72 69 | 63 74 69 6f 6e 20 6d 65 |C restri|ction me|
|000041e0| 63 68 61 6e 69 73 6d 20 | 63 61 6e 20 62 65 20 75 |chanism |can be u|
|000041f0| 73 65 64 20 65 76 65 6e | 20 77 68 65 6e 20 64 6f |sed even| when do|
|00004200| 69 6e 67 20 61 20 6d 6f | 76 65 20 69 6e 74 6f 20 |ing a mo|ve into |
|00004210| 74 68 65 20 53 43 20 69 | 73 0a 74 6f 6f 20 63 6f |the SC i|s.too co|
|00004220| 6d 70 6c 65 78 20 74 6f | 20 62 65 20 67 65 6e 65 |mplex to| be gene|
|00004230| 72 61 74 65 64 20 61 75 | 74 6f 6d 61 74 69 63 61 |rated au|tomatica|
|00004240| 6c 6c 79 20 28 70 65 72 | 68 61 70 73 20 72 65 71 |lly (per|haps req|
|00004250| 75 69 72 69 6e 67 20 74 | 65 6d 70 6f 72 61 72 79 |uiring t|emporary|
|00004260| 0a 72 65 67 69 73 74 65 | 72 73 29 2c 20 73 69 6e |.registe|rs), sin|
|00004270| 63 65 20 44 65 66 69 6e | 65 2d 56 4f 50 20 61 6c |ce Defin|e-VOP al|
|00004280| 6c 6f 77 73 20 6f 70 65 | 72 61 6e 64 20 6c 6f 61 |lows ope|rand loa|
|00004290| 64 69 6e 67 20 74 6f 20 | 62 65 20 64 6f 6e 65 20 |ding to |be done |
|000042a0| 65 78 70 6c 69 63 69 74 | 6c 79 2e 0a 0a 0c 0a 5c |explicit|ly.....\|
|000042b0| 73 65 63 74 69 6f 6e 7b | 45 66 66 69 63 69 65 6e |section{|Efficien|
|000042c0| 63 79 20 6e 6f 74 65 73 | 7d 0a 0a 20 20 49 6e 20 |cy notes|}.. In |
|000042d0| 61 64 64 69 74 69 6f 6e | 20 74 6f 0a 62 65 69 6e |addition| to.bein|
|000042e0| 67 20 75 73 65 64 20 74 | 6f 20 74 65 6c 6c 20 77 |g used t|o tell w|
|000042f0| 68 65 74 68 65 72 20 61 | 20 70 61 72 74 69 63 75 |hether a| particu|
|00004300| 6c 61 72 20 75 6e 73 61 | 66 65 20 74 65 6d 70 6c |lar unsa|fe templ|
|00004310| 61 74 65 20 6d 69 67 68 | 74 20 67 65 74 20 65 6d |ate migh|t get em|
|00004320| 69 74 74 65 64 2c 20 77 | 65 0a 63 61 6e 20 61 6c |itted, w|e.can al|
|00004330| 73 6f 20 75 73 65 20 69 | 74 20 74 6f 20 67 69 76 |so use i|t to giv|
|00004340| 65 20 62 65 74 74 65 72 | 20 65 66 66 69 63 69 65 |e better| efficie|
|00004350| 6e 63 79 20 6e 6f 74 65 | 73 3a 0a 20 2d 2d 20 57 |ncy note|s:. -- W|
|00004360| 65 20 63 61 6e 20 73 61 | 79 20 77 68 61 74 20 69 |e can sa|y what i|
|00004370| 73 20 77 72 6f 6e 67 20 | 77 69 74 68 20 74 68 65 |s wrong |with the|
|00004380| 20 63 61 6c 6c 20 74 79 | 70 65 73 2c 20 72 61 74 | call ty|pes, rat|
|00004390| 68 65 72 20 74 68 61 6e | 20 6a 75 73 74 20 73 61 |her than| just sa|
|000043a0| 79 69 6e 67 20 77 65 0a | 20 20 20 20 66 61 69 6c |ying we.| fail|
|000043b0| 65 64 20 74 6f 20 6f 70 | 65 6e 2d 63 6f 64 65 2e |ed to op|en-code.|
|000043c0| 0a 20 2d 2d 20 57 65 20 | 63 61 6e 20 74 65 6c 6c |. -- We |can tell|
|000043d0| 20 77 68 65 74 68 65 72 | 20 61 6e 79 20 6f 66 20 | whether| any of |
|000043e0| 74 68 65 20 22 62 65 74 | 74 65 72 22 20 74 65 6d |the "bet|ter" tem|
|000043f0| 70 6c 61 74 65 73 20 63 | 6f 75 6c 64 20 70 6f 73 |plates c|ould pos|
|00004400| 73 69 62 6c 79 20 61 70 | 70 6c 79 2c 0a 20 20 20 |sibly ap|ply,. |
|00004410| 20 69 2e 65 2e 20 69 73 | 20 74 68 65 20 69 6e 61 | i.e. is| the ina|
|00004420| 70 70 6c 69 63 61 62 69 | 6c 69 74 79 20 6f 66 20 |pplicabi|lity of |
|00004430| 61 20 74 65 6d 70 6c 61 | 74 65 20 62 65 63 61 75 |a templa|te becau|
|00004440| 73 65 20 6f 66 20 69 6e | 61 64 65 71 75 61 74 65 |se of in|adequate|
|00004450| 20 74 79 70 65 0a 20 20 | 20 20 69 6e 66 6f 72 6d | type. | inform|
|00004460| 61 74 69 6f 6e 20 6f 72 | 20 62 65 63 61 75 73 65 |ation or| because|
|00004470| 20 74 68 65 20 74 79 70 | 65 20 69 73 20 6a 75 73 | the typ|e is jus|
|00004480| 74 20 70 6c 61 69 6e 20 | 77 72 6f 6e 67 2e 20 20 |t plain |wrong. |
|00004490| 57 65 20 64 6f 6e 27 74 | 20 77 61 6e 74 20 74 6f |We don't| want to|
|000044a0| 0a 20 20 20 20 66 6c 61 | 6d 65 20 70 65 6f 70 6c |. fla|me peopl|
|000044b0| 65 20 77 68 65 6e 20 61 | 20 74 65 6d 70 6c 61 74 |e when a| templat|
|000044c0| 65 20 74 68 61 74 20 63 | 6f 75 6c 64 6e 27 74 20 |e that c|ouldn't |
|000044d0| 70 6f 73 73 69 62 6c 79 | 20 6d 61 74 63 68 20 64 |possibly| match d|
|000044e0| 6f 65 73 6e 27 74 20 6d | 61 74 63 68 2c 0a 20 20 |oesn't m|atch,. |
|000044f0| 20 20 65 2e 67 2e 20 63 | 6f 6d 70 6c 61 69 6e 69 | e.g. c|omplaini|
|00004500| 6e 67 20 74 68 61 74 20 | 77 65 20 63 61 6e 27 74 |ng that |we can't|
|00004510| 20 75 73 65 20 66 69 78 | 6e 75 6d 2b 20 77 68 65 | use fix|num+ whe|
|00004520| 6e 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 73 20 |n the ar|guments |
|00004530| 61 72 65 20 6b 6e 6f 77 | 6e 20 74 6f 0a 20 20 20 |are know|n to. |
|00004540| 20 62 65 20 66 6c 6f 61 | 74 73 2e 0a 0a 0a 54 68 | be floa|ts....Th|
|00004550| 69 73 20 69 73 20 68 6f | 77 20 77 65 20 67 69 76 |is is ho|w we giv|
|00004560| 65 20 62 65 74 74 65 72 | 20 65 66 66 69 63 69 65 |e better| efficie|
|00004570| 6e 63 79 20 6e 6f 74 65 | 73 3a 0a 0a 54 68 65 20 |ncy note|s:..The |
|00004580| 54 65 6d 70 6c 61 74 65 | 2d 4e 6f 74 65 20 69 73 |Template|-Note is|
|00004590| 20 61 20 73 68 6f 72 74 | 20 6e 6f 75 6e 2d 6c 69 | a short| noun-li|
|000045a0| 6b 65 20 73 74 72 69 6e | 67 20 77 69 74 68 6f 75 |ke strin|g withou|
|000045b0| 74 20 63 61 70 69 74 61 | 6c 69 7a 61 74 69 6f 6e |t capita|lization|
|000045c0| 20 6f 72 0a 70 75 6e 63 | 74 75 61 74 69 6f 6e 20 | or.punc|tuation |
|000045d0| 74 68 61 74 20 64 65 73 | 63 72 69 62 65 73 20 77 |that des|cribes w|
|000045e0| 68 61 74 20 74 68 65 20 | 74 65 6d 70 6c 61 74 65 |hat the |template|
|000045f0| 20 22 64 6f 65 73 22 2c | 20 69 2e 65 2e 20 77 65 | "does",| i.e. we|
|00004600| 20 73 61 79 0a 22 55 6e | 61 62 6c 65 20 74 6f 20 | say."Un|able to |
|00004610| 64 6f 20 7e 41 2c 20 64 | 6f 69 6e 67 20 7e 41 20 |do ~A, d|oing ~A |
|00004620| 69 6e 73 74 65 61 64 2e | 22 0a 0a 54 68 65 20 43 |instead.|"..The C|
|00004630| 6f 73 74 20 69 73 20 6d | 6f 76 65 64 20 66 72 6f |ost is m|oved fro|
|00004640| 6d 20 74 68 65 20 56 6f | 70 2d 49 6e 66 6f 20 74 |m the Vo|p-Info t|
|00004650| 6f 20 74 68 65 20 54 65 | 6d 70 6c 61 74 65 20 73 |o the Te|mplate s|
|00004660| 74 72 75 63 74 75 72 65 | 2c 20 61 6e 64 20 69 73 |tructure|, and is|
|00004670| 20 75 73 65 64 20 74 6f | 0a 64 65 74 65 72 6d 69 | used to|.determi|
|00004680| 6e 65 20 74 68 65 20 22 | 67 6f 6f 64 6e 65 73 73 |ne the "|goodness|
|00004690| 22 20 6f 66 20 70 6f 73 | 73 69 62 6c 79 20 61 70 |" of pos|sibly ap|
|000046a0| 70 6c 69 63 61 62 6c 65 | 20 74 65 6d 70 6c 61 74 |plicable| templat|
|000046b0| 65 73 2e 20 20 5b 43 6f | 75 6c 64 20 66 6c 75 73 |es. [Co|uld flus|
|000046c0| 68 0a 54 65 6d 70 6c 61 | 74 65 2f 56 6f 70 2d 49 |h.Templa|te/Vop-I|
|000046d0| 6e 66 6f 20 64 69 73 74 | 69 6e 63 74 69 6f 6e 5d |nfo dist|inction]|
|000046e0| 20 20 54 68 65 20 63 6f | 73 74 20 69 73 20 75 73 | The co|st is us|
|000046f0| 65 64 20 74 6f 20 63 68 | 6f 6f 73 65 20 74 68 65 |ed to ch|oose the|
|00004700| 20 62 65 73 74 20 61 70 | 70 6c 69 63 61 62 6c 65 | best ap|plicable|
|00004710| 0a 74 65 6d 70 6c 61 74 | 65 20 74 6f 20 65 6d 69 |.templat|e to emi|
|00004720| 74 2c 20 61 6e 64 20 61 | 6c 73 6f 20 74 6f 20 64 |t, and a|lso to d|
|00004730| 65 74 65 72 6d 69 6e 65 | 20 77 68 61 74 20 62 65 |etermine| what be|
|00004740| 74 74 65 72 20 74 65 6d | 70 6c 61 74 65 73 20 77 |tter tem|plates w|
|00004750| 65 20 6d 69 67 68 74 20 | 68 61 76 65 0a 62 65 65 |e might |have.bee|
|00004760| 6e 20 61 62 6c 65 20 74 | 6f 20 75 73 65 2e 0a 0a |n able t|o use...|
|00004770| 41 20 74 65 6d 70 6c 61 | 74 65 20 69 73 20 70 6f |A templa|te is po|
|00004780| 73 73 69 62 6c 79 20 61 | 70 70 6c 69 63 61 62 6c |ssibly a|pplicabl|
|00004790| 65 20 69 66 20 74 68 65 | 72 65 20 69 73 20 61 6e |e if the|re is an|
|000047a0| 20 69 6e 74 65 72 73 65 | 63 74 69 6f 6e 20 62 65 | interse|ction be|
|000047b0| 74 77 65 65 6e 20 61 6c | 6c 20 6f 66 0a 74 68 65 |tween al|l of.the|
|000047c0| 20 61 72 67 2f 72 65 73 | 75 6c 74 20 74 79 70 65 | arg/res|ult type|
|000047d0| 73 20 61 6e 64 20 74 68 | 65 20 63 6f 72 72 65 73 |s and th|e corres|
|000047e0| 70 6f 6e 64 69 6e 67 20 | 61 72 67 2f 72 65 73 75 |ponding |arg/resu|
|000047f0| 6c 74 20 72 65 73 74 72 | 69 63 74 69 6f 6e 73 2c |lt restr|ictions,|
|00004800| 20 69 2e 65 2e 20 74 68 | 65 0a 74 65 6d 70 6c 61 | i.e. th|e.templa|
|00004810| 74 65 20 69 73 20 6e 6f | 74 20 63 6c 65 61 72 6c |te is no|t clearl|
|00004820| 79 20 69 6d 70 6f 73 73 | 69 62 6c 65 3a 20 6d 6f |y imposs|ible: mo|
|00004830| 72 65 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 73 20 |re decla|rations |
|00004840| 6d 69 67 68 74 20 61 6c | 6c 6f 77 20 69 74 20 74 |might al|low it t|
|00004850| 6f 20 62 65 0a 65 6d 69 | 74 74 65 64 2e 0a 0a 0c |o be.emi|tted....|
|00004860| 0a 5c 63 68 61 70 74 65 | 72 7b 41 73 73 65 6d 62 |.\chapte|r{Assemb|
|00004870| 6c 65 72 20 52 65 74 61 | 72 67 65 74 69 6e 67 7d |ler Reta|rgeting}|
|00004880| 0a 0a 0c 0a 5c 63 68 61 | 70 74 65 72 7b 57 72 69 |....\cha|pter{Wri|
|00004890| 74 69 6e 67 20 41 73 73 | 65 6d 62 6c 79 20 43 6f |ting Ass|embly Co|
|000048a0| 64 65 7d 0a 0a 56 4f 50 | 20 77 72 69 74 65 72 73 |de}..VOP| writers|
|000048b0| 20 65 78 70 65 63 74 3a | 0a 20 20 20 4d 4f 56 45 | expect:|. MOVE|
|000048c0| 0a 20 20 20 20 20 20 59 | 6f 75 20 77 72 69 74 65 |. Y|ou write|
|000048d0| 20 77 68 65 6e 20 79 6f | 75 20 70 6f 72 74 20 74 | when yo|u port t|
|000048e0| 68 65 20 61 73 73 65 6d | 62 6c 65 72 2e 29 0a 20 |he assem|bler.). |
|000048f0| 20 20 45 4d 49 54 2d 4c | 41 42 45 4c 0a 20 20 20 | EMIT-L|ABEL. |
|00004900| 20 20 20 41 73 73 65 6d | 62 6c 65 72 20 69 6e 74 | Assem|bler int|
|00004910| 65 72 66 61 63 65 20 6c | 69 6b 65 20 49 4e 53 54 |erface l|ike INST|
|00004920| 2e 20 20 54 61 6b 65 73 | 20 61 20 6c 61 62 65 6c |. Takes| a label|
|00004930| 20 79 6f 75 20 6d 61 64 | 65 20 61 6e 64 20 73 61 | you mad|e and sa|
|00004940| 79 73 20 22 73 74 69 63 | 6b 20 69 74 0a 20 20 20 |ys "stic|k it. |
|00004950| 20 20 20 68 65 72 65 2e | 22 0a 20 20 20 47 45 4e | here.|". GEN|
|00004960| 2d 4c 41 42 45 4c 0a 20 | 20 20 20 20 20 52 65 74 |-LABEL. | Ret|
|00004970| 75 72 6e 73 20 61 20 6e | 65 77 20 6c 61 62 65 6c |urns a n|ew label|
|00004980| 20 73 75 69 74 61 62 6c | 65 20 66 6f 72 20 75 73 | suitabl|e for us|
|00004990| 65 20 77 69 74 68 20 45 | 4d 49 54 2d 4c 41 42 45 |e with E|MIT-LABE|
|000049a0| 4c 20 65 78 61 63 74 6c | 79 20 6f 6e 63 65 20 61 |L exactl|y once a|
|000049b0| 6e 64 0a 20 20 20 20 20 | 20 66 6f 72 20 72 65 66 |nd. | for ref|
|000049c0| 65 72 65 6e 63 69 6e 67 | 20 61 73 20 6f 66 74 65 |erencing| as ofte|
|000049d0| 6e 20 61 73 20 6e 65 63 | 65 73 73 61 72 79 2e 0a |n as nec|essary..|
|000049e0| 20 20 20 49 4e 53 54 0a | 20 20 20 20 20 20 52 65 | INST.| Re|
|000049f0| 63 6f 67 6e 69 7a 65 73 | 20 61 6e 64 20 64 69 73 |cognizes| and dis|
|00004a00| 70 61 74 63 68 65 73 20 | 74 6f 20 69 6e 73 74 72 |patches |to instr|
|00004a10| 75 63 74 69 6f 6e 73 20 | 79 6f 75 20 64 65 66 69 |uctions |you defi|
|00004a20| 6e 65 64 20 66 6f 72 20 | 61 73 73 65 6d 62 6c 65 |ned for |assemble|
|00004a30| 72 2e 0a 20 20 20 41 4c | 49 47 4e 0a 20 20 20 20 |r.. AL|IGN. |
|00004a40| 20 20 54 68 69 73 20 74 | 61 6b 65 73 20 74 68 65 | This t|akes the|
|00004a50| 20 6e 75 6d 62 65 72 20 | 6f 66 20 7a 65 72 6f 20 | number |of zero |
|00004a60| 62 69 74 73 20 79 6f 75 | 20 77 61 6e 74 20 69 6e |bits you| want in|
|00004a70| 20 74 68 65 20 6c 6f 77 | 20 65 6e 64 20 6f 66 20 | the low| end of |
|00004a80| 74 68 65 20 61 64 64 72 | 65 73 73 0a 20 20 20 20 |the addr|ess. |
|00004a90| 20 20 6f 66 20 74 68 65 | 20 6e 65 78 74 20 69 6e | of the| next in|
|00004aa0| 73 74 72 75 63 74 69 6f | 6e 2e 0a 20 20 20 41 53 |structio|n.. AS|
|00004ab0| 53 45 4d 42 4c 45 0a 20 | 20 20 41 53 53 45 4d 42 |SEMBLE. | ASSEMB|
|00004ac0| 4c 45 2d 45 4c 53 45 57 | 48 45 52 45 0a 20 20 20 |LE-ELSEW|HERE. |
|00004ad0| 20 20 20 47 65 74 20 72 | 65 61 64 79 20 66 6f 72 | Get r|eady for|
|00004ae0| 20 61 73 73 65 6d 62 6c | 69 6e 67 20 73 74 75 66 | assembl|ing stuf|
|00004af0| 66 2e 20 20 54 61 6b 65 | 73 20 61 20 56 4f 50 20 |f. Take|s a VOP |
|00004b00| 61 6e 64 20 61 72 62 69 | 74 72 61 72 79 20 50 52 |and arbi|trary PR|
|00004b10| 4f 47 4e 2d 73 74 79 6c | 65 0a 20 20 20 20 20 20 |OGN-styl|e. |
|00004b20| 62 6f 64 79 2e 20 20 57 | 72 61 70 20 74 68 65 73 |body. W|rap thes|
|00004b30| 65 20 61 72 6f 75 6e 64 | 20 69 6e 73 74 72 75 63 |e around| instruc|
|00004b40| 74 69 6f 6e 20 65 6d 69 | 73 73 69 6f 6e 20 63 6f |tion emi|ssion co|
|00004b50| 64 65 20 61 6e 6e 6f 75 | 6e 63 69 6e 67 20 74 68 |de annou|ncing th|
|00004b60| 65 20 66 69 72 73 74 0a | 20 20 20 20 20 20 70 61 |e first.| pa|
|00004b70| 73 73 20 6f 66 20 6f 75 | 72 20 61 73 73 65 6d 62 |ss of ou|r assemb|
|00004b80| 6c 65 72 2e 0a 20 20 20 | 43 55 52 52 45 4e 54 2d |ler.. |CURRENT-|
|00004b90| 4e 46 50 2d 54 4e 0a 20 | 20 20 20 20 20 54 68 69 |NFP-TN. | Thi|
|00004ba0| 73 20 72 65 74 75 72 6e | 73 20 61 20 54 4e 20 66 |s return|s a TN f|
|00004bb0| 6f 72 20 74 68 65 20 4e | 46 50 20 69 66 20 74 68 |or the N|FP if th|
|00004bc0| 65 20 63 61 6c 6c 65 72 | 20 75 73 65 73 20 74 68 |e caller| uses th|
|00004bd0| 65 20 6e 75 6d 62 65 72 | 20 73 74 61 63 6b 2c 20 |e number| stack, |
|00004be0| 6f 72 0a 20 20 20 20 20 | 20 6e 69 6c 2e 0a 20 20 |or. | nil.. |
|00004bf0| 20 53 42 2d 41 4c 4c 4f | 43 41 54 45 44 2d 53 49 | SB-ALLO|CATED-SI|
|00004c00| 5a 45 0a 20 20 20 20 20 | 20 54 68 69 73 20 72 65 |ZE. | This re|
|00004c10| 74 75 72 6e 73 20 74 68 | 65 20 73 69 7a 65 20 6f |turns th|e size o|
|00004c20| 66 20 73 6f 6d 65 20 73 | 74 6f 72 61 67 65 20 62 |f some s|torage b|
|00004c30| 61 73 65 64 20 75 73 65 | 64 20 62 79 20 74 68 65 |ased use|d by the|
|00004c40| 20 63 75 72 72 65 6e 74 | 6c 79 0a 20 20 20 20 20 | current|ly. |
|00004c50| 20 63 6f 6d 70 69 6c 69 | 6e 67 20 63 6f 6d 70 6f | compili|ng compo|
|00004c60| 6e 65 6e 74 2e 0a 20 20 | 20 2e 2e 2e 0a 0a 3b 3b |nent.. | .....;;|
|00004c70| 3b 0a 3b 3b 3b 20 56 4f | 50 20 69 64 69 6f 6d 73 |;.;;; VO|P idioms|
|00004c80| 0a 3b 3b 3b 0a 0a 53 54 | 4f 52 45 2d 53 54 41 43 |.;;;..ST|ORE-STAC|
|00004c90| 4b 2d 54 4e 0a 4c 4f 41 | 44 2d 53 54 41 43 4b 2d |K-TN.LOA|D-STACK-|
|00004ca0| 54 4e 0a 20 20 20 54 68 | 65 73 65 20 6d 6f 76 65 |TN. Th|ese move|
|00004cb0| 20 61 20 76 61 6c 75 65 | 20 66 72 6f 6d 20 61 20 | a value| from a |
|00004cc0| 72 65 67 69 73 74 65 72 | 20 74 6f 20 74 68 65 20 |register| to the |
|00004cd0| 63 6f 6e 74 72 6f 6c 20 | 73 74 61 63 6b 2c 20 6f |control |stack, o|
|00004ce0| 72 20 66 72 6f 6d 20 74 | 68 65 0a 20 20 20 63 6f |r from t|he. co|
|00004cf0| 6e 74 72 6f 6c 20 73 74 | 61 63 6b 20 74 6f 20 61 |ntrol st|ack to a|
|00004d00| 20 72 65 67 69 73 74 65 | 72 2e 20 20 54 68 65 79 | registe|r. They|
|00004d10| 20 74 61 6b 65 20 63 61 | 72 65 20 6f 66 20 63 68 | take ca|re of ch|
|00004d20| 65 63 6b 69 6e 67 20 74 | 68 65 20 54 4e 20 74 79 |ecking t|he TN ty|
|00004d30| 70 65 73 2c 0a 20 20 20 | 6d 6f 64 69 66 79 69 6e |pes,. |modifyin|
|00004d40| 67 20 6f 66 66 73 65 74 | 73 20 61 63 63 6f 72 64 |g offset|s accord|
|00004d50| 69 6e 67 20 74 6f 20 74 | 68 65 20 61 64 64 72 65 |ing to t|he addre|
|00004d60| 73 73 20 75 6e 69 74 73 | 20 70 65 72 20 77 6f 72 |ss units| per wor|
|00004d70| 64 2c 20 65 74 63 2e 0a | 0a 0c 0a 5c 63 68 61 70 |d, etc..|...\chap|
|00004d80| 74 65 72 7b 52 65 71 75 | 69 72 65 64 20 56 4f 50 |ter{Requ|ired VOP|
|00004d90| 53 7d 0a 0a 0a 4e 6f 74 | 65 3a 20 74 68 65 20 6d |S}...Not|e: the m|
|00004da0| 6f 76 65 20 56 4f 50 20 | 63 61 6e 6e 6f 74 20 68 |ove VOP |cannot h|
|00004db0| 61 76 65 20 61 6e 79 20 | 77 69 72 65 64 20 74 65 |ave any |wired te|
|00004dc0| 6d 70 73 2e 20 20 28 4d | 6f 76 65 2d 41 72 67 75 |mps. (M|ove-Argu|
|00004dd0| 6d 65 6e 74 20 61 6c 73 | 6f 3f 29 20 20 54 68 69 |ment als|o?) Thi|
|00004de0| 73 20 69 73 0a 73 6f 20 | 77 65 20 63 61 6e 20 6d |s is.so |we can m|
|00004df0| 6f 76 65 20 73 74 75 66 | 66 20 69 6e 74 6f 20 77 |ove stuf|f into w|
|00004e00| 69 72 65 64 20 54 4e 73 | 20 77 69 74 68 6f 75 74 |ired TNs| without|
|00004e10| 20 73 74 65 70 70 69 6e | 67 20 6f 6e 20 6f 75 72 | steppin|g on our|
|00004e20| 20 74 6f 65 73 2e 0a 0a | 0a 57 65 20 63 72 65 61 | toes...|.We crea|
|00004e30| 74 65 20 73 65 74 20 63 | 6c 6f 73 75 72 65 20 76 |te set c|losure v|
|00004e40| 61 72 69 61 62 6c 65 73 | 20 75 73 69 6e 67 20 74 |ariables| using t|
|00004e50| 68 65 20 56 61 6c 75 65 | 2d 43 65 6c 6c 20 56 4f |he Value|-Cell VO|
|00004e60| 50 2c 20 77 68 69 63 68 | 20 74 61 6b 65 73 20 61 |P, which| takes a|
|00004e70| 20 76 61 6c 75 65 0a 61 | 6e 64 20 72 65 74 75 72 | value.a|nd retur|
|00004e80| 6e 73 20 61 20 76 61 6c | 75 65 20 63 65 6c 6c 20 |ns a val|ue cell |
|00004e90| 63 6f 6e 74 61 69 6e 69 | 6e 67 20 74 68 65 20 76 |containi|ng the v|
|00004ea0| 61 6c 75 65 2e 20 20 57 | 65 20 63 61 6e 20 62 61 |alue. W|e can ba|
|00004eb0| 73 69 63 61 6c 6c 79 20 | 75 73 65 20 74 68 69 73 |sically |use this|
|00004ec0| 0a 69 6e 73 74 65 61 64 | 20 6f 66 20 61 20 4d 6f |.instead| of a Mo|
|00004ed0| 76 65 20 56 4f 50 20 77 | 68 65 6e 20 69 6e 69 74 |ve VOP w|hen init|
|00004ee0| 69 61 6c 69 7a 69 6e 67 | 20 74 68 65 20 76 61 72 |ializing| the var|
|00004ef0| 69 61 62 6c 65 2e 20 20 | 56 61 6c 75 65 2d 43 65 |iable. |Value-Ce|
|00004f00| 6c 6c 2d 53 65 74 20 61 | 6e 64 0a 56 61 6c 75 65 |ll-Set a|nd.Value|
|00004f10| 2d 43 65 6c 6c 2d 52 65 | 66 20 61 72 65 20 75 73 |-Cell-Re|f are us|
|00004f20| 65 64 20 74 6f 20 61 63 | 63 65 73 73 20 74 68 65 |ed to ac|cess the|
|00004f30| 20 76 61 6c 75 65 20 63 | 65 6c 6c 2e 20 20 57 65 | value c|ell. We|
|00004f40| 20 63 61 6e 20 68 61 76 | 65 20 61 20 73 70 65 63 | can hav|e a spec|
|00004f50| 69 61 6c 20 65 66 66 65 | 63 74 0a 66 6f 72 20 76 |ial effe|ct.for v|
|00004f60| 61 6c 75 65 20 63 65 6c | 6c 73 20 73 6f 20 74 68 |alue cel|ls so th|
|00004f70| 61 74 20 76 61 6c 75 65 | 20 63 65 6c 6c 73 20 72 |at value| cells r|
|00004f80| 65 66 65 72 65 6e 63 65 | 73 20 63 61 6e 20 62 65 |eference|s can be|
|00004f90| 20 64 69 73 63 6f 76 65 | 72 65 64 20 74 6f 20 62 | discove|red to b|
|00004fa0| 65 20 63 6f 6d 6d 6f 6e | 0a 73 75 62 65 78 70 72 |e common|.subexpr|
|00004fb0| 65 73 73 69 6f 6e 73 20 | 6f 72 20 6c 6f 6f 70 20 |essions |or loop |
|00004fc0| 69 6e 76 61 72 69 61 6e | 74 73 2e 0a 0a 0a 0a 0a |invarian|ts......|
|00004fd0| 52 65 70 72 65 73 65 6e | 74 20 75 6e 6b 6e 6f 77 |Represen|t unknow|
|00004fe0| 6e 2d 76 61 6c 75 65 73 | 20 63 6f 6e 74 69 6e 75 |n-values| continu|
|00004ff0| 61 74 69 6f 6e 73 20 61 | 73 20 28 73 74 61 72 74 |ations a|s (start|
|00005000| 2c 20 63 6f 75 6e 74 29 | 2e 20 20 55 6e 6b 6e 6f |, count)|. Unkno|
|00005010| 77 6e 20 76 61 6c 75 65 | 73 0a 63 6f 6e 74 69 6e |wn value|s.contin|
|00005020| 75 61 74 69 6f 6e 73 20 | 61 72 65 20 61 6c 77 61 |uations |are alwa|
|00005030| 79 73 20 6f 75 74 73 69 | 64 65 20 6f 66 20 74 68 |ys outsi|de of th|
|00005040| 65 20 63 75 72 72 65 6e | 74 20 66 72 61 6d 65 20 |e curren|t frame |
|00005050| 28 6f 6e 20 73 74 61 63 | 6b 20 74 6f 70 29 2e 20 |(on stac|k top). |
|00005060| 20 57 69 74 68 69 6e 20 | 61 0a 66 75 6e 63 74 69 | Within |a.functi|
|00005070| 6f 6e 2c 20 77 65 20 61 | 6c 77 61 79 73 20 73 65 |on, we a|lways se|
|00005080| 74 20 75 70 20 61 6e 64 | 20 72 65 63 65 69 76 65 |t up and| receive|
|00005090| 20 76 61 6c 75 65 73 20 | 69 6e 20 74 68 65 20 73 | values |in the s|
|000050a0| 74 61 6e 64 61 72 64 20 | 70 61 73 73 69 6e 67 0a |tandard |passing.|
|000050b0| 6c 6f 63 61 74 69 6f 6e | 73 2e 20 20 49 66 20 77 |location|s. If w|
|000050c0| 65 20 72 65 63 65 69 76 | 65 20 73 74 61 63 6b 20 |e receiv|e stack |
|000050d0| 76 61 6c 75 65 73 2c 20 | 74 68 65 6e 20 77 65 20 |values, |then we |
|000050e0| 6d 75 73 74 20 42 4c 54 | 20 74 68 65 6d 20 64 6f |must BLT| them do|
|000050f0| 77 6e 20 74 6f 20 74 68 | 65 20 73 74 61 72 74 0a |wn to th|e start.|
|00005100| 6f 66 20 6f 75 72 20 66 | 72 61 6d 65 2c 20 66 69 |of our f|rame, fi|
|00005110| 6c 6c 69 6e 67 20 69 6e | 20 61 6e 79 20 75 6e 73 |lling in| any uns|
|00005120| 75 70 70 6c 69 65 64 20 | 76 61 6c 75 65 73 2e 20 |upplied |values. |
|00005130| 20 49 66 20 77 65 20 67 | 65 6e 65 72 61 74 65 20 | If we g|enerate |
|00005140| 75 6e 6b 6e 6f 77 6e 20 | 76 61 6c 75 65 73 0a 28 |unknown |values.(|
|00005150| 69 2e 65 2e 20 50 55 53 | 48 2d 56 41 4c 55 45 53 |i.e. PUS|H-VALUES|
|00005160| 29 2c 20 74 68 65 6e 20 | 77 65 20 73 65 74 20 74 |), then |we set t|
|00005170| 68 65 20 76 61 6c 75 65 | 73 20 75 70 20 69 6e 20 |he value|s up in |
|00005180| 74 68 65 20 73 74 61 6e | 64 61 72 64 20 6c 6f 63 |the stan|dard loc|
|00005190| 61 74 69 6f 6e 73 2c 20 | 74 68 65 6e 0a 42 4c 54 |ations, |then.BLT|
|000051a0| 20 74 68 65 6d 20 74 6f | 20 73 74 61 63 6b 20 74 | them to| stack t|
|000051b0| 6f 70 2e 20 20 57 68 65 | 6e 20 64 6f 69 6e 67 20 |op. Whe|n doing |
|000051c0| 61 20 74 61 69 6c 2d 72 | 65 74 75 72 6e 20 6f 66 |a tail-r|eturn of|
|000051d0| 20 4d 56 73 2c 20 77 65 | 20 6a 75 73 74 20 73 65 | MVs, we| just se|
|000051e0| 74 20 74 68 65 6d 20 75 | 70 20 69 6e 0a 74 68 65 |t them u|p in.the|
|000051f0| 20 73 74 61 6e 64 61 72 | 64 20 6c 6f 63 61 74 69 | standar|d locati|
|00005200| 6f 6e 73 20 61 6e 64 20 | 64 65 63 72 65 6d 65 6e |ons and |decremen|
|00005210| 74 20 53 50 3a 20 6e 6f | 20 42 4c 54 20 69 73 20 |t SP: no| BLT is |
|00005220| 6e 65 63 65 73 73 61 72 | 79 2e 0a 0a 55 6e 6b 6e |necessar|y...Unkn|
|00005230| 6f 77 6e 20 61 72 67 75 | 6d 65 6e 74 20 63 61 6c |own argu|ment cal|
|00005240| 6c 20 28 4d 56 2d 43 41 | 4c 4c 29 20 74 61 6b 65 |l (MV-CA|LL) take|
|00005250| 73 20 69 74 73 20 61 72 | 67 75 6d 65 6e 74 73 20 |s its ar|guments |
|00005260| 6f 6e 20 73 74 61 63 6b | 20 74 6f 70 20 28 69 73 |on stack| top (is|
|00005270| 20 67 69 76 65 6e 20 61 | 0a 62 61 73 65 20 70 6f | given a|.base po|
|00005280| 69 6e 74 65 72 29 2e 20 | 20 49 66 20 6e 6f 74 20 |inter). | If not |
|00005290| 61 20 74 61 69 6c 20 63 | 61 6c 6c 2c 20 74 68 65 |a tail c|all, the|
|000052a0| 6e 20 77 65 20 6a 75 73 | 74 20 73 65 74 20 74 68 |n we jus|t set th|
|000052b0| 65 20 61 72 67 20 70 6f | 69 6e 74 65 72 20 74 6f |e arg po|inter to|
|000052c0| 20 74 68 65 0a 62 61 73 | 65 20 70 6f 69 6e 74 65 | the.bas|e pointe|
|000052d0| 72 20 61 6e 64 20 63 61 | 6c 6c 2e 20 20 49 66 20 |r and ca|ll. If |
|000052e0| 61 20 74 61 69 6c 20 63 | 61 6c 6c 2c 20 77 65 20 |a tail c|all, we |
|000052f0| 6d 75 73 74 20 42 4c 54 | 20 74 68 65 20 61 72 67 |must BLT| the arg|
|00005300| 75 6d 65 6e 74 73 20 64 | 6f 77 6e 20 74 6f 20 74 |uments d|own to t|
|00005310| 68 65 0a 62 65 67 69 6e | 6e 69 6e 67 20 6f 66 20 |he.begin|ning of |
|00005320| 74 68 65 20 63 75 72 72 | 65 6e 74 20 66 72 61 6d |the curr|ent fram|
|00005330| 65 2e 0a 0a 0a 49 6d 70 | 6c 65 6d 65 6e 74 20 6d |e....Imp|lement m|
|00005340| 6f 72 65 20 61 72 67 73 | 20 62 79 20 42 4c 54 27 |ore args| by BLT'|
|00005350| 69 6e 67 20 74 68 65 20 | 6d 6f 72 65 20 61 72 67 |ing the |more arg|
|00005360| 73 20 2a 6f 6e 20 74 6f | 70 2a 20 6f 66 20 74 68 |s *on to|p* of th|
|00005370| 65 20 63 75 72 72 65 6e | 74 20 66 72 61 6d 65 2e |e curren|t frame.|
|00005380| 0a 54 68 69 73 20 73 6f | 6c 76 65 73 20 74 77 6f |.This so|lves two|
|00005390| 20 70 72 6f 62 6c 65 6d | 73 3a 0a 20 2d 2d 20 41 | problem|s:. -- A|
|000053a0| 6e 79 20 72 65 67 69 73 | 74 65 72 20 6d 6f 72 65 |ny regis|ter more|
|000053b0| 20 61 72 67 75 6d 65 6e | 74 73 20 63 61 6e 20 62 | argumen|ts can b|
|000053c0| 65 20 6d 61 64 65 20 75 | 6e 69 66 6f 72 6d 6c 79 |e made u|niformly|
|000053d0| 20 61 63 63 65 73 73 69 | 62 6c 79 20 62 79 20 63 | accessi|bly by c|
|000053e0| 6f 70 79 69 6e 67 0a 20 | 20 20 20 74 68 65 6d 20 |opying. | them |
|000053f0| 69 6e 74 6f 20 6d 65 6d | 6f 72 79 2e 20 20 5b 57 |into mem|ory. [W|
|00005400| 65 20 63 61 6e 27 74 20 | 73 74 6f 72 65 20 74 68 |e can't |store th|
|00005410| 65 20 72 65 67 69 73 74 | 65 72 73 20 69 6e 20 70 |e regist|ers in p|
|00005420| 6c 61 63 65 2c 20 73 69 | 6e 63 65 20 74 68 65 0a |lace, si|nce the.|
|00005430| 20 20 20 20 62 65 67 69 | 6e 6e 69 6e 67 20 6f 66 | begi|nning of|
|00005440| 20 74 68 65 20 66 72 61 | 6d 65 20 67 65 74 73 20 | the fra|me gets |
|00005450| 64 6f 75 62 6c 65 20 75 | 73 65 20 66 6f 72 20 73 |double u|se for s|
|00005460| 74 6f 72 69 6e 67 20 74 | 68 65 20 6f 6c 64 2d 63 |toring t|he old-c|
|00005470| 6f 6e 74 2c 20 72 65 74 | 75 72 6e 2d 70 63 0a 20 |ont, ret|urn-pc. |
|00005480| 20 20 20 61 6e 64 20 65 | 6e 76 2e 5d 0a 20 2d 2d | and e|nv.]. --|
|00005490| 20 49 74 20 73 6f 6c 76 | 65 73 20 74 68 65 20 64 | It solv|es the d|
|000054a0| 65 61 6c 6c 6f 63 61 74 | 69 6f 6e 20 70 72 6f 62 |eallocat|ion prob|
|000054b0| 6c 65 6d 3a 20 74 68 65 | 20 61 72 67 75 6d 65 6e |lem: the| argumen|
|000054c0| 74 73 20 77 69 6c 6c 20 | 62 65 20 64 65 61 6c 6c |ts will |be deall|
|000054d0| 6f 63 61 74 65 64 20 77 | 68 65 6e 0a 20 20 20 20 |ocated w|hen. |
|000054e0| 74 68 65 20 66 72 61 6d | 65 20 69 73 20 72 65 74 |the fram|e is ret|
|000054f0| 75 72 6e 65 64 20 66 72 | 6f 6d 20 6f 72 20 61 20 |urned fr|om or a |
|00005500| 74 61 69 6c 20 66 75 6c | 6c 20 63 61 6c 6c 20 69 |tail ful|l call i|
|00005510| 73 20 64 6f 6e 65 20 6f | 75 74 20 6f 66 20 69 74 |s done o|ut of it|
|00005520| 2e 20 20 53 6f 0a 20 20 | 20 20 6b 65 79 77 6f 72 |. So. | keywor|
|00005530| 64 20 61 72 67 73 20 77 | 69 6c 6c 20 62 65 20 70 |d args w|ill be p|
|00005540| 72 6f 70 65 72 6c 79 20 | 74 61 69 6c 2d 72 65 63 |roperly |tail-rec|
|00005550| 75 72 73 69 76 65 20 77 | 69 74 68 6f 75 74 20 61 |ursive w|ithout a|
|00005560| 6e 79 20 73 70 65 63 69 | 61 6c 20 6d 65 63 68 61 |ny speci|al mecha|
|00005570| 6e 69 73 6d 0a 20 20 20 | 20 66 6f 72 20 73 71 75 |nism. | for squ|
|00005580| 65 65 7a 69 6e 67 20 6f | 75 74 20 74 68 65 20 6d |eezing o|ut the m|
|00005590| 6f 72 65 20 61 72 67 20 | 6f 6e 63 65 20 74 68 65 |ore arg |once the|
|000055a0| 20 70 61 72 73 69 6e 67 | 20 69 73 20 64 6f 6e 65 | parsing| is done|
|000055b0| 2e 20 20 4e 6f 74 65 20 | 74 68 61 74 20 61 20 74 |. Note |that a t|
|000055c0| 61 69 6c 0a 20 20 20 20 | 6c 6f 63 61 6c 20 63 61 |ail. |local ca|
|000055d0| 6c 6c 20 77 6f 6e 27 74 | 20 62 6c 61 73 74 20 74 |ll won't| blast t|
|000055e0| 68 65 20 6d 6f 72 65 20 | 61 72 67 2c 20 73 69 6e |he more |arg, sin|
|000055f0| 63 65 20 69 6e 20 6c 6f | 63 61 6c 20 63 61 6c 6c |ce in lo|cal call|
|00005600| 20 74 68 65 20 63 61 6c | 6c 65 65 20 6a 75 73 74 | the cal|lee just|
|00005610| 0a 20 20 20 20 74 61 6b | 65 73 20 74 68 65 20 66 |. tak|es the f|
|00005620| 72 61 6d 65 20 69 74 20 | 69 73 20 67 69 76 65 6e |rame it |is given|
|00005630| 20 28 69 6e 20 74 68 69 | 73 20 63 61 73 65 20 63 | (in thi|s case c|
|00005640| 6f 6e 74 61 69 6e 69 6e | 67 20 74 68 65 20 6d 6f |ontainin|g the mo|
|00005650| 72 65 20 61 72 67 29 2e | 0a 0a 4d 6f 72 65 20 61 |re arg).|..More a|
|00005660| 72 67 73 20 69 6e 20 6c | 6f 63 61 6c 20 63 61 6c |rgs in l|ocal cal|
|00005670| 6c 3f 3f 3f 20 20 50 65 | 72 68 61 70 73 20 77 65 |l??? Pe|rhaps we|
|00005680| 20 73 68 6f 75 6c 64 20 | 6e 6f 74 20 61 74 74 65 | should |not atte|
|00005690| 6d 70 74 20 6c 6f 63 61 | 6c 20 63 61 6c 6c 20 63 |mpt loca|l call c|
|000056a0| 6f 6e 76 65 72 73 69 6f | 6e 0a 69 6e 20 74 68 69 |onversio|n.in thi|
|000056b0| 73 20 63 61 73 65 2e 20 | 20 57 65 20 61 6c 72 65 |s case. | We alre|
|000056c0| 61 64 79 20 73 70 65 63 | 69 61 6c 2d 63 61 73 65 |ady spec|ial-case|
|000056d0| 20 6b 65 79 77 6f 72 64 | 20 61 72 67 73 20 69 6e | keyword| args in|
|000056e0| 20 6c 6f 63 61 6c 20 63 | 61 6c 6c 2e 20 20 49 74 | local c|all. It|
|000056f0| 20 73 65 65 6d 73 0a 74 | 68 61 74 20 74 68 65 20 | seems.t|hat the |
|00005700| 6d 61 69 6e 20 69 6d 70 | 6f 72 74 61 6e 63 65 20 |main imp|ortance |
|00005710| 6f 66 20 6d 6f 72 65 20 | 61 72 67 73 20 69 73 20 |of more |args is |
|00005720| 70 72 69 6d 61 72 69 6c | 79 20 72 65 6c 61 74 65 |primaril|y relate|
|00005730| 64 20 74 6f 20 66 75 6c | 6c 20 63 61 6c 6c 3a 20 |d to ful|l call: |
|00005740| 69 74 20 69 73 0a 75 73 | 65 64 20 66 6f 72 20 64 |it is.us|ed for d|
|00005750| 65 66 69 6e 69 6e 67 20 | 76 61 72 69 6f 75 73 20 |efining |various |
|00005760| 6b 69 6e 64 73 20 6f 66 | 20 66 72 6f 62 73 20 74 |kinds of| frobs t|
|00005770| 68 61 74 20 6e 65 65 64 | 20 74 6f 20 74 61 6b 65 |hat need| to take|
|00005780| 20 61 72 62 69 74 72 61 | 72 79 20 61 72 67 75 6d | arbitra|ry argum|
|00005790| 65 6e 74 73 3a 0a 20 2d | 2d 20 4b 65 79 77 6f 72 |ents:. -|- Keywor|
|000057a0| 64 20 61 72 67 75 6d 65 | 6e 74 73 0a 20 2d 2d 20 |d argume|nts. -- |
|000057b0| 49 6e 74 65 72 70 72 65 | 74 65 72 20 73 74 75 62 |Interpre|ter stub|
|000057c0| 73 0a 20 2d 2d 20 22 50 | 61 73 73 20 74 68 72 6f |s. -- "P|ass thro|
|000057d0| 75 67 68 22 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |ugh" app|lication|
|000057e0| 73 20 73 75 63 68 20 61 | 73 20 64 69 73 70 61 74 |s such a|s dispat|
|000057f0| 63 68 20 66 75 6e 63 74 | 69 6f 6e 73 0a 0a 47 69 |ch funct|ions..Gi|
|00005800| 76 65 6e 20 74 68 65 20 | 6d 61 72 67 69 6e 61 6c |ven the |marginal|
|00005810| 20 69 6d 70 6f 72 74 61 | 6e 63 65 20 6f 66 20 6d | importa|nce of m|
|00005820| 6f 72 65 20 61 72 67 73 | 20 69 6e 20 6c 6f 63 61 |ore args| in loca|
|00005830| 6c 20 63 61 6c 6c 2c 20 | 69 74 20 73 65 65 6d 73 |l call, |it seems|
|00005840| 20 75 6e 77 6f 72 74 68 | 0a 67 6f 69 6e 67 20 74 | unworth|.going t|
|00005850| 6f 20 61 6e 79 20 69 6d | 70 6c 65 6d 65 6e 74 61 |o any im|plementa|
|00005860| 74 69 6f 6e 20 64 69 66 | 66 69 63 75 6c 74 79 2e |tion dif|ficulty.|
|00005870| 20 20 49 6e 20 66 61 63 | 74 2c 20 69 74 20 73 65 | In fac|t, it se|
|00005880| 65 6d 73 20 74 68 61 74 | 20 69 74 20 77 6f 75 6c |ems that| it woul|
|00005890| 64 20 63 61 75 73 65 0a | 63 6f 6d 70 6c 69 63 61 |d cause.|complica|
|000058a0| 74 69 6f 6e 73 20 62 6f | 74 68 20 61 74 20 74 68 |tions bo|th at th|
|000058b0| 65 20 56 4d 52 20 6c 65 | 76 65 6c 20 61 6e 64 20 |e VMR le|vel and |
|000058c0| 61 6c 73 6f 20 69 6e 20 | 74 68 65 20 56 4d 20 64 |also in |the VM d|
|000058d0| 65 66 69 6e 69 74 69 6f | 6e 2e 20 20 54 68 69 73 |efinitio|n. This|
|000058e0| 20 62 65 69 6e 67 0a 74 | 68 65 20 63 61 73 65 2c | being.t|he case,|
|000058f0| 20 77 65 20 73 68 6f 75 | 6c 64 20 66 6c 75 73 68 | we shou|ld flush|
|00005900| 20 69 74 2e 0a 0a 0a 5c | 73 65 63 74 69 6f 6e 7b | it....\|section{|
|00005910| 46 75 6e 63 74 69 6f 6e | 20 43 61 6c 6c 7d 0a 0a |Function| Call}..|
|00005920| 0a 0c 0a 5c 73 75 62 73 | 65 63 74 69 6f 6e 7b 52 |...\subs|ection{R|
|00005930| 65 67 69 73 74 65 72 73 | 20 61 6e 64 20 66 72 61 |egisters| and fra|
|00005940| 6d 65 20 66 6f 72 6d 61 | 74 7d 0a 0a 54 68 65 73 |me forma|t}..Thes|
|00005950| 65 20 72 65 67 69 73 74 | 65 72 73 20 61 72 65 20 |e regist|ers are |
|00005960| 75 73 65 64 20 69 6e 20 | 66 75 6e 63 74 69 6f 6e |used in |function|
|00005970| 20 63 61 6c 6c 20 61 6e | 64 20 72 65 74 75 72 6e | call an|d return|
|00005980| 3a 0a 0a 41 30 2e 2e 41 | 7b 5c 69 74 20 6e 7d 0a |:..A0..A|{\it n}.|
|00005990| 20 20 20 20 49 6e 20 66 | 75 6c 6c 20 63 61 6c 6c | In f|ull call|
|000059a0| 2c 20 74 68 65 20 66 69 | 72 73 74 20 74 68 72 65 |, the fi|rst thre|
|000059b0| 65 20 61 72 67 75 6d 65 | 6e 74 73 2e 20 20 49 6e |e argume|nts. In|
|000059c0| 20 75 6e 6b 6e 6f 77 6e | 20 76 61 6c 75 65 73 20 | unknown| values |
|000059d0| 72 65 74 75 72 6e 2c 20 | 74 68 65 0a 20 20 20 20 |return, |the. |
|000059e0| 66 69 72 73 74 20 74 68 | 72 65 65 20 72 65 74 75 |first th|ree retu|
|000059f0| 72 6e 20 76 61 6c 75 65 | 73 2e 0a 0a 43 46 50 0a |rn value|s...CFP.|
|00005a00| 20 20 20 20 54 68 65 20 | 63 75 72 72 65 6e 74 20 | The |current |
|00005a10| 66 72 61 6d 65 20 70 6f | 69 6e 74 65 72 2e 20 20 |frame po|inter. |
|00005a20| 49 6e 20 66 75 6c 6c 20 | 63 61 6c 6c 2c 20 74 68 |In full |call, th|
|00005a30| 69 73 20 69 6e 69 74 69 | 61 6c 6c 79 20 70 6f 69 |is initi|ally poi|
|00005a40| 6e 74 73 20 74 6f 20 61 | 0a 20 20 20 20 70 61 72 |nts to a|. par|
|00005a50| 74 69 61 6c 20 66 72 61 | 6d 65 20 6c 61 72 67 65 |tial fra|me large|
|00005a60| 20 65 6e 6f 75 67 68 20 | 74 6f 20 68 6f 6c 64 20 | enough |to hold |
|00005a70| 74 68 65 20 70 61 73 73 | 65 64 20 73 74 61 63 6b |the pass|ed stack|
|00005a80| 20 61 72 67 75 6d 65 6e | 74 73 20 28 7a 65 72 6f | argumen|ts (zero|
|00005a90| 2d 6c 65 6e 67 74 68 0a | 20 20 20 20 69 66 20 6e |-length.| if n|
|00005aa0| 6f 6e 65 29 2e 0a 0a 43 | 53 50 0a 20 20 20 20 54 |one)...C|SP. T|
|00005ab0| 68 65 20 63 75 72 72 65 | 6e 74 20 63 6f 6e 74 72 |he curre|nt contr|
|00005ac0| 6f 6c 20 73 74 61 63 6b | 20 74 6f 70 20 70 6f 69 |ol stack| top poi|
|00005ad0| 6e 74 65 72 2e 20 0a 0a | 4f 43 46 50 0a 20 20 20 |nter. ..|OCFP. |
|00005ae0| 20 49 6e 20 66 75 6c 6c | 20 63 61 6c 6c 2c 20 74 | In full| call, t|
|00005af0| 68 65 20 70 61 73 73 69 | 6e 67 20 6c 6f 63 61 74 |he passi|ng locat|
|00005b00| 69 6f 6e 20 66 6f 72 20 | 74 68 65 20 66 72 61 6d |ion for |the fram|
|00005b10| 65 20 74 6f 20 72 65 74 | 75 72 6e 20 74 6f 2e 0a |e to ret|urn to..|
|00005b20| 0a 20 20 20 20 49 6e 20 | 75 6e 6b 6e 6f 77 6e 2d |. In |unknown-|
|00005b30| 76 61 6c 75 65 73 20 72 | 65 74 75 72 6e 20 6f 66 |values r|eturn of|
|00005b40| 20 6f 74 68 65 72 20 74 | 68 61 6e 20 6f 6e 65 20 | other t|han one |
|00005b50| 76 61 6c 75 65 2c 20 74 | 68 65 20 70 6f 69 6e 74 |value, t|he point|
|00005b60| 65 72 20 74 6f 20 72 65 | 74 75 72 6e 65 64 0a 20 |er to re|turned. |
|00005b70| 20 20 20 73 74 61 63 6b | 20 76 61 6c 75 65 73 2e | stack| values.|
|00005b80| 20 20 49 6e 20 73 75 63 | 68 20 61 20 72 65 74 75 | In suc|h a retu|
|00005b90| 72 6e 2c 20 4f 43 46 50 | 20 69 73 20 61 6c 77 61 |rn, OCFP| is alwa|
|00005ba0| 79 73 20 69 6e 69 74 69 | 61 6c 69 7a 65 64 20 74 |ys initi|alized t|
|00005bb0| 6f 20 70 6f 69 6e 74 20 | 74 6f 0a 20 20 20 20 74 |o point |to. t|
|00005bc0| 68 65 20 66 72 61 6d 65 | 20 72 65 74 75 72 6e 65 |he frame| returne|
|00005bd0| 64 20 66 72 6f 6d 2c 20 | 65 76 65 6e 20 77 68 65 |d from, |even whe|
|00005be0| 6e 20 6e 6f 20 73 74 61 | 63 6b 20 76 61 6c 75 65 |n no sta|ck value|
|00005bf0| 73 20 61 72 65 20 72 65 | 74 75 72 6e 65 64 2e 20 |s are re|turned. |
|00005c00| 20 54 68 69 73 0a 20 20 | 20 20 61 6c 6c 6f 77 73 | This. | allows|
|00005c10| 20 4f 43 46 50 20 74 6f | 20 62 65 20 75 73 65 64 | OCFP to| be used|
|00005c20| 20 74 6f 20 72 65 73 74 | 6f 72 65 20 43 53 50 2e | to rest|ore CSP.|
|00005c30| 0a 0a 4c 52 41 0a 20 20 | 20 20 49 6e 20 66 75 6c |..LRA. | In ful|
|00005c40| 6c 20 63 61 6c 6c 2c 20 | 74 68 65 20 70 61 73 73 |l call, |the pass|
|00005c50| 69 6e 67 20 6c 6f 63 61 | 74 69 6f 6e 20 66 6f 72 |ing loca|tion for|
|00005c60| 20 74 68 65 20 72 65 74 | 75 72 6e 20 50 43 2e 0a | the ret|urn PC..|
|00005c70| 0a 4e 41 52 47 53 0a 20 | 20 20 20 49 6e 20 66 75 |.NARGS. | In fu|
|00005c80| 6c 6c 20 63 61 6c 6c 2c | 20 74 68 65 20 6e 75 6d |ll call,| the num|
|00005c90| 62 65 72 20 6f 66 20 61 | 72 67 75 6d 65 6e 74 73 |ber of a|rguments|
|00005ca0| 20 70 61 73 73 65 64 2e | 20 20 49 6e 20 75 6e 6b | passed.| In unk|
|00005cb0| 6e 6f 77 6e 2d 76 61 6c | 75 65 73 20 72 65 74 75 |nown-val|ues retu|
|00005cc0| 72 6e 20 6f 66 0a 20 20 | 20 20 6f 74 68 65 72 20 |rn of. | other |
|00005cd0| 74 68 61 6e 20 6f 6e 65 | 20 76 61 6c 75 65 2c 20 |than one| value, |
|00005ce0| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 76 61 |the numb|er of va|
|00005cf0| 6c 75 65 73 20 72 65 74 | 75 72 6e 65 64 2e 0a 0a |lues ret|urned...|
|00005d00| 0c 0a 5c 73 75 62 73 65 | 63 74 69 6f 6e 7b 46 75 |..\subse|ction{Fu|
|00005d10| 6c 6c 20 63 61 6c 6c 7d | 0a 0a 57 68 61 74 20 69 |ll call}|..What i|
|00005d20| 73 20 6f 75 72 20 75 73 | 61 67 65 20 6f 66 20 43 |s our us|age of C|
|00005d30| 46 50 2c 20 4f 43 46 50 | 20 61 6e 64 20 43 53 50 |FP, OCFP| and CSP|
|00005d40| 3f 20 20 0a 0a 49 74 20 | 69 73 20 61 6e 20 69 6e |? ..It |is an in|
|00005d50| 76 61 72 69 61 6e 74 20 | 74 68 61 74 20 43 53 50 |variant |that CSP|
|00005d60| 20 61 6c 77 61 79 73 20 | 70 6f 69 6e 74 73 20 61 | always |points a|
|00005d70| 66 74 65 72 20 61 6e 79 | 20 75 73 65 66 75 6c 20 |fter any| useful |
|00005d80| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 73 6f 20 74 |informat|ion so t|
|00005d90| 68 61 74 0a 61 74 20 61 | 6e 79 20 74 69 6d 65 20 |hat.at a|ny time |
|00005da0| 61 6e 20 69 6e 74 65 72 | 72 75 70 74 20 63 61 6e |an inter|rupt can|
|00005db0| 20 63 6f 6d 65 20 61 6e | 64 20 61 6c 6c 6f 63 61 | come an|d alloca|
|00005dc0| 74 65 20 73 74 75 66 66 | 20 69 6e 20 74 68 65 20 |te stuff| in the |
|00005dd0| 73 74 61 63 6b 2e 0a 0a | 54 52 20 63 61 6c 6c 20 |stack...|TR call |
|00005de0| 69 73 20 61 6c 73 6f 20 | 61 20 63 6f 6e 73 74 72 |is also |a constr|
|00005df0| 61 69 6e 74 3a 20 77 65 | 20 63 61 6e 27 74 20 64 |aint: we| can't d|
|00005e00| 65 61 6c 6c 6f 63 61 74 | 65 20 74 68 65 20 63 61 |eallocat|e the ca|
|00005e10| 6c 6c 65 72 27 73 20 66 | 72 61 6d 65 20 62 65 66 |ller's f|rame bef|
|00005e20| 6f 72 65 20 74 68 65 0a | 63 61 6c 6c 2c 20 73 69 |ore the.|call, si|
|00005e30| 6e 63 65 20 69 74 20 68 | 6f 6c 64 73 20 74 68 65 |nce it h|olds the|
|00005e40| 20 73 74 61 63 6b 20 61 | 72 67 75 6d 65 6e 74 73 | stack a|rguments|
|00005e50| 20 66 6f 72 20 74 68 65 | 20 63 61 6c 6c 2e 20 20 | for the| call. |
|00005e60| 0a 0a 57 68 61 74 20 77 | 65 20 64 6f 20 69 73 20 |..What w|e do is |
|00005e70| 68 61 76 65 20 74 68 65 | 20 63 61 6c 6c 65 72 20 |have the| caller |
|00005e80| 73 65 74 20 75 70 20 43 | 46 50 2c 20 61 6e 64 20 |set up C|FP, and |
|00005e90| 68 61 76 65 20 74 68 65 | 20 63 61 6c 6c 65 65 20 |have the| callee |
|00005ea0| 73 65 74 20 43 53 50 20 | 74 6f 20 43 46 50 0a 70 |set CSP |to CFP.p|
|00005eb0| 6c 75 73 20 74 68 65 20 | 66 72 61 6d 65 20 73 69 |lus the |frame si|
|00005ec0| 7a 65 2e 20 20 54 68 65 | 20 63 61 6c 6c 65 72 20 |ze. The| caller |
|00005ed0| 6c 65 61 76 65 73 20 43 | 53 50 20 61 6c 6f 6e 65 |leaves C|SP alone|
|00005ee0| 3a 20 74 68 65 20 63 61 | 6c 6c 65 65 20 69 73 20 |: the ca|llee is |
|00005ef0| 74 68 65 20 6f 6e 65 20 | 77 68 6f 0a 64 6f 65 73 |the one |who.does|
|00005f00| 20 61 6e 79 20 6e 65 63 | 65 73 73 61 72 79 20 73 | any nec|essary s|
|00005f10| 74 61 63 6b 20 64 65 61 | 6c 6c 6f 63 61 74 69 6f |tack dea|llocatio|
|00005f20| 6e 2e 0a 0a 49 6e 20 61 | 20 54 52 20 63 61 6c 6c |n...In a| TR call|
|00005f30| 2c 20 77 65 20 64 6f 6e | 27 74 20 64 6f 20 61 6e |, we don|'t do an|
|00005f40| 79 74 68 69 6e 67 3a 20 | 43 46 50 20 69 73 20 6c |ything: |CFP is l|
|00005f50| 65 66 74 20 61 73 20 43 | 46 50 2c 20 61 6e 64 20 |eft as C|FP, and |
|00005f60| 43 53 50 20 70 6f 69 6e | 74 73 20 74 6f 20 74 68 |CSP poin|ts to th|
|00005f70| 65 0a 65 6e 64 20 6f 66 | 20 74 68 65 20 66 72 61 |e.end of| the fra|
|00005f80| 6d 65 2c 20 6b 65 65 70 | 69 6e 67 20 74 68 65 20 |me, keep|ing the |
|00005f90| 73 74 61 63 6b 20 61 72 | 67 75 6d 65 6e 74 73 20 |stack ar|guments |
|00005fa0| 66 72 6f 6d 20 62 65 69 | 6e 67 20 74 72 61 73 68 |from bei|ng trash|
|00005fb0| 65 64 2e 0a 0a 49 6e 20 | 61 20 6e 6f 72 6d 61 6c |ed...In |a normal|
|00005fc0| 20 63 61 6c 6c 2c 20 43 | 46 50 20 69 73 20 73 65 | call, C|FP is se|
|00005fd0| 74 20 74 6f 20 43 53 50 | 2c 20 63 61 75 73 69 6e |t to CSP|, causin|
|00005fe0| 67 20 74 68 65 20 63 61 | 6c 6c 65 65 27 73 20 66 |g the ca|llee's f|
|00005ff0| 72 61 6d 65 20 74 6f 20 | 62 65 20 61 6c 6c 6f 63 |rame to |be alloc|
|00006000| 61 74 65 64 0a 61 66 74 | 65 72 20 74 68 65 20 63 |ated.aft|er the c|
|00006010| 75 72 72 65 6e 74 20 66 | 72 61 6d 65 2e 0a 0a 0c |urrent f|rame....|
|00006020| 0a 5c 73 75 62 73 65 63 | 74 69 6f 6e 7b 55 6e 6b |.\subsec|tion{Unk|
|00006030| 6e 6f 77 6e 20 76 61 6c | 75 65 73 20 72 65 74 75 |nown val|ues retu|
|00006040| 72 6e 7d 0a 0a 54 68 65 | 20 75 6e 6b 6e 6f 77 6e |rn}..The| unknown|
|00006050| 20 76 61 6c 75 65 73 20 | 72 65 74 75 72 6e 20 63 | values |return c|
|00006060| 6f 6e 76 65 6e 74 69 6f | 6e 20 69 73 20 61 6c 77 |onventio|n is alw|
|00006070| 61 79 73 20 75 73 65 64 | 20 69 6e 20 66 75 6c 6c |ays used| in full|
|00006080| 20 63 61 6c 6c 2c 20 61 | 6e 64 20 69 73 20 75 73 | call, a|nd is us|
|00006090| 65 64 0a 69 6e 20 6c 6f | 63 61 6c 20 63 61 6c 6c |ed.in lo|cal call|
|000060a0| 20 77 68 65 6e 20 74 68 | 65 20 63 6f 6d 70 69 6c | when th|e compil|
|000060b0| 65 72 20 65 69 74 68 65 | 72 20 63 61 6e 27 74 20 |er eithe|r can't |
|000060c0| 70 72 6f 76 65 20 74 68 | 61 74 20 61 20 66 69 78 |prove th|at a fix|
|000060d0| 65 64 20 6e 75 6d 62 65 | 72 20 6f 66 0a 76 61 6c |ed numbe|r of.val|
|000060e0| 75 65 73 20 61 72 65 20 | 72 65 74 75 72 6e 65 64 |ues are |returned|
|000060f0| 2c 20 6f 72 20 64 65 63 | 69 64 65 73 20 6e 6f 74 |, or dec|ides not|
|00006100| 20 74 6f 20 75 73 65 20 | 74 68 65 20 66 69 78 65 | to use |the fixe|
|00006110| 64 20 76 61 6c 75 65 73 | 20 63 6f 6e 76 65 6e 74 |d values| convent|
|00006120| 69 6f 6e 20 74 6f 20 61 | 6c 6c 6f 77 0a 74 61 69 |ion to a|llow.tai|
|00006130| 6c 2d 72 65 63 75 72 73 | 69 76 65 20 58 45 50 20 |l-recurs|ive XEP |
|00006140| 63 61 6c 6c 73 2e 0a 0a | 54 68 65 20 75 6e 6b 6e |calls...|The unkn|
|00006150| 6f 77 6e 2d 76 61 6c 75 | 65 73 20 72 65 74 75 72 |own-valu|es retur|
|00006160| 6e 20 63 6f 6e 76 65 6e | 74 69 6f 6e 20 68 61 73 |n conven|tion has|
|00006170| 20 76 61 72 69 61 6e 74 | 73 3a 20 73 69 6e 67 6c | variant|s: singl|
|00006180| 65 20 76 61 6c 75 65 20 | 61 6e 64 20 76 61 72 69 |e value |and vari|
|00006190| 61 62 6c 65 0a 76 61 6c | 75 65 73 2e 20 20 57 65 |able.val|ues. We|
|000061a0| 20 6d 61 6b 65 20 74 68 | 69 73 20 64 69 73 74 69 | make th|is disti|
|000061b0| 6e 63 74 69 6f 6e 20 74 | 6f 20 6f 70 74 69 6d 69 |nction t|o optimi|
|000061c0| 7a 65 20 74 68 65 20 69 | 6d 70 6f 72 74 61 6e 74 |ze the i|mportant|
|000061d0| 20 63 61 73 65 20 6f 66 | 20 61 20 72 65 74 75 72 | case of| a retur|
|000061e0| 6e 65 72 0a 77 68 6f 73 | 65 20 6b 6e 6f 77 73 20 |ner.whos|e knows |
|000061f0| 65 78 61 63 74 6c 79 20 | 6f 6e 65 20 76 61 6c 75 |exactly |one valu|
|00006200| 65 20 69 73 20 62 65 69 | 6e 67 20 72 65 74 75 72 |e is bei|ng retur|
|00006210| 6e 65 64 2e 20 20 4e 6f | 74 65 20 74 68 61 74 20 |ned. No|te that |
|00006220| 69 74 20 69 73 20 70 6f | 73 73 69 62 6c 65 20 74 |it is po|ssible t|
|00006230| 6f 0a 72 65 74 75 72 6e | 20 61 20 73 69 6e 67 6c |o.return| a singl|
|00006240| 65 20 76 61 6c 75 65 20 | 75 73 69 6e 67 20 74 68 |e value |using th|
|00006250| 65 20 76 61 72 69 61 62 | 6c 65 2d 76 61 6c 75 65 |e variab|le-value|
|00006260| 73 20 63 6f 6e 76 65 6e | 74 69 6f 6e 2c 20 62 75 |s conven|tion, bu|
|00006270| 74 20 69 74 20 69 73 20 | 6c 65 73 73 0a 65 66 66 |t it is |less.eff|
|00006280| 69 63 69 65 6e 74 2e 0a | 0a 57 65 20 69 6e 64 69 |icient..|.We indi|
|00006290| 63 61 74 65 20 73 69 6e | 67 6c 65 2d 76 61 6c 75 |cate sin|gle-valu|
|000062a0| 65 20 72 65 74 75 72 6e | 20 62 79 20 72 65 74 75 |e return| by retu|
|000062b0| 72 6e 69 6e 67 20 61 74 | 20 74 68 65 20 72 65 74 |rning at| the ret|
|000062c0| 75 72 6e 2d 70 63 2b 34 | 3b 20 76 61 72 69 61 62 |urn-pc+4|; variab|
|000062d0| 6c 65 20 76 61 6c 75 65 | 0a 72 65 74 75 72 6e 20 |le value|.return |
|000062e0| 69 73 20 69 6e 64 69 63 | 61 74 65 64 20 62 79 20 |is indic|ated by |
|000062f0| 72 65 74 75 72 6e 69 6e | 67 20 61 74 20 74 68 65 |returnin|g at the|
|00006300| 20 72 65 74 75 72 6e 20 | 50 43 2e 0a 0a 53 69 6e | return |PC...Sin|
|00006310| 67 6c 65 2d 76 61 6c 75 | 65 20 72 65 74 75 72 6e |gle-valu|e return|
|00006320| 20 6d 61 6b 65 73 20 6f | 6e 6c 79 20 74 68 65 20 | makes o|nly the |
|00006330| 66 6f 6c 6c 6f 77 69 6e | 67 20 67 75 61 72 61 6e |followin|g guaran|
|00006340| 74 65 65 73 3a 0a 20 20 | 20 20 41 30 20 68 6f 6c |tees:. | A0 hol|
|00006350| 64 73 20 74 68 65 20 76 | 61 6c 75 65 20 72 65 74 |ds the v|alue ret|
|00006360| 75 72 6e 65 64 2e 0a 20 | 20 20 20 43 53 50 20 68 |urned.. | CSP h|
|00006370| 61 73 20 62 65 65 6e 20 | 72 65 73 65 74 3a 20 74 |as been |reset: t|
|00006380| 68 65 72 65 20 69 73 20 | 6e 6f 20 67 61 72 62 61 |here is |no garba|
|00006390| 67 65 20 6f 6e 20 74 68 | 65 20 73 74 61 63 6b 2e |ge on th|e stack.|
|000063a0| 0a 0a 49 6e 20 76 61 72 | 69 61 62 6c 65 20 76 61 |..In var|iable va|
|000063b0| 6c 75 65 20 72 65 74 75 | 72 6e 2c 20 6d 6f 72 65 |lue retu|rn, more|
|000063c0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 69 73 20 | informa|tion is |
|000063d0| 70 61 73 73 65 64 20 62 | 61 63 6b 3a 0a 20 20 20 |passed b|ack:. |
|000063e0| 20 41 30 2e 2e 41 32 20 | 68 6f 6c 64 20 74 68 65 | A0..A2 |hold the|
|000063f0| 20 66 69 72 73 74 20 74 | 68 72 65 65 20 72 65 74 | first t|hree ret|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.