Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – tendra.SVN – Blame – /branches/algol60/src/producers/common/obj_c/off_ops.h – Rev 7

Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997, 1998
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
/*
31
    AUTOMATICALLY GENERATED FROM ALGEBRA c_class (VERSION 1.1)
32
    BY calculus (VERSION 1.2)
33
*/
34
 
35
#ifndef OFF_OPS_H_INCLUDED
36
#define OFF_OPS_H_INCLUDED
37
 
38
/* Operations for union OFFSET */
39
 
7 7u83 40
#define TAG_off(P)			(CHECK_NULL(P)->ag_tag)
2 7u83 41
 
42
 
43
/* Operations for field zero of union OFFSET */
44
 
7 7u83 45
#define off_zero_tag			((unsigned)0)
46
#define IS_off_zero(P)			(CHECK_NULL(P)->ag_tag == 0)
2 7u83 47
 
7 7u83 48
#define off_zero_type(P)		(CHECK_TAG((P), 0) + 1)
2 7u83 49
 
7 7u83 50
#define MAKE_off_zero(type_, c_class_off)\
2 7u83 51
    {\
7 7u83 52
	c_class *x778_ = GEN_c_class(2, TYPEID_off);\
53
	x778_->ag_tag = 0;\
54
	COPY_type(x778_ + 1, (type_));\
55
	(c_class_off) = x778_;\
2 7u83 56
    }
57
 
7 7u83 58
#define DECONS_off_zero(type_, c_class_off)\
2 7u83 59
    {\
7 7u83 60
	c_class *x779_ = CHECK_TAG((c_class_off), 0);\
61
	(type_) = DEREF_type(x779_ + 1);\
2 7u83 62
    }
63
 
7 7u83 64
#define DESTROY_off_zero(destroyer_, type_, c_class_off)\
2 7u83 65
    {\
7 7u83 66
	c_class *x780_ = CHECK_TAG((c_class_off), 0);\
67
	(type_) = DEREF_type(x780_ + 1);\
68
	(destroyer_)(x780_, (unsigned)2);\
2 7u83 69
    }
70
 
71
 
72
/* Operations for field type of union OFFSET */
73
 
7 7u83 74
#define off_type_tag			((unsigned)1)
75
#define IS_off_type(P)			(CHECK_NULL(P)->ag_tag == 1)
2 7u83 76
 
7 7u83 77
#define off_type_type(P)		(CHECK_TAG((P), 1) + 1)
2 7u83 78
 
7 7u83 79
#define MAKE_off_type(type_, c_class_off)\
2 7u83 80
    {\
7 7u83 81
	c_class *x781_ = GEN_c_class(2, TYPEID_off);\
82
	x781_->ag_tag = 1;\
83
	COPY_type(x781_ + 1, (type_));\
84
	(c_class_off) = x781_;\
2 7u83 85
    }
86
 
7 7u83 87
#define DECONS_off_type(type_, c_class_off)\
2 7u83 88
    {\
7 7u83 89
	c_class *x782_ = CHECK_TAG((c_class_off), 1);\
90
	(type_) = DEREF_type(x782_ + 1);\
2 7u83 91
    }
92
 
7 7u83 93
#define DESTROY_off_type(destroyer_, type_, c_class_off)\
2 7u83 94
    {\
7 7u83 95
	c_class *x783_ = CHECK_TAG((c_class_off), 1);\
96
	(type_) = DEREF_type(x783_ + 1);\
97
	(destroyer_)(x783_, (unsigned)2);\
2 7u83 98
    }
99
 
100
 
101
/* Operations for field array of union OFFSET */
102
 
7 7u83 103
#define off_array_tag			((unsigned)2)
104
#define IS_off_array(P)			(CHECK_NULL(P)->ag_tag == 2)
2 7u83 105
 
7 7u83 106
#define off_array_type(P)		(CHECK_TAG((P), 2) + 1)
107
#define off_array_arg(P)		(CHECK_TAG((P), 2) + 2)
2 7u83 108
 
7 7u83 109
#define MAKE_off_array(type_, arg_, c_class_off)\
2 7u83 110
    {\
7 7u83 111
	c_class *x784_ = GEN_c_class(3, TYPEID_off);\
112
	x784_->ag_tag = 2;\
113
	COPY_type(x784_ + 1, (type_));\
114
	COPY_unsigned(x784_ + 2, (arg_));\
115
	(c_class_off) = x784_;\
2 7u83 116
    }
117
 
