compiler/bootstrap: Fully automated (make updatebootstrap)
[sdk] / compiler / bootstrap / ecere / bootstrap / memory.c
1 /* Code generated from eC source file: memory.ec */
2 #if defined(_WIN32)
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
6 #else
7 #define __runtimePlatform 2
8 #endif
9 #if defined(__GNUC__)
10 typedef long long int64;
11 typedef unsigned long long uint64;
12 #ifndef _WIN32
13 #define __declspec(x)
14 #endif
15 #elif defined(__TINYC__)
16 #include <stdarg.h>
17 #define __builtin_va_list va_list
18 #define __builtin_va_start va_start
19 #define __builtin_va_end va_end
20 #ifdef _WIN32
21 #define strcasecmp stricmp
22 #define strncasecmp strnicmp
23 #define __declspec(x) __attribute__((x))
24 #else
25 #define __declspec(x)
26 #endif
27 typedef long long int64;
28 typedef unsigned long long uint64;
29 #else
30 typedef __int64 int64;
31 typedef unsigned __int64 uint64;
32 #endif
33 #ifdef __BIG_ENDIAN__
34 #define __ENDIAN_PAD(x) (8 - (x))
35 #else
36 #define __ENDIAN_PAD(x) 0
37 #endif
38 #if defined(_WIN32)
39 #   if defined(__GNUC__) || defined(__TINYC__)
40 #      define stdcall __attribute__((__stdcall__))
41 #   else
42 #      define stdcall __stdcall
43 #   endif
44 #else
45 #   define stdcall
46 #endif
47 #include <stdint.h>
48 #include <sys/types.h>
49 void __ecereNameSpace__ecere__sys__FillBytesBy2(void * area, unsigned short value, unsigned int count)
50 {
51 unsigned short * dest = area;
52 int c;
53
54 for(c = 0; c < count; c++)
55 dest[c] = value;
56 }
57
58 void __ecereNameSpace__ecere__sys__FillBytesBy4(void * area, unsigned int value, unsigned int count)
59 {
60 unsigned int * dest = area;
61 int c;
62
63 for(c = 0; c < count; c++)
64 dest[c] = value;
65 }
66
67 struct __ecereNameSpace__ecere__sys__OldList
68 {
69 void *  first;
70 void *  last;
71 int count;
72 unsigned int offset;
73 unsigned int circ;
74 } __attribute__ ((gcc_struct));
75
76 struct __ecereNameSpace__ecere__sys__BTNode;
77
78 struct __ecereNameSpace__ecere__com__DataValue
79 {
80 union
81 {
82 char c;
83 unsigned char uc;
84 short s;
85 unsigned short us;
86 int i;
87 unsigned int ui;
88 void *  p;
89 float f;
90 double d;
91 long long i64;
92 uint64 ui64;
93 } __attribute__ ((gcc_struct)) __anon1;
94 } __attribute__ ((gcc_struct));
95
96 struct __ecereNameSpace__ecere__com__SerialBuffer
97 {
98 unsigned char *  _buffer;
99 unsigned int count;
100 unsigned int _size;
101 unsigned int pos;
102 } __attribute__ ((gcc_struct));
103
104 extern void *  __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
105
106 extern void *  __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
107
108 extern void *  __ecereNameSpace__ecere__com__eSystem_Renew(void *  memory, unsigned int size);
109
110 extern void *  __ecereNameSpace__ecere__com__eSystem_Renew0(void *  memory, unsigned int size);
111
112 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void *  memory);
113
114 extern void *  memmove(void * , const void * , size_t size);
115
116 extern void *  memcpy(void * , const void * , size_t size);
117
118 extern void *  memset(void *  area, int value, size_t count);
119
120 struct __ecereNameSpace__ecere__com__GlobalFunction;
121
122 void __ecereNameSpace__ecere__sys__MoveBytes(void * dest, const void * source, unsigned int count)
123 {
124 memmove(dest, source, count);
125 }
126
127 void __ecereNameSpace__ecere__sys__CopyBytes(void * dest, const void * source, unsigned int count)
128 {
129 memcpy(dest, source, count);
130 }
131
132 void __ecereNameSpace__ecere__sys__CopyBytesBy2(void * dest, const void * source, unsigned int count)
133 {
134 memcpy(dest, source, count << 1);
135 }
136
137 void __ecereNameSpace__ecere__sys__CopyBytesBy4(void * dest, const void * source, unsigned int count)
138 {
139 memcpy(dest, source, count << 2);
140 }
141
142 void __ecereNameSpace__ecere__sys__FillBytes(void * area, unsigned char value, unsigned int count)
143 {
144 memset(area, value, count);
145 }
146
147 struct __ecereNameSpace__ecere__com__Class;
148
149 struct __ecereNameSpace__ecere__com__Instance
150 {
151 void * *  _vTbl;
152 struct __ecereNameSpace__ecere__com__Class * _class;
153 int _refCount;
154 } __attribute__ ((gcc_struct));
155
156 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name);
157
158 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, long long value);
159
160 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char *  name, void *  function);
161
162 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
163
164 struct __ecereNameSpace__ecere__com__Property;
165
166 struct __ecereNameSpace__ecere__com__Property
167 {
168 struct __ecereNameSpace__ecere__com__Property * prev;
169 struct __ecereNameSpace__ecere__com__Property * next;
170 const char *  name;
171 unsigned int isProperty;
172 int memberAccess;
173 int id;
174 struct __ecereNameSpace__ecere__com__Class * _class;
175 const char *  dataTypeString;
176 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
177 struct __ecereNameSpace__ecere__com__Instance * dataType;
178 void (*  Set)(void * , int);
179 int (*  Get)(void * );
180 unsigned int (*  IsSet)(void * );
181 void *  data;
182 void *  symbol;
183 int vid;
184 unsigned int conversion;
185 unsigned int watcherOffset;
186 const char *  category;
187 unsigned int compiled;
188 unsigned int selfWatchable;
189 unsigned int isWatchable;
190 } __attribute__ ((gcc_struct));
191
192 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
193
194 extern void __ecereNameSpace__ecere__com__eInstance_StopWatching(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, struct __ecereNameSpace__ecere__com__Instance * object);
195
196 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void *  instance, struct __ecereNameSpace__ecere__com__Property * _property, void *  object, void (*  callback)(void * , void * ));
197
198 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
199
200 struct __ecereNameSpace__ecere__sys__BinaryTree;
201
202 struct __ecereNameSpace__ecere__sys__BinaryTree
203 {
204 struct __ecereNameSpace__ecere__sys__BTNode * root;
205 int count;
206 int (*  CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
207 void (*  FreeKey)(void *  key);
208 } __attribute__ ((gcc_struct));
209
210 struct __ecereNameSpace__ecere__com__Method;
211
212 struct __ecereNameSpace__ecere__com__Method
213 {
214 const char *  name;
215 struct __ecereNameSpace__ecere__com__Method * parent;
216 struct __ecereNameSpace__ecere__com__Method * left;
217 struct __ecereNameSpace__ecere__com__Method * right;
218 int depth;
219 int (*  function)();
220 int vid;
221 int type;
222 struct __ecereNameSpace__ecere__com__Class * _class;
223 void *  symbol;
224 const char *  dataTypeString;
225 struct __ecereNameSpace__ecere__com__Instance * dataType;
226 int memberAccess;
227 } __attribute__ ((gcc_struct));
228
229 struct __ecereNameSpace__ecere__com__Module;
230
231 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(const char *  name, const char *  type, void *  func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
232
233 struct __ecereNameSpace__ecere__com__NameSpace;
234
235 struct __ecereNameSpace__ecere__com__NameSpace
236 {
237 const char *  name;
238 struct __ecereNameSpace__ecere__com__NameSpace *  btParent;
239 struct __ecereNameSpace__ecere__com__NameSpace *  left;
240 struct __ecereNameSpace__ecere__com__NameSpace *  right;
241 int depth;
242 struct __ecereNameSpace__ecere__com__NameSpace *  parent;
243 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
244 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
245 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
246 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
247 } __attribute__ ((gcc_struct));
248
249 struct __ecereNameSpace__ecere__com__Application
250 {
251 int argc;
252 const char * *  argv;
253 int exitCode;
254 unsigned int isGUIApp;
255 struct __ecereNameSpace__ecere__sys__OldList allModules;
256 char *  parsedCommand;
257 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
258 } __attribute__ ((gcc_struct));
259
260 struct __ecereNameSpace__ecere__com__Module
261 {
262 struct __ecereNameSpace__ecere__com__Instance * application;
263 struct __ecereNameSpace__ecere__sys__OldList classes;
264 struct __ecereNameSpace__ecere__sys__OldList defines;
265 struct __ecereNameSpace__ecere__sys__OldList functions;
266 struct __ecereNameSpace__ecere__sys__OldList modules;
267 struct __ecereNameSpace__ecere__com__Instance * prev;
268 struct __ecereNameSpace__ecere__com__Instance * next;
269 const char *  name;
270 void *  library;
271 void *  Unload;
272 int importType;
273 int origImportType;
274 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
275 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
276 } __attribute__ ((gcc_struct));
277
278 void __ecereRegisterModule_memory(struct __ecereNameSpace__ecere__com__Instance * module)
279 {
280 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
281
282 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::MoveBytes", "void ecere::sys::MoveBytes(void * dest, const void * source, uint count)", __ecereNameSpace__ecere__sys__MoveBytes, module, 1);
283 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::CopyBytes", "void ecere::sys::CopyBytes(void * dest, const void * source, uint count)", __ecereNameSpace__ecere__sys__CopyBytes, module, 1);
284 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::CopyBytesBy2", "void ecere::sys::CopyBytesBy2(void * dest, const void * source, uint count)", __ecereNameSpace__ecere__sys__CopyBytesBy2, module, 1);
285 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::CopyBytesBy4", "void ecere::sys::CopyBytesBy4(void * dest, const void * source, uint count)", __ecereNameSpace__ecere__sys__CopyBytesBy4, module, 1);
286 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::FillBytes", "void ecere::sys::FillBytes(void * area, byte value, uint count)", __ecereNameSpace__ecere__sys__FillBytes, module, 1);
287 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::FillBytesBy2", "void ecere::sys::FillBytesBy2(void * area, uint16 value, uint count)", __ecereNameSpace__ecere__sys__FillBytesBy2, module, 1);
288 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::FillBytesBy4", "void ecere::sys::FillBytesBy4(void * area, uint value, uint count)", __ecereNameSpace__ecere__sys__FillBytesBy4, module, 1);
289 }
290
291 void __ecereUnregisterModule_memory(struct __ecereNameSpace__ecere__com__Instance * module)
292 {
293
294 }
295
296 struct __ecereNameSpace__ecere__com__DataMember;
297
298 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
299 {
300 union
301 {
302 struct
303 {
304 const char *  dataTypeString;
305 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
306 } __attribute__ ((gcc_struct)) __anon1;
307 struct __ecereNameSpace__ecere__com__DataValue expression;
308 struct
309 {
310 const char *  memberString;
311 union
312 {
313 struct __ecereNameSpace__ecere__com__DataMember * member;
314 struct __ecereNameSpace__ecere__com__Property * prop;
315 struct __ecereNameSpace__ecere__com__Method * method;
316 } __attribute__ ((gcc_struct)) __anon1;
317 } __attribute__ ((gcc_struct)) __anon2;
318 } __attribute__ ((gcc_struct)) __anon1;
319 } __attribute__ ((gcc_struct));
320
321 struct __ecereNameSpace__ecere__com__DataMember
322 {
323 struct __ecereNameSpace__ecere__com__DataMember * prev;
324 struct __ecereNameSpace__ecere__com__DataMember * next;
325 const char *  name;
326 unsigned int isProperty;
327 int memberAccess;
328 int id;
329 struct __ecereNameSpace__ecere__com__Class * _class;
330 const char *  dataTypeString;
331 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
332 struct __ecereNameSpace__ecere__com__Instance * dataType;
333 int type;
334 int offset;
335 int memberID;
336 struct __ecereNameSpace__ecere__sys__OldList members;
337 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
338 int memberOffset;
339 short structAlignment;
340 short pointerAlignment;
341 } __attribute__ ((gcc_struct));
342
343 struct __ecereNameSpace__ecere__com__Class
344 {
345 struct __ecereNameSpace__ecere__com__Class * prev;
346 struct __ecereNameSpace__ecere__com__Class * next;
347 const char *  name;
348 int offset;
349 int structSize;
350 void * *  _vTbl;
351 int vTblSize;
352 unsigned int (*  Constructor)(void * );
353 void (*  Destructor)(void * );
354 int offsetClass;
355 int sizeClass;
356 struct __ecereNameSpace__ecere__com__Class * base;
357 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
358 struct __ecereNameSpace__ecere__sys__BinaryTree members;
359 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
360 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
361 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
362 struct __ecereNameSpace__ecere__sys__OldList derivatives;
363 int memberID;
364 int startMemberID;
365 int type;
366 struct __ecereNameSpace__ecere__com__Instance * module;
367 struct __ecereNameSpace__ecere__com__NameSpace *  nameSpace;
368 const char *  dataTypeString;
369 struct __ecereNameSpace__ecere__com__Instance * dataType;
370 int typeSize;
371 int defaultAlignment;
372 void (*  Initialize)();
373 int memberOffset;
374 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
375 const char *  designerClass;
376 unsigned int noExpansion;
377 const char *  defaultProperty;
378 unsigned int comRedefinition;
379 int count;
380 int isRemote;
381 unsigned int internalDecl;
382 void *  data;
383 unsigned int computeSize;
384 short structAlignment;
385 short pointerAlignment;
386 int destructionWatchOffset;
387 unsigned int fixed;
388 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
389 int inheritanceAccess;
390 const char *  fullName;
391 void *  symbol;
392 struct __ecereNameSpace__ecere__sys__OldList conversions;
393 struct __ecereNameSpace__ecere__sys__OldList templateParams;
394 struct __ecereNameSpace__ecere__com__ClassTemplateArgument *  templateArgs;
395 struct __ecereNameSpace__ecere__com__Class * templateClass;
396 struct __ecereNameSpace__ecere__sys__OldList templatized;
397 int numParams;
398 unsigned int isInstanceClass;
399 unsigned int byValueSystemClass;
400 } __attribute__ ((gcc_struct));
401