Function that creates node that removes value on top of the stack
| 764 | |
| 765 | // Function that creates node that removes value on top of the stack |
| 766 | void AddPopNode(const char* pos) |
| 767 | { |
| 768 | // If the last node is increment or decrement, then we do not need to keep the value on stack, and some optimizations can be done |
| 769 | if(CodeInfo::nodeList.back()->nodeType == typeNodePreOrPostOp) |
| 770 | { |
| 771 | static_cast<NodePreOrPostOp*>(CodeInfo::nodeList.back())->SetOptimised(true); |
| 772 | }else{ |
| 773 | // Otherwise, just create node |
| 774 | CodeInfo::nodeList.push_back(new NodePopOp()); |
| 775 | } |
| 776 | CodeInfo::nodeList.back()->SetCodeInfo(pos); |
| 777 | } |
| 778 | |
| 779 | void AddPositiveNode(const char* pos) |
| 780 | { |
no test coverage detected