mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 22:21:19 +00:00
AS3 hasnext/nextname fixes
No visited warnings
This commit is contained in:
@@ -1439,7 +1439,7 @@ public class AVM2Code implements Cloneable {
|
||||
throw new UnknownJumpException(stack, ip, output);
|
||||
}
|
||||
if (visited[ip]) {
|
||||
logger.warning("Code already visited, ofs:" + Helper.formatAddress(pos2adr(ip)) + ", ip:" + ip);
|
||||
//logger.warning(path + ": Code already visited, ofs:" + Helper.formatAddress(pos2adr(ip)) + ", ip:" + ip);
|
||||
break;
|
||||
}
|
||||
visited[ip] = true;
|
||||
@@ -1548,11 +1548,14 @@ public class AVM2Code implements Cloneable {
|
||||
if (code.get(t + 1).definition instanceof KillIns) {
|
||||
if (code.get(t + 1).operands[0] == reg) {
|
||||
ConvertOutput assignment = toSourceOutput(path, part, processJumps, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, ip + 2, t - 1, localRegNames, fullyQualifiedNames, visited, localRegAssigmentIps, refs);
|
||||
GraphTargetItem tar = assignment.output.remove(assignment.output.size() - 1);
|
||||
tar.firstPart = part;
|
||||
stack.push(tar);
|
||||
ip = t + 2;
|
||||
continue iploop;
|
||||
if (!assignment.output.isEmpty()) {
|
||||
GraphTargetItem tar = assignment.output.remove(assignment.output.size() - 1);
|
||||
tar.firstPart = part;
|
||||
stack.push(tar);
|
||||
ip = t + 2;
|
||||
|
||||
continue iploop;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+15
-3
@@ -40,9 +40,21 @@ public class HasNextAVM2Item extends AVM2Item {
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
collection.appendTo(writer, localData);
|
||||
writer.append(" hasNext ");
|
||||
return object.appendTo(writer, localData);
|
||||
|
||||
writer.append("§§hasnext(");
|
||||
if (collection != null) {
|
||||
collection.appendTo(writer, localData);
|
||||
} else {
|
||||
writer.append("null");
|
||||
}
|
||||
writer.append(",");
|
||||
if (object != null) {
|
||||
object.appendTo(writer, localData);
|
||||
} else {
|
||||
writer.append("null");
|
||||
}
|
||||
writer.append(")");
|
||||
return writer;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class NextNameAVM2Item extends AVM2Item {
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
writer.append("nextName");
|
||||
writer.append("§§nextname");
|
||||
writer.spaceBeforeCallParenthesies(2);
|
||||
writer.append("(");
|
||||
index.toString(writer, localData);
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class NextValueAVM2Item extends AVM2Item {
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
writer.append("nextValue");
|
||||
writer.append("§§nextvalue");
|
||||
writer.spaceBeforeCallParenthesies(2);
|
||||
writer.append("(");
|
||||
index.toString(writer, localData);
|
||||
|
||||
Reference in New Issue
Block a user