Subversion Repositories tendra.SVN

Rev

Rev 5 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 6
Line 35... Line 35...
35
#ifndef INST_OPS_H_INCLUDED
35
#ifndef INST_OPS_H_INCLUDED
36
#define INST_OPS_H_INCLUDED
36
#define INST_OPS_H_INCLUDED
37
 
37
 
38
/* Operations for union INSTANCE */
38
/* Operations for union INSTANCE */
39
 
39
 
40
#define TAG_inst( P )			( CHECK_NULL ( P )->ag_tag )
40
#define TAG_inst(P)			(CHECK_NULL(P)->ag_tag)
41
 
41
 
42
 
42
 
43
/* Operations for component form of union INSTANCE */
43
/* Operations for component form of union INSTANCE */
44
 
44
 
45
#define inst_form( P )			( CHECK_NULL ( P ) + 1 )
45
#define inst_form(P)			(CHECK_NULL(P) + 1)
46
 
46
 
47
 
47
 
48
/* Operations for component alias of union INSTANCE */
48
/* Operations for component alias of union INSTANCE */
49
 
49
 
50
#define inst_alias( P )			( CHECK_NULL ( P ) + 2 )
50
#define inst_alias(P)			(CHECK_NULL(P) + 2)
51
 
51
 
52
 
52
 
53
/* Operations for component next of union INSTANCE */
53
/* Operations for component next of union INSTANCE */
54
 
54
 
55
#define inst_next( P )			( CHECK_NULL ( P ) + 3 )
55
#define inst_next(P)			(CHECK_NULL(P) + 3)
56
 
56
 
57
 
57
 
58
/* Operations for field templ of union INSTANCE */
58
/* Operations for field templ of union INSTANCE */
59
 
59
 
60
#define inst_templ_tag			( ( unsigned ) 0 )
60
#define inst_templ_tag			((unsigned)0)
61
#define IS_inst_templ( P )		( CHECK_NULL ( P )->ag_tag == 0 )
61
#define IS_inst_templ(P)		(CHECK_NULL(P)->ag_tag == 0)
62
 
62
 
63
#define inst_templ_id( P )		( CHECK_TAG ( ( P ), 0 ) + 4 )
63
#define inst_templ_id(P)		(CHECK_TAG((P), 0) + 4)
64
#define inst_templ_spec( P )		( CHECK_TAG ( ( P ), 0 ) + 5 )
64
#define inst_templ_spec(P)		(CHECK_TAG((P), 0) + 5)
65
#define inst_templ_access( P )		( CHECK_TAG ( ( P ), 0 ) + 6 )
65
#define inst_templ_access(P)		(CHECK_TAG((P), 0) + 6)
66
#define inst_templ_mode( P )		( CHECK_TAG ( ( P ), 0 ) + 7 )
66
#define inst_templ_mode(P)		(CHECK_TAG((P), 0) + 7)
67
#define inst_templ_mems( P )		( CHECK_TAG ( ( P ), 0 ) + 8 )
67
#define inst_templ_mems(P)		(CHECK_TAG((P), 0) + 8)
68
#define inst_templ_prev( P )		( CHECK_TAG ( ( P ), 0 ) + 9 )
68
#define inst_templ_prev(P)		(CHECK_TAG((P), 0) + 9)
69
 
69
 
70
#define MAKE_inst_templ( form_, next_, id_, access_, prev_, c_class_inst )\
70
#define MAKE_inst_templ(form_, next_, id_, access_, prev_, c_class_inst)\
71
    {\
71
    {\
72
	c_class *x851_ = GEN_c_class ( 10, TYPEID_inst ) ;\
72
	c_class *x851_ = GEN_c_class(10, TYPEID_inst);\
73
	x851_->ag_tag = 0 ;\
73
	x851_->ag_tag = 0;\
74
	COPY_type ( x851_ + 1, ( form_ ) ) ;\
74
	COPY_type(x851_ + 1, (form_));\
75
	COPY_inst ( x851_ + 2, x851_ ) ;\
75
	COPY_inst(x851_ + 2, x851_);\
76
	COPY_inst ( x851_ + 3, ( next_ ) ) ;\
76
	COPY_inst(x851_ + 3, (next_));\
77
	COPY_id ( x851_ + 4, ( id_ ) ) ;\
77
	COPY_id(x851_ + 4, (id_));\
78
	COPY_type ( x851_ + 5, NULL_type ) ;\
78
	COPY_type(x851_ + 5, NULL_type);\
79
	COPY_dspec ( x851_ + 6, ( access_ ) ) ;\
79
	COPY_dspec(x851_ + 6, (access_));\
80
	COPY_pptok ( x851_ + 7, NULL ) ;\
80
	COPY_pptok(x851_ + 7, NULL);\
81
	COPY_list ( x851_ + 8, NULL_list ( IDENTIFIER ) ) ;\
81
	COPY_list(x851_ + 8, NULL_list ( IDENTIFIER ));\
82
	COPY_inst ( x851_ + 9, ( prev_ ) ) ;\
82
	COPY_inst(x851_ + 9, (prev_));\
83
	( c_class_inst ) = x851_ ;\
83
	(c_class_inst) = x851_;\
84
    }
84
    }
