Added upstream from http://ftp.icm.edu.pl/pub/loglan/
[loglan.git] / sources / gen / oxen.h
1 /*     Loglan82 Compiler&Interpreter
2      Copyright (C) 1993 Institute of Informatics, University of Warsaw
3      Copyright (C)  1993, 1994 LITA, Pau
4      
5      This program is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published by
7      the Free Software Foundation; either version 2 of the License, or
8      (at your option) any later version.
9      
10      This program is distributed in the hope that it will be useful,
11      but WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13      GNU General Public License for more details.
14      
15 =======================================================================
16 */
17
18 /**********************************************************/
19 /*             auxiliary functions for GEN                */
20 /*   Written according to NEW m & ipmem declarations      */
21 /*   Last modified : May-08-89                            */
22 /**********************************************************/
23
24 #ifndef NO_PROTOTYPES
25
26 int next(void);
27
28     /* M^ [ FIRSTLABEL..MEMLIMIT ] IS USED FOR HANDLING LABELS */
29     /* FOR LABEL L :                                           */
30     /*  M^ [ MEMLIMIT-L+1 ] < 0                                */
31     /*          -->  = - VALUE OF ALREADY DEFINED LABEL        */
32     /*  M^ [ MEMLIMIT-L+1 ] > 0                                */
33     /*          -->  = HEAD OF UNSATISFIED REFERENCES LIST     */
34
35
36
37 /**********************************************************/
38
39 void deflabel(int);
40 void begunit(int);
41 void uselabel(address);
42 void endunit(void);
43
44 int locspace(app);
45 void locrelease(address,app);
46
47  /* returns offset of the new temporary variable allocated in global area */
48  /*   indexed 1..maxcomtemp                                               */
49
50  /* returns offset of the new temporary variable allocated within local area */
51  /* indexed -maxloctemp .. -1         for non-reference     or               */
52  /*                   0 .. maxreftemp for reference values                   */
53
54 /*  extern void locrelease(address n, app ap);  */
55 /* releases temporary variable of appetite ap allocated at address n */
56 /* within local area                                                 */
57
58
59 void force(argnr,addrmode,address,address);
60 void forceconst(argnr);
61 void forceprot(argnr);
62 void argument(argnr);
63
64    /* void force(argnr n, addrmode m, address o1, address o2); */
65    /* forces the n-th argument to be of m-mode with parameters o1,o2 */
66
67    /* void forceconst(argnr n)  ;*/
68    /* forces the n-th argument to be a constant */
69
70   /*  extern void forceprot(argnr n);  */
71    /* forces the n-th argument to be a prototype number as a constant */
72
73   /* extern void argument(argnr n);  */
74 /* puts the description of the n-th argument into args[n] */
75 /* for temporary variables with no next use and not live  */
76 /*  the corresponding is released                         */
77
78  /* static void result(argnr n);  */
79  /* puts the desription of n-th argument ( being defined ) into args[n].   */
80  /* for the temporary value the new space is assigned                      */
81
82 void emit(void);
83
84 void defaultargs(void);
85    /* prepares default descriptions of arguments */
86
87 void esac(void);
88  /* produces a description of 'case' */
89
90
91 #else
92
93
94 int next();
95 void deflabel();
96 void begunit();
97 void uselabel();
98 void endunit();
99 int locspace();
100 void locrelease();
101 void force();
102 void forceconst();
103 void forceprot();
104 void argument();
105 void emit();
106 void defaultargs();
107 void esac();
108
109 #endif
110