| 2649 | } |
| 2650 | |
| 2651 | txSlot* fxModuleFindProperty(txMachine* the, txSlot* instance, txID id, txIndex index) |
| 2652 | { |
| 2653 | if (id == XS_NO_ID) |
| 2654 | return C_NULL; |
| 2655 | if (fxIsKeySymbol(the, id)) { |
| 2656 | if (id == mxID(_Symbol_toStringTag)) |
| 2657 | return mxModulePrototype.value.reference->next; |
| 2658 | } |
| 2659 | // if (mxModuleInstanceStatus(instance) < XS_MODULE_STATUS_LINKED) { |
| 2660 | // mxReferenceError("module not initialized yet"); |
| 2661 | // } |
| 2662 | // else |
| 2663 | { |
| 2664 | txSlot* exports = mxModuleInstanceExports(instance); |
| 2665 | if (mxIsReference(exports)) { |
| 2666 | txSlot* property = exports->value.reference->next; |
| 2667 | while (property) { |
| 2668 | if (property->ID == id) { |
| 2669 | property = property->value.export.closure; |
| 2670 | if (property && (property->kind == XS_UNINITIALIZED_KIND)) { |
| 2671 | fxIDToString(the, id, the->nameBuffer, sizeof(the->nameBuffer)); |
| 2672 | mxReferenceError("get %s: not initialized yet", the->nameBuffer); |
| 2673 | } |
| 2674 | return property; |
| 2675 | } |
| 2676 | property = property->next; |
| 2677 | } |
| 2678 | } |
| 2679 | } |
| 2680 | return C_NULL; |
| 2681 | } |
| 2682 | |
| 2683 | txBoolean fxModuleGetOwnProperty(txMachine* the, txSlot* instance, txID id, txIndex index, txSlot* slot) |
| 2684 | { |
no test coverage detected