3 <ENTRY ALLTYPES-ANA ROOT-ANA ERRORS-ANA INTERRUPTS-ANA INFO-GEN OBLIST?-ANA OBLIST?-GEN
4 ASSOCIATIONS-ANA NEXT-ANA ASSOC-HACK ASSOC-FIELD-GET AS-NXT-GEN>
6 <USE "SYMANA" "CHKDCL" "CODGEN" "CACS" "COMCOD" "COMPDEC">
8 <DEFINE ALLTYPES-ANA (N R)
9 <INFO-GET .N .R |TYPVEC '<VECTOR [REST ATOM]>>>
11 <DEFINE ROOT-ANA (N R) <INFO-GET .N .R |ROOT OBLIST>>
13 <DEFINE ERRORS-ANA (N R) <INFO-GET .N .R |ERROBL OBLISTT>>
15 <DEFINE INTERRUPTS-ANA (N R) <INFO-GET .N .R |INTOBL OBLIST>>
17 <DEFINE INFO-GET (N R SYM TYP)
19 <ARGCHK <LENGTH <KIDS .N>> 0 <NODE-NAME .N>>
20 <PUT .N ,NODE-TYPE ,INFO-CODE>
21 <PUT .N ,NODE-NAME .SYM>
25 "AUX" (ADR <ADDRESS:C <NODE-NAME .N>>))
26 #DECL ((N) NODE (VALUE) DATUM)
27 <MOVE:ARG <DATUM <ISTYPE? <RESULT-TYPE .N>> .ADR> .W>>
29 <PUT ,ALLTYPES ANALYSIS ,ALLTYPES-ANA>
31 <PUT ,ROOT ANALYSIS ,ROOT-ANA>
33 <PUT ,ERRORS ANALYSIS ,ERRORS-ANA>
35 <PUT ,INTERRUPTS ANALYSIS ,INTERRUPTS-ANA>
37 <DEFINE OBLIST?-ANA (N R "AUX" (K <KIDS .N>))
38 #DECL ((N) NODE (K) <LIST [REST NODE]>)
39 <COND (<SEGFLUSH .N .R>)
41 <ARGCHK <LENGTH .K> 1 OBLIST?>
42 <EANA <1 .K> ATOM OBLIST?>
43 <PUT .N ,NODE-TYPE ,OBLIST?-CODE>)>
44 <TYPE-OK? '<OR FALSE OBLIST> .R>>
46 <PUT ,OBLIST? ANALYSIS ,OBLIST?-ANA>
48 <DEFINE OBLIST?-GEN (N W
49 "OPTIONAL" (NOTF <>) (BRANCH <>) (DIR <>)
50 "AUX" (FLS <==? .W FLUSHED>) (SDIR .DIR)
52 <COND (<AND .FLS .BRANCH> .BRANCH)
53 (ELSE <MAKE:TAG>)>) (B3 <MAKE:TAG>) (RW .W)
55 #DECL ((N) NODE (ATO) DATUM (NK FLS DIR SDIR NOTF BRANCH) <OR FALSE ATOM>)
56 <SET W <GOODACS .N .W>>
57 <AND .NOTF <SET DIR <NOT .DIR>>>
58 <SET ATO <GEN <1 <KIDS .N>> <DATUM ATOM ANY-AC>>>
62 <COND (<OR <==? ,MUDDLE 105> <==? ,MUDDLE 55>>
63 <EMIT <INSTRUCTION <COND (.DIR `SKIPE ) (ELSE `SKIPN )>
65 (<ADDRSYM <DATVAL .ATO>>)>>
69 <EMIT <INSTRUCTION `HRRZ 2 (<ADDRSYM <DATVAL .ATO>>)>>
70 <EMIT <INSTRUCTION <COND (.DIR `JUMPN) (ELSE `JUMPE)> .BRANCH>>
72 (<OR .NOTF <NOT <==? <NOT .BRANCH> <NOT .DIR>>>>
74 <COND (<OR <==? ,MUDDLE 105> <==? ,MUDDLE 55>>
75 <EMIT <INSTRUCTION <COND (.DIR `SKIPE ) (ELSE `SKIPN )>
77 (<ADDRSYM <DATVAL .ATO>>)>>
80 <EMIT <INSTRUCTION `HRRZ 2 (<ADDRSYM <DATVAL .ATO>>)>>
81 <EMIT <INSTRUCTION <COND (.DIR `JUMPN) (ELSE `JUMPE)> .B3>>)>
82 <MOVE:ARG <REFERENCE .SDIR> .W>
86 <SET W2 <DATUM OBLIST <DATVAL .W>>>
87 <COND (<TYPE? <DATVAL .W2> AC>
88 <SGETREG <SET VAC <DATVAL .W2>> .W2>)
89 (ELSE <PUT .W2 ,DATVAL <SET VAC <GETREG .W2>>>)>
92 <COND (<OR <==? ,MUDDLE 105> <==? ,MUDDLE 55>>
93 <EMIT <INSTRUCTION `SKIPN <ACSYM .VAC> 2
94 (<ADDRSYM <DATVAL .ATO>>)>>)
96 <EMIT <INSTRUCTION `HRRZ <ACSYM .VAC> 2
97 (<ADDRSYM <DATVAL .ATO>>)>>)>
98 <COND (<==? .BRANCH .B2>
99 <COND (<OR <==? ,MUDDLE 105> <==? ,MUDDLE 55>>
100 <BRANCH:TAG .BRANCH>)
102 <EMIT <INSTRUCTION `JUMPE <ACSYM .VAC> .BRANCH>>)>
103 <GEN-OBL .VAC .W .W2>)
105 <COND (<OR <==? ,MUDDLE 105> <==? ,MUDDLE 55>>
108 <EMIT <INSTRUCTION `JUMPE <ACSYM .VAC> .B3>>)>
109 <GEN-OBL .VAC .W .W2>
113 <COND (<OR <==? ,MUDDLE 105> <==? ,MUDDLE 55>>
114 <EMIT <INSTRUCTION `SKIPN <ACSYM .VAC> 2
115 (<ADDRSYM <DATVAL .ATO>>)>>
118 <EMIT <INSTRUCTION `HRRZ <ACSYM .VAC> 2
119 (<ADDRSYM <DATVAL .ATO>>)>>
120 <EMIT <INSTRUCTION `JUMPE <ACSYM .VAC> .B2>>)>
121 <GEN-OBL .VAC .W .W2>
125 <MOVE:ARG <REFERENCE <>> .W>
129 <DEFINE GEN-OBL (AC W1 W2 "AUX" (B <MAKE:TAG>))
130 #DECL ((AC) AC (W1 W2) DATUM)
131 <COND (<OR <==? ,MUDDLE 105> <==? ,MUDDLE 55>>
132 <EMIT <INSTRUCTION `JUMPL <ACSYM .AC> .B>>
133 <EMIT <INSTRUCTION `MOVE <ACSYM .AC> (<ADDRSYM .AC>)>>
136 <EMIT <INSTRUCTION `CAMGE <ACSYM .AC> |VECBOT>>
137 <EMIT <INSTRUCTION `MOVE <ACSYM .AC> (<ADDRSYM .AC>)>>
138 <EMIT <INSTRUCTION `HRLI <ACSYM .AC> -1>>)>
141 <DEFINE ASSOCIATIONS-ANA (N R) <AS-NXT .N .R <>>>
143 <DEFINE NEXT-ANA (N R) <AS-NXT .N .R T>>
145 <DEFINE AS-NXT (N R ARG)
146 <COND (<SEGFLUSH .N .R>)
149 <ARGCHK <LENGTH <KIDS .N>> 1 NEXT>
150 <EANA <1 <KIDS .N>> ASOC NEXT>)
151 (ELSE <ARGCHK <LENGTH <KIDS .N>> 0 ASSOCIATIONS>)>
152 <PUT .N ,NODE-TYPE ,AS-NXT-CODE>)>
153 <TYPE-OK? .R '<OR ASOC FALSE>>>
155 <DEFINE ASSOC-HACK (N R)
156 <COND (<SEGFLUSH .N .R>)
158 <ARGCHK <LENGTH <KIDS .N>> 1 <NODE-NAME .N>>
159 <EANA <1 <KIDS .N>> ASOC <NODE-NAME .N>>
160 <PUT .N ,NODE-TYPE ,AS-IT-IND-VAL-CODE>)>
163 <PUT ,ASSOCIATIONS ANALYSIS ,ASSOCIATIONS-ANA>
165 <PUT ,NEXT ANALYSIS ,NEXT-ANA>
167 <PUT ,ITEM ANALYSIS ,ASSOC-HACK>
169 <PUT ,INDICATOR ANALYSIS ,ASSOC-HACK>
171 <PUT ,AVALUE ANALYSIS ,ASSOC-HACK>
173 <DEFINE ASSOC-FIELD-GET (N W "AUX" (NN <1 <KIDS .N>>) DAT OFF)
174 #DECL ((N NN) NODE (OFF) FIX)
176 <COND (<==? <NODE-SUBR .N> ,ITEM> 0)
177 (<==? <NODE-SUBR .N> ,AVALUE> 2)
179 <SET DAT <GEN .NN <DATUM ASOC ANY-AC>>>
180 <SET DAT <OFFPTR .OFF .DAT ASOC>>
181 <MOVE:ARG <DATUM .DAT .DAT> .W>>
183 <DEFINE AS-NXT-GEN (N W
184 "OPTIONAL" (NOTF <>) (BRANCH <>) (DIR <>)
185 "AUX" (FLS <==? .W FLUSHED>) (SDIR .DIR)
187 <COND (<AND .FLS .BRANCH> .BRANCH)
188 (ELSE <MAKE:TAG>)>) (B3 <MAKE:TAG>) (RW .W) ATO
190 #DECL ((N) NODE (ATO) DATUM (NK FLS DIR SDIR NOTF BRANCH) <OR FALSE ATOM>)
191 <SET W <GOODACS .N .W>>
192 <AND .NOTF <SET DIR <NOT .DIR>>>
194 <COND (<==? <NODE-NAME .N> NEXT>
195 <GEN <1 <KIDS .N>> <DATUM ASOC ANY-AC>>)
197 <SET ATO <DATUM ASOC ANY-AC>>
198 <PUT .ATO ,DATVAL <GETREG .ATO>>
199 <EMIT <INSTRUCTION `MOVE
200 <ACSYM <DATVAL .ATO>>
207 <EMIT <INSTRUCTION `HRRZ `O* 6 (<ADDRSYM <DATVAL .ATO>>)>>
208 <EMIT <INSTRUCTION <COND (.DIR `JUMPN ) (ELSE `JUMPE )>
212 (<OR .NOTF <NOT <==? <NOT .BRANCH> <NOT .DIR>>>>
214 <EMIT <INSTRUCTION `HRRZ `O* 6 (<ADDRSYM <DATVAL .ATO>>)>>
215 <EMIT <INSTRUCTION <COND (.DIR `JUMPN ) (ELSE `JUMPE )> `O* .B3>>
216 <MOVE:ARG <REFERENCE .SDIR> .W>
220 <SET W2 <DATUM ASOC <DATVAL .W>>>
221 <COND (<TYPE? <DATVAL .W2> AC>
222 <SGETREG <SET VAC <DATVAL .W2>> .W2>)
223 (ELSE <PUT .W2 ,DATVAL <SET VAC <GETREG .W2>>>)>
226 <COND (<==? .BRANCH .B2>
227 <EMIT <INSTRUCTION `HRRZ
230 (<ADDRSYM <DATVAL .ATO>>)>>
231 <EMIT <INSTRUCTION `JUMPE <ACSYM .VAC> .BRANCH>>
234 <EMIT <INSTRUCTION `HRRZ
237 (<ADDRSYM <DATVAL .ATO>>)>>
238 <EMIT <INSTRUCTION `JUMPE <ACSYM .VAC> .B3>>
243 <EMIT <INSTRUCTION `HRRZ
246 (<ADDRSYM <DATVAL .ATO>>)>>
247 <EMIT <INSTRUCTION `JUMPE <ACSYM .VAC> .B2>>
252 <MOVE:ARG <REFERENCE <>> .W>