mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 04:40:46 +00:00
version apha 9
AS3: Included new undocumented instructions, new Multiname kind - Typename AS3: Export PCode AS3: Implemented code for executing some instructions Many bugfixes
This commit is contained in:
@@ -1,28 +1,72 @@
|
||||
/*
|
||||
* Copyright (C) 2010 JPEXS
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
package com.jpexs.asdec.abc.avm2.flowgraph;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class GraphPart {
|
||||
public int start=0;
|
||||
public int linkCount=0;
|
||||
}
|
||||
/*
|
||||
* Copyright (C) 2010-2011 JPEXS
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
package com.jpexs.asdec.abc.avm2.flowgraph;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class GraphPart {
|
||||
public int start=0;
|
||||
public int end=0;
|
||||
public int instanceCount=0;
|
||||
public List<GraphPart> nextParts=new ArrayList<GraphPart>();
|
||||
|
||||
public int posX=-1;
|
||||
public int posY=-1;
|
||||
|
||||
|
||||
public GraphPart(int start,int end) {
|
||||
this.start=start;
|
||||
this.end=end;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if(end<start){
|
||||
return "<->";
|
||||
}
|
||||
return ""+(start+1)+"-"+(end+1)+(instanceCount>1?"("+instanceCount+" links)":"");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean containsIP(int ip){
|
||||
return (ip>=start)&&(ip<=end);
|
||||
}
|
||||
|
||||
|
||||
private boolean containsPart(GraphPart part,GraphPart what,List<GraphPart> used){
|
||||
if(used.contains(part)) return false;
|
||||
used.add(part);
|
||||
for(GraphPart subpart:part.nextParts){
|
||||
if(subpart==what) return true;
|
||||
if(containsPart(subpart,what,used)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean containsPart(GraphPart what){
|
||||
return containsPart(this,what,new ArrayList<GraphPart>());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user