WIP Safe strings handling

This commit is contained in:
Jindra Petřík
2025-07-25 19:30:13 +02:00
parent ffe9e4d506
commit 12ab8af322
139 changed files with 679 additions and 459 deletions
@@ -314,7 +314,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
Highlighting ch = Highlighting.searchPos(highlightedText.getClassHighlights(), pos);
int cindex = (int) ch.getProperties().index;
ABC abc = getABC();
type.setVal(abc.instance_info.get(cindex).getName(abc.constants).getNameWithNamespace(abc.constants, true));
type.setVal(abc.instance_info.get(cindex).getName(abc.constants).getNameWithNamespace(abc, abc.constants, true));
linkTypeRef.setVal(LinkType.LINK_THIS_SCRIPT);
return ch.startPos;
}
@@ -599,7 +599,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
for (int i = 1; i < abc.constants.getMultinameCount(); i++) {
Multiname m = abc.constants.getMultiname(i);
if (m != null) {
if (typeName.equals(m.getNameWithNamespace(abc.constants, true).toRawString())) {
if (typeName.equals(m.getNameWithNamespace(abc, abc.constants, true).toRawString())) {
return i;
}
}
@@ -660,7 +660,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
if (tm != null) {
String name = "";
if (classIndex > -1) {
name = abc.instance_info.get(classIndex).getName(abc.constants).getNameWithNamespace(abc.constants, true).toPrintableString(true);
name = abc.instance_info.get(classIndex).getName(abc.constants).getNameWithNamespace(abc, abc.constants, true).toPrintableString(abc.getSwf(), true);
}
Trait currentTrait = null;
@@ -671,7 +671,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
currentTrait = getCurrentTrait();
isStatic = abc.isStaticTraitId(classIndex, lastTraitIndex);
if (currentTrait != null) {
name += ":" + currentTrait.getName(abc).getName(abc.constants, null, false, true);
name += ":" + currentTrait.getName(abc).getName(abc, abc.constants, null, false, true);
}
if (currentTrait instanceof TraitSlotConst) {
@@ -729,14 +729,14 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
}
currentMethodHighlight = null;
//currentTrait = null;
String name = classIndex == -1 ? "" : abc.instance_info.get(classIndex).getName(abc.constants).getNameWithNamespace(abc.constants, true).toPrintableString(true);
String name = classIndex == -1 ? "" : abc.instance_info.get(classIndex).getName(abc.constants).getNameWithNamespace(abc, abc.constants, true).toPrintableString(abc.getSwf(), true);
currentTrait = getCurrentTrait();
isStatic = abc.isStaticTraitId(classIndex, lastTraitIndex);
if (currentTrait != null) {
if (!name.isEmpty()) {
name += ":";
}
name += currentTrait.getName(abc).getName(abc.constants, null, false, true);
name += currentTrait.getName(abc).getName(abc, abc.constants, null, false, true);
}
int methodId;