| 84 | } |
| 85 | |
| 86 | void fx_Symbol(txMachine* the) |
| 87 | { |
| 88 | txSlot* instance; |
| 89 | txSlot* slot; |
| 90 | txSlot* property; |
| 91 | if (mxHasTarget) |
| 92 | mxTypeError("new: Symbol"); |
| 93 | instance = fxNewInstance(the); |
| 94 | property = fxNextUndefinedProperty(the, instance, XS_NO_ID, XS_INTERNAL_FLAG); |
| 95 | if ((mxArgc > 0) && (mxArgv(0)->kind != XS_UNDEFINED_KIND)) { |
| 96 | fxToString(the, mxArgv(0)); |
| 97 | fxNextSlotProperty(the, property, mxArgv(0), XS_NO_ID, XS_INTERNAL_FLAG); |
| 98 | } |
| 99 | else |
| 100 | fxNextUndefinedProperty(the, property, XS_NO_ID, XS_INTERNAL_FLAG); |
| 101 | slot = fxFindKey(the); |
| 102 | slot->flag = XS_INTERNAL_FLAG; |
| 103 | slot->kind = XS_REFERENCE_KIND; |
| 104 | slot->value.reference = instance; |
| 105 | property->kind = XS_SYMBOL_KIND; |
| 106 | property->value.symbol = slot->ID; |
| 107 | mxPop(); |
| 108 | mxResult->kind = XS_SYMBOL_KIND; |
| 109 | mxResult->value.symbol = slot->ID; |
| 110 | } |
| 111 | |
| 112 | void fx_Symbol_for(txMachine* the) |
| 113 | { |
nothing calls this directly
no test coverage detected