PIPS
word_attachment.h
Go to the documentation of this file.
1 #ifndef _newgen_word_attachment_included
2 #define _newgen_word_attachment_included
3 #define _gen_word_attachment_start 91
4 /*
5  * THIS FILE HAS BEEN AUTOMATICALLY GENERATED BY NEWGEN.
6  *
7  * PLEASE DO NOT MODIFY IT.
8  */
9 
10 #if !defined(_newgen_call_domain_defined_)
11 #define _newgen_call_domain_defined_
12 #define CALL_NEWGEN_DOMAIN (call_domain)
13 #define call_NEWGEN_DOMAIN (call_domain)
14 typedef struct _newgen_struct_call_ * call;
15 #endif /* _newgen_call_domain_defined_ */
16 
17 #if !defined(_newgen_entity_domain_defined_)
18 #define _newgen_entity_domain_defined_
19 #define ENTITY_NEWGEN_DOMAIN (entity_domain)
20 #define entity_NEWGEN_DOMAIN (entity_domain)
21 typedef struct _newgen_struct_entity_ * entity;
22 #endif /* _newgen_entity_domain_defined_ */
23 
24 #if !defined(_newgen_loop_domain_defined_)
25 #define _newgen_loop_domain_defined_
26 #define LOOP_NEWGEN_DOMAIN (loop_domain)
27 #define loop_NEWGEN_DOMAIN (loop_domain)
28 typedef struct _newgen_struct_loop_ * loop;
29 #endif /* _newgen_loop_domain_defined_ */
30 
31 #if !defined(_newgen_reference_domain_defined_)
32 #define _newgen_reference_domain_defined_
33 #define REFERENCE_NEWGEN_DOMAIN (reference_domain)
34 #define reference_NEWGEN_DOMAIN (reference_domain)
36 #endif /* _newgen_reference_domain_defined_ */
37 
38 #if !defined(_newgen_void_star_domain_defined_)
39 #define _newgen_void_star_domain_defined_
40 #define newgen_void_star(p) (p) /* old hack compatible */
41 #define VOID_STAR_NEWGEN_EXTERNAL (_gen_word_attachment_start+0)
42 #define VOID_STAR_NEWGEN_DOMAIN (VOID_STAR_NEWGEN_EXTERNAL)
43 #define void_star_NEWGEN_DOMAIN (VOID_STAR_NEWGEN_EXTERNAL)
44 #endif /* _newgen_void_star_domain_defined_ */
45 
46 #define attachee_domain (_gen_word_attachment_start+1)
47 #if !defined(_newgen_attachee_domain_defined_)
48 #define _newgen_attachee_domain_defined_
49 #define ATTACHEE_NEWGEN_DOMAIN (attachee_domain)
50 #define attachee_NEWGEN_DOMAIN (attachee_domain)
52 #endif /* _newgen_attachee_domain_defined_ */
53 
54 #define attachment_domain (_gen_word_attachment_start+2)
55 #if !defined(_newgen_attachment_domain_defined_)
56 #define _newgen_attachment_domain_defined_
57 #define ATTACHMENT_NEWGEN_DOMAIN (attachment_domain)
58 #define attachment_NEWGEN_DOMAIN (attachment_domain)
60 #endif /* _newgen_attachment_domain_defined_ */
61 
62 #define attachments_domain (_gen_word_attachment_start+3)
63 #if !defined(_newgen_attachments_domain_defined_)
64 #define _newgen_attachments_domain_defined_
65 #define ATTACHMENTS_NEWGEN_DOMAIN (attachments_domain)
66 #define attachments_NEWGEN_DOMAIN (attachments_domain)
68 #endif /* _newgen_attachments_domain_defined_ */
69 
70 #define word_to_attachments_domain (_gen_word_attachment_start+4)
71 #if !defined(_newgen_word_to_attachments_domain_defined_)
72 #define _newgen_word_to_attachments_domain_defined_
73 #define WORD_TO_ATTACHMENTS_NEWGEN_DOMAIN (word_to_attachments_domain)
74 #define word_to_attachments_NEWGEN_DOMAIN (word_to_attachments_domain)
76 #endif /* _newgen_word_to_attachments_domain_defined_ */
77 
78 
79 /* ATTACHEE
80  */
81 #define ATTACHEE(x) ((attachee)((x).p))
82 #define attachee_CAST(x) ATTACHEE(x)
83 #define ATTACHEE_CAST(x) ATTACHEE(x)
84 #define ATTACHEE_(x) ((x).e)
85 #define ATTACHEE_TYPE attachee
86 #define attachee_TYPE attachee
87 #define attachee_undefined ((attachee)gen_chunk_undefined)
88 #define attachee_undefined_p(x) ((x)==attachee_undefined)
89 
91 extern void free_attachee(attachee);
93 extern bool attachee_consistent_p(attachee);
94 extern bool attachee_defined_p(attachee);
95 #define gen_ATTACHEE_cons gen_attachee_cons
99 extern void write_attachee(FILE*, attachee);
100 extern attachee read_attachee(FILE*);
123 };
124 extern string attachee_tag_as_string(enum attachee_utype);
125 extern attachee make_attachee(enum attachee_utype, void *);
130 extern attachee make_attachee_type(string);
142 extern attachee make_attachee_regions(void);
146 extern attachee make_attachee_comment(void);
147 
151  union {
152  intptr_t _attachee_statement_line_number_; /* statement_line_number:int */
153  reference _attachee_reference_; /* reference:reference */
154  call _attachee_call_; /* call:call */
155  entity _attachee_declaration_; /* declaration:entity */
156  string _attachee_type_; /* type:string */
157  loop _attachee_loop_; /* loop:loop */
158  entity _attachee_module_head_; /* module_head:entity */
159  gen_chunk _attachee_complementary_sections_; /* complementary_sections:unit */
160  gen_chunk _attachee_complexities_; /* complexities:unit */
161  gen_chunk _attachee_continuation_conditions_; /* continuation_conditions:unit */
162  gen_chunk _attachee_cumulated_effects_; /* cumulated_effects:unit */
163  gen_chunk _attachee_out_regions_; /* out_regions:unit */
164  gen_chunk _attachee_preconditions_; /* preconditions:unit */
165  gen_chunk _attachee_privatized_regions_; /* privatized_regions:unit */
166  gen_chunk _attachee_proper_effects_; /* proper_effects:unit */
167  gen_chunk _attachee_proper_regions_; /* proper_regions:unit */
168  gen_chunk _attachee_regions_; /* regions:unit */
169  gen_chunk _attachee_static_control_; /* static_control:unit */
170  gen_chunk _attachee_transformers_; /* transformers:unit */
171  gen_chunk _attachee_decoration_; /* decoration:unit */
172  gen_chunk _attachee_comment_; /* comment:unit */
174 };
175 
176 #define attachee_domain_number(x) ((x)->_type_)
177 #define attachee_tag(x) ((x)->_attachee_tag__)
178 #define attachee_statement_line_number_p(x) (attachee_tag(x)==is_attachee_statement_line_number)
179 #define attachee_statement_line_number_(x) attachee_statement_line_number(x) /* old hack compatible */
180 #define attachee_statement_line_number(x) ((x)->_attachee_union_._attachee_statement_line_number_)
181 #define attachee_reference_p(x) (attachee_tag(x)==is_attachee_reference)
182 #define attachee_reference_(x) attachee_reference(x) /* old hack compatible */
183 #define attachee_reference(x) ((x)->_attachee_union_._attachee_reference_)
184 #define attachee_call_p(x) (attachee_tag(x)==is_attachee_call)
185 #define attachee_call_(x) attachee_call(x) /* old hack compatible */
186 #define attachee_call(x) ((x)->_attachee_union_._attachee_call_)
187 #define attachee_declaration_p(x) (attachee_tag(x)==is_attachee_declaration)
188 #define attachee_declaration_(x) attachee_declaration(x) /* old hack compatible */
189 #define attachee_declaration(x) ((x)->_attachee_union_._attachee_declaration_)
190 #define attachee_type_p(x) (attachee_tag(x)==is_attachee_type)
191 #define attachee_type_(x) attachee_type(x) /* old hack compatible */
192 #define attachee_type(x) ((x)->_attachee_union_._attachee_type_)
193 #define attachee_loop_p(x) (attachee_tag(x)==is_attachee_loop)
194 #define attachee_loop_(x) attachee_loop(x) /* old hack compatible */
195 #define attachee_loop(x) ((x)->_attachee_union_._attachee_loop_)
196 #define attachee_module_head_p(x) (attachee_tag(x)==is_attachee_module_head)
197 #define attachee_module_head_(x) attachee_module_head(x) /* old hack compatible */
198 #define attachee_module_head(x) ((x)->_attachee_union_._attachee_module_head_)
199 #define attachee_complementary_sections_p(x) (attachee_tag(x)==is_attachee_complementary_sections)
200 #define attachee_complementary_sections_(x) attachee_complementary_sections(x) /* old hack compatible */
201 #define attachee_complementary_sections(x) ((x)->_attachee_union_._attachee_complementary_sections_.u)
202 #define attachee_complexities_p(x) (attachee_tag(x)==is_attachee_complexities)
203 #define attachee_complexities_(x) attachee_complexities(x) /* old hack compatible */
204 #define attachee_complexities(x) ((x)->_attachee_union_._attachee_complexities_.u)
205 #define attachee_continuation_conditions_p(x) (attachee_tag(x)==is_attachee_continuation_conditions)
206 #define attachee_continuation_conditions_(x) attachee_continuation_conditions(x) /* old hack compatible */
207 #define attachee_continuation_conditions(x) ((x)->_attachee_union_._attachee_continuation_conditions_.u)
208 #define attachee_cumulated_effects_p(x) (attachee_tag(x)==is_attachee_cumulated_effects)
209 #define attachee_cumulated_effects_(x) attachee_cumulated_effects(x) /* old hack compatible */
210 #define attachee_cumulated_effects(x) ((x)->_attachee_union_._attachee_cumulated_effects_.u)
211 #define attachee_out_regions_p(x) (attachee_tag(x)==is_attachee_out_regions)
212 #define attachee_out_regions_(x) attachee_out_regions(x) /* old hack compatible */
213 #define attachee_out_regions(x) ((x)->_attachee_union_._attachee_out_regions_.u)
214 #define attachee_preconditions_p(x) (attachee_tag(x)==is_attachee_preconditions)
215 #define attachee_preconditions_(x) attachee_preconditions(x) /* old hack compatible */
216 #define attachee_preconditions(x) ((x)->_attachee_union_._attachee_preconditions_.u)
217 #define attachee_privatized_regions_p(x) (attachee_tag(x)==is_attachee_privatized_regions)
218 #define attachee_privatized_regions_(x) attachee_privatized_regions(x) /* old hack compatible */
219 #define attachee_privatized_regions(x) ((x)->_attachee_union_._attachee_privatized_regions_.u)
220 #define attachee_proper_effects_p(x) (attachee_tag(x)==is_attachee_proper_effects)
221 #define attachee_proper_effects_(x) attachee_proper_effects(x) /* old hack compatible */
222 #define attachee_proper_effects(x) ((x)->_attachee_union_._attachee_proper_effects_.u)
223 #define attachee_proper_regions_p(x) (attachee_tag(x)==is_attachee_proper_regions)
224 #define attachee_proper_regions_(x) attachee_proper_regions(x) /* old hack compatible */
225 #define attachee_proper_regions(x) ((x)->_attachee_union_._attachee_proper_regions_.u)
226 #define attachee_regions_p(x) (attachee_tag(x)==is_attachee_regions)
227 #define attachee_regions_(x) attachee_regions(x) /* old hack compatible */
228 #define attachee_regions(x) ((x)->_attachee_union_._attachee_regions_.u)
229 #define attachee_static_control_p(x) (attachee_tag(x)==is_attachee_static_control)
230 #define attachee_static_control_(x) attachee_static_control(x) /* old hack compatible */
231 #define attachee_static_control(x) ((x)->_attachee_union_._attachee_static_control_.u)
232 #define attachee_transformers_p(x) (attachee_tag(x)==is_attachee_transformers)
233 #define attachee_transformers_(x) attachee_transformers(x) /* old hack compatible */
234 #define attachee_transformers(x) ((x)->_attachee_union_._attachee_transformers_.u)
235 #define attachee_decoration_p(x) (attachee_tag(x)==is_attachee_decoration)
236 #define attachee_decoration_(x) attachee_decoration(x) /* old hack compatible */
237 #define attachee_decoration(x) ((x)->_attachee_union_._attachee_decoration_.u)
238 #define attachee_comment_p(x) (attachee_tag(x)==is_attachee_comment)
239 #define attachee_comment_(x) attachee_comment(x) /* old hack compatible */
240 #define attachee_comment(x) ((x)->_attachee_union_._attachee_comment_.u)
241 
242 /* ATTACHMENT
243  */
244 #define ATTACHMENT(x) ((attachment)((x).p))
245 #define attachment_CAST(x) ATTACHMENT(x)
246 #define ATTACHMENT_CAST(x) ATTACHMENT(x)
247 #define ATTACHMENT_(x) ((x).e)
248 #define ATTACHMENT_TYPE attachment
249 #define attachment_TYPE attachment
250 #define attachment_undefined ((attachment)gen_chunk_undefined)
251 #define attachment_undefined_p(x) ((x)==attachment_undefined)
252 
254 extern void free_attachment(attachment);
257 extern bool attachment_defined_p(attachment);
258 #define gen_ATTACHMENT_cons gen_attachment_cons
262 extern void write_attachment(FILE*, attachment);
263 extern attachment read_attachment(FILE*);
265 
268  attachee _attachment_attachee_; /* attachee:attachee */
269  intptr_t _attachment_begin_; /* begin:int */
270  intptr_t _attachment_end_; /* end:int */
271 };
272 
273 #define attachment_domain_number(x) ((x)->_type_)
274 #define attachment_attachee_(x) attachment_attachee(x) /* old hack compatible */
275 #define attachment_attachee(x) ((x)->_attachment_attachee_)
276 #define attachment_begin_(x) attachment_begin(x) /* old hack compatible */
277 #define attachment_begin(x) ((x)->_attachment_begin_)
278 #define attachment_end_(x) attachment_end(x) /* old hack compatible */
279 #define attachment_end(x) ((x)->_attachment_end_)
280 
281 /* ATTACHMENTS
282  */
283 #define ATTACHMENTS(x) ((attachments)((x).p))
284 #define attachments_CAST(x) ATTACHMENTS(x)
285 #define ATTACHMENTS_CAST(x) ATTACHMENTS(x)
286 #define ATTACHMENTS_(x) ((x).e)
287 #define ATTACHMENTS_TYPE attachments
288 #define attachments_TYPE attachments
289 #define attachments_undefined ((attachments)gen_chunk_undefined)
290 #define attachments_undefined_p(x) ((x)==attachments_undefined)
291 
293 extern void free_attachments(attachments);
297 #define gen_ATTACHMENTS_cons gen_attachments_cons
301 extern void write_attachments(FILE*, attachments);
302 extern attachments read_attachments(FILE*);
304 
308 };
309 
310 #define attachments_domain_number(x) ((x)->_type_)
311 #define attachments_attachment(x) ((x)->_attachments_holder_)
312 
313 /* WORD_TO_ATTACHMENTS
314  */
315 #define WORD_TO_ATTACHMENTS(x) ((word_to_attachments)((x).p))
316 #define word_to_attachments_CAST(x) WORD_TO_ATTACHMENTS(x)
317 #define WORD_TO_ATTACHMENTS_CAST(x) WORD_TO_ATTACHMENTS(x)
318 #define WORD_TO_ATTACHMENTS_(x) ((x).e)
319 #define WORD_TO_ATTACHMENTS_TYPE word_to_attachments
320 #define word_to_attachments_TYPE word_to_attachments
321 #define word_to_attachments_undefined ((word_to_attachments)gen_chunk_undefined)
322 #define word_to_attachments_undefined_p(x) ((x)==word_to_attachments_undefined)
323 
329 #define gen_WORD_TO_ATTACHMENTS_cons gen_word_to_attachments_cons
336 
340 };
341 
342 #define word_to_attachments_domain_number(x) ((x)->_type_)
343 #define word_to_attachments_hash_table(x) ((x)->_word_to_attachments_holder_)
344 #define word_to_attachments_key_type void_star
345 #define word_to_attachments_value_type attachments
346 #define WORD_TO_ATTACHMENTS_MAP(k,v,c,f) FUNCTION_MAP(word_to_attachments,p,p,k,v,c,f)
347 #define WORD_TO_ATTACHMENTS_FOREACH(k,v,f) FUNCTION_FOREACH(word_to_attachments,p,p,k,v,f)
353 
354 #define word_attachment_spec "\
355 --NEWGEN-START 91\n\
356 import call from \"ri.newgen\";\n\
357 import entity from \"ri.newgen\";\n\
358 import loop from \"ri.newgen\";\n\
359 import reference from \"ri.newgen\";\n\
360 external void_star;\n\
361 attachee = statement_line_number:int + persistant reference:reference + persistant call:call + persistant declaration:entity + type:string + persistant loop:loop + persistant module_head:entity + complementary_sections:unit + complexities:unit + continuation_conditions:unit + cumulated_effects:unit + out_regions:unit + preconditions:unit + privatized_regions:unit + proper_effects:unit + proper_regions:unit + regions:unit + static_control:unit + transformers:unit + decoration:unit + comment:unit;\n\
362 attachment = attachee:attachee x begin:int x end:int;\n\
363 attachments = attachment:attachment*;\n\
364 word_to_attachments = word_pointer:void_star -> attachments:attachments;\n\
365 "
366 #endif
void * void_star
Definition: newgen.c:33
#define intptr_t
Definition: stdint.in.h:294
gen_chunk _attachee_transformers_
static_control:unit
call _attachee_call_
reference:reference
gen_chunk _attachee_complementary_sections_
module_head:entity
gen_chunk _attachee_proper_regions_
proper_effects:unit
loop _attachee_loop_
type:string
gen_chunk _attachee_complexities_
complementary_sections:unit
gen_chunk _attachee_comment_
decoration:unit
gen_chunk _attachee_preconditions_
out_regions:unit
union _newgen_struct_attachee_::@82 _attachee_union_
intptr_t _attachee_statement_line_number_
entity _attachee_module_head_
loop:loop
entity _attachee_declaration_
call:call
gen_chunk _attachee_decoration_
transformers:unit
gen_chunk _attachee_cumulated_effects_
continuation_conditions:unit
enum attachee_utype _attachee_tag__
gen_chunk _attachee_regions_
proper_regions:unit
gen_chunk _attachee_out_regions_
cumulated_effects:unit
gen_chunk _attachee_proper_effects_
privatized_regions:unit
gen_chunk _attachee_static_control_
regions:unit
reference _attachee_reference_
statement_line_number:int
gen_chunk _attachee_continuation_conditions_
complexities:unit
string _attachee_type_
declaration:entity
gen_chunk _attachee_privatized_regions_
preconditions:unit
intptr_t _attachment_end_
begin:int
intptr_t _attachment_begin_
attachee:attachee
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
A gen_chunk is used to store every object.
Definition: genC.h:58
attachment copy_attachment(attachment)
ATTACHMENT.
attachee_utype
@ is_attachee_regions
@ is_attachee_preconditions
@ is_attachee_statement_line_number
@ is_attachee_transformers
@ is_attachee_module_head
@ is_attachee_call
@ is_attachee_privatized_regions
@ is_attachee_loop
@ is_attachee_comment
@ is_attachee_continuation_conditions
@ is_attachee_complementary_sections
@ is_attachee_declaration
@ is_attachee_cumulated_effects
@ is_attachee_decoration
@ is_attachee_type
@ is_attachee_proper_effects
@ is_attachee_static_control
@ is_attachee_reference
@ is_attachee_proper_regions
@ is_attachee_complexities
@ is_attachee_out_regions
attachee make_attachee_proper_regions(void)
bool attachments_defined_p(attachments)
attachee make_attachee_out_regions(void)
bool word_to_attachments_defined_p(word_to_attachments)
list gen_word_to_attachments_cons(word_to_attachments, list)
attachee make_attachee_transformers(void)
attachee copy_attachee(attachee)
ATTACHEE.
word_to_attachments make_word_to_attachments(void)
struct _newgen_struct_reference_ * reference
void word_to_attachments_non_recursive_free(word_to_attachments)
attachments delete_word_to_attachments(word_to_attachments, void_star)
attachment read_attachment(FILE *)
bool attachee_defined_p(attachee)
bool attachments_consistent_p(attachments)
attachee make_attachee_continuation_conditions(void)
attachments apply_word_to_attachments(word_to_attachments, void_star)
bool bound_word_to_attachments_p(word_to_attachments, void_star)
word_to_attachments copy_word_to_attachments(word_to_attachments)
WORD_TO_ATTACHMENTS.
attachee make_attachee(enum attachee_utype, void *)
void attachment_non_recursive_free(attachment)
attachee make_attachee_statement_line_number(intptr_t)
bool attachment_defined_p(attachment)
void write_word_to_attachments(FILE *, word_to_attachments)
list gen_attachee_cons(attachee, list)
void attachment_assign_contents(attachment, attachment)
attachee make_attachee_type(string)
bool word_to_attachments_consistent_p(word_to_attachments)
void free_attachment(attachment)
word_to_attachments read_word_to_attachments(FILE *)
void attachments_non_recursive_free(attachments)
struct _newgen_struct_attachee_ * attachee
attachee make_attachee_preconditions(void)
struct _newgen_struct_loop_ * loop
attachee make_attachee_comment(void)
string attachee_tag_as_string(enum attachee_utype)
void free_word_to_attachments(word_to_attachments)
struct _newgen_struct_call_ * call
attachments make_attachments(list)
struct _newgen_struct_attachments_ * attachments
attachee make_attachee_decoration(void)
void write_attachee(FILE *, attachee)
void free_attachee(attachee)
attachee make_attachee_complementary_sections(void)
attachments copy_attachments(attachments)
ATTACHMENTS.
attachee make_attachee_complexities(void)
bool attachee_consistent_p(attachee)
attachments check_attachments(attachments)
void word_to_attachments_assign_contents(word_to_attachments, word_to_attachments)
attachee check_attachee(attachee)
attachee make_attachee_proper_effects(void)
list gen_attachments_cons(attachments, list)
void extend_word_to_attachments(word_to_attachments, void_star, attachments)
void attachments_assign_contents(attachments, attachments)
attachee make_attachee_static_control(void)
void attachee_non_recursive_free(attachee)
void write_attachment(FILE *, attachment)
list gen_attachment_cons(attachment, list)
struct _newgen_struct_entity_ * entity
attachee make_attachee_cumulated_effects(void)
attachee read_attachee(FILE *)
void attachee_assign_contents(attachee, attachee)
word_to_attachments check_word_to_attachments(word_to_attachments)
struct _newgen_struct_attachment_ * attachment
attachee make_attachee_privatized_regions(void)
attachee make_attachee_reference(reference)
attachments read_attachments(FILE *)
void write_attachments(FILE *, attachments)
void update_word_to_attachments(word_to_attachments, void_star, attachments)
attachment check_attachment(attachment)
attachee make_attachee_loop(loop)
attachee make_attachee_regions(void)
attachment make_attachment(attachee, intptr_t, intptr_t)
struct _newgen_struct_word_to_attachments_ * word_to_attachments
attachee make_attachee_call(call)
attachee make_attachee_module_head(entity)
void free_attachments(attachments)
bool attachment_consistent_p(attachment)
attachee make_attachee_declaration(entity)