85
 
85
 
86
#define DECONS_inst_templ( form_, alias_, next_, id_, spec_, access_, mode_, mems_, prev_, c_class_inst )\
86
#define DECONS_inst_templ(form_, alias_, next_, id_, spec_, access_, mode_, mems_, prev_, c_class_inst)\
87
    {\
87
    {\
88
	c_class *x852_ = CHECK_TAG ( ( c_class_inst ), 0 ) ;\
88
	c_class *x852_ = CHECK_TAG((c_class_inst), 0);\
89
	( form_ ) = DEREF_type ( x852_ + 1 ) ;\
89
	(form_) = DEREF_type(x852_ + 1);\
90
	( alias_ ) = DEREF_inst ( x852_ + 2 ) ;\
90
	(alias_) = DEREF_inst(x852_ + 2);\
91
	( next_ ) = DEREF_inst ( x852_ + 3 ) ;\
91
	(next_) = DEREF_inst(x852_ + 3);\
92
	( id_ ) = DEREF_id ( x852_ + 4 ) ;\
92
	(id_) = DEREF_id(x852_ + 4);\
93
	( spec_ ) = DEREF_type ( x852_ + 5 ) ;\
93
	(spec_) = DEREF_type(x852_ + 5);\
94
	( access_ ) = DEREF_dspec ( x852_ + 6 ) ;\
94
	(access_) = DEREF_dspec(x852_ + 6);\
95
	( mode_ ) = DEREF_pptok ( x852_ + 7 ) ;\
95
	(mode_) = DEREF_pptok(x852_ + 7);\
96
	( mems_ ) = DEREF_list ( x852_ + 8 ) ;\
96
	(mems_) = DEREF_list(x852_ + 8);\
97
	( prev_ ) = DEREF_inst ( x852_ + 9 ) ;\
97
	(prev_) = DEREF_inst(x852_ + 9);\
98
    }
98
    }
99
 
99
 
100
#define DESTROY_inst_templ( destroyer_, form_, alias_, next_, id_, spec_, access_, mode_, mems_, prev_, c_class_inst )\
100
#define DESTROY_inst_templ(destroyer_, form_, alias_, next_, id_, spec_, access_, mode_, mems_, prev_, c_class_inst)\
101
    {\
101
    {\
102
	c_class *x853_ = CHECK_TAG ( ( c_class_inst ), 0 ) ;\
102
	c_class *x853_ = CHECK_TAG((c_class_inst), 0);\
103
	( form_ ) = DEREF_type ( x853_ + 1 ) ;\
103
	(form_) = DEREF_type(x853_ + 1);\
104
	( alias_ ) = DEREF_inst ( x853_ + 2 ) ;\
104
	(alias_) = DEREF_inst(x853_ + 2);\
105
	( next_ ) = DEREF_inst ( x853_ + 3 ) ;\
105
	(next_) = DEREF_inst(x853_ + 3);\
106
	( id_ ) = DEREF_id ( x853_ + 4 ) ;\
106
	(id_) = DEREF_id(x853_ + 4);\
107
	( spec_ ) = DEREF_type ( x853_ + 5 ) ;\
107
	(spec_) = DEREF_type(x853_ + 5);\
108
	( access_ ) = DEREF_dspec ( x853_ + 6 ) ;\
108
	(access_) = DEREF_dspec(x853_ + 6);\
109
	( mode_ ) = DEREF_pptok ( x853_ + 7 ) ;\
109
	(mode_) = DEREF_pptok(x853_ + 7);\
110
	( mems_ ) = DEREF_list ( x853_ + 8 ) ;\
110
	(mems_) = DEREF_list(x853_ + 8);\
111
	( prev_ ) = DEREF_inst ( x853_ + 9 ) ;\
111
	(prev_) = DEREF_inst(x853_ + 9);\
112
	( destroyer_ ) ( x853_, ( unsigned ) 10 ) ;\
112
	(destroyer_)(x853_, (unsigned)10);\
113
    }
113
    }
