mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-17 12:31:53 +00:00
Merge branch 'master' of https://github.com/jindrapetrik/jpexs-decompiler
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,6 +7,7 @@
|
||||
*.conflict~
|
||||
*.identcache
|
||||
*.recompiled.swf
|
||||
*(Selective Sync Conflict*
|
||||
run_test_*.swf
|
||||
Thumbs.db
|
||||
/build/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
language: java
|
||||
jdk: [oraclejdk8]
|
||||
dist: trusty
|
||||
jdk: [oraclejdk9]
|
||||
#dist: trusty
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
|
||||
34
CHANGELOG.md
34
CHANGELOG.md
@@ -1,6 +1,40 @@
|
||||
# Change Log
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [12.0.0] - 2021-01-12
|
||||
### Added
|
||||
- Java 9+ support
|
||||
- Chinese translation updated
|
||||
- Enable bulk replace for single typed tags
|
||||
- Option to use logging configuration file (ffdec home / logging.properties)
|
||||
|
||||
### Removed
|
||||
- Due to Java9+ limited support of reflection, following features were removed:
|
||||
- Automatic detection of installed fonts changes (on font editation) - FFDec needs to be restarted to font changes to take effect
|
||||
- Using kerning pairs of installed fonts
|
||||
- Support for installing java in FFDec windows installer
|
||||
|
||||
### Changed
|
||||
- Making internal flash viewer a default viewer + move FP option switch to Advanced settings / others
|
||||
- Increased scrolling speed in folder preview
|
||||
- Changed /bin/bash to /usr/bin/env bash
|
||||
- Building does not require Naashorn - uses Beanshell instead
|
||||
- Use object.§§slot[index] syntax instead of /* UnknownSlot */ comment when slot cannot be determined (AS3)
|
||||
- Show §§findproperty when neccessary (AS3)
|
||||
|
||||
### Fixed
|
||||
- Scaling - Distorted images/canvas on Hi-dpi monitors for Java 9 and later
|
||||
- Radial gradients focal point reading/writing
|
||||
- Correct AS/P-code matching in editor for AS3 after using deobfuscation
|
||||
- Correct line matching in debugger of AS3 after using deobfuscation
|
||||
- Concurrent access while in debugger
|
||||
- Correct body index for script initializer in P-code debugging
|
||||
- #1550 TTF export - correctly handle duplicate unicode codes
|
||||
- #1548 correctly handle empty generated file names
|
||||
- #1379 AS3 - better handling local registers postincrement/decrement
|
||||
- Better unresolved if handling
|
||||
- Escaping in P-code Graphviz exporter (Problems with graphs containing backslash strings)
|
||||
|
||||
## [11.3.0] - 2020-04-25
|
||||
### Added
|
||||
- Possibility to open SWF files using open on Mac
|
||||
|
||||
BIN
antlib/bsh-2.0b6.jar
Normal file
BIN
antlib/bsh-2.0b6.jar
Normal file
Binary file not shown.
44
build.xml
44
build.xml
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="FFDec" basedir="." default="all" xmlns:jacoco="antlib:org.jacoco.ant">
|
||||
<project name="FFDec" basedir="." default="all"> <!-- xmlns:jacoco="antlib:org.jacoco.ant" -->
|
||||
<description>Builds project FFDec</description>
|
||||
|
||||
<loadproperties srcfile="build.properties" />
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<taskdef name="mkbom" classname="com.jpexs.jbomutils.ant.MkBomTask" classpathref="ant.lib.classpath" />
|
||||
<taskdef name="xar" classname="com.jpexs.xar.ant.XarTask" classpathref="ant.lib.classpath" />
|
||||
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpathref="ant.lib.classpath" />
|
||||
<!--<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpathref="ant.lib.classpath" />-->
|
||||
<taskdef name="cpio" classname="org.apache.ant.compress.taskdefs.Cpio" classpathref="ant.lib.classpath" />
|
||||
<taskdef name="deb" classname="com.googlecode.ant_deb_task.Deb" classpathref="ant.lib.classpath" />
|
||||
<taskdef name="desktopentry" classname="com.googlecode.ant_deb_task.DesktopEntry" classpathref="ant.lib.classpath" />
|
||||
@@ -65,9 +65,9 @@
|
||||
<loadproperties srcfile="${version_info}" prefix="version"/>
|
||||
<property name="version" value="${version.major}.${version.minor}.${version.release}" />
|
||||
<property name="version.number" value="${version.major}.${version.minor}.${version.release}.${version.build}" />
|
||||
<script language="javascript">
|
||||
if(project.getProperty("version.debug")=="true"){
|
||||
project.setProperty("nightly",true);
|
||||
<script language="beanshell" classpathref="ant.lib.classpath">
|
||||
if("true".equals("" + project.getProperty("version.debug"))) {
|
||||
project.setProperty("nightly","true");
|
||||
}
|
||||
</script>
|
||||
<echo level="info" message="Loaded Version:${version.major}.${version.minor}.${version.release}.${version.build}"/>
|
||||
@@ -80,7 +80,7 @@
|
||||
<mkdir dir="${compile.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${compile.dir}" includes="**/*.java" target="${target.java}" source="${target.java}" debug="true"
|
||||
debuglevel="lines,vars,source" includeantruntime="false" encoding="utf-8">
|
||||
<compilerarg line="-Xlint:unchecked"/> <!-- For Java 8: -Xdiags:verbose -->
|
||||
<compilerarg line="-Xlint:unchecked -Xlint:deprecation"/> <!-- For Java 8: -Xdiags:verbose -->
|
||||
<classpath>
|
||||
<fileset dir="${lib.dir}" includes="**/*.jar"/>
|
||||
</classpath>
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
|
||||
<mkdir dir="${coverage.dir}" />
|
||||
<jacoco:coverage destfile="${coverage.dir}/jacoco.exec">
|
||||
<!--<jacoco:coverage destfile="${coverage.dir}/jacoco.exec">-->
|
||||
<testng
|
||||
outputDir="${test.result.dir}"
|
||||
haltOnFailure="${test.halt.failure}" verbose="2" workingDir="${basedir}">
|
||||
@@ -145,9 +145,9 @@
|
||||
<jvmarg value="-noverify" />
|
||||
<classfileset dir="${compile.test.dir}" includes="**/*.class" />
|
||||
</testng>
|
||||
</jacoco:coverage>
|
||||
<!--</jacoco:coverage>-->
|
||||
|
||||
<!-- Coverage report -->
|
||||
<!-- Coverage report
|
||||
<mkdir dir="${coverage.result.dir}"/>
|
||||
<jacoco:report>
|
||||
<executiondata>
|
||||
@@ -162,7 +162,7 @@
|
||||
</sourcefiles>
|
||||
</structure>
|
||||
<html destdir="${coverage.result.dir}" />
|
||||
</jacoco:report>
|
||||
</jacoco:report> -->
|
||||
</target>
|
||||
|
||||
<condition property="is_windows">
|
||||
@@ -263,12 +263,12 @@
|
||||
<fileset dir="${app.installer.dir}/root" />
|
||||
</length>
|
||||
|
||||
<script language="javascript">
|
||||
<script language="beanshell" classpathref="ant.lib.classpath">
|
||||
<![CDATA[
|
||||
var length_bytes = project.getProperty("app.installer.files.size.bytes");
|
||||
var length_kbytes = Math.round((length_bytes / 1024) * Math.pow(10,2))
|
||||
long length_bytes = Long.parseLong(project.getProperty("app.installer.files.size.bytes"));
|
||||
long length_kbytes = Math.round((length_bytes / 1024) * Math.pow(10,2))
|
||||
/ Math.pow(10,2);
|
||||
project.setNewProperty("app.installer.files.size.kilobytes", length_kbytes);
|
||||
project.setNewProperty("app.installer.files.size.kilobytes", "" + length_kbytes);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
|
||||
<target name="osx-app-bundle" depends="-loadversion,dist">
|
||||
<property name="app.script.temp" value="${app.bundle.dir}/${app.osx.dir}.app/Contents/MacOS/${app.osx.dir}"/>
|
||||
<echo file="${app.script.temp}">#!/bin/bash $(dirname "$${BASH_SOURCE[0]}")/../Resources/${app.script} "$$@"</echo>
|
||||
<echo file="${app.script.temp}">#!/usr/bin/env bash $(dirname "$${BASH_SOURCE[0]}")/../Resources/${app.script} "$$@"</echo>
|
||||
<property name="app.info.temp" value="${app.bundle.dir}/${app.osx.dir}.app/Contents/Info.plist"/>
|
||||
<echo file="${app.info.temp}"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
@@ -405,6 +405,7 @@
|
||||
<maxHeapPercent>${max.heap.size.percent}</maxHeapPercent>
|
||||
<opt>-Djava.net.preferIPv4Stack=true</opt>
|
||||
<opt>-Djna.nosys=true</opt>
|
||||
<opt>-Dsun.java2d.uiScale=1.0</opt>
|
||||
</jre>
|
||||
<splash>
|
||||
<file>graphics/splash2.bmp</file>
|
||||
@@ -428,14 +429,14 @@
|
||||
</echoxml>
|
||||
</target>
|
||||
<target name="-exe-linux" unless="is_windows" depends="-load-tools,-exe-config">
|
||||
<exec dir="${launch4j.path}" executable="${launch4j.path}/launch4j" failonerror="true">
|
||||
<arg file="${exe.config}" />
|
||||
</exec>
|
||||
<java jar="${launch4j.path}/launch4j.jar" fork="true">
|
||||
<arg line="${exe.config}" />
|
||||
</java>
|
||||
</target>
|
||||
<target name="-exe-windows" if="is_windows" depends="-load-tools,-exe-config">
|
||||
<exec dir="${launch4j.path}" executable="${launch4j.path}\launch4jc.exe" failonerror="true">
|
||||
<arg file="${exe.config}" />
|
||||
</exec>
|
||||
<java jar="${launch4j.path}/launch4j.jar" fork="true">
|
||||
<arg line="${exe.config}" />
|
||||
</java>
|
||||
</target>
|
||||
<target name="exe" depends="-set-gui-type,-exe-linux,-exe-windows">
|
||||
|
||||
@@ -667,6 +668,7 @@
|
||||
<java jar="${dist.dir}/${jar.filename}.jar" fork="true">
|
||||
<jvmarg value="-Xmx${max.heap.size.run}m" />
|
||||
<jvmarg value="-Djava.net.preferIPv4Stack=true" />
|
||||
<jvmarg value="-Dsun.java2d.uiScale=1.0" />
|
||||
<arg line="${run.params}" />
|
||||
</java>
|
||||
</target>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
git add . -u
|
||||
git commit -m "Saving files before refreshing line endings"
|
||||
@@ -6,4 +6,4 @@ git rm --cached -r .
|
||||
git reset --hard
|
||||
git add .
|
||||
set +e
|
||||
git commit -m "Normalize all the line endings"
|
||||
git commit -m "Normalize all the line endings"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
!define APP_URL "https://github.com/jindrapetrik/jpexs-decompiler"
|
||||
!define APP_PUBLISHER "JPEXS"
|
||||
!define APP_NAME "JPEXS Free Flash Decompiler"
|
||||
!define JRE_VERSION "1.8"
|
||||
; !define JRE_VERSION "1.8"
|
||||
!endif
|
||||
|
||||
Unicode true
|
||||
@@ -29,7 +29,7 @@ Unicode true
|
||||
SetCompressor /SOLID lzma
|
||||
!include "StrFunc.nsh"
|
||||
${StrLoc}
|
||||
!include "nsis_plugins\JREDyna_Inetc.nsh"
|
||||
;!include "nsis_plugins\JREDyna_Inetc.nsh"
|
||||
|
||||
;Old not working
|
||||
;!define FLASH_URL "http://download.macromedia.com/pub/flashplayer/current/support/install_flash_player_ax.exe"
|
||||
@@ -292,7 +292,7 @@ IntOp ${Var} $0 - $1
|
||||
!insertmacro MUI_PAGE_LICENSE "resources/license.txt"
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro CUSTOM_PAGE_JREINFO
|
||||
;!insertmacro CUSTOM_PAGE_JREINFO
|
||||
!insertmacro CUSTOM_PAGE_FLASHINFO
|
||||
|
||||
var SMDir
|
||||
@@ -680,7 +680,7 @@ Section "FFDec" SecDummy
|
||||
;Create un1installer
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
call DownloadAndInstallJREIfNecessary
|
||||
;call DownloadAndInstallJREIfNecessary
|
||||
call DownloadAndInstallFlashIfNecessary
|
||||
|
||||
SectionEnd
|
||||
|
||||
BIN
libsrc/ffdec_lib/antlib/bsh-2.0b6.jar
Normal file
BIN
libsrc/ffdec_lib/antlib/bsh-2.0b6.jar
Normal file
Binary file not shown.
@@ -11,7 +11,7 @@
|
||||
<fileset dir="${ant.lib.dir}" includes="**/*.jar"/>
|
||||
</path>
|
||||
<taskdef name="testng" classname="org.testng.TestNGAntTask" classpathref="ant.lib.classpath" />
|
||||
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpathref="ant.lib.classpath" />
|
||||
<!--<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpathref="ant.lib.classpath" />-->
|
||||
<taskdef name="jflex" classname="jflex.anttask.JFlexTask" classpathref="ant.lib.classpath" />
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<mkdir dir="${lib.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${compile.dir}" includes="**/*.java" target="${target.java}" source="${target.java}" debug="true"
|
||||
debuglevel="lines,vars,source" includeantruntime="false" encoding="utf-8">
|
||||
<compilerarg line="-Xlint:unchecked"/> <!-- For Java 8: -Xdiags:verbose -->
|
||||
<compilerarg line="-Xlint:unchecked -Xlint:deprecation"/> <!-- For Java 8: -Xdiags:verbose -->
|
||||
<classpath>
|
||||
<fileset dir="${lib.dir}" includes="**/*.jar"/>
|
||||
</classpath>
|
||||
@@ -84,7 +84,7 @@
|
||||
<mkdir dir="${test.result.dir}/raw/"/>
|
||||
|
||||
<mkdir dir="${coverage.dir}" />
|
||||
<jacoco:coverage destfile="${coverage.dir}/jacoco.exec">
|
||||
<!--<jacoco:coverage destfile="${coverage.dir}/jacoco.exec">-->
|
||||
<testng
|
||||
outputDir="${test.result.dir}"
|
||||
haltOnFailure="${test.halt}" verbose="2" workingDir="${basedir}" >
|
||||
@@ -99,11 +99,11 @@
|
||||
<classfileset dir="${compile.test.dir}" includes="**/*.class" />
|
||||
|
||||
</testng>
|
||||
</jacoco:coverage>
|
||||
<!--</jacoco:coverage>-->
|
||||
<!-- Coverage report -->
|
||||
<mkdir dir="${coverage.result.dir}"/>
|
||||
|
||||
<jacoco:report>
|
||||
<!--<jacoco:report>
|
||||
<executiondata>
|
||||
<file file="${coverage.dir}/jacoco.exec" />
|
||||
</executiondata>
|
||||
@@ -117,6 +117,7 @@
|
||||
</structure>
|
||||
<html destdir="${coverage.result.dir}" />
|
||||
</jacoco:report>
|
||||
-->
|
||||
</target>
|
||||
|
||||
|
||||
@@ -205,12 +206,12 @@
|
||||
<target name="-load-version" depends="-check-versionfile-exists,-load-version-file,-load-version-private">
|
||||
<property name="version" value="${version.major}.${version.minor}.${version.release}" />
|
||||
<property name="version.number" value="${version.major}.${version.minor}.${version.release}.${version.build}" />
|
||||
<script language="javascript">
|
||||
<script language="beanshell" classpathref="ant.lib.classpath">
|
||||
|
||||
if(project.getProperty("version.major")=="0") {
|
||||
project.setProperty("private",true);
|
||||
} else if(project.getProperty("version.debug")=="true") {
|
||||
project.setProperty("nightly",true);
|
||||
if("0".equals(project.getProperty("version.major"))) {
|
||||
project.setProperty("private","true");
|
||||
} else if("true".equals("" + project.getProperty("version.debug"))) {
|
||||
project.setProperty("nightly","true");
|
||||
}
|
||||
</script>
|
||||
</target>
|
||||
@@ -284,16 +285,12 @@
|
||||
<globmapper from="*" to="/*"/>
|
||||
</chainedmapper>
|
||||
</pathconvert>
|
||||
<script language="javascript"><![CDATA[
|
||||
var classpath = project.getProperty("lexers");
|
||||
// + '' converts from a Java string to a JavaScript string, in order
|
||||
// to have .split() behave predictably on all installations.
|
||||
// Otherwise, some versions of ANT will treat it's argument as a regex
|
||||
// while others will not.
|
||||
var parts = (classpath + '').split('|');
|
||||
for each (var part in parts) {
|
||||
<script language="beanshell" classpathref="ant.lib.classpath"><![CDATA[
|
||||
String classpath = project.getProperty("lexers");
|
||||
String[] parts = (classpath + "").split("\\|");
|
||||
for (String part : parts) {
|
||||
project.setProperty("lexer",project.getProperty("lexers.dir")+part);
|
||||
self.project.executeTarget("-lexer");
|
||||
project.executeTarget("-lexer");
|
||||
}
|
||||
]]></script>
|
||||
</target>
|
||||
|
||||
@@ -675,12 +675,7 @@ public class SWFInputStream implements AutoCloseable {
|
||||
public float readFIXED8(String name) throws IOException {
|
||||
newDumpLevel(name, "FIXED8");
|
||||
int afterPoint = readEx();
|
||||
int beforePoint = readSI8Internal();
|
||||
float ret;
|
||||
if (beforePoint < 0) {
|
||||
ret = beforePoint - ((float) afterPoint) / 256;
|
||||
} else {
|
||||
ret = beforePoint + ((float) afterPoint) / 256;
|
||||
int beforePoint = readSI8Internal();
|
||||
float ret = beforePoint + ((float) afterPoint) / 256;
|
||||
endDumpLevel(ret);
|
||||
return ret;
|
||||
|
||||
@@ -312,9 +312,9 @@ public class SWFOutputStream extends OutputStream {
|
||||
* @param value FIXED8 value
|
||||
* @throws IOException
|
||||
*/
|
||||
public void writeFIXED8(float value) throws IOException {
|
||||
final int divisor = 1 << 8;
|
||||
int beforePoint = (int) value;
|
||||
public void writeFIXED8(float value) throws IOException {
|
||||
int valueInt = (int) (value * (1 << 8));
|
||||
int beforePoint = (int) valueInt >> 8;
|
||||
int afterPoint = (int) valueInt % (1 << 8);
|
||||
writeUI8(afterPoint);
|
||||
writeSI8(beforePoint);
|
||||
|
||||
@@ -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.abc;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -576,7 +577,7 @@ public class ScriptPack extends AS3ClassTreeItem {
|
||||
int scriptInitBody = abc.findBodyIndex(abc.script_info.get(scriptIndex).init_index);
|
||||
|
||||
if (!bodyToIdentifier.containsKey(scriptInitBody)) {
|
||||
if (!bodyToIdentifier.containsKey(scriptInitBody)) {
|
||||
bodyToIdentifier.put(scriptInitBody, "abc:" + abcIndex + ",script:" + scriptIndex + ",class:-1,trait:-3,method:" + abc.script_info.get(scriptIndex).init_index + ",body:" + scriptInitBody);
|
||||
}
|
||||
|
||||
String pkg = path.packageStr.toString();
|
||||
|
||||
@@ -2937,4 +2937,10 @@ public class AVM2Code implements Cloneable {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
}
|
||||
|
||||
public void markVirtualAddresses() {
|
||||
for (AVM2Instruction ins : code) {
|
||||
ins.setVirtualAddress(ins.getAddress());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,8 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
|
||||
|
||||
private String file;
|
||||
|
||||
private long virtualAddress = -1;
|
||||
|
||||
@Override
|
||||
public long getFileOffset() {
|
||||
return -1;
|
||||
@@ -70,6 +72,9 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
|
||||
|
||||
@Override
|
||||
public long getLineOffset() {
|
||||
if (virtualAddress > -1) {
|
||||
return virtualAddress;
|
||||
}
|
||||
return getAddress();
|
||||
}
|
||||
|
||||
@@ -530,4 +535,13 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
|
||||
body.setModified();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getVirtualAddress() {
|
||||
return virtualAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVirtualAddress(long virtualAddress) {
|
||||
this.virtualAddress = virtualAddress;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.abc.avm2.instructions.localregs;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.AVM2LocalData;
|
||||
@@ -23,6 +24,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.DecLocalAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.LocalRegAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.PostDecrementAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.operations.SubtractAVM2Item;
|
||||
import com.jpexs.decompiler.flash.ecma.EcmaScript;
|
||||
import com.jpexs.decompiler.flash.ecma.NotCompileTime;
|
||||
@@ -54,7 +57,20 @@ public class DecLocalIIns extends InstructionDefinition {
|
||||
@Override
|
||||
public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List<GraphTargetItem> output, String path) {
|
||||
int regId = ins.operands[0];
|
||||
int regId = ins.operands[0];
|
||||
boolean isPostDec = false;
|
||||
if (!stack.isEmpty()) {
|
||||
GraphTargetItem stackTop = stack.peek();
|
||||
if (stackTop instanceof LocalRegAVM2Item) {
|
||||
if (regId == ((LocalRegAVM2Item) stackTop).regIndex) {
|
||||
stack.pop();
|
||||
stack.push(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, stackTop));
|
||||
isPostDec = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isPostDec) {
|
||||
output.add(new DecLocalAVM2Item(ins, localData.lineStartInstruction, regId));
|
||||
}
|
||||
if (localData.localRegs.containsKey(regId)) {
|
||||
localData.localRegs.put(regId, new SubtractAVM2Item(ins, localData.lineStartInstruction, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, localData.lineStartInstruction, 1L)));
|
||||
} else {
|
||||
|
||||
@@ -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.abc.avm2.instructions.localregs;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.AVM2LocalData;
|
||||
@@ -23,6 +24,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.DecLocalAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.LocalRegAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.PostDecrementAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.operations.SubtractAVM2Item;
|
||||
import com.jpexs.decompiler.flash.ecma.EcmaScript;
|
||||
import com.jpexs.decompiler.flash.ecma.NotCompileTime;
|
||||
@@ -54,7 +57,20 @@ public class DecLocalIns extends InstructionDefinition {
|
||||
@Override
|
||||
public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List<GraphTargetItem> output, String path) {
|
||||
int regId = ins.operands[0];
|
||||
int regId = ins.operands[0];
|
||||
boolean isPostDec = false;
|
||||
if (!stack.isEmpty()) {
|
||||
GraphTargetItem stackTop = stack.peek();
|
||||
if (stackTop instanceof LocalRegAVM2Item) {
|
||||
if (regId == ((LocalRegAVM2Item) stackTop).regIndex) {
|
||||
stack.pop();
|
||||
stack.push(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, stackTop));
|
||||
isPostDec = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isPostDec) {
|
||||
output.add(new DecLocalAVM2Item(ins, localData.lineStartInstruction, regId));
|
||||
}
|
||||
if (localData.localRegs.containsKey(regId)) {
|
||||
localData.localRegs.put(regId, new SubtractAVM2Item(ins, localData.lineStartInstruction, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, localData.lineStartInstruction, 1L)));
|
||||
} else {
|
||||
|
||||
@@ -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.abc.avm2.instructions.localregs;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.AVM2LocalData;
|
||||
@@ -23,6 +24,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.IncLocalAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.LocalRegAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.PostIncrementAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.operations.AddAVM2Item;
|
||||
import com.jpexs.decompiler.flash.ecma.EcmaScript;
|
||||
import com.jpexs.decompiler.flash.ecma.NotCompileTime;
|
||||
@@ -54,11 +57,22 @@ public class IncLocalIIns extends InstructionDefinition {
|
||||
@Override
|
||||
public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List<GraphTargetItem> output, String path) {
|
||||
int regId = ins.operands[0];
|
||||
int regId = ins.operands[0];
|
||||
boolean isPostInc = false;
|
||||
if (!stack.isEmpty()) {
|
||||
GraphTargetItem stackTop = stack.peek();
|
||||
if (stackTop instanceof LocalRegAVM2Item) {
|
||||
if (regId == ((LocalRegAVM2Item) stackTop).regIndex) {
|
||||
stack.pop();
|
||||
stack.push(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, stackTop));
|
||||
isPostInc = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isPostInc) {
|
||||
output.add(new IncLocalAVM2Item(ins, localData.lineStartInstruction, regId));
|
||||
}
|
||||
if (localData.localRegs.containsKey(regId)) {
|
||||
localData.localRegs.put(regId, new AddAVM2Item(ins, localData.lineStartInstruction, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, localData.lineStartInstruction, 1L)));
|
||||
localData.localRegs.put(regId, new AddAVM2Item(ins, localData.lineStartInstruction, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, localData.lineStartInstruction, 1L)));
|
||||
} else {
|
||||
}
|
||||
if (!localData.localRegAssignmentIps.containsKey(regId)) {
|
||||
localData.localRegAssignmentIps.put(regId, 0);
|
||||
|
||||
@@ -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.abc.avm2.instructions.localregs;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.AVM2LocalData;
|
||||
@@ -23,6 +24,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.IncLocalAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.LocalRegAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.PostIncrementAVM2Item;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.operations.AddAVM2Item;
|
||||
import com.jpexs.decompiler.flash.ecma.EcmaScript;
|
||||
import com.jpexs.decompiler.flash.ecma.NotCompileTime;
|
||||
@@ -54,7 +57,20 @@ public class IncLocalIns extends InstructionDefinition {
|
||||
@Override
|
||||
public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List<GraphTargetItem> output, String path) {
|
||||
int regId = ins.operands[0];
|
||||
int regId = ins.operands[0];
|
||||
boolean isPostInc = false;
|
||||
if (!stack.isEmpty()) {
|
||||
GraphTargetItem stackTop = stack.peek();
|
||||
if (stackTop instanceof LocalRegAVM2Item) {
|
||||
if (regId == ((LocalRegAVM2Item) stackTop).regIndex) {
|
||||
stack.pop();
|
||||
stack.push(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, stackTop));
|
||||
isPostInc = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isPostInc) {
|
||||
output.add(new IncLocalAVM2Item(ins, localData.lineStartInstruction, regId));
|
||||
}
|
||||
if (localData.localRegs.containsKey(regId)) {
|
||||
localData.localRegs.put(regId, new AddAVM2Item(ins, localData.lineStartInstruction, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, localData.lineStartInstruction, 1L)));
|
||||
} else {
|
||||
|
||||
@@ -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.abc.avm2.instructions.other;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
@@ -60,7 +61,7 @@ public class GetGlobalSlotIns extends InstructionDefinition {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
stack.push(new GetSlotAVM2Item(ins, localData.lineStartInstruction, obj, obj, slotIndex, slotname));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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.abc.avm2.instructions.other;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
@@ -47,8 +48,8 @@ public class GetSlotIns extends InstructionDefinition {
|
||||
@Override
|
||||
public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List<GraphTargetItem> output, String path) {
|
||||
int slotIndex = ins.operands[0];
|
||||
int slotIndex = ins.operands[0];
|
||||
GraphTargetItem obj = stack.pop(); //scope
|
||||
GraphTargetItem objinreg = stack.pop(); //scope
|
||||
GraphTargetItem obj = objinreg.getThroughRegister();
|
||||
Multiname slotname = null;
|
||||
if (obj instanceof ExceptionAVM2Item) {
|
||||
slotname = localData.getConstants().getMultiname(((ExceptionAVM2Item) obj).exception.name_index);
|
||||
@@ -79,7 +80,7 @@ public class GetSlotIns extends InstructionDefinition {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
stack.push(new GetSlotAVM2Item(ins, localData.lineStartInstruction, obj, objinreg, slotIndex, slotname));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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.abc.avm2.instructions.other;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
@@ -162,7 +163,7 @@ public class SetSlotIns extends InstructionDefinition implements SetTypeIns {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
output.add(new SetSlotAVM2Item(ins, localData.lineStartInstruction, obj, objnoreg, slotIndex, slotname, value));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -46,6 +48,11 @@ public class AlchemyLoadAVM2Item extends AVM2Item {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(ofs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
writer.append("l").append(type).append(size).append("(");
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -21,6 +22,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -45,6 +47,14 @@ public class AlchemyStoreAVM2Item extends AVM2Item {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(ofs);
|
||||
if (value != null) {
|
||||
visitor.visit(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
writer.append("s").append(type).append(size).append("(");
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -21,6 +22,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -44,6 +46,12 @@ public class ApplyTypeAVM2Item extends AVM2Item {
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visitAll(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -12,13 +12,15 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.ecma.EcmaScript;
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.Callable;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -142,6 +144,13 @@ public class CallAVM2Item extends AVM2Item {
|
||||
this.arguments = arguments;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(receiver);
|
||||
visitor.visit(function);
|
||||
visitor.visitAll(arguments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getResult() {
|
||||
if (!isCompileTime()) {
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.List;
|
||||
@@ -41,6 +43,12 @@ public class CallMethodAVM2Item extends AVM2Item {
|
||||
this.arguments = arguments;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(receiver);
|
||||
visitor.visitAll(arguments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
receiver.toString(writer, localData);
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -23,6 +24,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -50,6 +52,13 @@ public class CallPropertyAVM2Item extends AVM2Item {
|
||||
this.isVoid = isVoid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(receiver);
|
||||
visitor.visit(propertyName);
|
||||
visitor.visitAll(arguments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
formatProperty(writer, receiver, propertyName, localData);
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.List;
|
||||
@@ -41,6 +43,12 @@ public class CallStaticAVM2Item extends AVM2Item {
|
||||
this.arguments = arguments;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(receiver);
|
||||
visitor.visitAll(arguments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
receiver.toString(writer, localData);
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.List;
|
||||
@@ -44,6 +46,13 @@ public class CallSuperAVM2Item extends AVM2Item {
|
||||
this.isVoid = isVoid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(receiver);
|
||||
visitor.visit(multiname);
|
||||
visitor.visitAll(arguments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
if (!receiver.toString().equals("this") && !(receiver instanceof FindPropertyAVM2Item)) {
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -25,6 +26,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -44,6 +46,14 @@ public class CoerceAVM2Item extends AVM2Item {
|
||||
this.typeObj = typeObj;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(typeObj);
|
||||
if (value != null) {
|
||||
visitor.visit(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
//return hilight("(" + type + ")", highlight)+
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.List;
|
||||
|
||||
@@ -37,6 +39,12 @@ public class ConstructAVM2Item extends AVM2Item {
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visitAll(args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
if (object instanceof NewFunctionAVM2Item) {
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.List;
|
||||
@@ -41,12 +43,18 @@ public class ConstructPropAVM2Item extends AVM2Item {
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visit(propertyName);
|
||||
visitor.visitAll(args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
writer.append("new ");
|
||||
writer.append("new ");
|
||||
int idx = writer.getLength();
|
||||
object.toString(writer, localData);
|
||||
if (!(object instanceof FindPropertyAVM2Item)) {
|
||||
object.toString(writer, localData);
|
||||
writer.append(".");
|
||||
}
|
||||
propertyName.toString(writer, localData);
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -43,6 +45,12 @@ public class ConstructSuperAVM2Item extends AVM2Item {
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visitAll(args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
if (!object.toString().equals("this")) {
|
||||
|
||||
@@ -12,13 +12,15 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.ecma.EcmaScript;
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -35,6 +37,14 @@ public class ConvertAVM2Item extends AVM2Item {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(type);
|
||||
if (value != null) {
|
||||
visitor.visit(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
type.toString(writer, localData).append("(");
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -21,6 +22,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -39,6 +41,11 @@ public class DefaultXMLNamespace extends AVM2Item {
|
||||
this.ns = ns;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(ns);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
writer.append("default xml namespace = ");
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
|
||||
@@ -34,6 +36,11 @@ public class FilteredCheckAVM2Item extends AVM2Item {
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
return object.toString(writer, localData);
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
|
||||
@@ -35,7 +37,15 @@ public class FindPropertyAVM2Item extends AVM2Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(propertyName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
writer.append("§§findproperty(");
|
||||
propertyName.appendTo(writer, localData);
|
||||
writer.append(")");
|
||||
return writer;
|
||||
}
|
||||
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
|
||||
@@ -21,6 +22,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -70,6 +72,16 @@ public class FullMultinameAVM2Item extends AVM2Item {
|
||||
this.resolvedMultinameName = resolvedMultinameName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
if (name != null) {
|
||||
visitor.visit(name);
|
||||
}
|
||||
if (namespace != null) {
|
||||
visitor.visit(namespace);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isRuntime() {
|
||||
return (name != null) || (namespace != null);
|
||||
}
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -49,6 +51,11 @@ public class GetDescendantsAVM2Item extends AVM2Item {
|
||||
this.openedNamespaces = openedNamespaces;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
}
|
||||
|
||||
public GetDescendantsAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem multiname) {
|
||||
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
|
||||
this.object = object;
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -27,6 +28,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SimpleValue;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
@@ -44,6 +46,12 @@ public class GetPropertyAVM2Item extends AVM2Item {
|
||||
|
||||
public GraphTargetItem propertyName;
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visit(propertyName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConvertedCompileTime(Set<GraphTargetItem> dependencies) {
|
||||
if (object != null && object.isCompileTime() && (propertyName instanceof FullMultinameAVM2Item) && (((FullMultinameAVM2Item) propertyName).name != null) && (((FullMultinameAVM2Item) propertyName).name.isCompileTime()) && "constructor".equals(((FullMultinameAVM2Item) propertyName).name.getResult())) {
|
||||
|
||||
@@ -12,13 +12,15 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.types.Multiname;
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
|
||||
@@ -32,31 +34,40 @@ public class GetSlotAVM2Item extends AVM2Item {
|
||||
|
||||
public GraphTargetItem scope;
|
||||
|
||||
|
||||
public GraphTargetItem slotObject;
|
||||
|
||||
public int slotIndex;
|
||||
|
||||
public GetSlotAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope, GraphTargetItem slotObject, int slotIndex, Multiname slotName) {
|
||||
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
|
||||
this.slotName = slotName;
|
||||
this.scope = scope;
|
||||
this.slotObject = slotObject;
|
||||
this.slotIndex = slotIndex;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) {
|
||||
if (slotName == null) {
|
||||
return writer.append("/*UnknownSlot*/");
|
||||
}
|
||||
|
||||
getSrcData().localName = getNameAsStr(localData);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(scope);
|
||||
visitor.visit(slotObject);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
String name = getNameAsStr(localData);
|
||||
getSrcData().localName = name;
|
||||
return writer.append(name);
|
||||
}
|
||||
|
||||
public String getNameAsStr(LocalData localData) throws InterruptedException {
|
||||
if (slotName == null) {
|
||||
return slotObject.toString(localData) + ".§§slot[" + slotIndex + "]";
|
||||
}
|
||||
return slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false, true);
|
||||
}
|
||||
|
||||
|
||||
public GraphTextWriter getName(GraphTextWriter writer, LocalData localData) {
|
||||
if (slotName == null) {
|
||||
return writer.append("/*UnknownSlot*/");
|
||||
}
|
||||
public GraphTextWriter getName(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
return writer.append(getNameAsStr(localData));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
|
||||
@@ -37,12 +39,17 @@ public class GetSuperAVM2Item extends AVM2Item {
|
||||
this.propertyName = propertyName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visit(propertyName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
if (!object.toString().equals("this")) {
|
||||
if (!object.toString().equals("this")) {
|
||||
int length = writer.getLength();
|
||||
object.toString(writer, localData);
|
||||
if (!(object instanceof FindPropertyAVM2Item)) {
|
||||
object.toString(writer, localData);
|
||||
writer.append(".");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -21,6 +22,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -42,6 +44,12 @@ public class HasNextAVM2Item extends AVM2Item {
|
||||
this.obj = obj;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(index);
|
||||
visitor.visit(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException {
|
||||
if ((index instanceof LocalRegAVM2Item) && (obj instanceof LocalRegAVM2Item)) {
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -21,6 +22,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -42,6 +44,12 @@ public class InAVM2Item extends AVM2Item {
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visit(collection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
object.toString(writer, localData);
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item;
|
||||
@@ -20,6 +21,7 @@ import com.jpexs.decompiler.flash.abc.avm2.model.clauses.DeclarationAVM2Item;
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
|
||||
@@ -35,6 +37,13 @@ public class InitPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, A
|
||||
|
||||
public DeclarationAVM2Item declaration;
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visit(propertyName);
|
||||
visitor.visit(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeclarationAVM2Item getDeclaration() {
|
||||
return declaration;
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -29,6 +30,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -63,6 +65,12 @@ public class InitVectorAVM2Item extends AVM2Item {
|
||||
return NamespaceItem.getCpoolSetIndex(abc, openedNamespaces);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(subtype);
|
||||
visitor.visitAll(arguments);
|
||||
}
|
||||
|
||||
public InitVectorAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem subtype, List<GraphTargetItem> arguments) {
|
||||
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
|
||||
this.subtype = subtype;
|
||||
|
||||
@@ -12,11 +12,13 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import com.jpexs.decompiler.graph.model.TernarOpItem;
|
||||
@@ -34,6 +36,14 @@ public class NameValuePair extends AVM2Item {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(name);
|
||||
if (value != null) {
|
||||
visitor.visit(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
name.toStringString(writer, localData);
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -23,6 +24,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -43,6 +45,11 @@ public class NewArrayAVM2Item extends AVM2Item {
|
||||
this.values = values;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visitAll(values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
writer.append("[");
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -47,6 +49,13 @@ public class NewObjectAVM2Item extends AVM2Item {
|
||||
this.pairs = pairs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
for (NameValuePair p : pairs) {
|
||||
visitor.visit(p);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
boolean singleLine = pairs.size() < 2;
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -21,6 +22,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -42,6 +44,12 @@ public class NextNameAVM2Item extends AVM2Item {
|
||||
this.obj = obj;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(index);
|
||||
visitor.visit(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
writer.append("§§nextname");
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -21,6 +22,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -42,6 +44,12 @@ public class NextValueAVM2Item extends AVM2Item {
|
||||
this.obj = obj;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(index);
|
||||
visitor.visit(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException {
|
||||
return toSourceMerge(localData, generator, obj, index, ins(AVM2Instructions.NextValue));
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -40,6 +42,11 @@ public class PostDecrementAVM2Item extends AVM2Item implements AssignmentAVM2Ite
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
object.toString(writer, localData);
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -40,6 +42,11 @@ public class PostIncrementAVM2Item extends AVM2Item implements AssignmentAVM2Ite
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
object.toString(writer, localData);
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
@@ -42,7 +43,7 @@ public class SetGlobalSlotAVM2Item extends AVM2Item {
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
writer.append("§§setglobalslot");
|
||||
writer.spaceBeforeCallParenthesies(2);
|
||||
writer.append("(");
|
||||
writer.append(slotId).append(",");
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphPart;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -58,6 +60,13 @@ public class SetPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, As
|
||||
return value.getFirstPart();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visit(propertyName);
|
||||
visitor.visit(value);
|
||||
}
|
||||
|
||||
public SetPropertyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem propertyName, GraphTargetItem value) {
|
||||
super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT);
|
||||
this.object = object;
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item;
|
||||
@@ -22,6 +23,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphPart;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
|
||||
@@ -37,6 +39,16 @@ public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assign
|
||||
|
||||
public DeclarationAVM2Item declaration;
|
||||
|
||||
public GraphTargetItem slotObject;
|
||||
|
||||
public int slotIndex;
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(scope);
|
||||
visitor.visit(slotObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeclarationAVM2Item getDeclaration() {
|
||||
return declaration;
|
||||
@@ -47,10 +59,12 @@ public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assign
|
||||
this.declaration = declaration;
|
||||
}
|
||||
|
||||
|
||||
public SetSlotAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope, GraphTargetItem slotObject, int slotIndex, Multiname slotName, GraphTargetItem value) {
|
||||
super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value);
|
||||
this.slotName = slotName;
|
||||
this.scope = scope;
|
||||
this.slotObject = slotObject;
|
||||
this.slotIndex = slotIndex;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,7 +74,7 @@ public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assign
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
getSrcData().localName = getNameAsStr(localData);
|
||||
if (getSrcData().localName.equals(value.toString(localData))) {
|
||||
//assigning parameters to activation reg
|
||||
return writer;
|
||||
@@ -73,20 +87,20 @@ public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assign
|
||||
return value.toString(writer, localData);
|
||||
}
|
||||
|
||||
|
||||
public String getNameAsStr(LocalData localData) {
|
||||
public String getNameAsStr(LocalData localData) throws InterruptedException {
|
||||
if (slotName == null) {
|
||||
return slotObject.toString(localData) + ".§§slot[" + slotIndex + "]";
|
||||
}
|
||||
return slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false, true);
|
||||
}
|
||||
|
||||
|
||||
public GraphTextWriter getName(GraphTextWriter writer, LocalData localData) {
|
||||
if (slotName == null) {
|
||||
return writer.append("/*UnknownSlot*/");
|
||||
}
|
||||
public GraphTextWriter getName(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
return writer.append(getNameAsStr(localData));
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTargetItem getObject() {
|
||||
public GraphTargetItem getObject() {
|
||||
return new GetSlotAVM2Item(getInstruction(), getLineStartIns(), scope, slotObject, slotIndex, slotName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,13 +12,15 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphPart;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
|
||||
@@ -32,6 +34,15 @@ public class SetSuperAVM2Item extends AVM2Item {
|
||||
|
||||
public FullMultinameAVM2Item propertyName;
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visit(propertyName);
|
||||
if (value != null) {
|
||||
visitor.visit(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphPart getFirstPart() {
|
||||
return value.getFirstPart();
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -46,6 +48,12 @@ public class WithAVM2Item extends AVM2Item {
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(scope);
|
||||
visitor.visitAll(items);
|
||||
}
|
||||
|
||||
public WithAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope) {
|
||||
super(instruction, lineStartIns, NOPRECEDENCE);
|
||||
this.scope = scope;
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
|
||||
@@ -34,6 +36,11 @@ public class WithEndAVM2Item extends AVM2Item {
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(scope);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) {
|
||||
return writer.endBlock();
|
||||
|
||||
@@ -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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -20,6 +21,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -38,6 +40,11 @@ public class WithObjectAVM2Item extends AVM2Item {
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(scope);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) {
|
||||
return writer;
|
||||
|
||||
@@ -12,13 +12,15 @@
|
||||
* 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.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.List;
|
||||
@@ -36,6 +38,11 @@ public class XMLAVM2Item extends AVM2Item {
|
||||
this.parts = parts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visitAll(parts);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
for (GraphTargetItem part : parts) {
|
||||
|
||||
@@ -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.abc.avm2.model.clauses;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item;
|
||||
@@ -26,6 +27,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.HighlightData;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
|
||||
@@ -45,6 +47,12 @@ public class DeclarationAVM2Item extends AVM2Item {
|
||||
this.assignment = assignment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(type);
|
||||
visitor.visit(assignment);
|
||||
}
|
||||
|
||||
public DeclarationAVM2Item(GraphTargetItem assignment) {
|
||||
this(assignment, null);
|
||||
}
|
||||
|
||||
@@ -12,13 +12,15 @@
|
||||
* 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.abc.avm2.model.clauses;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item;
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
|
||||
@@ -38,6 +40,12 @@ public class FilterAVM2Item extends AVM2Item {
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(expression);
|
||||
visitor.visit(collection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
collection.toString(writer, localData);
|
||||
|
||||
@@ -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.abc.avm2.model.clauses;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.Block;
|
||||
import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.Loop;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
@@ -55,6 +57,12 @@ public class ForEachInAVM2Item extends LoopItem implements Block {
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(expression);
|
||||
visitor.visitAll(commands);
|
||||
}
|
||||
|
||||
public ForEachInAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop, InAVM2Item expression, List<GraphTargetItem> commands) {
|
||||
super(instruction, lineStartIns, loop);
|
||||
|
||||
|
||||
@@ -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.abc.avm2.model.clauses;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.Block;
|
||||
import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.Loop;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
@@ -57,6 +59,12 @@ public class ForInAVM2Item extends LoopItem implements Block {
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(expression);
|
||||
visitor.visitAll(commands);
|
||||
}
|
||||
|
||||
public ForInAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop, InAVM2Item expression, List<GraphTargetItem> commands) {
|
||||
super(instruction, lineStartIns, loop);
|
||||
if (!commands.isEmpty()) {
|
||||
|
||||
@@ -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.abc.avm2.model.clauses;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -29,6 +30,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.ContinueItem;
|
||||
@@ -69,6 +71,24 @@ public class TryAVM2Item extends AVM2Item implements Block {
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
if (tryCommands != null) {
|
||||
visitor.visitAll(tryCommands);
|
||||
}
|
||||
for (List<AssignableAVM2Item> c : catchVariables) {
|
||||
for (AssignableAVM2Item ai : c) {
|
||||
visitor.visit(ai);
|
||||
}
|
||||
}
|
||||
for (List<GraphTargetItem> c : catchCommands) {
|
||||
visitor.visitAll(c);
|
||||
}
|
||||
if (finallyCommands != null) {
|
||||
visitor.visitAll(finallyCommands);
|
||||
}
|
||||
}
|
||||
|
||||
public TryAVM2Item(List<GraphTargetItem> tryCommands, List<ABCException> catchExceptions, List<List<GraphTargetItem>> catchCommands, List<GraphTargetItem> finallyCommands, String finCatchName) {
|
||||
super(null, null, NOPRECEDENCE);
|
||||
this.tryCommands = tryCommands;
|
||||
|
||||
@@ -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.abc.avm2.model.operations;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -51,6 +53,12 @@ public class DeletePropertyAVM2Item extends AVM2Item {
|
||||
this.line = line;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visit(propertyName);
|
||||
}
|
||||
|
||||
public DeletePropertyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem propertyName) {
|
||||
super(instruction, lineStartIns, PRECEDENCE_UNARY);
|
||||
this.object = object;
|
||||
|
||||
@@ -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.abc.methodinfo_parser;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
@@ -176,7 +177,7 @@ public class MethodInfoParser {
|
||||
if (symb.type == ParsedSymbol.TYPE_COLON) {
|
||||
ParsedSymbol symbType = lexer.yylex();
|
||||
if (symbType.type == ParsedSymbol.TYPE_STAR) {
|
||||
if (symbType.type == ParsedSymbol.TYPE_STAR) {
|
||||
paramTypes.add((Long)0L);
|
||||
} else if (symbType.type == ParsedSymbol.TYPE_MULTINAME) {
|
||||
paramTypes.add((Long) symbType.value);
|
||||
} else {
|
||||
|
||||
@@ -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.abc.types;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
@@ -384,6 +385,7 @@ public final class MethodBody implements Cloneable {
|
||||
public MethodBody convertMethodBody(ConvertData convertData, String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, Trait trait, ScopeStack scopeStack, boolean isStaticInitializer, List<DottedChain> fullyQualifiedNames, List<Traits> initTraits) throws InterruptedException {
|
||||
MethodBody body = clone();
|
||||
AVM2Code code = body.getCode();
|
||||
code.markVirtualAddresses();
|
||||
code.fixJumps(path, body);
|
||||
|
||||
if (convertData.deobfuscationMode != 0) {
|
||||
|
||||
@@ -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.abc.types;
|
||||
|
||||
import com.jpexs.decompiler.flash.IdentifiersDeobfuscation;
|
||||
@@ -63,11 +64,11 @@ public class Multiname {
|
||||
|
||||
public int namespace_index;
|
||||
|
||||
|
||||
public /*final JAVA 9*/ int namespace_set_index;
|
||||
|
||||
|
||||
public /*final JAVA 9*/ int qname_index; //for TypeName
|
||||
|
||||
|
||||
public /*final JAVA 9*/ int[] params; //for TypeName
|
||||
|
||||
@Internal
|
||||
public boolean deleted;
|
||||
|
||||
@@ -127,6 +127,8 @@ public abstract class Action implements GraphSourceItem {
|
||||
|
||||
private long address;
|
||||
|
||||
private long virtualAddress = -1;
|
||||
|
||||
@Override
|
||||
public long getLineOffset() {
|
||||
return fileOffset;
|
||||
@@ -1232,4 +1234,14 @@ public abstract class Action implements GraphSourceItem {
|
||||
public String getFile() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getVirtualAddress() {
|
||||
return virtualAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVirtualAddress(long virtualAddress) {
|
||||
this.virtualAddress = virtualAddress;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.List;
|
||||
@@ -44,8 +45,8 @@ public class CallFunctionActionItem extends ActionItem {
|
||||
public GraphTargetItem calculatedFunction;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
return arguments;
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visitAll(arguments);
|
||||
}
|
||||
|
||||
public CallFunctionActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem functionName, List<GraphTargetItem> arguments) {
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -43,11 +44,9 @@ public class CallMethodActionItem extends ActionItem {
|
||||
public List<GraphTargetItem> arguments;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.addAll(arguments);
|
||||
ret.add(scriptObject);
|
||||
return ret;
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visitAll(arguments);
|
||||
visitor.visit(scriptObject);
|
||||
}
|
||||
|
||||
public CallMethodActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scriptObject, GraphTargetItem methodName, List<GraphTargetItem> arguments) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -38,11 +40,9 @@ public class CastOpActionItem extends ActionItem {
|
||||
public GraphTargetItem object;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(constructor);
|
||||
ret.add(object);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(constructor);
|
||||
visitor.visit(object);
|
||||
}
|
||||
|
||||
public CastOpActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem constructor, GraphTargetItem object) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -40,12 +42,9 @@ public class CloneSpriteActionItem extends ActionItem {
|
||||
public GraphTargetItem depth;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(target);
|
||||
ret.add(source);
|
||||
ret.add(depth);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(source);
|
||||
visitor.visit(depth);
|
||||
}
|
||||
|
||||
public CloneSpriteActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem source, GraphTargetItem target, GraphTargetItem depth) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -37,10 +39,8 @@ public class DecrementActionItem extends ActionItem {
|
||||
public GraphTargetItem object;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(object);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
}
|
||||
|
||||
public DecrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.IdentifiersDeobfuscation;
|
||||
@@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -41,13 +43,11 @@ public class DefineLocalActionItem extends ActionItem implements SetTypeActionIt
|
||||
private int tempRegister = -1;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(name);
|
||||
if (value != null) {
|
||||
if (value != null) {
|
||||
visitor.visit(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -41,11 +42,9 @@ public class DeleteActionItem extends ActionItem {
|
||||
public GraphTargetItem propertyName;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(object);
|
||||
ret.add(propertyName);
|
||||
return ret;
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visit(propertyName);
|
||||
}
|
||||
|
||||
public DeleteActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem propertyName) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -37,10 +39,8 @@ public class EnumerateActionItem extends ActionItem {
|
||||
public GraphTargetItem object;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(object);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
}
|
||||
|
||||
public EnumerateActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import static com.jpexs.decompiler.graph.GraphTargetItem.PRECEDENCE_PRIMARY;
|
||||
import static com.jpexs.decompiler.graph.GraphTargetItem.toSourceMerge;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.BranchStackResistant;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -23,9 +24,8 @@ import java.util.List;
|
||||
public class EnumeratedValueActionItem extends ActionItem implements BranchStackResistant {
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
return ret;
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
|
||||
}
|
||||
|
||||
public EnumeratedValueActionItem() {
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import static com.jpexs.decompiler.graph.GraphTargetItem.PRECEDENCE_PRIMARY;
|
||||
import static com.jpexs.decompiler.graph.GraphTargetItem.toSourceMerge;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.BranchStackResistant;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
@@ -23,9 +24,8 @@ import java.util.List;
|
||||
public class EnumerationAssignmentValueActionItem extends ActionItem {
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
return ret;
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
|
||||
}
|
||||
|
||||
public EnumerationAssignmentValueActionItem() {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -41,11 +43,9 @@ public class FSCommand2ActionItem extends ActionItem {
|
||||
public GraphTargetItem command;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.addAll(arguments);
|
||||
ret.add(command);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visitAll(arguments);
|
||||
visitor.visit(command);
|
||||
}
|
||||
|
||||
public FSCommand2ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem command, List<GraphTargetItem> arguments) {
|
||||
|
||||
@@ -33,6 +33,7 @@ import com.jpexs.decompiler.graph.Graph;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import com.jpexs.helpers.Helper;
|
||||
@@ -80,10 +81,8 @@ public class FunctionActionItem extends ActionItem {
|
||||
public static final int REGISTER_GLOBAL = 6;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.addAll(actions);
|
||||
return ret;
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visitAll(actions);
|
||||
}
|
||||
|
||||
public FunctionActionItem() {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.IdentifiersDeobfuscation;
|
||||
@@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -40,10 +42,9 @@ public class GetMemberActionItem extends ActionItem {
|
||||
public final GraphTargetItem memberName;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(object);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
visitor.visit(memberName);
|
||||
}
|
||||
|
||||
public GetMemberActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem memberName) {
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -41,10 +42,8 @@ public class GetPropertyActionItem extends ActionItem {
|
||||
public int propertyIndex;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(target);
|
||||
return ret;
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(target);
|
||||
}
|
||||
|
||||
public GetPropertyActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, int propertyIndex) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -40,11 +42,9 @@ public class GetURL2ActionItem extends ActionItem {
|
||||
public int sendVarsMethod;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(urlString);
|
||||
ret.add(targetString);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(urlString);
|
||||
visitor.visit(targetString);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -54,10 +55,8 @@ public class GetVariableActionItem extends ActionItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(name);
|
||||
return ret;
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(name);
|
||||
}
|
||||
|
||||
public GetVariableActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -24,6 +25,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -44,10 +46,8 @@ public class GotoFrame2ActionItem extends ActionItem {
|
||||
public int sceneBias;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(frame);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(frame);
|
||||
}
|
||||
|
||||
public GotoFrame2ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem frame, boolean sceneBiasFlag, boolean playFlag, int sceneBias) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -37,10 +39,8 @@ public class IncrementActionItem extends ActionItem {
|
||||
public GraphTargetItem object;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(object);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
}
|
||||
|
||||
public IncrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -36,10 +38,8 @@ public class InitArrayActionItem extends ActionItem {
|
||||
public List<GraphTargetItem> values;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.addAll(values);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visitAll(values);
|
||||
}
|
||||
|
||||
public InitArrayActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, List<GraphTargetItem> values) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import com.jpexs.decompiler.graph.model.TernarOpItem;
|
||||
@@ -40,11 +42,9 @@ public class InitObjectActionItem extends ActionItem {
|
||||
public List<GraphTargetItem> values;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.addAll(names);
|
||||
ret.addAll(values);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visitAll(names);
|
||||
visitor.visitAll(values);
|
||||
}
|
||||
|
||||
public InitObjectActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, List<GraphTargetItem> names, List<GraphTargetItem> values) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -21,6 +22,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -39,11 +41,9 @@ public class LoadMovieActionItem extends ActionItem {
|
||||
private final int method;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(urlString);
|
||||
ret.add(targetString);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(urlString);
|
||||
visitor.visit(targetString);
|
||||
}
|
||||
|
||||
public LoadMovieActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem targetString, int method) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -23,6 +24,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -41,11 +43,9 @@ public class LoadMovieNumActionItem extends ActionItem {
|
||||
private final int method;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(urlString);
|
||||
ret.add(num);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(urlString);
|
||||
visitor.visit(num);
|
||||
}
|
||||
|
||||
public LoadMovieNumActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem num, int method) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -21,6 +22,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -39,11 +41,9 @@ public class LoadVariablesActionItem extends ActionItem {
|
||||
private final int method;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(urlString);
|
||||
ret.add(targetString);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(urlString);
|
||||
visitor.visit(targetString);
|
||||
}
|
||||
|
||||
public LoadVariablesActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem targetString, int method) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -23,6 +24,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -41,11 +43,9 @@ public class LoadVariablesNumActionItem extends ActionItem {
|
||||
private final int method;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(urlString);
|
||||
ret.add(num);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(urlString);
|
||||
visitor.visit(num);
|
||||
}
|
||||
|
||||
public LoadVariablesNumActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem num, int method) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -39,12 +41,10 @@ public class MBStringExtractActionItem extends ActionItem {
|
||||
public GraphTargetItem count;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(value);
|
||||
ret.add(index);
|
||||
ret.add(count);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(value);
|
||||
visitor.visit(index);
|
||||
visitor.visit(count);
|
||||
}
|
||||
|
||||
public MBStringExtractActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -41,11 +43,9 @@ public class NewMethodActionItem extends ActionItem {
|
||||
public List<GraphTargetItem> arguments;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(scriptObject);
|
||||
ret.addAll(arguments);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(scriptObject);
|
||||
visitor.visitAll(arguments);
|
||||
}
|
||||
|
||||
public NewMethodActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scriptObject, GraphTargetItem methodName, List<GraphTargetItem> arguments) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItemPos;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -38,11 +40,9 @@ public class NewObjectActionItem extends ActionItem {
|
||||
public List<GraphTargetItem> arguments;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(objectName);
|
||||
ret.addAll(arguments);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(objectName);
|
||||
visitor.visitAll(arguments);
|
||||
}
|
||||
|
||||
public NewObjectActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem objectName, List<GraphTargetItem> arguments) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -30,6 +31,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -46,10 +48,8 @@ public class PostDecrementActionItem extends ActionItem implements SetTypeAction
|
||||
private int tempRegister = -1;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(object);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
}
|
||||
|
||||
public PostDecrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
|
||||
|
||||
@@ -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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -30,6 +31,7 @@ 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.GraphTargetVisitorInterface;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
@@ -46,10 +48,8 @@ public class PostIncrementActionItem extends ActionItem implements SetTypeAction
|
||||
private int tempRegister = -1;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
List<GraphTargetItem> ret = new ArrayList<>();
|
||||
ret.add(object);
|
||||
public void visit(GraphTargetVisitorInterface visitor) {
|
||||
visitor.visit(object);
|
||||
}
|
||||
|
||||
public PostIncrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user