| 2114 | } |
| 2115 | |
| 2116 | void fxResolveModule(txMachine* the, txSlot* module, txID moduleID, txScript* script, void* data, txDestructor destructor) |
| 2117 | { |
| 2118 | if (script->codeBuffer) { |
| 2119 | if (moduleID != XS_NO_ID) { |
| 2120 | txSlot* key = fxGetKey(the, moduleID); |
| 2121 | txSlot* meta = mxModuleMeta(module); |
| 2122 | txSlot* slot; |
| 2123 | if (mxIsNull(meta)) { |
| 2124 | txSlot* instance = fxNewInstance(the); |
| 2125 | meta->value.reference = instance; |
| 2126 | meta->kind = XS_REFERENCE_KIND; |
| 2127 | } |
| 2128 | slot = fxLastProperty(the, meta->value.reference); |
| 2129 | slot = slot->next = fxNewSlot(the); |
| 2130 | slot->value.string = key->value.key.string; |
| 2131 | if (key->kind == XS_KEY_KIND) |
| 2132 | slot->kind = XS_STRING_KIND; |
| 2133 | else |
| 2134 | slot->kind = XS_STRING_X_KIND; |
| 2135 | slot->ID = mxID(_uri); |
| 2136 | slot->flag |= XS_DONT_DELETE_FLAG | XS_DONT_SET_FLAG; |
| 2137 | } |
| 2138 | // mxPushClosure(module); |
| 2139 | fxRunScript(the, script, module, C_NULL, C_NULL, C_NULL, module->value.reference); |
| 2140 | mxPop(); |
| 2141 | } |
| 2142 | } |
| 2143 | |
| 2144 | txID fxResolveSpecifier(txMachine* the, txSlot* realm, txID moduleID, txSlot* name) |
| 2145 | { |
no test coverage detected