2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
5 * Author: Ceriel J.H. Jacobs
8 /* D E S I G N A T O R D E S C R I P T I O N S */
10 /* $Id: desig.h,v 1.8 1994/06/24 12:40:39 ceriel Exp $ */
12 /* Generating code for designators is not particularly easy, especially if
13 you don't know wether you want the address or the value.
14 The next structure is used to generate code for designators.
15 It contains information on how to find the designator, after generation
16 of the code that is common to both address and value computations.
21 #define DSG_INIT 0 /* don't know anything yet */
22 #define DSG_LOADED 1 /* designator loaded on top of the stack */
23 #define DSG_PLOADED 2 /* designator accessible through pointer on
24 stack, possibly with an offset
26 #define DSG_FIXED 3 /* designator directly accessible */
27 #define DSG_PFIXED 4 /* designator accessible through directly
30 #define DSG_INDEXED 5 /* designator accessible through array
31 operation. Address of array descriptor on
32 top of the stack, index beneath that, and
33 base address beneath that
35 arith dsg_offset; /* contains an offset for PLOADED,
36 or for FIXED or PFIXED it contains an
37 offset from dsg_name, if it exists,
38 or from the current Local Base
40 char *dsg_name; /* name of global variable, used for
43 struct def *dsg_def; /* def structure associated with this
48 typedef struct desig t_desig;
50 /* The next structure describes the designator in a with-statement.
51 We have a linked list of them, as with-statements may be nested.
55 struct withdesig *w_next;
56 int w_flags; /* D_USED|D_DEFINED */
57 struct scope *w_scope; /* scope in which fields of this record
60 t_desig w_desig; /* a desig structure for this particular
65 extern struct withdesig *WithDesigs;
67 #define NO_LABEL ((label) 0)