| 1390 | } |
| 1391 | |
| 1392 | void fxPatchKeys(txMachine* the) |
| 1393 | { |
| 1394 | txSlot** p; |
| 1395 | txSlot** q; |
| 1396 | txSlot* slot; |
| 1397 | txID id = 0; |
| 1398 | p = the->keyArray; |
| 1399 | q = p + the->keyIndex - the->keyOffset; |
| 1400 | slot = *p; |
| 1401 | slot->flag = XS_INTERNAL_FLAG | XS_DONT_DELETE_FLAG; |
| 1402 | slot->kind = XS_UNDEFINED_KIND; |
| 1403 | p++; |
| 1404 | id++; |
| 1405 | while (p < q) { |
| 1406 | slot = *p; |
| 1407 | if ((slot == C_NULL) || (slot->kind == XS_STRING_KIND)) { |
| 1408 | txSlot* instance = fxNewInstance(the); |
| 1409 | txSlot* property = fxNextUndefinedProperty(the, instance, XS_NO_ID, XS_INTERNAL_FLAG); |
| 1410 | property->kind = XS_SYMBOL_KIND; |
| 1411 | property->value.symbol = id; |
| 1412 | if (slot == C_NULL) |
| 1413 | fxNextUndefinedProperty(the, property, XS_NO_ID, XS_INTERNAL_FLAG); |
| 1414 | else |
| 1415 | fxNextSlotProperty(the, property, slot, XS_NO_ID, XS_INTERNAL_FLAG); |
| 1416 | slot = fxNewSlot(the); |
| 1417 | slot->kind = XS_REFERENCE_KIND; |
| 1418 | slot->ID = id; |
| 1419 | slot->value.reference = instance; |
| 1420 | *p = slot; |
| 1421 | mxPop(); |
| 1422 | } |
| 1423 | slot->flag |= XS_INTERNAL_FLAG; |
| 1424 | if ((id < XS_ID_COUNT) || ((slot->flag & XS_DONT_ENUM_FLAG) == 0)) |
| 1425 | slot->flag |= XS_DONT_DELETE_FLAG; |
| 1426 | p++; |
| 1427 | id++; |
| 1428 | } |
| 1429 | } |
| 1430 | |
| 1431 | void fxReadKeyhole(txMachine* the, txSnapshot* snapshot) |
| 1432 | { |
no test coverage detected