From 9947cb0b88447dee22f4bb2ff3ae991bfe512027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 23 Sep 2023 16:27:30 +0200 Subject: [PATCH] Fixed tests - trait names as FQN --- .../flash/abc/types/traits/TraitMethodGetterSetter.java | 2 +- .../jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java | 2 +- .../decompiler/flash/exporters/script/DependencyParser.java | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java index 4e9ce2a84..70a2b5a5a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java @@ -99,7 +99,7 @@ public class TraitMethodGetterSetter extends Trait { } writer.hilightSpecial("function " + addKind, HighlightSpecialType.TRAIT_TYPE); - writer.hilightSpecial(getName(abc).getName(abc.constants, fullyQualifiedNames, false, true), HighlightSpecialType.TRAIT_NAME); + writer.hilightSpecial(getName(abc).getName(abc.constants, new ArrayList<>(), false, true), HighlightSpecialType.TRAIT_NAME); writer.appendNoHilight("("); abc.method_info.get(method_info).getParamStr(writer, abc.constants, body, abc, fullyQualifiedNames); writer.appendNoHilight(") : "); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java index 2df3581b4..af3d39edb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java @@ -106,7 +106,7 @@ public class TraitSlotConst extends Trait implements TraitWithSlot { slotconst = "namespace"; } writer.hilightSpecial(slotconst + " ", HighlightSpecialType.TRAIT_TYPE); - writer.hilightSpecial(getName(abc).getName(abc.constants, fullyQualifiedNames, false, true), HighlightSpecialType.TRAIT_NAME); + writer.hilightSpecial(getName(abc).getName(abc.constants, new ArrayList<>(), false, true), HighlightSpecialType.TRAIT_NAME); writer.hilightSpecial(typeStr, HighlightSpecialType.TRAIT_TYPE_NAME); return writer; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/DependencyParser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/DependencyParser.java index 02636ea1d..c7d00e3b5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/DependencyParser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/DependencyParser.java @@ -186,6 +186,8 @@ public class DependencyParser { } */ } for (int k = 0; k < ins.definition.operands.length; k++) { + //this should probably handle only some subset of multiname instructions, + // like findproperty, findpropstrict, constructprop, not simple getproperty if (ins.definition.operands[k] == AVM2Code.DAT_MULTINAME_INDEX) { int m = ins.operands[k]; if (m < abc.constants.getMultinameCount()) {