| 247 | } |
| 248 | |
| 249 | void fxDebugEval(txMachine* the, txSlot* frame, txString buffer, txInteger index) |
| 250 | { |
| 251 | txSlot* result; |
| 252 | txSlot* expression; |
| 253 | mxHostInspectors.value.list.first = C_NULL; |
| 254 | mxHostInspectors.value.list.last = C_NULL; |
| 255 | mxTemporary(result); |
| 256 | mxTemporary(expression); |
| 257 | fxDebugEvalBuffer(the, buffer, expression); |
| 258 | if (fxDebugEvalExpression(the, frame, expression, result)) { |
| 259 | txInspectorNameList aList = { C_NULL, C_NULL }; |
| 260 | fxEchoStart(the); |
| 261 | fxEcho(the, "<result line=\""); |
| 262 | fxEchoInteger(the, index); |
| 263 | fxEcho(the, "\">"); |
| 264 | if (result->kind == XS_REFERENCE_KIND) { |
| 265 | txSlot* instance = result->value.reference; |
| 266 | txSlot* instanceInspector = fxToInstanceInspector(the, instance); |
| 267 | if (!instanceInspector) |
| 268 | fxToggle(the, instance); |
| 269 | fxEchoProperty(the, result, &aList, C_NULL, -1, C_NULL); |
| 270 | if (!instanceInspector) |
| 271 | fxToggle(the, instance); |
| 272 | } |
| 273 | else |
| 274 | fxEchoProperty(the, result, &aList, C_NULL, -1, C_NULL); |
| 275 | fxEcho(the, "</result>"); |
| 276 | fxListLocal(the); |
| 277 | fxListGlobal(the); |
| 278 | fxListModules(the); |
| 279 | fxEchoStop(the); |
| 280 | } |
| 281 | else { |
| 282 | fxEchoStart(the); |
| 283 | fxEcho(the, "<result line=\""); |
| 284 | fxEchoInteger(the, index); |
| 285 | fxEcho(the, "\"># "); |
| 286 | fxEchoException(the, result); |
| 287 | fxEcho(the, "</result>"); |
| 288 | fxListLocal(the); |
| 289 | fxListGlobal(the); |
| 290 | fxListModules(the); |
| 291 | fxEchoStop(the); |
| 292 | } |
| 293 | mxPop(); |
| 294 | mxPop(); |
| 295 | } |
| 296 | |
| 297 | txU1* fxDebugEvalAtom(txMachine* the, txU1* p, Atom* atom, txString t) |
| 298 | { |
no test coverage detected