void fxSerializeJSONOwnProperty(txMachine* the, txSlot* theContext, txID id, txIndex index, txSlot* theProperty) { txJSONSerializer* theSerializer = theContext->value.regexp.code; txInteger* theFlag = theContext->value.regexp.offsets; if (id) { txSlot* key = fxGetKey(the, id); if (key && (key->flag & XS_DONT_ENUM_FLAG)) { if (key->kind == XS_KEY_KIND) { mxPushSlot(theProperty); mxPushString(key->value.key.string); fxSerializeJSONProperty(the, theSerializer, theFlag); } else { mxPushSlot(theProperty); mxPushStringX(key->value.key.string); fxSerializeJSONProperty(the, theSerializer, theFlag); } } } else { mxPushSlot(theProperty); mxPushInteger((txInteger)index); fxSerializeJSONProperty(the, theSerializer, theFlag); } }
void fxModuleURL(txMachine* the) { txID id = fxCurrentModuleID(the); if (id != XS_NO_ID) { txSlot* key = fxGetKey(the, id); if (key->kind == XS_KEY_KIND) mxPushString(key->value.key.string); else mxPushStringX(key->value.key.string); } else { mxPushUndefined(); } }