OSDN Git Service

Move declarations and building code for common tree nodes to tree.[ch]
[pf3gnuchains/gcc-fork.git] / gcc / ch / ch-tree.h
1 /* Definitions for CHILL parsing and type checking.
2    Copyright (C) 1992, 93, 94, 98, 1999 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING.  If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21 #ifndef _CH_TREE_H
22 #define _CH_TREE_H
23
24 /* Usage of TREE_LANG_FLAG_?:
25    1: TUPLE_NAMED_FIELD
26    "  TYPE_FIELDS_READONLY (in ARRAY_TYPE, RECORD_TYPE or UNION_TYPE)
27    "  C_DECLARED_LABEL_FLAG
28    "  C_TYPE_VARIABLE_SIZE
29    2: C_TYPE_FIELDS_VOLATILE (in RECORD_TYPE or UNION_TYPE)
30    "  ELSE_LABEL_SPECIFIED (in CASE selector expression)
31    3: UNSATISFIED_FLAG
32    4: CH_USE_SEIZEFILE_RESTRICTED
33    "  CH_ALREADY_GRANTED
34    5: CH_DERIVED_FLAG   (in EXPR or DECL)
35 */
36
37 /* Usage of TYPE_LANG_FLAG_?:
38    0: CH_TYPE_NONVALUE_P
39    1: C_TYPE_VARIABLE_SIZE
40    2: CH_IS_ACCESS_MODE  
41    3: CH_IS_BUFFER_MODE
42    4: CH_IS_EVENT_MODE
43    5: CH_ENUM_IS_NUMBERED
44    6: CH_IS_TEXT_MODE
45 */
46
47 /* Language-dependent contents of an identifier.  */
48
49 struct lang_identifier
50 {
51   /* These match the fields in c-tree.h. */
52   struct tree_identifier ignore;
53   tree outer_value, local_value, implicit_decl;
54   tree error_locus, limbo_value;
55
56   /* These are Chill-specific. */
57   tree forbid;
58   tree signal_dest;
59   int  signal_data;
60 };
61
62 /* Macros for access to language-specific slots in an identifier.  */
63
64 /* The outer_value is a chain of decls (normally a single decl),
65    that have been granted into the scope surrounding all modules. */
66 #define IDENTIFIER_OUTER_VALUE(NODE)    \
67   (((struct lang_identifier *)(NODE))->outer_value)
68 #define IDENTIFIER_LOCAL_VALUE(NODE)    \
69   (((struct lang_identifier *)(NODE))->local_value)
70 #define IDENTIFIER_IMPLICIT_DECL(NODE)  \
71   (((struct lang_identifier *)(NODE))->implicit_decl)
72 #define IDENTIFIER_ERROR_LOCUS(NODE)    \
73   (((struct lang_identifier *)(NODE))->error_locus)
74 #define IDENTIFIER_FORBID(NODE)         \
75   (((struct lang_identifier *)(NODE))->forbid)
76
77 /* The nesting level increates by one for every nested 'group'.
78    Predefined declarations have level -1; the global scope is level 0.
79  */
80 #define DECL_NESTING_LEVEL(DECL) \
81    ((DECL)->decl.vindex ? TREE_INT_CST_LOW((DECL)->decl.vindex) : -1)
82
83 /* Nesting of things that can have an ON-unit attached. */
84 extern int action_nesting_level;
85
86 /* The DECL_NAME of a FIELD_DECL that represents the ELSE part of a variant. */
87 #define ELSE_VARIANT_NAME ridpointers[(int) RID_ELSE]
88
89 /* For a LABEL_DECL:  action_nesting_level of its target. */
90 #define DECL_ACTION_NESTING_LEVEL(NODE) ((NODE)->decl.saved_insns.i)
91
92 #define DECL_OLD_PREFIX(DECL) ((DECL)->decl.initial)
93 #define DECL_NEW_PREFIX(DECL) ((DECL)->decl.result)
94 #define DECL_POSTFIX(DECL) ((DECL)->decl.arguments)
95 extern tree ALL_POSTFIX;
96 #define DECL_SEIZEFILE(DECL) ((DECL)->decl.size)
97 #define DECL_POSTFIX_ALL(DECL) (DECL_POSTFIX(DECL) == ALL_POSTFIX)
98 #define DECL_OLD_NAME(DECL) decl_old_name(DECL)
99 /* For a siezefile name this means restricted usage of this file.
100    In this case, the USE_SEIZE_FILE directive will not be copied
101    into the grant file */
102 #define CH_USE_SEIZEFILE_RESTRICTED(NODE) TREE_LANG_FLAG_4(NODE)
103 extern tree decl_old_name PROTO ((tree));
104
105 /* for selective granting, mark as already granted */
106 #define CH_ALREADY_GRANTED(NODE) TREE_LANG_FLAG_4(NODE)
107
108 /* to store the receiving process of that signal
109    at definition time */
110 #define IDENTIFIER_SIGNAL_DEST(NODE)    \
111   (((struct lang_identifier *)(NODE))->signal_dest)
112
113 /* indicates a signal with no data */
114 #define IDENTIFIER_SIGNAL_DATA(NODE)    \
115   (((struct lang_identifier *)(NODE))->signal_data)
116
117 /* In identifiers, C uses the following fields in a special way:
118    TREE_PUBLIC        to record that there was a previous local extern decl.
119    TREE_USED          to record that such a decl was used.
120    TREE_ADDRESSABLE   to record that the address of such a decl was used.  */
121
122 /* Nonzero means reject anything that Z.200 Recommendation forbids.  */
123 extern int pedantic;
124
125 /* the prototypical CHILL INSTANCE type */
126 extern tree instance_type_node;
127
128 /* Non-zero if type or expr depends on non-resolved identifier. */
129 #define UNSATISFIED(expr) \
130   (UNSATISFIED_FLAG (expr) || TREE_CODE (expr) == IDENTIFIER_NODE)
131 #define UNSATISFIED_FLAG(expr) TREE_LANG_FLAG_3 (expr)
132
133 /* Non-zero in a TREE_LIST if part of a labelled structure tuple. */
134 #define TUPLE_NAMED_FIELD(LIST) TREE_LANG_FLAG_1(LIST)
135
136 /* In an ARRAY_TYPE, RECORD_TYPE or UNION_TYPE, nonzero if any component
137    is read-only.  */
138 #define TYPE_FIELDS_READONLY(type) TREE_LANG_FLAG_1 (type)
139
140 /* True if TYPE has the "read-only property." */
141 #define TYPE_READONLY_PROPERTY(TYPE) \
142   (TYPE_READONLY (TYPE) || TYPE_FIELDS_READONLY (TYPE))
143
144 /* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is volatile.  */
145 #define C_TYPE_FIELDS_VOLATILE(type) TREE_LANG_FLAG_2 (type)
146
147 /* In a CASE selector expression, nonzero if any alternative specifies (ELSE) for
148    that selector. */
149 #define ELSE_LABEL_SPECIFIED(expr) TREE_LANG_FLAG_2 (expr)
150
151 /* CH_CHARS_TYPE_P(TYPE) is true iff TYPE is a character string type.
152
153    There is no essential difference between a string and a (one-dimensional)
154    character array, at least for non-varying types.  I don't know where
155    the Chill designers got the idea that it was useful to make a distinction.
156    (I suspect packing might be involved, but on a byte-adressable machine
157    we don't care.)  Since we want the same code to be generated for
158    char arrays as for char strings, we use the same representation for
159    both.  But we still need to distinguish them for the sake a Chill
160    type checking.  We do that using TYPE_STRING_FLAG. */
161
162 #define MARK_AS_STRING_TYPE(TYPE) (TYPE_STRING_FLAG (TYPE) = 1)
163
164 #define CH_CHARS_TYPE_P(type) \
165   (TREE_CODE (type) == ARRAY_TYPE && TREE_CODE(TREE_TYPE(type)) == CHAR_TYPE \
166    && TYPE_STRING_FLAG (type))
167
168 /* True if TYPE is CHARS(1). */
169 #define CH_CHARS_ONE_P(TYPE) (CH_CHARS_TYPE_P(TYPE) \
170    && integer_zerop (TYPE_MAX_VALUE (TYPE_DOMAIN (TYPE))))
171
172 /* True if TYPE is a bitstring (BOOLS or BIT) type.
173    The TYPE_STRING_FLAG is used to distinguish a bitstring from a powerset. */
174
175 #define CH_BOOLS_TYPE_P(type) \
176   (TREE_CODE (type) == SET_TYPE && TYPE_STRING_FLAG (type))
177
178 /* True if TYPE is BOOLS(1). */
179 #define CH_BOOLS_ONE_P(TYPE) (CH_BOOLS_TYPE_P(TYPE) \
180    && integer_zerop (TYPE_MAX_VALUE (TYPE_DOMAIN (TYPE))))
181
182 /* Value is nonzero if TYPE is a CHILL string type.
183    See CH_CHARS_TYPE_P and CH_BOOLS_TYPE_P above. */
184
185 #define CH_STRING_TYPE_P(type) \
186  ((TREE_CODE (type) == ARRAY_TYPE || TREE_CODE (type) == SET_TYPE) \
187   && TYPE_STRING_FLAG (type))
188
189 /* In a RECORD_TYPE, a sorted array of the fields of the type.  */
190 struct lang_type_record
191 {
192   int  len;
193   tree tasking_code_decl;
194   tree elts[1];
195 };
196
197 struct lang_type
198 {
199   union
200     {
201       struct lang_type_record rec;
202     } foo;
203 };
204
205 struct lang_decl
206 {
207   union
208     {
209       tree stuff;
210     } foo;
211 };
212 /* A tasking type's corresponding tasking_code_variable has its
213    decl pointer in here. */
214 #define DECL_TASKING_CODE_DECL(DECL) (DECL_LANG_SPECIFIC(DECL))
215
216 /* A pointer to an as-yet undefined type.  */
217 extern tree unknown_type_node;
218
219 /* The CHILL type INT (either integer_type_node or 
220    short_integer_type_node). */
221 extern tree chill_integer_type_node;
222 extern tree chill_unsigned_type_node;
223
224 /* Nonzero for FIELD_DECL node means that this FIELD_DECL is
225    a member of a union construct.  */
226 #define TREE_UNION_ELEM(NODE) ((NODE)->decl.regdecl_flag) /* overloaded! */
227
228 /* Mark which labels are explicitly declared.
229    These may be shadowed, and may be referenced from nested functions.  */
230 #define C_DECLARED_LABEL_FLAG(label) TREE_LANG_FLAG_1 (label)
231
232 /* Record whether a type was written with nonconstant size.
233    Note that TYPE_SIZE may have simplified to a constant.  */
234 #define C_TYPE_VARIABLE_SIZE(type) TYPE_LANG_FLAG_1 (type)
235
236 #define DECL_WEAK_NAME(DECL) DECL_LANG_FLAG_0(DECL)
237
238 /* These are for FUNCTION_DECLs.  */
239 #define CH_DECL_GENERAL(DECL) DECL_LANG_FLAG_1(DECL)
240 #define CH_DECL_SIMPLE(DECL) DECL_LANG_FLAG_2(DECL)
241 #define CH_DECL_RECURSIVE(DECL) DECL_LANG_FLAG_3(DECL)
242 #define CH_FUNCTION_SETS_RESULT(DECL) DECL_LANG_FLAG_6(DECL)
243
244 /* For a CONST_DECL, indicates that it was implicitly declared
245    in a SET mode declaration, and it should not be explicitly granted. */
246 #define CH_DECL_ENUM(DECL)  DECL_LANG_FLAG_3(DECL)
247
248 /* in a FIELD_DECL use DECL_LANG_FLAG_4 to mark FORBID in a grant-statement */
249 #define CH_DECL_FORBID(DECL) DECL_LANG_FLAG_4(DECL)
250
251 /* in an ALIAS_DECL use DECL_LANG_FLAG_4 to mark decl was granted */
252 #define CH_DECL_GRANTED(DECL) DECL_LANG_FLAG_4(DECL)
253
254 /* (in a non-FIELD_DECL) note that this decl was hidden by push_module(). */
255 #define DECL_HIDDEN_BY_MODULE(decl) DECL_LANG_FLAG_4 (decl)
256
257 /* Record in each node resulting from a binary operator
258    what operator was specified for it.  */
259 #define C_EXP_ORIGINAL_CODE(exp) ((enum tree_code) TREE_COMPLEXITY (exp))
260
261 /* Store a value in that field.  */
262 #define C_SET_EXP_ORIGINAL_CODE(exp, code) \
263   (TREE_COMPLEXITY (exp) = (int)(code))
264
265 /* Record whether a typedef for type `int' was actually `signed int'.  */
266 #define C_TYPEDEF_EXPLICITLY_SIGNED(exp) DECL_LANG_FLAG_1 ((exp))
267
268 /* For FUNCTION_TYPE, a hidden list of types of arguments.  The same as
269    TYPE_ARG_TYPES for functions with prototypes, but created for functions
270    without prototypes.  */
271 #define TYPE_ACTUAL_ARG_TYPES(NODE) TYPE_NONCOPIED_PARTS (NODE)
272
273 /* For FUNCTION_TYPE or METHOD_TYPE, a list of the
274    (names of) exceptions that this type can raise.  */
275 #define TYPE_RAISES_EXCEPTIONS(NODE) ((NODE)->type.minval)
276
277 /* For UNION_TYPE, the list of tag fields that distinguishes the members.  */
278 #define TYPE_TAGFIELDS(NODE) ((NODE)->type.minval)
279
280 /* For RECORD_TYPE, the tag values that select it.  */
281 #define TYPE_TAG_VALUES(NODE) TYPE_BINFO(NODE)
282
283 /* For VAR_DECL, TYPE_DECL, FUNCTION_DECL, indicates that
284    the DECL was read from a seizefile but not seized */
285 #define CH_DECL_NOTDECLARED(DECL) DECL_LANG_FLAG_5(DECL)
286
287 /* For FUNCTION_DECL's, mark as PROCESSEs. */
288 #define CH_DECL_PROCESS(DECL) DECL_LANG_FLAG_7(DECL)
289
290 /* For TYPE_DECL's, mark as SIGNALs. */
291 #define CH_DECL_SIGNAL(DECL) DECL_LANG_FLAG_7(DECL)
292 \f
293 /* Macros using terminology of the CHILL Blue Book. */
294
295 /* A class is either Null, All, M-value, M-derived, or M-reference,
296    where M is some mode (type). */
297
298 enum ch_class_kind {
299   CH_ALL_CLASS, CH_NULL_CLASS,
300   CH_VALUE_CLASS, CH_DERIVED_CLASS, CH_REFERENCE_CLASS
301 };
302
303 typedef struct ch_class {
304   enum ch_class_kind kind;
305   tree mode;  /* The 'M' in M-value, M-derived, or M-reference. */
306 } ch_class;
307
308 struct mode_chain;  /* Forward reference */
309
310 #define CH_IS_REFERENCE_MODE(MODE) (TREE_CODE (MODE) == POINTER_TYPE)
311 #define CH_IS_BOUND_REFERENCE_MODE(MODE) \
312   (TREE_CODE (MODE) == POINTER_TYPE && TREE_TYPE(MODE) != void_type_node)
313 #define CH_IS_PROCEDURE_MODE(MODE) (TREE_CODE (MODE) == FUNCTION_TYPE)
314 #define CH_IS_INSTANCE_MODE(MODE)  (CH_SIMILAR (MODE, instance_type_node))
315 #define CH_IS_BUFFER_MODE(MODE)    (TYPE_LANG_FLAG_3(MODE))
316 #define CH_IS_EVENT_MODE(MODE)     (TYPE_LANG_FLAG_4(MODE))
317 /* This is TRUE if the set is numbered, which makes pred/succ
318    unusable */
319 #define CH_ENUM_IS_NUMBERED(MODE)  (TYPE_LANG_FLAG_5(MODE))
320
321 /* for ACCESS, and TEXT mode */
322 #define CH_IS_ACCESS_MODE(MODE)        (TYPE_LANG_FLAG_2(MODE))
323 #define CH_IS_TEXT_MODE(MODE)          (TYPE_LANG_FLAG_6(MODE))
324 #define CH_IS_ASSOCIATION_MODE(MODE)   (CH_SIMILAR (MODE, association_type_node))
325 #define CH_IS_USAGE_MODE(MODE)         (CH_SIMILAR (MODE, usage_type_node))
326 #define CH_IS_WHERE_MODE(MODE)         (CH_SIMILAR (MODE, where_type_node))
327
328 /* for RECORD or ARRAY type */
329 #define CH_TYPE_NONVALUE_P(MODE)       (TYPE_LANG_FLAG_0(MODE))
330
331 /* CH_NOVELTY is the novelty of a mode:  NULL_TREE means the novelty is nil;
332    otherwise a TYPE_DECL matching the defining occurrence of a newmode. */
333 #define CH_NOVELTY(MODE)           TYPE_CONTEXT(MODE)
334
335 /* Set the novelty of MODE to NOVELTY (which is assumed to be non-nil). */
336 #define SET_CH_NOVELTY(MODE, NOVELTY) (CH_NOVELTY (MODE) = (NOVELTY))
337 #define SET_CH_NOVELTY_NONNIL(MODE, NOVELTY) (CH_NOVELTY (MODE) = (NOVELTY))
338
339 /* CH_DERIVED_FLAG is true the class of EXPR is X-derived for some X. */
340 #define CH_DERIVED_FLAG(EXPR) TREE_LANG_FLAG_5(EXPR)
341
342 #define CH_HAS_REFERENCING_PROPERTY(MODE) \
343   (TREE_CODE (MODE) == POINTER_TYPE) /* incomplete FIXME! */
344
345 /* CH_COMPATIBLE(EXPR, MODE) is true if the class of EXPR is
346    "compatible" with the type MODE. */
347 #define CH_COMPATIBLE(EXPR, MODE)           chill_compatible(EXPR, MODE)
348 #define CH_COMPATIBLE_CLASSES(EXPR1, EXPR2) chill_compatible_classes(EXPR1, EXPR2)
349 #define CH_STATIC_MODE(MODE)                  1 /* for now */
350 #define CH_SIMILAR(MODE1, MODE2)              chill_similar(MODE1, MODE2, 0)
351 #define CH_ROOT_MODE(MODE) chill_root_mode(MODE)
352 #define CH_RESULTING_CLASS(C1, C2) chill_resulting_class(C1, C2)
353 #define CH_ROOT_RESULTING_CLASS(E1, E2) \
354   CH_RESULTING_CLASS (chill_expr_class(E1), chill_expr_class(E2))
355 #define CH_RESULTING_MODE(MODE1, MODE2) chill_resulting_mode(MODE1, MODE2)
356 #define CH_V_EQUIVALENT(MODE1, MODE2) (CH_SIMILAR(MODE1, MODE2) \
357    && CH_NOVELTY(MODE1) == CH_NOVELTY(MODE2))
358 #define CH_EQUIVALENT(MODE1, MODE2) \
359   (!integer_zerop (chill_equivalent (MODE1, MODE2, 0)))
360 #define CH_RESTRICTABLE_TO(MODE1, MODE2)  \
361     CH_EQUIVALENT(MODE1, MODE2) /* && some more stuff FIXME! */
362
363 /* pass an OFFSET_TYPE or REFERENCE_TYPE's underlying type to SCALAR_P */
364 #define CH_READ_COMPATIBLE(modeM, modeN) chill_read_compatible(modeM, modeN)
365
366 #define SCALAR_P(TYPE) (TYPE != NULL_TREE \
367                         && (TREE_CODE (TYPE) == INTEGER_TYPE \
368                             || TREE_CODE (TYPE) == REAL_TYPE \
369                             || TREE_CODE (TYPE) == ENUMERAL_TYPE \
370                             || TREE_CODE (TYPE) == BOOLEAN_TYPE \
371                             || TREE_CODE (TYPE) == CHAR_TYPE \
372                             || TREE_CODE (TYPE) == POINTER_TYPE \
373                             || TREE_CODE (TYPE) == INSTANCE_TYPE))
374 #define CH_REFERABLE(EXPR) chill_referable(EXPR)
375 #define CH_LOCATION_P(EXPR) chill_location (EXPR)
376 \f
377 /* Standard named or nameless data types of the C compiler.  */
378
379 /* Nonzero means `$' can be in an identifier.  */
380
381 extern int dollars_in_ident;
382
383 /* Nonzero means allow type mismatches in conditional expressions;
384    just make their values `void'.   */
385
386 extern int flag_cond_mismatch;
387
388 /* Nonzero means don't recognize the keyword `asm'.  */
389
390 extern int flag_no_asm;
391
392 /* Nonzero means warn about implicit declarations.  */
393
394 extern int warn_implicit;
395
396 /* Nonzero means give string constants the type `const char *'
397    to get extra warnings from them.  These warnings will be too numerous
398    to be useful, except in thoroughly ANSIfied programs.  */
399
400 extern int warn_write_strings;
401
402 /* Nonzero means warn about sizeof (function) or addition/subtraction
403    of function pointers.  */
404
405 extern int warn_pointer_arith;
406
407 /* Nonzero means warn for all old-style non-prototype function decls.  */
408
409 extern int warn_strict_prototypes;
410
411 /* Nonzero means warn about multiple (redundant) decls for the same single
412    variable or function.  */
413
414 extern int warn_redundant_decls;
415
416 /* Nonzero means warn about extern declarations of objects not at
417    file-scope level and about *all* declarations of functions (whether
418    extern or static) not at file-scope level.  Note that we exclude
419    implicit function declarations.  To get warnings about those, use
420    -Wimplicit.  */
421
422 extern int warn_nested_externs;
423
424 /* Nonzero means warn about pointer casts that can drop a type qualifier
425    from the pointer target type.  */
426
427 extern int warn_cast_qual;
428
429 /* Warn about traditional constructs whose meanings changed in ANSI C.  */
430
431 extern int warn_traditional;
432
433 /* Warn about *printf or *scanf format/argument anomalies. */
434
435 extern int warn_format;
436
437 /* Warn about a subscript that has type char.  */
438
439 extern int warn_char_subscripts;
440
441 /* Warn if a type conversion is done that might have confusing results.  */
442
443 extern int warn_conversion;
444
445 /* Warn if switch labels aren't complete, or are duplicated */
446
447 extern int warn_switch;
448
449 /* Nonzero means do some things the same way PCC does.  */
450
451 extern int flag_traditional;
452
453 /* Nonzero means warn about suggesting putting in ()'s.  */
454
455 extern int warn_parentheses;
456
457 /* Nonzero means we are reading code that came from a system header file.  */
458 extern int system_header_p;
459
460 /* One means range checking is on; <= 0 off; -1 permanently off. */
461 extern int range_checking;
462
463 /* 0 means empty checking is off, else it is on */
464 extern int empty_checking;
465
466 /* 1 means -fruntime-checking specified (default), o means -fno-runtime-checking */
467 extern int runtime_checking_flag;
468
469 /* Type node for boolean types.  */
470
471 extern tree boolean_type_node;
472 extern tree signed_boolean_type_node;
473
474 extern tree string_one_type_node;
475 extern tree bitstring_one_type_node, bit_zero_node, bit_one_node;
476
477 /* a VOID_TYPE node, packaged in a TREE_LIST.  */
478
479 extern tree void_list_node;
480
481 /* Chill language-specific tree codes.  */
482 #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
483 enum chill_tree_code {
484   __DUMMY = LAST_AND_UNUSED_TREE_CODE,
485 #include "ch-tree.def"
486   LAST_CHILL_TREE_CODE
487 };
488 #undef DEFTREECODE
489
490 enum chill_built_in_function
491 {
492   DUMMY_FIRST_CHILL_BUILT_IN = END_BUILTINS,
493
494   BUILT_IN_CH_ABS,
495   BUILT_IN_ABSTIME,
496   BUILT_IN_ADDR,
497   BUILT_IN_ALLOCATE,
498   BUILT_IN_ALLOCATE_GLOBAL_MEMORY,
499   BUILT_IN_ALLOCATE_MEMORY,
500   BUILT_IN_ARCCOS,
501   BUILT_IN_ARCSIN,
502   BUILT_IN_ARCTAN,
503   BUILT_IN_ASSOCIATE,
504   BUILT_IN_CARD,
505   BUILT_IN_CONNECT,
506   BUILT_IN_COPY_NUMBER,
507   BUILT_IN_CH_COS,
508   BUILT_IN_CREATE,
509   BUILT_IN_DAYS,
510   BUILT_IN_CH_DELETE,
511   BUILT_IN_DESCR,
512   BUILT_IN_DISCONNECT,
513   BUILT_IN_DISSOCIATE,
514   BUILT_IN_EOLN,
515   BUILT_IN_EXP,
516   BUILT_IN_EXPIRED,
517   BUILT_IN_EXISTING,
518   BUILT_IN_GEN_CODE,
519   BUILT_IN_GEN_INST,
520   BUILT_IN_GEN_PTYPE,
521   BUILT_IN_GETASSOCIATION,
522   BUILT_IN_GETSTACK,
523   BUILT_IN_GETTEXTACCESS,
524   BUILT_IN_GETTEXTINDEX,
525   BUILT_IN_GETTEXTRECORD,
526   BUILT_IN_GETUSAGE,
527   BUILT_IN_HOURS,
528   BUILT_IN_INDEXABLE,
529   BUILT_IN_INTTIME,
530   BUILT_IN_ISASSOCIATED,
531   BUILT_IN_LENGTH,
532   BUILT_IN_LOG,
533   BUILT_IN_LOWER,
534   BUILT_IN_LN,
535   BUILT_IN_MAX,
536   BUILT_IN_MILLISECS,
537   BUILT_IN_MIN,
538   BUILT_IN_MINUTES,
539   BUILT_IN_MODIFY,
540   BUILT_IN_NUM,
541   BUILT_IN_OUTOFFILE,
542   BUILT_IN_PRED,
543   BUILT_IN_PROC_TYPE,
544   BUILT_IN_QUEUE_LENGTH,
545   BUILT_IN_READABLE,
546   BUILT_IN_READRECORD,
547   BUILT_IN_READTEXT,
548   BUILT_IN_RETURN_MEMORY,
549   BUILT_IN_SECS,
550   BUILT_IN_SETTEXTACCESS,
551   BUILT_IN_SETTEXTINDEX,
552   BUILT_IN_SETTEXTRECORD,
553   BUILT_IN_SEQUENCIBLE,
554   BUILT_IN_SIZE,
555   BUILT_IN_SQRT,
556   BUILT_IN_SUCC,
557   BUILT_IN_CH_SIN,
558   BUILT_IN_TAN,
559   BUILT_IN_TRUNC,
560   BUILT_IN_TERMINATE,
561   BUILT_IN_UPPER,
562   BUILT_IN_VARIABLE,
563   BUILT_IN_WAIT,
564   BUILT_IN_WRITEABLE,
565   BUILT_IN_WRITERECORD,
566   BUILT_IN_WRITETEXT,
567 };
568 \f
569 /* name of additional (compiler generated) arguments for
570    functions which may propagate exceptions. */
571 #define CALLER_FILE "__CALLER_FILE__"
572 #define CALLER_LINE "__CALLER_LINE__"
573
574 /* field-name strings for the fields of the structure which
575    represents a CHILL VARYING array.  The angle brackets assure
576    that no user-defined structure can match this one.
577    This field holds, at runtime, the current length of the
578    array, in UNITS, not including the length itself. It's an
579    integer_type_node */
580 #define VAR_LENGTH "__var_length"
581
582 /* This field is statically allocated to the user-defined
583    size, but contains valid array entries starting from the
584    first allocated space, proceeding for VAR_LENGTH bytes.
585    There are no holes in the data;  the user isn't allowed
586    to store beyond the first available entry. */
587
588 #define VAR_DATA "__var_data"
589
590 /* This field is the name of the array, encapsulated in the CHILL
591    structure used to represent an array type parameter. */
592 /*#define ARRAY_DATA "__array_data"*/
593
594 /* The CHILL INSTANCE type is composed of two CHILL integer
595    fields, the process_type (set by the user with the 
596    process_type compiler directive, and the proc_copy field,
597    which is set by the start_process call's first parameter. */
598 #define INS_PTYPE "__proc_type"
599 #define INS_COPY  "__proc_copy"
600
601 /* This is the actual array type inside the VARYING struct */
602 #define CH_VARYING_ARRAY_TYPE(TYPE) TREE_TYPE (TREE_CHAIN (TYPE_FIELDS (TYPE)))
603
604 /* Identifiers which hold the VAR_LENGTH and VAR_DATA strings.  */
605 extern tree var_length_id;
606 extern tree var_data_id;
607
608 /* A RANGE_EXPR representing an ELSE in a case label. */
609 extern tree case_else_node;
610
611 #if 0   /* changed to function */
612 /* return non-zero if type is a compiler-generated VARYING array record */
613 #define CH_VARYING_TYPE_P(type) (TREE_CODE (type) == RECORD_TYPE && \
614                            DECL_NAME (TYPE_FIELDS (type)) == \
615                                       get_identifier (VAR_LENGTH) && \
616                            DECL_NAME (TREE_CHAIN (TYPE_FIELDS (type))) == \
617                                       get_identifier (VAR_DATA) && \
618                    TREE_CHAIN (CH_VARYING_ARRAY_TYPE (type)) == NULL_TREE)
619
620 #endif
621
622 /* in c-aux-info.c */
623 extern void gen_aux_info_record                 PROTO((tree, int, int, int));
624
625 /* in c-common.c */
626 extern tree combine_strings                     PROTO((tree));
627 extern void constant_expression_warning         PROTO((tree));
628 extern void decl_attributes                     PROTO((tree, tree));
629 extern void declare_function_name               PROTO((void));
630 #ifdef BUFSIZ
631 extern char *get_directive_line                 PROTO((FILE *));
632 #endif
633 extern tree shorten_compare                     PROTO((tree *, tree *, tree *, enum tree_code *));
634
635 /* in c-decl.c */
636 extern tree wchar_type_node, signed_wchar_type_node, unsigned_wchar_type_node;
637 extern tree default_function_type;
638 extern tree double_ftype_double, double_ftype_double_double;
639 extern tree int_ftype_int, long_ftype_long;
640 extern tree void_ftype_ptr_ptr_int, int_ftype_ptr_ptr_int;
641 extern tree void_ftype_ptr_int_int, string_ftype_ptr_ptr;
642 extern tree int_ftype_string_string, int_ftype_cptr_cptr_sizet;
643 /* Nodes for boolean constants TRUE and FALSE */
644 extern tree boolean_true_node, boolean_false_node;
645
646 extern tree global_function_decl;
647
648 /* in except.c */
649 extern void except_init_pass_2                  PROTO((void));
650 extern void push_handler                        PROTO((void));
651 extern void pop_handler                         PROTO((int));
652
653 /* in ch-loop.c */
654 extern int flag_local_loop_counter;
655 extern void push_loop_block                     PROTO((void));
656 extern void pop_loop_block                      PROTO((void));
657 extern void build_loop_start                    PROTO((tree));
658 extern void top_loop_end_check                  PROTO((tree));
659 extern void build_loop_end                      PROTO((void));
660 extern void build_loop_iterator                 PROTO((tree, tree, tree, tree, int, int, int));
661 extern void begin_loop_scope                    PROTO((void));
662 extern void end_loop_scope                      PROTO((tree));
663 extern void nonvalue_begin_loop_scope           PROTO((void));
664 extern void nonvalue_end_loop_scope             PROTO((void));
665
666 extern tree build_enumerator                    PROTO((tree, tree));
667 extern tree builtin_function                    PROTO((const char *, tree, enum built_in_function function_, const char *));
668 extern tree c_build_type_variant                PROTO((tree, int, int));
669 extern int  c_decode_option                     PROTO((int, char **));
670 extern void c_mark_varargs                      PROTO((void));
671 extern void clear_parm_order                    PROTO((void));
672 extern tree combine_parm_decls                  PROTO((tree, tree, int));
673 extern int  complete_array_type                 PROTO((tree, tree, int));
674 extern void declare_parm_level                  PROTO((int));
675 extern tree define_label                        PROTO((char *, int, tree));
676 extern void delete_block                        PROTO((tree));
677 extern void finish_decl                         PROTO((tree));
678 extern tree finish_enum                         PROTO((tree, tree));
679 extern void finish_function                     PROTO((int));
680 extern tree finish_struct                       PROTO((tree, tree));
681 extern tree get_parm_decls                      PROTO((void));
682 extern tree get_parm_info                       PROTO((int));
683 extern tree getdecls                            PROTO((void));
684 extern tree gettags                             PROTO((void));
685 extern int  global_bindings_p                   PROTO((void));
686 extern tree grokfield                           PROTO((char *, int, tree, tree, tree));
687 extern tree groktypename                        PROTO((tree));
688 extern tree groktypename_in_parm_context        PROTO((tree));
689 extern tree implicitly_declare                  PROTO((tree));
690 extern void init_decl_processing                PROTO((void));
691 extern void insert_block                        PROTO((tree));
692 extern void keep_next_level                     PROTO((void));
693 extern int  kept_level_p                        PROTO((void));
694 extern tree lookup_label                        PROTO((tree));
695 extern tree lookup_name                         PROTO((tree));
696 extern tree maybe_build_cleanup                 PROTO((tree));
697 extern void parmlist_tags_warning               PROTO((void));
698 extern void pending_xref_error                  PROTO((void));
699 extern void pop_chill_function_context          PROTO((void));
700 extern tree poplevel                            PROTO((int, int, int));
701 #ifdef BUFSIZ
702 extern void print_lang_decl                     PROTO((FILE *,tree, int));
703 extern void print_lang_identifier               PROTO((FILE *,tree, int));
704 extern void print_lang_type                     PROTO((FILE *,tree, int));
705 #endif
706 extern void push_chill_function_context         PROTO((void));
707 extern void push_parm_decl                      PROTO((tree));
708 extern tree pushdecl                            PROTO((tree));
709 extern tree pushdecl_top_level                  PROTO((tree));
710 extern void pushlevel                           PROTO((int));
711 extern void set_block                           PROTO((tree));
712 extern tree shadow_label                        PROTO((tree));
713 extern void shadow_record_fields                PROTO((tree));
714 extern void shadow_tag                          PROTO((tree));
715 extern void shadow_tag_warned                   PROTO((tree, int));
716 extern tree start_enum                          PROTO((tree));
717 extern int  start_function                      PROTO((tree, tree, int));
718 extern tree start_decl                          PROTO((tree, tree, int));
719 extern tree start_struct                        PROTO((enum tree_code, tree));
720 extern void store_parm_decls                    PROTO((void));
721 extern tree xref_tag                            PROTO((enum tree_code, tree));
722
723 /* in c-typeck.c */
724 extern tree build_array_ref                     PROTO((tree, tree));
725 extern tree build_c_cast                        PROTO((tree, tree));
726 extern tree build_chill_modify_expr             PROTO((tree, tree));
727 extern tree build_chill_component_ref           PROTO((tree, tree));
728 extern tree build_component_ref                 PROTO((tree, tree));
729 extern tree build_compound_expr                 PROTO((tree));
730 extern tree build_conditional_expr              PROTO((tree, tree, tree));
731 extern tree build_function_call                 PROTO((tree, tree));
732 extern tree build_indirect_ref                  PROTO((tree, char *));
733 extern tree build_modify_expr                   PROTO((tree, enum tree_code, tree));
734 extern tree build_unary_op                      PROTO((enum tree_code, tree, int));
735 extern tree c_alignof                           PROTO((tree));
736 extern tree c_alignof_expr                      PROTO((tree));
737 extern void c_expand_asm_operands               PROTO((tree, tree, tree, tree, int, char *, int));
738 extern tree c_sizeof                            PROTO((tree));
739 extern void c_expand_return                     PROTO((tree));
740 extern tree c_expand_start_case                 PROTO((tree));
741 extern tree common_type                         PROTO((tree, tree));
742 extern tree copy_novelty                        PROTO((tree, tree));
743 extern tree default_conversion                  PROTO((tree));
744 extern void finish_init                         PROTO((void));
745 extern tree parser_build_binary_op              PROTO((enum tree_code, tree, tree));
746 extern tree pop_init_level                      PROTO((int));
747 extern void process_init_default                PROTO((tree));
748 extern void process_init_element                PROTO((tree));
749 extern void push_init_level                     PROTO((int));
750 extern void really_start_incremental_init       PROTO((tree));
751 extern void set_init_index                      PROTO((tree, tree));
752 extern void set_init_label                      PROTO((tree));
753 extern void start_init                          PROTO((tree, tree, int));
754 extern void store_init_value                    PROTO((tree, tree));
755 extern tree valid_array_index_p                 PROTO((tree, tree, const char *, int));
756
757 /* in ch/actions.c */
758 extern int grant_only_flag;
759 extern void allocate_lang_decl                  PROTO((tree));
760 extern tree build_chill_abs                     PROTO((tree));
761 extern tree build_chill_array_ref_1             PROTO((tree, tree));
762 extern tree build_chill_array_ref               PROTO((tree, tree));
763 extern tree build_chill_bin_type                PROTO((tree));
764 extern tree build_chill_binary_op               PROTO((enum chill_tree_code, tree, tree));
765 extern tree build_chill_card                    PROTO((tree));
766 extern tree build_chill_case_expr               PROTO((tree, tree, tree)); 
767 extern tree build_cause_exception               PROTO((tree, int));
768 extern tree build_chill_exception_decl          PROTO((const char *));
769 extern tree build_chill_function_call           PROTO((tree, tree));
770 extern tree build_chill_length                  PROTO((tree));
771 extern tree build_chill_indirect_ref            PROTO((tree, tree, int));
772 extern tree build_chill_lower                   PROTO((tree));
773 extern tree build_chill_max                     PROTO((tree));
774 extern tree build_chill_min                     PROTO((tree));
775 extern tree build_chill_num                     PROTO((tree));
776 extern tree build_chill_repetition_op           PROTO((tree, tree));
777 extern tree build_chill_sizeof                  PROTO((tree));
778 extern tree build_chill_slice                   PROTO((tree, tree, tree));
779 extern tree build_chill_slice_with_range        PROTO((tree, tree, tree));
780 extern tree build_chill_slice_with_length       PROTO((tree, tree, tree));
781 extern tree build_chill_struct_type             PROTO((tree));
782 extern tree build_chill_unary_op                PROTO((enum chill_tree_code, tree));
783 extern tree build_chill_upper                   PROTO((tree));
784 extern tree build_exception_variant             PROTO((tree, tree));
785 extern tree build_generalized_call              PROTO((tree, tree));
786 extern tree build_lang_decl                     PROTO((enum chill_tree_code, tree, tree));
787 extern tree build_rts_call                      PROTO((const char *, tree, tree));
788 extern tree build_varying_struct                PROTO((tree));
789 extern void chill_check_decl                    PROTO((tree));
790 extern tree chill_convert_for_assignment        PROTO((tree, tree, const char *));
791 extern void chill_expand_return                 PROTO((tree, int));
792 extern void chill_expand_result                 PROTO((tree, int));
793 extern void chill_handle_case_default           PROTO((void));
794 extern void chill_handle_case_label             PROTO((tree, tree));
795 extern int  chill_varying_string_type_p         PROTO((tree));
796 extern int  chill_varying_type_p                PROTO((tree));
797 extern int  ch_singleton_set                    PROTO((tree));
798 extern tree check_expression                    PROTO((tree, tree, tree));
799 extern void check_missing_cases                 PROTO((tree));
800 extern tree check_non_null                      PROTO((tree));
801 extern tree check_range                         PROTO((tree, tree, tree,tree));
802 extern void cond_type_range_exception           PROTO((tree));
803 extern void expand_cause_exception              PROTO((tree));
804 extern tree finish_chill_binary_op              PROTO((tree));
805 extern tree finish_chill_unary_op               PROTO((tree));
806 extern tree high_domain_value                   PROTO((tree));
807 extern tree low_domain_value                    PROTO((tree));
808 extern tree maybe_array_ref                     PROTO((tree, tree));
809 extern void maybe_chill_check_decl              PROTO((tree));
810 extern tree powersetlen                         PROTO((tree));
811 extern tree test_range                          PROTO((tree, tree, tree));
812 /* in ch/convert.c */
813 extern tree build_array_type_for_scalar         PROTO((tree));
814 extern tree convert                             PROTO((tree, tree));
815 extern tree convert_from_reference              PROTO((tree));
816 extern tree convert_to_class                    PROTO((ch_class, tree));
817 extern const char *display_int_cst              PROTO((tree));
818
819 /* in ch/decl.c */
820 extern tree build_enumerator                    PROTO((tree, tree));
821 extern tree chill_munge_params                  PROTO((tree, tree, tree));
822 extern tree build_chill_function_type           PROTO((tree, tree, tree, tree));
823 extern tree decl_temp1                          PROTO((tree, tree, int, tree, int, int));
824 extern void do_based_decls                      PROTO((tree, tree, tree));
825 extern void do_chill_outparms                   PROTO((void));
826 extern tree do_decl                             PROTO((tree, tree, int, int, tree, int));
827 extern void do_decls                            PROTO((tree, tree, int, int, tree, int));
828 extern void expand_chill_outparms               PROTO((void));
829 extern void find_granted_decls                  PROTO((void));
830 extern void finish_chill_function               PROTO((void));
831 extern tree finish_enum                         PROTO((tree, tree));
832 extern void fixup_chill_parms                   PROTO((tree));
833 extern void finish_outer_function               PROTO((void));
834 extern unsigned get_type_precision              PROTO((tree, tree));
835 extern tree grok_chill_fixedfields              PROTO((tree, tree, tree));
836 extern tree grok_chill_variantdefs              PROTO((tree, tree, tree));
837 extern void layout_enum                         PROTO((tree));
838 /* extern tree lookup_remembered_decl PROTO((HOST_WIDE_INT, tree)); */
839 extern void lookup_and_expand_goto              PROTO((tree));
840 extern tree lookup_tag_fields                   PROTO((tree, tree));
841 extern void lookup_and_handle_exit              PROTO((tree));
842 extern tree massage_param_node                  PROTO((tree, tree));
843 extern void pop_module                          PROTO((void));
844 extern void print_mode                          PROTO((tree));
845 extern tree push_extern_function                PROTO((tree, tree, tree, tree, int));
846 extern void push_extern_process                 PROTO((tree, tree, tree, int));
847 extern void push_extern_signal                  PROTO((tree, tree, tree));
848 extern void push_granted                        PROTO((tree, tree));
849 extern tree push_modedef                        PROTO((tree, tree, int));
850 extern tree push_module                         PROTO((tree, int));
851 extern void push_parms                          PROTO((tree, tree, tree));
852 extern void push_syndecl                        PROTO((tree, tree, tree));
853 extern int result_never_set;
854 extern void save_expr_under_name                PROTO((tree, tree));
855 extern tree set_module_name                     PROTO((tree));
856 extern int  start_chill_function                PROTO((tree, tree, tree, tree, tree));
857 extern void start_outer_function                PROTO((void));
858 extern void switch_to_pass_2                    PROTO((void));
859
860 /* in ch/except.c */
861 extern void chill_check_no_handlers             PROTO((void));
862 extern void chill_finish_on                     PROTO((void));
863 extern void chill_handle_on_labels              PROTO((tree));
864 extern void chill_reraise_exceptions            PROTO((tree));
865 extern void chill_start_default_handler         PROTO((void));
866 extern void chill_start_on                      PROTO((void));
867 extern void expand_goto_except_cleanup          PROTO((int));
868 extern int is_handled                           PROTO((tree));
869
870 /* in ch/expr.c */
871 extern tree build_chill_addr_expr               PROTO((tree, const char *));
872 extern tree build_chill_arrow_expr              PROTO((tree, int));
873 extern tree build_component_ref                 PROTO((tree, tree));
874 extern tree build_chill_compound_expr           PROTO((tree));
875 extern tree build_chill_descr                   PROTO((tree));
876 extern void build_chill_descr_type              PROTO((void));
877 extern void build_chill_inttime_type            PROTO((void));
878 extern tree build_compare_expr                  PROTO((enum tree_code,
879                                                        tree, tree));
880 extern tree build_compare_discrete_expr         PROTO((enum tree_code,
881                                                        tree, tree));
882 extern tree check_case_selector                 PROTO((tree));
883 extern tree check_case_selector_list            PROTO((tree));
884 extern tree check_have_mode                     PROTO((tree, const char *));
885 extern void init_chill_expand                   PROTO((void));
886 extern void chill_expand_assignment             PROTO((tree, enum chill_tree_code, tree));
887 extern void expand_assignment_action            PROTO((tree, enum chill_tree_code, tree));
888 extern int compare_int_csts                     PROTO((enum chill_tree_code,
889                                                        tree, tree));
890 extern void expand_varying_length_assignment    PROTO((tree, tree));
891 extern tree force_addr_of                       PROTO((tree));
892 extern tree resolve_component_ref               PROTO((tree));
893 extern tree truthvalue_conversion               PROTO((tree));
894 extern tree varying_to_slice                    PROTO((tree));
895
896 /* in ch/grant.c */
897 extern void chill_finish_compile                PROTO((void));
898 extern void chill_seize                         PROTO((tree, tree, tree));
899 extern void start_outer_function                PROTO((void));
900 extern void finish_chill_seize                  PROTO((tree));
901 extern void chill_grant                         PROTO((tree,tree, tree, tree));
902 extern void set_default_grant_file              PROTO((void));
903 extern void set_identifier_size                 PROTO((int));
904 extern void write_grant_file                    PROTO((void));
905 extern void write_spec_module                   PROTO((tree, tree));
906
907 /* in ch/lang.c */
908 extern tree string_index_type_dummy;
909 extern tree integer_minus_one_node;
910 extern int  flag_old_strings;
911 extern void GNU_xref_begin                      PROTO((void));
912 extern void GNU_xref_end                        PROTO((void));
913 extern tree build_chill_array_type              PROTO((tree, tree, int, tree));
914 extern tree build_chill_struct_type             PROTO((tree));
915 extern tree build_chill_pointer_type            PROTO((tree));
916 extern tree build_chill_range_type              PROTO((tree, tree, tree));
917 extern tree build_chill_reference_type          PROTO((tree));
918 extern tree build_simple_array_type             PROTO((tree, tree, tree));
919 extern tree const_expr                          PROTO((tree));
920 extern tree get_identifier3                     PROTO((const char *, const char *, const char *));
921 extern tree layout_chill_array_type             PROTO((tree));
922 extern tree layout_chill_range_type             PROTO((tree, int));
923 extern tree layout_chill_pointer_type           PROTO((tree));
924 extern tree layout_chill_struct_type            PROTO((tree));
925 extern tree layout_chill_variants               PROTO((tree));
926 extern tree layout_powerset_type                PROTO((tree));
927 extern tree lookup_interface                    PROTO((tree));
928 extern tree maybe_building_objc_message_expr    PROTO((void));
929 extern void maybe_objc_check_decl               PROTO((tree));
930 extern int  maybe_objc_comptypes                PROTO((tree, tree));
931 extern int  recognize_objc_keyword              PROTO((void));
932
933 /* in ch/lex.l */
934 extern tree use_seizefile_name;
935 extern tree current_seizefile_name;
936 extern tree build_chill_string                  PROTO((int, const char *));
937 extern int  check_newline                       PROTO((void));
938 extern tree get_chill_filename                  PROTO((void)); 
939 extern tree get_chill_linenumber                PROTO((void));       
940 extern void register_seize_path                 PROTO((const char *));
941 extern void reinit_parse_for_function           PROTO((void));
942 extern void mark_use_seizefile_written          PROTO((tree));
943
944 /* in ch/loop.c */
945 extern void begin_chill_loop                    PROTO((tree, tree));
946 extern tree build_chill_iterator                PROTO((tree, tree, tree, int, int, int));
947 extern void end_chill_loop                      PROTO((void));
948 extern tree get_unique_identifier               PROTO((const char *));
949
950 /* in ch/inout.c */
951 extern tree access_recordmode                   PROTO((tree));
952 extern void invalidate_access_recordmode        PROTO((tree));
953 extern tree access_indexmode                    PROTO((tree));
954 extern tree access_dynamic                      PROTO((tree));
955 extern tree association_init_value;
956 extern tree association_type_node;
957 extern tree build_access_mode                   PROTO((tree, tree, int));
958 extern tree build_chill_associate               PROTO((tree, tree, tree));
959 extern tree build_chill_connect                 PROTO((tree, tree, tree, tree));
960 extern tree build_chill_create                  PROTO((tree));
961 extern tree build_chill_delete                  PROTO((tree));
962 extern tree build_chill_disconnect              PROTO((tree));
963 extern tree build_chill_dissociate              PROTO((tree));
964 extern tree build_chill_eoln                    PROTO((tree)); 
965 extern tree build_chill_existing                PROTO((tree));
966 extern tree build_chill_gettextaccess           PROTO((tree)); 
967 extern tree build_chill_getassociation          PROTO((tree)); 
968 extern tree build_chill_gettextindex            PROTO((tree)); 
969 extern tree build_chill_gettextrecord           PROTO((tree)); 
970 extern tree build_chill_getusage                PROTO((tree)); 
971 extern tree build_chill_indexable               PROTO((tree)); 
972 extern tree build_chill_isassociated            PROTO((tree)); 
973 extern tree build_chill_modify                  PROTO((tree, tree));
974 extern tree build_chill_outoffile               PROTO((tree)); 
975 extern tree build_chill_readable                PROTO((tree));
976 extern tree build_chill_readrecord              PROTO((tree, tree));
977 extern tree build_chill_readtext                PROTO((tree, tree));
978 extern tree build_chill_sequencible             PROTO((tree)); 
979 extern tree build_chill_settextaccess           PROTO((tree, tree));
980 extern tree build_chill_settextindex            PROTO((tree, tree));
981 extern tree build_chill_settextrecord           PROTO((tree, tree));
982 extern tree build_chill_variable                PROTO((tree)); 
983 extern tree build_chill_writeable               PROTO((tree));
984 extern tree build_chill_writerecord             PROTO((tree, tree));
985 extern tree build_chill_writetext               PROTO((tree, tree));
986 extern void build_enum_tables                   PROTO((void));
987 extern tree build_text_mode                     PROTO((tree, tree, int));
988 extern tree check_text_length                   PROTO((tree));
989 extern void init_access_location                PROTO((tree, tree));
990 extern void init_text_location                  PROTO((tree, tree));
991 extern void inout_init                          PROTO((void));
992 extern tree text_dynamic                        PROTO((tree));
993 extern tree text_indexmode                      PROTO((tree));
994 extern tree text_length                         PROTO((tree));
995 extern tree usage_type_node;
996 extern tree where_type_node;
997
998 /* in ch/parse.c */
999 extern tree get_type_of                         PROTO((tree));
1000 extern void set_yydebug                         PROTO((int));
1001 extern void yyerror                             PROTO((char *));
1002 extern int  pass;
1003 extern int ignoring;
1004 extern int seen_action;
1005 extern int build_constructor;
1006 extern void possibly_define_exit_label          PROTO((tree));
1007 extern void to_global_binding_level             PROTO((void));
1008
1009 /* in ch/satisfy.c */
1010 extern tree satisfy_decl                        PROTO((tree, int));
1011
1012 /* in ch/tasking.c */
1013 extern void add_taskstuff_to_list               PROTO((tree, const char *, tree, tree, tree));
1014 extern void process_buffer_decls                PROTO((tree, tree, int));
1015 extern tree buffer_element_mode                 PROTO((tree));
1016 extern void invalidate_buffer_element_mode      PROTO((tree));
1017 extern tree build_buffer_descriptor             PROTO((tree, tree, tree));
1018 extern tree build_buffer_type                   PROTO((tree, tree));
1019 extern void build_delay_action                  PROTO((tree, tree));
1020 extern tree build_delay_case_start              PROTO((tree, tree));
1021 extern void build_delay_case_end                PROTO((tree));
1022 extern void build_delay_case_label              PROTO((tree, int));
1023 extern tree build_event_type                    PROTO((tree));
1024 extern void build_receive_case_end              PROTO((tree, tree));
1025 extern int  build_receive_case_if_generated     PROTO((void));
1026 extern tree build_receive_case_label            PROTO((tree, tree));
1027 extern tree build_receive_case_start            PROTO((tree));
1028 extern void expand_continue_event               PROTO((tree));
1029 extern void expand_send_buffer                  PROTO((tree, tree, tree, tree, tree));
1030 extern void expand_send_signal                  PROTO((tree, tree, tree, tree, tree));
1031 extern void build_start_process                 PROTO((tree, tree, tree, tree));
1032 extern tree build_copy_number                   PROTO((tree));
1033 extern tree build_gen_code                      PROTO((tree));
1034 extern tree build_gen_inst                      PROTO((tree, tree));
1035 extern tree build_gen_ptype                     PROTO((tree));
1036 extern void build_instance_type                 PROTO((void));
1037 extern tree build_process_header                PROTO((tree, tree));
1038 extern void build_process_wrapper               PROTO((tree, tree));
1039 extern tree build_proc_type                     PROTO((tree));
1040 extern tree build_queue_length                  PROTO((tree));
1041 extern tree build_signal_descriptor             PROTO((tree, tree));
1042 extern tree build_signal_struct_type            PROTO((tree, tree, tree));
1043 extern tree build_tasking_struct                PROTO((void));
1044 extern tree chill_taskingcode_type_node;
1045 extern tree check_queue_size                    PROTO((tree));
1046 extern tree generate_tasking_code_variable      PROTO((tree, tree *, int));
1047 extern tree get_signal_type_name                PROTO((tree));
1048 extern tree get_struct_type_name                PROTO((tree));
1049 extern tree get_tasking_code_name               PROTO((tree));
1050 extern tree make_process_struct                 PROTO((tree, tree));
1051 extern tree make_signal_struct                  PROTO((tree));
1052 extern tree max_queue_size                      PROTO((tree));
1053 extern void tasking_init                        PROTO((void));
1054 extern void tasking_registry                    PROTO((void));
1055 extern void tasking_setup                       PROTO((void));
1056
1057 /* in ch/timing.c */
1058 extern tree abs_timing_type_node;
1059 extern tree after_stack;
1060 extern void build_after_end                     PROTO((void));
1061 extern void build_after_start                   PROTO((tree, int));
1062 extern void build_after_timeout_start           PROTO((void));
1063 extern void build_at_action                     PROTO((tree));
1064 extern void build_cycle_end                     PROTO((tree));
1065 extern tree build_cycle_start                   PROTO((tree));
1066 extern tree build_timeout_preface               PROTO((void));
1067 extern void build_timesupervised_call           PROTO((tree, tree));
1068 extern tree duration_timing_type_node;
1069 extern void timing_init                         PROTO((void));
1070
1071 /* in ch/tree.c */
1072 extern tree build_alias_decl                    PROTO((tree, tree, tree));
1073 extern tree build_bitstring_type                PROTO((tree));
1074 extern tree build_powerset_type                 PROTO((tree));
1075 extern tree build_string_type                   PROTO((tree, tree));
1076 extern tree decl_check_rename                   PROTO((tree, tree));
1077 extern tree discrete_count                      PROTO((tree));
1078 extern int  list_length                         PROTO((tree));
1079 extern tree munge_exit_label                    PROTO((tree));
1080 extern tree save_if_needed                      PROTO((tree));
1081
1082 /* in ch/typeck.c */
1083 extern tree build_array_from_set                PROTO((tree));
1084 extern tree build_chill_array_ref               PROTO((tree, tree));
1085 extern tree build_chill_bitref                  PROTO((tree, tree));
1086 extern tree build_chill_cast                    PROTO((tree, tree));
1087 extern tree chill_equivalent                    PROTO((tree, tree, struct mode_chain*));
1088 extern tree build_init_struct                   PROTO((void));
1089 extern tree build_readonly_type                 PROTO((tree));
1090 extern int  chill_compatible                    PROTO((tree, tree));
1091 extern int  chill_compatible_classes            PROTO((tree, tree));
1092 extern ch_class chill_expr_class                PROTO((tree));
1093 extern tree chill_give_type_to_expr             PROTO((tree, tree));
1094 extern tree chill_expand_tuple                  PROTO((tree, tree));
1095 extern ch_class chill_expr_class                PROTO((tree));
1096 extern int  chill_location                      PROTO((tree));
1097 extern tree chill_max_vary_array_index          PROTO((tree));
1098 extern int  chill_read_compatible               PROTO((tree, tree));
1099 extern int  chill_referable                     PROTO((tree));
1100 extern tree chill_root_mode                     PROTO((tree));
1101 extern ch_class chill_resulting_class           PROTO((ch_class, ch_class));
1102 extern tree chill_resulting_mode                PROTO((tree, tree));
1103 extern int  chill_similar                       PROTO((tree, tree, struct mode_chain*));
1104 extern int  discrete_type_p                     PROTO((tree));
1105 extern tree initializer_constant_valid_p        PROTO((tree, tree));
1106 extern tree convert_to_discrete                 PROTO((tree));
1107 extern tree smash_dummy_type                    PROTO((tree));
1108 extern tree string_assignment_condition         PROTO((tree, tree));
1109 extern tree type_for_mode                       PROTO((enum machine_mode, int));
1110 extern tree type_for_size                       PROTO((unsigned, int));
1111 extern int  valid_array_index                   PROTO((tree, tree));
1112 extern void validate_varying_array_ref          PROTO((tree, tree));
1113
1114 /* in function.c */
1115 extern void expand_function_end                 PROTO((char *, int, int));
1116 extern void expand_function_start               PROTO((tree, int));
1117 extern void init_function_start                 PROTO((tree, char *, int));
1118 extern void pop_function_context                PROTO((void));
1119 extern void push_function_context               PROTO((void));
1120
1121 /* in integrate.c */
1122 extern void output_inline_function              PROTO((tree));
1123
1124 /* in stmt.c */
1125 extern void remember_end_note                   PROTO((tree));
1126
1127 /* in toplev.c */
1128 extern void announce_function                   PROTO((tree));
1129 extern int  floor_log2_wide                     PROTO((unsigned HOST_WIDE_INT));
1130 extern void rest_of_compilation                 PROTO((tree));
1131
1132 /* in varasm.c */
1133 extern void make_function_rtl                   PROTO((tree));
1134
1135 /* in ???? */
1136 extern void init_iterators                      PROTO((void));
1137 extern int  mark_addressable                    PROTO((tree));
1138 extern tree chill_result_decl;
1139 #ifdef RTX_CODE
1140 extern rtx label_rtx                            PROTO((tree));
1141 #endif
1142 extern void permanent_allocation                PROTO((int));
1143
1144 #ifndef SET_WORD_SIZE
1145 #define SET_WORD_SIZE BITS_PER_WORD
1146 #endif
1147
1148 struct module
1149 {
1150   struct module *next_module;  /* Next module, in order of their beginning. */
1151   struct module *prev_module;  /* The surrounding module, if any. */
1152   tree name;
1153   tree prefix_name; /* Usually same as name, expect for nested modules.
1154                        Used to generate DECL_ASSEMBLER_NAMEs. */               
1155   /* procedure_seen indicates a procedure or process was declared.
1156      After this, no SEIZE, DCL, SYN, NEWMODE, SYNMODE statement is allowed */
1157   int procedure_seen;
1158   int is_spec_module;
1159
1160   /* The value of current_nesting_level inside the module. */
1161   int nesting_level;
1162
1163   /* A chain contain one ALIAS_DECL for each 'GRANT foo->bar'.
1164      The DECL_NAME is get_identifier("bar"), and the DECL_INITIAL
1165      is get_identifier("bar").  Only used in pass 1. */
1166   tree granted_decls;
1167 };
1168
1169 extern struct module *current_module;
1170
1171 /* fold a tree to constant as much as possible */
1172 extern tree deep_fold PROTO((tree));
1173
1174 extern const char * const gnuchill_version;
1175
1176 #endif