Bug Summary

File:src/ti_sef.c
Warning:line 160, column 7
Access to field 'kind' results in a dereference of a null pointer

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name ti_sef.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home/kfp/aldor/aldor/aldor/src -fcoverage-compilation-dir=/home/kfp/aldor/aldor/aldor/src -resource-dir /usr/local/lib/clang/18 -D PACKAGE_NAME="aldor" -D PACKAGE_TARNAME="aldor" -D PACKAGE_VERSION="1.4.0" -D PACKAGE_STRING="aldor 1.4.0" -D PACKAGE_BUGREPORT="aldor@xinutec.org" -D PACKAGE_URL="" -D PACKAGE="aldor" -D VERSION="1.4.0" -D YYTEXT_POINTER=1 -D HAVE_STDIO_H=1 -D HAVE_STDLIB_H=1 -D HAVE_STRING_H=1 -D HAVE_INTTYPES_H=1 -D HAVE_STDINT_H=1 -D HAVE_STRINGS_H=1 -D HAVE_SYS_STAT_H=1 -D HAVE_SYS_TYPES_H=1 -D HAVE_UNISTD_H=1 -D STDC_HEADERS=1 -D HAVE_LIBREADLINE=1 -D HAVE_READLINE_READLINE_H=1 -D HAVE_READLINE_HISTORY=1 -D HAVE_READLINE_HISTORY_H=1 -D USE_GLOOP_SHELL=1 -D GENERATOR_COROUTINES=0 -D HAVE_DLFCN_H=1 -D LT_OBJDIR=".libs/" -I . -D VCSVERSION="2c53e759f1e00e345f8b172e7139debda72fda13" -internal-isystem /usr/local/lib/clang/18/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -Wno-empty-body -Wno-enum-compare -Wno-missing-field-initializers -Wno-unused -Wno-unused-parameter -Wno-error=format -Wno-error=type-limits -Wno-error=strict-aliasing -Wno-sign-compare -Wno-error=shift-negative-value -Wno-error=clobbered -std=c99 -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/scan-build-2026-01-15-223856-845667-1 -x c ti_sef.c
1/****************************************************************************
2 *
3 * ti_sef.c: Type inference -- sefo pass.
4 *
5 * Copyright (c) 1990-2007 Aldor Software Organization Ltd (Aldor.org).
6 *
7 ***************************************************************************/
8
9#include "debug.h"
10#include "fluid.h"
11#include "format.h"
12#include "spesym.h"
13#include "stab.h"
14#include "ti_sef.h"
15#include "tinfer.h"
16#include "terror.h"
17#include "util.h"
18#include "sefo.h"
19#include "lib.h"
20#include "tposs.h"
21#include "tfsat.h"
22#include "abpretty.h"
23
24/* see ti_tdn.c for definitions of following */
25
26extern TForm tuniYieldTForm, tuniReturnTForm, tuniExitTForm;
27
28/*****************************************************************************
29 *
30 * :: Selective debug stuff
31 *
32 ****************************************************************************/
33
34Bool tipSefDebug = false((int) 0);
35#define tipSefDEBUGif (!tipSefDebug) { } else afprintf DEBUG_IF(tipSef)if (!tipSefDebug) { } else afprintf
36
37/*****************************************************************************
38 *
39 * :: Declarations for sefo pass
40 *
41 ****************************************************************************/
42
43localstatic void tisef0Generic (Stab, Sefo);
44localstatic TForm tisef0Within (Stab, Sefo, SymeList);
45localstatic void tisef0FarValue (Stab, Sefo, TForm *);
46localstatic void tisef0ApplySymIfNeeded
47 (Stab, Sefo, Length, AbSynGetter, Sefo,
48 TFormPredicate);
49localstatic void tisef0ApplySym (Stab, Sefo, Length, AbSynGetter, Sefo);
50localstatic void tisef0ApplyFType(Stab, Sefo, Sefo, Length, AbSynGetter);
51localstatic void tisef0ApplyJoin (Stab, Sefo, Sefo, Length, AbSynGetter);
52localstatic void tisef0ApplySpecialSyme
53 (Stab, Sefo);
54
55localstatic void tisefId (Stab, Sefo);
56localstatic void tisefIdSy (Stab, Sefo);
57localstatic void tisefBlank (Stab, Sefo);
58localstatic void tisefLitInteger (Stab, Sefo);
59localstatic void tisefLitFloat (Stab, Sefo);
60localstatic void tisefLitString (Stab, Sefo);
61localstatic void tisefAdd (Stab, Sefo);
62localstatic void tisefAnd (Stab, Sefo);
63localstatic void tisefApply (Stab, Sefo);
64localstatic void tisefAssert (Stab, Sefo);
65localstatic void tisefAssign (Stab, Sefo);
66localstatic void tisefBreak (Stab, Sefo);
67localstatic void tisefBuiltin (Stab, Sefo);
68localstatic void tisefCoerceTo (Stab, Sefo);
69localstatic void tisefCollect (Stab, Sefo);
70localstatic void tisefComma (Stab, Sefo);
71localstatic void tisefDeclare (Stab, Sefo);
72localstatic void tisefDefault (Stab, Sefo);
73localstatic void tisefDefine (Stab, Sefo);
74localstatic void tisefDelay (Stab, Sefo);
75localstatic void tisefDo (Stab, Sefo);
76localstatic void tisefExcept (Stab, Sefo);
77localstatic void tisefRaise (Stab, Sefo);
78localstatic void tisefExit (Stab, Sefo);
79localstatic void tisefExport (Stab, Sefo);
80localstatic void tisefExtend (Stab, Sefo);
81localstatic void tisefFix (Stab, Sefo);
82localstatic void tisefFluid (Stab, Sefo);
83localstatic void tisefFor (Stab, Sefo);
84localstatic void tisefForeignImport(Stab, Sefo);
85localstatic void tisefForeignExport(Stab, Sefo);
86localstatic void tisefFree (Stab, Sefo);
87localstatic void tisefGenerate (Stab, Sefo);
88localstatic void tisefReference (Stab, Sefo);
89localstatic void tisefGoto (Stab, Sefo);
90localstatic void tisefHas (Stab, Sefo);
91localstatic void tisefHide (Stab, Sefo);
92localstatic void tisefIf (Stab, Sefo);
93localstatic void tisefImport (Stab, Sefo);
94localstatic void tisefInline (Stab, Sefo);
95localstatic void tisefIterate (Stab, Sefo);
96localstatic void tisefLabel (Stab, Sefo);
97localstatic void tisefLambda (Stab, Sefo);
98localstatic void tisefLocal (Stab, Sefo);
99localstatic void tisefLet (Stab, Sefo);
100localstatic void tisefMacro (Stab, Sefo);
101localstatic void tisefMLambda (Stab, Sefo);
102localstatic void tisefNever (Stab, Sefo);
103localstatic void tisefNot (Stab, Sefo);
104localstatic void tisefNothing (Stab, Sefo);
105localstatic void tisefOr (Stab, Sefo);
106localstatic void tisefPretendTo (Stab, Sefo);
107localstatic void tisefQualify (Stab, Sefo);
108localstatic void tisefQuote (Stab, Sefo);
109localstatic void tisefRepeat (Stab, Sefo);
110localstatic void tisefRestrictTo (Stab, Sefo);
111localstatic void tisefReturn (Stab, Sefo);
112localstatic void tisefSelect (Stab, Sefo);
113localstatic void tisefSequence (Stab, Sefo);
114localstatic void tisefTest (Stab, Sefo);
115localstatic void tisefTry (Stab, Sefo);
116localstatic void tisefWhere (Stab, Sefo);
117localstatic void tisefWhile (Stab, Sefo);
118localstatic void tisefWith (Stab, Sefo);
119localstatic void tisefYield (Stab, Sefo);
120
121/*****************************************************************************
122 *
123 * :: Sefo pass
124 *
125 ****************************************************************************/
126
127Bool
128tiCanSefo(Sefo sefo)
129{
130 Bool result = true1;
131 Length i;
132
133 if (abIsId(sefo)((sefo)->abHdr.tag == (AB_Id)) && abIdSym(sefo)((sefo)->abId.sym) == ssymType && abSyme(sefo)((sefo)->abHdr.seman ? (sefo)->abHdr.seman->syme : 0
)
== NULL((void*)0)) {
134 abSetSyme(sefo, tfpIdSyme(stabFile(), abIdSym(sefo)((sefo)->abId.sym)));
135 }
136
137 if (abIsApply(sefo)((sefo)->abHdr.tag == (AB_Apply)))
138 tisef0ApplySpecialSyme(stabFile(), sefo);
139
140 if (abIsId(sefo)((sefo)->abHdr.tag == (AB_Id)))
141 result = abSyme(sefo)((sefo)->abHdr.seman ? (sefo)->abHdr.seman->syme : 0
)
!= NULL((void*)0);
142
143 else if (!abIsLeaf(sefo)(((sefo)->abHdr.tag) < AB_NODE_START))
144 for (i = 0; result && i < abArgc(sefo)((sefo)->abHdr.argc); i += 1)
145 result = tiCanSefo(abArgv(sefo)((sefo)->abGen.data.argv)[i]);
146
147 return result;
148}
149
150
151/* Adjust the stab as needed to localize parameter symes in sefo. */
152localstatic Stab
153tiSefoStab(Stab stab, Sefo sefo)
154{
155 if (abStab(sefo)((sefo)->abHdr.seman ? (sefo)->abHdr.seman->stab : 0
)
)
8
Assuming field 'seman' is null
9
'?' condition is false
10
Taking false branch
156 return stab;
157
158 if (abIsId(sefo)((sefo)->abHdr.tag == (AB_Id))) {
11
Assuming field 'tag' is equal to AB_Id
159 assert(abSyme(sefo))do { if (!(((sefo)->abHdr.seman ? (sefo)->abHdr.seman->
syme : 0))) _do_assert(("abSyme(sefo)"),"ti_sef.c",159); } while
(0)
;
12
Taking true branch
13
'?' condition is false
14
Taking true branch
160 if (symeIsParam(abSyme(sefo))(((((((sefo)->abHdr.seman ? (sefo)->abHdr.seman->syme
: 0))->kind == SYME_Trigger ? libGetAllSymes((((sefo)->
abHdr.seman ? (sefo)->abHdr.seman->syme : 0))->lib) :
((void*)0)), (((sefo)->abHdr.seman ? (sefo)->abHdr.seman
->syme : 0)))->kind) == SYME_Param)
)
15
Loop condition is false. Exiting loop
16
'?' condition is false
17
Access to field 'kind' results in a dereference of a null pointer
161 stab = stabFindLevel(stab, abSyme(sefo)((sefo)->abHdr.seman ? (sefo)->abHdr.seman->syme : 0
)
);
162 }
163
164 else if (!abIsLeaf(sefo)(((sefo)->abHdr.tag) < AB_NODE_START)) {
165 Length i;
166 for (i = 0; i < abArgc(sefo)((sefo)->abHdr.argc); i += 1)
167 stab = tiSefoStab(stab, abArgv(sefo)((sefo)->abGen.data.argv)[i]);
168 }
169
170 return stab;
171}
172
173void
174tiSefo(Stab stab, Sefo sefo)
175{
176 Scope("tiSefo")String scopeName = ("tiSefo"); int fluidLevel0 = (scopeLevel++
, fluidLevel)
;
177
178 TForm fluid(tuniReturnTForm)fluidSave_tuniReturnTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniReturnTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniReturnTForm
, fluidStack[fluidLevel].size = sizeof(tuniReturnTForm), fluidLevel
++, (tuniReturnTForm) )
;
1
Assuming 'fluidLevel' is not equal to 'fluidLimit'
2
'?' condition is false
179 TForm fluid(tuniYieldTForm)fluidSave_tuniYieldTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniYieldTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniYieldTForm
, fluidStack[fluidLevel].size = sizeof(tuniYieldTForm), fluidLevel
++, (tuniYieldTForm) )
;
3
Assuming 'fluidLevel' is not equal to 'fluidLimit'
4
'?' condition is false
180 TForm fluid(tuniExitTForm)fluidSave_tuniExitTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniExitTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniExitTForm
, fluidStack[fluidLevel].size = sizeof(tuniExitTForm), fluidLevel
++, (tuniExitTForm) )
;
5
Assuming 'fluidLevel' is not equal to 'fluidLimit'
6
'?' condition is false
181
182 tuniReturnTForm = tfNone()tfMulti(0);
183 tuniYieldTForm = tfNone()tfMulti(0);
184 tuniExitTForm = tfNone()tfMulti(0);
185
186 stab = tiSefoStab(stab, sefo);
7
Calling 'tiSefoStab'
187 tisef(stab, sefo);
188
189 ReturnNothing{ fluidUnwind(fluidLevel0, ((int) 0)); return;; };
190}
191
192void
193tisef(Stab stab, Sefo sefo)
194{
195 static int serialNo = 0, depthNo = 0;
196 int serialThis;
197
198 assert(sefo)do { if (!(sefo)) _do_assert(("sefo"),"ti_sef.c",198); } while
(0)
;
199
200 if (abState(sefo)((sefo)->abHdr.state) == AB_State_HasUnique)
201 return;
202
203 if (abState(sefo)((sefo)->abHdr.state) == AB_State_HasPoss) {
204 TPoss tposs = abTPoss(sefo)((sefo)->abHdr.type.poss);
205
206 if (tpossIsUnique(tposs))
207 abTUnique(sefo)((sefo)->abHdr.type.unique) = tpossUnique(tposs);
208 else {
209 terrorNotUniqueType(ALDOR_E_TinExprMeans164,
210 sefo, tfNone()tfMulti(0), tposs);
211 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfUnknown;
212 }
213 abState(sefo)((sefo)->abHdr.state) = AB_State_HasUnique;
214 tpossFree(tposs);
215 return;
216 }
217
218 if (!abIsLeaf(sefo)(((sefo)->abHdr.tag) < AB_NODE_START) && abStab(sefo)((sefo)->abHdr.seman ? (sefo)->abHdr.seman->stab : 0
)
)
219 stab = abStab(sefo)((sefo)->abHdr.seman ? (sefo)->abHdr.seman->stab : 0
)
;
220
221 serialNo += 1;
222 depthNo += 1;
223 serialThis = serialNo;
224 if (DEBUG(tipSef)tipSefDebug) {
225 fprintf(dbOut,"->Sef: %*s%d= ", depthNo, "", serialThis);
226 abPrettyPrint(dbOut, sefo);
227 fnewline(dbOut);
228 }
229
230 abState(sefo)((sefo)->abHdr.state) = AB_State_HasUnique;
231 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfUnknown;
232
233 AB_SWITCH(sefo, tisef, (stab, sefo))switch (((sefo)->abHdr.tag)) { case AB_Id: tisefId (stab, sefo
); break; case AB_IdSy: tisefIdSy (stab, sefo); break; case AB_Blank
: tisefBlank (stab, sefo); break; case AB_LitInteger: tisefLitInteger
(stab, sefo); break; case AB_LitFloat: tisefLitFloat (stab, sefo
); break; case AB_LitString: tisefLitString (stab, sefo); break
; case AB_Add: tisefAdd (stab, sefo); break; case AB_And: tisefAnd
(stab, sefo); break; case AB_Apply: tisefApply (stab, sefo);
break; case AB_Assert: tisefAssert (stab, sefo); break; case
AB_Assign: tisefAssign (stab, sefo); break; case AB_Break: tisefBreak
(stab, sefo); break; case AB_Builtin: tisefBuiltin (stab, sefo
); break; case AB_CoerceTo: tisefCoerceTo (stab, sefo); break
; case AB_Collect: tisefCollect (stab, sefo); break; case AB_Comma
: tisefComma (stab, sefo); break; case AB_Declare: tisefDeclare
(stab, sefo); break; case AB_Default: tisefDefault (stab, sefo
); break; case AB_Define: tisefDefine (stab, sefo); break; case
AB_Delay: tisefDelay (stab, sefo); break; case AB_Do: tisefDo
(stab, sefo); break; case AB_Except: tisefExcept (stab, sefo
); break; case AB_Raise: tisefRaise (stab, sefo); break; case
AB_Exit: tisefExit (stab, sefo); break; case AB_Export: tisefExport
(stab, sefo); break; case AB_Extend: tisefExtend (stab, sefo
); break; case AB_Fix: tisefFix (stab, sefo); break; case AB_Fluid
: tisefFluid (stab, sefo); break; case AB_For: tisefFor (stab
, sefo); break; case AB_ForeignImport: tisefForeignImport (stab
, sefo); break; case AB_ForeignExport: tisefForeignExport (stab
, sefo); break; case AB_Free: tisefFree (stab, sefo); break; case
AB_Generate: tisefGenerate (stab, sefo); break; case AB_Goto
: tisefGoto (stab, sefo); break; case AB_Has: tisefHas (stab,
sefo); break; case AB_Hide: tisefHide (stab, sefo); break; case
AB_If: tisefIf (stab, sefo); break; case AB_Import: tisefImport
(stab, sefo); break; case AB_Inline: tisefInline (stab, sefo
); break; case AB_Iterate: tisefIterate (stab, sefo); break; case
AB_Label: tisefLabel (stab, sefo); break; case AB_Lambda: tisefLambda
(stab, sefo); break; case AB_Let: tisefLet (stab, sefo); break
; case AB_Local: tisefLocal (stab, sefo); break; case AB_Macro
: tisefMacro (stab, sefo); break; case AB_MLambda: tisefMLambda
(stab, sefo); break; case AB_Never: tisefNever (stab, sefo);
break; case AB_Not: tisefNot (stab, sefo); break; case AB_Nothing
: tisefNothing (stab, sefo); break; case AB_Or: tisefOr (stab
, sefo); break; case AB_PLambda: tisefLambda (stab, sefo); break
; case AB_PretendTo: tisefPretendTo (stab, sefo); break; case
AB_Qualify: tisefQualify (stab, sefo); break; case AB_Quote:
tisefQuote (stab, sefo); break; case AB_Reference: tisefReference
(stab, sefo); break; case AB_Repeat: tisefRepeat (stab, sefo
); break; case AB_RestrictTo: tisefRestrictTo (stab, sefo); break
; case AB_Return: tisefReturn (stab, sefo); break; case AB_Select
: tisefSelect (stab, sefo); break; case AB_Sequence: tisefSequence
(stab, sefo); break; case AB_Test: tisefTest (stab, sefo); break
; case AB_Try: tisefTry (stab, sefo); break; case AB_Where: tisefWhere
(stab, sefo); break; case AB_While: tisefWhile (stab, sefo);
break; case AB_With: tisefWith (stab, sefo); break; case AB_Yield
: tisefYield (stab, sefo); break; default: bug("Bad case %d (line %d in file %s)."
, (int) ((sefo)->abHdr.tag), 233, "ti_sef.c"); }
;
234
235 if (DEBUG(tipSef)tipSefDebug) {
236 fprintf(dbOut, "<-Sef: %*s%d= ", depthNo, "", serialThis);
237 abPrettyPrint(dbOut, sefo);
238 fprintf(dbOut, " @ ");
239 tfPrint(dbOut, abTUnique(sefo)((sefo)->abHdr.type.unique));
240 fnewline(dbOut);
241 }
242 depthNo -= 1;
243}
244
245/****************************************************************************
246 *
247 * :: Generic: abArgc(ab), abArgv(ab)
248 *
249 ***************************************************************************/
250
251localstatic void
252tisef0Generic(Stab stab, Sefo sefo)
253{
254 Length i;
255 if (!abIsLeaf(sefo)(((sefo)->abHdr.tag) < AB_NODE_START))
256 for (i = 0; i < abArgc(sefo)((sefo)->abHdr.argc); i += 1)
257 tisef(stab, abArgv(sefo)((sefo)->abGen.data.argv)[i]);
258 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfNone()tfMulti(0);
259}
260
261/****************************************************************************
262 *
263 * :: Within: with bodies, default bodies, conditional branches
264 *
265 ***************************************************************************/
266
267localstatic TForm
268tisef0Within(Stab stab, Sefo sefo, SymeList bsymes)
269{
270 SymeList xsymes, isymes, dsymes, ssymes, symes;
271 Length i, argc;
272 AbSyn *argv;
273 TForm tf;
274
275 AB_SEQ_ITER(sefo, argc, argv){ switch (((sefo)->abHdr.tag)) { case AB_Nothing: argc = 0
; argv = 0; break; case AB_Sequence: argc = ((sefo)->abHdr
.argc); argv = ((sefo)->abGen.data.argv); break; default: argc
= 1; argv = &sefo; break; }; }
;
276
277 xsymes = isymes = dsymes = ssymes = listNil(Syme)((SymeList) 0);
278 for (i = 0; i < argc; i += 1) {
279 AbSyn id = abDefineeIdOrElse(argv[i], NULL((void*)0));
280
281 /* Empty body. */
282 if (abTag(argv[i])((argv[i])->abHdr.tag) == AB_Nothing)
283 ;
284
285 /* Default body. */
286 else if (abTag(argv[i])((argv[i])->abHdr.tag) == AB_Default) {
287 tisef(stab, argv[i]);
288 symes = abGetCatExports(argv[i]);
289 dsymes = listConcat(Syme)(Syme_listPointer->Concat)(symes, dsymes);
290 }
291
292 /* Explicit declaration/definition. */
293 else if (id && abTag(argv[i])((argv[i])->abHdr.tag) != AB_Id) {
294 assert(abSyme(id))do { if (!(((id)->abHdr.seman ? (id)->abHdr.seman->syme
: 0))) _do_assert(("abSyme(id)"),"ti_sef.c",294); } while (0
)
;
295 if (symeIsExport(abSyme(id))(((((((id)->abHdr.seman ? (id)->abHdr.seman->syme : 0
))->kind == SYME_Trigger ? libGetAllSymes((((id)->abHdr
.seman ? (id)->abHdr.seman->syme : 0))->lib) : ((void
*)0)), (((id)->abHdr.seman ? (id)->abHdr.seman->syme
: 0)))->kind) == SYME_Export)
)
296 xsymes = listCons(Syme)(Syme_listPointer->Cons)(abSyme(id)((id)->abHdr.seman ? (id)->abHdr.seman->syme : 0), xsymes);
297 }
298
299 /* Category expression. */
300 else {
301 tisef(stab, argv[i]);
302 symes = abGetCatExports(argv[i]);
303 isymes = symeListUnion(isymes, symes, symeEqual);
304 symes = abGetCatSelf(argv[i]);
305 ssymes = symeListUnion(ssymes, symes, symeEqual);
306 }
307 }
308
309 /* Mark the symes which have a default implementation. */
310 dsymes = listNReverse(Syme)(Syme_listPointer->NReverse)(dsymes);
311 for (; dsymes; dsymes = listFreeCons(Syme)(Syme_listPointer->FreeCons)(dsymes)) {
312 Syme dsyme = car(dsymes)((dsymes)->first);
313 Syme xsyme = NULL((void*)0);
314
315 /* If the default is one of our exports, just mark it. */
316 for (symes = xsymes; !xsyme && symes; symes = cdr(symes)((symes)->rest))
317 if (symeEqual(car(symes)((symes)->first), dsyme)) {
318 xsyme = car(symes)((symes)->first);
319 symeSetDefault(xsyme)(((((xsyme)->kind == SYME_Trigger ? libGetAllSymes((xsyme)
->lib) : ((void*)0)), (xsyme))->bits) |= (0x0080))
;
320 symeSetSrcPos(xsyme, symeSrcPos(dsyme))(symeSetFieldVal = ((AInt) (((SrcPos) (SYFI_SrcPos < (8 * sizeof
(int)) && !(((((dsyme)->kind == SYME_Trigger ? libGetAllSymes
((dsyme)->lib) : ((void*)0)), (dsyme))->hasmask) & (
1 << (SYFI_SrcPos))) ? (symeFieldInfo[SYFI_SrcPos].def)
: (((((dsyme)->kind == SYME_Trigger ? libGetAllSymes((dsyme
)->lib) : ((void*)0)), (dsyme))->locmask) & (1 <<
(SYFI_SrcPos))) ? ((((((dsyme)->kind == SYME_Trigger ? libGetAllSymes
((dsyme)->lib) : ((void*)0)), (dsyme))->locmask) & (
1 << (SYFI_SrcPos))) ? ((dsyme)->fieldv)[symeIndex(dsyme
,SYFI_SrcPos)] : (symeFieldInfo[SYFI_SrcPos].def)) : symeGetFieldFn
(dsyme,SYFI_SrcPos))))), (((((xsyme)->kind == SYME_Trigger
? libGetAllSymes((xsyme)->lib) : ((void*)0)), (xsyme))->
locmask) & (1 << (SYFI_SrcPos))) ? (((xsyme)->fieldv
)[symeIndex(xsyme,SYFI_SrcPos)] = (symeSetFieldVal)) : !((xsyme
)->full) && symeSetFieldVal == (symeFieldInfo[SYFI_SrcPos
].def) ? symeSetFieldVal : symeSetFieldFn(xsyme,SYFI_SrcPos,symeSetFieldVal
))
;
321 }
322
323 /* If the default is inherited, use the default syme. */
324 if (xsyme == NULL((void*)0)) {
325 xsymes = listCons(Syme)(Syme_listPointer->Cons)(dsyme, xsymes);
326 symeSetDefault(dsyme)(((((dsyme)->kind == SYME_Trigger ? libGetAllSymes((dsyme)
->lib) : ((void*)0)), (dsyme))->bits) |= (0x0080))
;
327 }
328 }
329
330 xsymes = listNReverse(Syme)(Syme_listPointer->NReverse)(xsymes);
331 xsymes = symeListUnion(isymes, xsymes, symeEqual);
332
333 if (abTag(sefo)((sefo)->abHdr.tag) == AB_Sequence)
334 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfThird(xsymes);
335
336 tf = tfThird(xsymes);
337 tfAddSelf(tf, ssymes);
338 tfHasSelf(tf)((tf)->hasSelf) = true1;
339
340 return tf;
341}
342
343/****************************************************************************
344 *
345 * :: Implied call: apply, set!, test, generator, ...
346 *
347 ***************************************************************************/
348
349/*
350 * ab ==> m(i,...) -> tibup0Apply(stab, ab, 'apply, n+1, [m,i,...])
351 * ab ==> m(i,...) := x -> tibup0Apply(stab, ab, 'set!, n+2, [m,i,...,x])
352 * ab ==> if bb then ... -> tibup0Apply(stab, bb, 'test, 1, [bb.cond]);
353 * ab ==> for i in l -> tibup0Apply(stab, ab, 'iterator, 1, [l])
354 * ab ==> x::T -> tibup0Apply(stab, ab, 'coerce, 1, [x])
355 *
356 * Could also do...
357 *
358 * ab ==> 3 -> tibup0Apply(stab, ab, 'integer, 0, [])
359 * ab ==> "3.14" -> tibup0Apply(stab, ab, 'float, 0, [])
360 * ab ==> "hello" -> tibup0Apply(stab, ab, 'string, 0, [])
361 */
362
363localstatic void
364tisef0ApplySymIfNeeded(Stab stab, Sefo sefo, Length argc, AbSynGetter argf,
365 Sefo implicitPart, TFormPredicate pred)
366{
367 Sefo part;
368 TForm tf;
369
370 assert(argc == 1)do { if (!(argc == 1)) _do_assert(("argc == 1"),"ti_sef.c",370
); } while (0)
;
371
372 part = argf(sefo, int0((int) 0));
373 tf = abTUnique(part)((part)->abHdr.type.unique);
374
375 if (pred(tf))
376 abTUnique(sefo)((sefo)->abHdr.type.unique) = abTUnique(part)((part)->abHdr.type.unique);
377 else
378 tisef0ApplySym(stab, sefo, argc, argf, implicitPart);
379}
380
381localstatic void
382tisef0ApplySym(Stab stab, Sefo sefo, Length argc, AbSynGetter argf,
383 Sefo implicitPart)
384{
385 Sefo imp;
386 if (!implicitPart) implicitPart = sefo;
387
388 imp = abImplicit(implicitPart)((implicitPart)->abHdr.seman ? (implicitPart)->abHdr.seman
->implicit : 0)
;
389
390 if (imp) {
391 tisef(stab, imp);
392 tisef0ApplyFType(stab, sefo, imp, argc, argf);
393 }
394 else
395 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfUnknown;
396}
397
398localstatic void
399tisef0ApplyJoin(Stab stab, Sefo sefo, Sefo op, Length argc, AbSynGetter argf)
400{
401 SymeList symes = listNil(Syme)((SymeList) 0), mods = listNil(Syme)((SymeList) 0);
402 TForm selftf;
403 Length i;
404
405 /* Collect the category exports for the result. */
406 for (i = 0; i < argc; i += 1) {
407 TForm tfi = abTUnique(argf(sefo, i))((argf(sefo, i))->abHdr.type.unique);
408 SymeList symesi = tfGetThdExports(tfi);
409 symes = tfJoinExportLists(mods, symes, symesi, NULL((void*)0));
410 }
411 selftf = tfThird(symes);
412
413 /* Collect the symbol meaning(s) for self for the result. */
414 for (i = 0; i < argc; i += 1)
415 tfAddSelf(selftf, tfGetThdSelf(abTUnique(argf(sefo, i))((argf(sefo, i))->abHdr.type.unique)));
416
417 abTUnique(sefo)((sefo)->abHdr.type.unique) = selftf;
418}
419
420localstatic void
421tisef0ApplyFType(Stab stab, Sefo sefo, Sefo op, Length argc, AbSynGetter argf)
422{
423 SatMask mask = tfSatSefMask();
424 TForm opType = abTUnique(op)((op)->abHdr.type.unique), retType;
425
426 assert(tfIsAnyMap(opType))do { if (!(((((opType)->tag) == TF_Map) || (((opType)->
tag) == TF_PackedMap)))) _do_assert(("tfIsAnyMap(opType)"),"ti_sef.c"
,426); } while (0)
;
427 retType = tfMapRet(opType)tfFollowArg(opType, 1);
428
429 if (abIsTheId(op, ssymJoin)(((op)->abHdr.tag == (AB_Id)) && ((op)->abId.sym
)==(ssymJoin))
&& tfSatisfies(retType, tfCategory)) {
430 tisef0ApplyJoin(stab, sefo, op, argc, argf);
431 return;
432 }
433
434 tiTfSefo(stab, opType);
435 tfSatMap(mask, stab, opType, tfUnknown, sefo, argc, argf);
436}
437
438/****************************************************************************
439 *
440 * :: Far Values: return x, yield x, a => x
441 *
442 ***************************************************************************/
443
444localstatic void
445tisef0FarValue(Stab stab, Sefo farValue, TForm *pFarType)
446{
447 if (tfIsUnknown(*pFarType)(((*pFarType)->tag) == TF_Unknown))
448 *pFarType = abTUnique(farValue)((farValue)->abHdr.type.unique);
449}
450
451
452/****************************************************************************
453 *
454 * :: Id: x, +, 1
455 * X
456 ***************************************************************************/
457
458localstatic void
459tisefId(Stab stab, Sefo sefo)
460{
461 Syme syme = abSyme(sefo)((sefo)->abHdr.seman ? (sefo)->abHdr.seman->syme : 0
)
;
462
463 if (syme)
464 abTUnique(sefo)((sefo)->abHdr.type.unique) = symeType(syme);
465 else
466 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfUnknown;
467}
468
469/****************************************************************************
470 *
471 * :: LitInteger: 32
472 * :: LitFloat: 4.0
473 * :: LitString: "hello"
474 * X
475 * !! This stuff could be made to go through ti...0Apply.
476 ***************************************************************************/
477
478localstatic void tisef0Literal (Stab, Sefo);
479
480/*
481 * Sefo entry points.
482 */
483
484localstatic void
485tisefLitInteger(Stab stab, Sefo sefo)
486{
487 tisef0Literal(stab, sefo);
488}
489
490localstatic void
491tisefLitFloat(Stab stab, Sefo sefo)
492{
493 tisef0Literal(stab, sefo);
494}
495
496localstatic void
497tisefLitString(Stab stab, Sefo sefo)
498{
499 tisef0Literal(stab, sefo);
500}
501
502/*
503 * Functions which actually do the work.
504 */
505
506localstatic void
507tisef0Literal(Stab stab, Sefo sefo)
508{
509 Syme syme = abSyme(sefo)((sefo)->abHdr.seman ? (sefo)->abHdr.seman->syme : 0
)
;
510
511 if (syme)
512 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfMapRet(symeType(syme))tfFollowArg(symeType(syme), 1);
513 else
514 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfUnknown;
515}
516
517
518/***************************************************************************
519 *
520 * :: Comma: (a, b)
521 *
522 ***************************************************************************/
523
524localstatic void
525tisefComma(Stab stab, Sefo sefo)
526{
527 tisef0Generic(stab, sefo);
528 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfMultiFrTUnique(sefo);
529}
530
531/****************************************************************************
532 *
533 * :: Apply: f(a, b, ...)
534 *
535 ***************************************************************************/
536
537localstatic void
538tisef0ApplySpecialSyme(Stab stab, Sefo sefo)
539{
540 Sefo op = abApplyOp(sefo)((sefo)->abApply.op);
541 Syme syme;
542
543 if (abTag(op)((op)->abHdr.tag) == AB_Id && abSyme(op)((op)->abHdr.seman ? (op)->abHdr.seman->syme : 0) == NULL((void*)0) &&
544 (syme = tfpOpSyme(stab, op->abId.sym, abApplyArgc(sefo)(((sefo)->abHdr.argc)-1))) != 0)
545 abSetSyme(op, syme);
546
547 return;
548}
549
550localstatic void
551tisefApply(Stab stab, Sefo sefo)
552{
553 Sefo op;
554 TForm tf;
555
556 tipApplyDEBUGif (!tipApplyDebug) { } else afprintf(dbOut, "Entering tisefApply\n");
557
558 tisef0ApplySpecialSyme(stab, sefo);
559
560 tisef0Generic(stab, sefo);
561 op = abApplyOp(sefo)((sefo)->abApply.op);
562
563 tfFollow(abTUnique(op))((((op)->abHdr.type.unique)) = tfFollowFn(((op)->abHdr.
type.unique)))
;
564 tf = abTUnique(op)((op)->abHdr.type.unique);
565
566 if (tfIsAnyMap(tf)((((tf)->tag) == TF_Map) || (((tf)->tag) == TF_PackedMap
))
)
567 tisef0ApplyFType(stab,sefo,op,abApplyArgc(sefo)(((sefo)->abHdr.argc)-1),abApplyArgf);
568 else
569 tisef0ApplySym(stab, sefo, abArgc(sefo)((sefo)->abHdr.argc), abArgf, NULL((void*)0));
570}
571
572/****************************************************************************
573 *
574 * :: Define: a == e
575 * X
576 ***************************************************************************/
577
578localstatic void
579tisefDefine(Stab stab, Sefo sefo)
580{
581 tisef0Generic(stab, sefo);
582 if (abTag(sefo->abDefine.lhs)((sefo->abDefine.lhs)->abHdr.tag) == AB_Declare)
583 abTUnique(sefo)((sefo)->abHdr.type.unique) =
584 abTUnique(sefo->abDefine.lhs->abDeclare.type)((sefo->abDefine.lhs->abDeclare.type)->abHdr.type.unique
)
;
585 else
586 abTUnique(sefo)((sefo)->abHdr.type.unique) = abTUnique(sefo->abDefine.rhs)((sefo->abDefine.rhs)->abHdr.type.unique);
587}
588
589
590/****************************************************************************
591 *
592 * :: Assign: a := e
593 * X
594 ***************************************************************************/
595
596/*!! To do: (v.i,v.j) := (v.j, v.i) */
597
598localstatic void
599tisefAssign(Stab stab, Sefo sefo)
600{
601 tisef0Generic(stab, sefo);
602 abTUnique(sefo)((sefo)->abHdr.type.unique) = abTUnique(sefo->abAssign.rhs)((sefo->abAssign.rhs)->abHdr.type.unique);
603}
604
605
606/****************************************************************************
607 *
608 * :: Declare: a: A
609 *
610 ***************************************************************************/
611
612localstatic void
613tisefDeclare(Stab stab, Sefo sefo)
614{
615 tisef0Generic(stab, sefo);
616
617 if (abUse(sefo)((sefo)->abHdr.use) == AB_Use_Define || abUse(sefo)((sefo)->abHdr.use) == AB_Use_Assign)
618 abTUnique(sefo)((sefo)->abHdr.type.unique) = abTUnique(sefo->abDeclare.id)((sefo->abDeclare.id)->abHdr.type.unique);
619 else
620 abTUnique(sefo)((sefo)->abHdr.type.unique) = abTUnique(sefo->abDeclare.type)((sefo->abDeclare.type)->abHdr.type.unique);
621}
622
623/****************************************************************************
624 *
625 * :: Label: @@ x @@ [e]
626 *
627 ***************************************************************************/
628
629localstatic void
630tisefLabel(Stab stab, Sefo sefo)
631{
632 Sefo expr = sefo->abLabel.expr;
633 tisef0Generic(stab, expr);
634 abTUnique(sefo)((sefo)->abHdr.type.unique) = abTUnique(sefo->abLabel.expr)((sefo->abLabel.expr)->abHdr.type.unique);
635}
636
637/****************************************************************************
638 *
639 * :: Goto: goto id
640 *
641 ***************************************************************************/
642
643localstatic void
644tisefGoto(Stab stab, Sefo sefo)
645{
646 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfExit;
647}
648
649/****************************************************************************
650 *
651 * :: Lambda: (a: A): B +-> b
652 * :: PLambda: (a: A): B +->* b
653 *
654 ***************************************************************************/
655
656localstatic void
657tisefLambda(Stab stab, Sefo sefo)
658{
659 Scope("tisefLambda")String scopeName = ("tisefLambda"); int fluidLevel0 = (scopeLevel
++, fluidLevel)
;
660 TForm tfarg, tfret;
661 Bool pack = abHasTag(sefo, AB_PLambda)((sefo)->abHdr.tag == (AB_PLambda));
662
663 TForm fluid(tuniReturnTForm)fluidSave_tuniReturnTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniReturnTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniReturnTForm
, fluidStack[fluidLevel].size = sizeof(tuniReturnTForm), fluidLevel
++, (tuniReturnTForm) )
;
664 TForm fluid(tuniYieldTForm)fluidSave_tuniYieldTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniYieldTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniYieldTForm
, fluidStack[fluidLevel].size = sizeof(tuniYieldTForm), fluidLevel
++, (tuniYieldTForm) )
;
665 TForm fluid(tuniExitTForm)fluidSave_tuniExitTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniExitTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniExitTForm
, fluidStack[fluidLevel].size = sizeof(tuniExitTForm), fluidLevel
++, (tuniExitTForm) )
;
666
667 tuniReturnTForm = tfNone()tfMulti(0);
668 tuniYieldTForm = tfNone()tfMulti(0);
669 tuniExitTForm = tfNone()tfMulti(0);
670
671 tisef0Generic(stab, sefo);
672 tfarg = tiGetTForm(stab, sefo->abLambda.param);
673 tfret = tiGetTForm(stab, sefo->abLambda.rtype);
674
675 if (tfarg && tfret)
676 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfAnyMap(tfarg, tfret, pack);
677 else
678 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfUnknown;
679
680 ReturnNothing{ fluidUnwind(fluidLevel0, ((int) 0)); return;; };
681}
682
683/****************************************************************************
684 *
685 * :: Sequence: (a; b; c)
686 *
687 ***************************************************************************/
688
689localstatic void
690tisefSequence(Stab stab, Sefo sefo)
691{
692 Scope("tisefSequence")String scopeName = ("tisefSequence"); int fluidLevel0 = (scopeLevel
++, fluidLevel)
;
693 Length n = abArgc(sefo)((sefo)->abHdr.argc);
694
695 TForm fluid(tuniExitTForm)fluidSave_tuniExitTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniExitTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniExitTForm
, fluidStack[fluidLevel].size = sizeof(tuniExitTForm), fluidLevel
++, (tuniExitTForm) )
;
696 tuniExitTForm = tfUnknown;
697
698 tisef0Generic(stab, sefo);
699 if (n > 0) {
700 tisef0FarValue(stab, abArgv(sefo)((sefo)->abGen.data.argv)[n-1], &tuniExitTForm);
701 abTUnique(sefo)((sefo)->abHdr.type.unique) = tuniExitTForm;
702 }
703
704 ReturnNothing{ fluidUnwind(fluidLevel0, ((int) 0)); return;; };
705}
706
707/****************************************************************************
708 *
709 * :: Exit: (...; b => x ; ...)
710 *
711 ***************************************************************************/
712
713localstatic void
714tisefExit(Stab stab, Sefo sefo)
715{
716 tisef0Generic(stab, sefo);
717 tisef0FarValue(stab, sefo->abExit.value, &tuniExitTForm);
718}
719
720/***************************************************************************
721 *
722 * :: return: return x, return;
723 *
724 ***************************************************************************/
725
726localstatic void
727tisefReturn(Stab stab, Sefo sefo)
728{
729 tisef0Generic(stab, sefo);
730 /* tuniReturnTForm is not used by tisefLambda. */
731 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfExit;
732}
733
734/****************************************************************************
735 *
736 * :: Generate: generate (... yield ...)
737 *
738 ***************************************************************************/
739
740localstatic void
741tisefGenerate(Stab stab, Sefo sefo)
742{
743 TfGenType tfGenType;
744 Scope("tisefGenerate")String scopeName = ("tisefGenerate"); int fluidLevel0 = (scopeLevel
++, fluidLevel)
;
745
746 TForm fluid(tuniReturnTForm)fluidSave_tuniReturnTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniReturnTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniReturnTForm
, fluidStack[fluidLevel].size = sizeof(tuniReturnTForm), fluidLevel
++, (tuniReturnTForm) )
;
747 TForm fluid(tuniYieldTForm)fluidSave_tuniYieldTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniYieldTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniYieldTForm
, fluidStack[fluidLevel].size = sizeof(tuniYieldTForm), fluidLevel
++, (tuniYieldTForm) )
;
748 TForm fluid(tuniExitTForm)fluidSave_tuniExitTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniExitTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniExitTForm
, fluidStack[fluidLevel].size = sizeof(tuniExitTForm), fluidLevel
++, (tuniExitTForm) )
;
749
750 tuniReturnTForm = tfNone()tfMulti(0);
751 tuniYieldTForm = tfUnknown;
752 tuniExitTForm = tfNone()tfMulti(0);
753
754 tisef0Generic(stab, sefo);
755 tfGenType = abFlag_IsNewIter(sefo)(((sefo)->abHdr.flags) == AB_Flag_NewIter) ? TFG_XGenerator : TFG_Generator;
756
757 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfAnyGenerator(tfGenType, tuniYieldTForm);
758
759 ReturnNothing{ fluidUnwind(fluidLevel0, ((int) 0)); return;; };
760}
761
762/****************************************************************************
763 *
764 * :: Reference: ref (id or id of array/record/union)
765 *
766 ***************************************************************************/
767
768localstatic void
769tisefReference(Stab stab, Sefo sefo)
770{
771 tisef0Generic(stab, sefo);
772 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfReference(abTUnique(sefo->abReference.body)((sefo->abReference.body)->abHdr.type.unique));
773}
774
775/***************************************************************************
776 *
777 * :: Yield: yield x
778 *
779 ***************************************************************************/
780
781localstatic void
782tisefYield(Stab stab, Sefo sefo)
783{
784 tisef0Generic(stab, sefo);
785 tisef0FarValue(stab, sefo->abYield.value, &tuniYieldTForm);
786 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfExit;
787}
788
789/****************************************************************************
790 *
791 * :: Add: [D] add (a: A == ...)
792 *
793 ***************************************************************************/
794
795localstatic void
796tisefAdd(Stab stab, Sefo sefo)
797{
798 tisef0Generic(stab, sefo);
799
800 /* !! Should infer type of body. */
801 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfType;
802}
803
804/****************************************************************************
805 *
806 * :: With: [C] with (a: A; ...)
807 *
808 ***************************************************************************/
809
810localstatic void
811tisefWith(Stab stab, Sefo sefo)
812{
813 SymeList bsymes, wsymes, symes = listNil(Syme)((SymeList) 0);
814 SymeList mods = listNil(Syme)((SymeList) 0);
815 TForm wtf, tf;
816
817 tisef(stab, sefo->abWith.base);
818 bsymes = abGetCatExports(sefo->abWith.base);
819
820 tisef(stab, sefo->abWith.within);
821 wtf = tisef0Within(stab, sefo->abWith.within, bsymes);
822 wsymes = tfGetThdExports(wtf);
823
824 symes = tfJoinExportLists(mods, symes, bsymes, NULL((void*)0));
825 symes = tfJoinExportLists(mods, symes, wsymes, NULL((void*)0));
826
827 tf = tfThird(symes);
828 tfAddSelf(tf, abGetCatSelf(sefo->abWith.base));
829 tfAddSelf(tf, tfGetThdSelf(wtf));
830 tfAddSelf(tf, abSelf(sefo)((sefo)->abHdr.seman ? (sefo)->abHdr.seman->self : 0
)
);
831
832 abTUnique(sefo)((sefo)->abHdr.type.unique) = tf;
833}
834
835/****************************************************************************
836 *
837 * :: Where: e where d
838 *
839 ***************************************************************************/
840
841localstatic void
842tisefWhere(Stab stab, Sefo sefo)
843{
844 tisef0Generic(stab, sefo);
845 abTUnique(sefo)((sefo)->abHdr.type.unique) = abTUnique(sefo->abWhere.expr)((sefo->abWhere.expr)->abHdr.type.unique);
846}
847
848/****************************************************************************
849 *
850 * :: If: if b then t [else e]
851 *
852 ***************************************************************************/
853
854localstatic void
855tisefIf(Stab stab, Sefo sefo)
856{
857 Sefo test = sefo->abIf.test;
858 Sefo thenAlt = sefo->abIf.thenAlt;
859 Sefo elseAlt = sefo->abIf.elseAlt;
860
861 tisef0Generic(stab, sefo);
862
863 if (true1) {
864 SymeList tsymes, esymes, symes = listNil(Syme)((SymeList) 0);
865 SymeList mods = listNil(Syme)((SymeList) 0);
866 TForm ttf, etf, tf;
867
868 ttf = tisef0Within(stab, thenAlt, listNil(Syme)((SymeList) 0));
869
870 tsymes = tfGetThdExports(ttf);
871
872 etf = tisef0Within(stab, elseAlt, listNil(Syme)((SymeList) 0));
873
874 esymes = tfGetThdExports(etf);
875
876 symes = tfJoinExportLists(mods, symes, tsymes, test);
877 test = abNewNot(sposNone, test)abNew(AB_Not, sposNone,1, test);
878 symes = tfJoinExportLists(mods, symes, esymes, test);
879
880 tf = tfThird(symes);
881 tfAddSelf(tf, tfGetThdSelf(ttf));
882 tfAddSelf(tf, tfGetThdSelf(etf));
883
884 abTUnique(sefo)((sefo)->abHdr.type.unique) = tf;
885
886 return;
887 }
888
889 /*!! This looks entirely suspect. */
890 if (abIsNotNothing(elseAlt)!((elseAlt)->abHdr.tag == (AB_Nothing)) &&
891 tfSatisfies(abTUnique(thenAlt)((thenAlt)->abHdr.type.unique), abTUnique(elseAlt)((elseAlt)->abHdr.type.unique)))
892 abTUnique(sefo)((sefo)->abHdr.type.unique) = abTUnique(elseAlt)((elseAlt)->abHdr.type.unique);
893 else
894 abTUnique(sefo)((sefo)->abHdr.type.unique) = abTUnique(thenAlt)((thenAlt)->abHdr.type.unique);
895}
896
897/****************************************************************************
898 *
899 * :: Test: implied test
900 *
901 ***************************************************************************/
902
903localstatic void
904tisefTest(Stab stab, Sefo sefo)
905{
906 /*
907 * An unfixed compiler bug means that parts of Salli programs
908 * tinfered with (tfBoolean == tfUnknown). We want to catch
909 * this problem as soon as possible.
910 */
911 tisef0Generic(stab, sefo);
912 assert(tfBoolean != tfUnknown)do { if (!(tfBoolean != tfUnknown)) _do_assert(("tfBoolean != tfUnknown"
),"ti_sef.c",912); } while (0)
;
913 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfBoolean;
914}
915
916/***************************************************************************
917 *
918 * :: Collect: e <iter>*
919 *
920 ***************************************************************************/
921
922localstatic void
923tisefCollect(Stab stab, Sefo sefo)
924{
925 Scope("tisefCollect")String scopeName = ("tisefCollect"); int fluidLevel0 = (scopeLevel
++, fluidLevel)
;
926
927 TForm fluid(tuniReturnTForm)fluidSave_tuniReturnTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniReturnTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniReturnTForm
, fluidStack[fluidLevel].size = sizeof(tuniReturnTForm), fluidLevel
++, (tuniReturnTForm) )
;
928 TForm fluid(tuniYieldTForm)fluidSave_tuniYieldTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniYieldTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniYieldTForm
, fluidStack[fluidLevel].size = sizeof(tuniYieldTForm), fluidLevel
++, (tuniYieldTForm) )
;
929 TForm fluid(tuniExitTForm)fluidSave_tuniExitTForm = ( fluidStack = (fluidLevel==fluidLimit
) ? fluidGrow() : fluidStack, fluidStack[fluidLevel].scopeName
= scopeName, fluidStack[fluidLevel].scopeLevel = scopeLevel,
fluidStack[fluidLevel].pglobal = (Pointer) &(tuniExitTForm
), fluidStack[fluidLevel].pstack = (Pointer) &fluidSave_tuniExitTForm
, fluidStack[fluidLevel].size = sizeof(tuniExitTForm), fluidLevel
++, (tuniExitTForm) )
;
930
931 tuniReturnTForm = tfNone()tfMulti(0);
932 tuniYieldTForm = tfNone()tfMulti(0);
933 tuniExitTForm = tfNone()tfMulti(0);
934
935 tisef0Generic(stab, sefo);
936 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfGenerator(abTUnique(sefo->abCollect.body)((sefo->abCollect.body)->abHdr.type.unique));
937
938 ReturnNothing{ fluidUnwind(fluidLevel0, ((int) 0)); return;; };
939}
940
941/****************************************************************************
942 *
943 * :: Repeat: <iter>* repeat e
944 *
945 ***************************************************************************/
946
947localstatic void
948tisefRepeat(Stab stab, Sefo sefo)
949{
950 tisef0Generic(stab, sefo);
951}
952
953/***************************************************************************
954 *
955 * :: Never
956 * X
957 ***************************************************************************/
958
959localstatic void
960tisefNever(Stab stab, Sefo sefo)
961{
962 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfExit;
963}
964
965/***************************************************************************
966 *
967 * :: Iterate
968 * X
969 ***************************************************************************/
970
971localstatic void
972tisefIterate(Stab stab, Sefo sefo)
973{
974 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfExit;
975}
976
977/***************************************************************************
978 *
979 * :: Break
980 * X
981 ***************************************************************************/
982
983localstatic void
984tisefBreak(Stab stab, Sefo sefo)
985{
986 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfExit;
987}
988
989/****************************************************************************
990 *
991 * :: While: while c
992 *
993 ***************************************************************************/
994
995localstatic void
996tisefWhile(Stab stab, Sefo sefo)
997{
998 /*
999 * An unfixed compiler bug means that parts of Salli programs
1000 * tinfered with (tfBoolean == tfUnknown). We want to catch
1001 * this problem as soon as possible.
1002 */
1003 tisef0Generic(stab, sefo);
1004 assert(tfBoolean != tfUnknown)do { if (!(tfBoolean != tfUnknown)) _do_assert(("tfBoolean != tfUnknown"
),"ti_sef.c",1004); } while (0)
;
1005 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfBoolean;
1006}
1007
1008
1009/***************************************************************************
1010 *
1011 * :: For: for x in l | c
1012 *
1013 ***************************************************************************/
1014
1015localstatic void
1016tisefFor(Stab stab, Sefo sefo)
1017{
1018 tisef0Generic(stab, sefo);
1019 tisef0ApplySymIfNeeded(stab,sefo,1,abForIterArgf,NULL((void*)0),tfIsAnyGenerator);
1020}
1021
1022/****************************************************************************
1023 *
1024 * :: ForeignExport: export ... from Foreign(...)
1025 *
1026 ***************************************************************************/
1027
1028localstatic void
1029tisefForeignExport(Stab stab, Sefo sefo)
1030{
1031 tisef0Generic(stab, sefo);
1032}
1033
1034/****************************************************************************
1035 *
1036 * :: ForeignImport: import ... from Foreign(...)
1037 *
1038 ***************************************************************************/
1039
1040localstatic void
1041tisefForeignImport(Stab stab, Sefo sefo)
1042{
1043 tisef0Generic(stab, sefo);
1044}
1045
1046/****************************************************************************
1047 *
1048 * :: Import: import ... from D
1049 *
1050 ***************************************************************************/
1051
1052localstatic void
1053tisefImport(Stab stab, Sefo sefo)
1054{
1055 AbSyn what = sefo->abImport.what;
1056 AbSyn from = sefo->abImport.origin;
1057
1058 tisef(stab, from);
1059 tisef(stab, what);
1060 tisef0Within(stab, what, listNil(Syme)((SymeList) 0));
1061
1062 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfNone()tfMulti(0);
1063}
1064
1065/****************************************************************************
1066 *
1067 * :: Inline: inline .. from D
1068 *
1069 ***************************************************************************/
1070
1071localstatic void
1072tisefInline(Stab stab, Sefo sefo)
1073{
1074 AbSyn what = sefo->abInline.what;
1075 AbSyn from = sefo->abInline.origin;
1076
1077 tisef(stab, from);
1078 tisef(stab, what);
1079 tisef0Within(stab, what, listNil(Syme)((SymeList) 0));
1080
1081 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfNone()tfMulti(0);
1082}
1083
1084/****************************************************************************
1085 *
1086 * :: Qualify: A $ B
1087 *
1088 * ToDo: 3$Integer
1089 *
1090 ***************************************************************************/
1091
1092localstatic void
1093tisefQualify(Stab stab, Sefo sefo)
1094{
1095 AbSyn what = sefo->abQualify.what;
1096 Syme syme = abSyme(what)((what)->abHdr.seman ? (what)->abHdr.seman->syme : 0
)
;
1097
1098 tisef0Generic(stab, sefo);
1099
1100 if (syme)
1101 abTUnique(sefo)((sefo)->abHdr.type.unique) = symeType(syme);
1102 else
1103 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfUnknown;
1104}
1105
1106/***************************************************************************
1107 *
1108 * :: CoerceTo: x :: T
1109 *
1110 ***************************************************************************/
1111
1112localstatic void
1113tisefCoerceTo(Stab stab, Sefo sefo)
1114{
1115 TForm tf;
1116
1117 tisef0Generic(stab, sefo);
1118 tf = tiGetTForm(stab, sefo->abCoerceTo.type);
1119
1120 abTUnique(sefo)((sefo)->abHdr.type.unique) = (tf ? tf : tfUnknown);
1121}
1122
1123/****************************************************************************
1124 *
1125 * :: RestrictTo: A @ B
1126 *
1127 ***************************************************************************/
1128
1129localstatic void
1130tisefRestrictTo(Stab stab, Sefo sefo)
1131{
1132 TForm tf;
1133
1134 tisef0Generic(stab, sefo);
1135 tf = tiGetTForm(stab, sefo->abRestrictTo.type);
1136
1137 abTUnique(sefo)((sefo)->abHdr.type.unique) = (tf ? tf : tfUnknown);
1138}
1139
1140
1141/****************************************************************************
1142 *
1143 * :: PretendTo: A pretend B
1144 *
1145 ***************************************************************************/
1146
1147localstatic void
1148tisefPretendTo(Stab stab, Sefo sefo)
1149{
1150 TForm tf;
1151
1152 tisef0Generic(stab, sefo);
1153 tf = tiGetTForm(stab, sefo->abPretendTo.type);
1154
1155 abTUnique(sefo)((sefo)->abHdr.type.unique) = (tf ? tf : tfUnknown);
1156}
1157
1158/***************************************************************************
1159 *
1160 * :: Not: not a
1161 *
1162 ***************************************************************************/
1163
1164localstatic void
1165tisefNot(Stab stab, Sefo sefo)
1166{
1167 /*
1168 * An unfixed compiler bug means that parts of Salli programs
1169 * tinfered with (tfBoolean == tfUnknown). We want to catch
1170 * this problem as soon as possible.
1171 */
1172 tisef0Generic(stab, sefo);
1173 assert(tfBoolean != tfUnknown)do { if (!(tfBoolean != tfUnknown)) _do_assert(("tfBoolean != tfUnknown"
),"ti_sef.c",1173); } while (0)
;
1174 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfBoolean;
1175}
1176
1177/***************************************************************************
1178 *
1179 * :: And: a and b and c ...
1180 *
1181 ***************************************************************************/
1182
1183localstatic void
1184tisefAnd(Stab stab, Sefo sefo)
1185{
1186 /*
1187 * An unfixed compiler bug means that parts of Salli programs
1188 * tinfered with (tfBoolean == tfUnknown). We want to catch
1189 * this problem as soon as possible.
1190 */
1191 tisef0Generic(stab, sefo);
1192 assert(tfBoolean != tfUnknown)do { if (!(tfBoolean != tfUnknown)) _do_assert(("tfBoolean != tfUnknown"
),"ti_sef.c",1192); } while (0)
;
1193 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfBoolean;
1194}
1195
1196/***************************************************************************
1197 *
1198 * :: Or: a or b or c ...
1199 *
1200 ***************************************************************************/
1201
1202localstatic void
1203tisefOr(Stab stab, Sefo sefo)
1204{
1205 /*
1206 * An unfixed compiler bug means that parts of Salli programs
1207 * tinfered with (tfBoolean == tfUnknown). We want to catch
1208 * this problem as soon as possible.
1209 */
1210 tisef0Generic(stab, sefo);
1211 assert(tfBoolean != tfUnknown)do { if (!(tfBoolean != tfUnknown)) _do_assert(("tfBoolean != tfUnknown"
),"ti_sef.c",1211); } while (0)
;
1212 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfBoolean;
1213}
1214
1215/***************************************************************************
1216 *
1217 * :: Assert:
1218 *
1219 ***************************************************************************/
1220
1221localstatic void
1222tisefAssert(Stab stab, Sefo sefo)
1223{
1224 tisef0Generic(stab, sefo);
1225 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfNone()tfMulti(0);
1226}
1227
1228/***************************************************************************
1229 *
1230 * :: Blank:
1231 *
1232 ***************************************************************************/
1233
1234localstatic void
1235tisefBlank(Stab stab, Sefo sefo)
1236{
1237 tisef0Generic(stab, sefo);
1238}
1239
1240/***************************************************************************
1241 *
1242 * :: Builtin:
1243 *
1244 ***************************************************************************/
1245
1246localstatic void
1247tisefBuiltin(Stab stab, Sefo sefo)
1248{
1249 tisef0Generic(stab, sefo);
1250}
1251
1252/***************************************************************************
1253 *
1254 * :: Default:
1255 *
1256 ***************************************************************************/
1257
1258localstatic void
1259tisefDefault(Stab stab, Sefo sefo)
1260{
1261 AbSyn body;
1262 TForm tf;
1263
1264 body = sefo->abDefault.body;
1265 tisef(stab, body);
1266 tf = tisef0Within(stab, body, listNil(Syme)((SymeList) 0));
1267
1268 abTUnique(sefo)((sefo)->abHdr.type.unique) = tf;
1269}
1270
1271/***************************************************************************
1272 *
1273 * :: Delay:
1274 *
1275 ***************************************************************************/
1276
1277localstatic void
1278tisefDelay(Stab stab, Sefo sefo)
1279{
1280 tisef0Generic(stab, sefo);
1281}
1282
1283/***************************************************************************
1284 *
1285 * :: Do:
1286 *
1287 ***************************************************************************/
1288
1289localstatic void
1290tisefDo(Stab stab, Sefo sefo)
1291{
1292 tisef0Generic(stab, sefo);
1293}
1294
1295/***************************************************************************
1296 *
1297 * :: Except:
1298 *
1299 ***************************************************************************/
1300
1301localstatic void
1302tisefExcept(Stab stab, Sefo sefo)
1303{
1304 tisef(stab, sefo->abExcept.except);
1305 tisef(stab, sefo->abExcept.type);
1306
1307 abTUnique(sefo)((sefo)->abHdr.type.unique) = abTUnique(sefo->abExcept.type)((sefo->abExcept.type)->abHdr.type.unique);
1308
1309}
1310
1311/***************************************************************************
1312 *
1313 * :: Raise:
1314 *
1315 ***************************************************************************/
1316
1317localstatic void
1318tisefRaise(Stab stab, Sefo sefo)
1319{
1320 tisef(stab, sefo->abRaise.expr);
1321
1322 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfExcept(tfExit, tiGetTForm(stab, sefo->abRaise.expr));
1323}
1324
1325/***************************************************************************
1326 *
1327 * :: Export:
1328 *
1329 ***************************************************************************/
1330
1331localstatic void
1332tisefExport(Stab stab, Sefo sefo)
1333{
1334 AbSyn what = sefo->abExport.what;
1335 AbSyn from = sefo->abExport.origin;
1336 AbSyn dest = sefo->abExport.destination;
1337
1338 tisef(stab, from);
1339 tisef(stab, dest);
1340
1341 tisef(stab, what);
1342 if (!abIsNothing(from)((from)->abHdr.tag == (AB_Nothing)) || !abIsNothing(dest)((dest)->abHdr.tag == (AB_Nothing)))
1343 tisef0Within(stab, what, listNil(Syme)((SymeList) 0));
1344
1345 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfNone()tfMulti(0);
1346}
1347
1348/***************************************************************************
1349 *
1350 * :: Extend:
1351 *
1352 ***************************************************************************/
1353
1354localstatic void
1355tisefExtend(Stab stab, Sefo sefo)
1356{
1357 tisef0Generic(stab, sefo);
1358}
1359
1360/***************************************************************************
1361 *
1362 * :: Fix:
1363 *
1364 ***************************************************************************/
1365
1366localstatic void
1367tisefFix(Stab stab, Sefo sefo)
1368{
1369 tisef0Generic(stab, sefo);
1370}
1371
1372/***************************************************************************
1373 *
1374 * :: Fluid:
1375 *
1376 ***************************************************************************/
1377
1378localstatic void
1379tisefFluid(Stab stab, Sefo sefo)
1380{
1381 tisef0Generic(stab, sefo);
1382}
1383
1384/***************************************************************************
1385 *
1386 * :: Free:
1387 *
1388 ***************************************************************************/
1389
1390localstatic void
1391tisefFree(Stab stab, Sefo sefo)
1392{
1393 tisef0Generic(stab, sefo);
1394}
1395
1396/***************************************************************************
1397 *
1398 * :: Has:
1399 *
1400 ***************************************************************************/
1401
1402localstatic void
1403tisefHas(Stab stab, Sefo sefo)
1404{
1405 tisef0Generic(stab, sefo);
1406}
1407
1408/***************************************************************************
1409 *
1410 * :: Hide:
1411 *
1412 ***************************************************************************/
1413
1414localstatic void
1415tisefHide(Stab stab, Sefo sefo)
1416{
1417 tisef0Generic(stab, sefo);
1418}
1419
1420/***************************************************************************
1421 *
1422 * :: IdSy:
1423 *
1424 ***************************************************************************/
1425
1426localstatic void
1427tisefIdSy(Stab stab, Sefo sefo)
1428{
1429 tisef0Generic(stab, sefo);
1430}
1431
1432/***************************************************************************
1433 *
1434 * :: Let:
1435 *
1436 ***************************************************************************/
1437
1438localstatic void
1439tisefLet(Stab stab, Sefo sefo)
1440{
1441 tisef0Generic(stab, sefo);
1442}
1443
1444/***************************************************************************
1445 *
1446 * :: Local:
1447 *
1448 ***************************************************************************/
1449
1450localstatic void
1451tisefLocal(Stab stab, Sefo sefo)
1452{
1453 tisef0Generic(stab, sefo);
1454}
1455
1456
1457/***************************************************************************
1458 *
1459 * :: Macro:
1460 *
1461 ***************************************************************************/
1462
1463localstatic void
1464tisefMacro(Stab stab, Sefo sefo)
1465{
1466 tisef0Generic(stab, sefo);
1467}
1468
1469
1470/***************************************************************************
1471 *
1472 * :: MLambda:
1473 *
1474 ***************************************************************************/
1475
1476localstatic void
1477tisefMLambda(Stab stab, Sefo sefo)
1478{
1479 tisef0Generic(stab, sefo);
1480}
1481
1482/***************************************************************************
1483 *
1484 * :: Nothing:
1485 *
1486 ***************************************************************************/
1487
1488localstatic void
1489tisefNothing(Stab stab, Sefo sefo)
1490{
1491 abTUnique(sefo)((sefo)->abHdr.type.unique) = tfNone()tfMulti(0);
1492}
1493
1494/***************************************************************************
1495 *
1496 * :: Quote:
1497 *
1498 ***************************************************************************/
1499
1500localstatic void
1501tisefQuote(Stab stab, Sefo sefo)
1502{
1503 tisef0Generic(stab, sefo);
1504}
1505
1506
1507/***************************************************************************
1508 *
1509 * :: Select:
1510 *
1511 ***************************************************************************/
1512
1513localstatic void
1514tisefSelect(Stab stab, Sefo sefo)
1515{
1516 /* Not 100% sure about this...*/
1517 tisef0Generic(stab, sefo);
1518
1519 return;
1520}
1521
1522
1523/***************************************************************************
1524 *
1525 * :: Try:
1526 *
1527 ***************************************************************************/
1528
1529localstatic void
1530tisefTry(Stab stab, Sefo sefo)
1531{
1532 tisef(stab, sefo->abTry.id);
1533 tisef(stab, sefo->abTry.expr);
1534 tisef(stab, sefo->abTry.always);
1535 tisef(stab, sefo->abTry.except);
1536
1537 abTUnique(sefo)((sefo)->abHdr.type.unique) = abTUnique(sefo->abTry.expr)((sefo->abTry.expr)->abHdr.type.unique);
1538}