Subversion Repositories tendra.SVN

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 7
Line -... Line 1...
-
 
1
/*
-
 
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
 */
1
/*
31
/*
2
    		 Crown Copyright (c) 1997
32
    		 Crown Copyright (c) 1997
3
    
33
 
4
    This TenDRA(r) Computer Program is subject to Copyright
34
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
35
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
36
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
37
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
38
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
39
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
40
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
41
    shall be deemed to be acceptance of the following conditions:-
12
    
42
 
13
        (1) Its Recipients shall ensure that this Notice is
43
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
44
        reproduced upon any copies or amended versions of it;
15
    
45
 
16
        (2) Any amended version of it shall be clearly marked to
46
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
47
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
48
        for the relevant amendment or amendments;
19
    
49
 
20
        (3) Its onward transfer from a recipient to another
50
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
51
        party shall be deemed to be that party's acceptance of
22
        these conditions;
52
        these conditions;
23
    
53
 
24
        (4) DERA gives no warranty or assurance as to its
54
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
55
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
56
        no liability whatsoever in relation to any use to which
27
        it may be put.
57
        it may be put.
28
*/
58
*/
29
 
59
 
30
 
60
 
31
/**********************************************************************
61
/**********************************************************************
32
$Author: release $
62
$Author: release $
33
$Date: 1998/01/17 15:55:47 $
63
$Date: 1998/01/17 15:55:47 $
34
$Revision: 1.1.1.1 $
64
$Revision: 1.1.1.1 $
35
$Log: tags.h,v $
65
$Log: tags.h,v $
Line 60... Line 90...
60
 * Revision 1.1  1995/04/06  10:44:05  currie
90
 * Revision 1.1  1995/04/06  10:44:05  currie
61
 * Initial revision
91
 * Initial revision
62
 *
92
 *
63
***********************************************************************/
93
***********************************************************************/
64
#ifndef c_diff
94
#ifndef c_diff
65
 
-
 
66
 
-
 
67
 
-
 
68
 
95
 
69
#define ident_tag 1
96
#define ident_tag 1
70
 
97
 
71
#define seq_tag 3
98
#define seq_tag 3
72
#define cond_tag 4
99
#define cond_tag 4
Line 163... Line 190...
163
#define power_tag 91
190
#define power_tag 91
164
#define imag_tag 92
191
#define imag_tag 92
165
#define make_complex_tag 93
192
#define make_complex_tag 93
166
#define int_to_bitf_tag 94
193
#define int_to_bitf_tag 94
167
#define conj_tag 95
194
#define conj_tag 95
168
 
-
 
169
 
-
 
170
 
195
 
171
#define hold_tag 101
196
#define hold_tag 101
172
#define hold2_tag 102 /* 102 also used as hold */
197
#define hold2_tag 102 /* 102 also used as hold */
173
#define initial_value_tag 103 /* removed in common part */
198
#define initial_value_tag 103 /* removed in common part */
174
 
-
 
175
 
199
 
176
#define cont_tag 113
200
#define cont_tag 113
177
#define field_tag 114
201
#define field_tag 114
178
#define val_tag 115
202
#define val_tag 115
179
#define reff_tag 116
203
#define reff_tag 116
Line 201... Line 225...
201
#define set_stack_limit_tag 206
225
#define set_stack_limit_tag 206
202
#define formal_callee_tag 207
226
#define formal_callee_tag 207
203
#define trap_tag 208
227
#define trap_tag 208
204
#define asm_tag 209
228
#define asm_tag 209
205
 
229
 
206
#define is_o(t) ((t)>=cont_tag && (t)<=make_stack_limit_tag)
230
#define is_o(t)	((t) >= cont_tag && (t) <= make_stack_limit_tag)
207
#define is_a(t) ((t)>=plus_tag && (t)<=make_stack_limit_tag)
231
#define is_a(t)	((t) >= plus_tag && (t) <= make_stack_limit_tag)
208
 
232
 
209
 
233
 
210
#endif
234
#endif /* c_diff */
211
 
235
 
212
 
236
 
