diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java index e4189d543..87f49c4ac 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java @@ -1638,7 +1638,7 @@ public class AVM2Code implements Cloneable { } }//*/ - /*if ((ip + 2 < code.size()) && (ins.definition instanceof NewCatchIns)) { // Filling local register in catch clause + /*if ((ip + 2 < code.size()) && (ins.definition instanceof NewCatchIns)) { // Filling local register in catch clause if (code.get(ip + 1).definition instanceof DupIns) { if (code.get(ip + 2).definition instanceof SetLocalTypeIns) { ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorRegisters.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorRegisters.java index 0063e899e..48ad09650 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorRegisters.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorRegisters.java @@ -220,7 +220,7 @@ public class AVM2DeobfuscatorRegisters extends AVM2DeobfuscatorSimple { AVM2Instruction ins = code.code.get(idx); InstructionDefinition def = ins.definition; - //System.err.println("" + idx + ": " + ins + " stack:" + stack.size()); + //System.err.println("" + idx + ": " + ins + " stack:" + stack.size()); // do not throw EmptyStackException, much faster int requiredStackSize = def.getStackPopCount(ins, abc); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimpleOld.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimpleOld.java index 5fadb3a3d..11ded804a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimpleOld.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimpleOld.java @@ -161,7 +161,7 @@ public class AVM2DeobfuscatorSimpleOld extends SWFDecompilerAdapter { AVM2Instruction ins = code.code.get(i); if (ins.definition instanceof JumpIns) { long address = ins.getTargetAddress(); - jumpTargets.add( code.adr2pos(address) ); + jumpTargets.add(code.adr2pos(address)); } } @@ -294,9 +294,8 @@ public class AVM2DeobfuscatorSimpleOld extends SWFDecompilerAdapter { if (inlineIns.contains(ins)) { if (def instanceof SetLocalTypeIns) { - InstructionDefinition prevDef = code.code.get(idx-1).definition; - if ((prevDef instanceof DupIns && !jumpTargets.contains(idx-2)) || !jumpTargets.contains(idx-1)) - { + InstructionDefinition prevDef = code.code.get(idx - 1).definition; + if ((prevDef instanceof DupIns && !jumpTargets.contains(idx - 2)) || !jumpTargets.contains(idx - 1)) { int regId = ((SetLocalTypeIns) def).getRegisterId(ins); staticRegs.put(regId, localData.localRegs.get(regId).getNotCoerced()); code.replaceInstruction(idx, new AVM2Instruction(0, DeobfuscatePopIns.getInstance(), null), body); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java index 3d1159eaf..9ed4806b3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java @@ -108,8 +108,9 @@ public abstract class AVM2Item extends GraphTargetItem { } if (propertyName instanceof FullMultinameAVM2Item) { if (((FullMultinameAVM2Item) propertyName).name != null) { - if (((FullMultinameAVM2Item) propertyName).namespace != null) + if (((FullMultinameAVM2Item) propertyName).namespace != null) { writer.append("."); + } return propertyName.toString(writer, localData); } else { writer.append("."); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java index 433285894..0ba0873f0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java @@ -77,7 +77,7 @@ public class ForEachInAVM2Item extends LoopItem implements Block { */ - /* + /* if (!commands.isEmpty()) { GraphTargetItem firstAssign = commands.get(0); if (firstAssign instanceof SetTypeAVM2Item) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java index 5b57f3efe..bff9f84dd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java @@ -1,6 +1,6 @@ /* The following code was generated by JFlex 1.6.0 */ -/* + /* * Copyright (C) 2010-2016 JPEXS, All rights reserved. * * This library is free software; you can redistribute it and/or @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library. */ -/* Flash assembler language lexer specification */ + /* Flash assembler language lexer specification */ package com.jpexs.decompiler.flash.abc.avm2.parser.pcode; import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException; @@ -24,8 +24,7 @@ import java.util.Stack; /** * This class is a scanner generated by - * JFlex 1.6.0 - * from the specification file + * JFlex 1.6.0 from the specification file * C:/FFDec/jpexs-decompiler/libsrc/ffdec_lib/lexers/actionscript3_pcode.flex */ public final class Flasm3Lexer { @@ -51,9 +50,8 @@ public final class Flasm3Lexer { /** * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l - * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l - * at the beginning of a line - * l is of the form l = 2*k, k a non negative integer + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the + * beginning of a line l is of the form l = 2*k, k a non negative integer */ private static final int ZZ_LEXSTATE[] = { 0, 0, 1, 1, 2, 2 @@ -272,9 +270,11 @@ public final class Flasm3Lexer { } private static int zzUnpackAction(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -380,9 +380,11 @@ public final class Flasm3Lexer { } private static int zzUnpackRowMap(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -2479,9 +2481,11 @@ public final class Flasm3Lexer { } private static int zzUnpackTrans(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -2550,9 +2554,11 @@ public final class Flasm3Lexer { } private static int zzUnpackAttribute(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -2581,8 +2587,8 @@ public final class Flasm3Lexer { private int zzLexicalState = YYINITIAL; /** - * this buffer contains the current text to be matched and is - * the source of the yytext() string + * this buffer contains the current text to be matched and is the source of + * the yytext() string */ private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; @@ -2602,8 +2608,8 @@ public final class Flasm3Lexer { private int zzStartRead; /** - * endRead marks the last character in the buffer, that has been read - * from input + * endRead marks the last character in the buffer, that has been read from + * input */ private int zzEndRead; @@ -2639,10 +2645,10 @@ public final class Flasm3Lexer { private boolean zzEOFDone; /** - * The number of occupied positions in zzBuffer beyond zzEndRead. - * When a lead/high surrogate has been read from the input stream - * into the final zzBuffer position, this will have a value of 1; - * otherwise, it will have a value of 0. + * The number of occupied positions in zzBuffer beyond zzEndRead. When a + * lead/high surrogate has been read from the input stream into the final + * zzBuffer position, this will have a value of 1; otherwise, it will have a + * value of 0. */ private int zzFinalHighSurrogate = 0; @@ -2705,9 +2711,11 @@ public final class Flasm3Lexer { */ private static char[] zzUnpackCMap(String packed) { char[] map = new char[0x110000]; - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = 0; /* index in unpacked array */ + int j = 0; + /* index in unpacked array */ while (i < 2916) { int count = packed.charAt(i++); @@ -2766,7 +2774,8 @@ public final class Flasm3Lexer { if (totalRead > 0) { zzEndRead += totalRead; - if (totalRead == requested) { /* possibly more input available */ + if (totalRead == requested) { + /* possibly more input available */ if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) { --zzEndRead; @@ -2784,9 +2793,11 @@ public final class Flasm3Lexer { * Closes the input stream. */ public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ + zzAtEOF = true; + /* indicate end of file */ - zzEndRead = zzStartRead; /* invalidate buffer */ + zzEndRead = zzStartRead; + /* invalidate buffer */ if (zzReader != null) { zzReader.close(); @@ -2794,12 +2805,12 @@ public final class Flasm3Lexer { } /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. + * Resets the scanner to read from a new input stream. Does not close the + * old reader. * * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to ZZ_INITIAL. + * cannot be reused (internal buffer is discarded and lost). Lexical + * state is set to ZZ_INITIAL. * * Internal scan buffer is resized down to its initial length, if it has * grown. @@ -2845,13 +2856,12 @@ public final class Flasm3Lexer { } /** - * Returns the character at position pos from the - * matched text. + * Returns the character at position pos from the matched text. * * It is equivalent to yytext().charAt(pos), but faster * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. + * @param pos the position of the character to fetch. A value from 0 to + * yylength()-1. * * @return the character at position pos */ @@ -2869,14 +2879,13 @@ public final class Flasm3Lexer { /** * Reports an error that occured while scanning. * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). + * In a wellformed scanner (no or only correct usage of yypushback(int) and + * a match-all fallback rule) this method will only be called with things + * that "Can't Possibly Happen". If this method is called, something is + * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. + * Usual syntax/scanner level error handling should be done in error + * fallback rules. * * @param errorCode the code of the errormessage to display */ @@ -2896,8 +2905,8 @@ public final class Flasm3Lexer { * * They will be read again by then next call of the scanning method * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! + * @param number the number of characters to be read again. This number must + * not be greater than yylength()! */ public void yypushback(int number) { if (number > yylength()) { @@ -2908,8 +2917,8 @@ public final class Flasm3Lexer { } /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. + * Resumes scanning until the next regular expression is matched, the end of + * input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java index 6edf3e8a3..4bd05fca1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java @@ -1,6 +1,6 @@ /* The following code was generated by JFlex 1.6.0 */ -/* + /* * Copyright (C) 2010-2016 JPEXS, All rights reserved. * * This library is free software; you can redistribute it and/or @@ -26,8 +26,7 @@ import java.util.Stack; /** * This class is a scanner generated by - * JFlex 1.6.0 - * from the specification file + * JFlex 1.6.0 from the specification file * C:/FFDec/jpexs-decompiler/libsrc/ffdec_lib/lexers/actionscript3_script.flex */ public final class ActionScriptLexer { @@ -69,9 +68,8 @@ public final class ActionScriptLexer { /** * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l - * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l - * at the beginning of a line - * l is of the form l = 2*k, k a non negative integer + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the + * beginning of a line l is of the form l = 2*k, k a non negative integer */ private static final int ZZ_LEXSTATE[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, @@ -295,9 +293,11 @@ public final class ActionScriptLexer { } private static int zzUnpackAction(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -383,9 +383,11 @@ public final class ActionScriptLexer { } private static int zzUnpackRowMap(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -833,9 +835,11 @@ public final class ActionScriptLexer { } private static int zzUnpackTrans(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -894,9 +898,11 @@ public final class ActionScriptLexer { } private static int zzUnpackAttribute(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -925,8 +931,8 @@ public final class ActionScriptLexer { private int zzLexicalState = YYINITIAL; /** - * this buffer contains the current text to be matched and is - * the source of the yytext() string + * this buffer contains the current text to be matched and is the source of + * the yytext() string */ private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; @@ -946,8 +952,8 @@ public final class ActionScriptLexer { private int zzStartRead; /** - * endRead marks the last character in the buffer, that has been read - * from input + * endRead marks the last character in the buffer, that has been read from + * input */ private int zzEndRead; @@ -983,10 +989,10 @@ public final class ActionScriptLexer { private boolean zzEOFDone; /** - * The number of occupied positions in zzBuffer beyond zzEndRead. - * When a lead/high surrogate has been read from the input stream - * into the final zzBuffer position, this will have a value of 1; - * otherwise, it will have a value of 0. + * The number of occupied positions in zzBuffer beyond zzEndRead. When a + * lead/high surrogate has been read from the input stream into the final + * zzBuffer position, this will have a value of 1; otherwise, it will have a + * value of 0. */ private int zzFinalHighSurrogate = 0; @@ -1080,9 +1086,11 @@ public final class ActionScriptLexer { */ private static char[] zzUnpackCMap(String packed) { char[] map = new char[0x110000]; - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = 0; /* index in unpacked array */ + int j = 0; + /* index in unpacked array */ while (i < 3136) { int count = packed.charAt(i++); @@ -1141,7 +1149,8 @@ public final class ActionScriptLexer { if (totalRead > 0) { zzEndRead += totalRead; - if (totalRead == requested) { /* possibly more input available */ + if (totalRead == requested) { + /* possibly more input available */ if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) { --zzEndRead; @@ -1159,9 +1168,11 @@ public final class ActionScriptLexer { * Closes the input stream. */ public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ + zzAtEOF = true; + /* indicate end of file */ - zzEndRead = zzStartRead; /* invalidate buffer */ + zzEndRead = zzStartRead; + /* invalidate buffer */ if (zzReader != null) { zzReader.close(); @@ -1169,12 +1180,12 @@ public final class ActionScriptLexer { } /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. + * Resets the scanner to read from a new input stream. Does not close the + * old reader. * * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to ZZ_INITIAL. + * cannot be reused (internal buffer is discarded and lost). Lexical + * state is set to ZZ_INITIAL. * * Internal scan buffer is resized down to its initial length, if it has * grown. @@ -1220,13 +1231,12 @@ public final class ActionScriptLexer { } /** - * Returns the character at position pos from the - * matched text. + * Returns the character at position pos from the matched text. * * It is equivalent to yytext().charAt(pos), but faster * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. + * @param pos the position of the character to fetch. A value from 0 to + * yylength()-1. * * @return the character at position pos */ @@ -1244,14 +1254,13 @@ public final class ActionScriptLexer { /** * Reports an error that occured while scanning. * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). + * In a wellformed scanner (no or only correct usage of yypushback(int) and + * a match-all fallback rule) this method will only be called with things + * that "Can't Possibly Happen". If this method is called, something is + * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. + * Usual syntax/scanner level error handling should be done in error + * fallback rules. * * @param errorCode the code of the errormessage to display */ @@ -1271,8 +1280,8 @@ public final class ActionScriptLexer { * * They will be read again by then next call of the scanning method * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! + * @param number the number of characters to be read again. This number must + * not be greater than yylength()! */ public void yypushback(int number) { if (number > yylength()) { @@ -1283,8 +1292,8 @@ public final class ActionScriptLexer { } /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. + * Resumes scanning until the next regular expression is matched, the end of + * input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs @@ -1380,7 +1389,8 @@ public final class ActionScriptLexer { } case 167: break; - case 3: { /*ignore*/ + case 3: { + /*ignore*/ } case 168: @@ -1794,7 +1804,8 @@ public final class ActionScriptLexer { } case 242: break; - case 78: { /* ignore illegal character escape */ + case 78: { + /* ignore illegal character escape */ } case 243: diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java index fe36c4106..e59836843 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java @@ -220,9 +220,9 @@ public class NameAVM2Item extends AssignableAVM2Item { return toSourceMerge(localData, generator, ins(AVM2Instructions.GetScopeObject, slotScope), assignedValue, !(("" + assignedValue.returnType()).equals("" + type) && (basicTypes.contains("" + type))) ? generateCoerce(localData, generator, type) : null, needsReturn - ? dupSetTemp(localData, generator, ret_temp) : null, generateSetLoc(regNumber), slotNumber > -1 - ? ins(AVM2Instructions.SetSlot, slotNumber) - : null, + ? dupSetTemp(localData, generator, ret_temp) : null, generateSetLoc(regNumber), slotNumber > -1 + ? ins(AVM2Instructions.SetSlot, slotNumber) + : null, needsReturn ? getTemp(localData, generator, ret_temp) : null, killTemp(localData, generator, Arrays.asList(ret_temp))); } else { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespacedAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespacedAVM2Item.java index c2db4f69e..8b0f08214 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespacedAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespacedAVM2Item.java @@ -180,30 +180,28 @@ public class NamespacedAVM2Item extends AssignableAVM2Item { killTemp(localData, generator, Arrays.asList(obj_temp)) ); } + } else if (assignedValue != null) { + return toSourceMerge(localData, generator, + obj == null ? ns : null, obj == null ? NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)) : null, obj != null ? obj : ins(AVM2Instructions.FindPropertyStrict, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true)), + ns, NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)), assignedValue, + needsReturn ? dupSetTemp(localData, generator, ret_temp) : null, + ins(AVM2Instructions.SetProperty, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true)), + needsReturn ? getTemp(localData, generator, ret_temp) : null, + killTemp(localData, generator, Arrays.asList(ns_temp, index_temp, ret_temp)) + ); } else { - if (assignedValue != null) { - return toSourceMerge(localData, generator, - obj == null ? ns : null, obj == null ? NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)) : null, obj != null ? obj : ins(AVM2Instructions.FindPropertyStrict, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true)), - ns, NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)), assignedValue, - needsReturn ? dupSetTemp(localData, generator, ret_temp) : null, - ins(AVM2Instructions.SetProperty, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true)), - needsReturn ? getTemp(localData, generator, ret_temp) : null, - killTemp(localData, generator, Arrays.asList(ns_temp, index_temp, ret_temp)) - ); - } else { - return toSourceMerge(localData, generator, - obj == null ? ns : null, obj == null ? NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)) : null, obj != null ? obj : ins(AVM2Instructions.FindPropertyStrict, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true)), - call ? dupSetTemp(localData, generator, obj_temp) : null, - ns, NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)), - construct ? callargs : null, - ins(construct ? AVM2Instructions.ConstructProp : delete ? AVM2Instructions.DeleteProperty : AVM2Instructions.GetProperty, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true), construct ? callargs.size() : null), - call ? getTemp(localData, generator, obj_temp) : null, - call ? callargs : null, - call ? ins(AVM2Instructions.Call, callargs.size()) : null, - needsReturn ? null : ins(AVM2Instructions.Pop), - killTemp(localData, generator, Arrays.asList(obj_temp)) - ); - } + return toSourceMerge(localData, generator, + obj == null ? ns : null, obj == null ? NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)) : null, obj != null ? obj : ins(AVM2Instructions.FindPropertyStrict, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true)), + call ? dupSetTemp(localData, generator, obj_temp) : null, + ns, NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)), + construct ? callargs : null, + ins(construct ? AVM2Instructions.ConstructProp : delete ? AVM2Instructions.DeleteProperty : AVM2Instructions.GetProperty, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true), construct ? callargs.size() : null), + call ? getTemp(localData, generator, obj_temp) : null, + call ? callargs : null, + call ? ins(AVM2Instructions.Call, callargs.size()) : null, + needsReturn ? null : ins(AVM2Instructions.Pop), + killTemp(localData, generator, Arrays.asList(obj_temp)) + ); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java index c40c93260..83ee345a5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java @@ -116,12 +116,12 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item { } return -1; } + /* public GraphTargetItem getNs() { return ns; } */ - public void appendName(String name) { this.name = this.name.add(name); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java index 540e9d239..0531753b8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java @@ -1,6 +1,6 @@ /* The following code was generated by JFlex 1.6.0 */ -/* + /* * Copyright (C) 2010-2016 JPEXS, All rights reserved. * * This library is free software; you can redistribute it and/or @@ -16,13 +16,12 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library. */ -/* Method info lexer specification */ + /* Method info lexer specification */ package com.jpexs.decompiler.flash.abc.methodinfo_parser; /** * This class is a scanner generated by - * JFlex 1.6.0 - * from the specification file + * JFlex 1.6.0 from the specification file * C:/FFDec/jpexs-decompiler/libsrc/ffdec_lib/lexers/actionscript3_methodinfo.flex */ public final class MethodInfoLexer { @@ -46,9 +45,8 @@ public final class MethodInfoLexer { /** * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l - * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l - * at the beginning of a line - * l is of the form l = 2*k, k a non negative integer + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the + * beginning of a line l is of the form l = 2*k, k a non negative integer */ private static final int ZZ_LEXSTATE[] = { 0, 0, 1, 1 @@ -231,9 +229,11 @@ public final class MethodInfoLexer { } private static int zzUnpackAction(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -279,9 +279,11 @@ public final class MethodInfoLexer { } private static int zzUnpackRowMap(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -466,9 +468,11 @@ public final class MethodInfoLexer { } private static int zzUnpackTrans(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -518,9 +522,11 @@ public final class MethodInfoLexer { } private static int zzUnpackAttribute(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -549,8 +555,8 @@ public final class MethodInfoLexer { private int zzLexicalState = YYINITIAL; /** - * this buffer contains the current text to be matched and is - * the source of the yytext() string + * this buffer contains the current text to be matched and is the source of + * the yytext() string */ private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; @@ -570,8 +576,8 @@ public final class MethodInfoLexer { private int zzStartRead; /** - * endRead marks the last character in the buffer, that has been read - * from input + * endRead marks the last character in the buffer, that has been read from + * input */ private int zzEndRead; @@ -607,10 +613,10 @@ public final class MethodInfoLexer { private boolean zzEOFDone; /** - * The number of occupied positions in zzBuffer beyond zzEndRead. - * When a lead/high surrogate has been read from the input stream - * into the final zzBuffer position, this will have a value of 1; - * otherwise, it will have a value of 0. + * The number of occupied positions in zzBuffer beyond zzEndRead. When a + * lead/high surrogate has been read from the input stream into the final + * zzBuffer position, this will have a value of 1; otherwise, it will have a + * value of 0. */ private int zzFinalHighSurrogate = 0; @@ -654,9 +660,11 @@ public final class MethodInfoLexer { */ private static char[] zzUnpackCMap(String packed) { char[] map = new char[0x110000]; - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = 0; /* index in unpacked array */ + int j = 0; + /* index in unpacked array */ while (i < 2868) { int count = packed.charAt(i++); @@ -715,7 +723,8 @@ public final class MethodInfoLexer { if (totalRead > 0) { zzEndRead += totalRead; - if (totalRead == requested) { /* possibly more input available */ + if (totalRead == requested) { + /* possibly more input available */ if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) { --zzEndRead; @@ -733,9 +742,11 @@ public final class MethodInfoLexer { * Closes the input stream. */ public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ + zzAtEOF = true; + /* indicate end of file */ - zzEndRead = zzStartRead; /* invalidate buffer */ + zzEndRead = zzStartRead; + /* invalidate buffer */ if (zzReader != null) { zzReader.close(); @@ -743,12 +754,12 @@ public final class MethodInfoLexer { } /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. + * Resets the scanner to read from a new input stream. Does not close the + * old reader. * * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to ZZ_INITIAL. + * cannot be reused (internal buffer is discarded and lost). Lexical + * state is set to ZZ_INITIAL. * * Internal scan buffer is resized down to its initial length, if it has * grown. @@ -794,13 +805,12 @@ public final class MethodInfoLexer { } /** - * Returns the character at position pos from the - * matched text. + * Returns the character at position pos from the matched text. * * It is equivalent to yytext().charAt(pos), but faster * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. + * @param pos the position of the character to fetch. A value from 0 to + * yylength()-1. * * @return the character at position pos */ @@ -818,14 +828,13 @@ public final class MethodInfoLexer { /** * Reports an error that occured while scanning. * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). + * In a wellformed scanner (no or only correct usage of yypushback(int) and + * a match-all fallback rule) this method will only be called with things + * that "Can't Possibly Happen". If this method is called, something is + * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. + * Usual syntax/scanner level error handling should be done in error + * fallback rules. * * @param errorCode the code of the errormessage to display */ @@ -845,8 +854,8 @@ public final class MethodInfoLexer { * * They will be read again by then next call of the scanning method * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! + * @param number the number of characters to be read again. This number must + * not be greater than yylength()! */ public void yypushback(int number) { if (number > yylength()) { @@ -857,8 +866,8 @@ public final class MethodInfoLexer { } /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. + * Resumes scanning until the next regular expression is matched, the end of + * input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java index 89a9cefc8..53b0bc1bc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java @@ -568,7 +568,7 @@ public abstract class Action implements GraphSourceItem { writer.appendNoHilight(Helper.byteToHex(fileData[(int) (fileOffset + i)])); } - + writer.appendNoHilight(")"); } @@ -1114,7 +1114,7 @@ public abstract class Action implements GraphSourceItem { } /*ActionJump && ActionIf removed*/ - /*if ((action instanceof ActionEnumerate2) || (action instanceof ActionEnumerate)) { + /*if ((action instanceof ActionEnumerate2) || (action instanceof ActionEnumerate)) { loopStart = ip + 1; isForIn = true; ip += 4; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java index b970960e7..93cb192c3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java @@ -308,16 +308,12 @@ public class FunctionActionItem extends ActionItem { } else { v.setBoxedValue(new DirectValueActionItem(new RegisterNumber(registerNames.indexOf(varName), varName))); } + } else if (v.isDefinition()) { + v.setBoxedValue(new DefineLocalActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored)); + } else if (stored != null) { + v.setBoxedValue(new SetVariableActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored)); } else { - if (v.isDefinition()) { - v.setBoxedValue(new DefineLocalActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored)); - } else { - if (stored != null) { - v.setBoxedValue(new SetVariableActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored)); - } else { - v.setBoxedValue(new GetVariableActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName))); - } - } + v.setBoxedValue(new GetVariableActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName))); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java index b9e8ba77d..81b68d4e9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java @@ -1,6 +1,6 @@ /* The following code was generated by JFlex 1.6.0 */ -/* + /* * Copyright (C) 2010-2016 JPEXS, All rights reserved. * * This library is free software; you can redistribute it and/or @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library. */ -/* Flash assembler language lexer specification */ + /* Flash assembler language lexer specification */ package com.jpexs.decompiler.flash.action.parser.pcode; import com.jpexs.decompiler.flash.action.parser.ActionParseException; @@ -27,8 +27,7 @@ import com.jpexs.decompiler.flash.ecma.Undefined; /** * This class is a scanner generated by - * JFlex 1.6.0 - * from the specification file + * JFlex 1.6.0 from the specification file * C:/Dropbox/Programovani/JavaSE/FFDec/libsrc/ffdec_lib/lexers/actionscript_pcode.flex */ public final class FlasmLexer { @@ -54,9 +53,8 @@ public final class FlasmLexer { /** * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l - * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l - * at the beginning of a line - * l is of the form l = 2*k, k a non negative integer + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the + * beginning of a line l is of the form l = 2*k, k a non negative integer */ private static final int ZZ_LEXSTATE[] = { 0, 0, 1, 1, 2, 2 @@ -238,9 +236,11 @@ public final class FlasmLexer { } private static int zzUnpackAction(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -282,9 +282,11 @@ public final class FlasmLexer { } private static int zzUnpackRowMap(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -458,9 +460,11 @@ public final class FlasmLexer { } private static int zzUnpackTrans(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -510,9 +514,11 @@ public final class FlasmLexer { } private static int zzUnpackAttribute(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -541,8 +547,8 @@ public final class FlasmLexer { private int zzLexicalState = YYINITIAL; /** - * this buffer contains the current text to be matched and is - * the source of the yytext() string + * this buffer contains the current text to be matched and is the source of + * the yytext() string */ private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; @@ -562,8 +568,8 @@ public final class FlasmLexer { private int zzStartRead; /** - * endRead marks the last character in the buffer, that has been read - * from input + * endRead marks the last character in the buffer, that has been read from + * input */ private int zzEndRead; @@ -599,10 +605,10 @@ public final class FlasmLexer { private boolean zzEOFDone; /** - * The number of occupied positions in zzBuffer beyond zzEndRead. - * When a lead/high surrogate has been read from the input stream - * into the final zzBuffer position, this will have a value of 1; - * otherwise, it will have a value of 0. + * The number of occupied positions in zzBuffer beyond zzEndRead. When a + * lead/high surrogate has been read from the input stream into the final + * zzBuffer position, this will have a value of 1; otherwise, it will have a + * value of 0. */ private int zzFinalHighSurrogate = 0; @@ -642,9 +648,11 @@ public final class FlasmLexer { */ private static char[] zzUnpackCMap(String packed) { char[] map = new char[0x110000]; - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = 0; /* index in unpacked array */ + int j = 0; + /* index in unpacked array */ while (i < 2854) { int count = packed.charAt(i++); @@ -703,7 +711,8 @@ public final class FlasmLexer { if (totalRead > 0) { zzEndRead += totalRead; - if (totalRead == requested) { /* possibly more input available */ + if (totalRead == requested) { + /* possibly more input available */ if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) { --zzEndRead; @@ -721,9 +730,11 @@ public final class FlasmLexer { * Closes the input stream. */ public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ + zzAtEOF = true; + /* indicate end of file */ - zzEndRead = zzStartRead; /* invalidate buffer */ + zzEndRead = zzStartRead; + /* invalidate buffer */ if (zzReader != null) { zzReader.close(); @@ -731,12 +742,12 @@ public final class FlasmLexer { } /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. + * Resets the scanner to read from a new input stream. Does not close the + * old reader. * * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to ZZ_INITIAL. + * cannot be reused (internal buffer is discarded and lost). Lexical + * state is set to ZZ_INITIAL. * * Internal scan buffer is resized down to its initial length, if it has * grown. @@ -782,13 +793,12 @@ public final class FlasmLexer { } /** - * Returns the character at position pos from the - * matched text. + * Returns the character at position pos from the matched text. * * It is equivalent to yytext().charAt(pos), but faster * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. + * @param pos the position of the character to fetch. A value from 0 to + * yylength()-1. * * @return the character at position pos */ @@ -806,14 +816,13 @@ public final class FlasmLexer { /** * Reports an error that occured while scanning. * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). + * In a wellformed scanner (no or only correct usage of yypushback(int) and + * a match-all fallback rule) this method will only be called with things + * that "Can't Possibly Happen". If this method is called, something is + * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. + * Usual syntax/scanner level error handling should be done in error + * fallback rules. * * @param errorCode the code of the errormessage to display */ @@ -833,8 +842,8 @@ public final class FlasmLexer { * * They will be read again by then next call of the scanning method * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! + * @param number the number of characters to be read again. This number must + * not be greater than yylength()! */ public void yypushback(int number) { if (number > yylength()) { @@ -845,8 +854,8 @@ public final class FlasmLexer { } /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. + * Resumes scanning until the next regular expression is matched, the end of + * input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java index 29d96d52e..21ebb8b7b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java @@ -1,6 +1,6 @@ /* The following code was generated by JFlex 1.6.0 */ -/* + /* * Copyright (C) 2010-2016 JPEXS, All rights reserved. * * This library is free software; you can redistribute it and/or @@ -25,8 +25,7 @@ import java.util.Stack; /** * This class is a scanner generated by - * JFlex 1.6.0 - * from the specification file + * JFlex 1.6.0 from the specification file * D:/Dropbox/Programovani/JavaSE/FFDec/libsrc/ffdec_lib/lexers/actionscript_script.flex */ public final class ActionScriptLexer { @@ -58,9 +57,8 @@ public final class ActionScriptLexer { /** * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l - * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l - * at the beginning of a line - * l is of the form l = 2*k, k a non negative integer + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the + * beginning of a line l is of the form l = 2*k, k a non negative integer */ private static final int ZZ_LEXSTATE[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5 @@ -278,9 +276,11 @@ public final class ActionScriptLexer { } private static int zzUnpackAction(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -395,9 +395,11 @@ public final class ActionScriptLexer { } private static int zzUnpackRowMap(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -1100,9 +1102,11 @@ public final class ActionScriptLexer { } private static int zzUnpackTrans(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -1157,9 +1161,11 @@ public final class ActionScriptLexer { } private static int zzUnpackAttribute(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = offset; /* index in unpacked array */ + int j = offset; + /* index in unpacked array */ int l = packed.length(); while (i < l) { @@ -1188,8 +1194,8 @@ public final class ActionScriptLexer { private int zzLexicalState = YYINITIAL; /** - * this buffer contains the current text to be matched and is - * the source of the yytext() string + * this buffer contains the current text to be matched and is the source of + * the yytext() string */ private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; @@ -1209,8 +1215,8 @@ public final class ActionScriptLexer { private int zzStartRead; /** - * endRead marks the last character in the buffer, that has been read - * from input + * endRead marks the last character in the buffer, that has been read from + * input */ private int zzEndRead; @@ -1246,10 +1252,10 @@ public final class ActionScriptLexer { private boolean zzEOFDone; /** - * The number of occupied positions in zzBuffer beyond zzEndRead. - * When a lead/high surrogate has been read from the input stream - * into the final zzBuffer position, this will have a value of 1; - * otherwise, it will have a value of 0. + * The number of occupied positions in zzBuffer beyond zzEndRead. When a + * lead/high surrogate has been read from the input stream into the final + * zzBuffer position, this will have a value of 1; otherwise, it will have a + * value of 0. */ private int zzFinalHighSurrogate = 0; @@ -1326,9 +1332,11 @@ public final class ActionScriptLexer { */ private static char[] zzUnpackCMap(String packed) { char[] map = new char[0x110000]; - int i = 0; /* index in packed string */ + int i = 0; + /* index in packed string */ - int j = 0; /* index in unpacked array */ + int j = 0; + /* index in unpacked array */ while (i < 2916) { int count = packed.charAt(i++); @@ -1387,7 +1395,8 @@ public final class ActionScriptLexer { if (totalRead > 0) { zzEndRead += totalRead; - if (totalRead == requested) { /* possibly more input available */ + if (totalRead == requested) { + /* possibly more input available */ if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) { --zzEndRead; @@ -1405,9 +1414,11 @@ public final class ActionScriptLexer { * Closes the input stream. */ public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ + zzAtEOF = true; + /* indicate end of file */ - zzEndRead = zzStartRead; /* invalidate buffer */ + zzEndRead = zzStartRead; + /* invalidate buffer */ if (zzReader != null) { zzReader.close(); @@ -1415,12 +1426,12 @@ public final class ActionScriptLexer { } /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. + * Resets the scanner to read from a new input stream. Does not close the + * old reader. * * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to ZZ_INITIAL. + * cannot be reused (internal buffer is discarded and lost). Lexical + * state is set to ZZ_INITIAL. * * Internal scan buffer is resized down to its initial length, if it has * grown. @@ -1466,13 +1477,12 @@ public final class ActionScriptLexer { } /** - * Returns the character at position pos from the - * matched text. + * Returns the character at position pos from the matched text. * * It is equivalent to yytext().charAt(pos), but faster * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. + * @param pos the position of the character to fetch. A value from 0 to + * yylength()-1. * * @return the character at position pos */ @@ -1490,14 +1500,13 @@ public final class ActionScriptLexer { /** * Reports an error that occured while scanning. * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). + * In a wellformed scanner (no or only correct usage of yypushback(int) and + * a match-all fallback rule) this method will only be called with things + * that "Can't Possibly Happen". If this method is called, something is + * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. + * Usual syntax/scanner level error handling should be done in error + * fallback rules. * * @param errorCode the code of the errormessage to display */ @@ -1517,8 +1526,8 @@ public final class ActionScriptLexer { * * They will be read again by then next call of the scanning method * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! + * @param number the number of characters to be read again. This number must + * not be greater than yylength()! */ public void yypushback(int number) { if (number > yylength()) { @@ -1529,8 +1538,8 @@ public final class ActionScriptLexer { } /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. + * Resumes scanning until the next regular expression is matched, the end of + * input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs @@ -1626,7 +1635,8 @@ public final class ActionScriptLexer { } case 185: break; - case 3: { /*ignore*/ + case 3: { + /*ignore*/ } case 186: @@ -1963,7 +1973,8 @@ public final class ActionScriptLexer { case 250: break; case 68: { - string.append('\\'); /*illegal escape sequence*/ + string.append('\\'); + /*illegal escape sequence*/ } case 251: diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/docs.js b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/docs.js index beeac0b56..d0f438957 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/docs.js +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/docs/docs.js @@ -1,152 +1,152 @@ function bind(el, evt, func) { - if (el.addEventListener){ + if (el.addEventListener) { el.addEventListener(evt, func, false); } else if (el.attachEvent) { el.attachEvent('on' + evt, func); } } -function showhide(e,show){ - var cls = " "+e.className+" "; - if(show && cls.indexOf(" hidden ") > -1){ - cls = cls.replace(" hidden "," "); - }else if(!show && cls.indexOf(" hidden ") == -1 ){ - cls = cls + "hidden "; - } - cls = cls.trim(); - e.className = cls; -} - -function hideNoName(name){ - var lis = document.getElementsByTagName("li"); - loopi:for(var i=0;i