MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxSetBreakpointHitCount

Function fxSetBreakpointHitCount

xs/sources/xsDebug.c:2634–2678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2632}
2633
2634void fxSetBreakpointHitCount(txMachine* the, txSlot* reference, txString it)
2635{
2636 txSlot* instance = fxToInstance(the, reference);
2637 txSlot* property = instance->next->next;
2638 char c = *it;
2639 txID op = XS_CODE_MORE_EQUAL;
2640 txInteger count = 0;
2641 if (c == '%') {
2642 it++;
2643 op = XS_CODE_MODULO;
2644 }
2645 else if (c == '<') {
2646 it++;
2647 if (*it == '=') {
2648 it++;
2649 op = XS_CODE_LESS_EQUAL;
2650 }
2651 else
2652 op = XS_CODE_LESS;
2653 }
2654 else if (*it == '=') {
2655 op = XS_CODE_EQUAL;
2656 it++;
2657 }
2658 else if (*it == '>') {
2659 it++;
2660 if (*it == '=') {
2661 it++;
2662 op = XS_CODE_MORE_EQUAL;
2663 }
2664 else
2665 op = XS_CODE_MORE;
2666 }
2667 it = fxSkipSpaces(it);
2668 while ((c = *it++)) {
2669 if (('0' <= c) && (c <= '9'))
2670 count = (count * 10) + (c - '0');
2671 else
2672 break;
2673 }
2674 property->ID = op;
2675 property->kind = XS_DATA_VIEW_KIND;
2676 property->value.dataView.offset = 0;
2677 property->value.dataView.size = count;
2678}
2679
2680void fxSetBreakpointTrace(txMachine* the, txSlot* reference, txString it)
2681{

Callers 1

fxDebugPushTagFunction · 0.85

Calls 2

fxToInstanceFunction · 0.85
fxSkipSpacesFunction · 0.85

Tested by

no test coverage detected