Option to export script (AS1/2) as Graphviz P-code

This commit is contained in:
Jindra Petřík
2018-02-04 09:16:13 +01:00
parent 7ee96beead
commit d5c814f79f
6 changed files with 17 additions and 4 deletions

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.exporters.modes;
/**
@@ -23,7 +24,8 @@ public enum ScriptExportMode {
AS,
PCODE,
PCODE_HEX,
PCODE_GRAPHVIZ,
HEX,
CONSTANTS, // AS1/2 ConstantPool
CONSTANTS, // AS1/2 ConstantPool
AS_METHOD_STUBS
}

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.exporters.script;
import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler;
@@ -98,6 +99,8 @@ public class ExportScriptTask implements Callable<File> {
asm.getActionSourcePrefix(writer2);
asm.getActionBytesAsHex(writer2);
asm.getActionSourceSuffix(writer2);
} else if (exportMode == ScriptExportMode.PCODE_GRAPHVIZ) {
new PcodeGraphVizExporter().export(asm, writer2);
} else if (exportMode != ScriptExportMode.AS) {
asm.getActionSourcePrefix(writer2);
asm.getASMSource(exportMode, writer2, null);

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.exporters.settings;
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
@@ -42,6 +43,8 @@ public class ScriptExportSettings {
case AS:
case AS_METHOD_STUBS:
return ".as";
case PCODE_GRAPHVIZ:
return ".gv";
case PCODE:
case PCODE_HEX:
return ".pcode";