| 546 | } |
| 547 | |
| 548 | void fx_String(txMachine* the) |
| 549 | { |
| 550 | txSlot* slot; |
| 551 | txSlot* instance; |
| 552 | if (mxArgc > 0) { |
| 553 | slot = mxArgv(0); |
| 554 | if (!mxHasTarget && (slot->kind == XS_SYMBOL_KIND)) { |
| 555 | fxSymbolToString(the, slot); |
| 556 | *mxResult = *slot; |
| 557 | return; |
| 558 | } |
| 559 | fxToString(the, slot); |
| 560 | } |
| 561 | else { |
| 562 | slot = &mxEmptyString; |
| 563 | } |
| 564 | if (!mxHasTarget) { |
| 565 | *mxResult = *slot; |
| 566 | return; |
| 567 | } |
| 568 | mxPushSlot(mxTarget); |
| 569 | fxGetPrototypeFromConstructor(the, &mxStringPrototype); |
| 570 | instance = fxNewStringInstance(the); |
| 571 | instance->next->kind = slot->kind; // @@ |
| 572 | instance->next->value.key.string = slot->value.string; |
| 573 | mxPullSlot(mxResult); |
| 574 | } |
| 575 | |
| 576 | #ifndef mxCESU8 |
| 577 | void fx_String_fromArrayBuffer(txMachine* the) |
nothing calls this directly
no test coverage detected