7 7u83 118
#define DECONS_off_array(type_, arg_, c_class_off)\
2 7u83 119
    {\
7 7u83 120
	c_class *x785_ = CHECK_TAG((c_class_off), 2);\
121
	(type_) = DEREF_type(x785_ + 1);\
122
	(arg_) = DEREF_unsigned(x785_ + 2);\
2 7u83 123
    }
124
 
7 7u83 125
#define DESTROY_off_array(destroyer_, type_, arg_, c_class_off)\
2 7u83 126
    {\
7 7u83 127
	c_class *x786_ = CHECK_TAG((c_class_off), 2);\
128
	(type_) = DEREF_type(x786_ + 1);\
129
	(arg_) = DEREF_unsigned(x786_ + 2);\
130
	(destroyer_)(x786_, (unsigned)3);\
2 7u83 131
    }
132
 
133
 
134
/* Operations for field extra of union OFFSET */
135
 
7 7u83 136
#define off_extra_tag			((unsigned)3)
137
#define IS_off_extra(P)			(CHECK_NULL(P)->ag_tag == 3)
2 7u83 138
 
7 7u83 139
#define off_extra_type(P)		(CHECK_TAG((P), 3) + 1)
140
#define off_extra_scale(P)		(CHECK_TAG((P), 3) + 2)
2 7u83 141
 
7 7u83 142
#define MAKE_off_extra(type_, scale_, c_class_off)\
2 7u83 143
    {\
7 7u83 144
	c_class *x787_ = GEN_c_class(3, TYPEID_off);\
145
	x787_->ag_tag = 3;\
146
	COPY_type(x787_ + 1, (type_));\
147
	COPY_int(x787_ + 2, (scale_));\
148
	(c_class_off) = x787_;\
2 7u83 149
    }
150
 
7 7u83 151
#define DECONS_off_extra(type_, scale_, c_class_off)\
2 7u83 152
    {\
7 7u83 153
	c_class *x788_ = CHECK_TAG((c_class_off), 3);\
154
	(type_) = DEREF_type(x788_ + 1);\
155
	(scale_) = DEREF_int(x788_ + 2);\
2 7u83 156
    }
157
 
7 7u83 158
#define DESTROY_off_extra(destroyer_, type_, scale_, c_class_off)\
2 7u83 159
    {\
7 7u83 160
	c_class *x789_ = CHECK_TAG((c_class_off), 3);\
161
	(type_) = DEREF_type(x789_ + 1);\
162
	(scale_) = DEREF_int(x789_ + 2);\
163
	(destroyer_)(x789_, (unsigned)3);\
2 7u83 164
    }
165
 
166
 
167
/* Operations for field base of union OFFSET */
168
 
7 7u83 169
#define off_base_tag			((unsigned)4)
170
#define IS_off_base(P)			(CHECK_NULL(P)->ag_tag == 4)
2 7u83 171
 
7 7u83 172
#define off_base_graph(P)		(CHECK_TAG((P), 4) + 1)
2 7u83 173
 
7 7u83 174
#define MAKE_off_base(graph_, c_class_off)\
2 7u83 175
    {\
7 7u83 176
	c_class *x790_ = GEN_c_class(2, TYPEID_off);\
177
	x790_->ag_tag = 4;\
178
	COPY_graph(x790_ + 1, (graph_));\
179
	(c_class_off) = x790_;\
2 7u83 180
    }
181
 
7 7u83 182
#define DECONS_off_base(graph_, c_class_off)\
2 7u83 183
    {\
7 7u83 184
	c_class *x791_ = CHECK_TAG((c_class_off), 4);\
185
	(graph_) = DEREF_graph(x791_ + 1);\
2 7u83 186
    }
187
 
7 7u83 188
#define DESTROY_off_base(destroyer_, graph_, c_class_off)\
2 7u83 189
    {\
7 7u83 190
	c_class *x792_ = CHECK_TAG((c_class_off), 4);\
191
	(graph_) = DEREF_graph(x792_ + 1);\
192
	(destroyer_)(x792_, (unsigned)2);\
2 7u83 193
    }
194
 
195
 
196
/* Operations for field deriv of union OFFSET */
197
 
7 7u83 198
#define off_deriv_tag			((unsigned)5)
199
#define IS_off_deriv(P)			(CHECK_NULL(P)->ag_tag == 5)
2 7u83 200
 
7 7u83 201
#define off_deriv_graph(P)		(CHECK_TAG((P), 5) + 1)
202
#define off_deriv_direct(P)		(CHECK_TAG((P), 5) + 2)
203
#define off_deriv_indirect(P)		(CHECK_TAG((P), 5) + 3)
2 7u83 204
 
