Skip to content

Commit

Permalink
Trigger build
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusluizfb committed Jun 8, 2021
1 parent 35477ef commit 3329eef
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 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 @@ -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 3329eef

Please sign in to comment.