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

Function AddPopNode

NULLC/Callbacks.cpp:766–777  ·  view source on GitHub ↗

Function that creates node that removes value on top of the stack

Source from the content-addressed store, hash-verified

764
765// Function that creates node that removes value on top of the stack
766void 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
779void AddPositiveNode(const char* pos)
780{

Callers 13

AddInplaceVariableFunction · 0.85
AddArrayIteratorFunction · 0.85
FunctionStartFunction · 0.85
AddFunctionCallNodeFunction · 0.85
TypeFinishFunction · 0.85
CreateRedirectionTablesFunction · 0.85
AddListGeneratorFunction · 0.85
ParseAddVariableFunction · 0.85
ParseForExprFunction · 0.85
ParseTerminalFunction · 0.85

Calls 3

SetOptimisedMethod · 0.80
SetCodeInfoMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected