format source code

This commit is contained in:
honfika@gmail.com
2015-07-04 20:51:26 +02:00
parent 6cafe970fb
commit fac67d5baa
24 changed files with 5853 additions and 5413 deletions

View File

@@ -60,6 +60,7 @@ public class AVM2LocalData extends BaseLocalData {
public Map<Integer, List<Integer>> finallyJumps;
public Map<Integer, Integer> ignoredSwitches;
public List<Integer> ignoredSwitches2;
public Integer scriptIndex;

View File

@@ -1,46 +1,45 @@
/*
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PopIns;
import com.jpexs.decompiler.flash.abc.types.MethodBody;
import com.jpexs.decompiler.flash.abc.types.MethodInfo;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.ScopeStack;
import com.jpexs.decompiler.graph.TranslateStack;
import java.util.HashMap;
import java.util.List;
/**
*
* @author JPEXS
*/
public class DeobfuscatePopIns extends PopIns {
public DeobfuscatePopIns() {
instructionName = "ffdec_deobfuscatepop";
}
@Override
public void translate(boolean isStatic, int scriptIndex, int classIndex, HashMap<Integer, GraphTargetItem> localRegs, TranslateStack stack, ScopeStack scopeStack, AVM2ConstantPool constants, AVM2Instruction ins, List<MethodInfo> method_info, List<GraphTargetItem> output, MethodBody body, ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames, String path, HashMap<Integer, Integer> localRegsAssignmentIps, int ip, HashMap<Integer, List<Integer>> refs, AVM2Code code) {
stack.pop(); //Just ignore the value
}
}
/*
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PopIns;
import com.jpexs.decompiler.flash.abc.types.MethodBody;
import com.jpexs.decompiler.flash.abc.types.MethodInfo;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.ScopeStack;
import com.jpexs.decompiler.graph.TranslateStack;
import java.util.HashMap;
import java.util.List;
/**
*
* @author JPEXS
*/
public class DeobfuscatePopIns extends PopIns {
public DeobfuscatePopIns() {
instructionName = "ffdec_deobfuscatepop";
}
@Override
public void translate(boolean isStatic, int scriptIndex, int classIndex, HashMap<Integer, GraphTargetItem> localRegs, TranslateStack stack, ScopeStack scopeStack, AVM2ConstantPool constants, AVM2Instruction ins, List<MethodInfo> method_info, List<GraphTargetItem> output, MethodBody body, ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames, String path, HashMap<Integer, Integer> localRegsAssignmentIps, int ip, HashMap<Integer, List<Integer>> refs, AVM2Code code) {
stack.pop(); //Just ignore the value
}
}

View File

@@ -23,5 +23,4 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy;
public interface AlchemyTypeIns {
public static final String ALCHEMY_PACKAGE = "avm2.intrinsics.memory";
}

View File

@@ -39,6 +39,7 @@ import java.util.List;
public class AlchemyLoadAVM2Item extends AVM2Item {
private final char type;
private final int size;
private final GraphTargetItem ofs;

View File

@@ -39,6 +39,7 @@ import java.util.List;
public class AlchemyStoreAVM2Item extends AVM2Item {
private final char type;
private final int size;
private final GraphTargetItem ofs;
@@ -93,5 +94,4 @@ public class AlchemyStoreAVM2Item extends AVM2Item {
}
return toSourceMerge(localData, generator, ofs, ins(def));
}
}

View File

@@ -26,7 +26,6 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
import com.jpexs.decompiler.graph.CompilationException;
import com.jpexs.decompiler.graph.GraphSourceItem;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.SimpleValue;
import com.jpexs.decompiler.graph.SourceGenerator;
import com.jpexs.decompiler.graph.TypeItem;
import com.jpexs.decompiler.graph.model.IntegerValueTypeItem;
@@ -86,5 +85,4 @@ public class IntegerValueAVM2Item extends NumberValueAVM2Item implements Integer
public int intValue() {
return (int) (long) value;
}
}

View File

@@ -147,5 +147,4 @@ public class LocalRegAVM2Item extends AVM2Item {
}
return true;
}
}

View File

@@ -373,5 +373,4 @@ public class Multiname {
}
return true;
}
}