Skip to content

Commit

Permalink
Rename GroupStep because that's a bad name
Browse files Browse the repository at this point in the history
  • Loading branch information
samczsun committed Nov 20, 2017
1 parent f769146 commit 5d9d5bb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
Expand All @@ -63,7 +63,7 @@
</configuration>
</execution>
</executions>
</plugin>
</plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ public AbstractInsnNode tryMatch(InstructionMatcher matcher, AbstractInsnNode no
return null;
}
List<AbstractInsnNode> captured = new ArrayList<>();
for (; start != end; start = Utils.getNext(start)) {
captured.add(start);
for (; start != end; start = start.getNext()) {
if (Utils.isInstruction(start))
captured.add(start);
}
matcher.capture(id, captured);
return end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public InstructionMatcher(InstructionPattern pattern, AbstractInsnNode start) {
}

public boolean find() {
GroupedStep groupedStep = new GroupedStep(pattern.getSteps());
end = groupedStep.tryMatch(this, start);
Step mainStep = new CapturingStep(new MultiStep(pattern.getSteps()), "all");
end = mainStep.tryMatch(this, start);
if (end != null) {
end = Utils.getPrevious(end); // We want this inclusive
if (end == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import com.javadeobfuscator.deobfuscator.utils.Utils;
import org.objectweb.asm.tree.AbstractInsnNode;

public class GroupedStep implements Step {
public class MultiStep implements Step {
private final Step[] steps;

public GroupedStep(Step... steps) {
public MultiStep(Step... steps) {
this.steps = steps;
}

Expand Down

0 comments on commit 5d9d5bb

Please sign in to comment.