mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-25 15:55:50 +00:00
AS editing fix + some DottedChain changes
This commit is contained in:
@@ -69,7 +69,7 @@ public class SourceGeneratorLocalData implements Serializable {
|
||||
public boolean subMethod = false;
|
||||
|
||||
public String getFullClass() {
|
||||
return pkg == null || pkg.isEmpty() ? currentClass : pkg + "." + currentClass;
|
||||
return pkg == null || pkg.isEmpty() ? currentClass : pkg.toRawString() + "." + currentClass;
|
||||
}
|
||||
|
||||
public SourceGeneratorLocalData(HashMap<String, Integer> registerVars, Integer inFunction, Boolean inMethod, Integer forInLevel) {
|
||||
|
||||
@@ -1458,7 +1458,7 @@ public class AVM2SourceGenerator implements SourceGenerator {
|
||||
List<String> registerNames = new ArrayList<>();
|
||||
List<String> registerTypes = new ArrayList<>();
|
||||
if (className != null) {
|
||||
String fullClassName = pkg == null || pkg.isEmpty() ? className : pkg + "." + className;
|
||||
String fullClassName = pkg == null || pkg.isEmpty() ? className : pkg.toRawString() + "." + className;
|
||||
registerTypes.add(fullClassName);
|
||||
localData.scopeStack.add(new LocalRegAVM2Item(null, registerNames.size(), null));
|
||||
registerNames.add("this");
|
||||
@@ -2444,7 +2444,7 @@ public class AVM2SourceGenerator implements SourceGenerator {
|
||||
TypeItem type = (TypeItem) typeItem;
|
||||
|
||||
DottedChain dname = type.fullTypeName;
|
||||
String pkg = dname.getWithoutLast().toString();
|
||||
String pkg = dname.getWithoutLast().toRawString();
|
||||
String name = dname.getLast();
|
||||
for (InstanceInfo ii : abc.instance_info) {
|
||||
Multiname mname = abc.constants.constant_multiname.get(ii.name_index);
|
||||
|
||||
@@ -920,8 +920,8 @@ public class ActionScript3Parser {
|
||||
//int publicNs = namespace;
|
||||
int protectedStaticNs = 0;
|
||||
|
||||
openedNamespaces.add(protectedNs = abc.constants.getNamespaceId(new Namespace(Namespace.KIND_PROTECTED, abc.constants.getStringId(packageName == null ? (scriptName + "$0:"/*FIXME?*/ + classNameStr) : packageName.isEmpty() ? classNameStr : packageName + ":" + classNameStr, true)), 0, true));
|
||||
openedNamespaces.add(protectedStaticNs = abc.constants.getNamespaceId(new Namespace(Namespace.KIND_STATIC_PROTECTED, abc.constants.getStringId(packageName == null || packageName.isEmpty() ? classNameStr : packageName + ":" + classNameStr, true)), 0, true));
|
||||
openedNamespaces.add(protectedNs = abc.constants.getNamespaceId(new Namespace(Namespace.KIND_PROTECTED, abc.constants.getStringId(packageName == null ? (scriptName + "$0:"/*FIXME?*/ + classNameStr) : packageName.isEmpty() ? classNameStr : packageName.toRawString() + ":" + classNameStr, true)), 0, true));
|
||||
openedNamespaces.add(protectedStaticNs = abc.constants.getNamespaceId(new Namespace(Namespace.KIND_STATIC_PROTECTED, abc.constants.getStringId(packageName == null || packageName.isEmpty() ? classNameStr : packageName.toRawString() + ":" + classNameStr, true)), 0, true));
|
||||
|
||||
if (extendsStr != null) {
|
||||
List<Integer> indices = new ArrayList<>();
|
||||
|
||||
@@ -228,7 +228,7 @@ public class PropertyAVM2Item extends AssignableAVM2Item {
|
||||
Reference<GraphTargetItem> outPropType = new Reference<>(null);
|
||||
Reference<ValueKind> outPropValue = new Reference<>(null);
|
||||
if (AVM2SourceGenerator.searchPrototypeChain(false, abcs, m.getNamespace(a.constants).getName(a.constants), m.getName(a.constants, null, true), propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue)) {
|
||||
objType = new TypeItem("".equals(outNs.getVal()) ? outName.getVal() : outNs.getVal() + "." + outName.getVal());
|
||||
objType = new TypeItem(outNs.getVal().isEmpty() ? outName.getVal() : outNs.getVal().toRawString() + "." + outName.getVal());
|
||||
propType = outPropType.getVal();
|
||||
propIndex = abc.constants.getMultinameId(new Multiname(Multiname.QNAME,
|
||||
abc.constants.getStringId(propertyName, true),
|
||||
|
||||
@@ -264,7 +264,7 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item {
|
||||
if (resolved != null) {
|
||||
return resolved.toString();
|
||||
}
|
||||
return name.toString();
|
||||
return name.toRawString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user