7 7u83 205
#define MAKE_off_deriv(graph_, direct_, indirect_, c_class_off)\
2 7u83 206
    {\
7 7u83 207
	c_class *x793_ = GEN_c_class(4, TYPEID_off);\
208
	x793_->ag_tag = 5;\
209
	COPY_graph(x793_ + 1, (graph_));\
210
	COPY_off(x793_ + 2, (direct_));\
211
	COPY_off(x793_ + 3, (indirect_));\
212
	(c_class_off) = x793_;\
2 7u83 213
    }
214
 
7 7u83 215
#define DECONS_off_deriv(graph_, direct_, indirect_, c_class_off)\
2 7u83 216
    {\
7 7u83 217
	c_class *x794_ = CHECK_TAG((c_class_off), 5);\
218
	(graph_) = DEREF_graph(x794_ + 1);\
219
	(direct_) = DEREF_off(x794_ + 2);\
220
	(indirect_) = DEREF_off(x794_ + 3);\
2 7u83 221
    }
222
 
7 7u83 223
#define DESTROY_off_deriv(destroyer_, graph_, direct_, indirect_, c_class_off)\
2 7u83 224
    {\
7 7u83 225
	c_class *x795_ = CHECK_TAG((c_class_off), 5);\
226
	(graph_) = DEREF_graph(x795_ + 1);\
227
	(direct_) = DEREF_off(x795_ + 2);\
228
	(indirect_) = DEREF_off(x795_ + 3);\
229
	(destroyer_)(x795_, (unsigned)4);\
2 7u83 230
    }
231
 
232
 
233
/* Operations for field member of union OFFSET */
234
 
7 7u83 235
#define off_member_tag			((unsigned)6)
236
#define IS_off_member(P)		(CHECK_NULL(P)->ag_tag == 6)
2 7u83 237
 
7 7u83 238
#define off_member_id(P)		(CHECK_TAG((P), 6) + 1)
2 7u83 239
 
7 7u83 240
#define MAKE_off_member(id_, c_class_off)\
2 7u83 241
    {\
7 7u83 242
	c_class *x796_ = GEN_c_class(2, TYPEID_off);\
243
	x796_->ag_tag = 6;\
244
	COPY_id(x796_ + 1, (id_));\
245
	(c_class_off) = x796_;\
2 7u83 246
    }
247
 
7 7u83 248
#define DECONS_off_member(id_, c_class_off)\
2 7u83 249
    {\
7 7u83 250
	c_class *x797_ = CHECK_TAG((c_class_off), 6);\
251
	(id_) = DEREF_id(x797_ + 1);\
2 7u83 252
    }
253
 
7 7u83 254
#define DESTROY_off_member(destroyer_, id_, c_class_off)\
2 7u83 255
    {\
7 7u83 256
	c_class *x798_ = CHECK_TAG((c_class_off), 6);\
257
	(id_) = DEREF_id(x798_ + 1);\
258
	(destroyer_)(x798_, (unsigned)2);\
2 7u83 259
    }
260
 
261
 
262
/* Operations for field ptr_mem of union OFFSET */
263
 
7 7u83 264
#define off_ptr_mem_tag			((unsigned)7)
265
#define IS_off_ptr_mem(P)		(CHECK_NULL(P)->ag_tag == 7)
2 7u83 266
 
7 7u83 267
#define off_ptr_mem_arg(P)		(CHECK_TAG((P), 7) + 1)
2 7u83 268
 
7 7u83 269
#define MAKE_off_ptr_mem(arg_, c_class_off)\
2 7u83 270
    {\
7 7u83 271
	c_class *x799_ = GEN_c_class(2, TYPEID_off);\
272
	x799_->ag_tag = 7;\
273
	COPY_exp(x799_ + 1, (arg_));\
274
	(c_class_off) = x799_;\
2 7u83 275
    }
276
 
7 7u83 277
#define DECONS_off_ptr_mem(arg_, c_class_off)\
2 7u83 278
    {\
7 7u83 279
	c_class *x800_ = CHECK_TAG((c_class_off), 7);\
280
	(arg_) = DEREF_exp(x800_ + 1);\
2 7u83 281
    }
282
 
7 7u83 283
#define DESTROY_off_ptr_mem(destroyer_, arg_, c_class_off)\
2 7u83 284
    {\
7 7u83 285
	c_class *x801_ = CHECK_TAG((c_class_off), 7);\
286
	(arg_) = DEREF_exp(x801_ + 1);\
287
	(destroyer_)(x801_, (unsigned)2);\
2 7u83 288
    }
