diff --git a/CHANGELOG.md b/CHANGELOG.md index 90fa214da..91375027a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ All notable changes to this project will be documented in this file. - [#2485] Show variable name in the text tree node label - Deobfuscate identifiers option - non destructible renaming identifiers for display purposes - Unknown and errored tags moved to special folders +- AS3 docs generator - reorganized to distinguish float and float 4 instructions, + hilight float instruction blue ### Fixed - [#2474] Gotos incorrectly decompiled diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2InstructionFlag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2InstructionFlag.java index 0c5d8afa2..b63819825 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2InstructionFlag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2InstructionFlag.java @@ -38,6 +38,10 @@ public enum AVM2InstructionFlag { * Requires Float major version */ FLOAT_MAJOR, + /** + * Requires Float4 support + */ + FLOAT4_SUPPORT, /** * Operands are unknown */ @@ -53,5 +57,5 @@ public enum AVM2InstructionFlag { /** * Works with domain memory */ - DOMAIN_MEMORY + DOMAIN_MEMORY } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/ConvertF4Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/ConvertF4Ins.java index 38c6c9716..fde716e6a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/ConvertF4Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/ConvertF4Ins.java @@ -46,7 +46,7 @@ public class ConvertF4Ins extends InstructionDefinition implements CoerceOrConve * Constructor */ public ConvertF4Ins() { - super(0x7B, "convert_f4", new int[]{}, true, AVM2InstructionFlag.FLOAT_MAJOR, AVM2InstructionFlag.NO_FLASH_PLAYER); + super(0x7B, "convert_f4", new int[]{}, true, AVM2InstructionFlag.FLOAT4_SUPPORT, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/Lf32x4Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/Lf32x4Ins.java index c9bd8de5f..b0e2ffd4b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/Lf32x4Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/Lf32x4Ins.java @@ -41,7 +41,7 @@ public class Lf32x4Ins extends InstructionDefinition { * Constructor */ public Lf32x4Ins() { - super(0x0A, "lf32x4", new int[]{}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.DOMAIN_MEMORY, AVM2InstructionFlag.FLOAT_MAJOR); + super(0x0A, "lf32x4", new int[]{}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.DOMAIN_MEMORY, AVM2InstructionFlag.FLOAT4_SUPPORT); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/PushFloat4Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/PushFloat4Ins.java index c018c3e72..83e580af5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/PushFloat4Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/PushFloat4Ins.java @@ -42,7 +42,7 @@ public class PushFloat4Ins extends InstructionDefinition { * Constructor */ public PushFloat4Ins() { - super(0x54, "pushfloat4", new int[]{AVM2Code.DAT_FLOAT4_INDEX}, false, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.FLOAT_MAJOR); + super(0x54, "pushfloat4", new int[]{AVM2Code.DAT_FLOAT4_INDEX}, false, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.FLOAT4_SUPPORT); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/Sf32x4Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/Sf32x4Ins.java index e7a9e3993..1451a2bb5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/Sf32x4Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/Sf32x4Ins.java @@ -35,7 +35,7 @@ public class Sf32x4Ins extends InstructionDefinition { * Constructor */ public Sf32x4Ins() { - super(0x0B, "sf32x4", new int[]{}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.DOMAIN_MEMORY, AVM2InstructionFlag.FLOAT_MAJOR); + super(0x0B, "sf32x4", new int[]{}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.DOMAIN_MEMORY, AVM2InstructionFlag.FLOAT4_SUPPORT); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/As3PCodeDocs.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/As3PCodeDocs.java index 4737326eb..3eee8f8b6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/As3PCodeDocs.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/As3PCodeDocs.java @@ -309,7 +309,13 @@ public class As3PCodeDocs extends AbstractDocs { jsData += "flags_set[\"" + makeIdent(f.toString()) + "\"] = false;" + NEWLINE; } - AVM2InstructionFlag[] hideFlags = new AVM2InstructionFlag[]{AVM2InstructionFlag.NO_FLASH_PLAYER}; + AVM2InstructionFlag[] hideFlags = new AVM2InstructionFlag[]{ + AVM2InstructionFlag.UNDOCUMENTED, + AVM2InstructionFlag.UNKNOWN_STACK, + AVM2InstructionFlag.ES4_NUMERICS_MINOR, + AVM2InstructionFlag.FLOAT4_SUPPORT, + AVM2InstructionFlag.UNKNOWN_OPERANDS + }; for (AVM2InstructionFlag f : hideFlags) { jsData += "flags_set[\"" + makeIdent(f.toString()) + "\"] = true;" + NEWLINE; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/docs.css b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/docs.css index 9c3edd85e..53d71d253 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/docs.css +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/docs.css @@ -62,6 +62,10 @@ strong.flags-title { background-color: #cccccc; } +.instruction.instruction-flag-floatMajor { + background-color: #aaaaff; +} + body { font-family: serif; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3.properties b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3.properties index 49f451ca2..ec4fb984e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3.properties +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3.properties @@ -35,6 +35,7 @@ instructionFlag.undocumented=Undocumented instructionFlag.unknownStack=Unknown stack instructionFlag.es4NumericsMinor=ES4 numerics (ABC minor 17) instructionFlag.floatMajor=Float values (ABC major 47) +instructionFlag.float4Support=Float 4 values instructionFlag.unknownOperands=Unknown operands instructionFlag.noFlashPlayer=Not in standard Flash Player instructionFlag.deprecated=Deprecated diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_ca.properties b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_ca.properties index 6143d9d09..5a83dbfcf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_ca.properties +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_ca.properties @@ -35,6 +35,7 @@ instructionFlag.undocumented=Indocumentada instructionFlag.unknownStack=Pila desconeguda instructionFlag.es4NumericsMinor=Num\u00e8rica ES4 (ABC minor 17) instructionFlag.floatMajor=Valors de coma flotant (ABC major 47) +instructionFlag.float4Support=Valors de coma flotant 4 instructionFlag.unknownOperands=Operands desconeguts instructionFlag.noFlashPlayer=No en Flash Player est\u00e0ndard instructionFlag.deprecated=Obsoleta diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_cs.properties b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_cs.properties index faccebf4a..4b959b70b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_cs.properties +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_cs.properties @@ -35,6 +35,7 @@ instructionFlag.undocumented=Nedokumentovan\u00e9 instructionFlag.unknownStack=Nezn\u00e1m\u00fd z\u00e1sobn\u00edk instructionFlag.es4NumericsMinor=ES4 numerika (ABC minor 17) instructionFlag.floatMajor=Float hodnoty (ABC major 47) +instructionFlag.float4Support=Float 4 hodnoty instructionFlag.unknownOperands=Nezn\u00e1m\u00e9 operandy instructionFlag.noFlashPlayer=Nen\u00ed v standardn\u00edm Flash Playeru instructionFlag.deprecated=P\u0159ekonan\u00e9 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_nl.properties b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_nl.properties index 054093554..d71e17994 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_nl.properties +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_nl.properties @@ -19,6 +19,7 @@ instructionFlag.undocumented=Ongedocumenteerd instructionFlag.unknownStack=Onbekende stapel instructionFlag.es4NumericsMinor=ES4 numeriek (ABC minor 17) instructionFlag.floatMajor=Float waarden (ABC major 47) +instructionFlag.float4Support=Float 4 waarden instructionFlag.unknownOperands=Onbekende operanden instructionFlag.noFlashPlayer=Niet in standaard Flash Player instructionFlag.deprecated=Verouderd diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_pt_BR.properties b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_pt_BR.properties index 83bacad94..2b1a53508 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_pt_BR.properties +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_pt_BR.properties @@ -35,6 +35,7 @@ instructionFlag.undocumented=Indocumentada instructionFlag.unknownStack=Pilha desconhecida instructionFlag.es4NumericsMinor=Num\u00e9ricos ES4 (ABC Menor 17) instructionFlag.floatMajor=Valores de flutuantes (ABC Maior 47) +instructionFlag.float4Support=Valores de flutuantes 4 instructionFlag.unknownOperands=Operandos desconhecidos instructionFlag.noFlashPlayer=N\u00e3o no Flash Player padr\u00e3o instructionFlag.deprecated=Descontinuado diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_tr.properties b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_tr.properties index d4f6c3bf6..b79c7ef06 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_tr.properties +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_tr.properties @@ -35,6 +35,7 @@ instructionFlag.undocumented = Belgesiz instructionFlag.unknownStack = Bilinmeyen y\u0131\u011f\u0131n instructionFlag.es4NumericsMinor = ES4 say\u0131sallar\u0131 (ABC min\u00f6r 17) instructionFlag.floatMajor = Kayan de\u011ferler (ABC maj\u00f6r 47) +instructionFlag.float4Support = Kayan 4 de\u011ferler instructionFlag.unknownOperands = Bilinmeyen i\u015flenenler instructionFlag.noFlashPlayer = Standart Flash Player'da de\u011fil instructionFlag.deprecated = Kullan\u0131mdan kald\u0131r\u0131lan diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_zh.properties b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_zh.properties index 02e0a37df..580e5e090 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_zh.properties +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3_zh.properties @@ -35,6 +35,7 @@ instructionFlag.undocumented = \u672a\u8bb0\u5f55 instructionFlag.unknownStack = \u672a\u77e5\u5806\u6808 instructionFlag.es4NumericsMinor = ES4 numerics (ABC minor 17) instructionFlag.floatMajor = Float values (ABC major 47) +instructionFlag.float4Support = Float 4 values instructionFlag.unknownOperands = \u672a\u77e5\u64cd\u4f5c\u6570 instructionFlag.noFlashPlayer = \u4e0d\u5728\u6807\u51c6Flash Player\u4e2d instructionFlag.deprecated = \u5f03\u7528