diff --git a/include/analysis.h b/include/analysis.h index b0d7a9a..8a7e0ca 100644 --- a/include/analysis.h +++ b/include/analysis.h @@ -524,7 +524,6 @@ class ControlGraph { bool usesSelf; bool usesSuper; - bool readsArguments; bool readsFields; bool writesFields; @@ -535,6 +534,7 @@ class ControlGraph { typedef std::vector TIndexList; TIndexList readsTemporaries; TIndexList writesTemporaries; + TIndexList readsArguments; static void insertIndex(std::size_t index, TIndexList& list) { if (std::find(list.begin(), list.end(), index) == list.end()) diff --git a/src/ControlGraph.cpp b/src/ControlGraph.cpp index 85ecf78..5250735 100644 --- a/src/ControlGraph.cpp +++ b/src/ControlGraph.cpp @@ -14,7 +14,6 @@ ControlGraph::TMetaInfo::TMetaInfo() : hasBackEdgeTau(false), usesSelf(false), usesSuper(false), - readsArguments(false), readsFields(false), writesFields(false), hasPrimitive(false) @@ -190,7 +189,7 @@ void GraphConstructor::processNode(InstructionNode* node) case opcode::pushArgument: if (instruction.getArgument() == 0) m_graph->getMeta().usesSelf = true; - m_graph->getMeta().readsArguments = true; + ControlGraph::TMetaInfo::insertIndex(instruction.getArgument(), m_graph->getMeta().readsArguments); case opcode::pushInstance: m_graph->getMeta().readsFields = true;