MCPcopy Create free account
hub / github.com/WheretIB/nullc / SatisfyJumps

Function SatisfyJumps

NULLC/SyntaxTree.cpp:1635–1650  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1633
1634//////////////////////////////////////////////////////////////////////////
1635void SatisfyJumps(FastVector<unsigned int>& jumpList, unsigned int pos)
1636{
1637 for(unsigned int i = 0; i < jumpList.size();)
1638 {
1639 if(cmdList[jumpList[i]].argument == currLoopDepth)
1640 {
1641 // If level is equal to 1, replace it with jump position
1642 cmdList[jumpList[i]].argument = pos;
1643 // Remove element by replacing with the last one
1644 jumpList[i] = jumpList.back();
1645 jumpList.pop_back();
1646 }else{
1647 i++;
1648 }
1649 }
1650}
1651
1652//////////////////////////////////////////////////////////////////////////
1653// Node for break operation

Callers 2

CompileMethod · 0.85
SatisfyJumpsMethod · 0.85

Calls 2

sizeMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected