Skip to content

Commit

Permalink
ControlGraph::TMetaInfo::readsArguments now stores indices of accesse…
Browse files Browse the repository at this point in the history
…d args

Issue: #17
Issue: #92
  • Loading branch information
0x7CFE committed Jul 17, 2016
1 parent 3fc7659 commit cc2e736
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ class ControlGraph {
bool usesSelf;
bool usesSuper;

bool readsArguments;
bool readsFields;
bool writesFields;

Expand All @@ -535,6 +534,7 @@ class ControlGraph {
typedef std::vector<std::size_t> 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())
Expand Down
3 changes: 1 addition & 2 deletions src/ControlGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ ControlGraph::TMetaInfo::TMetaInfo() :
hasBackEdgeTau(false),
usesSelf(false),
usesSuper(false),
readsArguments(false),
readsFields(false),
writesFields(false),
hasPrimitive(false)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit cc2e736

Please sign in to comment.