2 |
7u83 |
1 |
/*
|
7 |
7u83 |
2 |
* Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
|
|
|
3 |
* All rights reserved.
|
|
|
4 |
*
|
|
|
5 |
* Redistribution and use in source and binary forms, with or without
|
|
|
6 |
* modification, are permitted provided that the following conditions are met:
|
|
|
7 |
*
|
|
|
8 |
* 1. Redistributions of source code must retain the above copyright notice,
|
|
|
9 |
* this list of conditions and the following disclaimer.
|
|
|
10 |
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
11 |
* this list of conditions and the following disclaimer in the documentation
|
|
|
12 |
* and/or other materials provided with the distribution.
|
|
|
13 |
* 3. Neither the name of The TenDRA Project nor the names of its contributors
|
|
|
14 |
* may be used to endorse or promote products derived from this software
|
|
|
15 |
* without specific, prior written permission.
|
|
|
16 |
*
|
|
|
17 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
|
|
|
18 |
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
|
19 |
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
20 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
|
|
|
21 |
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
|
22 |
* EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
23 |
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
|
24 |
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
25 |
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
|
26 |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
27 |
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
28 |
*
|
|
|
29 |
* $Id$
|
|
|
30 |
*/
|
|
|
31 |
/*
|
2 |
7u83 |
32 |
Crown Copyright (c) 1997
|
7 |
7u83 |
33 |
|
2 |
7u83 |
34 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
35 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
36 |
acting through the Defence Evaluation and Research Agency
|
|
|
37 |
(DERA). It is made available to Recipients with a
|
|
|
38 |
royalty-free licence for its use, reproduction, transfer
|
|
|
39 |
to other parties and amendment for any purpose not excluding
|
|
|
40 |
product development provided that any such use et cetera
|
|
|
41 |
shall be deemed to be acceptance of the following conditions:-
|
7 |
7u83 |
42 |
|
2 |
7u83 |
43 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
44 |
reproduced upon any copies or amended versions of it;
|
7 |
7u83 |
45 |
|
2 |
7u83 |
46 |
(2) Any amended version of it shall be clearly marked to
|
|
|
47 |
show both the nature of and the organisation responsible
|
|
|
48 |
for the relevant amendment or amendments;
|
7 |
7u83 |
49 |
|
2 |
7u83 |
50 |
(3) Its onward transfer from a recipient to another
|
|
|
51 |
party shall be deemed to be that party's acceptance of
|
|
|
52 |
these conditions;
|
7 |
7u83 |
53 |
|
2 |
7u83 |
54 |
(4) DERA gives no warranty or assurance as to its
|
|
|
55 |
quality or suitability for any purpose and DERA accepts
|
|
|
56 |
no liability whatsoever in relation to any use to which
|
|
|
57 |
it may be put.
|
|
|
58 |
*/
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
/**********************************************************************
|
|
|
62 |
$Author: release $
|
|
|
63 |
$Date: 1998/01/17 15:55:47 $
|
|
|
64 |
$Revision: 1.1.1.1 $
|
|
|
65 |
$Log: tags.h,v $
|
|
|
66 |
* Revision 1.1.1.1 1998/01/17 15:55:47 release
|
|
|
67 |
* First version to be checked into rolling release.
|
|
|
68 |
*
|
|
|
69 |
* Revision 1.9 1997/10/28 12:04:40 pwe
|
|
|
70 |
* comment only
|
|
|
71 |
*
|
|
|
72 |
* Revision 1.8 1997/10/10 18:15:44 pwe
|
|
|
73 |
* prep ANDF-DE revision
|
|
|
74 |
*
|
|
|
75 |
* Revision 1.7 1995/08/31 14:19:02 currie
|
|
|
76 |
* mjg mods
|
|
|
77 |
*
|
|
|
78 |
* Revision 1.6 1995/08/15 08:25:35 currie
|
|
|
79 |
* Shift left + trap_tag
|
|
|
80 |
*
|
|
|
81 |
* Revision 1.5 1995/08/09 10:33:09 currie
|
|
|
82 |
* otagexp list reorganised
|
|
|
83 |
*
|
|
|
84 |
* Revision 1.4 1995/06/26 13:04:40 currie
|
|
|
85 |
* make_stack_limit, env_size etc
|
|
|
86 |
*
|
|
|
87 |
* Revision 1.2 1995/05/05 08:10:58 currie
|
|
|
88 |
* initial_value + signtures
|
|
|
89 |
*
|
|
|
90 |
* Revision 1.1 1995/04/06 10:44:05 currie
|
|
|
91 |
* Initial revision
|
|
|
92 |
*
|
|
|
93 |
***********************************************************************/
|
|
|
94 |
#ifndef c_diff
|
|
|
95 |
|
|
|
96 |
#define ident_tag 1
|
|
|
97 |
|
|
|
98 |
#define seq_tag 3
|
|
|
99 |
#define cond_tag 4
|
|
|
100 |
#define labst_tag 5
|
|
|
101 |
#define rep_tag 6
|
|
|
102 |
#define goto_tag 7
|
|
|
103 |
#define test_tag 8
|
|
|
104 |
#define ass_tag 9
|
|
|
105 |
#define apply_tag 11
|
|
|
106 |
#define res_tag 12
|
|
|
107 |
#define goto_lv_tag 13
|
|
|
108 |
#define return_to_label_tag 14
|
|
|
109 |
|
|
|
110 |
#define solve_tag 15
|
|
|
111 |
#define assvol_tag 16
|
|
|
112 |
#define compound_tag 17
|
|
|
113 |
#define nof_tag 18
|
|
|
114 |
#define local_free_all_tag 19
|
|
|
115 |
#define local_free_tag 20
|
|
|
116 |
#define last_local_tag 21
|
|
|
117 |
#define long_jump_tag 22
|
|
|
118 |
#define concatnof_tag 23
|
|
|
119 |
#define ncopies_tag 24
|
|
|
120 |
#define case_tag 25
|
|
|
121 |
#define movecont_tag 26
|
|
|
122 |
#define testbit_tag 27
|
|
|
123 |
#define alloca_tag 28
|
|
|
124 |
|
|
|
125 |
#ifndef NEWDIAGS
|
|
|
126 |
#define diagnose_tag 29
|
|
|
127 |
#endif
|
|
|
128 |
|
|
|
129 |
#define prof_tag 30
|
|
|
130 |
#define ignorable_tag 31
|
|
|
131 |
#define bfass_tag 32
|
|
|
132 |
#define bfassvol_tag 33
|
|
|
133 |
#define condassign_tag 34
|
|
|
134 |
#define apply_general_tag 35
|
|
|
135 |
#define tail_call_tag 36
|
|
|
136 |
#define untidy_return_tag 37
|
|
|
137 |
#define same_callees_tag 38
|
|
|
138 |
|
|
|
139 |
#define plus_tag 39
|
|
|
140 |
#define neg_tag 40
|
|
|
141 |
#define shl_tag 41
|
|
|
142 |
#define mod_tag 43
|
|
|
143 |
#define rem2_tag 44
|
|
|
144 |
#define abs_tag 45
|
|
|
145 |
#define round_tag 46
|
|
|
146 |
#define offset_pad_tag 47
|
|
|
147 |
#define offset_div_tag 48
|
|
|
148 |
#define offset_max_tag 49
|
|
|
149 |
#define minptr_tag 50
|
|
|
150 |
#define fpower_tag 51
|
|
|
151 |
#define fplus_tag 52
|
|
|
152 |
#define fminus_tag 53
|
|
|
153 |
#define fmult_tag 54
|
|
|
154 |
#define fdiv_tag 55
|
|
|
155 |
#define fabs_tag 56
|
|
|
156 |
#define fneg_tag 57
|
|
|
157 |
#define float_tag 58
|
|
|
158 |
#define chfl_tag 59
|
|
|
159 |
#define and_tag 60
|
|
|
160 |
#define or_tag 61
|
|
|
161 |
#define xor_tag 62
|
|
|
162 |
#define not_tag 63
|
|
|
163 |
#define component_tag 64
|
|
|
164 |
#define max_tag 65
|
|
|
165 |
#define min_tag 66
|
|
|
166 |
#define bitf_to_int_tag 67
|
|
|
167 |
#define bfcont_tag 68
|
|
|
168 |
#define fmax_tag 69
|
|
|
169 |
#define shr_tag 70
|
|
|
170 |
#define fmin_tag 71
|
|
|
171 |
#define div0_tag 72
|
|
|
172 |
#define bfcontvol_tag 73
|
|
|
173 |
#define absbool_tag 74
|
|
|
174 |
#define addptr_tag 75
|
|
|
175 |
#define chvar_tag 76
|
|
|
176 |
#define minus_tag 77
|
|
|
177 |
#define mult_tag 78
|
|
|
178 |
#define subptr_tag 79
|
|
|
179 |
#define realpart_tag 80
|
|
|
180 |
#define div1_tag 81
|
|
|
181 |
#define div2_tag 82
|
|
|
182 |
#define offset_add_tag 83
|
|
|
183 |
#define offset_div_by_int_tag 84
|
|
|
184 |
#define offset_mult_tag 85
|
|
|
185 |
#define offset_negate_tag 86
|
|
|
186 |
#define offset_subtract_tag 87
|
|
|
187 |
#define rem0_tag 88
|
|
|
188 |
#define rotl_tag 89
|
|
|
189 |
#define rotr_tag 90
|
|
|
190 |
#define power_tag 91
|
|
|
191 |
#define imag_tag 92
|
|
|
192 |
#define make_complex_tag 93
|
|
|
193 |
#define int_to_bitf_tag 94
|
|
|
194 |
#define conj_tag 95
|
|
|
195 |
|
|
|
196 |
#define hold_tag 101
|
|
|
197 |
#define hold2_tag 102 /* 102 also used as hold */
|
|
|
198 |
#define initial_value_tag 103 /* removed in common part */
|
|
|
199 |
|
|
|
200 |
#define cont_tag 113
|
|
|
201 |
#define field_tag 114
|
|
|
202 |
#define val_tag 115
|
|
|
203 |
#define reff_tag 116
|
|
|
204 |
#define name_tag 117
|
|
|
205 |
#define proc_tag 118
|
|
|
206 |
#define top_tag 119
|
|
|
207 |
#define contvol_tag 120
|
|
|
208 |
#define current_env_tag 121
|
|
|
209 |
#define env_offset_tag 122
|
|
|
210 |
#define make_lv_tag 123
|
|
|
211 |
#define clear_tag 124
|
|
|
212 |
#define null_tag 125
|
|
|
213 |
#define real_tag 126
|
|
|
214 |
#define string_tag 127
|
|
|
215 |
#define general_proc_tag 128
|
|
|
216 |
#define env_size_tag 129
|
|
|
217 |
#define give_stack_limit_tag 130
|
|
|
218 |
#define make_stack_limit_tag 131
|
|
|
219 |
#define general_env_offset_tag 132
|
|
|
220 |
|
|
|
221 |
#define caller_tag 200
|
|
|
222 |
#define caller_name_tag 201
|
|
|
223 |
#define make_dynamic_callee_tag 204
|
|
|
224 |
#define make_callee_list_tag 205
|
|
|
225 |
#define set_stack_limit_tag 206
|
|
|
226 |
#define formal_callee_tag 207
|
|
|
227 |
#define trap_tag 208
|
|
|
228 |
#define asm_tag 209
|
|
|
229 |
|
7 |
7u83 |
230 |
#define is_o(t) ((t) >= cont_tag && (t) <= make_stack_limit_tag)
|
|
|
231 |
#define is_a(t) ((t) >= plus_tag && (t) <= make_stack_limit_tag)
|
2 |
7u83 |
232 |
|
|
|
233 |
|
7 |
7u83 |
234 |
#endif /* c_diff */
|
2 |
7u83 |
235 |
|
|
|
236 |
|
|
|
237 |
/***********************************************************************
|
|
|
238 |
|
|
|
239 |
NOTE that an exp can occur in just one place in the tree, because of
|
|
|
240 |
the backward pointers. Except for name_tag the general structure is
|
|
|
241 |
that an exp has a son which is nilexp or its first argument exp. The
|
|
|
242 |
next argument is the bro of the first, the next the bro of that etc.
|
|
|
243 |
The last argument has the last field set and its bro is the head exp
|
|
|
244 |
of the construction. In a name_tag the son contains the ident_tag which
|
7 |
7u83 |
245 |
declares the identity or variable being used. case, env_offset and string
|
2 |
7u83 |
246 |
are also special cases.
|
|
|
247 |
|
|
|
248 |
The pt field is used in goto and test-like constructions to hold the
|
|
|
249 |
labst being jumped to. It is used in ident and name constructions
|
|
|
250 |
to hold a list of uses of a declaration.
|
|
|
251 |
|
|
|
252 |
A name_tag or an exp with at pt to a labst MUST NOT be removed from
|
|
|
253 |
the tree without the usage count being decreased. In the case of name_tag
|
|
|
254 |
the exp must be removed from the pt-list which starts in the pt
|
|
|
255 |
of the defining ident_tag. kill_exp does these operations. It
|
|
|
256 |
also applies kill_exp recursively to all arguments.
|
|
|
257 |
|
|
|
258 |
For constructions not involving tags or labels, install_fns.c contains
|
|
|
259 |
examples of ways of constructing exps which may be used during
|
|
|
260 |
TDF transformations. However, at the time when the functions in
|
|
|
261 |
install_fns.c are being used, tags and labels are represented by
|
|
|
262 |
indexes into arrays. During TDF transformations this is no longer so.
|
|
|
263 |
name_tag refers directly to the ident_tag of the appropriate declaration,
|
|
|
264 |
and labels are represented by labst_tag exps. The form of a labst is
|
|
|
265 |
explained below, but remember that the count of uses must be kept
|
|
|
266 |
correctly up to date. The form of ident_tag and name_tag constructions
|
|
|
267 |
are also explained below, as are the uses of some functions defined
|
|
|
268 |
in me_fns.c to help in creating them.
|
|
|
269 |
|
|
|
270 |
The props field is zero except for those properties defined in the
|
|
|
271 |
expmacs.h file. Operations with ntests, rounding modes or error treatments
|
|
|
272 |
have these represented in the props field. as in expmacs.h.
|
|
|
273 |
|
|
|
274 |
An exp should normally have hold_check applied to it after being created.
|
|
|
275 |
|
|
|
276 |
abs_tag: Represents integer abs construction.
|
|
|
277 |
son(e) is arg1.
|
|
|
278 |
shape is sh(arg1).
|
|
|
279 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
280 |
|
|
|
281 |
absbool_tag: Represents comparison and conversion to boolean.
|
|
|
282 |
Only produced (by check.c) is has_setcc is 1.
|
|
|
283 |
son(e) is arg1.
|
|
|
284 |
bro(arg1) is arg2.
|
|
|
285 |
shape is a variety shape.
|
|
|
286 |
ntest is represented in props, qv.
|
|
|
287 |
pt(e) is nilexp.
|
|
|
288 |
no(e) is 0.
|
|
|
289 |
Delivers 1 in shape if arg1 ntest arg2, 0 otherwise.
|
|
|
290 |
|
|
|
291 |
addptr_tag: Adds pointer and offset to produce pointer.
|
|
|
292 |
son(e) is arg1 (pointer).
|
|
|
293 |
bro(arg1) is arg2 (offset).
|
|
|
294 |
shape is pointer(al2(sh(arg2))).
|
|
|
295 |
pt(e) is nilexp.
|
|
|
296 |
no(e) is 0.
|
|
|
297 |
|
|
|
298 |
alloca_tag: Represents local_alloc construction.
|
|
|
299 |
son(e) is arg1.
|
|
|
300 |
shape is pointer(x).
|
|
|
301 |
no(e) is 0.
|
|
|
302 |
props(e) is 0.
|
|
|
303 |
pt(e) is nilexp.
|
|
|
304 |
|
|
|
305 |
and_tag: represents and
|
|
|
306 |
son(e) is a brother list of argument, all of the same shape.
|
|
|
307 |
At least two arguments. After check any constants will
|
|
|
308 |
have been combined into one, which will be the last exp
|
|
|
309 |
if there is a constant contribution.
|
|
|
310 |
shape is shape of son(e). This may be changed in some installers
|
|
|
311 |
by chvar_tag transformations in check - only if
|
|
|
312 |
has_byte_ops is 1.
|
|
|
313 |
no(e) is 0.
|
|
|
314 |
pt(e) is nilexp.
|
7 |
7u83 |
315 |
|
2 |
7u83 |
316 |
apply_tag: Represents apply_proc construction.
|
|
|
317 |
son(e) is arg1
|
|
|
318 |
bro(son(e)) is arg2 in the form of a brother list of zero or
|
|
|
319 |
more exps.
|
|
|
320 |
shape is result_shape.
|
|
|
321 |
no(e) is 0.
|
|
|
322 |
pt(e) is nilexp.
|
|
|
323 |
|
|
|
324 |
Properties in the props field are defined in expmacs.h
|
|
|
325 |
|
|
|
326 |
asm_tag: Represents the ~asm group of token applications
|
|
|
327 |
son(e) is arg.
|
|
|
328 |
shape is top.
|
|
|
329 |
no(e) is 0.
|
|
|
330 |
pt(e) is nilexp.
|
|
|
331 |
|
|
|
332 |
Properties in the props field are defined in expmacs.h
|
|
|
333 |
|
|
|
334 |
ass_tag: Represents assign construction.
|
|
|
335 |
son(e) is arg1.
|
|
|
336 |
bro(son(e)) is arg2.
|
|
|
337 |
shape is top.
|
|
|
338 |
no(e) is 0.
|
|
|
339 |
pt(e) is nilexp.
|
|
|
340 |
|
|
|
341 |
assvol_tag: Represents assign_to_volatile construction.
|
|
|
342 |
son(e) is arg1.
|
|
|
343 |
bro(son(e)) is arg2.
|
|
|
344 |
shape is top.
|
|
|
345 |
no(e) is 0.
|
|
|
346 |
pt(e) is nilexp.
|
|
|
347 |
|
|
|
348 |
bfass_tag and bfassvol_tag: represent bitfield assignment ops.
|
|
|
349 |
bfcont_tag and bfcontvol_tag: represent bitfield contents ops.
|
|
|
350 |
These tags are removed by check.c and should not be seen
|
|
|
351 |
elsewhere.
|
|
|
352 |
|
|
|
353 |
bitf_to_int_tag: represents bitfield to int conversion.
|
|
|
354 |
son(e)arg1.
|
|
|
355 |
shape is variety being converted to.
|
|
|
356 |
no(e) is 0.
|
|
|
357 |
pt(e) is nilexp.
|
|
|
358 |
|
|
|
359 |
case_tag: Represents case construction.
|
|
|
360 |
son(e) is control.
|
|
|
361 |
bro(son(e)) is a brother list of exps representing branches.
|
|
|
362 |
Each element is zero-named exp with:
|
|
|
363 |
pt is destination labst_tag.
|
|
|
364 |
no is lower limit.
|
|
|
365 |
if upper limit is equal to lower
|
|
|
366 |
then son is nilexp
|
|
|
367 |
else son is exp with no the upper limit.
|
|
|
368 |
The elements of this list are arranged in increasing
|
|
|
369 |
order of lower limit.
|
|
|
370 |
shape is bottom if exhausive, top otherwise.
|
|
|
371 |
no(e) is 0.
|
|
|
372 |
pt(e) is nilexp.
|
|
|
373 |
|
|
|
374 |
chfl_tag: represents change floating variety
|
|
|
375 |
son(e) is arg1.
|
|
|
376 |
shape is floating shape being converted to.
|
|
|
377 |
no(e) is 0;
|
|
|
378 |
pt(e) is nilexp.
|
|
|
379 |
|
|
|
380 |
chvar_tag: represents change variety
|
|
|
381 |
son(e) is arg1.
|
|
|
382 |
shape is variety being converted to.
|
|
|
383 |
no(e) is 0.
|
|
|
384 |
pt(e) is nilexp.
|
|
|
385 |
|
|
|
386 |
clear_tag: represents make_value
|
|
|
387 |
son(e) is nilexp.
|
|
|
388 |
shape is shape of value required.
|
|
|
389 |
no(e) is 0.
|
|
|
390 |
pt(e) is nilexp.
|
|
|
391 |
|
|
|
392 |
component_tag: represents component
|
|
|
393 |
Always removed by check.c. Should not occur elsewhere.
|
|
|
394 |
|
|
|
395 |
compound_tag: Represents the compound construction.
|
|
|
396 |
son(e) is arg2 in the form of a brother list of zero
|
|
|
397 |
or more pairs. The first of each pair will be a val_tag
|
|
|
398 |
with shape some offset. Its no field will be the offset
|
|
|
399 |
in which to put the next item of the pair.
|
|
|
400 |
shape is compound(arg1).
|
|
|
401 |
pt(e) is nilexp.
|
|
|
402 |
no(e) is 0.
|
|
|
403 |
|
|
|
404 |
concatnof_tag: represents concat nof
|
|
|
405 |
son(e) is arg1.
|
|
|
406 |
bro(arg1) is arg2
|
|
|
407 |
arg1 and arg2 will be nof(m, s) and nof(n, s)
|
7 |
7u83 |
408 |
shape is nof(m + n, s)
|
2 |
7u83 |
409 |
no(e) is 0.
|
|
|
410 |
pt(e) is nilexp.
|
|
|
411 |
|
|
|
412 |
cond_tag: Represents conditional construction.
|
|
|
413 |
son(e) is first.
|
|
|
414 |
bro(son(e)) is alt, which will be a labst_tag
|
|
|
415 |
shape is LUB of first and alt.
|
|
|
416 |
pt(e) is nilexp.
|
|
|
417 |
no(e) is 0.
|
|
|
418 |
|
|
|
419 |
cont_tag: represents contents
|
|
|
420 |
contvol_tag: represents contents with volatile qualifier.
|
|
|
421 |
son(e) is arg1 (a pointer).
|
|
|
422 |
shape is shape of value being extracted.
|
|
|
423 |
no(e) is 0.
|
|
|
424 |
pt(e) is nilexp.
|
|
|
425 |
|
|
|
426 |
Properties in the props field are defined in expmacs.h
|
|
|
427 |
|
|
|
428 |
current_env_tag: represents current env
|
|
|
429 |
son(e) is nilexp
|
|
|
430 |
shape is pointer(frame alignment).
|
|
|
431 |
no(e) is 0.
|
|
|
432 |
pt(e) is nilexp.
|
|
|
433 |
|
|
|
434 |
diagnose_tag: represents a diagnosing operation.
|
|
|
435 |
dno(e) is diag_info (qv.).
|
|
|
436 |
son(e) is controlled exp.
|
|
|
437 |
shape is sh(son(e))
|
|
|
438 |
pt(e) is nilexp.
|
|
|
439 |
|
|
|
440 |
div0_tag:
|
|
|
441 |
div1_tag:
|
|
|
442 |
div2_tag: represent div0/1/2
|
|
|
443 |
son(e) is arg1.
|
|
|
444 |
bro(arg1) is arg2.
|
|
|
445 |
shape is sh(arg1) unless changed by chvar_tag (has_byte_ops).
|
|
|
446 |
no(e) is 0.
|
|
|
447 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
448 |
|
|
|
449 |
Remember to increment labst count if used.
|
|
|
450 |
|
|
|
451 |
env_offset_tag: represents env_offset
|
|
|
452 |
son(e) is ident_tag referred to.
|
|
|
453 |
shape is offset from frame alignment.
|
|
|
454 |
no(e) is 0.
|
|
|
455 |
pt(e) is nilexp.
|
|
|
456 |
|
|
|
457 |
fabs_tag: represents floating abs
|
|
|
458 |
son(e) is arg1.
|
|
|
459 |
shape is sh(arg1).
|
|
|
460 |
no(e) is 0.
|
|
|
461 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
462 |
|
|
|
463 |
Remember to increment labst count if used.
|
|
|
464 |
|
|
|
465 |
fdiv_tag: represents floating division.
|
|
|
466 |
son(e) is arg1.
|
|
|
467 |
bro(arg1) is arg2.
|
|
|
468 |
shape is sh(arg1).
|
|
|
469 |
no(e) is 0.
|
|
|
470 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
471 |
|
|
|
472 |
Remember to increment labst count if used.
|
|
|
473 |
|
|
|
474 |
field_tag: represents selection from a compound shape.
|
|
|
475 |
son(e) is arg1 (value of shape compound).
|
|
|
476 |
shape is shape of the component required.
|
|
|
477 |
no(e) is the offset (in bits) from the start of the
|
|
|
478 |
compound to the required component.
|
|
|
479 |
pt(e) is nilexp.
|
|
|
480 |
|
|
|
481 |
float_tag: represents conversion from int to float.
|
|
|
482 |
son(e) is arg1 (int).
|
|
|
483 |
shape is the floating shape required.
|
|
|
484 |
no(e) is 0.
|
|
|
485 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
486 |
|
|
|
487 |
Remember to increment labst count if used.
|
|
|
488 |
|
|
|
489 |
fmax_tag:
|
|
|
490 |
fmin_tag: represents floating maximum and minimum
|
|
|
491 |
son(e) is arg1.
|
|
|
492 |
bro(arg1) is arg2.
|
|
|
493 |
shape is sh(arg1.
|
|
|
494 |
no(e) is 0.
|
|
|
495 |
pt(e) is nilexp.
|
|
|
496 |
|
|
|
497 |
fminus_tag: represents floating subtraction.
|
|
|
498 |
son(e) is arg1.
|
|
|
499 |
bro(arg1) is arg2.
|
|
|
500 |
shape is sh(arg1).
|
|
|
501 |
no(e) is 0.
|
|
|
502 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
503 |
|
|
|
504 |
Remember to increment labst count if used.
|
|
|
505 |
|
|
|
506 |
fmult_tag: represents floating multiplication
|
|
|
507 |
son(e) is a brother list of argument, all of the same shape.
|
|
|
508 |
At least two arguments. After check any constants will
|
|
|
509 |
have been combined into one, which will be the last exp
|
|
|
510 |
if there is a constant contribution.
|
|
|
511 |
shape is shape of son(e).
|
|
|
512 |
no(e) is 0.
|
|
|
513 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
514 |
|
|
|
515 |
Remember to increment labst count if used.
|
|
|
516 |
|
|
|
517 |
fneg_tag: represents floating negation.
|
|
|
518 |
son(e) is arg1.
|
|
|
519 |
shape is sh(arg1).
|
|
|
520 |
no(e) is 0.
|
|
|
521 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
522 |
|
|
|
523 |
Remember to increment labst count if used.
|
|
|
524 |
|
|
|
525 |
fplus_tag: represents floating addition.
|
|
|
526 |
son(e) is a brother list of argument, all of the same shape.
|
|
|
527 |
At least two arguments. After check any constants will
|
|
|
528 |
have been combined into one, which will be the last exp
|
|
|
529 |
if there is a constant contribution.
|
|
|
530 |
shape is shape of son(e).
|
|
|
531 |
no(e) is 0.
|
|
|
532 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
533 |
|
|
|
534 |
Remember to increment labst count if used.
|
|
|
535 |
|
|
|
536 |
fpower_tag: represents floating power
|
|
|
537 |
son(e) is arg1.
|
|
|
538 |
bro(arg1) is arg2.
|
|
|
539 |
shape is shape of son(e).
|
|
|
540 |
no(e) is 0.
|
|
|
541 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
542 |
|
|
|
543 |
Remember to increment labst count if used.
|
|
|
544 |
|
|
|
545 |
|
|
|
546 |
goto_tag: Represents goto construction.
|
|
|
547 |
son(e) is nilexp.
|
|
|
548 |
shape is bottom.
|
|
|
549 |
pt(e) is destination labst_tag.
|
|
|
550 |
|
|
|
551 |
Create using me_l1, then set the pt field and increment
|
|
|
552 |
the usage counter in the labst_tag.
|
|
|
553 |
|
|
|
554 |
goto_lv_tag: Represents the goto_local_lv construction.
|
|
|
555 |
son(e) is local_lv value.
|
|
|
556 |
shape is bottom.
|
|
|
557 |
pt(e) is nilexp.
|
|
|
558 |
no(e) is 0.
|
|
|
559 |
|
|
|
560 |
hold_tag: used as a dummy father at some times.
|
|
|
561 |
son(e) is exp being so held.
|
|
|
562 |
|
|
|
563 |
ident_tag: Represents identify and variable constructions.
|
|
|
564 |
For identify: son(e) is definition, bro(son(e)) is body.
|
|
|
565 |
For variable: son(e) is init, bro(son(e)) is body.
|
|
|
566 |
The shape of the result is the shape of body.
|
|
|
567 |
The no(e) is a count of the number of uses.
|
|
|
568 |
The pt(e) is the start of a chain of uses through name_tag's.
|
|
|
569 |
|
|
|
570 |
Properties in the props field are defined in expmacs.h
|
|
|
571 |
|
|
|
572 |
Create an ident_tag using me_startid, add name_tag uses of it
|
|
|
573 |
using me_obtain, complete the definition using me_complete_id.
|
|
|
574 |
|
|
|
575 |
ignorable_tag: represents ignorable construction.
|
|
|
576 |
son(e) is exp being controlled.
|
|
|
577 |
shape is sh(son(e)).
|
|
|
578 |
no(e) is 0.
|
|
|
579 |
pt(e) is nilexp.
|
|
|
580 |
|
|
|
581 |
imag_tag: represents imaginary part.
|
|
|
582 |
son(e) is complex number.
|
|
|
583 |
shape is floating shape with same control parameters as the
|
|
|
584 |
complex.
|
|
|
585 |
no(e) is 0.
|
|
|
586 |
pt(e) is nilexp.
|
|
|
587 |
|
|
|
588 |
int_to_bitf_tag: represents integer to bitfield conversion.
|
|
|
589 |
son(e) is arg1 (int).
|
|
|
590 |
shape is bitfield required.
|
|
|
591 |
no(e) is 0.
|
|
|
592 |
pt(e) is nilexp.
|
|
|
593 |
|
|
|
594 |
labst_tag: Represents exps which are destination of jumps. Produced from
|
|
|
595 |
alt of conditional, body of repeat and each place of labelled.
|
|
|
596 |
son(e) is a holder.
|
|
|
597 |
bro(son(e)) is the destination exp.
|
|
|
598 |
shape is shape of bro(son(e)).
|
|
|
599 |
pt(e) is nilexp.
|
|
|
600 |
|
|
|
601 |
Properties in the props field are defined in expmacs.h
|
|
|
602 |
|
|
|
603 |
The holder (i.e. the son of the labst) can have any name_tag;
|
|
|
604 |
its no field is the number of uses of the labst and
|
|
|
605 |
its bro is the destination exp. No other field is defined.
|
|
|
606 |
|
|
|
607 |
|
|
|
608 |
last_local_tag: represents last_local construction.
|
|
|
609 |
son(e) is nilexp.
|
|
|
610 |
shape is top.
|
|
|
611 |
pt(e) is pointer(x).
|
|
|
612 |
no(e) is 0.
|
|
|
613 |
|
|
|
614 |
local_free_all_tag: represents local_free_all construction.
|
|
|
615 |
son(e) is nilexp.
|
|
|
616 |
shape is top.
|
|
|
617 |
pt(e) is nilexp.
|
|
|
618 |
no(e) is 0.
|
|
|
619 |
|
|
|
620 |
local_free_tag: Represents local_free construction.
|
|
|
621 |
son(e) is arg2 (pointer).
|
|
|
622 |
bro(son(e)) is arg1 (offset).
|
|
|
623 |
shape is top.
|
|
|
624 |
pt(e) is nilexp.
|
|
|
625 |
no(e) is 0.
|
|
|
626 |
|
|
|
627 |
|
|
|
628 |
long_jump_tag: Represents long_jump construction.
|
|
|
629 |
son(e) is arg1.
|
|
|
630 |
bro(son(e)) is arg2.
|
|
|
631 |
shape is bottom.
|
|
|
632 |
pt(e) is nilexp.
|
|
|
633 |
no(e) is 0.
|
|
|
634 |
|
|
|
635 |
make_complex_tag: represent make complex number.
|
|
|
636 |
son(e) is arg1.
|
|
|
637 |
bro(arg1) is arg2.
|
|
|
638 |
no(e) is 0.
|
|
|
639 |
pt(e) is nilexp.
|
|
|
640 |
|
|
|
641 |
make_lv_tag: represents make label value.
|
|
|
642 |
son(e) is nilexp.
|
|
|
643 |
shape is lv.
|
|
|
644 |
pt(e) is labst.
|
|
|
645 |
no(e) is 0.
|
|
|
646 |
|
|
|
647 |
Remember to increment labst count.
|
|
|
648 |
|
|
|
649 |
max_tag:
|
|
|
650 |
min_tag: represent maximum and minimum integer ops.
|
|
|
651 |
son(e) is arg1.
|
|
|
652 |
bro(arg1) is arg2.
|
|
|
653 |
no(e) is 0.
|
|
|
654 |
pt(e) is nilexp.
|
|
|
655 |
|
|
|
656 |
minptr_tag: Represents subtract_pointers construction.
|
|
|
657 |
son(e) is arg1
|
|
|
658 |
bro(son(e)) is arg2
|
|
|
659 |
shape is offset(al1(arg2),al1(arg1))
|
|
|
660 |
pt(e) is nilexp.
|
|
|
661 |
no(e) is 0.
|
|
|
662 |
|
|
|
663 |
minus_tag: represents subtraction.
|
|
|
664 |
This is replaced by addition of negation by check.c.
|
7 |
7u83 |
665 |
|
2 |
7u83 |
666 |
mod_tag: Represents rem1 construction.
|
|
|
667 |
son(e) is arg1.
|
|
|
668 |
bro(son(e)) is arg2
|
|
|
669 |
shape is sh(arg1)
|
|
|
670 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
671 |
no(e) is 0.
|
|
|
672 |
|
|
|
673 |
movecont_tag: Represents move_some construction.
|
|
|
674 |
son(e) is arg1.
|
|
|
675 |
bro(son(e)) is arg2.
|
|
|
676 |
bro(bro(son(e))) is arg3.
|
|
|
677 |
shape is top.
|
|
|
678 |
pt(e) is nilexp.
|
|
|
679 |
no(e) is 0.
|
|
|
680 |
|
|
|
681 |
Properties in the props field are defined in expmacs.h
|
|
|
682 |
|
|
|
683 |
mult_tag: represents integer multiplication.
|
|
|
684 |
son(e) is a brother list of argument, all of the same shape.
|
|
|
685 |
At least two arguments. After check any constants will
|
|
|
686 |
have been combined into one, which will be the last exp
|
|
|
687 |
if there is a constant contribution.
|
|
|
688 |
shape is shape of son(e).
|
|
|
689 |
no(e) is 0.
|
|
|
690 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
691 |
|
|
|
692 |
Remember to increment labst count if used.
|
|
|
693 |
|
|
|
694 |
name_tag: Represents obtain_tag
|
|
|
695 |
son(e) is declaration (an ident_tag).
|
|
|
696 |
no(e) is offset in bits from the start of that declaration's
|
|
|
697 |
value.
|
|
|
698 |
pt(e) is the next name_tag on the chain of uses of an ident_tag,
|
|
|
699 |
which started in th pt field of the ident_tag, or
|
|
|
700 |
nilexp if the end of the chain.
|
|
|
701 |
|
|
|
702 |
Properties in the props field are defined in expmacs.h
|
|
|
703 |
|
|
|
704 |
Remember to increment ident_tag count or use me_obtain from
|
|
|
705 |
me_fns.c to create this.
|
|
|
706 |
|
|
|
707 |
ncopies_tag: represents ncopies.
|
|
|
708 |
son(e) is value to be copied.
|
|
|
709 |
no(e) is n, the number of copies.
|
|
|
710 |
shape is nof(n, sh(son(e))).
|
|
|
711 |
pt(e) is nilexp.
|
|
|
712 |
|
|
|
713 |
neg_tag: Represents negate construction
|
|
|
714 |
son(e) is arg1.
|
|
|
715 |
shape is sh(arg1).
|
|
|
716 |
no(e) is 0.
|
|
|
717 |
pt(e) is destination labst if ov_err is error_jump, otherwise
|
|
|
718 |
nilexp.
|
|
|
719 |
|
|
|
720 |
nof_tag: represents the make_nof construction.
|
|
|
721 |
son(e) is arg1 as a brother list of zero or more exps, each of
|
|
|
722 |
the same shape (under eq_shape).
|
|
|
723 |
shape is nof(n, shape of item)
|
|
|
724 |
pt(e) is nilexp.
|
|
|
725 |
no(e) is 0.
|
|
|
726 |
|
|
|
727 |
not_tag: Represents logical complement construction
|
|
|
728 |
son(e) is arg1.
|
|
|
729 |
shape is sh(arg1).
|
|
|
730 |
no(e) is 0.
|
|
|
731 |
pt(e) is nilexp.
|
|
|
732 |
|
|
|
733 |
null_tag: represent ptr null and proc null.
|
|
|
734 |
son(e) is nilexp.
|
|
|
735 |
shape is pointer(approprite alignment).
|
|
|
736 |
no(e) is 0.
|
|
|
737 |
pt(e) is nilexp.
|
|
|
738 |
|
|
|
739 |
offset_add_tag: Represents offset_add construction.
|
|
|
740 |
son(e) is arg1
|
|
|
741 |
bro(son(e)) is arg2.
|
7 |
7u83 |
742 |
shape is offset(max(al1(arg1),al1(arg2)),al2(arg2))
|
2 |
7u83 |
743 |
pt(e) is nilexp.
|
|
|
744 |
no(e) is 0.
|
|
|
745 |
|
|
|
746 |
offset_div_tag: Represents offset_div construction.
|
|
|
747 |
son(e) is arg1
|
|
|
748 |
bro(son(e)) is arg2.
|
|
|
749 |
shape is integer(v).
|
|
|
750 |
pt(e) is nilexp.
|
|
|
751 |
no(e) is 0.
|
|
|
752 |
|
|
|
753 |
offset_div_by_int_tag: Represents offset_div_by_int construction.
|
|
|
754 |
son(e) is arg1
|
|
|
755 |
bro(son(e)) is arg2.
|
|
|
756 |
shape is offset(x,x)
|
|
|
757 |
pt(e) is nilexp.
|
|
|
758 |
no(e) is 0.
|
|
|
759 |
|
|
|
760 |
offset_max_tag: Represents offset_max construction.
|
|
|
761 |
son(e) is arg1
|
|
|
762 |
bro(son(e)) is arg2.
|
7 |
7u83 |
763 |
shape is offset(max(al1(arg1),al1(arg2)),max(al2(arg1),al2(arg2)))
|
2 |
7u83 |
764 |
pt(e) is nilexp.
|
|
|
765 |
no(e) is 0.
|
|
|
766 |
|
|
|
767 |
offset_mult_tag: Represents offset_mult construction.
|
|
|
768 |
son(e) is arg1
|
|
|
769 |
bro(son(e)) is arg2.
|
|
|
770 |
shape is offset(x,x)
|
|
|
771 |
pt(e) is nilexp.
|
|
|
772 |
no(e) is 0.
|
|
|
773 |
|
|
|
774 |
offset_negate_tag: Represents offset_negate construction.
|
|
|
775 |
son(e) is arg1
|
|
|
776 |
shape is offset(x,x)
|
|
|
777 |
pt(e) is nilexp.
|
|
|
778 |
no(e) is 0.
|
|
|
779 |
|
|
|
780 |
offset_pad_tag: represents offset pad.
|
|
|
781 |
son(e) is arg1 (offset).
|
|
|
782 |
shape is offset of required padded shape.
|
|
|
783 |
no(e) is 0.
|
|
|
784 |
pt(e) is nilexp.
|
|
|
785 |
|
|
|
786 |
offset_subtract_tag: Represents offset_subtract construction.
|
|
|
787 |
son(e) is arg1
|
|
|
788 |
bro(son(e)) is arg2.
|
7 |
7u83 |
789 |
shape is offset(al2(arg1),al2(arg2))
|
2 |
7u83 |
790 |
pt(e) is nilexp.
|
|
|
791 |
no(e) is 0.
|
|
|
792 |
|
|
|
793 |
or_tag: represents or
|
|
|
794 |
son(e) is a brother list of argument, all of the same shape.
|
|
|
795 |
At least two arguments. After check any constants will
|
|
|
796 |
have been combined into one, which will be the last exp
|
|
|
797 |
if there is a constant contribution.
|
|
|
798 |
shape is shape of son(e).
|
|
|
799 |
no(e) is 0.
|
|
|
800 |
pt(e) is nilexp.
|
|
|
801 |
|
|
|
802 |
plus_tag: represents the combination of plus and minus constructions.
|
|
|
803 |
son(e) is a brother list of argument, all of the same shape.
|
|
|
804 |
At least two arguments. After check any constants will
|
|
|
805 |
have been combined into one, which will be the last exp
|
|
|
806 |
if there is a constant contribution.
|
|
|
807 |
shape is shape of son(e).
|
|
|
808 |
no(e) is 0.
|
|
|
809 |
pt(e) is destination labst if ov_err is error_jump, otherwise
|
|
|
810 |
nilexp.
|
|
|
811 |
|
|
|
812 |
power_tag: represents integer power.
|
|
|
813 |
son(e) is arg1.
|
|
|
814 |
bro(arg1) is arg2.
|
|
|
815 |
shape is sh(arg1).
|
|
|
816 |
no(e) is 0.
|
|
|
817 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
818 |
|
|
|
819 |
Remember to increment labst count if used.
|
|
|
820 |
|
|
|
821 |
proc_tag: represents make_proc
|
|
|
822 |
son(e) is body of procedure, starting with declarations
|
|
|
823 |
(ident_tag) of parameters.
|
|
|
824 |
shape is proc.
|
|
|
825 |
no(e) is 0.
|
|
|
826 |
pt(e) is shape of return.
|
|
|
827 |
|
|
|
828 |
Properties in the props field are defined in expmacs.h
|
|
|
829 |
|
7 |
7u83 |
830 |
|
2 |
7u83 |
831 |
prof_tag: represents profile exp.
|
|
|
832 |
son(e) is nilexp.
|
|
|
833 |
shape is top.
|
|
|
834 |
no(e) is expected number of times through this point.
|
|
|
835 |
pt(e) is nilexp.
|
|
|
836 |
|
|
|
837 |
real_tag: represents a floating point constant.
|
|
|
838 |
son(e) is nilexp.
|
|
|
839 |
shape is a floating shape (not complex).
|
|
|
840 |
no(e) is index of number in flptnos.
|
|
|
841 |
pt(e) is nilexp.
|
|
|
842 |
|
|
|
843 |
realpart_tag: represents operation to take the real part of a complex.
|
|
|
844 |
son(e) is arg1 (complex).
|
|
|
845 |
shape is floating derived from same controls as complex.
|
|
|
846 |
no(e) is 0.
|
|
|
847 |
pt(e) is nilexp.
|
|
|
848 |
|
|
|
849 |
reff_tag: represents increment of a pointer by a constant offset.
|
|
|
850 |
son(e) is arg1 (pointer).
|
|
|
851 |
shape is shape of resulting pointer.
|
|
|
852 |
no(e) is offset in bits.
|
|
|
853 |
pt(e) is nilexp.
|
|
|
854 |
|
|
|
855 |
rem0_tag:
|
|
|
856 |
rem2_tag: Represents rem0/2 construction.
|
|
|
857 |
son(e) is arg1.
|
|
|
858 |
bro(son(e)) is arg2
|
|
|
859 |
shape is sh(arg1)
|
|
|
860 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
861 |
no(e) is 0.
|
|
|
862 |
|
|
|
863 |
rep_tag: represents repeat construction.
|
|
|
864 |
son(e) is start.
|
|
|
865 |
bro(son(e)) is body, which will be a labst_tag.
|
|
|
866 |
shape is shape of body.
|
|
|
867 |
pt(e) is loop record of this repeat.
|
|
|
868 |
no(e) is 0.
|
|
|
869 |
|
|
|
870 |
Properties in the props field are defined in expmacs.h
|
7 |
7u83 |
871 |
|
2 |
7u83 |
872 |
res_tag: Represents the return construction.
|
|
|
873 |
son(e) is arg1
|
|
|
874 |
shape is bottom.
|
|
|
875 |
pt(e) is nilexp.
|
|
|
876 |
no(e) is 0.
|
|
|
877 |
|
|
|
878 |
rotl_tag:
|
|
|
879 |
rotr_tag: represent rotate left and right.
|
|
|
880 |
son(e) is arg1 (value to be rotated).
|
|
|
881 |
bro(arg1) is arg2 (no of places).
|
|
|
882 |
shape is sh(arg10.
|
|
|
883 |
no(e) is 0.
|
|
|
884 |
pt(e) is nilexp.
|
|
|
885 |
|
|
|
886 |
round_tag: represents round_with_mode construction.
|
|
|
887 |
son(e) is arg1.
|
|
|
888 |
shape is integer(r).
|
|
|
889 |
no(e) is 0.
|
|
|
890 |
pt(e) is destination labst if ov_err is error_jump, otherwise
|
|
|
891 |
nilexp.
|
|
|
892 |
|
|
|
893 |
seq_tag: Represents the sequence construction.
|
|
|
894 |
bro(son(e)) is result.
|
|
|
895 |
son(e) is statements in the form of a zero-named exp, with its
|
|
|
896 |
son as the first statement, and the remaining statements
|
|
|
897 |
chained through the bro fields.
|
|
|
898 |
shape is the shape of result.
|
|
|
899 |
pt(e) is nilexp.
|
|
|
900 |
no(e) is 0.
|
|
|
901 |
|
|
|
902 |
Use new_exp_list to start and empty sequence, add_exp_list to
|
|
|
903 |
add an exp. When all but the result exp have been added, use
|
|
|
904 |
clear_exp_list on the list. Then create the sequence with
|
|
|
905 |
f_sequence.
|
|
|
906 |
|
|
|
907 |
shl_tag: Represents shift_left construction.
|
|
|
908 |
son(e) is arg1.
|
|
|
909 |
bro(son(e)) is arg2
|
|
|
910 |
shape is sh(arg1)
|
|
|
911 |
no(e) is 0.
|
|
|
912 |
pt(e) is labst if error_jump, nilexp otherwise.
|
|
|
913 |
|
|
|
914 |
Remember to increment labst count if used.
|
|
|
915 |
|
|
|
916 |
shr_tag: Represents shift_right construction.
|
|
|
917 |
son(e) is arg1.
|
|
|
918 |
bro(son(e)) is arg2
|
|
|
919 |
shape is sh(arg1)
|
|
|
920 |
no(e) is 0.
|
|
|
921 |
pt(e) is nilexp.
|
|
|
922 |
|
|
|
923 |
solve_tag: Represents the labelled construction.
|
|
|
924 |
son(e) is starter.
|
|
|
925 |
bro(son(e)) is the start of a brother list of one or more exps,
|
|
|
926 |
which will be labst_tag's for each of the places.
|
|
|
927 |
shape is LUB of starter and each of the places.
|
|
|
928 |
pt(e) is loop record of this solve.
|
|
|
929 |
no(e) is 0;
|
|
|
930 |
|
|
|
931 |
Properties in the props field are defined in expmacs.h
|
|
|
932 |
|
|
|
933 |
string_tag: represents constant array of integers.
|
|
|
934 |
son(e) is nilexp.
|
|
|
935 |
shape is nof(n, s).
|
|
|
936 |
nostr(e) is pointer to array of integers.
|
|
|
937 |
pt(e) is nilexp.
|
|
|
938 |
|
|
|
939 |
Properties in the props field are defined in expmacs.h
|
|
|
940 |
|
|
|
941 |
subptr_tag: represents subtract offset from pointer.
|
|
|
942 |
No longer used.
|
|
|
943 |
|
|
|
944 |
testbit_tag: Introduced by check to replace test(nt ,and(x, mask), 0)
|
|
|
945 |
if tn is equal or not_equal.
|
|
|
946 |
son(e) is x.
|
|
|
947 |
bro(son(e)) is mask (not necessarily constant).
|
|
|
948 |
shape is top.
|
|
|
949 |
no(e) is either between 0 and 100 inclusive, in which case
|
|
|
950 |
the probability of continuing to the next construction
|
|
|
951 |
(not jumping), or no(e) is 1000 in which case the
|
|
|
952 |
probability of jumping is not known.
|
|
|
953 |
pt(e) is destination labst_tag.
|
|
|
954 |
|
|
|
955 |
test_tag: Represents floating_test, integer_test, local_lv_test
|
|
|
956 |
offset_test, pointer_test, proc_test constructions.
|
|
|
957 |
son(e) is arg1.
|
|
|
958 |
bro(son(e)) is arg2.
|
|
|
959 |
shape is top.
|
|
|
960 |
no(e) is either between 0 and 100 inclusive, in which case
|
|
|
961 |
the probability of continuing to the next construction
|
|
|
962 |
(not jumping), or no(e) is 1000 in which case the
|
|
|
963 |
probability of jumping is not known.
|
|
|
964 |
|
|
|
965 |
pt(e) is destination labst_tag.
|
|
|
966 |
|
|
|
967 |
Create using me_q1 or me_q2 which will increment the usage
|
|
|
968 |
counter in the labst_tag.
|
|
|
969 |
|
|
|
970 |
If a test_tag is removed from the tree it must be killed using
|
|
|
971 |
kill_exp which will decrease the labst usage count AND kill
|
|
|
972 |
the arguments. If the arguments must not be killed, the labst
|
|
|
973 |
count must be decreased explicitly.
|
|
|
974 |
|
|
|
975 |
top_tag: represents "do nothing" operation.
|
|
|
976 |
son(e) is nilexp.
|
|
|
977 |
shape is top
|
|
|
978 |
no(e) is 0.
|
|
|
979 |
pt(e) is nilexp.
|
|
|
980 |
|
|
|
981 |
val_tag: represents constant integers and offsets.
|
|
|
982 |
son(e) is nilexp.
|
|
|
983 |
shape is integer or offset shape.
|
|
|
984 |
pt(e) is nilexp.
|
|
|
985 |
no(e)
|
|
|
986 |
if shape is integer and !isbigval(e), no(e) is the number.
|
|
|
987 |
if shape is integer and isbigval(e), no(e) is the index of
|
|
|
988 |
a representation of the integer in flptnos.
|
|
|
989 |
if shape is offset, no(e) is the offset measured in bits.
|
|
|
990 |
|
|
|
991 |
Properties in the props field are defined in expmacs.h
|
|
|
992 |
|
|
|
993 |
general_proc_tag:
|
|
|
994 |
son = (ident for caller-formal as in proc_tag)
|
|
|
995 |
....
|
7 |
7u83 |
996 |
with body = (ident for callee_formal with
|
2 |
7u83 |
997 |
def = formal_callee_tag)
|
|
|
998 |
....
|
|
|
999 |
with body of proc
|
|
|
1000 |
props = procprops
|
|
|
1001 |
shape is proc.
|
|
|
1002 |
pt(e) is shape of return.
|
7 |
7u83 |
1003 |
|
2 |
7u83 |
1004 |
apply_general_tag:
|
|
|
1005 |
son = proc
|
|
|
1006 |
bro(son) = exp(tag=0; props = procprops; no = number of otagexps;
|
|
|
1007 |
son = list of otagexps ie caller actuals)
|
|
|
1008 |
if tag is present in otagexp, then
|
7 |
7u83 |
1009 |
name(otagexp) = caller_tag
|
2 |
7u83 |
1010 |
son(otagexp) = actual
|
7 |
7u83 |
1011 |
and postlude will have ident with
|
|
|
1012 |
def = caller_name_tag
|
|
|
1013 |
and no(def) = no of corresponding caller_tag
|
2 |
7u83 |
1014 |
in the otagexp list, starting from 0
|
|
|
1015 |
else otagexp is the actual exp
|
|
|
1016 |
bro(bro(son)) = callees =(1) make_callee_list_tag with son list of exps
|
|
|
1017 |
and number = number in list
|
|
|
1018 |
(2) make_dynamic_callee_tag with son ptr
|
|
|
1019 |
and bro(son) size
|
|
|
1020 |
(3) same_callees_tag
|
7 |
7u83 |
1021 |
and props = procprops
|
2 |
7u83 |
1022 |
bro(bro(bro(son))) = postlude with tags identified as above
|
|
|
1023 |
|
7 |
7u83 |
1024 |
tail_call_tag:
|
|
|
1025 |
son = proc
|
2 |
7u83 |
1026 |
bro(son)= (tag=0; props = procprops; son = callees as above)
|
7 |
7u83 |
1027 |
|
2 |
7u83 |
1028 |
untidy_return:
|
|
|
1029 |
son = result exp
|
|
|
1030 |
|
|
|
1031 |
trap_tag:
|
|
|
1032 |
no() = error_code
|
|
|
1033 |
|
|
|
1034 |
************************************************************************/
|