114
 
114
 
115
 
115
 
116
/* Operations for field token of union INSTANCE */
116
/* Operations for field token of union INSTANCE */
117
 
117
 
118
#define inst_token_tag			( ( unsigned ) 1 )
118
#define inst_token_tag			((unsigned)1)
119
#define IS_inst_token( P )		( CHECK_NULL ( P )->ag_tag == 1 )
119
#define IS_inst_token(P)		(CHECK_NULL(P)->ag_tag == 1)
120
 
120
 
121
#define inst_token_no( P )		( CHECK_TAG ( ( P ), 1 ) + 4 )
121
#define inst_token_no(P)		(CHECK_TAG((P), 1) + 4)
122
 
122
 
123
#define MAKE_inst_token( form_, next_, c_class_inst )\
123
#define MAKE_inst_token(form_, next_, c_class_inst)\
124
    {\
124
    {\
125
	c_class *x854_ = GEN_c_class ( 5, TYPEID_inst ) ;\
125
	c_class *x854_ = GEN_c_class(5, TYPEID_inst);\
126
	x854_->ag_tag = 1 ;\
126
	x854_->ag_tag = 1;\
127
	COPY_type ( x854_ + 1, ( form_ ) ) ;\
127
	COPY_type(x854_ + 1, (form_));\
128
	COPY_inst ( x854_ + 2, x854_ ) ;\
128
	COPY_inst(x854_ + 2, x854_);\
129
	COPY_inst ( x854_ + 3, ( next_ ) ) ;\
129
	COPY_inst(x854_ + 3, (next_));\
130
	COPY_ulong ( x854_ + 4, LINK_NONE ) ;\
130
	COPY_ulong(x854_ + 4, LINK_NONE);\
131
	( c_class_inst ) = x854_ ;\
131
	(c_class_inst) = x854_;\
132
    }
132
    }
133
 
133
 
134
#define DECONS_inst_token( form_, alias_, next_, no_, c_class_inst )\
134
#define DECONS_inst_token(form_, alias_, next_, no_, c_class_inst)\
135
    {\
135
    {\
136
	c_class *x855_ = CHECK_TAG ( ( c_class_inst ), 1 ) ;\
136
	c_class *x855_ = CHECK_TAG((c_class_inst), 1);\
137
	( form_ ) = DEREF_type ( x855_ + 1 ) ;\
137
	(form_) = DEREF_type(x855_ + 1);\
138
	( alias_ ) = DEREF_inst ( x855_ + 2 ) ;\
138
	(alias_) = DEREF_inst(x855_ + 2);\
139
	( next_ ) = DEREF_inst ( x855_ + 3 ) ;\
139
	(next_) = DEREF_inst(x855_ + 3);\
140
	( no_ ) = DEREF_ulong ( x855_ + 4 ) ;\
140
	(no_) = DEREF_ulong(x855_ + 4);\
141
    }
141
    }
142
 
142
 
143
#define DESTROY_inst_token( destroyer_, form_, alias_, next_, no_, c_class_inst )\
143
#define DESTROY_inst_token(destroyer_, form_, alias_, next_, no_, c_class_inst)\
144
    {\
144
    {\
145
	c_class *x856_ = CHECK_TAG ( ( c_class_inst ), 1 ) ;\
145
	c_class *x856_ = CHECK_TAG((c_class_inst), 1);\
146
	( form_ ) = DEREF_type ( x856_ + 1 ) ;\
146
	(form_) = DEREF_type(x856_ + 1);\
147
	( alias_ ) = DEREF_inst ( x856_ + 2 ) ;\
147
	(alias_) = DEREF_inst(x856_ + 2);\
148
	( next_ ) = DEREF_inst ( x856_ + 3 ) ;\
148
	(next_) = DEREF_inst(x856_ + 3);\
149
	( no_ ) = DEREF_ulong ( x856_ + 4 ) ;\
149
	(no_) = DEREF_ulong(x856_ + 4);\
150
	( destroyer_ ) ( x856_, ( unsigned ) 5 ) ;\
150
	(destroyer_)(x856_, (unsigned)5);\
151
    }
151
    }
152
 
152
 
153
 
153
 
154
#endif
154
#endif