289
 
290
 
291
/* Operations for field negate of union OFFSET */
292
 
7 7u83 293
#define off_negate_tag			((unsigned)8)
294
#define IS_off_negate(P)		(CHECK_NULL(P)->ag_tag == 8)
2 7u83 295
 
7 7u83 296
#define off_negate_arg(P)		(CHECK_TAG((P), 8) + 1)
2 7u83 297
 
7 7u83 298
#define MAKE_off_negate(arg_, c_class_off)\
2 7u83 299
    {\
7 7u83 300
	c_class *x802_ = GEN_c_class(2, TYPEID_off);\
301
	x802_->ag_tag = 8;\
302
	COPY_off(x802_ + 1, (arg_));\
303
	(c_class_off) = x802_;\
2 7u83 304
    }
305
 
7 7u83 306
#define DECONS_off_negate(arg_, c_class_off)\
2 7u83 307
    {\
7 7u83 308
	c_class *x803_ = CHECK_TAG((c_class_off), 8);\
309
	(arg_) = DEREF_off(x803_ + 1);\
2 7u83 310
    }
311
 
7 7u83 312
#define DESTROY_off_negate(destroyer_, arg_, c_class_off)\
2 7u83 313
    {\
7 7u83 314
	c_class *x804_ = CHECK_TAG((c_class_off), 8);\
315
	(arg_) = DEREF_off(x804_ + 1);\
316
	(destroyer_)(x804_, (unsigned)2);\
2 7u83 317
    }
318
 
319
 
320
/* Operations for field plus of union OFFSET */
321
 
7 7u83 322
#define off_plus_tag			((unsigned)9)
323
#define IS_off_plus(P)			(CHECK_NULL(P)->ag_tag == 9)
2 7u83 324
 
7 7u83 325
#define off_plus_arg1(P)		(CHECK_TAG((P), 9) + 1)
326
#define off_plus_arg2(P)		(CHECK_TAG((P), 9) + 2)
2 7u83 327
 
7 7u83 328
#define MAKE_off_plus(arg1_, arg2_, c_class_off)\
2 7u83 329
    {\
7 7u83 330
	c_class *x805_ = GEN_c_class(3, TYPEID_off);\
331
	x805_->ag_tag = 9;\
332
	COPY_off(x805_ + 1, (arg1_));\
333
	COPY_off(x805_ + 2, (arg2_));\
334
	(c_class_off) = x805_;\
2 7u83 335
    }
336
 
7 7u83 337
#define DECONS_off_plus(arg1_, arg2_, c_class_off)\
2 7u83 338
    {\
7 7u83 339
	c_class *x806_ = CHECK_TAG((c_class_off), 9);\
340
	(arg1_) = DEREF_off(x806_ + 1);\
341
	(arg2_) = DEREF_off(x806_ + 2);\
2 7u83 342
    }
343
 
7 7u83 344
#define DESTROY_off_plus(destroyer_, arg1_, arg2_, c_class_off)\
2 7u83 345
    {\
7 7u83 346
	c_class *x807_ = CHECK_TAG((c_class_off), 9);\
347
	(arg1_) = DEREF_off(x807_ + 1);\
348
	(arg2_) = DEREF_off(x807_ + 2);\
349
	(destroyer_)(x807_, (unsigned)3);\
2 7u83 350
    }
351
 
352
 
353
/* Operations for field mult of union OFFSET */
354
 
7 7u83 355
#define off_mult_tag			((unsigned)10)
356
#define IS_off_mult(P)			(CHECK_NULL(P)->ag_tag == 10)
2 7u83 357
 
7 7u83 358
#define off_mult_arg1(P)		(CHECK_TAG((P), 10) + 1)
359
#define off_mult_arg2(P)		(CHECK_TAG((P), 10) + 2)
2 7u83 360
 
7 7u83 361
#define MAKE_off_mult(arg1_, arg2_, c_class_off)\
2 7u83 362
    {\
7 7u83 363
	c_class *x808_ = GEN_c_class(3, TYPEID_off);\
364
	x808_->ag_tag = 10;\
365
	COPY_off(x808_ + 1, (arg1_));\
366
	COPY_exp(x808_ + 2, (arg2_));\
367
	(c_class_off) = x808_;\
2 7u83 368
    }
369
 