213
/***********************************************************************
237
/***********************************************************************
214
 
238
 
215
NOTE that an exp can occur in just one place in the tree, because of
239
NOTE that an exp can occur in just one place in the tree, because of
216
the backward pointers. Except for name_tag the general structure is
240
the backward pointers. Except for name_tag the general structure is
217
that an exp has a son which is nilexp or its first argument exp. The
241
that an exp has a son which is nilexp or its first argument exp. The
218
next argument is the bro of the first, the next the bro of that etc.
242
next argument is the bro of the first, the next the bro of that etc.
219
The last argument has the last field set and its bro is the head exp
243
The last argument has the last field set and its bro is the head exp
220
of the construction. In a name_tag the son contains the ident_tag which
244
of the construction. In a name_tag the son contains the ident_tag which
221
declares the identity or variable being used. case, env_offset and string 
245
declares the identity or variable being used. case, env_offset and string
222
are also special cases.
246
are also special cases.
223
 
247
 
224
The pt field is used in goto and test-like constructions to hold the
248
The pt field is used in goto and test-like constructions to hold the
225
labst being jumped to. It is used in ident and name constructions
249
labst being jumped to. It is used in ident and name constructions
226
to hold a list of uses of a declaration.
250
to hold a list of uses of a declaration.
Line 228... Line 252...
228
A name_tag or an exp with at pt to a labst MUST NOT be removed from
252
A name_tag or an exp with at pt to a labst MUST NOT be removed from
229
the tree without the usage count being decreased. In the case of name_tag
253
the tree without the usage count being decreased. In the case of name_tag
230
the exp must be removed from the pt-list which starts in the pt
254
the exp must be removed from the pt-list which starts in the pt
231
of the defining ident_tag. kill_exp does these operations. It
255
of the defining ident_tag. kill_exp does these operations. It
232
also applies kill_exp recursively to all arguments.
256
also applies kill_exp recursively to all arguments.
233
 
257
 
234
For constructions not involving tags or labels, install_fns.c contains
258
For constructions not involving tags or labels, install_fns.c contains
235
examples of ways of constructing exps which may be used during
259
examples of ways of constructing exps which may be used during
236
TDF transformations. However, at the time when the functions in
260
TDF transformations. However, at the time when the functions in
237
install_fns.c are being used, tags and labels are represented by
261
install_fns.c are being used, tags and labels are represented by
238
indexes into arrays. During TDF transformations this is no longer so.
262
indexes into arrays. During TDF transformations this is no longer so.
Line 248... Line 272...
248
have these represented in the props field. as in expmacs.h.
272
have these represented in the props field. as in expmacs.h.
249
 
273
 
250
An exp should normally have hold_check applied to it after being created.
274
An exp should normally have hold_check applied to it after being created.
251
 
275
 
252
abs_tag: Represents integer abs construction.
276
abs_tag: Represents integer abs construction.
253
	son(e) is arg1.
277
	son(e) is arg1.
254
	shape is sh(arg1).
278
	shape is sh(arg1).
255
	pt(e) is labst if error_jump, nilexp otherwise.
279
	pt(e) is labst if error_jump, nilexp otherwise.
256
 
280
 
257
absbool_tag: Represents comparison and conversion to boolean.
281
absbool_tag: Represents comparison and conversion to boolean.
258
	     Only produced (by check.c) is has_setcc is 1.
282
	     Only produced (by check.c) is has_setcc is 1.
259
	son(e) is arg1.
283
	son(e) is arg1.
260
	bro(arg1) is arg2.
284
	bro(arg1) is arg2.
261
	shape is a variety shape.
285
	shape is a variety shape.
262
	ntest is represented in props, qv.
286
	ntest is represented in props, qv.
263
	pt(e) is nilexp.
287
	pt(e) is nilexp.
264
	no(e) is 0.
288
	no(e) is 0.
265
	Delivers 1 in shape if arg1 ntest arg2, 0 otherwise.
289
	Delivers 1 in shape if arg1 ntest arg2, 0 otherwise.
266
 
290
 
267
addptr_tag: Adds pointer and offset to produce pointer.
291
addptr_tag: Adds pointer and offset to produce pointer.
268
	son(e) is arg1 (pointer).
292
	son(e) is arg1 (pointer).
269
	bro(arg1) is arg2 (offset).
293
	bro(arg1) is arg2 (offset).
270
	shape is pointer(al2(sh(arg2))).
294
	shape is pointer(al2(sh(arg2))).
271
	pt(e) is nilexp.
295
	pt(e) is nilexp.
272
	no(e) is 0.
296
	no(e) is 0.
273
 
297
 
274
alloca_tag: Represents local_alloc construction.
298
alloca_tag: Represents local_alloc construction.
275
	son(e) is arg1.
299
	son(e) is arg1.
276
	shape is pointer(x).
300
	shape is pointer(x).
277
	no(e) is 0.
301
	no(e) is 0.
278
	props(e) is 0.
302
	props(e) is 0.
279
	pt(e) is nilexp.
303
	pt(e) is nilexp.
280
 
304
 
281
and_tag: represents and
305
and_tag: represents and
282
	son(e) is a brother list of argument, all of the same shape.
306
	son(e) is a brother list of argument, all of the same shape.
Line 286... Line 310...
286
	shape is shape of son(e). This may be changed in some installers
310
	shape is shape of son(e). This may be changed in some installers
287
		by chvar_tag transformations in check - only if
311
		by chvar_tag transformations in check - only if
288
		has_byte_ops is 1.
312
		has_byte_ops is 1.
289
	no(e) is 0.
313
	no(e) is 0.
290
	pt(e) is nilexp.
314
	pt(e) is nilexp.
291
	
315
 
292
apply_tag: Represents apply_proc construction.
316
apply_tag: Represents apply_proc construction.
293
	son(e) is arg1
317
	son(e) is arg1
294
	bro(son(e)) is arg2 in the form of a brother list of zero or
318
	bro(son(e)) is arg2 in the form of a brother list of zero or
295
		more exps.
319
		more exps.
296
	shape is result_shape.
320
	shape is result_shape.
Line 379... Line 403...
379
 
403
 
380
concatnof_tag: represents concat nof
404
concatnof_tag: represents concat nof
381
	son(e) is arg1.
405
	son(e) is arg1.
382
	bro(arg1) is arg2
406
	bro(arg1) is arg2
383
		arg1 and arg2 will be nof(m, s) and nof(n, s)
407
		arg1 and arg2 will be nof(m, s) and nof(n, s)
384
	shape is nof(m+n, s)
408
	shape is nof(m + n, s)
385
	no(e) is 0.
409
	no(e) is 0.
386
	pt(e) is nilexp.
410
	pt(e) is nilexp.
387
 
411
 
388
cond_tag: Represents conditional construction.
412
cond_tag: Represents conditional construction.
389
	son(e) is first.
413
	son(e) is first.
Line 489... Line 513...
489
	pt(e) is labst if error_jump, nilexp otherwise.
513
	pt(e) is labst if error_jump, nilexp otherwise.
490
 
514
 
491
	Remember to increment labst count if used.
515
	Remember to increment labst count if used.
492
 
516
 
493
fneg_tag: represents floating negation.
517
fneg_tag: represents floating negation.
494
	son(e) is arg1.
518
	son(e) is arg1.
495
	shape is sh(arg1).
519
	shape is sh(arg1).
496
	no(e) is 0.
520
	no(e) is 0.
497
	pt(e) is labst if error_jump, nilexp otherwise.
521
	pt(e) is labst if error_jump, nilexp otherwise.
498
 
522
 
499
	Remember to increment labst count if used.
523
	Remember to increment labst count if used.
500
 
524
 
501
fplus_tag: represents floating addition.
525
fplus_tag: represents floating addition.
502
	son(e) is a brother list of argument, all of the same shape.
526
	son(e) is a brother list of argument, all of the same shape.
503
		At least two arguments. After check any constants will
527
		At least two arguments. After check any constants will
504
		have been combined into one, which will be the last exp
528
		have been combined into one, which will be the last exp
Line 540... Line 564...
540
	For identify: son(e) is definition, bro(son(e)) is body.
564
	For identify: son(e) is definition, bro(son(e)) is body.
541
	For variable: son(e) is init, bro(son(e)) is body.
565
	For variable: son(e) is init, bro(son(e)) is body.
542
	The shape of the result is the shape of body.
566
	The shape of the result is the shape of body.
543
        The no(e) is a count of the number of uses.
567
        The no(e) is a count of the number of uses.
544
        The pt(e) is the start of a chain of uses through name_tag's.
568
        The pt(e) is the start of a chain of uses through name_tag's.
545
 
569
 
546
	Properties in the props field are defined in expmacs.h
570
	Properties in the props field are defined in expmacs.h
547
 
571
 
548
	Create an ident_tag using me_startid, add name_tag uses of it
572
	Create an ident_tag using me_startid, add name_tag uses of it
549
	using me_obtain, complete the definition using me_complete_id.
573
	using me_obtain, complete the definition using me_complete_id.
550
 
574
 
Line 570... Line 594...
570
labst_tag: Represents exps which are destination of jumps. Produced from
594
labst_tag: Represents exps which are destination of jumps. Produced from
571
	alt of conditional, body of repeat and each place of labelled.
595
	alt of conditional, body of repeat and each place of labelled.
572
	son(e) is a holder.
596
	son(e) is a holder.
573
	bro(son(e)) is the destination exp.
597
	bro(son(e)) is the destination exp.
574
	shape is shape of bro(son(e)).
598
	shape is shape of bro(son(e)).
575
	pt(e) is nilexp.
599
	pt(e) is nilexp.
576
 
600
 
577
	Properties in the props field are defined in expmacs.h
601
	Properties in the props field are defined in expmacs.h
578
 
602
 
579
	The holder (i.e. the son of the labst) can have any name_tag;
603
	The holder (i.e. the son of the labst) can have any name_tag;
580
	its no field is the number of uses of the labst and
604
	its no field is the number of uses of the labst and
581
	its bro is the destination exp. No other field is defined.
605
	its bro is the destination exp. No other field is defined.
582
 
606
 
583
 
607
 
584
last_local_tag: represents last_local construction.
608
last_local_tag: represents last_local construction.
585
	son(e) is nilexp.
609
	son(e) is nilexp.
586
	shape is top.
610
	shape is top.
587
	pt(e) is pointer(x).
611
	pt(e) is pointer(x).
588
	no(e) is 0.
612
	no(e) is 0.
589
 
613
 
590
local_free_all_tag: represents local_free_all construction.
614
local_free_all_tag: represents local_free_all construction.
591
	son(e) is nilexp.
615
	son(e) is nilexp.
592
	shape is top.
616
	shape is top.
593
	pt(e) is nilexp.
617
	pt(e) is nilexp.
594
	no(e) is 0.
618
	no(e) is 0.
595
 
619
 
596
local_free_tag: Represents local_free construction.
620
local_free_tag: Represents local_free construction.
Line 616... Line 640...
616
 
640
 
617
make_lv_tag: represents make label value.
641
make_lv_tag: represents make label value.
618
	son(e) is nilexp.
642
	son(e) is nilexp.
619
	shape is lv.
643
	shape is lv.
620
	pt(e) is labst.
644
	pt(e) is labst.
621
	no(e) is 0.
645
	no(e) is 0.
622
 
646
 
623
	Remember to increment labst count.
647
	Remember to increment labst count.
624
 
648
 
625
max_tag:
649
max_tag:
626
min_tag: represent maximum and minimum integer ops.
650
min_tag: represent maximum and minimum integer ops.
627
	son(e) is arg1.
651
	son(e) is arg1.
628
	bro(arg1) is arg2.
652
	bro(arg1) is arg2.
629
	no(e) is 0.
653
	no(e) is 0.
630
	pt(e) is nilexp.
654
	pt(e) is nilexp.
631
 
655
 
632
minptr_tag: Represents subtract_pointers construction.
656
minptr_tag: Represents subtract_pointers construction.
633
	son(e) is arg1
657
	son(e) is arg1
634
	bro(son(e)) is arg2
658
	bro(son(e)) is arg2
635
	shape is offset(al1(arg2),al1(arg1))
659
	shape is offset(al1(arg2),al1(arg1))
636
	pt(e) is nilexp.
660
	pt(e) is nilexp.
637
	no(e) is 0.
661
	no(e) is 0.
638
 
662
 
639
minus_tag: represents subtraction.
663
minus_tag: represents subtraction.
640
	This is replaced by addition of negation by check.c.
664
	This is replaced by addition of negation by check.c.
641
		
665
 
642
mod_tag: Represents rem1 construction.
666
mod_tag: Represents rem1 construction.
643
	son(e) is arg1.
667
	son(e) is arg1.
644
	bro(son(e)) is arg2
668
	bro(son(e)) is arg2
645
	shape is sh(arg1)
669
	shape is sh(arg1)
646
	pt(e) is labst if error_jump, nilexp otherwise.
670
	pt(e) is labst if error_jump, nilexp otherwise.
647
	no(e) is 0.
671
	no(e) is 0.
648
 
672
 
649
movecont_tag: Represents move_some construction.
673
movecont_tag: Represents move_some construction.
650
	son(e) is arg1.
674
	son(e) is arg1.
651
	bro(son(e)) is arg2.
675
	bro(son(e)) is arg2.
652
	bro(bro(son(e))) is arg3.
676
	bro(bro(son(e))) is arg3.
653
	shape is top.
677
	shape is top.
654
	pt(e) is nilexp.
678
	pt(e) is nilexp.
655
	no(e) is 0.
679
	no(e) is 0.
656
 
680
 
Line 713... Line 737...
713
	pt(e) is nilexp.
737
	pt(e) is nilexp.
714
 
738
 
715
offset_add_tag: Represents offset_add construction.
739
offset_add_tag: Represents offset_add construction.
716
	son(e) is arg1
740
	son(e) is arg1
717
	bro(son(e)) is arg2.
741
	bro(son(e)) is arg2.
718
	shape is offset(max(al1(arg1),al1(arg2)),al2(arg2)) 
742
	shape is offset(max(al1(arg1),al1(arg2)),al2(arg2))
719
	pt(e) is nilexp.
743
	pt(e) is nilexp.
720
	no(e) is 0.
744
	no(e) is 0.
721
 
745
 
722
offset_div_tag: Represents offset_div construction.
746
offset_div_tag: Represents offset_div construction.
723
	son(e) is arg1
747
	son(e) is arg1
724
	bro(son(e)) is arg2.
748
	bro(son(e)) is arg2.
725
	shape is integer(v).
749
	shape is integer(v).
726
	pt(e) is nilexp.
750
	pt(e) is nilexp.
727
	no(e) is 0.
751
	no(e) is 0.
728
 
752
 
729
offset_div_by_int_tag: Represents offset_div_by_int construction.
753
offset_div_by_int_tag: Represents offset_div_by_int construction.
730
	son(e) is arg1
754
	son(e) is arg1
731
	bro(son(e)) is arg2.
755
	bro(son(e)) is arg2.
732
	shape is offset(x,x)
756
	shape is offset(x,x)
733
	pt(e) is nilexp.
757
	pt(e) is nilexp.
734
	no(e) is 0.
758
	no(e) is 0.
735
 
759
 
736
offset_max_tag: Represents offset_max construction.
760
offset_max_tag: Represents offset_max construction.
737
	son(e) is arg1
761
	son(e) is arg1
738
	bro(son(e)) is arg2.
762
	bro(son(e)) is arg2.
739
	shape is offset(max(al1(arg1),al1(arg2)),max(al2(arg1),al2(arg2))) 
763
	shape is offset(max(al1(arg1),al1(arg2)),max(al2(arg1),al2(arg2)))
740
	pt(e) is nilexp.
764
	pt(e) is nilexp.
741
	no(e) is 0.
765
	no(e) is 0.
742
 
766
 
743
offset_mult_tag: Represents offset_mult construction.
767
offset_mult_tag: Represents offset_mult construction.
744
	son(e) is arg1
768
	son(e) is arg1
745
	bro(son(e)) is arg2.
769
	bro(son(e)) is arg2.
746
	shape is offset(x,x)
770
	shape is offset(x,x)
747
	pt(e) is nilexp.
771
	pt(e) is nilexp.
748
	no(e) is 0.
772
	no(e) is 0.
749
 
773
 
750
offset_negate_tag: Represents offset_negate construction.
774
offset_negate_tag: Represents offset_negate construction.
751
	son(e) is arg1
775
	son(e) is arg1
752
	shape is offset(x,x)
776
	shape is offset(x,x)
753
	pt(e) is nilexp.
777
	pt(e) is nilexp.
754
	no(e) is 0.
778
	no(e) is 0.
755
 
779
 
756
offset_pad_tag: represents offset pad.
780
offset_pad_tag: represents offset pad.
757
	son(e) is arg1 (offset).
781
	son(e) is arg1 (offset).
758
	shape is offset of required padded shape.
782
	shape is offset of required padded shape.
759
	no(e) is 0.
783
	no(e) is 0.
760
	pt(e) is nilexp.
784
	pt(e) is nilexp.
761
 
785
 
762
offset_subtract_tag: Represents offset_subtract construction.
786
offset_subtract_tag: Represents offset_subtract construction.
763
	son(e) is arg1
787
	son(e) is arg1
764
	bro(son(e)) is arg2.
788
	bro(son(e)) is arg2.
765
	shape is offset(al2(arg1),al2(arg2)) 
789
	shape is offset(al2(arg1),al2(arg2))
766
	pt(e) is nilexp.
790
	pt(e) is nilexp.
767
	no(e) is 0.
791
	no(e) is 0.
768
 
792
 
769
or_tag: represents or
793
or_tag: represents or
770
	son(e) is a brother list of argument, all of the same shape.
794
	son(e) is a brother list of argument, all of the same shape.
771
		At least two arguments. After check any constants will
795
		At least two arguments. After check any constants will
772
		have been combined into one, which will be the last exp
796
		have been combined into one, which will be the last exp
773
		if there is a constant contribution.
797
		if there is a constant contribution.
774
	shape is shape of son(e).
798
	shape is shape of son(e).
775
	no(e) is 0.
799
	no(e) is 0.
776
	pt(e) is nilexp.
800
	pt(e) is nilexp.
777
 
801
 
778
plus_tag: represents the combination of plus and minus constructions.
802
plus_tag: represents the combination of plus and minus constructions.
779
	son(e) is a brother list of argument, all of the same shape.
803
	son(e) is a brother list of argument, all of the same shape.
780
		At least two arguments. After check any constants will
804
		At least two arguments. After check any constants will
781
		have been combined into one, which will be the last exp
805
		have been combined into one, which will be the last exp
782
		if there is a constant contribution.
806
		if there is a constant contribution.
783
	shape is shape of son(e).
807
	shape is shape of son(e).
784
	no(e) is 0.
808
	no(e) is 0.
785
	pt(e) is destination labst if ov_err is error_jump, otherwise
809
	pt(e) is destination labst if ov_err is error_jump, otherwise
786
		nilexp.
810
		nilexp.
787
 
811
 
788
power_tag: represents integer power.
812
power_tag: represents integer power.
789
	son(e) is arg1.
813
	son(e) is arg1.
790
	bro(arg1) is arg2.
814
	bro(arg1) is arg2.
791
	shape is sh(arg1).
815
	shape is sh(arg1).
792
	no(e) is 0.
816
	no(e) is 0.
793
	pt(e) is labst if error_jump, nilexp otherwise.
817
	pt(e) is labst if error_jump, nilexp otherwise.
794
 
818
 
795
	Remember to increment labst count if used.
819
	Remember to increment labst count if used.
796
 
820
 
797
proc_tag: represents make_proc
821
proc_tag: represents make_proc
798
	son(e) is body of procedure, starting with declarations
822
	son(e) is body of procedure, starting with declarations
799
		(ident_tag) of parameters.
823
		(ident_tag) of parameters.
800
	shape is proc.
824
	shape is proc.
801
	no(e) is 0.
825
	no(e) is 0.
802
	pt(e) is shape of return.
826
	pt(e) is shape of return.
803
 
827
 
804
	Properties in the props field are defined in expmacs.h
828
	Properties in the props field are defined in expmacs.h
805
	
829
 
806
 
830
 
807
prof_tag: represents profile exp.
831
prof_tag: represents profile exp.
808
	son(e) is nilexp.
832
	son(e) is nilexp.
809
	shape is top.
833
	shape is top.
810
	no(e) is expected number of times through this point.
834
	no(e) is expected number of times through this point.
Line 817... Line 841...
817
	pt(e) is nilexp.
841
	pt(e) is nilexp.
818
 
842
 
819
realpart_tag: represents operation to take the real part of a complex.
843
realpart_tag: represents operation to take the real part of a complex.
820
	son(e) is arg1 (complex).
844
	son(e) is arg1 (complex).
821
	shape is floating derived from same controls as complex.
845
	shape is floating derived from same controls as complex.
822
	no(e) is 0.
846
	no(e) is 0.
823
	pt(e) is nilexp.
847
	pt(e) is nilexp.
824
 
848
 
825
reff_tag: represents increment of a pointer by a constant offset.
849
reff_tag: represents increment of a pointer by a constant offset.
826
	son(e) is arg1 (pointer).
850
	son(e) is arg1 (pointer).
827
	shape is shape of resulting pointer.
851
	shape is shape of resulting pointer.
Line 842... Line 866...
842
	shape is shape of body.
866
	shape is shape of body.
843
	pt(e) is loop record of this repeat.
867
	pt(e) is loop record of this repeat.
844
	no(e) is 0.
868
	no(e) is 0.
845
 
869
 
846
	Properties in the props field are defined in expmacs.h
870
	Properties in the props field are defined in expmacs.h
847
	
871
 
848
res_tag: Represents the return construction.
872
res_tag: Represents the return construction.
849
	son(e) is arg1
873
	son(e) is arg1
850
	shape is bottom.
874
	shape is bottom.
851
	pt(e) is nilexp.
875
	pt(e) is nilexp.
852
	no(e) is 0.
876
	no(e) is 0.
Line 967... Line 991...
967
	Properties in the props field are defined in expmacs.h
991
	Properties in the props field are defined in expmacs.h
968
 
992
 
969
general_proc_tag:
993
general_proc_tag:
970
	son = (ident for caller-formal as in proc_tag)
994
	son = (ident for caller-formal as in proc_tag)
971
			....
995
			....
972
	      with body = (ident for callee_formal with 
996
	      with body = (ident for callee_formal with
973
	      			def = formal_callee_tag)
997
	      			def = formal_callee_tag)
974
	      			....
998
	      			....
975
	      		   with body of proc
999
	      		   with body of proc
976
	props = procprops
1000
	props = procprops
977
	shape is proc.
1001
	shape is proc.
978
	pt(e) is shape of return.
1002
	pt(e) is shape of return.
979
	
1003
 
980
apply_general_tag:
1004
apply_general_tag:
981
        son = proc
1005
        son = proc
982
        bro(son) = exp(tag=0; props = procprops; no = number of otagexps;
1006
        bro(son) = exp(tag=0; props = procprops; no = number of otagexps;
983
        		son = list of otagexps ie caller actuals)
1007
        		son = list of otagexps ie caller actuals)
984
        	   if tag is present in otagexp, then
1008
        	   if tag is present in otagexp, then
985
        	   		name(otagexp)=caller_tag
1009
        	   		name(otagexp) = caller_tag
986
        	   		son(otagexp) = actual
1010
        	   		son(otagexp) = actual
987
        	   	and postlude will have ident with 
1011
        	   	and postlude will have ident with
988
        	   		def = caller_name_tag 
1012
        	   		def = caller_name_tag
989
				and no(def) = no of corresponding caller_tag 
1013
				and no(def) = no of corresponding caller_tag
990
					in the otagexp list, starting from 0
1014
					in the otagexp list, starting from 0
991
        	   else otagexp is the actual exp
1015
        	   else otagexp is the actual exp
992
        bro(bro(son)) = callees =(1) make_callee_list_tag with son list of exps
1016
        bro(bro(son)) = callees =(1) make_callee_list_tag with son list of exps
993
        	        		and number = number in list
1017
        	        		and number = number in list
994
        	        	 (2) make_dynamic_callee_tag with son ptr
1018
        	        	 (2) make_dynamic_callee_tag with son ptr
995
        	        	 	and bro(son) size
1019
        	        	 	and bro(son) size
996
        	        	 (3) same_callees_tag
1020
        	        	 (3) same_callees_tag
997
			and props = procprops	
1021
			and props = procprops
998
        bro(bro(bro(son))) = postlude with tags identified as above
1022
        bro(bro(bro(son))) = postlude with tags identified as above
999
 
1023
 
1000
tail_call_tag:       
1024
tail_call_tag:
1001
        son = proc       
1025
        son = proc
1002
        bro(son)= (tag=0; props = procprops; son = callees as above)
1026
        bro(son)= (tag=0; props = procprops; son = callees as above)
1003
        	       
-
 
-
 
1027
 
1004
untidy_return:
1028
untidy_return:
1005
	son = result exp
1029
	son = result exp
1006
 
1030
 
1007
trap_tag:
1031
trap_tag:
1008
	no() = error_code
1032
	no() = error_code