Overview
| Comment: | Correct the implementation of BroadcastAnd |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
cb7aff32a7449b83b301a9a5f41078bc |
| User & Date: | user on 2022-03-09 05:01:04.249 |
| Other Links: | manifest | tags |
Context
|
2022-03-22
| ||
| 02:14 | Implement TraceStack and ,TraceStack instructions. check-in: 189af944e7 user: user tags: trunk | |
|
2022-03-09
| ||
| 05:01 | Correct the implementation of BroadcastAnd check-in: cb7aff32a7 user: user tags: trunk | |
| 04:46 | When a level is changed, set the user state to unsolved even if no solution has been recorded. check-in: e93f746d5e user: user tags: trunk | |
Changes
Modified exec.c
from [c9c1928e06]
to [6470854eef].
| ︙ | ︙ | |||
3255 3256 3257 3258 3259 3260 3261 |
}
static Uint32 broadcast(Uint32 from,int c,Uint16 msg,Value arg1,Value arg2,Value arg3,Uint8 s) {
Uint32 t=0;
Uint32 n;
Object*o;
Value v;
| | | 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 |
}
static Uint32 broadcast(Uint32 from,int c,Uint16 msg,Value arg1,Value arg2,Value arg3,Uint8 s) {
Uint32 t=0;
Uint32 n;
Object*o;
Value v;
if(s==2) t=1;
if(lastobj==VOIDLINK) return t;
n=lastobj;
if(c && (classes[c]->cflags&CF_GROUP)) Throw("Broadcast for abstract classes is not implemented yet");
while(o=objects[n]) {
if(!c || o->class==c) {
v=send_message(from,n,msg,arg1,arg2,arg3);
switch(s) {
|
| ︙ | ︙ | |||
3277 3278 3279 3280 3281 3282 3283 |
default:
if(v.t<=TY_MAXTYPE) Throw("Invalid return type for BroadcastSum");
t++;
}
break;
case 2:
switch(v.t) {
| | | 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 |
default:
if(v.t<=TY_MAXTYPE) Throw("Invalid return type for BroadcastSum");
t++;
}
break;
case 2:
switch(v.t) {
case TY_NUMBER: if(!v.u) return 0; break;
case TY_SOUND: case TY_USOUND: Throw("Invalid return type for BroadcastAnd");
}
break;
case 3:
StackReq(0,1);
if(v.t!=TY_MARK) Push(v);
break;
|
| ︙ | ︙ |