outstructs.println("#define STRINGTYPE "+typeutil.getClass(TypeUtil.StringClass).getId());
outstructs.println("#define CHARARRAYTYPE "+
(state.getArrayNumber((new TypeDescriptor(TypeDescriptor.CHAR)).makeArray(state))+state.numClasses()));
+ outstructs.println("#define NUMCLASSES "+state.numClasses());
if (state.TASK)
outstructs.println("#define STARTUPTYPE "+typeutil.getClass(TypeUtil.StartupClass).getId());
/* Output class structure */
classdefout.println("struct "+cn.getSafeSymbol()+" {");
classdefout.println(" int type;");
- if (cn.hasFlags())
+ if (cn.hasFlags()) {
classdefout.println(" int flag;");
+ classdefout.println(" void * flagptr;");
+ }
printClassStruct(cn, classdefout);
classdefout.println("};\n");
while(orit.hasNext()) {
TempDescriptor temp=(TempDescriptor)orit.next();
int ormask=((Integer)flagortable.get(temp)).intValue();
- output.println("flagor("+generateTemp(fm, temp)+", 0x"+Integer.toHexString(ormask)+");");
+ int andmask=0xFFFFFFF;
+ if (flagandtable.containsKey(temp))
+ andmask=((Integer)flagandtable.get(temp)).intValue();
+ output.println("flagorand("+generateTemp(fm, temp)+", 0x"+Integer.toHexString(ormask)+", 0x"+Integer.toHexString(andmask)+");");
}
Iterator andit=flagandtable.keySet().iterator();
while(andit.hasNext()) {
TempDescriptor temp=(TempDescriptor)andit.next();
int andmask=((Integer)flagandtable.get(temp)).intValue();
- output.println("flagand("+generateTemp(fm, temp)+", 0x"+Integer.toHexString(andmask)+");");
+ if (!flagortable.containsKey(temp))
+ output.println("flagorand("+generateTemp(fm, temp)+", 0, 0x"+Integer.toHexString(andmask)+");");
}
}
}
#endif
#ifdef TASK
+#include "tasks.h"
+
int main(int argc, char **argv) {
int i;
/* Allocate startup object */
struct ___StartupObject___ *startupobject=(struct ___StartupObject___*) allocate_new(STARTUPTYPE);
- /* Set flag */
- flagor(startupobject,1);
+ /* Set flags */
+ flagorand(startupobject,1,0xFFFFFFFF);
/* Build array of strings */
struct ArrayObject * stringarray=allocate_newarray(STRINGARRAYTYPE, argc);
processtasks();
}
-void flagor(void * ptr, int ormask) {
+void flagorand(void * ptr, int ormask, int andmask) {
((int *)ptr)[1]|=ormask;
-}
-
-void flagand(void * ptr, int andmask) {
((int *)ptr)[1]&=andmask;
}
-void processtasks();
+void processtasks() {
+ int i;
+
+ for(i=0;i<numtasks;i++) {
+ struct taskdescriptor * task=taskarray[i];
+ int j;
+
+ for(j=0;j<task->numParameters;j++) {
+ struct parameterdescriptor *param=task->descriptorarray[j];
+
+ }
+ }
+
+}
#endif
int ___Object______hashcode____(struct ___Object___ * ___this___) {