|
|
|
@ -15,30 +15,12 @@ |
|
|
|
|
*/ |
|
|
|
|
package org.jetbrains.java.decompiler.modules.decompiler; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.HashSet; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map.Entry; |
|
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
|
import org.jetbrains.java.decompiler.code.CodeConstants; |
|
|
|
|
import org.jetbrains.java.decompiler.main.ClassesProcessor.ClassNode; |
|
|
|
|
import org.jetbrains.java.decompiler.main.DecompilerContext; |
|
|
|
|
import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences; |
|
|
|
|
import org.jetbrains.java.decompiler.main.rels.ClassWrapper; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.ArrayExprent; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.AssignmentExprent; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.ConstExprent; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.ExitExprent; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.Exprent; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.FieldExprent; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.FunctionExprent; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.MonitorExprent; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.NewExprent; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.VarExprent; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.exps.*; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.sforms.SSAConstructorSparseEx; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.stats.IfStatement; |
|
|
|
|
import org.jetbrains.java.decompiler.modules.decompiler.stats.Statement; |
|
|
|
@ -49,6 +31,9 @@ import org.jetbrains.java.decompiler.struct.match.MatchEngine; |
|
|
|
|
import org.jetbrains.java.decompiler.util.FastSparseSetFactory.FastSparseSet; |
|
|
|
|
import org.jetbrains.java.decompiler.util.InterpreterUtil; |
|
|
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.Map.Entry; |
|
|
|
|
|
|
|
|
|
public class SimplifyExprentsHelper { |
|
|
|
|
|
|
|
|
|
static final MatchEngine class14Builder = new MatchEngine(); |
|
|
|
@ -813,8 +798,7 @@ public class SimplifyExprentsHelper { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (found) { |
|
|
|
|
List<Exprent> data = new ArrayList<>(); |
|
|
|
|
data.addAll(stif.getFirst().getExprents()); |
|
|
|
|
List<Exprent> data = new ArrayList<>(stif.getFirst().getExprents()); |
|
|
|
|
|
|
|
|
|
data.add(new AssignmentExprent(ifvar, new FunctionExprent(FunctionExprent.FUNCTION_IIF, |
|
|
|
|
Arrays.asList( |
|
|
|
@ -859,8 +843,7 @@ public class SimplifyExprentsHelper { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<Exprent> data = new ArrayList<>(); |
|
|
|
|
data.addAll(stif.getFirst().getExprents()); |
|
|
|
|
List<Exprent> data = new ArrayList<>(stif.getFirst().getExprents()); |
|
|
|
|
|
|
|
|
|
data.add(new ExitExprent(ifex.getExitType(), new FunctionExprent(FunctionExprent.FUNCTION_IIF, |
|
|
|
|
Arrays.asList( |
|
|
|
@ -927,8 +910,7 @@ public class SimplifyExprentsHelper { |
|
|
|
|
|
|
|
|
|
assfirst.replaceExprent(assfirst.getRight(), new ConstExprent(VarType.VARTYPE_CLASS, class_name, null)); |
|
|
|
|
|
|
|
|
|
List<Exprent> data = new ArrayList<>(); |
|
|
|
|
data.addAll(stat.getFirst().getExprents()); |
|
|
|
|
List<Exprent> data = new ArrayList<>(stat.getFirst().getExprents()); |
|
|
|
|
|
|
|
|
|
stat.setExprents(data); |
|
|
|
|
|
|
|
|
|