43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
Uint32 from;
Value arg1,arg2,arg3;
} MessageVars;
static jmp_buf my_env;
static const char*my_error;
static MessageVars msgvars;
static char lastimage_processing,changed,all_flushed;
static Value vstack[VSTACKSIZE];
static int vstackptr;
static const char*traceprefix;
static Uint8 current_key;
static Value quiz_obj;
static Value traced_obj;
|
|
|
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
Uint32 from;
Value arg1,arg2,arg3;
} MessageVars;
static jmp_buf my_env;
static const char*my_error;
static MessageVars msgvars;
static Uint8 lastimage_processing,changed,all_flushed;
static Value vstack[VSTACKSIZE];
static int vstackptr;
static const char*traceprefix;
static Uint8 current_key;
static Value quiz_obj;
static Value traced_obj;
|
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
|
}
if(p==VOIDLINK) break;
n=p;
}
}
static inline void flush_all(void) {
if(current_key) all_flushed=1;
flush_class(0);
}
static inline Value v_broadcast(Uint32 from,Value c,Value msg,Value arg1,Value arg2,Value arg3,int s) {
if(msg.t!=TY_MESSAGE) Throw("Type mismatch");
if(c.t!=TY_CLASS && (c.t!=TY_NUMBER || c.u)) Throw("Type mismatch");
return NVALUE(broadcast(from,c.u,msg.u,arg1,arg2,arg3,s));
|
|
|
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
|
}
if(p==VOIDLINK) break;
n=p;
}
}
static inline void flush_all(void) {
if(current_key) all_flushed=255;
flush_class(0);
}
static inline Value v_broadcast(Uint32 from,Value c,Value msg,Value arg1,Value arg2,Value arg3,int s) {
if(msg.t!=TY_MESSAGE) Throw("Type mismatch");
if(c.t!=TY_CLASS && (c.t!=TY_NUMBER || c.u)) Throw("Type mismatch");
return NVALUE(broadcast(from,c.u,msg.u,arg1,arg2,arg3,s));
|
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
|
case OP_DONE_C: StackReq(1,1); GetFlagOf(OF_DONE); break;
case OP_DONE_E: StackReq(1,0); if(v_bool(Pop())) o->oflags|=OF_DONE; else o->oflags&=~OF_BUSY; break;
case OP_DONE_EC: StackReq(2,0); SetFlagOf(OF_DONE); break;
case OP_DROP: StackReq(1,0); Pop(); break;
case OP_DROP_D: StackReq(2,0); Pop(); Pop(); break;
case OP_DUP: StackReq(1,2); t1=Pop(); Push(t1); Push(t1); break;
case OP_EQ: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_equal(t1,t2)?1:0)); break;
case OP_FLUSHCLASS: NoIgnore(); StackReq(1,0); t1=Pop(); if(t1.t==TY_CLASS) flush_class(t1.u); else if(t1.t==TY_NUMBER && t1.s==-1) flush_all(); else if(t1.t) Throw("Type mismatch"); break;
case OP_FLUSHOBJ: NoIgnore(); flush_object(obj); break;
case OP_FLUSHOBJ_C: NoIgnore(); StackReq(1,0); i=v_object(Pop()); if(i!=VOIDLINK) flush_object(i); break;
case OP_FOR: NoIgnore(); StackReq(3,1); t3=Pop(); t2=Pop(); t1=Pop(); ptr=v_for(code,ptr,t1,t2,t3); break;
case OP_FROM: StackReq(0,1); Push(OVALUE(msgvars.from)); break;
case OP_FUNCTION: execute_program(classes[0]->codes,functions[code[ptr++]],obj); break;
case OP_GE: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_unsigned_greater(t2,t1)?0:1)); break;
|
>
>
|
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
|
case OP_DONE_C: StackReq(1,1); GetFlagOf(OF_DONE); break;
case OP_DONE_E: StackReq(1,0); if(v_bool(Pop())) o->oflags|=OF_DONE; else o->oflags&=~OF_BUSY; break;
case OP_DONE_EC: StackReq(2,0); SetFlagOf(OF_DONE); break;
case OP_DROP: StackReq(1,0); Pop(); break;
case OP_DROP_D: StackReq(2,0); Pop(); Pop(); break;
case OP_DUP: StackReq(1,2); t1=Pop(); Push(t1); Push(t1); break;
case OP_EQ: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_equal(t1,t2)?1:0)); break;
case OP_FINISHED: StackReq(0,1); Push(NVALUE(all_flushed)); break;
case OP_FINISHED_E: StackReq(1,0); t1=Pop(); Numeric(t1); all_flushed=t1.u; break;
case OP_FLUSHCLASS: NoIgnore(); StackReq(1,0); t1=Pop(); if(t1.t==TY_CLASS) flush_class(t1.u); else if(t1.t==TY_NUMBER && t1.s==-1) flush_all(); else if(t1.t) Throw("Type mismatch"); break;
case OP_FLUSHOBJ: NoIgnore(); flush_object(obj); break;
case OP_FLUSHOBJ_C: NoIgnore(); StackReq(1,0); i=v_object(Pop()); if(i!=VOIDLINK) flush_object(i); break;
case OP_FOR: NoIgnore(); StackReq(3,1); t3=Pop(); t2=Pop(); t1=Pop(); ptr=v_for(code,ptr,t1,t2,t3); break;
case OP_FROM: StackReq(0,1); Push(OVALUE(msgvars.from)); break;
case OP_FUNCTION: execute_program(classes[0]->codes,functions[code[ptr++]],obj); break;
case OP_GE: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_unsigned_greater(t2,t1)?0:1)); break;
|