4 void IoState_show(IoState
*self
)
6 printf("--- state ----------------------------------\n");
10 IoObjectGroup_show(self->blackGroup);
14 IoObjectGroup_show(self->grayGroup);
18 IoObjectGroup_show(self->whiteGroup);
25 IoObject
*IoState_replacePerformFunc_with_(IoState
*self
,
26 IoTagPerformFunc
*oldFunc
,
27 IoTagPerformFunc
*newFunc
)
29 PHASH_FOREACH(self
->primitives
, k
, v
,
32 if (IoObject_tag(proto
)->performFunc
== oldFunc
)
34 IoObject_tag(proto
)->performFunc
= newFunc
;
42 void IoState_debuggingOn(IoState
*self
)
44 IoState_replacePerformFunc_with_(self
,
45 (IoTagPerformFunc
*)IoObject_perform
,
46 (IoTagPerformFunc
*)IoObject_performWithDebugger
);
49 void IoState_debuggingOff(IoState
*self
)
51 IoState_replacePerformFunc_with_(self
,
52 (IoTagPerformFunc
*)IoObject_performWithDebugger
,
53 (IoTagPerformFunc
*)IoObject_perform
);
56 int IoState_hasDebuggingCoroutine(IoState
*self
)
58 return 1; // hack awaiting decision on how to change this
61 void IoState_updateDebuggingMode(IoState
*self
)
63 if (IoState_hasDebuggingCoroutine(self
))
65 IoState_debuggingOn(self
);
69 IoState_debuggingOff(self
);