Skip to content

Commit

Permalink
Trigger build
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusluizfb committed Jun 13, 2021
1 parent 35477ef commit 0d3eebb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/rascal/lang/jimple/toolkit/ssa/VariableRenaming.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public map[Node, list[Node]] replace(Node X) {

// Deal with all nodes that aren't assigments bug uses a variable in some way
if(isNonAssignmentStatementToRename(X)) {
stmtNode(statement) = X;
Node renamedStatement = stmtNode(replaceImmediateUse(statement));
statementBody = returnStmtNodeBody(X);
Node renamedStatement = stmtNode(replaceImmediateUse(statementBody));
renameNodeOcurrecies(X, renamedStatement);
X = renamedStatement;
};
Expand Down Expand Up @@ -216,7 +216,7 @@ public bool isSkipableStatement(stmtArgument) {
}

public Node replacePhiFunctionVersion(map[Node, list[Node]] blockTree, Node variableNode) {
stmtNode(assignStatement) = variableNode;
assignStatement = returnStmtNodeBody(variableNode);
assign(assignVariable, assignPhiFunction) = assignStatement;
phiFunction(phiFunctionVariable, variableVersionList) = assignPhiFunction;
variableName = phiFunctionVariable[0];
Expand Down Expand Up @@ -430,6 +430,12 @@ public list[Immediate] getExpressionImmediates(Expression expression) {
}
}

public Statement returnStmtNodeBody(Node stmtNode) {
switch(stmtNode) {
case stmtNode(stmtBody): return stmtBody;
}
}

public Variable returnLeftHandSideVariable(Node stmtNode) {
switch(stmtNode) {
case stmtNode(assign(leftHandSide, _)): return leftHandSide;
Expand Down

0 comments on commit 0d3eebb

Please sign in to comment.