1 | /*
|
---|
2 | * Copyright (C) 2008-2017 by TOPPERS Project
|
---|
3 | *
|
---|
4 | * ä¸è¨èä½æ¨©è
|
---|
5 | ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
|
---|
6 | * ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ã使ç¨ã»è¤è£½ã»æ¹
|
---|
7 | * å¤ã»åé
|
---|
8 | å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
|
---|
9 | * (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
|
---|
10 | * 権表示ï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
|
---|
11 | * ã¹ã³ã¼ãä¸ã«å«ã¾ãã¦ãããã¨ï¼
|
---|
12 | * (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
13 | * ç¨ã§ããå½¢ã§åé
|
---|
14 | å¸ããå ´åã«ã¯ï¼åé
|
---|
15 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨
|
---|
16 | * è
|
---|
17 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
|
---|
18 | * ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
19 | * (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
20 | * ç¨ã§ããªãå½¢ã§åé
|
---|
21 | å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
|
---|
22 | * ã¨ï¼
|
---|
23 | * (a) åé
|
---|
24 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨è
|
---|
25 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
|
---|
26 | * ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
27 | * (b) åé
|
---|
28 | å¸ã®å½¢æ
|
---|
29 | ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSããã¸ã§ã¯ãã«
|
---|
30 | * å ±åãããã¨ï¼
|
---|
31 | * (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
|
---|
32 | * 害ãããï¼ä¸è¨èä½æ¨©è
|
---|
33 | ããã³TOPPERSããã¸ã§ã¯ããå
|
---|
34 | 責ãããã¨ï¼
|
---|
35 | * ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
|
---|
36 | * ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
|
---|
37 | ããã³TOPPERSããã¸ã§ã¯ãã
|
---|
38 | * å
|
---|
39 | 責ãããã¨ï¼
|
---|
40 | *
|
---|
41 | * æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
|
---|
42 | ã
|
---|
43 | * ãã³TOPPERSããã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
|
---|
44 | * ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
|
---|
45 | * ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ害ã«é¢ãã¦ãï¼ã
|
---|
46 | * ã®è²¬ä»»ãè² ããªãï¼
|
---|
47 | *
|
---|
48 | * @(#) $Id$
|
---|
49 | */
|
---|
50 |
|
---|
51 | import_C( "t_stddef.h" );
|
---|
52 |
|
---|
53 | /* Constants of Kinds */
|
---|
54 | const int8_t TECSTypeKind_BoolType = 1;
|
---|
55 | const int8_t TECSTypeKind_IntType = 2;
|
---|
56 | const int8_t TECSTypeKind_FloatType = 3;
|
---|
57 | const int8_t TECSTypeKind_PtrType = 4;
|
---|
58 | const int8_t TECSTypeKind_ArrayType = 5;
|
---|
59 | const int8_t TECSTypeKind_DefinedType = 6;
|
---|
60 | const int8_t TECSTypeKind_StructType = 7;
|
---|
61 | const int8_t TECSTypeKind_EnumType = 8;
|
---|
62 | const int8_t TECSTypeKind_VoidType = 9;
|
---|
63 | const int8_t TECSTypeKind_DescriptorType = 10;
|
---|
64 |
|
---|
65 | /* Parameter Direction */
|
---|
66 | const int8_t PARAM_DIR_IN = 1;
|
---|
67 | const int8_t PARAM_DIR_OUT = 2;
|
---|
68 | const int8_t PARAM_DIR_INOUT = 3;
|
---|
69 | const int8_t PARAM_DIR_SEND = 4;
|
---|
70 | const int8_t PARAM_DIR_RECEIVE = 5;
|
---|
71 |
|
---|
72 | /* VarDecl declType */
|
---|
73 | const int8_t DECLTYPE_STMEMBER = 1; /* Struct Member */
|
---|
74 | const int8_t DECLTYPE_ATTR = 2;
|
---|
75 | const int8_t DECLTYPE_VAR = 3;
|
---|
76 |
|
---|
77 | /* VarDecl place info */
|
---|
78 | const int8_t VARDECL_PLACE_STRUCT = 1;
|
---|
79 | const int8_t VARDECL_PLACE_NON = 2;
|
---|
80 | const int8_t VARDECL_PLACE_CB = 3;
|
---|
81 | const int8_t VARDECL_PLACE_INIB = 4;
|
---|
82 |
|
---|
83 | /* CallInfo place info */
|
---|
84 | const int8_t CALL_PLACE_NON = 1;
|
---|
85 | const int8_t CALL_PLACE_INIB_DES = 2;
|
---|
86 | const int8_t CALL_PLACE_CB_DES = 3;
|
---|
87 | const int8_t CALL_PLACE_INIB_IDX = 4;
|
---|
88 | const int8_t CALL_PLACE_CB_IDX = 5;
|
---|
89 |
|
---|
90 | namespace nTECSInfo {
|
---|
91 |
|
---|
92 | /******* SIGNATURES *******/
|
---|
93 |
|
---|
94 | /* Type Information of attr, var, param, return */
|
---|
95 | signature sTypeInfo {
|
---|
96 | ER getName( [out,string(max_len)]char_t *name, [in]int_t max_len );
|
---|
97 | // é·ãã max_len ãè¶
|
---|
98 | ããå ´å㯠E_NOMEM ãè¿ã.
|
---|
99 | // (max_len-1) æåã³ãã¼ãããname[max_len-1] = NULL
|
---|
100 | uint16_t getNameLength(void);
|
---|
101 | // çµç«¯æå (NULL) ãå«ãé·ã (strlen ã¨ä»æ§ãç°ãªããã¨ã«æ³¨æ)
|
---|
102 | uint32_t getSize(void); // size of the value in bytes
|
---|
103 | int8_t getKind(void); // see Constants of Kinds
|
---|
104 | uint32_t getNType(void);
|
---|
105 | // kind == ARRAY ã®å ´åãµã¤ãºãPOINTER, TYPEDEF ã®å ´å1ããã以å¤ã¯0
|
---|
106 | ER getTypeInfo( [out]Descriptor(sTypeInfo) *desc );
|
---|
107 | // kind == POINTER, TYPEDEF ã®å ´åãdesc ã«æå¹ãªå¤ãè¿ã
|
---|
108 | uint32_t getNMember(void);
|
---|
109 | // STRUCT ã®å ´åã¡ã³ãã¼æ°
|
---|
110 | ER getMemberInfo( [in]uint32_t ith, [out]Descriptor(sVarDeclInfo) *desc );
|
---|
111 | // kind == STRUCT ã®å ´åãdesc ã«æå¹ãªå¤ãè¿ã
|
---|
112 | // ith ã¯ã¡ã³ãã¼ã®æ·»æ° 0<=ith<*num
|
---|
113 | // ith ãç¯å²å¤ã®å ´å E_NORES ãè¿ã
|
---|
114 | // void getSignatureInfo( [out]Descriptor(sSignatureInfo) *desc );
|
---|
115 | // // kind == DESCRIPTOR ã®å ´åãdesc ã«æå¹ãªå¤ãè¿ã
|
---|
116 | };
|
---|
117 |
|
---|
118 | /* ATTR, VAR, struct member Information */
|
---|
119 | signature sVarDeclInfo {
|
---|
120 | ER getName( [out,string(max_len)]char_t *name, [in]int_t max_len );
|
---|
121 | // é·ãã max_len ãè¶
|
---|
122 | ããå ´å㯠E_NOMEM ãè¿ã.
|
---|
123 | // (max_len-1) æåã³ãã¼ãããname[max_len-1] = NULL
|
---|
124 | uint16_t getNameLength(void);
|
---|
125 | // çµç«¯æå (NULL) ãå«ãé·ã (strlen ã¨ä»æ§ãç°ãªããã¨ã«æ³¨æ)
|
---|
126 | void getLocationInfo( [out]uint32_t *offset,
|
---|
127 | [out]int8_t *place ); // VARDECL_PLACE_*
|
---|
128 | void getTypeInfo( [out]Descriptor( sTypeInfo ) *desc );
|
---|
129 | void getSizeIsExpr( [out,string(max_len)]char_t *expr_str, [in]int32_t max_len );
|
---|
130 | // size_is è¨ç®å¼ãæååã§è¿ã. size_is æªæå®ã®å ´å *expr_str = NULL ãè¿ããã
|
---|
131 | ER getSizeIs( [out]uint32_t *size, [in]const void *p_cb);
|
---|
132 | // p_cb ãä¸ããã¨ãsize ãè¿ã (size_is æå®ããªãå ´åï¼E_NOSPT ãè¿ã)
|
---|
133 | };
|
---|
134 |
|
---|
135 | /* PARAM Information */
|
---|
136 | signature sParamInfo {
|
---|
137 | ER getName( [out,string(max_len)]char_t *name, [in]int_t max_len );
|
---|
138 | // é·ãã max_len ãè¶
|
---|
139 | ããå ´å㯠E_NOMEM ãè¿ã.
|
---|
140 | // (max_len-1) æåã³ãã¼ãããname[max_len-1] = NULL
|
---|
141 | uint16_t getNameLength(void);
|
---|
142 | // çµç«¯æå (NULL) ãå«ãé·ã (strlen ã¨ä»æ§ãç°ãªããã¨ã«æ³¨æ)
|
---|
143 | ER getTypeInfo( [out]Descriptor(sTypeInfo) *desc);
|
---|
144 | ER getDir( [out]int8_t *dir );
|
---|
145 | };
|
---|
146 |
|
---|
147 | /* FUNCTION Information */
|
---|
148 | signature sFunctionInfo {
|
---|
149 | ER getName( [out,string(max_len)]char_t *name, [in]int_t max_len );
|
---|
150 | // é·ãã max_len ãè¶
|
---|
151 | ããå ´å㯠E_NOMEM ãè¿ã.
|
---|
152 | // (max_len-1) æåã³ãã¼ãããname[max_len-1] = NULL
|
---|
153 | uint16_t getNameLength(void);
|
---|
154 | // çµç«¯æå (NULL) ãå«ãé·ã (strlen ã¨ä»æ§ãç°ãªããã¨ã«æ³¨æ)
|
---|
155 | void getReturnTypeInfo( [out]Descriptor( sTypeInfo ) *desc );
|
---|
156 | uint32_t getNParam(void);
|
---|
157 | ER getParamInfo( [in]uint32_t ith, [out]Descriptor(sParamInfo) *param );
|
---|
158 | // 0 <= ith < *num
|
---|
159 | // ith ãç¯å²å¤ã®å ´å E_NORES ãè¿ã
|
---|
160 | };
|
---|
161 |
|
---|
162 | /* SIGNATURE Information */
|
---|
163 | signature sSignatureInfo {
|
---|
164 | ER getName( [out,string(max_len)]char_t *name, [in]int_t max_len );
|
---|
165 | // é·ãã max_len ãè¶
|
---|
166 | ããå ´å㯠E_NOMEM ãè¿ã.
|
---|
167 | // (max_len-1) æåã³ãã¼ãããname[max_len-1] = NULL
|
---|
168 | uint16_t getNameLength(void);
|
---|
169 | // çµç«¯æå (NULL) ãå«ãé·ã (strlen ã¨ä»æ§ãç°ãªããã¨ã«æ³¨æ)
|
---|
170 | uint32_t getNFunction(void);
|
---|
171 | ER getFunctionInfo( [in]uint32_t ith, [out]Descriptor( sFunctionInfo ) *desc );
|
---|
172 | // 0 <= ith < *num
|
---|
173 | // ith ãç¯å²å¤ã®å ´å E_NORES ãè¿ã
|
---|
174 | };
|
---|
175 |
|
---|
176 | /* CALL Information */
|
---|
177 | signature sCallInfo {
|
---|
178 | ER getName( [out,string(max_len)]char_t *name, [in]int_t max_len );
|
---|
179 | // é·ãã max_len ãè¶
|
---|
180 | ããå ´å㯠E_NOMEM ãè¿ã.
|
---|
181 | // (max_len-1) æåã³ãã¼ãããname[max_len-1]= NULL
|
---|
182 | uint16_t getNameLength(void);
|
---|
183 | // çµç«¯æå (NULL) ãå«ãé·ã (strlen ã¨ä»æ§ãç°ãªããã¨ã«æ³¨æ)
|
---|
184 | void getSignatureInfo( [out]Descriptor( sSignatureInfo ) *desc );
|
---|
185 | uint32_t getArraySize(void);
|
---|
186 | void getSpecifierInfo( [out]bool_t *b_optional,
|
---|
187 | [out]bool_t *b_dynamic,
|
---|
188 | [out]bool_t *b_ref_desc,
|
---|
189 | [out]bool_t *b_omit );
|
---|
190 | void getInternalInfo( [out]bool_t *b_allocator_port,
|
---|
191 | [out]bool_t *b_require_port );
|
---|
192 | void getLocationInfo( [out]uint32_t *offset, // CALL_PLACE_*
|
---|
193 | [out]int8_t *place ); // CALL_PLACE_*
|
---|
194 | void getOptimizeInfo( [out]bool_t *b_VMT_useless, // VMT (é¢æ°ãã¼ãã«) ä¸è¦æé©å (é¢æ°ç´æ¥å¼åºã)
|
---|
195 | [out]bool_t *b_skelton_useless, // ã¹ã±ã«ãã³é¢æ°ä¸è¦ (
|
---|
196 | [out]bool_t *b_cell_unique ); // åä¸ã®ã»ã«
|
---|
197 | };
|
---|
198 |
|
---|
199 | /* ENTRY Information */
|
---|
200 | signature sEntryInfo {
|
---|
201 | ER getName( [out,string(max_len)]char_t *name, [in]int_t max_len );
|
---|
202 | // é·ãã max_len ãè¶
|
---|
203 | ããå ´å㯠E_NOMEM ãè¿ã.
|
---|
204 | // (max_len-1) æåã³ãã¼ãããname[max_len-1]=NULL
|
---|
205 | uint16_t getNameLength(void);
|
---|
206 | // çµç«¯æå (NULL) ãå«ãé·ã (strlen ã¨ä»æ§ãç°ãªããã¨ã«æ³¨æ)
|
---|
207 | void getSignatureInfo( [out]Descriptor( sSignatureInfo ) *desc );
|
---|
208 | uint32_t getArraySize(void);
|
---|
209 | bool_t isInline(void);
|
---|
210 | };
|
---|
211 |
|
---|
212 | /* CELLTYPE Information */
|
---|
213 | signature sCelltypeInfo {
|
---|
214 | ER getName( [out,string(max_len)]char_t *name, [in]int_t max_len );
|
---|
215 | // é·ãã max_len ãè¶
|
---|
216 | ããå ´å㯠E_NOMEM ãè¿ã.
|
---|
217 | // (max_len-1) æåã³ãã¼ãããname[max_len-1]=NULL
|
---|
218 | uint16_t getNameLength(void);
|
---|
219 | // çµç«¯æå (NULL) ãå«ãé·ã (strlen ã¨ä»æ§ãç°ãªããã¨ã«æ³¨æ)
|
---|
220 | uint32_t getNAttr(void);
|
---|
221 | ER getAttrInfo( [in]uint32_t ith, [out]Descriptor(sVarDeclInfo)*desc );
|
---|
222 | uint32_t getNVar(void);
|
---|
223 | ER getVarInfo( [in]uint32_t ith, [out]Descriptor(sVarDeclInfo)*desc );
|
---|
224 | // ith ãç¯å²å¤ã®å ´å E_NORES ãè¿ã
|
---|
225 | uint32_t getNCall(void);
|
---|
226 | ER getCallInfo( [in]uint32_t ith, [out]Descriptor(sCallInfo)*desc );
|
---|
227 | // ith ãç¯å²å¤ã®å ´å E_NORES ãè¿ã
|
---|
228 | uint32_t getNEntry(void);
|
---|
229 | ER getEntryInfo( [in]uint32_t ith, [out]Descriptor(sEntryInfo)*desc );
|
---|
230 | // ith ãç¯å²å¤ã®å ´å E_NORES ãè¿ã
|
---|
231 | bool_t isSingleton(void);
|
---|
232 | bool_t isIDX_is_ID(void);
|
---|
233 | uint32_t sizeOfCB(void);
|
---|
234 | uint32_t sizeOfINIB(void);
|
---|
235 | };
|
---|
236 |
|
---|
237 | /* CELL Information */
|
---|
238 | [deviate]
|
---|
239 | signature sCellInfo {
|
---|
240 | ER getName( [out,string(max_len)]char_t *name, [in]int_t max_len );
|
---|
241 | // é·ãã max_len ãè¶
|
---|
242 | ããå ´å㯠E_NOMEM ãè¿ã.
|
---|
243 | // (max_len-1) æåã³ãã¼ãããname[max_len-1]=NULL
|
---|
244 | uint16_t getNameLength(void);
|
---|
245 | // çµç«¯æå (NULL) ãå«ãé·ã (strlen ã¨ä»æ§ãç°ãªããã¨ã«æ³¨æ)
|
---|
246 | uint32_t getNRawEntryDescriptorInfo( void );
|
---|
247 | ER getRawEntryDescriptorInfo( [in]int_t index, [out]Descriptor(sRawEntryDescriptorInfo) *desc );
|
---|
248 | // index ã¯ãåãå£ãæå® (CelltypeInfo ã® cEntryInfo ã®åºæ°ã«ä¸è´ãã)
|
---|
249 | void getCelltypeInfo( [out]Descriptor( sCelltypeInfo ) *desc );
|
---|
250 | void getCBP( [out]void **cbp ); // out: é¸è±
|
---|
251 | void getINIBP( [out]void **inibp ); // out: é¸è±
|
---|
252 | };
|
---|
253 |
|
---|
254 | [deviate]
|
---|
255 | signature sRawEntryDescriptorInfo {
|
---|
256 | uint16_t getNRawEntryDescriptorInfo( void ); // åãå£é
|
---|
257 | åã®å ´åãè¦ç´ æ°ãè¿ããéé
|
---|
258 | åã®å ´å 1ã
|
---|
259 | ER getRawDescriptor( [in]int_t ith, [out]void **rawDesc );
|
---|
260 | // ith ãé
|
---|
261 | åç¯å²å¤ã®å ´åãE_NOEXS ãè¿ã
|
---|
262 | };
|
---|
263 |
|
---|
264 | /* NAMESPACE Information */
|
---|
265 | signature sNamespaceInfo {
|
---|
266 | ER getName( [out,string(max_len)]char_t *name, [in]int_t max_len );
|
---|
267 | // é·ãã max_len ãè¶
|
---|
268 | ããå ´å㯠E_NOMEM ãè¿ã.
|
---|
269 | // (max_len-1) æåã³ãã¼ãããname[max_len-1]=NULL
|
---|
270 | uint16_t getNameLength(void);
|
---|
271 | // çµç«¯æå (NULL) ãå«ãé·ã (strlen ã¨ä»æ§ãç°ãªããã¨ã«æ³¨æ)
|
---|
272 | uint32_t getNNamespace(void);
|
---|
273 | ER getNamespaceInfo( [in]uint32_t ith, [out]Descriptor(sNamespaceInfo) *des );
|
---|
274 | // ith ãç¯å²å¤ã®å ´å E_NORES ãè¿ã
|
---|
275 | uint32_t getNSignature(void);
|
---|
276 | ER getSignatureInfo( [in]uint32_t ith, [out]Descriptor(sSignatureInfo) *des );
|
---|
277 | // ith ãç¯å²å¤ã®å ´å E_NORES ãè¿ã
|
---|
278 | uint32_t getNCelltype(void);
|
---|
279 | ER getCelltypeInfo( [in]uint32_t ith, [out]Descriptor(sCelltypeInfo) *des );
|
---|
280 | // ith ãç¯å²å¤ã®å ´å E_NORES ãè¿ã
|
---|
281 | };
|
---|
282 |
|
---|
283 | /* REGION Information */
|
---|
284 | signature sRegionInfo {
|
---|
285 | ER getName( [out,string(max_len)]char_t *name, [in]int_t max_len );
|
---|
286 | // é·ãã max_len ãè¶
|
---|
287 | ããå ´å㯠E_NOMEM ãè¿ã.
|
---|
288 | // (max_len-1) æåã³ãã¼ãããname[max_len-1]=NULL
|
---|
289 | uint16_t getNameLength(void);
|
---|
290 | // çµç«¯æå (NULL) ãå«ãé·ã (strlen ã¨ä»æ§ãç°ãªããã¨ã«æ³¨æ)
|
---|
291 | uint32_t getNCell(void);
|
---|
292 | ER getCellInfo( [in]uint32_t ith, [out]Descriptor(sCellInfo) *des );
|
---|
293 | // ith ãç¯å²å¤ã®å ´å E_NORES ãè¿ã
|
---|
294 | uint32_t getNRegion(void);
|
---|
295 | ER getRegionInfo( [in]uint32_t ith, [out]Descriptor(sRegionInfo) *des );
|
---|
296 | // ith ãç¯å²å¤ã®å ´å E_NORES ãè¿ã
|
---|
297 | };
|
---|
298 |
|
---|
299 | /* TECS Information */
|
---|
300 | signature sTECSInfo {
|
---|
301 | ER findNamespace([in,string]const char_t *namespace_path, [out]Descriptor( sNamespaceInfo )*nsDesc);
|
---|
302 | ER findRegion( [in,string]const char_t *namespace_path, [out]Descriptor( sRegionInfo )*regionDesc);
|
---|
303 | ER findSignature([in,string]const char_t *namespace_path, [out]Descriptor( sSignatureInfo )*signatureDesc);
|
---|
304 | ER findCelltype( [in,string]const char_t *namespace_path, [out]Descriptor( sCelltypeInfo )*celltypeDesc);
|
---|
305 | ER findCell( [in,string]const char_t *namespace_path, [out]Descriptor( sCellInfo )*cellDesc);
|
---|
306 | ER findRawEntryDescriptor(
|
---|
307 | [in,string]const char_t *namespace_path,
|
---|
308 | [in] int_t ith,
|
---|
309 | [out]Descriptor( sRawEntryDescriptorInfo )*rawEntryDescDesc,
|
---|
310 | [out]Descriptor( sEntryInfo )*entryDesc);
|
---|
311 | ER findRawEntryDescriptor_unsafe( // ãã®ã¡ã½ããã¯ãéé
|
---|
312 | åã®å ´åã®ã¿ãããã§ãã
|
---|
313 | [in,string]const char_t *namespace_path,
|
---|
314 | [out]void **rawDesc );
|
---|
315 | };
|
---|
316 |
|
---|
317 | /******* CELLTYPES *******/
|
---|
318 |
|
---|
319 | /*
|
---|
320 | * tTECSInfo ã»ã«ã¿ã¤ãã®ã»ã«ã¯ãã¦ã¼ã¶ã¼ãè¨ç½®ããï¼
|
---|
321 | *
|
---|
322 | * ãã®ã»ã«ãããtTECSInfoSub ã¸ã®çµåã¯ããã©ã°ã¤ã³ã«ããèªåçã«
|
---|
323 | * è¡ããããããã¦ã¼ã¶ã¼ã¯ããã®ã»ã«ãè¨ç½®ããã ãã§ããï¼
|
---|
324 | * (ãããã¿ã¤ããç¨ãã¦ããªãã®ã¯ããã®ã»ã«ãä»»æã®ãªã¼ã¸ã§ã³ã«ç½®
|
---|
325 | * ããã¨ãæ³å®ãã¦ã®ãã®)
|
---|
326 | */
|
---|
327 | [singleton,
|
---|
328 | generate( TECSInfoPlugin, "" )]
|
---|
329 | celltype tTECSInfo {
|
---|
330 | [inline]
|
---|
331 | entry sTECSInfo eTECSInfo;
|
---|
332 | call sTECSInfo cTECSInfo;
|
---|
333 | FACTORY{
|
---|
334 | write( "global_tecsgen.h", "#define setRawEntryDescriptor( callDesc, callPortSignature, rawEntryDesc ) (callDesc).vdes = (struct tag_ ## callPortSignature ## _VDES *) rawEntryDesc" );
|
---|
335 | };
|
---|
336 | };
|
---|
337 |
|
---|
338 | /*
|
---|
339 | * tTECSInfoSub ã»ã«ã¿ã¤ãã®ã»ã«ã¯ããã©ã°ã¤ã³ã«ããèªåçæãããï¼
|
---|
340 | * ãã©ã°ã¤ã³ã¯ãçæãè¡ãåã«ã¨ã©ã¼ãçºçãã¦ããå ´åãã»ã«ãçæããªãï¼
|
---|
341 | * (TECSInfoSub ã»ã«ãæªå®ç¾©ã®ã¨ã©ã¼ãåºããã¨ã«ãªããä¸å®å
|
---|
342 | ¨ãªç¶æ
|
---|
343 |
|
---|
344 | * ã§çæãããã¨ããã¨ãRuby ä¾å¤ãçºçããå¯è½æ§ããããããçæ
|
---|
345 | * ããªã)
|
---|
346 | */
|
---|
347 | [singleton]
|
---|
348 | celltype tTECSInfoSub {
|
---|
349 | entry sTECSInfo eTECSInfo;
|
---|
350 | [ref_desc]
|
---|
351 | call sNamespaceInfo cNamespaceInfo; // root namespace
|
---|
352 | [ref_desc]
|
---|
353 | call sRegionInfo cRegionInfo; // root region
|
---|
354 | // å
|
---|
355 | é¨å¦çç¨ã®å¼ã³å£ (ä½åº¦ã使ãã¾ããã®ã§ã使ãç´åã«(å)è¨å®ãããã¨ï¼
|
---|
356 | [dynamic,optional]
|
---|
357 | call sNamespaceInfo cNamespaceInfoTemp;
|
---|
358 | [dynamic,optional]
|
---|
359 | call sRegionInfo cRegionInfoTemp;
|
---|
360 | [dynamic,optional]
|
---|
361 | call sSignatureInfo cSignatureInfoTemp;
|
---|
362 | [dynamic,optional]
|
---|
363 | call sCelltypeInfo cCelltypeInfoTemp;
|
---|
364 | [dynamic,optional]
|
---|
365 | call sCellInfo cCellInfoTemp;
|
---|
366 | [dynamic,optional]
|
---|
367 | call sEntryInfo cEntryInfoTemp;
|
---|
368 | [dynamic,optional]
|
---|
369 | call sRawEntryDescriptorInfo cRawEntryDescriptorInfoTemp;
|
---|
370 |
|
---|
371 | attr {
|
---|
372 | int32_t name_len = 256;
|
---|
373 | int32_t path_len = 1024;
|
---|
374 | };
|
---|
375 | var {
|
---|
376 | [size_is(name_len)]
|
---|
377 | char_t *name1;
|
---|
378 | [size_is(name_len)]
|
---|
379 | char_t *name2;
|
---|
380 | [size_is(path_len)]
|
---|
381 | char_t *path;
|
---|
382 | };
|
---|
383 | };
|
---|
384 |
|
---|
385 | celltype tNamespaceInfo {
|
---|
386 | attr {
|
---|
387 | char *name;
|
---|
388 | };
|
---|
389 |
|
---|
390 | entry sNamespaceInfo eNamespaceInfo;
|
---|
391 | [ref_desc,optional]
|
---|
392 | call sSignatureInfo cSignatureInfo[];
|
---|
393 | [ref_desc,optional]
|
---|
394 | call sCelltypeInfo cCelltypeInfo[];
|
---|
395 | [ref_desc,optional]
|
---|
396 | call sNamespaceInfo cNamespaceInfo[];
|
---|
397 | };
|
---|
398 |
|
---|
399 | /* SIGNATURE information */
|
---|
400 | celltype tSignatureInfo{
|
---|
401 | attr {
|
---|
402 | char *name;
|
---|
403 | };
|
---|
404 |
|
---|
405 | entry sSignatureInfo eSignatureInfo;
|
---|
406 | [ref_desc,optional]
|
---|
407 | call sFunctionInfo cFunctionInfo[];
|
---|
408 | };
|
---|
409 | celltype tFunctionInfo {
|
---|
410 | attr {
|
---|
411 | char_t *name;
|
---|
412 | bool_t bOneway;
|
---|
413 | };
|
---|
414 | entry sFunctionInfo eFunctionInfo;
|
---|
415 | [ref_desc,optional]
|
---|
416 | call sParamInfo cParamInfo[];
|
---|
417 | [ref_desc]
|
---|
418 | call sTypeInfo cReturnTypeInfo;
|
---|
419 | };
|
---|
420 | celltype tParamInfo {
|
---|
421 | attr {
|
---|
422 | char_t *name;
|
---|
423 | int8_t dir;
|
---|
424 | char_t *sizeIsExpr;
|
---|
425 | char_t *countIsExpr;
|
---|
426 | char_t *stringExpr;
|
---|
427 | };
|
---|
428 | entry sParamInfo eParamInfo;
|
---|
429 | [ref_desc]
|
---|
430 | call sTypeInfo cTypeInfo;
|
---|
431 | };
|
---|
432 |
|
---|
433 | /* CELLTYPE information */
|
---|
434 | celltype tCelltypeInfo{
|
---|
435 | attr {
|
---|
436 | char_t *name;
|
---|
437 | bool_t b_singleton;
|
---|
438 | bool_t b_IDX_is_ID_act;
|
---|
439 | uint32_t sizeOfCB; // size in bytes, 0 if not exist
|
---|
440 | uint32_t sizeOfINIB; // size in bytes, 0 if not exist
|
---|
441 | uint32_t n_cellInLinkUnit; // CellInLinkUnit == 0 ã®æ ã»ã«ã¿ã¤ãã³ã¼ãã¯ããªã³ã¯ããã¦ããªã
|
---|
442 | uint32_t n_cellInSystem; // ãã¹ã¦ã®ãªã³ã¯ã¦ããããå«ããã»ã«ã®åæ°ï¼
|
---|
443 | // ãã®æ°ã 0ã«ãªããã®ã¯ãCelltypeInfo ã¯çç¥ãããï¼
|
---|
444 | };
|
---|
445 | [ref_desc,optional]
|
---|
446 | call sEntryInfo cEntryInfo[];
|
---|
447 | [ref_desc,optional]
|
---|
448 | call sCallInfo cCallInfo[];
|
---|
449 | [ref_desc,optional]
|
---|
450 | call sVarDeclInfo cAttrInfo[];
|
---|
451 | [ref_desc,optional]
|
---|
452 | call sVarDeclInfo cVarInfo[];
|
---|
453 |
|
---|
454 | entry sCelltypeInfo eCelltypeInfo;
|
---|
455 | };
|
---|
456 | celltype tCallInfo {
|
---|
457 | attr {
|
---|
458 | char_t *name;
|
---|
459 | uint32_t offset;
|
---|
460 | uint32_t array_size;
|
---|
461 | bool_t b_optional;
|
---|
462 | bool_t b_omit;
|
---|
463 | bool_t b_dynamic;
|
---|
464 | bool_t b_ref_desc;
|
---|
465 | bool_t b_allocator_port;
|
---|
466 | bool_t b_require_port;
|
---|
467 | int8_t place;
|
---|
468 | bool_t b_VMT_useless; // VMT (é¢æ°ãã¼ãã«) ä¸è¦æé©å (é¢æ°ç´æ¥å¼åºã)
|
---|
469 | bool_t b_skelton_useless; // ã¹ã±ã«ãã³é¢æ°ä¸è¦ (
|
---|
470 | bool_t b_cell_unique; // åä¸ã®ã»ã«
|
---|
471 | };
|
---|
472 | entry sCallInfo eCallInfo;
|
---|
473 | [ref_desc]
|
---|
474 | call sSignatureInfo cSignatureInfo;
|
---|
475 | FACTORY {
|
---|
476 | write( "$ct_global$_factory.h", "#include \"include_all_signature_header.h\"" );
|
---|
477 | };
|
---|
478 | };
|
---|
479 | celltype tEntryInfo {
|
---|
480 | attr {
|
---|
481 | char_t *name;
|
---|
482 | bool_t b_inline;
|
---|
483 | uint32_t array_size;
|
---|
484 | };
|
---|
485 | entry sEntryInfo eEntryInfo;
|
---|
486 | [ref_desc]
|
---|
487 | call sSignatureInfo cSignatureInfo;
|
---|
488 | FACTORY {
|
---|
489 | write( "$ct_global$_factory.h", "#include \"include_all_signature_header.h\"" );
|
---|
490 | };
|
---|
491 | };
|
---|
492 | /* Variable Declarator (attr, var, struct member) */
|
---|
493 | celltype tVarDeclInfo {
|
---|
494 | attr {
|
---|
495 | char_t *name;
|
---|
496 | char_t *sizeIsExpr;
|
---|
497 | int8_t declType; /* valid when attr, var */
|
---|
498 | int8_t place;
|
---|
499 | uint32_t offset;
|
---|
500 | };
|
---|
501 | entry sVarDeclInfo eVarDeclInfo;
|
---|
502 | [ref_desc]
|
---|
503 | call sTypeInfo cTypeInfo;
|
---|
504 | };
|
---|
505 |
|
---|
506 | /* REGION & CELL information */
|
---|
507 | celltype tRegionInfo {
|
---|
508 | attr {
|
---|
509 | char *name;
|
---|
510 | };
|
---|
511 |
|
---|
512 | entry sRegionInfo eRegionInfo;
|
---|
513 | [ref_desc,optional]
|
---|
514 | call sCellInfo cCellInfo[];
|
---|
515 | [ref_desc,optional]
|
---|
516 | call sRegionInfo cRegionInfo[];
|
---|
517 | };
|
---|
518 | celltype tCellInfo {
|
---|
519 | attr {
|
---|
520 | char_t *name;
|
---|
521 | void *cbp;
|
---|
522 | void *inibp;
|
---|
523 | };
|
---|
524 | [ref_desc]
|
---|
525 | call sCelltypeInfo cCelltypeInfo;
|
---|
526 | [ref_desc,optional]
|
---|
527 | call sRawEntryDescriptorInfo cRawEntryDescriptor[];
|
---|
528 | entry sCellInfo eCellInfo;
|
---|
529 | };
|
---|
530 | celltype tRawEntryDescriptorInfo {
|
---|
531 | attr {
|
---|
532 | int_t size; // éé
|
---|
533 | åã®å ´å 0
|
---|
534 | [size_is(size)]
|
---|
535 | void **rawEntryDescriptor;
|
---|
536 | };
|
---|
537 | entry sRawEntryDescriptorInfo eRawEntryDescriptor;
|
---|
538 | // [ref_desc]
|
---|
539 | // call sEntryInfo cEntryInfo;
|
---|
540 | };
|
---|
541 |
|
---|
542 | /* celltypes of TYPEs */
|
---|
543 | celltype tVoidTypeInfo {
|
---|
544 | attr {
|
---|
545 | char_t *name;
|
---|
546 | int8_t typeKind;
|
---|
547 | uint32_t size; /* bytes */
|
---|
548 | bool_t b_const;
|
---|
549 | bool_t b_volatile;
|
---|
550 | };
|
---|
551 | entry sTypeInfo eTypeInfo;
|
---|
552 | };
|
---|
553 | celltype tBoolTypeInfo {
|
---|
554 | attr {
|
---|
555 | char_t *name;
|
---|
556 | int8_t typeKind;
|
---|
557 | uint32_t size; /* bytes */
|
---|
558 | bool_t b_const;
|
---|
559 | bool_t b_volatile;
|
---|
560 | };
|
---|
561 | entry sTypeInfo eTypeInfo;
|
---|
562 | };
|
---|
563 | celltype tIntTypeInfo {
|
---|
564 | attr {
|
---|
565 | char_t *name;
|
---|
566 | int8_t typeKind;
|
---|
567 | uint32_t size; /* bytes */
|
---|
568 | bool_t b_const;
|
---|
569 | bool_t b_volatile;
|
---|
570 | };
|
---|
571 | entry sTypeInfo eTypeInfo;
|
---|
572 | };
|
---|
573 | celltype tFloatTypeInfo {
|
---|
574 | attr {
|
---|
575 | char_t *name;
|
---|
576 | int8_t typeKind;
|
---|
577 | uint32_t size; /* bytes */
|
---|
578 | bool_t b_const;
|
---|
579 | bool_t b_volatile;
|
---|
580 | };
|
---|
581 | entry sTypeInfo eTypeInfo;
|
---|
582 | };
|
---|
583 | celltype tStructTypeInfo {
|
---|
584 | attr {
|
---|
585 | char_t *name;
|
---|
586 | int8_t typeKind;
|
---|
587 | uint32_t size; /* bytes */
|
---|
588 | bool_t b_const;
|
---|
589 | bool_t b_volatile;
|
---|
590 | };
|
---|
591 | entry sTypeInfo eTypeInfo;
|
---|
592 | [ref_desc]
|
---|
593 | call sVarDeclInfo cVarDeclInfo[];
|
---|
594 | };
|
---|
595 | celltype tPtrTypeInfo {
|
---|
596 | attr {
|
---|
597 | char_t *name;
|
---|
598 | int8_t typeKind;
|
---|
599 | uint32_t size; /* bytes */
|
---|
600 | bool_t b_const;
|
---|
601 | bool_t b_volatile;
|
---|
602 | };
|
---|
603 | entry sTypeInfo eTypeInfo;
|
---|
604 | [ref_desc]
|
---|
605 | call sTypeInfo cTypeInfo;
|
---|
606 | FACTORY {
|
---|
607 | write( "$ct_global$_factory.h", "#include \"include_all_signature_header.h\"" );
|
---|
608 | };
|
---|
609 | };
|
---|
610 | celltype tArrayTypeInfo {
|
---|
611 | attr {
|
---|
612 | char_t *name;
|
---|
613 | int8_t typeKind;
|
---|
614 | uint32_t size; /* bytes */
|
---|
615 | bool_t b_const;
|
---|
616 | bool_t b_volatile;
|
---|
617 | };
|
---|
618 | entry sTypeInfo eTypeInfo;
|
---|
619 | [ref_desc]
|
---|
620 | call sTypeInfo cTypeInfo;
|
---|
621 | FACTORY {
|
---|
622 | write( "$ct_global$_factory.h", "#include \"include_all_signature_header.h\"" );
|
---|
623 | };
|
---|
624 | };
|
---|
625 | celltype tDefinedTypeInfo {
|
---|
626 | attr {
|
---|
627 | char_t *name;
|
---|
628 | int8_t typeKind;
|
---|
629 | uint32_t size; /* bytes */
|
---|
630 | bool_t b_const;
|
---|
631 | bool_t b_volatile;
|
---|
632 | };
|
---|
633 | entry sTypeInfo eTypeInfo;
|
---|
634 | [ref_desc]
|
---|
635 | call sTypeInfo cTypeInfo;
|
---|
636 | };
|
---|
637 | celltype tDescriptorTypeInfo {
|
---|
638 | attr {
|
---|
639 | char_t *name;
|
---|
640 | int8_t typeKind;
|
---|
641 | uint32_t size; /* bytes */
|
---|
642 | bool_t b_const;
|
---|
643 | bool_t b_volatile;
|
---|
644 | };
|
---|
645 | entry sTypeInfo eTypeInfo;
|
---|
646 | [ref_desc]
|
---|
647 | call sSignatureInfo cSignatureInfo;
|
---|
648 | FACTORY {
|
---|
649 | write( "$ct_global$_factory.h", "#include \"include_all_signature_header.h\"" );
|
---|
650 | };
|
---|
651 | };
|
---|
652 | };
|
---|