mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 15:50:46 +00:00
Fixed AS3 Debugging - activation object was not visible in locals
This commit is contained in:
@@ -75,9 +75,10 @@ public abstract class GraphTextWriter {
|
||||
* Highlights specified text as method
|
||||
*
|
||||
* @param index MethodInfo index
|
||||
* @param name
|
||||
* @return GraphTextWriter
|
||||
*/
|
||||
public GraphTextWriter startMethod(long index) {
|
||||
public GraphTextWriter startMethod(long index, String name) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -250,4 +251,8 @@ public abstract class GraphTextWriter {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public GraphTextWriter addCurrentMethodData(HighlightData data) {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,9 +116,10 @@ public class HighlightedTextWriter extends GraphTextWriter {
|
||||
* @return HighlightedTextWriter
|
||||
*/
|
||||
@Override
|
||||
public HighlightedTextWriter startMethod(long index) {
|
||||
public HighlightedTextWriter startMethod(long index, String name) {
|
||||
HighlightData data = new HighlightData();
|
||||
data.index = index;
|
||||
data.localName = name;
|
||||
return start(data, HighlightType.METHOD);
|
||||
}
|
||||
|
||||
@@ -309,7 +310,7 @@ public class HighlightedTextWriter extends GraphTextWriter {
|
||||
private HighlightedTextWriter start(HighlightData data, HighlightType type) {
|
||||
if (hilight) {
|
||||
Highlighting h = new Highlighting(sb.length() - newLineCount, data, type, null);
|
||||
hilightStack.add(h);
|
||||
hilightStack.add(h);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -377,4 +378,16 @@ public class HighlightedTextWriter extends GraphTextWriter {
|
||||
appendNoHilight(formatting.indentString);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter addCurrentMethodData(HighlightData data) {
|
||||
for (int i = hilightStack.size() - 1; i >= 0; i--) {
|
||||
Highlighting h = hilightStack.get(i);
|
||||
if (h.type == HighlightType.METHOD) {
|
||||
h.getProperties().merge(data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ public class HighlightData implements Cloneable, Serializable {
|
||||
public int regIndex = -1;
|
||||
|
||||
public int namespaceIndex = -1;
|
||||
|
||||
public int activationRegIndex = -1;
|
||||
|
||||
public boolean isStatic = false;
|
||||
|
||||
@@ -60,7 +62,8 @@ public class HighlightData implements Cloneable, Serializable {
|
||||
&& fileOffset == -1
|
||||
&& namespaceIndex == -1
|
||||
&& propertyType == null
|
||||
&& propertySubType == null;
|
||||
&& propertySubType == null
|
||||
&& activationRegIndex == -1;
|
||||
}
|
||||
|
||||
public void merge(HighlightData data) {
|
||||
@@ -109,6 +112,9 @@ public class HighlightData implements Cloneable, Serializable {
|
||||
if (data.propertySubType != null) {
|
||||
propertySubType = data.propertySubType;
|
||||
}
|
||||
if (data.activationRegIndex != -1) {
|
||||
activationRegIndex = data.activationRegIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user