| 1006 | } |
| 1007 | |
| 1008 | void fxFreezeJSONModule(txMachine* the) |
| 1009 | { |
| 1010 | txSlot* instance = fxGetInstance(the, mxResult); |
| 1011 | txSlot* internal = instance->next; |
| 1012 | if (internal && (internal->kind == XS_MODULE_KIND) && (internal->flag & XS_JSON_MODULE_FLAG)) { |
| 1013 | txID defaultID = mxID(_default); |
| 1014 | txSlot* export = mxModuleInstanceExports(instance)->value.reference->next; |
| 1015 | if (export && (export->ID == defaultID)) { |
| 1016 | mxPush(mxObjectConstructor); |
| 1017 | mxDub(); |
| 1018 | mxGetID(mxID(_freeze)); |
| 1019 | mxCall(); |
| 1020 | mxPushSlot(export->value.export.closure); |
| 1021 | mxPushBoolean(1); |
| 1022 | mxRunCount(2); |
| 1023 | mxPop(); |
| 1024 | } |
| 1025 | |
| 1026 | } |
| 1027 | } |
| 1028 | |
| 1029 | void fxLoadModule(txMachine* the, txSlot* module, txID moduleID) |
| 1030 | { |