7 7u83 370
#define DECONS_off_mult(arg1_, arg2_, c_class_off)\
2 7u83 371
    {\
7 7u83 372
	c_class *x809_ = CHECK_TAG((c_class_off), 10);\
373
	(arg1_) = DEREF_off(x809_ + 1);\
374
	(arg2_) = DEREF_exp(x809_ + 2);\
2 7u83 375
    }
376
 
7 7u83 377
#define DESTROY_off_mult(destroyer_, arg1_, arg2_, c_class_off)\
2 7u83 378
    {\
7 7u83 379
	c_class *x810_ = CHECK_TAG((c_class_off), 10);\
380
	(arg1_) = DEREF_off(x810_ + 1);\
381
	(arg2_) = DEREF_exp(x810_ + 2);\
382
	(destroyer_)(x810_, (unsigned)3);\
2 7u83 383
    }
384
 
385
 
386
/* Operations for field ptr_diff of union OFFSET */
387
 
7 7u83 388
#define off_ptr_diff_tag		((unsigned)11)
389
#define IS_off_ptr_diff(P)		(CHECK_NULL(P)->ag_tag == 11)
2 7u83 390
 
7 7u83 391
#define off_ptr_diff_ptr1(P)		(CHECK_TAG((P), 11) + 1)
392
#define off_ptr_diff_ptr2(P)		(CHECK_TAG((P), 11) + 2)
2 7u83 393
 
7 7u83 394
#define MAKE_off_ptr_diff(ptr1_, ptr2_, c_class_off)\
2 7u83 395
    {\
7 7u83 396
	c_class *x811_ = GEN_c_class(3, TYPEID_off);\
397
	x811_->ag_tag = 11;\
398
	COPY_exp(x811_ + 1, (ptr1_));\
399
	COPY_exp(x811_ + 2, (ptr2_));\
400
	(c_class_off) = x811_;\
2 7u83 401
    }
402
 
7 7u83 403
#define DECONS_off_ptr_diff(ptr1_, ptr2_, c_class_off)\
2 7u83 404
    {\
7 7u83 405
	c_class *x812_ = CHECK_TAG((c_class_off), 11);\
406
	(ptr1_) = DEREF_exp(x812_ + 1);\
407
	(ptr2_) = DEREF_exp(x812_ + 2);\
2 7u83 408
    }
409
 
7 7u83 410
#define DESTROY_off_ptr_diff(destroyer_, ptr1_, ptr2_, c_class_off)\
2 7u83 411
    {\
7 7u83 412
	c_class *x813_ = CHECK_TAG((c_class_off), 11);\
413
	(ptr1_) = DEREF_exp(x813_ + 1);\
414
	(ptr2_) = DEREF_exp(x813_ + 2);\
415
	(destroyer_)(x813_, (unsigned)3);\
2 7u83 416
    }
417
 
418
 
419
/* Operations for field token of union OFFSET */
420
 
7 7u83 421
#define off_token_tag			((unsigned)12)
422
#define IS_off_token(P)			(CHECK_NULL(P)->ag_tag == 12)
2 7u83 423
 
7 7u83 424
#define off_token_tok(P)		(CHECK_TAG((P), 12) + 1)
425
#define off_token_args(P)		(CHECK_TAG((P), 12) + 2)
2 7u83 426
 
7 7u83 427
#define MAKE_off_token(tok_, args_, c_class_off)\
2 7u83 428
    {\
7 7u83 429
	c_class *x814_ = GEN_c_class(3, TYPEID_off);\
430
	x814_->ag_tag = 12;\
431
	COPY_id(x814_ + 1, (tok_));\
432
	COPY_list(x814_ + 2, (args_));\
433
	(c_class_off) = x814_;\
2 7u83 434
    }
435
 
7 7u83 436
#define DECONS_off_token(tok_, args_, c_class_off)\
2 7u83 437
    {\
7 7u83 438
	c_class *x815_ = CHECK_TAG((c_class_off), 12);\
439
	(tok_) = DEREF_id(x815_ + 1);\
440
	(args_) = DEREF_list(x815_ + 2);\
2 7u83 441
    }
442
 
7 7u83 443
#define DESTROY_off_token(destroyer_, tok_, args_, c_class_off)\
2 7u83 444
    {\
7 7u83 445
	c_class *x816_ = CHECK_TAG((c_class_off), 12);\
446
	(tok_) = DEREF_id(x816_ + 1);\
447
	(args_) = DEREF_list(x816_ + 2);\
448
	(destroyer_)(x816_, (unsigned)3);\
2 7u83 449
    }
450
 
451
 
452
#endif