From 4a4e0e4898cdc8dff68ff37793126f60bcbeb4cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Tue, 17 Nov 2015 09:24:42 +0100 Subject: [PATCH] Better line start detection Fixed debug info injection --- lib/flashdebugger.jar | Bin 211580 -> 212513 bytes .../jpexs/decompiler/flash/BaseLocalData.java | 4 + .../src/com/jpexs/decompiler/flash/SWF.java | 8 +- .../decompiler/flash/abc/AVM2LocalData.java | 1 + .../decompiler/flash/abc/ScriptPack.java | 51 ++- .../decompiler/flash/abc/avm2/AVM2Code.java | 45 ++- .../deobfuscation/AVM2DeobfuscatorGetSet.java | 6 +- .../AVM2DeobfuscatorRegisters.java | 2 +- .../deobfuscation/AVM2DeobfuscatorSimple.java | 6 +- .../flash/abc/avm2/graph/AVM2Graph.java | 227 +----------- .../flash/abc/avm2/graph/AVM2GraphSource.java | 6 +- .../abc/avm2/instructions/IfTypeIns.java | 3 +- .../instructions/InstructionDefinition.java | 10 +- .../avm2/instructions/alchemy/Lf32Ins.java | 2 +- .../avm2/instructions/alchemy/Lf64Ins.java | 2 +- .../avm2/instructions/alchemy/Li16Ins.java | 2 +- .../avm2/instructions/alchemy/Li32Ins.java | 2 +- .../abc/avm2/instructions/alchemy/Li8Ins.java | 2 +- .../avm2/instructions/alchemy/Sf32Ins.java | 2 +- .../avm2/instructions/alchemy/Sf64Ins.java | 2 +- .../avm2/instructions/alchemy/Si16Ins.java | 2 +- .../avm2/instructions/alchemy/Si32Ins.java | 2 +- .../abc/avm2/instructions/alchemy/Si8Ins.java | 2 +- .../avm2/instructions/alchemy/Sxi16Ins.java | 2 +- .../avm2/instructions/alchemy/Sxi1Ins.java | 2 +- .../avm2/instructions/alchemy/Sxi8Ins.java | 2 +- .../avm2/instructions/arithmetic/AddIIns.java | 2 +- .../avm2/instructions/arithmetic/AddIns.java | 2 +- .../arithmetic/DecrementIIns.java | 2 +- .../instructions/arithmetic/DecrementIns.java | 2 +- .../instructions/arithmetic/DivideIns.java | 2 +- .../arithmetic/IncrementIIns.java | 2 +- .../instructions/arithmetic/IncrementIns.java | 2 +- .../instructions/arithmetic/ModuloIns.java | 2 +- .../instructions/arithmetic/MultiplyIIns.java | 2 +- .../instructions/arithmetic/MultiplyIns.java | 2 +- .../instructions/arithmetic/NegateIIns.java | 2 +- .../instructions/arithmetic/NegateIns.java | 2 +- .../instructions/arithmetic/SubtractIIns.java | 2 +- .../instructions/arithmetic/SubtractIns.java | 2 +- .../avm2/instructions/bitwise/BitAndIns.java | 2 +- .../avm2/instructions/bitwise/BitNotIns.java | 2 +- .../avm2/instructions/bitwise/BitOrIns.java | 2 +- .../avm2/instructions/bitwise/BitXorIns.java | 2 +- .../avm2/instructions/bitwise/LShiftIns.java | 2 +- .../avm2/instructions/bitwise/RShiftIns.java | 2 +- .../avm2/instructions/bitwise/URShiftIns.java | 2 +- .../instructions/comparison/EqualsIns.java | 2 +- .../comparison/GreaterEqualsIns.java | 2 +- .../comparison/GreaterThanIns.java | 2 +- .../comparison/LessEqualsIns.java | 2 +- .../instructions/comparison/LessThanIns.java | 2 +- .../comparison/StrictEqualsIns.java | 2 +- .../construction/ConstructIns.java | 4 +- .../construction/ConstructPropIns.java | 6 +- .../construction/ConstructSuperIns.java | 2 +- .../construction/NewActivationIns.java | 2 +- .../construction/NewArrayIns.java | 4 +- .../construction/NewClassIns.java | 2 +- .../construction/NewFunctionIns.java | 2 +- .../construction/NewObjectIns.java | 6 +- .../avm2/instructions/executing/CallIns.java | 2 +- .../instructions/executing/CallMethodIns.java | 2 +- .../executing/CallPropLexIns.java | 4 +- .../executing/CallPropVoidIns.java | 4 +- .../executing/CallPropertyIns.java | 4 +- .../instructions/executing/CallStaticIns.java | 2 +- .../instructions/executing/CallSuperIns.java | 4 +- .../executing/CallSuperVoidIns.java | 4 +- .../abc/avm2/instructions/jumps/IfEqIns.java | 6 +- .../avm2/instructions/jumps/IfFalseIns.java | 2 +- .../abc/avm2/instructions/jumps/IfGeIns.java | 6 +- .../abc/avm2/instructions/jumps/IfGtIns.java | 6 +- .../abc/avm2/instructions/jumps/IfLeIns.java | 6 +- .../abc/avm2/instructions/jumps/IfLtIns.java | 6 +- .../abc/avm2/instructions/jumps/IfNGeIns.java | 6 +- .../abc/avm2/instructions/jumps/IfNGtIns.java | 6 +- .../abc/avm2/instructions/jumps/IfNLeIns.java | 6 +- .../abc/avm2/instructions/jumps/IfNLtIns.java | 6 +- .../abc/avm2/instructions/jumps/IfNeIns.java | 6 +- .../instructions/jumps/IfStrictEqIns.java | 6 +- .../instructions/jumps/IfStrictNeIns.java | 6 +- .../avm2/instructions/jumps/IfTrueIns.java | 2 +- .../abc/avm2/instructions/jumps/JumpIns.java | 4 +- .../instructions/localregs/DecLocalIIns.java | 6 +- .../instructions/localregs/DecLocalIns.java | 6 +- .../localregs/GetLocalTypeIns.java | 8 +- .../instructions/localregs/IncLocalIIns.java | 6 +- .../instructions/localregs/IncLocalIns.java | 6 +- .../localregs/SetLocalTypeIns.java | 20 +- .../instructions/other/DeletePropertyIns.java | 6 +- .../avm2/instructions/other/FindDefIns.java | 2 +- .../instructions/other/FindPropertyIns.java | 4 +- .../other/FindPropertyStrictIns.java | 4 +- .../instructions/other/GetDescendantsIns.java | 4 +- .../instructions/other/GetGlobalSlotIns.java | 2 +- .../avm2/instructions/other/GetLexIns.java | 2 +- .../instructions/other/GetPropertyIns.java | 4 +- .../avm2/instructions/other/GetSlotIns.java | 2 +- .../avm2/instructions/other/GetSuperIns.java | 4 +- .../avm2/instructions/other/HasNext2Ins.java | 2 +- .../avm2/instructions/other/HasNextIns.java | 2 +- .../abc/avm2/instructions/other/InIns.java | 2 +- .../instructions/other/InitPropertyIns.java | 4 +- .../avm2/instructions/other/NextNameIns.java | 2 +- .../avm2/instructions/other/NextValueIns.java | 2 +- .../instructions/other/ReturnValueIns.java | 2 +- .../instructions/other/ReturnVoidIns.java | 2 +- .../instructions/other/SetGlobalSlotIns.java | 2 +- .../instructions/other/SetPropertyIns.java | 22 +- .../avm2/instructions/other/SetSlotIns.java | 18 +- .../avm2/instructions/other/SetSuperIns.java | 4 +- .../abc/avm2/instructions/other/ThrowIns.java | 2 +- .../abc/avm2/instructions/stack/DupIns.java | 2 +- .../avm2/instructions/stack/PopScopeIns.java | 2 +- .../avm2/instructions/stack/PushByteIns.java | 2 +- .../instructions/stack/PushDoubleIns.java | 2 +- .../avm2/instructions/stack/PushFalseIns.java | 2 +- .../avm2/instructions/stack/PushIntIns.java | 2 +- .../instructions/stack/PushNamespaceIns.java | 2 +- .../avm2/instructions/stack/PushNanIns.java | 2 +- .../avm2/instructions/stack/PushNullIns.java | 2 +- .../avm2/instructions/stack/PushShortIns.java | 2 +- .../instructions/stack/PushStringIns.java | 2 +- .../avm2/instructions/stack/PushTrueIns.java | 2 +- .../avm2/instructions/stack/PushUIntIns.java | 2 +- .../instructions/stack/PushUndefinedIns.java | 2 +- .../avm2/instructions/stack/PushWithIns.java | 4 +- .../avm2/instructions/types/ApplyTypeIns.java | 2 +- .../avm2/instructions/types/AsTypeIns.java | 2 +- .../instructions/types/AsTypeLateIns.java | 2 +- .../avm2/instructions/types/CoerceAIns.java | 2 +- .../avm2/instructions/types/CoerceIns.java | 2 +- .../avm2/instructions/types/CoerceSIns.java | 2 +- .../avm2/instructions/types/ConvertBIns.java | 2 +- .../avm2/instructions/types/ConvertDIns.java | 2 +- .../avm2/instructions/types/ConvertIIns.java | 2 +- .../avm2/instructions/types/ConvertOIns.java | 2 +- .../avm2/instructions/types/ConvertSIns.java | 2 +- .../avm2/instructions/types/ConvertUIns.java | 2 +- .../instructions/types/InstanceOfIns.java | 2 +- .../avm2/instructions/types/IsTypeIns.java | 2 +- .../instructions/types/IsTypeLateIns.java | 2 +- .../avm2/instructions/types/TypeOfIns.java | 2 +- .../avm2/instructions/xml/CheckFilterIns.java | 2 +- .../abc/avm2/instructions/xml/DXNSIns.java | 2 +- .../avm2/instructions/xml/DXNSLateIns.java | 2 +- .../avm2/instructions/xml/EscXAttrIns.java | 2 +- .../avm2/instructions/xml/EscXElemIns.java | 2 +- .../flash/abc/avm2/model/AVM2Item.java | 23 +- .../abc/avm2/model/AlchemyLoadAVM2Item.java | 6 +- .../avm2/model/AlchemySignExtendAVM2Item.java | 6 +- .../abc/avm2/model/AlchemyStoreAVM2Item.java | 6 +- .../abc/avm2/model/ApplyTypeAVM2Item.java | 6 +- .../flash/abc/avm2/model/BooleanAVM2Item.java | 6 +- .../flash/abc/avm2/model/CallAVM2Item.java | 6 +- .../abc/avm2/model/CallMethodAVM2Item.java | 6 +- .../abc/avm2/model/CallPropertyAVM2Item.java | 6 +- .../abc/avm2/model/CallStaticAVM2Item.java | 6 +- .../abc/avm2/model/CallSuperAVM2Item.java | 6 +- .../flash/abc/avm2/model/ClassAVM2Item.java | 7 +- .../flash/abc/avm2/model/CoerceAVM2Item.java | 10 +- .../abc/avm2/model/ConstructAVM2Item.java | 6 +- .../abc/avm2/model/ConstructPropAVM2Item.java | 6 +- .../avm2/model/ConstructSuperAVM2Item.java | 6 +- .../flash/abc/avm2/model/ConvertAVM2Item.java | 6 +- .../abc/avm2/model/DecLocalAVM2Item.java | 6 +- .../abc/avm2/model/DecrementAVM2Item.java | 6 +- .../abc/avm2/model/DefaultXMLNamespace.java | 6 +- .../abc/avm2/model/EscapeXAttrAVM2Item.java | 6 +- .../abc/avm2/model/EscapeXElemAVM2Item.java | 6 +- .../abc/avm2/model/FilteredCheckAVM2Item.java | 6 +- .../flash/abc/avm2/model/FindDefAVM2Item.java | 6 +- .../abc/avm2/model/FindPropertyAVM2Item.java | 6 +- .../abc/avm2/model/FloatValueAVM2Item.java | 6 +- .../abc/avm2/model/FullMultinameAVM2Item.java | 20 +- .../avm2/model/GetDescendantsAVM2Item.java | 8 +- .../flash/abc/avm2/model/GetLexAVM2Item.java | 6 +- .../abc/avm2/model/GetPropertyAVM2Item.java | 6 +- .../flash/abc/avm2/model/GetSlotAVM2Item.java | 6 +- .../abc/avm2/model/GetSuperAVM2Item.java | 6 +- .../flash/abc/avm2/model/HasNextAVM2Item.java | 6 +- .../flash/abc/avm2/model/InAVM2Item.java | 6 +- .../abc/avm2/model/IncLocalAVM2Item.java | 6 +- .../abc/avm2/model/IncrementAVM2Item.java | 6 +- .../abc/avm2/model/InitPropertyAVM2Item.java | 8 +- .../abc/avm2/model/InitVectorAVM2Item.java | 14 +- .../abc/avm2/model/IntegerValueAVM2Item.java | 8 +- .../abc/avm2/model/LocalRegAVM2Item.java | 6 +- .../abc/avm2/model/NameSpaceAVM2Item.java | 6 +- .../flash/abc/avm2/model/NameValuePair.java | 4 +- .../flash/abc/avm2/model/NanAVM2Item.java | 6 +- .../abc/avm2/model/NewActivationAVM2Item.java | 6 +- .../abc/avm2/model/NewArrayAVM2Item.java | 6 +- .../abc/avm2/model/NewFunctionAVM2Item.java | 6 +- .../abc/avm2/model/NewObjectAVM2Item.java | 6 +- .../abc/avm2/model/NextNameAVM2Item.java | 6 +- .../abc/avm2/model/NextValueAVM2Item.java | 6 +- .../flash/abc/avm2/model/NullAVM2Item.java | 6 +- .../abc/avm2/model/NumberValueAVM2Item.java | 5 +- .../abc/avm2/model/PostDecrementAVM2Item.java | 6 +- .../abc/avm2/model/PostIncrementAVM2Item.java | 6 +- .../abc/avm2/model/ReturnValueAVM2Item.java | 6 +- .../abc/avm2/model/ReturnVoidAVM2Item.java | 9 +- .../flash/abc/avm2/model/ScriptAVM2Item.java | 4 +- .../abc/avm2/model/SetGlobalSlotAVM2Item.java | 6 +- .../abc/avm2/model/SetLocalAVM2Item.java | 8 +- .../abc/avm2/model/SetPropertyAVM2Item.java | 8 +- .../flash/abc/avm2/model/SetSlotAVM2Item.java | 8 +- .../abc/avm2/model/SetSuperAVM2Item.java | 6 +- .../flash/abc/avm2/model/SetTypeAVM2Item.java | 2 +- .../flash/abc/avm2/model/StringAVM2Item.java | 6 +- .../flash/abc/avm2/model/ThisAVM2Item.java | 6 +- .../flash/abc/avm2/model/ThrowAVM2Item.java | 6 +- .../abc/avm2/model/UndefinedAVM2Item.java | 6 +- .../abc/avm2/model/UnparsedAVM2Item.java | 6 +- .../flash/abc/avm2/model/WithAVM2Item.java | 10 +- .../flash/abc/avm2/model/WithEndAVM2Item.java | 6 +- .../abc/avm2/model/WithObjectAVM2Item.java | 6 +- .../flash/abc/avm2/model/XMLAVM2Item.java | 6 +- .../model/clauses/DeclarationAVM2Item.java | 6 +- .../avm2/model/clauses/ExceptionAVM2Item.java | 4 +- .../avm2/model/clauses/FilterAVM2Item.java | 6 +- .../avm2/model/clauses/ForEachInAVM2Item.java | 6 +- .../abc/avm2/model/clauses/ForInAVM2Item.java | 6 +- .../abc/avm2/model/clauses/TryAVM2Item.java | 4 +- .../avm2/model/operations/AddAVM2Item.java | 4 +- .../avm2/model/operations/AsTypeAVM2Item.java | 4 +- .../avm2/model/operations/BitAndAVM2Item.java | 4 +- .../avm2/model/operations/BitNotAVM2Item.java | 4 +- .../avm2/model/operations/BitOrAVM2Item.java | 4 +- .../avm2/model/operations/BitXorAVM2Item.java | 4 +- .../operations/DeletePropertyAVM2Item.java | 6 +- .../avm2/model/operations/DivideAVM2Item.java | 4 +- .../abc/avm2/model/operations/EqAVM2Item.java | 6 +- .../abc/avm2/model/operations/GeAVM2Item.java | 6 +- .../abc/avm2/model/operations/GtAVM2Item.java | 6 +- .../abc/avm2/model/operations/InAVM2Item.java | 4 +- .../model/operations/InstanceOfAVM2Item.java | 4 +- .../avm2/model/operations/IsTypeAVM2Item.java | 4 +- .../avm2/model/operations/LShiftAVM2Item.java | 4 +- .../abc/avm2/model/operations/LeAVM2Item.java | 6 +- .../abc/avm2/model/operations/LtAVM2Item.java | 6 +- .../avm2/model/operations/ModuloAVM2Item.java | 4 +- .../model/operations/MultiplyAVM2Item.java | 4 +- .../avm2/model/operations/NegAVM2Item.java | 4 +- .../avm2/model/operations/NeqAVM2Item.java | 6 +- .../operations/PreDecrementAVM2Item.java | 4 +- .../operations/PreIncrementAVM2Item.java | 4 +- .../avm2/model/operations/RShiftAVM2Item.java | 4 +- .../model/operations/StrictEqAVM2Item.java | 6 +- .../model/operations/StrictNeqAVM2Item.java | 6 +- .../model/operations/SubtractAVM2Item.java | 4 +- .../avm2/model/operations/TypeOfAVM2Item.java | 4 +- .../model/operations/URShiftAVM2Item.java | 4 +- .../parser/script/AVM2SourceGenerator.java | 22 +- .../abc/avm2/parser/script/AbcIndexing.java | 2 +- .../parser/script/ActionScript3Parser.java | 192 +++++----- .../parser/script/AssignableAVM2Item.java | 6 +- .../abc/avm2/parser/script/CallAVM2Item.java | 2 +- .../abc/avm2/parser/script/ClassAVM2Item.java | 2 +- .../abc/avm2/parser/script/ConstAVM2Item.java | 2 +- .../avm2/parser/script/FunctionAVM2Item.java | 2 +- .../avm2/parser/script/InterfaceAVM2Item.java | 2 +- .../abc/avm2/parser/script/NameAVM2Item.java | 8 +- .../avm2/parser/script/PackageAVM2Item.java | 2 +- .../avm2/parser/script/PropertyAVM2Item.java | 2 +- .../abc/avm2/parser/script/SlotAVM2Item.java | 2 +- .../parser/script/UnresolvedAVM2Item.java | 8 +- .../abc/avm2/parser/script/XMLAVM2Item.java | 2 +- .../avm2/parser/script/XMLFilterAVM2Item.java | 2 +- .../flash/abc/types/MethodInfo.java | 4 +- .../jpexs/decompiler/flash/action/Action.java | 30 +- .../decompiler/flash/action/ActionGraph.java | 47 ++- .../flash/action/ActionGraphSource.java | 1 + .../flash/action/ActionListReader.java | 20 +- .../flash/action/ActionLocalData.java | 3 + .../action/flashlite/ActionFSCommand2.java | 5 +- .../action/flashlite/ActionStrictMode.java | 5 +- .../flash/action/model/ActionItem.java | 10 +- .../action/model/AsciiToCharActionItem.java | 4 +- .../flash/action/model/CallActionItem.java | 4 +- .../action/model/CallFunctionActionItem.java | 4 +- .../action/model/CallMethodActionItem.java | 4 +- .../flash/action/model/CastOpActionItem.java | 4 +- .../action/model/CharToAsciiActionItem.java | 4 +- .../action/model/CloneSpriteActionItem.java | 4 +- .../action/model/DecrementActionItem.java | 4 +- .../action/model/DefineLocalActionItem.java | 6 +- .../model/DefineRegisterActionItem.java | 2 +- .../flash/action/model/DeleteActionItem.java | 4 +- .../action/model/DirectValueActionItem.java | 11 +- .../action/model/EnumerateActionItem.java | 4 +- .../flash/action/model/EvalActionItem.java | 4 +- .../flash/action/model/ExtendsActionItem.java | 4 +- .../action/model/FSCommand2ActionItem.java | 4 +- .../action/model/FSCommandActionItem.java | 6 +- .../action/model/FunctionActionItem.java | 14 +- .../action/model/GetMemberActionItem.java | 4 +- .../action/model/GetPropertyActionItem.java | 4 +- .../flash/action/model/GetTimeActionItem.java | 7 +- .../flash/action/model/GetURL2ActionItem.java | 4 +- .../flash/action/model/GetURLActionItem.java | 4 +- .../action/model/GetVariableActionItem.java | 4 +- .../action/model/GetVersionActionItem.java | 7 +- .../action/model/GotoFrame2ActionItem.java | 4 +- .../action/model/GotoFrameActionItem.java | 4 +- .../action/model/GotoLabelActionItem.java | 4 +- .../action/model/ImplementsOpActionItem.java | 4 +- .../action/model/IncrementActionItem.java | 4 +- .../action/model/InitArrayActionItem.java | 4 +- .../action/model/InitObjectActionItem.java | 4 +- .../action/model/LoadMovieActionItem.java | 4 +- .../action/model/LoadMovieNumActionItem.java | 8 +- .../action/model/LoadVariablesActionItem.java | 4 +- .../model/LoadVariablesNumActionItem.java | 8 +- .../action/model/MBAsciiToCharActionItem.java | 4 +- .../action/model/MBCharToAsciiActionItem.java | 4 +- .../model/MBStringExtractActionItem.java | 4 +- .../model/MBStringLengthActionItem.java | 4 +- .../action/model/NewMethodActionItem.java | 4 +- .../action/model/NewObjectActionItem.java | 4 +- .../action/model/NextFrameActionItem.java | 7 +- .../flash/action/model/PlayActionItem.java | 7 +- .../flash/action/model/PopActionItem.java | 7 +- .../action/model/PostDecrementActionItem.java | 6 +- .../action/model/PostIncrementActionItem.java | 6 +- .../action/model/PrevFrameActionItem.java | 7 +- .../flash/action/model/PrintActionItem.java | 6 +- .../action/model/PrintAsBitmapActionItem.java | 6 +- .../model/PrintAsBitmapNumActionItem.java | 10 +- .../action/model/PrintNumActionItem.java | 10 +- .../action/model/RandomNumberActionItem.java | 4 +- .../action/model/RemoveSpriteActionItem.java | 4 +- .../flash/action/model/ReturnActionItem.java | 4 +- .../action/model/SetMemberActionItem.java | 6 +- .../action/model/SetPropertyActionItem.java | 6 +- .../action/model/SetTarget2ActionItem.java | 4 +- .../action/model/SetTargetActionItem.java | 4 +- .../action/model/SetVariableActionItem.java | 6 +- .../action/model/StartDragActionItem.java | 4 +- .../flash/action/model/StopActionItem.java | 7 +- .../action/model/StopAllSoundsActionItem.java | 7 +- .../action/model/StopDragActionItem.java | 7 +- .../action/model/StoreRegisterActionItem.java | 6 +- .../action/model/StrictModeActionItem.java | 4 +- .../action/model/StringExtractActionItem.java | 4 +- .../action/model/StringLengthActionItem.java | 4 +- .../action/model/TargetPathActionItem.java | 4 +- .../flash/action/model/TemporaryRegister.java | 2 +- .../flash/action/model/ThrowActionItem.java | 4 +- .../action/model/ToIntegerActionItem.java | 4 +- .../action/model/ToNumberActionItem.java | 4 +- .../action/model/ToStringActionItem.java | 4 +- .../model/ToggleHighQualityActionItem.java | 7 +- .../flash/action/model/TraceActionItem.java | 4 +- .../flash/action/model/TypeOfActionItem.java | 4 +- .../action/model/UnLoadMovieActionItem.java | 4 +- .../model/UnLoadMovieNumActionItem.java | 6 +- .../action/model/UnsupportedActionItem.java | 4 +- .../action/model/clauses/ClassActionItem.java | 2 +- .../action/model/clauses/ForInActionItem.java | 4 +- .../clauses/IfFrameLoadedActionItem.java | 4 +- .../model/clauses/InterfaceActionItem.java | 2 +- .../action/model/clauses/LoopActionItem.java | 9 +- .../model/clauses/TellTargetActionItem.java | 4 +- .../action/model/clauses/TryActionItem.java | 2 +- .../action/model/clauses/WithActionItem.java | 8 +- .../model/operations/AddActionItem.java | 4 +- .../model/operations/AndActionItem.java | 4 +- .../model/operations/BitAndActionItem.java | 4 +- .../model/operations/BitOrActionItem.java | 4 +- .../model/operations/BitXorActionItem.java | 4 +- .../model/operations/DivideActionItem.java | 4 +- .../action/model/operations/EqActionItem.java | 6 +- .../action/model/operations/GeActionItem.java | 6 +- .../action/model/operations/GtActionItem.java | 6 +- .../action/model/operations/InActionItem.java | 4 +- .../operations/InstanceOfActionItem.java | 4 +- .../model/operations/LShiftActionItem.java | 4 +- .../action/model/operations/LeActionItem.java | 6 +- .../action/model/operations/LtActionItem.java | 6 +- .../model/operations/ModuloActionItem.java | 4 +- .../model/operations/MultiplyActionItem.java | 4 +- .../model/operations/NeqActionItem.java | 6 +- .../action/model/operations/OrActionItem.java | 4 +- .../operations/PreDecrementActionItem.java | 4 +- .../operations/PreIncrementActionItem.java | 4 +- .../model/operations/RShiftActionItem.java | 4 +- .../model/operations/StrictEqActionItem.java | 6 +- .../model/operations/StrictNeqActionItem.java | 6 +- .../model/operations/StringAddActionItem.java | 4 +- .../model/operations/StringEqActionItem.java | 6 +- .../model/operations/StringGeActionItem.java | 6 +- .../model/operations/StringGtActionItem.java | 6 +- .../model/operations/StringLeActionItem.java | 6 +- .../model/operations/StringLtActionItem.java | 6 +- .../model/operations/StringNeActionItem.java | 6 +- .../model/operations/SubtractActionItem.java | 4 +- .../model/operations/URShiftActionItem.java | 4 +- .../parser/script/ActionScript2Parser.java | 349 +++++++++--------- .../parser/script/ActionSourceGenerator.java | 6 +- .../flash/action/special/ActionEnd.java | 3 +- .../flash/action/special/ActionNop.java | 6 +- .../flash/action/swf3/ActionGetURL.java | 17 +- .../flash/action/swf3/ActionGoToLabel.java | 5 +- .../flash/action/swf3/ActionGotoFrame.java | 5 +- .../flash/action/swf3/ActionNextFrame.java | 5 +- .../flash/action/swf3/ActionPlay.java | 7 +- .../flash/action/swf3/ActionPrevFrame.java | 5 +- .../flash/action/swf3/ActionSetTarget.java | 5 +- .../flash/action/swf3/ActionStop.java | 5 +- .../flash/action/swf3/ActionStopSounds.java | 5 +- .../action/swf3/ActionToggleQuality.java | 5 +- .../flash/action/swf3/ActionWaitForFrame.java | 7 +- .../flash/action/swf4/ActionAdd.java | 5 +- .../flash/action/swf4/ActionAnd.java | 5 +- .../flash/action/swf4/ActionAsciiToChar.java | 5 +- .../flash/action/swf4/ActionCall.java | 5 +- .../flash/action/swf4/ActionCharToAscii.java | 6 +- .../flash/action/swf4/ActionCloneSprite.java | 6 +- .../flash/action/swf4/ActionDivide.java | 6 +- .../flash/action/swf4/ActionEndDrag.java | 6 +- .../flash/action/swf4/ActionEquals.java | 6 +- .../flash/action/swf4/ActionGetProperty.java | 6 +- .../flash/action/swf4/ActionGetTime.java | 7 +- .../flash/action/swf4/ActionGetURL2.java | 25 +- .../flash/action/swf4/ActionGetVariable.java | 10 +- .../flash/action/swf4/ActionGotoFrame2.java | 6 +- .../flash/action/swf4/ActionLess.java | 6 +- .../action/swf4/ActionMBAsciiToChar.java | 6 +- .../action/swf4/ActionMBCharToAscii.java | 6 +- .../action/swf4/ActionMBStringExtract.java | 6 +- .../action/swf4/ActionMBStringLength.java | 6 +- .../flash/action/swf4/ActionMultiply.java | 6 +- .../flash/action/swf4/ActionNot.java | 4 +- .../flash/action/swf4/ActionOr.java | 6 +- .../flash/action/swf4/ActionPop.java | 4 +- .../flash/action/swf4/ActionPush.java | 13 +- .../flash/action/swf4/ActionRandomNumber.java | 6 +- .../flash/action/swf4/ActionRemoveSprite.java | 6 +- .../flash/action/swf4/ActionSetProperty.java | 14 +- .../flash/action/swf4/ActionSetTarget2.java | 6 +- .../flash/action/swf4/ActionSetVariable.java | 18 +- .../flash/action/swf4/ActionStartDrag.java | 6 +- .../flash/action/swf4/ActionStringAdd.java | 6 +- .../flash/action/swf4/ActionStringEquals.java | 6 +- .../action/swf4/ActionStringExtract.java | 6 +- .../flash/action/swf4/ActionStringLength.java | 6 +- .../flash/action/swf4/ActionStringLess.java | 6 +- .../flash/action/swf4/ActionSubtract.java | 6 +- .../flash/action/swf4/ActionToInteger.java | 6 +- .../flash/action/swf4/ActionTrace.java | 6 +- .../action/swf4/ActionWaitForFrame2.java | 5 +- .../flash/action/swf5/ActionAdd2.java | 6 +- .../flash/action/swf5/ActionBitAnd.java | 6 +- .../flash/action/swf5/ActionBitLShift.java | 6 +- .../flash/action/swf5/ActionBitOr.java | 6 +- .../flash/action/swf5/ActionBitRShift.java | 6 +- .../flash/action/swf5/ActionBitURShift.java | 6 +- .../flash/action/swf5/ActionBitXor.java | 6 +- .../flash/action/swf5/ActionCallFunction.java | 6 +- .../flash/action/swf5/ActionCallMethod.java | 6 +- .../flash/action/swf5/ActionConstantPool.java | 4 +- .../flash/action/swf5/ActionDecrement.java | 6 +- .../action/swf5/ActionDefineFunction.java | 7 +- .../flash/action/swf5/ActionDefineLocal.java | 6 +- .../flash/action/swf5/ActionDefineLocal2.java | 6 +- .../flash/action/swf5/ActionDelete.java | 6 +- .../flash/action/swf5/ActionDelete2.java | 6 +- .../flash/action/swf5/ActionEnumerate.java | 6 +- .../flash/action/swf5/ActionEquals2.java | 6 +- .../flash/action/swf5/ActionGetMember.java | 6 +- .../flash/action/swf5/ActionIncrement.java | 6 +- .../flash/action/swf5/ActionInitArray.java | 6 +- .../flash/action/swf5/ActionInitObject.java | 6 +- .../flash/action/swf5/ActionLess2.java | 6 +- .../flash/action/swf5/ActionModulo.java | 6 +- .../flash/action/swf5/ActionNewMethod.java | 6 +- .../flash/action/swf5/ActionNewObject.java | 6 +- .../action/swf5/ActionPushDuplicate.java | 5 +- .../flash/action/swf5/ActionReturn.java | 6 +- .../flash/action/swf5/ActionSetMember.java | 18 +- .../flash/action/swf5/ActionStackSwap.java | 4 +- .../action/swf5/ActionStoreRegister.java | 10 +- .../flash/action/swf5/ActionTargetPath.java | 6 +- .../flash/action/swf5/ActionToNumber.java | 6 +- .../flash/action/swf5/ActionToString.java | 6 +- .../flash/action/swf5/ActionTypeOf.java | 6 +- .../flash/action/swf5/ActionWith.java | 5 +- .../flash/action/swf6/ActionEnumerate2.java | 6 +- .../flash/action/swf6/ActionGreater.java | 6 +- .../flash/action/swf6/ActionInstanceOf.java | 6 +- .../flash/action/swf6/ActionStrictEquals.java | 6 +- .../action/swf6/ActionStringGreater.java | 6 +- .../flash/action/swf7/ActionCastOp.java | 6 +- .../action/swf7/ActionDefineFunction2.java | 7 +- .../flash/action/swf7/ActionExtends.java | 6 +- .../flash/action/swf7/ActionImplementsOp.java | 6 +- .../flash/action/swf7/ActionThrow.java | 6 +- .../flash/action/swf7/ActionTry.java | 7 +- .../helpers/GraphSourceItemPosition.java | 2 + .../flash/helpers/GraphTextWriter.java | 3 +- .../flash/helpers/HighlightedTextWriter.java | 6 +- .../flash/helpers/hilight/HighlightData.java | 12 +- .../src/com/jpexs/decompiler/graph/Graph.java | 63 ++-- .../jpexs/decompiler/graph/GraphSource.java | 1 + .../graph/GraphSourceItemContainer.java | 2 +- .../decompiler/graph/GraphTargetItem.java | 26 +- .../com/jpexs/decompiler/graph/MarkItem.java | 2 +- .../decompiler/graph/NotCompileTimeItem.java | 7 +- .../decompiler/graph/TranslateStack.java | 2 +- .../decompiler/graph/TypeFunctionItem.java | 7 +- .../com/jpexs/decompiler/graph/TypeItem.java | 7 +- .../jpexs/decompiler/graph/model/AndItem.java | 7 +- .../decompiler/graph/model/BinaryOpItem.java | 9 +- .../decompiler/graph/model/BlockItem.java | 7 +- .../decompiler/graph/model/BreakItem.java | 4 +- .../graph/model/CommaExpressionItem.java | 7 +- .../decompiler/graph/model/CommentItem.java | 7 +- .../decompiler/graph/model/ContinueItem.java | 4 +- .../decompiler/graph/model/DoWhileItem.java | 4 +- .../decompiler/graph/model/DuplicateItem.java | 4 +- .../decompiler/graph/model/FalseItem.java | 6 +- .../jpexs/decompiler/graph/model/ForItem.java | 4 +- .../decompiler/graph/model/GotoItem.java | 4 +- .../jpexs/decompiler/graph/model/IfItem.java | 4 +- .../graph/model/IntegerValueItem.java | 4 +- .../decompiler/graph/model/LabelItem.java | 4 +- .../decompiler/graph/model/LoopItem.java | 4 +- .../jpexs/decompiler/graph/model/NotItem.java | 4 +- .../jpexs/decompiler/graph/model/OrItem.java | 7 +- .../graph/model/ParenthesisItem.java | 4 +- .../jpexs/decompiler/graph/model/PopItem.java | 4 +- .../decompiler/graph/model/PushItem.java | 3 +- .../decompiler/graph/model/ScriptEndItem.java | 5 +- .../decompiler/graph/model/SwitchItem.java | 4 +- .../decompiler/graph/model/TernarOpItem.java | 4 +- .../decompiler/graph/model/TrueItem.java | 6 +- .../decompiler/graph/model/UnaryOpItem.java | 4 +- .../graph/model/UnboundedTypeItem.java | 5 +- .../graph/model/UniversalLoopItem.java | 4 +- .../decompiler/graph/model/WhileItem.java | 4 +- .../flash/gui/AdvancedSettingsDialog.java | 2 +- .../decompiler/flash/gui/DebuggerHandler.java | 124 ++++++- .../decompiler/flash/gui/abc/ABCPanel.java | 121 +++++- .../flash/gui/abc/DecompiledEditorPane.java | 1 - 547 files changed, 2058 insertions(+), 1911 deletions(-) diff --git a/lib/flashdebugger.jar b/lib/flashdebugger.jar index caff5adf32b06614cea684428c8eaddfb0e2b7f2..e9bac0c0d7cee57fb6268ceeb545d312658fb3cc 100644 GIT binary patch delta 12809 zcmbt)33OD&(tq{6Gjk`COO_$~I$_O5!VJMGl^}JE4%|+xSdUNX*JxO_E>odKBg!1NABUgC1xJ7j0!Vu|PyefKf@terv zqMtH|i-r7j9)cC-DcEtR=w4wZ9lu0P#E^E8^zeJcE@S0z^XIl@ucH>Ma(vfuZk4Y6Q1b4|(P}U;E;zdd+^*9aTB}ncB?+iuOYio^Xg_DqMCzu~ z9h9Wgot)jp**ebd=4?G@8|WULHgdL!HtV#7?lo5JNeNvvzo2Acc~uPt)5)N%I&Gt# zM)B+r<8#065!54U{P~M2%1erCN(HsY zd=iY;T_eSlhl2e#D@ItyfyTi$A<>nKYS3%++~UQ>>E)H_c?-)cY6@x=mKM+NXLfUn ze&*BBqN`Dql{&&Q1a*d)C`eEpTFJ(YfUq7ZXgkm% zDx_58x~$u&3#Fqa(6<}YqI#KBws&eU9uK(NtJYIwrsG+PI!e(~8YspcTTgM3j(Uo( zCr>>k>?M8dv((<*0rh9V!H@RSQ`C-Z#3Rn62;?&Wok?w|1co+?LaCG@X*R`D8708l z5~&wglT1fp#uynsTcLelya$<`T%AF^U2hgGRY2ZQK0A#x&xT<0LlU#Chk)T z*SrHMTh8hL4Whx&>JSiwp|lteLkEl9aIhNzTsN}a!1$U*xf+esXp}~yg+^nb`D>JV z0~%JFPz1zSCs>R_M}_ieJW7_YfYMNN1D4zo74|t2~M5a zQylsrXs4gOEBRA5f;M0`v!(gsqosF@Rv%UBEVG%C6 z=zID>qaV5PlZ!6V4_y1%MVGDGFWmgqpZ-Pv=IlQ%7}OPpUFGZ=XTNcFU8CRGw@KU| z47q_!kS2r+Yj{NyiVOD1XrXfEwQ+9e%%KSl0}7{$;)I_jT-@+?QG(Dl(Z)p`L;#Zo zY9h!*okf5PjbLyUZWpDAwweg>r&JNDi7;-5`_nKH0bxZXXHlAn<}!vm#5zTsi&PP> z39pCQByiSF6YaU|poxymp_5B=7Kwf$NhCW(3O7=jLl=LMCek_Us)=sgp}UKEh#t&1 zg9&;vtd~>thEhcz#`SfIOh3_2^!KBi!~m{kImJNcm_1q(gIs_P=1xOgKn>*)bDUxr zLxy85#0buEonjlb=5>zrZOb2-1g*9#k-*C@()}Sngz} zxarWm!mEn-(U?7bwW}j0i&fOb#6y>-ZxABvkaxzn!WOLwk8#V)Vll~hcV@XbWvrVx z^w9E>wTgck&C$eUT}&ZU`sZvNPG_zrrt0#L6NP-7+{Gu!-I};r7t_RaT@)dMv%#S- zpDJ`XpOrd!Ia@^)I5)!D)bbgzma{tm8UJCZ@nbKCv3quqdn1!=p}YB@LADKB;KXc? zbA~7eM={g*ZgzryiI~L=oCZy&n{&UIEl(}ui#Z8KUVdPpJaKeUCg$j(T+B7@EK5wf zMa&fxD36GF#T8}gL*^A%SL zWkp44NlmF7yvArhr@eELSgh0A^p2U3r^J|-`U|&Rr|nP`w~g#fcYj?h5w~h$sVaHyVxYCuNnNT(l?)#jI;8f%jD7kWvj=jeHs6?)z( zOyg`=*rCL^iFPF|(Rd~#(g>(<8=e7uj5U?PUdOQ9u{i}WX!{b3fYr7q77k9Dh;sJ4 zMb&cz*%EV;Cc;||fEy$DBR3ARIjFhWL}iIM45h+mh%yRCS{2Tu1roLp?dlfo8nhR+ zXnPj}u%rdxR89!Ie z5IcK}-yS7#@tn0K!pfvEv#7LiA+D5v1I}nToUiQH>tcXfL1j`>uhL zK#h*}Bz}UuA0&Db z60>9~`e3KZp7}L{(Q{i({5ojnf{1RH-033r$mkF8%?PJ2y7@htY=XchAmnYKCM~cmMVS$Lx>iPW9bDt>SNqW z>Gds@Zkg8mI|Ax*IX@dh z*!6TAFqIy~>YTv*RC)~o&ja)_YD6D5>E>gI)F>p|h{g96@MWrIaq~&PjzG~%d#{s# zO5!wnRs2Rnu95v3MI*lf6SGSTl9Oqi&<$9LtqCjx%Qk~GdJWO$z7|Vq&G~iA`3-BY zz=ia{qBtSO+sXCR_kMZ}MdqQ=w}!APikB{ts^C2|15|Iqm~B|Ttx^F3t&YBZh5o+D zvZ)s#vcG}7X4(3yjZ(taf2RbrG zCvAK~JN^;EF2AWt;lhAwe zm}ZhG?x{?Y`qJ8ZDokd!vT~Sgsr7U-*xKs7G_585bRPd1s6a(fPPoSeLewM*7ReMX zQph7xDN%HxE+P#9TRM#r-6>CG&3P@;JWv&mT1=e~ z%{1=)EwEzmX(%ZVcZN@(Q$=dhPB7k4Ez~CHQ~En3g4$pt3agF$lOgG(WXz-JAexrA z{K7zDG}*-%Ikd+jZ5q%Y1M+z2j*a&$s1JM5usjQcjsn!|!z{x;gASk3=f3ev{>S(; zn$;D+1tnwEv9^g)GGXSBA6DA)*}6vJSRm81|wWSV2)w#r=Kd0AHEqD~$t( zqhRG{Z;O^zZn@qJpEjJhQ+*+AI|zI3A98Ub;E=vVjcvOveTAB>g*t2;%=koj6BrF5 zjE)bXnclmy;)9&aWv!PjJ}AgnwZ{iVSk=^C4#;G~m46nOp|-|~y|IFafLW|ag?1Qq zE1S1v^Je7QH}ox5L&KGlMOSgcWlGU)I5X3w=yv$r4pMYS3(*z&PV&Bh=K{h;N6d#3 zzt-1auh}6Z5EdU8cxbG5Od#JdcWzwAuXKkJH~*_Em+>dkB|Ps`4~5%n-+xHWO zCk^KYu1JD%oix%(xFE$7Zd!3PnzJ#S;l@ACNqJ5h@1%Su6*&1l?ItHp)M%1MlMxVB z6dRA;7iENhe6p8bR$4P*X;tZvR`m_37U8GH40{*u}*Q6Dx}6mk!WzHOFVfG8=| zvzWO9(4A6rgj2}cQG1==Py~rY9gEbFIoymE-sP|dJ5hp;WkH7LCL{2Zu=bD?fi#2} zH*+p-8iJg|7FCqglvh?@h%uFm%S(qC13wvOepxLB@_SYquGP>>Jl54=x?)9ad;+Sx z)>g^SScIL!&r>PLQ_TfyMO&lyr*3aOY4v1tJCWfi^FvWjE_N&m9y%HyyxPgv6w6zr z!``||?wB$2LcKdmOog1VasTH?|8xINE&4l~`a?nRmy*GD495(nGK2l7;5QJ79UgD^ zn8t)a1#f5yM3rK6y8sf!V_@&62+f<)y zJpi$h;%Nt=_!Z0&@+5@ht=~Vnf!xXB2n8g&gO5;KnTI5+M<|p}D*xmzjEb}|D$;(0 zLXtxrj7vE}c5A1zX1ildoPrq`C>o(r3=W)FJio=^#O;Zd>;*gN4JrFTz`kf@;=Qb& z6m^6pgiln6gP9~q?e%9%gOCh^l}YXOXY;}s3}bU(ZT4qF!zqj>X)gw`X7?CMUV_n4 zmi|Ye&OZ)zSRZ@==!?`JiI-+DQVtT+jc|t@bcY{wM;vrV9&|??bVna_#~gIWS_c%* zwi5>9Q#FIKG2#$RXBe()ximZ*&TR;u?}j0O%*ESR^J0v~+}ooQ5AGsohGP97B#WU? zW=j`#XyKV(q`NBn{HP)y#=?KOsJ{W1^oC>GGisul9jH1EO+SCu!M-c&o7u8_?1ybm zZV&i(pvL9c-!C$}p`T4GU_iqGfANULZbaMjQY@VbZ;0MFZx?t=ht7&FT;YB zDdt08gX{5~femjbh$ZY{8-{ccLnXs?i6T!{&ZLS!S^2)JZ>$>`Vy`6L*IQ&u)P;WH zUdu5rTb;9Ey9=i#Qg?Gpf=K312mZ~UK@5$?v!~7H&mjd|V?XK#OT;%3L6e*`nHy95 z+2J|qW^PP#@`n&X1sZ<~=|nT^H+(u&(q&ZBB zZzO><*TokoKfai2ROzHD7jESXomB0l8YeB%Xt7z`MZ}u74HV0Cf4JascGJ1Ds*Ut7 zI)`Yp7s4Uu&VuER7kT?77wKt{15h| z2sf7x6Vtt+$sEi^v7_Wl^bv|dSRV=xA9jTF=4vebedI1$4_6;6dpt*R&r<|G+sSU3 z_E=>PMMT;UQ@lH&p4#moe>F?(W!p&B8rL0kf*FtuX$mmFW`g^(E+`5Z*#!w{Db$K`7TE(o~@ z;78&vFbeVbXu5!}AqtHb8ch&wX`%>&<7CD29XtbvM>dwIqxZf#O zh|ufQ7oTB5Qf$}c!;#e77d?F$B#lFhs*-EvP%|2f_YRzM4!8flK;)E?! zc!@2Mey>(4CG(2K${AT1wN$Yd^vZJO4axjOt+HRD=C4tnmX)|Wm3L(2;yUG`tbDRT zc}Gs|(e27o*~{~w@~N!+_K(6X_9I@z7|z!%R4>bZS$XXXWuHVtW?P5a z7k}U|$2!z(Zf|y|d^a>-cBs9$yyj2`a@kK)bGTfssbjf(UsK0(+0m)ybGg*1&gAlQ zr&=Tpr}+;X=14y^*Tcb6t537=7>&QWTD#jQ{wNxsRh;I!7}d?3F8HZ2%9S`D++}ug zsS%RPtla~%-oqB>#F1pU+#eza!ew%5O^Bj)(V-A#Om^KHzHKE#8Ja9v~uCfV-xh}{z&wjZx-p_}J;MB7f=Vbv_r?Ww76mz=9oZ^Eeu<-(5Nq72>gpDu4 z*K^`nsqt4=`*SFh59jW02cx?!${g=jyP9c{LNnvtzS;3bVHU>c#0Pofuda4W0@LSm z{|DXZKehw&OEZrrh#>Qd+c$@MYX5rfBF5&#F<0ZSt~Ri?FLp|?$*ZA+Vd#;B?n%oVs;I0sB*`EvnlXrSsm;pV7 z>(7Q66bgcxOi5rIe8gp5>Wu}N7ix81#@PBS#wMFDhx+Wc)n%q}dMN8^M-F1rB#ywt zSxtSz(7)?w3%H6K0PfOun0e|C#F}UjS3sRVEyN zmPtf{>O^G=s&SEO1otmz%rDgz=3u1SPVSLUM?Un^hp+%nt@p@{rAfB4IT2dwu2LL}Y%tE+wQF{Ym& zM_D>*K_4eX<<#0w9C*Uwx;4&P;RA6Ps?9+OG!QzPmm7V>*45KI8=x6ZtxvQeht1%2 z(9X1YHCzstkaX*~?=cjo)^5S`0+Xhi$K%y_wuLX^F4^t{@!p5$*J`$xBtzeuS!s(dDwdrz$D{C z3wSy~jgn&jr89lF8MEWm+KzAglu4zppVAIpOU`jS!wmQgTj)wROS0pPas87q$>!7l zfFTC7_epl&<*@AQ;L3>~vKoJNwP_bD`l<_<$*rJg@iw#vr!|+FFb?zYKFp7d`R+H% z;@4df{$_RuYxJ=lfcfHvh4KCYxgP9baXZMEcU1G|j%o+vQg{2dTa-4DPHM;dycP7rlNG`D-0>pEFJZWjY5wPRq4`AsM5@V~*pqa7{az)p(O%%6`dFBey%pWOJ;=xDk~^&H9BfQZtz}LgV9|RMtt0w@ zL@@bgpauLY(US2x1Lxw|f(6$HD{cPlXlEpWp#2E*nN*ytPbR66Qd9j7o@-c!5jnNq zJ)vVQ(oLhV8ga=!DR%{Yxg!=U!HJ&+8h>@Q7xH}cW0U}Sq_A<_pNv6^CR&)UldZ$+ z1_K8dTEI~$YJ@y|iuOOb)I6Dj*({o2p-zNbKK#uT(2py%fFY?CFeMehq`3_2WqMP6 z;$7_g_}>b!=$uA3%7(J8c2^aXPGzCmbV1j`C6=miPjZ(Co!5D3sg;}*k2{MmI zT6TSgF<-5)Fdfn?o%c@zaEsRhURbF_OD8P#swcl#ZC%O!Y_(I@`UVCQN&4$!D{n1= z`Z@8-RO1g``7Voedb-coO|n1yZVkvdwGN>g?zTver&|Hx`E-c3<{k@pe!Jo@)4Qtt zS9EiHS6~)wZh_g;)jF_`F(&K&CQQ8agHlFi?Jp&_W63$SUiRmAH_S*UGC;vrQ*4Ml`}B~POYQS#W*3@fX8+B#Q@#GDCK|z8pp~t^ZD-9@}FYF zLx&p?LFTD?_`viY);bR80qnWwEnXL1fI)7mhYA{F_I-?g;uQ-$<~aV%*68q~Gk}SD z%fh_)8ahTKSS(jDru#_?bM76*ulXqdxaZmT4Hz7!*2;P11B*Vrr={VsJ;CI_-z{L? zX(cGN^>wCd_?d@uK1za;Iki4k&YrWnt@;dR8PLm;DyA10PXDLGZ2yN6+*_qkDgD>T5Um z^j1Tp@f3FcY0H22Y@>c{qIa5FA8V^c_kk47|5zB$zo6;)K1?lR-nwdGPF_(od5Fm| zRyr#ZypV@eYncxHVbQ1cRU_H{bNi|>>K#HgADXQsZ#%Er%+x+?#Xn%}Ki{g!E9;NJ0w`LI{x1A&m}_1d;#&k^rHX5Tq(X@F+)A znxdenF9;+GDt1>{72Dbc)^&9igk3v={Jzhen_RMfe*e7h)hXwBo_X5LJkQL8{nzws zKk9nHDAnd7auDsV+My>Z_g5Y56DXA3RmKPr$IV>Pg&RYpar3h1&CTy3o16a1Aa2$u zgZ+0`)ebAZw0G$_B05Lrpfw`ah_l(vX}TJ2xYU1v?$}T2b`ivc7YK=~yRfjjfIc0)but9W`30(IN~tvYp-i>vUR7OLU5-4gwYhIXW8qoQ~e{ zl%&&A>Y&pyu9kDPf~%EWt>S7mtl7<3{ut3=8;Xp-w&d6T2C8v+DNHp z&QBu5=avymKK_-A*0M{XLa1henM$?Vvl20N-$5 zjSQXcqPqokgm&@9DBqD{r+K-vNILesZ>7>jUsO?DKBT6)Zcg>$3PFKYWlPG^=9N{? zN-JKzsIFqZAhlxQLSvPGgb^RmSEQPSUDebwN~ajinV>k#x`G1x@zoK%G_(S(J*k<* zQHkz^+D8JXP-paYi-5XN0>0okN-<$&Ajo2dOk(#JkYk?yD_iarV= zC(Lc62(l3~olfmgmjGHuewf`Lnn|HlPVK3JqNx&E&4P&8&}k0!#w7Qrxio_2Q4!6j zX;ckt4JKngoWB4*T?O82!F@HHS5LdBex1~I8raVQ+hj^1jmA?q{Fe%Q`h!gx9HD|` zE_DaY21tMEK|RS177pqKp(ScC*snTjCYkdGvjXIK344B=Cr4gFQprOqhbwvRI0rvzIx%S zDkuXIQYZj+MZ=~9>Sr8_`sbhl6iC^ao*Xb51V0UiF+<>|TpB}pGzl6`gMKTZ;X3HI z0np9Ratn=u<44o|ly7_z{djaSc#kI+O#uIinAXXd(kYO(9)90o9Eh3D(Zv>fdoONx z6vz3A`Hrkc3g#PqCK|}JRs5`qFkhkXie0|Fq>Ge;xrM@Z3j(sWDcEN zqO<7Y6kSDvLnQJ?5_3rQ6)B<{SE-sv;{oX|>M6Q2;~q@VlVQCaqBoo>G8orK6MY?` zpHpOt{!SVvvbZ-u6WK1x9VZ4deU1yDLEIY*_lqH1<+AKNhZxG>VO$MomLu$PwGzAZ zdofZIql~{yeWZT0Aa`!w;PJys#^eZUsrr9s8SQ-bTOXpmeD&$N3fZ#i3vJlR+T0u>ew6`b=pLmH8DvSlf@KW zOhrY9=x!bHY#t|-Rh&;yt)Y3GEyDcjX{}DTaa zsHvh_7d4!y^xQd%X4X_!SIn%dC})|q#{F|TIu?k9I{k%SHw!0;D5JECzge0id{pE% zbL~(-a>5;1x>zLYG_hD0OTw<9R57z+&XS7q%(#{5t97wbtkT75u|^Zc zx~K)>B;D_85;)1T89U{qW)b8bal+{}43i=dm>AU5h^ zli18UrN`>U$fa|tXGtlV*rL;4;dF5ud;UFIW#%+1Swq;M+jV+}-qpocafeP{(m!;u zO>EaiBMaNX3Om86&Qg|6(K9+VQ8P<}zqW}xjr{PiW2fdO*bTLRnlWTSm@#8Pc)ici z5o7a;#|g3}j7Xe-K$(xoMF>G|WW!4I+`O`6ioU5+W>U_fMFe> z-f5gzSSm~-Y*GJ$dw@xTP&e9LNZmr7IjmkrD~yo%?nA=DIT|I1dh`-8<|z;3kcjOe7}6g_#&i^eZYlIy)bdIdgu6+U_m zKKjf5$45^=4{?+9XnKmC_DF9tGskb98EX}v1RZuP?0_=LV6;x6WBZrd1>A9P*<9(4 zA{@Ym;!t=81o_~|G?Jdhy0zoDIY+v~hC#Q}bAYLs`Y1XLcc}CV4ivlSdGv_>*6PZ? zLAe%nc}ZD(UjSdG@+w|L`Zb&)>*=9uB;dgqjb0SL(~zrVzeau2!A6VXuszM_I#{`+T-Qna~0=I8z&iFOh)FaTcGJZtCFRr*>GuJOu-wN z7G7YZJzDv|NN@xH(;m_d@8W3&tf3% zKHfbP&$)r+BVf896VqK!3*7lll>HP9e3Ek91<6e`IQcjgK1oG;sUv#D1ER3pBlc2Q zQq&2GNIFI1CMQL0Xr}Q^Gy&8T$0VgZx1ot9CGjxXIZn2eCYp?4wkDe5Wk1zDjoI_f zO(otpV=1^Esw9yjlF5$NA8n9Gp-9n<;zTMXh&1XZ(y71bNjai74HJE+K=h+YqCb_0 z0aPZksT}Qmw6$WO+;lwcaTLjE5vCF{PD^N5K=0EB@JS9r!{6XS1&)J!mB7vGBtak2 zM*#AUF98kj3Ew0rJ|PKK-Est(qgpYHXZKg$zSA%7aV#4Z0j9qL($|I*ZWA)K!00w6V2c@6f4&1*jqY2=va>p zrmoxZh0-kqA5m4 zm`lTRPoj=!-9^WXP#l68zlKHWco0I>5qDYgSyZqhW&8Y!QbIz|>GN)puQT9o`8QfC|HeX5<1B$@5J?yvMlAsKFg0+w> zM9UVUWee%Dg#u_1Jy=83UGX&@s}OopvQhJCd)sl+o-!NWRf6ji0JGkyI^a#J~ z7?*s4?ACH+nLXe#qR#c$6p_gMQAk43cyNk=v0dQPt}r11N+jaZBMA>k$#}d;kqQpC zl<+7Bb$E`XX<5=S99gq?RyYWu$Iju@mBo`I<3$$F5R7(WChPg>j{Wl!S{^#f9W*+E z;|_k)tw!eaUg-0?RSwEfl+h?fD3ef_Zo1n&`XD8_gHd+^kAoEB4nZC64n^&DhoRQp z?NIx;!$&7u!8(DX{77s`enM1XYG3%JKi<-^Ve%jxvU4GG7$7478H3lP0=y{|<4tJ- zbeIgxG+;{bel!D^3Sf8!tuyv4aN|{?;%TtEbWjg`1(Nd`_0_1S-TEn}2vtIO&yM`! z2f3#Qo!Bh@b^;^B?UH79ypVF6r*smhC2?d| zkt=D+l0|_{zHvSI>iMEmnAKCN5&v5^GqA6)n`hgpdh_)(@ruffU+xLU4t{m78v64^ zbK5%6vl(R7lH=M;kz+ARo_}y`9%egFk&k7#R~zYjY|S^a#dt+Z>h|RW-@J}P?CVZb zToc{Q?Sn)}{YH&OaYVwCeMf$>7c|yE`A)1{JlG2=bWjn06#LRR8tt-YFB~WLEEi|v^;=v7X*YXv< zjuxA-d7_=xjgmMb8Ua1h0(2}}{BZz5lK&d8%xLJ|E)I9&6|GM;i}}f>Uj7LHg5_TU zjH5lG%=397#%Dc0{j6%X4HY{TW7)k?=GVhTY+*+%T{{9{Cj>Ns_`tclD|%21{g%gc z4p<7Jgh0qjLhb#AG7=})IAD61H6z4?o;?AyVqXGoYb~)a4=>mm_(F2RegrYN`a?V? z)?dtDM~Lb5?j$~TMVz2uZX+k+>=`<_nZh{m;Q@aSEtl|2d$h8T!rR-AQvl@_JQRxOj<+Y;QkB0?ZY6hbDO((3rvpM(zH*l3->*se7Qfdpqb;IsfZBpfr+5#}eu0o`F!CZfz3w8gM;JnWo= zm-!MvXCvBF(*Vp^Hmya(*@TF<3$f@vM4tVKJWn7d)gQrWq6s1BBtp=$c+P$U&)I(m zyRQ+3en8^<8KIFK%6GnAP^2H`$p*0Ib@040+11~}vDmZ#BB4aaW``;B6*Q-lz%Yt&Vv;UUSktMZj& z1UM=*^5$p%=B&}8o1G)Z+(Kb+bZ8nUCUGP>IAyBfuyb%)iENvv&lC@8ejHMIyQd^9 zLn>Kj#(#xB3OygKYUZ!U5$THNisdp?y;&pDW#`5s;o`8_?7KoFNJ#HBqEL1=uM-Dl zIO@JZ{461fw~5Ji8Fp+Nw;u|EQ-bVP*g4lI?9DH37x7ZnukI2Ra=_?a;$@pusbJ2V zS0^EmO)>`!P!f&CgFfb!I5nVo>K-ve3OT(`L`g+He^`7f2cJAFZjqh#M?^2#$v-YW zl>$;uiafjI`^@_bU)Y5Ozst<20^jF%JIu2k)xhS{r^SPkUHPlxEjhRs9yG0>`of39 z-Wdk>4715Zu=5?En=zeLpXN(%drZ%HUksCiwtOu9Av-na#6z+Z_Lb-$JDJ~#aZ*C# z6*1G7UHH@Q;%6D$FWnH|$j*nVa!e9$bt;>VgO0aTD6f>PF>^lbts5US+wpUX%?#%)AxG z-)f3NCB12%vPW95?;+*9MNn4dteF9EGt3?SNEGayXAi@5%%;y1N}V+3@#9LC9QWPR z${SKb^GnKn3F-2>5+*y@Zz0nD`?ga>93a8llXEYI7BwDiX|n|52Q#ZY?g9YP+8rrEH2e_7``?AM1ULfw4a37k(D*BI81efa`4z z^jGyb4tCzZC-Qrx_jjNnV-hI4;jfE6<{nTp_s9IfA)_7=JDQjL)%FZ?1OT>U8(@*f zp2ko!Jj=sb>l^*`Bk4q3@PF&?Ktog`Q=3N;MUeSKfa;ct{QBLUYya*~#HFnw!7oVW zaW93NS3Qcv2SRA>S;=NfpxRz?u>JCL;cb{JE}dG%5glk){;s5aB2aB7Dcjsv+fe3x zz?8VYMzC#BK@d~qp}OT9P~$BF%`ZYR2U9;c7bIh~pWWwgz7eFl zdFU5BH2l2zf?G{8ySOc14RQn6<7)<{o7>$U%kL_Voi-S6iCp@$(dOPuOe&X)BN#)w z|IFX1=D1*$FY0DB0|#H1((f)2Zu5;$kMq5!bwXD5{th&x+03#CHBp}56GALyvqHe< z0bhwQ(*uRWyxoJ@%a~#Q7G|4U_?r$GDDD67kN9oom3FYdeXxa>2lf78!p}SuVJ(=N zPz+CLcN2PSga|ONrCR8Z82xmN7j2~Pb(-D6EUgBG0lOsLi#6AD7B18Dpbs;;PbV+h zIQ@{XskHNW^>p9y_xy-_z$M4)0IY`93Ena0-eeJyQZPy=A*zf2?Evwn@LoU&M<(y@ zK*QT9H;u)eL{7uE?V!o|^qVlz8A3A$gj;qLh6DXWuU2%xpX5!hKKt}H(34A+R~&S` zzfbEhyZKzE2yAt2YcE}?^yuen+@N=y}ttu3$rbjxG?ydXF)HQ zD|5SjIAccnR&AF$ze$fd2v@(Y-% zmzkVuc_S(kk{+2TC7G3xYAB0e&A`J`E#PY&;1>*hyu<>QR$x`8M|qTLJ)$9j^8vKw zcc7tY7SktMr#9ZJQoRm^uXgza&gH_l`<5SK(Y%}J{c452GurZqe>9|zt!>3R%$zzb z|G6IYaz;;C(u$5|GtMz^{R*=z2AjTS4ao0}^UTNL^!K91!-ZV<*3t4i(D30Jrq7jn zj)?kt!U5RCr7hLk28-+E7%MdS#zNGxjZ(gmmf>SginaVZj}h1+%4i|){t_uHucM@g-kAOr|-VIE&9jq#cFBXg(b!&v9X8Zz^?3G3w@bC0Q8GT z>%ZGv&_PWzPd|w5I;xYU*D}VWJZNF|J|cq6w1ePwzN5wMBBPy$EOfsPYPi&Ec>L*Z z=P+kn+J>>&k1^>mmU*%RhVD5c6){RRA9LGrFuopRF^=pA?8+uf&5DyEOzt4bz4i2q z6L8yA@!~0qTXh$|Rs+6gM#o;X80~&l;3n(Qy`&Q`x4vd!s{e|tw&n~pc(#+J!5K#X z`;0`loR+O+Svl5!&<}7qm$q)-e%4ap_uanc`p%XI@97LaAAMjUjwJe;-+B;#FygsS zy@-M?YOu6$j{fzjcfp)X+kH}TL6V#KUm;vS-Nmy?@A*$y&NZCxxU>yKTmEUWf8IC1 zjP7bF)V(X@p1atBz{3#!*^jxZ>z3bvhH|7vmQi}p*ED;3)^j3^uMA>DviU-ywJSeo;Md4^ z4D6DmMoQ(qSCju{{3LQ;k~%1slg_$1Q+r%O_~g>|7!YQbCaK-b?~|-kgfkgJCM8)y z3VJHKS&*vucAkn<&lwOz_Gei=cj}qV-6f$^Q_hEgAj|ZRD35?}JylwB5#Qa;?E*yMYt-@;q*9 zM_RyXW0erIG}yB?_xOLgD;f;AwB4ZNMwn+M&`>;|U z+ot%N=k7r7Y>;Pie|uMdt_BaWTyokB{OeZl!1TMJMnNx6QV+c~>f=x>1}?+fjM=r* zJEmYa{>IWK)qK(m`iI=#LK5VS03Ub!sBsIpacR4AF7Iz4_ceF+R)g6?hkJw1I|n7g z#4T6fnPEA|KLd!3kD5XKa8}>@KZ<5f>gLfoeqY{a7qIrYw4KUpM=bi9X2h_!GCcIR zoc;Z=1@H-%0c~u|Z1V6w1)sFsI>z*YWS{3P%&tCaXV&w11}=WZ0_uG|cc3>1E@|k` zcA~W133t3mlrd$_dS-Odl0UMA@& z{V=}YXV&Sq97k`=QQD@u9rTG43>(wm!*6QW%R4N74_}dZ<8-QK zKGxsb8_)M=MSk!o@(UJj>jn2@`-flO37fgJ71Zfxi@r9?3J$krfrEeu{4{Qh(|nEm_ij53(QrFWYZu#3#v0qPJL*XC744VUi}e=>TE%2a9Q S08PbvN46U1WA{O-rT+&c`BGs3 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java index 8eb76c34e..6841e62a2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java @@ -16,9 +16,13 @@ */ package com.jpexs.decompiler.flash; +import com.jpexs.decompiler.graph.GraphSourceItem; + /** * * @author JPEXS */ public abstract class BaseLocalData { + + public GraphSourceItem lineStartInstruction; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java index fb697a221..41e2a9f48 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java @@ -1773,7 +1773,7 @@ public final class SWF implements SWFContainerItem, Timelined { r.add(new ArrayList<>()); r.add(new ArrayList<>()); r.add(new ArrayList<>()); - ((GraphSourceItemContainer) ins).translateContainer(r, stack, output, new HashMap<>(), new HashMap<>(), new HashMap<>()); + ((GraphSourceItemContainer) ins).translateContainer(r, ins, stack, output, new HashMap<>(), new HashMap<>(), new HashMap<>()); continue; } @@ -1799,7 +1799,7 @@ public final class SWF implements SWFContainerItem, Timelined { // for..in return if (((ins instanceof ActionEquals) || (ins instanceof ActionEquals2)) && (stack.size() == 1) && (stack.peek() instanceof DirectValueActionItem)) { - stack.push(new DirectValueActionItem(null, 0, Null.INSTANCE, new ArrayList<>())); + stack.push(new DirectValueActionItem(null, null, 0, Null.INSTANCE, new ArrayList<>())); } if (ins instanceof ActionConstantPool) { @@ -2383,7 +2383,7 @@ public final class SWF implements SWFContainerItem, Timelined { } boolean parallel = Configuration.parallelSpeedUp.get(); HighlightedTextWriter writer = new HighlightedTextWriter(Configuration.getCodeFormatting(), true); - pack.toSource(writer, script.traits.traits, new ConvertData(), ScriptExportMode.AS, parallel); + pack.toSource(writer, script == null ? null : script.traits.traits, new ConvertData(), ScriptExportMode.AS, parallel); HighlightedText hilightedCode = new HighlightedText(writer); CachedDecompilation res = new CachedDecompilation(hilightedCode); swf.as3Cache.put(pack, res); @@ -2896,7 +2896,7 @@ public final class SWF implements SWFContainerItem, Timelined { if (needed.contains(dep)) { timeline.tags.remove(i); i--; - continue; + //continue; } } if (t == toRemove) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java index 8cb509418..4eba368ed 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.abc; import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.types.ABCException; import com.jpexs.decompiler.flash.abc.types.InstanceInfo; import com.jpexs.decompiler.flash.abc.types.MethodBody; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java index 590df4541..cb705ecc5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.ConvertException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.instructions.debug.DebugFileIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.debug.DebugIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.debug.DebugLineIns; @@ -318,15 +319,22 @@ public class ScriptPack extends AS3ClassTreeItem { */ public void injectDebugInfo(File directoryPath) { Map> bodyToPosToLine = new HashMap<>(); + Map> bodyLineToPos = new HashMap<>(); + Map> bodyToRegToName = new HashMap<>(); + Map> bodyToRegToLine = new HashMap<>(); + Set lonelyBody = new HashSet<>(); try { CachedDecompilation decompiled = SWF.getCached(this); int line = 1; String txt = decompiled.text; txt = txt.replace("\r", ""); + for (int i = 0; i < txt.length(); i++) { blk: { + Highlighting sh = Highlighting.searchPos(decompiled.specialHilights, i); + Highlighting cls = Highlighting.searchPos(decompiled.classHilights, i); /*if (cls == null) { continue; @@ -339,7 +347,7 @@ public class ScriptPack extends AS3ClassTreeItem { if (method == null) { break blk; } - Highlighting instr = Highlighting.searchPos(decompiled.instructionHilights, i); + Highlighting instr = Highlighting.searchPos(decompiled.instructionHilights, i); //h /*if (instr == null) { continue; }*/ @@ -350,8 +358,19 @@ public class ScriptPack extends AS3ClassTreeItem { break blk; } int pos = -1; + int regIndex = -1; + String regName = null; + if (sh != null && sh.getProperties().declaration && sh.getProperties().regIndex > -1) { + regIndex = sh.getProperties().regIndex; + regName = sh.getProperties().localName; + } if (instr != null) { - long instrOffset = instr.getProperties().offset; + if (instr.getProperties().declaration && instr.getProperties().regIndex > -1) { + regIndex = instr.getProperties().regIndex; + regName = instr.getProperties().localName; + } + + long instrOffset = instr.getProperties().firstLineOffset; if (trt != null && cls != null) { int traitIndex = (int) trt.getProperties().index; @@ -362,6 +381,9 @@ public class ScriptPack extends AS3ClassTreeItem { } } + if (instrOffset == -1) { + break blk; + } try { pos = abc.bodies.get(bodyIndex).getCode().adr2pos(instrOffset); } catch (ConvertException cex) { @@ -372,11 +394,25 @@ public class ScriptPack extends AS3ClassTreeItem { } if (!bodyToPosToLine.containsKey(bodyIndex)) { bodyToPosToLine.put(bodyIndex, new HashMap<>()); + bodyLineToPos.put(bodyIndex, new HashMap<>()); } + //int origPos = bodyLineToPos.get(bodyIndex).containsKey(line) ? bodyLineToPos.get(bodyIndex).get(line) : -1; + bodyToPosToLine.get(bodyIndex).put(pos, line); + bodyLineToPos.get(bodyIndex).put(line, pos); } else { lonelyBody.add(bodyIndex); } + if (regIndex > -1 && regName != null) { + if (!bodyToRegToName.containsKey(bodyIndex)) { + bodyToRegToName.put(bodyIndex, new HashMap<>()); + bodyToRegToLine.put(bodyIndex, new HashMap<>()); + } + if (!bodyToRegToName.get(bodyIndex).containsKey(regIndex)) { + bodyToRegToName.get(bodyIndex).put(regIndex, regName); + bodyToRegToLine.get(bodyIndex).put(regIndex, line); + } + } } if (txt.charAt(i) == '\n') { line++; @@ -431,11 +467,20 @@ public class ScriptPack extends AS3ClassTreeItem { delIns.add(ins); } } + int dpos = 0; b.insertInstruction(0, new AVM2Instruction(0, AVM2Instructions.DebugFile, new int[]{abc.constants.getStringId(filename, true)}), true); + dpos++; + Set regs = bodyToRegToName.containsKey(bodyIndex) ? bodyToRegToName.get(bodyIndex).keySet() : new TreeSet<>(); + for (int r : regs) { + String name = bodyToRegToName.get(bodyIndex).get(r); + int line = bodyToRegToLine.get(bodyIndex).get(r); + b.insertInstruction(dpos++, new AVM2Instruction(0, AVM2Instructions.Debug, new int[]{1, abc.constants.getStringId(name, true), r - 1, line})); + } List pos = new ArrayList<>(bodyToPosToLine.get(bodyIndex).keySet()); Collections.sort(pos); Collections.reverse(pos); Set addedLines = new HashSet<>(); + loopi: for (int i : pos) { int line = bodyToPosToLine.get(bodyIndex).get(i); if (addedLines.contains(line)) { @@ -443,7 +488,7 @@ public class ScriptPack extends AS3ClassTreeItem { } addedLines.add(line); Logger.getLogger(ScriptPack.class.getName()).log(Level.FINE, "Script " + path + ": Insert debugline(" + line + ") at pos " + i + " to body " + bodyIndex); - b.insertInstruction(i, new AVM2Instruction(0, AVM2Instructions.DebugLine, new int[]{line})); + b.insertInstruction(i + dpos, new AVM2Instruction(0, AVM2Instructions.DebugLine, new int[]{line})); } //remove old debug instructions for (int i = 0; i < code.size(); i++) { 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 0a675f2c1..9fc648d7b 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 @@ -263,6 +263,7 @@ import com.jpexs.decompiler.flash.abc.avm2.model.clauses.ForInAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException; import com.jpexs.decompiler.flash.abc.avm2.parser.pcode.ASM3Parser; import com.jpexs.decompiler.flash.abc.avm2.parser.script.PropertyAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.Reference; import com.jpexs.decompiler.flash.abc.types.ABCException; import com.jpexs.decompiler.flash.abc.types.AssignedValue; import com.jpexs.decompiler.flash.abc.types.ConvertData; @@ -965,7 +966,7 @@ public class AVM2Code implements Cloneable { continue loopaddr; } } - if (instr instanceof LookupSwitchIns) { + if ((instr instanceof LookupSwitchIns) && actualOperands != null) { if (handleJumps) { addresses.add(startOffset + actualOperands[0]); @@ -1486,7 +1487,7 @@ public class AVM2Code implements Cloneable { return pos2adr(fixIPAfterDebugLine(adr2pos(addr, true))); } - public ConvertOutput toSourceOutput(String path, GraphPart part, boolean processJumps, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, TranslateStack stack, ScopeStack scopeStack, ABC abc, MethodBody body, int start, int end, HashMap localRegNames, List fullyQualifiedNames, boolean[] visited, HashMap localRegAssigmentIps, HashMap> refs) throws ConvertException, InterruptedException { + public ConvertOutput toSourceOutput(Reference lineStartItem, String path, GraphPart part, boolean processJumps, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, TranslateStack stack, ScopeStack scopeStack, ABC abc, MethodBody body, int start, int end, HashMap localRegNames, List fullyQualifiedNames, boolean[] visited, HashMap localRegAssigmentIps, HashMap> refs) throws ConvertException, InterruptedException { calcKilledStats(body); boolean debugMode = DEBUG_MODE; if (debugMode) { @@ -1511,11 +1512,12 @@ public class AVM2Code implements Cloneable { ip++; continue; } + boolean processTry = processJumps; //addr = pos2adr(ip); - int ipfix = fixIPAfterDebugLine(ip); + //int ipfix = fixIPAfterDebugLine(ip); //int addrfix = pos2adr(ipfix); - int maxend = -1; + //int maxend = -1; if (ip > end) { break; @@ -1529,8 +1531,13 @@ public class AVM2Code implements Cloneable { //logger.warning(path + ": Code already visited, ofs:" + Helper.formatAddress(pos2adr(ip)) + ", ip:" + ip); break; } + visited[ip] = true; AVM2Instruction ins = code.get(ip); + if (stack.isEmpty()) { + lineStartItem.setVal(ins); + } + if (debugMode) { System.err.println("translating ip " + ip + " ins " + ins.toString() + " stack:" + stack.toString() + " scopeStack:" + scopeStack.toString()); } @@ -1591,12 +1598,12 @@ public class AVM2Code implements Cloneable { AVM2Instruction insAfter = code.get(ip + 1); if ((insAfter.definition instanceof GetLocalTypeIns) && (((GetLocalTypeIns) insAfter.definition).getRegisterId(insAfter) == ((SetLocalTypeIns) ins.definition).getRegisterId(ins))) { GraphTargetItem before = stack.peek(); - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); + ins.definition.translate(lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); stack.push(before); ip += 2; continue iploop; } else { - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); + ins.definition.translate(lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); ip++; continue iploop; } @@ -1605,7 +1612,7 @@ public class AVM2Code implements Cloneable { do { AVM2Instruction insAfter = ip + 1 < code.size() ? code.get(ip + 1) : null; if (insAfter == null) { - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); + ins.definition.translate(lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); ip++; break; } @@ -1639,7 +1646,7 @@ public class AVM2Code implements Cloneable { if (((GetLocalTypeIns) code.get(t).definition).getRegisterId(code.get(t)) == reg) { if (code.get(t + 1).definition instanceof KillIns) { if (code.get(t + 1).operands[0] == reg) { - ConvertOutput assignment = toSourceOutput(path, part, processJumps, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, abc, body, ip + 2, t - 1, localRegNames, fullyQualifiedNames, visited, localRegAssigmentIps, refs); + ConvertOutput assignment = toSourceOutput(lineStartItem, path, part, processJumps, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, abc, body, ip + 2, t - 1, localRegNames, fullyQualifiedNames, visited, localRegAssigmentIps, refs); if (!assignment.output.isEmpty()) { GraphTargetItem tar = assignment.output.remove(assignment.output.size() - 1); tar.firstPart = part; @@ -1669,25 +1676,25 @@ public class AVM2Code implements Cloneable { } } for (int i = 0; i < dupCnt; i++) { - stack.push(new LocalRegAVM2Item(ins, reg, vx)); + stack.push(new LocalRegAVM2Item(ins, (AVM2Instruction) lineStartItem.getVal(), reg, vx)); } stack.push(vx); } else { - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); + ins.definition.translate(lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); } ip++; break; //} } else { - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); + ins.definition.translate(lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); ip++; break; //throw new ConvertException("Unknown pattern after DUP:" + insComparsion.toString()); } } while (ins.definition instanceof DupIns); } else if ((ins.definition instanceof ReturnValueIns) || (ins.definition instanceof ReturnVoidIns) || (ins.definition instanceof ThrowIns)) { - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); + ins.definition.translate(lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); //ip = end + 1; break; } else if (ins.definition instanceof NewFunctionIns) { @@ -1723,13 +1730,13 @@ public class AVM2Code implements Cloneable { } } // What to do when hasDup is false? - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); + ins.definition.translate(lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); NewFunctionAVM2Item nft = (NewFunctionAVM2Item) stack.peek(); nft.functionName = functionName; ip++; } else { try { - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); + ins.definition.translate(lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, ins, output, body, abc, localRegNames, fullyQualifiedNames, path, localRegAssigmentIps, ip, refs, this); } catch (RuntimeException re) { /*String last=""; int len=5; @@ -1907,7 +1914,7 @@ public class AVM2Code implements Cloneable { int regCount = getRegisterCount(); for (int i = 0; i < regCount; i++) { - localRegs.put(0, new UndefinedAVM2Item(null)); + localRegs.put(0, new UndefinedAVM2Item(null, null)); } //try { @@ -2717,7 +2724,7 @@ public class AVM2Code implements Cloneable { public void restoreControlFlow(int ip, HashMap> refs, int[] visited2, HashMap> appended) throws ConvertException { List buf = new ArrayList<>(); boolean cont = false; - int continueip = 0; + int continueip; for (; ip < code.size(); ip++) { AVM2Instruction ins = code.get(ip); @@ -2736,7 +2743,7 @@ public class AVM2Code implements Cloneable { if (cont) { buf.add(new ControlFlowTag("appendjump", ip)); } - cont = false; + //cont = false; restoreControlFlow(adr2pos(pos2adr(ip) + ins.operands[0]), refs, visited2, appended); for (int i = 2; i < ins.operands.length; i++) { restoreControlFlow(adr2pos(pos2adr(ip) + ins.operands[i]), refs, visited2, appended); @@ -3224,7 +3231,7 @@ public class AVM2Code implements Cloneable { } if (ins.definition instanceof NewFunctionIns) { - stack.push(new BooleanAVM2Item(null, true)); + stack.push(new BooleanAVM2Item(null, null, true)); } else { localData.ip = ip; ins.translate(localData, stack, output, Graph.SOP_USE_STATIC, path); @@ -3237,7 +3244,7 @@ public class AVM2Code implements Cloneable { HashMap registers = localData.localRegs; GraphTargetItem regVal = registers.get(regId); if (regVal.isCompileTime()) { - registers.put(regId, new NotCompileTimeItem(null, regVal)); + registers.put(regId, new NotCompileTimeItem(null, null, regVal)); } } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorGetSet.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorGetSet.java index c2b8ed498..e2ee238fa 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorGetSet.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorGetSet.java @@ -61,9 +61,9 @@ import java.util.Map; */ public class AVM2DeobfuscatorGetSet implements SWFDecompilerListener { - private static final UndefinedAVM2Item UNDEFINED_ITEM = new UndefinedAVM2Item(null); + private static final UndefinedAVM2Item UNDEFINED_ITEM = new UndefinedAVM2Item(null, null); - private static final NotCompileTimeItem NOT_COMPILE_TIME_UNDEFINED_ITEM = new NotCompileTimeItem(null, UNDEFINED_ITEM); + private static final NotCompileTimeItem NOT_COMPILE_TIME_UNDEFINED_ITEM = new NotCompileTimeItem(null, null, UNDEFINED_ITEM); private final int executionLimit = 30000; @@ -113,7 +113,7 @@ public class AVM2DeobfuscatorGetSet implements SWFDecompilerListener { Map staticRegs = new HashMap<>(); for (AVM2Instruction ins : inlineIns) { if (ins.definition instanceof GetLocalTypeIns) { - staticRegs.put(((GetLocalTypeIns) ins.definition).getRegisterId(ins), new UndefinedAVM2Item(ins)); + staticRegs.put(((GetLocalTypeIns) ins.definition).getRegisterId(ins), new UndefinedAVM2Item(ins, null)); } } 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 c0fd51a1e..2c470babd 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 @@ -198,7 +198,7 @@ public class AVM2DeobfuscatorRegisters extends AVM2DeobfuscatorSimple { List output = new ArrayList<>(); AVM2LocalData localData = newLocalData(scriptIndex, abc, abc.constants, body, isStatic, classIndex); initLocalRegs(localData, body.getLocalReservedCount(), body.max_regs); - localData.localRegs.put(0, new NullAVM2Item(null)); // this + localData.localRegs.put(0, new NullAVM2Item(null, null)); // this List toVisit = new ArrayList<>(); toVisit.add(idx); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimple.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimple.java index fcd99a650..aa0f37e5d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimple.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimple.java @@ -102,9 +102,9 @@ import java.util.Map; */ public class AVM2DeobfuscatorSimple implements SWFDecompilerListener { - private static final UndefinedAVM2Item UNDEFINED_ITEM = new UndefinedAVM2Item(null); + private static final UndefinedAVM2Item UNDEFINED_ITEM = new UndefinedAVM2Item(null, null); - private static final NotCompileTimeItem NOT_COMPILE_TIME_UNDEFINED_ITEM = new NotCompileTimeItem(null, UNDEFINED_ITEM); + private static final NotCompileTimeItem NOT_COMPILE_TIME_UNDEFINED_ITEM = new NotCompileTimeItem(null, null, UNDEFINED_ITEM); private final int executionLimit = 30000; @@ -178,7 +178,7 @@ public class AVM2DeobfuscatorSimple implements SWFDecompilerListener { Map staticRegs = new HashMap<>(); for (AVM2Instruction ins : inlineIns) { if (ins.definition instanceof GetLocalTypeIns) { - staticRegs.put(((GetLocalTypeIns) ins.definition).getRegisterId(ins), new UndefinedAVM2Item(ins)); + staticRegs.put(((GetLocalTypeIns) ins.definition).getRegisterId(ins), new UndefinedAVM2Item(ins, null)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java index aeac300a5..43d281347 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java @@ -151,7 +151,7 @@ public class AVM2Graph extends Graph { } } for (GraphPart p : allBlocks) { - if (avm2code.pos2adr(p.start) >= ex.start && avm2code.pos2adr(p.end) <= ex.end) { + if (avm2code.pos2adr(p.start) >= ex.start && avm2code.pos2adr(p.end) <= ex.end && target != null) { p.throwParts.add(target); target.refs.add(p); } @@ -227,7 +227,7 @@ public class AVM2Graph extends Graph { List finallyCommands = new ArrayList<>(); boolean hasFinally = false; int returnPos = afterCatchPos; - int finStart = -1; + int finStart; for (int e = 0; e < body.exceptions.length; e++) { if (body.exceptions[e].isFinally()) { if (addr == avm2code.fixAddrAfterDebugLine(body.exceptions[e].start)) { @@ -281,7 +281,7 @@ public class AVM2Graph extends Graph { Map> oldFinallyJumps = new HashMap<>(finallyJumps); finallyJumps.clear(); ignoredSwitches.put(e, swPos); - st.push(new PopItem(null)); + st.push(new PopItem(null, aLocalData.lineStartInstruction)); finallyCommands = printGraph(partCodes, partCodePos, localData, st, allParts, parent, fpart, null, loops, staticOperation, path); //ignoredSwitches.remove(igs_size-1); finallyJumps.putAll(oldFinallyJumps); @@ -434,7 +434,8 @@ public class AVM2Graph extends Graph { ret = new ArrayList<>(); ret.addAll(output); ret.remove(ret.size() - 1); - ret.add(new ReturnValueAVM2Item(avm2code.code.get(part.end), ((SetLocalAVM2Item) output.get(output.size() - 2)).value)); + GraphTargetItem v = ((SetLocalAVM2Item) output.get(output.size() - 2)).value; + ret.add(new ReturnValueAVM2Item(avm2code.code.get(part.end), (AVM2Instruction) v.getLineStartItem(), v)); return ret; } } @@ -448,208 +449,6 @@ public class AVM2Graph extends Graph { ret.addAll(output); return ret; } - if (false && (((part.nextParts.size() == 2) - && (!stack.isEmpty()) - && (stack.peek() instanceof StrictEqAVM2Item) - && (part.nextParts.get(0).getHeight() >= 2) - && (avm2code.code.get(avm2code.fixIPAfterDebugLine(part.nextParts.get(0).start)).definition instanceof PushIntegerTypeIns) - && (!part.nextParts.get(0).nextParts.isEmpty()) - && (avm2code.code.get(part.nextParts.get(0).nextParts.get(0).end).definition instanceof LookupSwitchIns)) - || ((part.nextParts.size() == 2) - && (!stack.isEmpty()) - && (stack.peek() instanceof StrictNeqAVM2Item) - && (part.nextParts.get(1).getHeight() >= 2) - && (avm2code.code.get(avm2code.fixIPAfterDebugLine(part.nextParts.get(1).start)).definition instanceof PushIntegerTypeIns) - && (!part.nextParts.get(1).nextParts.isEmpty()) - && (avm2code.code.get(part.nextParts.get(1).nextParts.get(0).end).definition instanceof LookupSwitchIns)))) { - - if (stack.peek() instanceof StrictEqAVM2Item) { - ignoredSwitches2.add(part.nextParts.get(0).nextParts.get(0).end); - } else { - ignoredSwitches2.add(part.nextParts.get(1).nextParts.get(0).end); - } - ret = new ArrayList<>(); - ret.addAll(output); - boolean reversed = false; - if (stack.peek() instanceof StrictEqAVM2Item) { - reversed = true; - } - GraphTargetItem switchedObject = null; - if (!output.isEmpty()) { - if (output.get(output.size() - 1) instanceof SetLocalAVM2Item) { - switchedObject = ((SetLocalAVM2Item) output.get(output.size() - 1)).value; - } - } - if (switchedObject == null) { - switchedObject = new NullAVM2Item(null); - } - HashMap caseValuesMap = new HashMap<>(); - - GraphTargetItem tar = stack.pop(); - if (tar instanceof StrictEqAVM2Item) { - tar = ((StrictEqAVM2Item) tar).leftSide; - } - if (tar instanceof StrictNeqAVM2Item) { - tar = ((StrictNeqAVM2Item) tar).leftSide; - } - caseValuesMap.put(avm2code.code.get(part.nextParts.get(reversed ? 0 : 1).start).operands[0], tar); - - GraphPart switchLoc = part.nextParts.get(reversed ? 0 : 1).nextParts.get(0); - - while ((avm2code.code.get(part.nextParts.get(reversed ? 1 : 0).end).definition instanceof IfStrictNeIns) - || (avm2code.code.get(part.nextParts.get(reversed ? 1 : 0).end).definition instanceof IfStrictEqIns)) { - part = part.nextParts.get(reversed ? 1 : 0); - translatePart(localData, part, stack, staticOperation, null); - tar = stack.pop(); - if (tar instanceof StrictEqAVM2Item) { - tar = ((StrictEqAVM2Item) tar).leftSide; - } - if (tar instanceof StrictNeqAVM2Item) { - tar = ((StrictNeqAVM2Item) tar).leftSide; - } - if (avm2code.code.get(part.end).definition instanceof IfStrictNeIns) { - reversed = false; - } else { - reversed = true; - } - GraphPart numPart = part.nextParts.get(reversed ? 0 : 1); - AVM2Instruction ins = null; - TranslateStack sstack = new TranslateStack(path); - do { - for (int n = 0; n < numPart.getHeight(); n++) { - ins = avm2code.code.get(numPart.getPosAt(n)); - if (ins.definition instanceof LookupSwitchIns) { - break; - } - ins.translate(localData, sstack, new ArrayList<>(), staticOperation, path); - } - if (numPart.nextParts.size() > 1) { - break; - } else { - numPart = numPart.nextParts.get(0); - } - } while (!(avm2code.code.get(numPart.end).definition instanceof LookupSwitchIns)); - GraphTargetItem nt = sstack.peek(); - - if (!(nt instanceof IntegerValueAVM2Item)) { - throw new RuntimeException("Invalid integer value in Switch:" + nt); - } - IntegerValueAVM2Item iv = (IntegerValueAVM2Item) nt; - caseValuesMap.put((int) (long) iv.value, tar); - while (avm2code.code.get(part.nextParts.get(reversed ? 1 : 0).start).definition instanceof JumpIns) { - reversed = false; - part = part.nextParts.get(reversed ? 1 : 0); - if (part instanceof GraphPartMulti) { - part = ((GraphPartMulti) part).parts.get(0); - } - } - } - boolean hasDefault = false; - GraphPart dp = part.nextParts.get(reversed ? 1 : 0); - while (avm2code.code.get(dp.start).definition instanceof JumpIns) { - if (dp instanceof GraphPartMulti) { - dp = ((GraphPartMulti) dp).parts.get(0); - } - dp = dp.nextParts.get(0); - } - - GraphPart numPart = dp; - AVM2Instruction ins = null; - TranslateStack sstack = new TranslateStack(path); - do { - for (int n = 0; n < numPart.getHeight(); n++) { - ins = avm2code.code.get(numPart.getPosAt(n)); - if (ins.definition instanceof LookupSwitchIns) { - break; - } - ins.translate(localData, sstack, new ArrayList<>(), staticOperation, path); - } - if (numPart.nextParts.size() > 1) { - break; - } else { - numPart = numPart.nextParts.get(0); - } - } while (!(avm2code.code.get(numPart.end).definition instanceof LookupSwitchIns)); - GraphTargetItem nt = sstack.peek(); - if (nt instanceof IntegerValueAVM2Item) { - hasDefault = true; - } - List caseValues = new ArrayList<>(); - for (int i = 0; i < switchLoc.nextParts.size() - 1; i++) { - if (caseValuesMap.containsKey(i)) { - caseValues.add(caseValuesMap.get(i)); - } else { - continue; - } - } - - List> caseCommands = new ArrayList<>(); - GraphPart next = null; - - next = getMostCommonPart(localData, switchLoc.nextParts, loops);//getNextPartPath(loopContinues); - currentLoop = new Loop(loops.size(), null, next); - currentLoop.phase = 1; - loops.add(currentLoop); - //switchLoc.getNextPartPath(new ArrayList()); - List valuesMapping = new ArrayList<>(); - List caseBodies = new ArrayList<>(); - for (int i = 0; i < caseValues.size(); i++) { - GraphPart cur = switchLoc.nextParts.get(1 + i); - if (!caseBodies.contains(cur)) { - caseBodies.add(cur); - } - valuesMapping.add(caseBodies.indexOf(cur)); - } - - List defaultCommands = new ArrayList<>(); - GraphPart defaultPart = null; - if (hasDefault) { - defaultPart = switchLoc.nextParts.get(switchLoc.nextParts.size() - 1); - List stopPart2 = new ArrayList<>(stopPart); - stopPart2.add(next); - defaultCommands = printGraph(partCodes, partCodePos, localData, stack, allParts, switchLoc, defaultPart, stopPart2, loops, staticOperation, path); - if (!defaultCommands.isEmpty()) { - if (defaultCommands.get(defaultCommands.size() - 1) instanceof BreakItem) { - if (((BreakItem) defaultCommands.get(defaultCommands.size() - 1)).loopId == currentLoop.id) { - defaultCommands.remove(defaultCommands.size() - 1); - } - } - } - } - - List ignored = new ArrayList<>(); - for (Loop l : loops) { - ignored.add(l.loopContinue); - } - - for (int i = 0; i < caseBodies.size(); i++) { - List cc = new ArrayList<>(); - List stopPart2 = new ArrayList<>(stopPart); - for (int j = 0; j < caseBodies.size(); j++) { - if (caseBodies.get(j) != caseBodies.get(i)) { - stopPart2.add(caseBodies.get(j)); - } - } - if (hasDefault) { - stopPart2.add(defaultPart); - } - - cc.addAll(0, printGraph(partCodes, partCodePos, localData, stack, allParts, switchLoc, caseBodies.get(i), stopPart2, loops, staticOperation, path)); - caseCommands.add(cc); - } - - SwitchItem sti = new SwitchItem(null, currentLoop, switchedObject, caseValues, caseCommands, defaultCommands, valuesMapping); - ret.add(sti); - //loops.remove(currentLoop); - if (next != null) { - /*if (ti != null) { - ret.add(ti); - } else {*/ - currentLoop.phase = 2; - ret.addAll(printGraph(partCodes, partCodePos, localData, stack, allParts, null, next, stopPart, loops, staticOperation, path)); - //} - } - } return ret; } @@ -754,7 +553,7 @@ public class AVM2Graph extends Graph { int regIndex = ((LocalRegAVM2Item) spt.object).regIndex; HasNextAVM2Item iti = (HasNextAVM2Item) w.expression.get(w.expression.size() - 1); HashMap localRegs = aLocalData.localRegs; - localRegs.put(regIndex, new FilterAVM2Item(null, iti.collection.getThroughRegister(), ift.expression)); + localRegs.put(regIndex, new FilterAVM2Item(null, null, iti.collection.getThroughRegister(), ift.expression)); return null; } } @@ -767,9 +566,9 @@ public class AVM2Graph extends Graph { SetTypeAVM2Item sti = (SetTypeAVM2Item) w.commands.remove(0); GraphTargetItem gti = sti.getValue().getNotCoerced(); if (gti instanceof NextValueAVM2Item) { - return new ForEachInAVM2Item(w.getSrc(), w.loop, new InAVM2Item(hn.getInstruction(), sti.getObject(), ((HasNextAVM2Item) w.expression.get(w.expression.size() - 1)).collection), w.commands); + return new ForEachInAVM2Item(w.getSrc(), w.getLineStartItem(), w.loop, new InAVM2Item(hn.getInstruction(), hn.getLineStartIns(), sti.getObject(), ((HasNextAVM2Item) w.expression.get(w.expression.size() - 1)).collection), w.commands); } else if (gti instanceof NextNameAVM2Item) { - return new ForInAVM2Item(w.getSrc(), w.loop, new InAVM2Item(hn.getInstruction(), sti.getObject(), ((HasNextAVM2Item) w.expression.get(w.expression.size() - 1)).collection), w.commands); + return new ForInAVM2Item(w.getSrc(), w.getLineStartItem(), w.loop, new InAVM2Item(hn.getInstruction(), hn.getLineStartIns(), sti.getObject(), ((HasNextAVM2Item) w.expression.get(w.expression.size() - 1)).collection), w.commands); } } } @@ -845,7 +644,7 @@ public class AVM2Graph extends Graph { ThrowAVM2Item t = (ThrowAVM2Item) list.get(i + 2); t.value = ri.value; list.remove(i + 1); - continue; + //continue; } } else if (i + 1 < list.size()) { if (list.get(i + 1) instanceof IntegerValueAVM2Item) { @@ -874,9 +673,9 @@ public class AVM2Graph extends Graph { if (((ifi.expression instanceof HasNextAVM2Item) || ((ifi.expression instanceof NotItem) && (((NotItem) ifi.expression).getOriginal() instanceof HasNextAVM2Item)))) { - HasNextAVM2Item hnt = null; + HasNextAVM2Item hnt; List body = new ArrayList<>(); - List nextbody = new ArrayList<>(); + List nextbody;//= new ArrayList<>(); if (ifi.expression instanceof NotItem) { hnt = (HasNextAVM2Item) ((NotItem) ifi.expression).getOriginal(); body.addAll(ifi.onFalse); @@ -896,9 +695,9 @@ public class AVM2Graph extends Graph { GraphTargetItem repl = null; if (gti instanceof NextValueAVM2Item) { - repl = new ForEachInAVM2Item(ifi.getSrc(), new Loop(0, null, null), new InAVM2Item(null, sti.getObject(), hnt.collection), body); + repl = new ForEachInAVM2Item(ifi.getSrc(), ifi.getLineStartItem(), new Loop(0, null, null), new InAVM2Item(null, null, sti.getObject(), hnt.collection), body); } else if (gti instanceof NextNameAVM2Item) { - repl = new ForInAVM2Item(ifi.getSrc(), new Loop(0, null, null), new InAVM2Item(null, sti.getObject(), hnt.collection), body); + repl = new ForInAVM2Item(ifi.getSrc(), ifi.getLineStartItem(), new Loop(0, null, null), new InAVM2Item(null, null, sti.getObject(), hnt.collection), body); } if (repl != null) { list.remove(i); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java index 51e560d50..d55730a70 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java @@ -22,10 +22,12 @@ import com.jpexs.decompiler.flash.abc.AVM2LocalData; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.ConvertOutput; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.Reference; import com.jpexs.decompiler.flash.abc.types.MethodBody; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphPart; import com.jpexs.decompiler.graph.GraphSource; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.ScopeStack; import com.jpexs.decompiler.graph.TranslateStack; @@ -102,7 +104,9 @@ public class AVM2GraphSource extends GraphSource { public List translatePart(GraphPart part, BaseLocalData localData, TranslateStack stack, int start, int end, int staticOperation, String path) throws InterruptedException { List ret = new ArrayList<>(); ScopeStack newstack = ((AVM2LocalData) localData).scopeStack; - ConvertOutput co = code.toSourceOutput(path, part, false, isStatic, scriptIndex, classIndex, localRegs, stack, newstack, abc, body, start, end, localRegNames, fullyQualifiedNames, new boolean[size()], localRegAssigmentIps, refs); + Reference lineStartItem = new Reference<>(localData.lineStartInstruction); + ConvertOutput co = code.toSourceOutput(lineStartItem, path, part, false, isStatic, scriptIndex, classIndex, localRegs, stack, newstack, abc, body, start, end, localRegNames, fullyQualifiedNames, new boolean[size()], localRegAssigmentIps, refs); + localData.lineStartInstruction = lineStartItem.getVal(); ret.addAll(co.output); return ret; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java index e590df619..77bfbdab4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java @@ -16,11 +16,12 @@ */ package com.jpexs.decompiler.flash.abc.avm2.instructions; +import com.jpexs.decompiler.flash.abc.AVM2LocalData; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; public interface IfTypeIns { - public abstract void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins); + public abstract void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java index 83c319eed..8baa92396 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java @@ -30,9 +30,11 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.IncLocalIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocalTypeIns; import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.FullMultinameAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.Reference; import com.jpexs.decompiler.flash.abc.types.MethodBody; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.DottedChain; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.ScopeStack; import com.jpexs.decompiler.graph.TranslateStack; @@ -134,11 +136,12 @@ public abstract class InstructionDefinition implements Serializable { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) throws InterruptedException { } - public void translate(boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, TranslateStack stack, ScopeStack scopeStack, AVM2Instruction ins, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path, HashMap localRegsAssignmentIps, int ip, HashMap> refs, AVM2Code code) throws InterruptedException { + public void translate(Reference lineStartItem, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, TranslateStack stack, ScopeStack scopeStack, AVM2Instruction ins, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path, HashMap localRegsAssignmentIps, int ip, HashMap> refs, AVM2Code code) throws InterruptedException { AVM2LocalData localData = new AVM2LocalData(); localData.isStatic = isStatic; localData.scriptIndex = scriptIndex; localData.classIndex = classIndex; + localData.lineStartInstruction = lineStartItem.getVal(); localData.localRegs = localRegs; localData.scopeStack = scopeStack; localData.methodBody = body; @@ -150,6 +153,7 @@ public abstract class InstructionDefinition implements Serializable { localData.refs = refs; localData.code = code; translate(localData, stack, ins, output, path); + lineStartItem.setVal(localData.lineStartInstruction); } public int getStackPopCount(AVM2Instruction ins, ABC abc) { @@ -160,7 +164,7 @@ public abstract class InstructionDefinition implements Serializable { return 0; } - protected FullMultinameAVM2Item resolveMultiname(boolean property, TranslateStack stack, AVM2ConstantPool constants, int multinameIndex, AVM2Instruction ins) { + protected FullMultinameAVM2Item resolveMultiname(AVM2LocalData localData, boolean property, TranslateStack stack, AVM2ConstantPool constants, int multinameIndex, AVM2Instruction ins) { GraphTargetItem ns = null; GraphTargetItem name = null; if (multinameIndex > 0 && multinameIndex < constants.getMultinameCount()) { @@ -172,7 +176,7 @@ public abstract class InstructionDefinition implements Serializable { } } - return new FullMultinameAVM2Item(property, ins, multinameIndex, name, ns); + return new FullMultinameAVM2Item(property, ins, localData.lineStartInstruction, multinameIndex, name, ns); } protected int getMultinameRequiredStackSize(AVM2ConstantPool constants, int multinameIndex) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java index f0c0b7a14..81e94169d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java @@ -55,7 +55,7 @@ public class Lf32Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); - stack.push(new AlchemyLoadAVM2Item(ins, ofs, 'f', 32)); + stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, 'f', 32)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java index b434277a7..258fbc70a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java @@ -55,7 +55,7 @@ public class Lf64Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); - stack.push(new AlchemyLoadAVM2Item(ins, ofs, 'f', 64)); + stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, 'f', 64)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java index 35d94b3ef..afcfdec0e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java @@ -55,7 +55,7 @@ public class Li16Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); - stack.push(new AlchemyLoadAVM2Item(ins, ofs, 'i', 16)); + stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, 'i', 16)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java index 49cf1785e..9a3486986 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java @@ -55,7 +55,7 @@ public class Li32Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); - stack.push(new AlchemyLoadAVM2Item(ins, ofs, 'i', 32)); + stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, 'i', 32)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java index 3138e49d4..d08ba4ed6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java @@ -54,7 +54,7 @@ public class Li8Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); - stack.push(new AlchemyLoadAVM2Item(ins, ofs, 'i', 8)); + stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, 'i', 8)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java index 386974843..74593e1c9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java @@ -57,7 +57,7 @@ public class Sf32Ins extends InstructionDefinition implements AlchemyTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); GraphTargetItem value = stack.pop(); - output.add(new AlchemyStoreAVM2Item(ins, value, ofs, 'f', 32)); + output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, 'f', 32)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java index 21d5e0ba2..15ae9b872 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java @@ -57,7 +57,7 @@ public class Sf64Ins extends InstructionDefinition implements AlchemyTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); GraphTargetItem value = stack.pop(); - output.add(new AlchemyStoreAVM2Item(ins, value, ofs, 'f', 64)); + output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, 'f', 64)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java index 73ca565cf..121c01d49 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java @@ -57,7 +57,7 @@ public class Si16Ins extends InstructionDefinition implements AlchemyTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); GraphTargetItem value = stack.pop(); - output.add(new AlchemyStoreAVM2Item(ins, value, ofs, 'i', 16)); + output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, 'i', 16)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java index d25520798..4e53ec514 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java @@ -57,7 +57,7 @@ public class Si32Ins extends InstructionDefinition implements AlchemyTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); GraphTargetItem value = stack.pop(); - output.add(new AlchemyStoreAVM2Item(ins, value, ofs, 'i', 32)); + output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, 'i', 32)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java index dfb9146cd..c58401ca0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java @@ -57,7 +57,7 @@ public class Si8Ins extends InstructionDefinition implements AlchemyTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); GraphTargetItem value = stack.pop(); - output.add(new AlchemyStoreAVM2Item(ins, value, ofs, 'i', 8)); + output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, 'i', 8)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java index 53d2c070f..8316947b5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java @@ -48,7 +48,7 @@ public class Sxi16Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem value = stack.pop(); - stack.push(new AlchemySignExtendAVM2Item(ins, value, 16)); + stack.push(new AlchemySignExtendAVM2Item(ins, localData.lineStartInstruction, value, 16)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java index 1735d2a00..15d856ca7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java @@ -48,7 +48,7 @@ public class Sxi1Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem value = stack.pop(); - stack.push(new AlchemySignExtendAVM2Item(ins, value, 1)); + stack.push(new AlchemySignExtendAVM2Item(ins, localData.lineStartInstruction, value, 1)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java index db846ab8c..fd1b192d6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java @@ -48,7 +48,7 @@ public class Sxi8Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem value = stack.pop(); - stack.push(new AlchemySignExtendAVM2Item(ins, value, 8)); + stack.push(new AlchemySignExtendAVM2Item(ins, localData.lineStartInstruction, value, 8)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java index d159a6a43..41e427340 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java @@ -47,7 +47,7 @@ public class AddIIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new AddAVM2Item(ins, v1, v2)); + stack.push(new AddAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java index 65fa86c3f..b0edb6717 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java @@ -54,7 +54,7 @@ public class AddIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new AddAVM2Item(ins, v1, v2)); + stack.push(new AddAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java index 908f9999a..b42824422 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java @@ -43,7 +43,7 @@ public class DecrementIIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new DecrementAVM2Item(ins, stack.pop())); + stack.push(new DecrementAVM2Item(ins, localData.lineStartInstruction, stack.pop())); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java index 5cc5f27f6..a62461b90 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java @@ -43,7 +43,7 @@ public class DecrementIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new DecrementAVM2Item(ins, stack.pop())); + stack.push(new DecrementAVM2Item(ins, localData.lineStartInstruction, stack.pop())); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java index f4820ff00..8524bfad3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java @@ -47,7 +47,7 @@ public class DivideIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new DivideAVM2Item(ins, v1, v2)); + stack.push(new DivideAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java index 2f6e6d111..7f051c380 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java @@ -43,7 +43,7 @@ public class IncrementIIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new IncrementAVM2Item(ins, stack.pop())); + stack.push(new IncrementAVM2Item(ins, localData.lineStartInstruction, stack.pop())); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java index fb046ccbb..99e17a2c0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java @@ -43,7 +43,7 @@ public class IncrementIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new IncrementAVM2Item(ins, stack.pop())); + stack.push(new IncrementAVM2Item(ins, localData.lineStartInstruction, stack.pop())); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java index 7254f5d6c..9d1ed0a34 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java @@ -47,7 +47,7 @@ public class ModuloIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new ModuloAVM2Item(ins, v1, v2)); + stack.push(new ModuloAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java index 4cbb4a704..2eacfd289 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java @@ -47,7 +47,7 @@ public class MultiplyIIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new MultiplyAVM2Item(ins, v1, v2)); + stack.push(new MultiplyAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java index 079d12e63..8bcc1feae 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java @@ -47,7 +47,7 @@ public class MultiplyIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new MultiplyAVM2Item(ins, v1, v2)); + stack.push(new MultiplyAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java index 4f450e1f9..1a47dd8f3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java @@ -44,7 +44,7 @@ public class NegateIIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v = stack.pop(); - stack.push(new NegAVM2Item(ins, v)); + stack.push(new NegAVM2Item(ins, localData.lineStartInstruction, v)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java index 47c8e9757..6634d6644 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java @@ -44,7 +44,7 @@ public class NegateIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v = stack.pop(); - stack.push(new NegAVM2Item(ins, v)); + stack.push(new NegAVM2Item(ins, localData.lineStartInstruction, v)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java index c7192b0c7..846f9f7d8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java @@ -47,7 +47,7 @@ public class SubtractIIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new SubtractAVM2Item(ins, v1, v2)); + stack.push(new SubtractAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java index 27ebbd6a6..be3ad541d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java @@ -47,7 +47,7 @@ public class SubtractIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new SubtractAVM2Item(ins, v1, v2)); + stack.push(new SubtractAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java index 5ddc8877b..701e17a57 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java @@ -47,7 +47,7 @@ public class BitAndIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new BitAndAVM2Item(ins, v1, v2)); + stack.push(new BitAndAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java index 22a1fcee4..900fc4b0c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java @@ -44,7 +44,7 @@ public class BitNotIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v = stack.pop(); - stack.push(new BitNotAVM2Item(ins, v)); + stack.push(new BitNotAVM2Item(ins, localData.lineStartInstruction, v)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java index 91b3642d8..da5059896 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java @@ -47,7 +47,7 @@ public class BitOrIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new BitOrAVM2Item(ins, v1, v2)); + stack.push(new BitOrAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java index 40a8ce98b..98d607225 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java @@ -47,7 +47,7 @@ public class BitXorIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new BitXorAVM2Item(ins, v1, v2)); + stack.push(new BitXorAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java index 721786959..090d93cd9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java @@ -47,7 +47,7 @@ public class LShiftIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new LShiftAVM2Item(ins, v1, v2)); + stack.push(new LShiftAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java index eb08e5c5f..fa6ea71e4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java @@ -47,7 +47,7 @@ public class RShiftIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new RShiftAVM2Item(ins, v1, v2)); + stack.push(new RShiftAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java index a30c26ba8..545ad85f1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java @@ -47,7 +47,7 @@ public class URShiftIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new URShiftAVM2Item(ins, v1, v2)); + stack.push(new URShiftAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java index 3c8ec7a34..25734ad6a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java @@ -47,7 +47,7 @@ public class EqualsIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new EqAVM2Item(ins, v1, v2)); + stack.push(new EqAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java index b352054e3..7f6616a30 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java @@ -49,7 +49,7 @@ public class GreaterEqualsIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new GeAVM2Item(ins, v1, v2)); + stack.push(new GeAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java index 94d957c0b..888831f98 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java @@ -49,7 +49,7 @@ public class GreaterThanIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new GtAVM2Item(ins, v1, v2)); + stack.push(new GtAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java index 6a3ca6671..4fdc9fc70 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java @@ -49,7 +49,7 @@ public class LessEqualsIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new LeAVM2Item(ins, v1, v2)); + stack.push(new LeAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java index 0145f71c6..0f04f3e4a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java @@ -49,7 +49,7 @@ public class LessThanIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new LtAVM2Item(ins, v1, v2)); + stack.push(new LtAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java index d2e5e19a6..77380adb9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java @@ -47,7 +47,7 @@ public class StrictEqualsIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new StrictEqAVM2Item(ins, v1, v2)); + stack.push(new StrictEqAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java index 0086c5cd0..7b0342d59 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java @@ -104,13 +104,13 @@ public class ConstructIns extends InstructionDefinition { GraphTargetItem arg = args.get(0); List xmlLines = new ArrayList<>(); if (walkXML(arg, xmlLines)) { - stack.push(new XMLAVM2Item(ins, xmlLines)); + stack.push(new XMLAVM2Item(ins, localData.lineStartInstruction, xmlLines)); return; } } } - stack.push(new ConstructAVM2Item(ins, obj, args)); + stack.push(new ConstructAVM2Item(ins, localData.lineStartInstruction, obj, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java index 9a5db72b5..ea6a65f0c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java @@ -62,7 +62,7 @@ public class ConstructPropIns extends InstructionDefinition { for (int a = 0; a < argCount; a++) { args.add(0, stack.pop()); } - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem obj = stack.pop(); if (obj instanceof FindPropertyAVM2Item) { multiname.property = false; //can be type @@ -73,13 +73,13 @@ public class ConstructPropIns extends InstructionDefinition { GraphTargetItem arg = args.get(0); List xmlLines = new ArrayList<>(); if (ConstructIns.walkXML(arg, xmlLines)) { - stack.push(new XMLAVM2Item(ins, xmlLines)); + stack.push(new XMLAVM2Item(ins, localData.lineStartInstruction, xmlLines)); return; } } } - stack.push(new ConstructPropAVM2Item(ins, obj, multiname, args)); + stack.push(new ConstructPropAVM2Item(ins, localData.lineStartInstruction, obj, multiname, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java index a7727ee54..1d3d23611 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java @@ -57,7 +57,7 @@ public class ConstructSuperIns extends InstructionDefinition { args.add(0, stack.pop()); } GraphTargetItem obj = stack.pop(); - output.add(new ConstructSuperAVM2Item(ins, obj, args)); + output.add(new ConstructSuperAVM2Item(ins, localData.lineStartInstruction, obj, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java index 7726ad843..9b55376a2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java @@ -33,7 +33,7 @@ public class NewActivationIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new NewActivationAVM2Item(ins)); + stack.push(new NewActivationAVM2Item(ins, localData.lineStartInstruction)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java index 54e8065c9..f9ddc3a8f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java @@ -43,12 +43,12 @@ public class NewArrayIns extends InstructionDefinition { GraphTargetItem item = stack.pop(); //No PopItems in this loop, since some obfuscators put there large numbers if (item instanceof PopItem) { - stack.push(new NullAVM2Item(ins)); + stack.push(new NullAVM2Item(ins, localData.lineStartInstruction)); return; } args.add(0, item); } - stack.push(new NewArrayAVM2Item(ins, args)); + stack.push(new NewArrayAVM2Item(ins, localData.lineStartInstruction, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java index 94771c0b2..4edb8ea24 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java @@ -42,7 +42,7 @@ public class NewClassIns extends InstructionDefinition { stack.pop().toString(writer, LocalData.create(localData.getConstants(), localData.localRegNames, localData.fullyQualifiedNames)); String baseType = writer.toString(); ABC abc = localData.abc; - stack.push(new UnparsedAVM2Item(ins, "new " + abc.constants.getMultiname(abc.instance_info.get(clsIndex).name_index).getName(localData.getConstants(), localData.fullyQualifiedNames, false) + ".class extends " + baseType)); + stack.push(new UnparsedAVM2Item(ins, localData.lineStartInstruction, "new " + abc.constants.getMultiname(abc.instance_info.get(clsIndex).name_index).getName(localData.getConstants(), localData.fullyQualifiedNames, false) + ".class extends " + baseType)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java index 0d54cdf28..44a7f7cc4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java @@ -35,7 +35,7 @@ public class NewFunctionIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int methodIndex = ins.operands[0]; - NewFunctionAVM2Item function = new NewFunctionAVM2Item(ins, "", path, localData.isStatic, localData.scriptIndex, localData.classIndex, localData.abc, localData.fullyQualifiedNames, methodIndex); + NewFunctionAVM2Item function = new NewFunctionAVM2Item(ins, localData.lineStartInstruction, "", path, localData.isStatic, localData.scriptIndex, localData.classIndex, localData.abc, localData.fullyQualifiedNames, methodIndex); stack.push(function); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java index 0099ba488..d8ae5ac94 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java @@ -44,17 +44,17 @@ public class NewObjectIns extends InstructionDefinition { //No PopItems in this loop, since some obfuscators put there large numbers GraphTargetItem value = stack.pop(); if (value instanceof PopItem) { - stack.push(new NullAVM2Item(ins)); + stack.push(new NullAVM2Item(ins, localData.lineStartInstruction)); return; } GraphTargetItem name = stack.pop(); if (value instanceof PopItem) { - stack.push(new NullAVM2Item(ins)); + stack.push(new NullAVM2Item(ins, localData.lineStartInstruction)); return; } args.add(0, new NameValuePair(name, value)); } - stack.push(new NewObjectAVM2Item(ins, args)); + stack.push(new NewObjectAVM2Item(ins, localData.lineStartInstruction, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java index f32ef0104..a8c88fcea 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java @@ -58,7 +58,7 @@ public class CallIns extends InstructionDefinition { } GraphTargetItem receiver = stack.pop(); GraphTargetItem function = stack.pop(); - stack.push(new CallAVM2Item(ins, receiver, function, args)); + stack.push(new CallAVM2Item(ins, localData.lineStartInstruction, receiver, function, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java index b011f1839..86654667e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java @@ -59,7 +59,7 @@ public class CallMethodIns extends InstructionDefinition { } GraphTargetItem receiver = stack.pop(); String methodName = localData.getMethodInfo().get(methodIndex).getName(localData.getConstants()); - stack.push(new CallMethodAVM2Item(ins, receiver, methodName, args)); + stack.push(new CallMethodAVM2Item(ins, localData.lineStartInstruction, receiver, methodName, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java index dfc08ac9b..b99c76a33 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java @@ -42,10 +42,10 @@ public class CallPropLexIns extends CallPropertyIns { args.add(0, stack.pop()); } - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem receiver = stack.pop(); - stack.push(new CallPropertyAVM2Item(ins, false, receiver, multiname, args)); + stack.push(new CallPropertyAVM2Item(ins, localData.lineStartInstruction, false, receiver, multiname, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java index e855c93e4..70c3ce872 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java @@ -62,11 +62,11 @@ public class CallPropVoidIns extends InstructionDefinition { for (int a = 0; a < argCount; a++) { args.add(0, stack.pop()); } - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem receiver = stack.pop(); - output.add(new CallPropertyAVM2Item(ins, true, receiver, multiname, args)); + output.add(new CallPropertyAVM2Item(ins, localData.lineStartInstruction, true, receiver, multiname, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java index afe01e91d..809a4e597 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java @@ -61,10 +61,10 @@ public class CallPropertyIns extends InstructionDefinition { args.add(0, stack.pop()); } - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem receiver = stack.pop(); - stack.push(new CallPropertyAVM2Item(ins, false, receiver, multiname, args)); + stack.push(new CallPropertyAVM2Item(ins, localData.lineStartInstruction, false, receiver, multiname, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java index 884cee7a7..bdf6dd837 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java @@ -59,7 +59,7 @@ public class CallStaticIns extends InstructionDefinition { } GraphTargetItem receiver = stack.pop(); String methodName = localData.getMethodInfo().get(methodIndex).getName(localData.getConstants()); - stack.push(new CallStaticAVM2Item(ins, receiver, methodName, args)); + stack.push(new CallStaticAVM2Item(ins, localData.lineStartInstruction, receiver, methodName, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java index 739d03d3f..df4254781 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java @@ -60,10 +60,10 @@ public class CallSuperIns extends InstructionDefinition { for (int a = 0; a < argCount; a++) { args.add(0, stack.pop()); } - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem receiver = stack.pop(); - stack.push(new CallSuperAVM2Item(ins, false, receiver, multiname, args)); + stack.push(new CallSuperAVM2Item(ins, localData.lineStartInstruction, false, receiver, multiname, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java index 67b24387a..eece56e1d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java @@ -60,10 +60,10 @@ public class CallSuperVoidIns extends InstructionDefinition { for (int a = 0; a < argCount; a++) { args.add(0, stack.pop()); } - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem receiver = stack.pop(); - output.add(new CallSuperAVM2Item(ins, true, receiver, multiname, args)); + output.add(new CallSuperAVM2Item(ins, localData.lineStartInstruction, true, receiver, multiname, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java index ef889c26f..56095df93 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java @@ -54,14 +54,14 @@ public class IfEqIns extends InstructionDefinition implements IfTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new EqAVM2Item(ins, v1, v2)); + stack.push(new EqAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new NeqAVM2Item(ins, v1, v2)); + stack.push(new NeqAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java index c9b0eaf47..b55dd66c9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java @@ -53,7 +53,7 @@ public class IfFalseIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { //String v1 = stack.pop().toString(); //stack.push("(" + v1 + ")"); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java index c00bf627b..809462272 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java @@ -56,14 +56,14 @@ public class IfGeIns extends InstructionDefinition implements IfTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new GeAVM2Item(ins, v1, v2)); + stack.push(new GeAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new LtAVM2Item(ins, v1, v2)); + stack.push(new LtAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java index c00cd3f37..611f82601 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java @@ -56,14 +56,14 @@ public class IfGtIns extends InstructionDefinition implements IfTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new GtAVM2Item(ins, v1, v2)); + stack.push(new GtAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new LeAVM2Item(ins, v1, v2)); + stack.push(new LeAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java index b59518893..6b43d821f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java @@ -56,14 +56,14 @@ public class IfLeIns extends InstructionDefinition implements IfTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new LeAVM2Item(ins, v1, v2)); + stack.push(new LeAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new GtAVM2Item(ins, v1, v2)); + stack.push(new GtAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java index 7e922aeb4..2cdf644b6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java @@ -56,14 +56,14 @@ public class IfLtIns extends InstructionDefinition implements IfTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new LtAVM2Item(ins, v1, v2)); + stack.push(new LtAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new GeAVM2Item(ins, v1, v2)); + stack.push(new GeAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java index 63815d9cf..2f504f176 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java @@ -56,14 +56,14 @@ public class IfNGeIns extends InstructionDefinition implements IfTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new LtAVM2Item(ins, v1, v2)); + stack.push(new LtAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new GeAVM2Item(ins, v1, v2)); + stack.push(new GeAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java index cbbc92511..8e82ff237 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java @@ -56,14 +56,14 @@ public class IfNGtIns extends InstructionDefinition implements IfTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new LeAVM2Item(ins, v1, v2)); + stack.push(new LeAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new GtAVM2Item(ins, v1, v2)); + stack.push(new GtAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java index 01c571763..48399292b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java @@ -56,14 +56,14 @@ public class IfNLeIns extends InstructionDefinition implements IfTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new GtAVM2Item(ins, v1, v2)); + stack.push(new GtAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new LeAVM2Item(ins, v1, v2)); + stack.push(new LeAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java index 76506f008..0fcd460ee 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java @@ -56,14 +56,14 @@ public class IfNLtIns extends InstructionDefinition implements IfTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new GeAVM2Item(ins, v1, v2)); + stack.push(new GeAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new LtAVM2Item(ins, v1, v2)); + stack.push(new LtAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java index 9275760d4..a4e707f00 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java @@ -54,14 +54,14 @@ public class IfNeIns extends InstructionDefinition implements IfTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new NeqAVM2Item(ins, v1, v2)); + stack.push(new NeqAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new EqAVM2Item(ins, v1, v2)); + stack.push(new EqAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java index 6beaa0142..b189894e8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java @@ -54,14 +54,14 @@ public class IfStrictEqIns extends InstructionDefinition implements IfTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new StrictEqAVM2Item(ins, v1, v2)); + stack.push(new StrictEqAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new StrictNeqAVM2Item(ins, v1, v2)); + stack.push(new StrictNeqAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java index 497a536dd..d62ce96f9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java @@ -54,14 +54,14 @@ public class IfStrictNeIns extends InstructionDefinition implements IfTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new StrictNeqAVM2Item(ins, v1, v2)); + stack.push(new StrictNeqAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); - stack.push(new StrictEqAVM2Item(ins, v1, v2)); + stack.push(new StrictEqAVM2Item(ins, localData.lineStartInstruction, v1, v2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java index c2491ab3e..10f21b8cc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java @@ -52,7 +52,7 @@ public class IfTrueIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v1 = stack.pop(); stack.push(v1.invert(null)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java index b0a643f45..3f4b26790 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java @@ -44,10 +44,10 @@ public class JumpIns extends InstructionDefinition implements IfTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - //stack.push(new BooleanAVM2Item(ins, Boolean.TRUE));// + ins.operands[0]); + //stack.push(new BooleanAVM2Item(ins, localData.lineStartInstruction, Boolean.TRUE));// + ins.operands[0]); } @Override - public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { + public void translateInverted(AVM2LocalData localData, HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java index e7acea172..b23cccee0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java @@ -47,11 +47,11 @@ public class DecLocalIIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int regId = ins.operands[0]; - output.add(new DecLocalAVM2Item(ins, regId)); + output.add(new DecLocalAVM2Item(ins, localData.lineStartInstruction, regId)); if (localData.localRegs.containsKey(regId)) { - localData.localRegs.put(regId, new SubtractAVM2Item(ins, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, 1L))); + localData.localRegs.put(regId, new SubtractAVM2Item(ins, localData.lineStartInstruction, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, localData.lineStartInstruction, 1L))); } else { - //localRegs.put(regIndex, new SubtractAVM2Item(ins, new IntegerValueAVM2Item(ins, new Long(0)), new IntegerValueAVM2Item(ins, new Long(1)))); + //localRegs.put(regIndex, new SubtractAVM2Item(ins, localData.lineStartInstruction, new IntegerValueAVM2Item(ins, localData.lineStartInstruction, new Long(0)), new IntegerValueAVM2Item(ins, localData.lineStartInstruction, new Long(1)))); } if (!localData.localRegAssignmentIps.containsKey(regId)) { localData.localRegAssignmentIps.put(regId, 0); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java index d4b6ee7ac..11fd1abe2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java @@ -47,11 +47,11 @@ public class DecLocalIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int regId = ins.operands[0]; - output.add(new DecLocalAVM2Item(ins, regId)); + output.add(new DecLocalAVM2Item(ins, localData.lineStartInstruction, regId)); if (localData.localRegs.containsKey(regId)) { - localData.localRegs.put(regId, new SubtractAVM2Item(ins, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, 1L))); + localData.localRegs.put(regId, new SubtractAVM2Item(ins, localData.lineStartInstruction, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, localData.lineStartInstruction, 1L))); } else { - //localRegs.put(regIndex, new SubtractAVM2Item(ins, new IntegerValueAVM2Item(ins, new Long(0)), new IntegerValueAVM2Item(ins, new Long(1)))); + //localRegs.put(regIndex, new SubtractAVM2Item(ins, localData.lineStartInstruction, new IntegerValueAVM2Item(ins, localData.lineStartInstruction, new Long(0)), new IntegerValueAVM2Item(ins, localData.lineStartInstruction, new Long(1)))); } if (!localData.localRegAssignmentIps.containsKey(regId)) { localData.localRegAssignmentIps.put(regId, 0); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java index a81ce8053..fe4379d2e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java @@ -58,7 +58,7 @@ public abstract class GetLocalTypeIns extends InstructionDefinition { if (localData.isStatic) { stack.push(new ClassAVM2Item(localData.getInstanceInfo().get(localData.classIndex).getName(localData.getConstants()))); } else { - stack.push(new ThisAVM2Item(ins, localData.getInstanceInfo().get(localData.classIndex).getName(localData.getConstants()))); + stack.push(new ThisAVM2Item(ins, localData.lineStartInstruction, localData.getInstanceInfo().get(localData.classIndex).getName(localData.getConstants()))); } return; } @@ -69,17 +69,17 @@ public abstract class GetLocalTypeIns extends InstructionDefinition { assignCount = localData.localRegAssignmentIps.get(regId); } if (assignCount > 5) { //Do not allow change register more than 5 - for deobfuscation - computedValue = new NotCompileTimeItem(ins, computedValue); + computedValue = new NotCompileTimeItem(ins, localData.lineStartInstruction, computedValue); } /*if (!isRegisterCompileTime(regId, ip, refs, code)) { - computedValue = new NotCompileTimeAVM2Item(ins, computedValue); + computedValue = new NotCompileTimeAVM2Item(ins, localData.lineStartInstruction, computedValue); } if (computedValue == null) { if (!localRegNames.containsKey(regId)) { computedValue = new UndefinedAVM2Item(null); //In some obfuscated code there seems to be reading of undefined registers } }*/ - stack.push(new LocalRegAVM2Item(ins, regId, computedValue)); + stack.push(new LocalRegAVM2Item(ins, localData.lineStartInstruction, regId, computedValue)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java index d08c202a9..0b147bb4f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java @@ -47,11 +47,11 @@ public class IncLocalIIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int regId = ins.operands[0]; - output.add(new IncLocalAVM2Item(ins, regId)); + output.add(new IncLocalAVM2Item(ins, localData.lineStartInstruction, regId)); if (localData.localRegs.containsKey(regId)) { - localData.localRegs.put(regId, new AddAVM2Item(ins, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, 1L))); + localData.localRegs.put(regId, new AddAVM2Item(ins, localData.lineStartInstruction, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, localData.lineStartInstruction, 1L))); } else { - //localRegs.put(regIndex, new AddAVM2Item(ins, null, new IntegerValueAVM2Item(ins, new Long(1)))); + //localRegs.put(regIndex, new AddAVM2Item(ins, localData.lineStartInstruction, null, new IntegerValueAVM2Item(ins, localData.lineStartInstruction, new Long(1)))); } if (!localData.localRegAssignmentIps.containsKey(regId)) { localData.localRegAssignmentIps.put(regId, 0); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java index fb735040e..7561452c6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java @@ -47,11 +47,11 @@ public class IncLocalIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int regId = ins.operands[0]; - output.add(new IncLocalAVM2Item(ins, regId)); + output.add(new IncLocalAVM2Item(ins, localData.lineStartInstruction, regId)); if (localData.localRegs.containsKey(regId)) { - localData.localRegs.put(regId, new AddAVM2Item(ins, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, 1L))); + localData.localRegs.put(regId, new AddAVM2Item(ins, localData.lineStartInstruction, localData.localRegs.get(regId), new IntegerValueAVM2Item(ins, localData.lineStartInstruction, 1L))); } else { - //localRegs.put(regIndex, new AddAVM2Item(ins, null, new IntegerValueAVM2Item(ins, new Long(1)))); + //localRegs.put(regIndex, new AddAVM2Item(ins, localData.lineStartInstruction, null, new IntegerValueAVM2Item(ins, localData.lineStartInstruction, new Long(1)))); } if (!localData.localRegAssignmentIps.containsKey(regId)) { localData.localRegAssignmentIps.put(regId, 0); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java index a4699b584..301003d79 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java @@ -59,7 +59,7 @@ public abstract class SetLocalTypeIns extends InstructionDefinition implements S int regId = getRegisterId(ins); GraphTargetItem value = stack.pop(); /*if (localRegs.containsKey(regId)) { - localRegs.put(regId, new NotCompileTimeAVM2Item(ins, value)); + localRegs.put(regId, new NotCompileTimeAVM2Item(ins, localData.lineStartInstruction, value)); } else { localRegs.put(regId, value); }*/ @@ -85,15 +85,15 @@ public abstract class SetLocalTypeIns extends InstructionDefinition implements S GraphTargetItem top = stack.peek().getNotCoerced().getThroughDuplicate(); if (top == inside) { stack.pop(); - stack.push(new PostIncrementAVM2Item(ins, inside)); + stack.push(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, inside)); } else if ((top instanceof IncrementAVM2Item) && (((IncrementAVM2Item) top).value == inside)) { stack.pop(); - stack.push(new PreIncrementAVM2Item(ins, inside)); + stack.push(new PreIncrementAVM2Item(ins, localData.lineStartInstruction, inside)); } else { - output.add(new PostIncrementAVM2Item(ins, inside)); + output.add(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, inside)); } } else { - output.add(new PostIncrementAVM2Item(ins, inside)); + output.add(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, inside)); } return; } @@ -108,15 +108,15 @@ public abstract class SetLocalTypeIns extends InstructionDefinition implements S GraphTargetItem top = stack.peek().getNotCoerced().getThroughDuplicate(); if (top == inside) { stack.pop(); - stack.push(new PostDecrementAVM2Item(ins, inside)); + stack.push(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, inside)); } else if ((top instanceof DecrementAVM2Item) && (((DecrementAVM2Item) top).value == inside)) { stack.pop(); - stack.push(new PreDecrementAVM2Item(ins, inside)); + stack.push(new PreDecrementAVM2Item(ins, localData.lineStartInstruction, inside)); } else { - output.add(new PostDecrementAVM2Item(ins, inside)); + output.add(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, inside)); } } else { - output.add(new PostDecrementAVM2Item(ins, inside)); + output.add(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, inside)); } return; } @@ -125,7 +125,7 @@ public abstract class SetLocalTypeIns extends InstructionDefinition implements S //if(val.startsWith("catchscope ")) return; //if(val.startsWith("newactivation()")) return; - output.add(new SetLocalAVM2Item(ins, regId, value)); + output.add(new SetLocalAVM2Item(ins, localData.lineStartInstruction, regId, value)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java index d71e834a6..599e257f5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java @@ -49,10 +49,10 @@ public class DeletePropertyIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int multinameIndex = ins.operands[0]; - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem obj = stack.pop(); - //stack.add(new BooleanAVM2Item(ins, Boolean.TRUE));//property successfully deleted - stack.add(new DeletePropertyAVM2Item(ins, obj, multiname)); + //stack.add(new BooleanAVM2Item(ins, localData.lineStartInstruction, Boolean.TRUE));//property successfully deleted + stack.add(new DeletePropertyAVM2Item(ins, localData.lineStartInstruction, obj, multiname)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindDefIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindDefIns.java index c8fca6d18..2dcc6ab48 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindDefIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindDefIns.java @@ -37,7 +37,7 @@ public class FindDefIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int multinameIndex = ins.operands[0]; Multiname multiname = localData.getConstants().getMultiname(multinameIndex); - stack.push(new FindDefAVM2Item(ins, multiname)); + stack.push(new FindDefAVM2Item(ins, localData.lineStartInstruction, multiname)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java index f799c1046..5589f7d22 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java @@ -47,8 +47,8 @@ public class FindPropertyIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int multinameIndex = ins.operands[0]; - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); - stack.push(new FindPropertyAVM2Item(ins, multiname)); //resolve right object + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); + stack.push(new FindPropertyAVM2Item(ins, localData.lineStartInstruction, multiname)); //resolve right object } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java index 1896b84d8..d890b1275 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java @@ -47,8 +47,8 @@ public class FindPropertyStrictIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int multinameIndex = ins.operands[0]; - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); - stack.push(new FindPropertyAVM2Item(ins, multiname)); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); + stack.push(new FindPropertyAVM2Item(ins, localData.lineStartInstruction, multiname)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java index 4747f7fea..cd5c2c53a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java @@ -47,9 +47,9 @@ public class GetDescendantsIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int multinameIndex = ins.operands[0]; - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem obj = stack.pop(); - stack.push(new GetDescendantsAVM2Item(ins, obj, multiname)); + stack.push(new GetDescendantsAVM2Item(ins, localData.lineStartInstruction, obj, multiname)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java index 3d82b67a4..14cc93b53 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java @@ -57,7 +57,7 @@ public class GetGlobalSlotIns extends InstructionDefinition { } } - stack.push(new GetSlotAVM2Item(ins, obj, slotname)); + stack.push(new GetSlotAVM2Item(ins, localData.lineStartInstruction, obj, slotname)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java index 78c458191..3cea7dd20 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java @@ -37,7 +37,7 @@ public class GetLexIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int multinameIndex = ins.operands[0]; Multiname multiname = localData.getConstants().getMultiname(multinameIndex); - stack.push(new GetLexAVM2Item(ins, multiname)); + stack.push(new GetLexAVM2Item(ins, localData.lineStartInstruction, multiname)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java index a51ecc6aa..2c9c70737 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java @@ -36,9 +36,9 @@ public class GetPropertyIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int multinameIndex = ins.operands[0]; - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem obj = stack.pop(); - stack.push(new GetPropertyAVM2Item(ins, obj, multiname)); + stack.push(new GetPropertyAVM2Item(ins, localData.lineStartInstruction, obj, multiname)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java index e7a6c8dad..d06c753c2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java @@ -76,7 +76,7 @@ public class GetSlotIns extends InstructionDefinition { } } - stack.push(new GetSlotAVM2Item(ins, obj, slotname)); + stack.push(new GetSlotAVM2Item(ins, localData.lineStartInstruction, obj, slotname)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java index e49ce8a0e..560c6bd82 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java @@ -36,9 +36,9 @@ public class GetSuperIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int multinameIndex = ins.operands[0]; - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem obj = stack.pop(); - stack.push(new GetSuperAVM2Item(ins, obj, multiname)); + stack.push(new GetSuperAVM2Item(ins, localData.lineStartInstruction, obj, multiname)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java index 84648d211..361b9ccd7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java @@ -38,7 +38,7 @@ public class HasNext2Ins extends InstructionDefinition { int objectReg = ins.operands[0]; int indexReg = ins.operands[1]; //stack.push("_loc_" + objectReg + ".hasNext(cnt=_loc_" + indexReg + ")"); - stack.push(new HasNextAVM2Item(ins, new LocalRegAVM2Item(ins, indexReg, localData.localRegs.get(indexReg)), localData.localRegNames.containsKey(objectReg) ? new LocalRegAVM2Item(ins, objectReg, localData.localRegs.get(objectReg)) : localData.localRegs.get(objectReg))); + stack.push(new HasNextAVM2Item(ins, localData.lineStartInstruction, new LocalRegAVM2Item(ins, localData.lineStartInstruction, indexReg, localData.localRegs.get(indexReg)), localData.localRegNames.containsKey(objectReg) ? new LocalRegAVM2Item(ins, localData.lineStartInstruction, objectReg, localData.localRegs.get(objectReg)) : localData.localRegs.get(objectReg))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java index 0ced4acaf..d79355827 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java @@ -35,7 +35,7 @@ public class HasNextIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem curIndex = stack.pop(); GraphTargetItem obj = stack.pop(); - stack.push(new HasNextAVM2Item(ins, curIndex, obj)); + stack.push(new HasNextAVM2Item(ins, localData.lineStartInstruction, curIndex, obj)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java index 2e162dea3..1e7205070 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java @@ -35,7 +35,7 @@ public class InIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem obj = stack.pop(); GraphTargetItem name = stack.pop(); - stack.push(new InAVM2Item(ins, name, obj)); + stack.push(new InAVM2Item(ins, localData.lineStartInstruction, name, obj)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java index 384471bb2..2cb963139 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java @@ -38,9 +38,9 @@ public class InitPropertyIns extends InstructionDefinition { int multinameIndex = ins.operands[0]; GraphTargetItem val = stack.pop(); - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem obj = stack.pop(); - output.add(new InitPropertyAVM2Item(ins, obj, multiname, val)); + output.add(new InitPropertyAVM2Item(ins, localData.lineStartInstruction, obj, multiname, val)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java index 32f912d3c..27221082d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java @@ -35,7 +35,7 @@ public class NextNameIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem index = stack.pop(); GraphTargetItem obj = stack.pop(); - stack.push(new NextNameAVM2Item(ins, index, obj)); + stack.push(new NextNameAVM2Item(ins, localData.lineStartInstruction, index, obj)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java index 898bfb042..159dc442c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java @@ -35,7 +35,7 @@ public class NextValueIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem index = stack.pop(); GraphTargetItem obj = stack.pop(); - stack.push(new NextValueAVM2Item(ins, index, obj)); + stack.push(new NextValueAVM2Item(ins, localData.lineStartInstruction, index, obj)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java index 0d30a1b72..aad083815 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java @@ -41,7 +41,7 @@ public class ReturnValueIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - output.add(new ReturnValueAVM2Item(ins, stack.pop())); + output.add(new ReturnValueAVM2Item(ins, localData.lineStartInstruction, stack.pop())); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java index 0ae3bef31..a1c5c8457 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java @@ -41,7 +41,7 @@ public class ReturnVoidIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - output.add(new ReturnVoidAVM2Item(ins)); + output.add(new ReturnVoidAVM2Item(ins, localData.lineStartInstruction)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java index 46874adfa..aa2af7abb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java @@ -40,7 +40,7 @@ public class SetGlobalSlotIns extends InstructionDefinition implements SetTypeIn @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - output.add(new SetGlobalSlotAVM2Item(ins, ins.operands[0], stack.pop())); + output.add(new SetGlobalSlotAVM2Item(ins, localData.lineStartInstruction, ins.operands[0], stack.pop())); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java index f4326a971..685a2cc54 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java @@ -55,7 +55,7 @@ public class SetPropertyIns extends InstructionDefinition implements SetTypeIns public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int multinameIndex = ins.operands[0]; GraphTargetItem value = stack.pop(); - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem obj = stack.pop(); if (value.getThroughDuplicate().getThroughRegister().getThroughDuplicate() instanceof IncrementAVM2Item) { GraphTargetItem inside = ((IncrementAVM2Item) value.getThroughDuplicate().getThroughRegister().getThroughDuplicate()).value.getThroughRegister().getNotCoerced().getThroughDuplicate(); @@ -73,15 +73,15 @@ public class SetPropertyIns extends InstructionDefinition implements SetTypeIns GraphTargetItem top = stack.peek().getNotCoerced().getThroughDuplicate(); if (top == insideProp) { stack.pop(); - stack.push(new PostIncrementAVM2Item(ins, insideProp)); + stack.push(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, insideProp)); } else if ((top instanceof IncrementAVM2Item) && (((IncrementAVM2Item) top).value == inside)) { stack.pop(); - stack.push(new PreIncrementAVM2Item(ins, insideProp)); + stack.push(new PreIncrementAVM2Item(ins, localData.lineStartInstruction, insideProp)); } else { - output.add(new PostIncrementAVM2Item(ins, insideProp)); + output.add(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, insideProp)); } } else { - output.add(new PostIncrementAVM2Item(ins, insideProp)); + output.add(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, insideProp)); } return; } @@ -105,15 +105,15 @@ public class SetPropertyIns extends InstructionDefinition implements SetTypeIns GraphTargetItem top = stack.peek().getNotCoerced().getThroughDuplicate(); if (top == insideProp) { stack.pop(); - stack.push(new PostDecrementAVM2Item(ins, insideProp)); + stack.push(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, insideProp)); } else if ((top instanceof DecrementAVM2Item) && (((DecrementAVM2Item) top).value == inside)) { stack.pop(); - stack.push(new PreDecrementAVM2Item(ins, insideProp)); + stack.push(new PreDecrementAVM2Item(ins, localData.lineStartInstruction, insideProp)); } else { - output.add(new PostDecrementAVM2Item(ins, insideProp)); + output.add(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, insideProp)); } } else { - output.add(new PostDecrementAVM2Item(ins, insideProp)); + output.add(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, insideProp)); } return; } @@ -128,7 +128,7 @@ public class SetPropertyIns extends InstructionDefinition implements SetTypeIns c.args.clear(); List vals = new ArrayList<>(); vals.add(value); - c.object = new InitVectorAVM2Item(c.getInstruction(), at.params.get(0), vals); + c.object = new InitVectorAVM2Item(c.getInstruction(), c.getLineStartIns(), at.params.get(0), vals); return; } else if (c.object instanceof InitVectorAVM2Item) { InitVectorAVM2Item iv = (InitVectorAVM2Item) c.object; @@ -137,7 +137,7 @@ public class SetPropertyIns extends InstructionDefinition implements SetTypeIns } } - output.add(new SetPropertyAVM2Item(ins, obj, multiname, value)); + output.add(new SetPropertyAVM2Item(ins, localData.lineStartInstruction, obj, multiname, value)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java index 57e806d54..6afe90bde 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java @@ -119,15 +119,15 @@ public class SetSlotIns extends InstructionDefinition implements SetTypeIns { GraphTargetItem top = stack.peek().getNotCoerced().getThroughDuplicate(); if (top == inside) { stack.pop(); - stack.push(new PostIncrementAVM2Item(ins, inside)); + stack.push(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, inside)); } else if ((top instanceof IncrementAVM2Item) && (((IncrementAVM2Item) top).value == inside)) { stack.pop(); - stack.push(new PreIncrementAVM2Item(ins, inside)); + stack.push(new PreIncrementAVM2Item(ins, localData.lineStartInstruction, inside)); } else { - output.add(new PostIncrementAVM2Item(ins, inside)); + output.add(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, inside)); } } else { - output.add(new PostIncrementAVM2Item(ins, inside)); + output.add(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, inside)); } return; } @@ -144,22 +144,22 @@ public class SetSlotIns extends InstructionDefinition implements SetTypeIns { GraphTargetItem top = stack.peek().getNotCoerced().getThroughDuplicate(); if (top == inside) { stack.pop(); - stack.push(new PostDecrementAVM2Item(ins, inside)); + stack.push(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, inside)); } else if ((top instanceof DecrementAVM2Item) && (((DecrementAVM2Item) top).value == inside)) { stack.pop(); - stack.push(new PreDecrementAVM2Item(ins, inside)); + stack.push(new PreDecrementAVM2Item(ins, localData.lineStartInstruction, inside)); } else { - output.add(new PostDecrementAVM2Item(ins, inside)); + output.add(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, inside)); } } else { - output.add(new PostDecrementAVM2Item(ins, inside)); + output.add(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, inside)); } return; } } } - output.add(new SetSlotAVM2Item(ins, obj, slotname, value)); + output.add(new SetSlotAVM2Item(ins, localData.lineStartInstruction, obj, slotname, value)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java index 40653a752..d64ee0edb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java @@ -47,9 +47,9 @@ public class SetSuperIns extends InstructionDefinition implements SetTypeIns { int multinameIndex = ins.operands[0]; GraphTargetItem value = stack.pop(); - FullMultinameAVM2Item multiname = resolveMultiname(true, stack, localData.getConstants(), multinameIndex, ins); + FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem obj = stack.pop(); - output.add(new SetSuperAVM2Item(ins, value, obj, multiname)); + output.add(new SetSuperAVM2Item(ins, localData.lineStartInstruction, value, obj, multiname)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java index ffc8e8b24..c9bee26cd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java @@ -43,7 +43,7 @@ public class ThrowIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - output.add(new ThrowAVM2Item(ins, stack.pop())); + output.add(new ThrowAVM2Item(ins, localData.lineStartInstruction, stack.pop())); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java index d808a4c0a..2654c1dd7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java @@ -45,7 +45,7 @@ public class DupIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem v = stack.pop(); stack.push(v); - stack.push(new DuplicateItem(ins, v)); + stack.push(new DuplicateItem(ins, localData.lineStartInstruction, v)); //v.moreSrc.add(new GraphSourceItemPos(ins, 0)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java index ab238ceb6..396ac4a8b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java @@ -45,7 +45,7 @@ public class PopScopeIns extends InstructionDefinition { GraphTargetItem scope = localData.scopeStack.pop(); if (scope instanceof WithObjectAVM2Item) { scope = ((WithObjectAVM2Item) scope).scope; - output.add(new WithEndAVM2Item(ins, scope)); + output.add(new WithEndAVM2Item(ins, localData.lineStartInstruction, scope)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java index 36e1dd9ba..ea564c20c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java @@ -42,7 +42,7 @@ public class PushByteIns extends InstructionDefinition implements PushIntegerTyp @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new IntegerValueAVM2Item(ins, (long) ins.operands[0])); + stack.push(new IntegerValueAVM2Item(ins, localData.lineStartInstruction, (long) ins.operands[0])); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java index ce30a796f..891be6848 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java @@ -42,7 +42,7 @@ public class PushDoubleIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new FloatValueAVM2Item(ins, localData.getConstants().getDouble(ins.operands[0]))); + stack.push(new FloatValueAVM2Item(ins, localData.lineStartInstruction, localData.getConstants().getDouble(ins.operands[0]))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java index 0a6c368ab..ce21aef50 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java @@ -41,7 +41,7 @@ public class PushFalseIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new FalseItem(ins)); + stack.push(new FalseItem(ins, localData.lineStartInstruction)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java index 5fd215d0b..3f62e35c7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java @@ -42,7 +42,7 @@ public class PushIntIns extends InstructionDefinition implements PushIntegerType @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new IntegerValueAVM2Item(ins, localData.getConstants().getInt(ins.operands[0]))); + stack.push(new IntegerValueAVM2Item(ins, localData.lineStartInstruction, localData.getConstants().getInt(ins.operands[0]))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java index 20a63deaf..0969341a6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java @@ -34,7 +34,7 @@ public class PushNamespaceIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new NameSpaceAVM2Item(ins, ins.operands[0])); + stack.push(new NameSpaceAVM2Item(ins, localData.lineStartInstruction, ins.operands[0])); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java index 58eb4d07d..b52ee4c92 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java @@ -41,7 +41,7 @@ public class PushNanIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new NanAVM2Item(ins)); + stack.push(new NanAVM2Item(ins, localData.lineStartInstruction)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java index 7ce77010c..7d462b4e6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java @@ -42,7 +42,7 @@ public class PushNullIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new NullAVM2Item(ins)); + stack.push(new NullAVM2Item(ins, localData.lineStartInstruction)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java index ffb951fb3..d6b6f0cae 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java @@ -42,7 +42,7 @@ public class PushShortIns extends InstructionDefinition implements PushIntegerTy @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new IntegerValueAVM2Item(ins, (long) (short) ins.operands[0])); + stack.push(new IntegerValueAVM2Item(ins, localData.lineStartInstruction, (long) (short) ins.operands[0])); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java index eb685009a..1ab02f8cd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java @@ -42,7 +42,7 @@ public class PushStringIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new StringAVM2Item(ins, localData.getConstants().getString(ins.operands[0]))); + stack.push(new StringAVM2Item(ins, localData.lineStartInstruction, localData.getConstants().getString(ins.operands[0]))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java index 539f63077..553611a43 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java @@ -41,7 +41,7 @@ public class PushTrueIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new TrueItem(ins)); + stack.push(new TrueItem(ins, localData.lineStartInstruction)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java index d3592d9c1..a3df5bf6e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java @@ -42,7 +42,7 @@ public class PushUIntIns extends InstructionDefinition implements PushIntegerTyp @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new IntegerValueAVM2Item(ins, localData.getConstants().getUInt(ins.operands[0]))); + stack.push(new IntegerValueAVM2Item(ins, localData.lineStartInstruction, localData.getConstants().getUInt(ins.operands[0]))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java index a95e624d0..24b84ce75 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java @@ -42,7 +42,7 @@ public class PushUndefinedIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new UndefinedAVM2Item(ins)); + stack.push(new UndefinedAVM2Item(ins, localData.lineStartInstruction)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java index f10323fc4..acca8a263 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java @@ -35,9 +35,9 @@ public class PushWithIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem w = stack.pop(); - WithObjectAVM2Item wot = new WithObjectAVM2Item(ins, w); + WithObjectAVM2Item wot = new WithObjectAVM2Item(ins, localData.lineStartInstruction, w); localData.scopeStack.push(wot); - output.add(new WithAVM2Item(ins, w)); + output.add(new WithAVM2Item(ins, localData.lineStartInstruction, w)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java index 1c410f6a0..7e0a84c5f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java @@ -55,7 +55,7 @@ public class ApplyTypeIns extends InstructionDefinition { for (int i = 0; i < argCount; i++) { params.add(0, stack.pop()); } - stack.push(new ApplyTypeAVM2Item(ins, stack.pop(), params)); + stack.push(new ApplyTypeAVM2Item(ins, localData.lineStartInstruction, stack.pop(), params)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java index 97142d248..dae265348 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java @@ -49,7 +49,7 @@ public class AsTypeIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem val = stack.pop(); - stack.push(new AsTypeAVM2Item(ins, val, new FullMultinameAVM2Item(false, ins, ins.operands[0]))); + stack.push(new AsTypeAVM2Item(ins, localData.lineStartInstruction, val, new FullMultinameAVM2Item(false, ins, localData.lineStartInstruction, ins.operands[0]))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java index 13cbeb0a3..4d13bf533 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java @@ -47,7 +47,7 @@ public class AsTypeLateIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem cls = stack.pop(); GraphTargetItem val = stack.pop(); - stack.push(new AsTypeAVM2Item(ins, val, cls)); + stack.push(new AsTypeAVM2Item(ins, localData.lineStartInstruction, val, cls)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java index 2ea214fa5..5242508f4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java @@ -46,7 +46,7 @@ public class CoerceAIns extends InstructionDefinition implements CoerceOrConvert @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new CoerceAVM2Item(ins, stack.pop(), getTargetType(localData.getConstants(), ins))); + stack.push(new CoerceAVM2Item(ins, localData.lineStartInstruction, stack.pop(), getTargetType(localData.getConstants(), ins))); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java index 9fdb66d23..f4461176f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java @@ -67,7 +67,7 @@ public class CoerceIns extends InstructionDefinition implements CoerceOrConvertT @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int multinameIndex = ins.operands[0]; - stack.push(new CoerceAVM2Item(ins, stack.pop(), PropertyAVM2Item.multinameToType(multinameIndex, localData.getConstants()))); + stack.push(new CoerceAVM2Item(ins, localData.lineStartInstruction, stack.pop(), PropertyAVM2Item.multinameToType(multinameIndex, localData.getConstants()))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java index d6be3c765..a16f49eb7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java @@ -55,7 +55,7 @@ public class CoerceSIns extends InstructionDefinition implements CoerceOrConvert @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new CoerceAVM2Item(ins, stack.pop(), getTargetType(localData.getConstants(), ins))); + stack.push(new CoerceAVM2Item(ins, localData.lineStartInstruction, stack.pop(), getTargetType(localData.getConstants(), ins))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java index cc58ed17a..16477fe0b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java @@ -45,7 +45,7 @@ public class ConvertBIns extends InstructionDefinition implements CoerceOrConver @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new ConvertAVM2Item(ins, stack.pop(), getTargetType(localData.getConstants(), ins))); + stack.push(new ConvertAVM2Item(ins, localData.lineStartInstruction, stack.pop(), getTargetType(localData.getConstants(), ins))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java index 0c27b9bc7..d2de4fafb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java @@ -45,7 +45,7 @@ public class ConvertDIns extends InstructionDefinition implements CoerceOrConver @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new ConvertAVM2Item(ins, stack.pop(), getTargetType(localData.getConstants(), ins))); + stack.push(new ConvertAVM2Item(ins, localData.lineStartInstruction, stack.pop(), getTargetType(localData.getConstants(), ins))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java index d5102661d..17a8a8e82 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java @@ -45,7 +45,7 @@ public class ConvertIIns extends InstructionDefinition implements CoerceOrConver @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new ConvertAVM2Item(ins, stack.pop(), getTargetType(localData.getConstants(), ins))); + stack.push(new ConvertAVM2Item(ins, localData.lineStartInstruction, stack.pop(), getTargetType(localData.getConstants(), ins))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java index 40539a81f..ca570446e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java @@ -55,7 +55,7 @@ public class ConvertOIns extends InstructionDefinition implements CoerceOrConver @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new ConvertAVM2Item(ins, stack.pop(), getTargetType(localData.getConstants(), ins))); + stack.push(new ConvertAVM2Item(ins, localData.lineStartInstruction, stack.pop(), getTargetType(localData.getConstants(), ins))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java index 7302b90c9..c5bfdecc4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java @@ -44,7 +44,7 @@ public class ConvertSIns extends InstructionDefinition implements CoerceOrConver @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new ConvertAVM2Item(ins, stack.pop(), getTargetType(localData.getConstants(), ins))); + stack.push(new ConvertAVM2Item(ins, localData.lineStartInstruction, stack.pop(), getTargetType(localData.getConstants(), ins))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java index f5bc477c3..017805541 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java @@ -45,7 +45,7 @@ public class ConvertUIns extends InstructionDefinition implements CoerceOrConver @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new ConvertAVM2Item(ins, stack.pop(), getTargetType(localData.getConstants(), ins))); + stack.push(new ConvertAVM2Item(ins, localData.lineStartInstruction, stack.pop(), getTargetType(localData.getConstants(), ins))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java index 6910659de..492592f42 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java @@ -35,7 +35,7 @@ public class InstanceOfIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem type = stack.pop(); GraphTargetItem value = stack.pop(); - stack.push(new InstanceOfAVM2Item(ins, value, type)); + stack.push(new InstanceOfAVM2Item(ins, localData.lineStartInstruction, value, type)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java index 18c71bd04..fa00015fd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java @@ -37,7 +37,7 @@ public class IsTypeIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int multinameIndex = ins.operands[0]; GraphTargetItem value = stack.pop(); - stack.push(new IsTypeAVM2Item(ins, value, new FullMultinameAVM2Item(false, ins, multinameIndex))); + stack.push(new IsTypeAVM2Item(ins, localData.lineStartInstruction, value, new FullMultinameAVM2Item(false, ins, localData.lineStartInstruction, multinameIndex))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java index ba72a3267..ba915dedd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java @@ -35,7 +35,7 @@ public class IsTypeLateIns extends InstructionDefinition { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem type = stack.pop(); GraphTargetItem value = stack.pop(); - stack.push(new IsTypeAVM2Item(ins, value, type)); + stack.push(new IsTypeAVM2Item(ins, localData.lineStartInstruction, value, type)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java index c71be05e1..3a8106d9f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java @@ -44,7 +44,7 @@ public class TypeOfIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new TypeOfAVM2Item(ins, stack.pop())); + stack.push(new TypeOfAVM2Item(ins, localData.lineStartInstruction, stack.pop())); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java index 425d0e26c..0f9c8d457 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java @@ -42,7 +42,7 @@ public class CheckFilterIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem obj = stack.pop(); - stack.push(new FilteredCheckAVM2Item(ins, obj)); + stack.push(new FilteredCheckAVM2Item(ins, localData.lineStartInstruction, obj)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java index 14751c18a..70cabb37a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java @@ -45,6 +45,6 @@ public class DXNSIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { //FIXME!!! - search namespace - output.add(new DefaultXMLNamespace(ins, new StringAVM2Item(ins, localData.getConstants().getString(ins.operands[0])))); + output.add(new DefaultXMLNamespace(ins, localData.lineStartInstruction, new StringAVM2Item(ins, localData.lineStartInstruction, localData.getConstants().getString(ins.operands[0])))); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java index d944ce2bc..e7186dc0e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java @@ -43,7 +43,7 @@ public class DXNSLateIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem xmlns = stack.pop(); - output.add(new DefaultXMLNamespace(ins, xmlns)); + output.add(new DefaultXMLNamespace(ins, localData.lineStartInstruction, xmlns)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java index bed31986f..aa84db229 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java @@ -43,7 +43,7 @@ public class EscXAttrIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new EscapeXAttrAVM2Item(ins, stack.pop())); + stack.push(new EscapeXAttrAVM2Item(ins, localData.lineStartInstruction, stack.pop())); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java index 28030ab64..626dc4d91 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java @@ -43,7 +43,7 @@ public class EscXElemIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { - stack.push(new EscapeXElemAVM2Item(ins, stack.pop())); + stack.push(new EscapeXElemAVM2Item(ins, localData.lineStartInstruction, stack.pop())); } @Override 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 d8ffef868..fc532300b 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 @@ -27,7 +27,7 @@ import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; @@ -37,18 +37,19 @@ import java.util.List; public abstract class AVM2Item extends GraphTargetItem { private AVM2Instruction instruction; + private AVM2Instruction lineStartIns; - public AVM2Item(GraphSourceItem instruction, int precedence) { - super(instruction, precedence); + public AVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, int precedence) { + this(instruction, lineStartIns, precedence, null); + } + + public AVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, int precedence, GraphTargetItem value) { + super(instruction, lineStartIns, precedence, value); if (instruction instanceof AVM2Instruction) { this.instruction = (AVM2Instruction) instruction; } - } - - public AVM2Item(GraphSourceItem instruction, int precedence, GraphTargetItem value) { - super(instruction, precedence, value); - if (instruction instanceof AVM2Instruction) { - this.instruction = (AVM2Instruction) instruction; + if (lineStartIns instanceof AVM2Instruction) { + this.lineStartIns = (AVM2Instruction) lineStartIns; } } @@ -56,6 +57,10 @@ public abstract class AVM2Item extends GraphTargetItem { return instruction; } + public AVM2Instruction getLineStartIns() { + return lineStartIns; + } + @Override public boolean needsSemicolon() { return true; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java index b2ba617ca..4e6603d4b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -40,8 +40,8 @@ public class AlchemyLoadAVM2Item extends AVM2Item { private final GraphTargetItem ofs; - public AlchemyLoadAVM2Item(GraphSourceItem instruction, GraphTargetItem ofs, char type, int size) { - super(instruction, PRECEDENCE_PRIMARY); + public AlchemyLoadAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem ofs, char type, int size) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.ofs = ofs; this.type = type; this.size = size; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java index c0fd834df..e923e14d0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -36,8 +36,8 @@ public class AlchemySignExtendAVM2Item extends AVM2Item { private final int size; - public AlchemySignExtendAVM2Item(GraphSourceItem instruction, GraphTargetItem value, int size) { - super(instruction, PRECEDENCE_PRIMARY, value); + public AlchemySignExtendAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, int size) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); this.size = size; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java index 9abe8f8be..bda82013e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -39,8 +39,8 @@ public class AlchemyStoreAVM2Item extends AVM2Item { private final GraphTargetItem ofs; - public AlchemyStoreAVM2Item(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem ofs, char type, int size) { - super(instruction, PRECEDENCE_PRIMARY, value); + public AlchemyStoreAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem ofs, char type, int size) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); this.ofs = ofs; this.type = type; this.size = size; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java index d5c5acd3f..47e18287c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -36,8 +36,8 @@ public class ApplyTypeAVM2Item extends AVM2Item { public List params; - public ApplyTypeAVM2Item(AVM2Instruction instruction, GraphTargetItem object, List params) { - super(instruction, PRECEDENCE_PRIMARY); + public ApplyTypeAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, List params) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.params = params; this.object = object; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java index 88671ef4a..71bc59e3f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -33,8 +33,8 @@ public class BooleanAVM2Item extends AVM2Item { public Boolean value; - public BooleanAVM2Item(AVM2Instruction instruction, Boolean value) { - super(instruction, PRECEDENCE_PRIMARY); + public BooleanAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Boolean value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.value = value; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java index 8d9ce6554..93c500a8c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; @@ -31,8 +31,8 @@ public class CallAVM2Item extends AVM2Item { public List arguments; - public CallAVM2Item(AVM2Instruction instruction, GraphTargetItem receiver, GraphTargetItem function, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); + public CallAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem receiver, GraphTargetItem function, List arguments) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.receiver = receiver; this.function = function; this.arguments = arguments; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java index 45bdb3d09..b4fe837ce 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; @@ -31,8 +31,8 @@ public class CallMethodAVM2Item extends AVM2Item { public List arguments; - public CallMethodAVM2Item(AVM2Instruction instruction, GraphTargetItem receiver, String methodName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); + public CallMethodAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem receiver, String methodName, List arguments) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.receiver = receiver; this.methodName = methodName; this.arguments = arguments; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java index 278bfb0ae..e34d2a97d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -39,8 +39,8 @@ public class CallPropertyAVM2Item extends AVM2Item { public boolean isVoid; - public CallPropertyAVM2Item(AVM2Instruction instruction, boolean isVoid, GraphTargetItem receiver, GraphTargetItem propertyName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); + public CallPropertyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, boolean isVoid, GraphTargetItem receiver, GraphTargetItem propertyName, List arguments) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.receiver = receiver; this.propertyName = propertyName; this.arguments = arguments; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java index 91a22b1d0..6572311d2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; @@ -31,8 +31,8 @@ public class CallStaticAVM2Item extends AVM2Item { public List arguments; - public CallStaticAVM2Item(AVM2Instruction instruction, GraphTargetItem receiver, String methodName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); + public CallStaticAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem receiver, String methodName, List arguments) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.receiver = receiver; this.methodName = methodName; this.arguments = arguments; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java index 83737cab6..e6dd41cda 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; @@ -33,8 +33,8 @@ public class CallSuperAVM2Item extends AVM2Item { public boolean isVoid; - public CallSuperAVM2Item(AVM2Instruction instruction, boolean isVoid, GraphTargetItem receiver, GraphTargetItem multiname, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); + public CallSuperAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, boolean isVoid, GraphTargetItem receiver, GraphTargetItem multiname, List arguments) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.receiver = receiver; this.multiname = multiname; this.arguments = arguments; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java index a7d77d01a..ac75b088c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java @@ -12,12 +12,13 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -26,7 +27,7 @@ public class ClassAVM2Item extends AVM2Item { public Multiname className; public ClassAVM2Item(Multiname className) { - super(null, PRECEDENCE_PRIMARY); + super(null, null, PRECEDENCE_PRIMARY); this.className = className; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java index 5fcdf20d4..67646d8fe 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java @@ -25,7 +25,7 @@ import com.jpexs.decompiler.flash.ecma.Undefined; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -38,13 +38,13 @@ public class CoerceAVM2Item extends AVM2Item { //public GraphTargetItem type; public GraphTargetItem typeObj; - /*public CoerceAVM2Item(AVM2Instruction instruction, GraphTargetItem value, String type) { - super(instruction, value.getPrecedence()); + /*public CoerceAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, String type) { + super(instruction, lineStartIns, value.getPrecedence()); this.value = value; this.type = type; }*/ - public CoerceAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem typeObj) { - super(instruction, value.getPrecedence(), value); + public CoerceAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem typeObj) { + super(instruction, lineStartIns, value.getPrecedence(), value); this.typeObj = typeObj; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java index 4dbf217d7..aced307e7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; @@ -28,8 +28,8 @@ public class ConstructAVM2Item extends AVM2Item { public List args; - public ConstructAVM2Item(AVM2Instruction instruction, GraphTargetItem object, List args) { - super(instruction, PRECEDENCE_PRIMARY); + public ConstructAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, List args) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.object = object; this.args = args; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java index db4863f88..cdd7ca59b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; @@ -31,8 +31,8 @@ public class ConstructPropAVM2Item extends AVM2Item { public List args; - public ConstructPropAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem propertyName, List args) { - super(instruction, PRECEDENCE_PRIMARY); + public ConstructPropAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem propertyName, List args) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.object = object; this.propertyName = propertyName; this.args = args; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java index 7f54143a4..b00586a2c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -34,8 +34,8 @@ public class ConstructSuperAVM2Item extends AVM2Item { public List args; - public ConstructSuperAVM2Item(AVM2Instruction instruction, GraphTargetItem object, List args) { - super(instruction, PRECEDENCE_PRIMARY); + public ConstructSuperAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, List args) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.object = object; this.args = args; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java index f485795ca..47affc17f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.ecma.EcmaScript; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.Set; @@ -28,8 +28,8 @@ public class ConvertAVM2Item extends AVM2Item { //public GraphTargetItem value; public GraphTargetItem type; - public ConvertAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem type) { - super(instruction, value.getPrecedence(), value); + public ConvertAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem type) { + super(instruction, lineStartIns, value.getPrecedence(), value); this.type = type; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java index d27c6d987..f5cc0f0b7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java @@ -17,7 +17,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -25,8 +25,8 @@ public class DecLocalAVM2Item extends AVM2Item { public int regIndex; - public DecLocalAVM2Item(AVM2Instruction instruction, int regIndex) { - super(instruction, PRECEDENCE_POSTFIX); + public DecLocalAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, int regIndex) { + super(instruction, lineStartIns, PRECEDENCE_POSTFIX); this.regIndex = regIndex; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java index 9a73cf644..af0e1ddfe 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java @@ -18,15 +18,15 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.Set; public class DecrementAVM2Item extends AVM2Item { - public DecrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_ADDITIVE, object); + public DecrementAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_ADDITIVE, object); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java index 49f797e65..31cd8ed24 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -36,8 +36,8 @@ public class DefaultXMLNamespace extends AVM2Item { private final GraphTargetItem ns; - public DefaultXMLNamespace(AVM2Instruction instruction, GraphTargetItem ns) { - super(instruction, NOPRECEDENCE); + public DefaultXMLNamespace(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem ns) { + super(instruction, lineStartIns, NOPRECEDENCE); this.ns = ns; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java index e99bf9475..807d3db1f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -34,8 +34,8 @@ import java.util.List; */ public class EscapeXAttrAVM2Item extends AVM2Item { - public EscapeXAttrAVM2Item(AVM2Instruction instruction, GraphTargetItem expression) { - super(instruction, NOPRECEDENCE, expression); + public EscapeXAttrAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem expression) { + super(instruction, lineStartIns, NOPRECEDENCE, expression); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java index afde2d67f..58bb139b9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -34,8 +34,8 @@ import java.util.List; */ public class EscapeXElemAVM2Item extends AVM2Item { - public EscapeXElemAVM2Item(AVM2Instruction instruction, GraphTargetItem expression) { - super(instruction, NOPRECEDENCE, expression); + public EscapeXElemAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem expression) { + super(instruction, lineStartIns, NOPRECEDENCE, expression); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java index cb8534492..9d273ba98 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java @@ -17,7 +17,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -29,8 +29,8 @@ public class FilteredCheckAVM2Item extends AVM2Item { GraphTargetItem object; - public FilteredCheckAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, NOPRECEDENCE); + public FilteredCheckAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, NOPRECEDENCE); this.object = object; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java index 47cc7867e..85c557d4b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -27,8 +27,8 @@ public class FindDefAVM2Item extends AVM2Item { public Multiname propertyName; - public FindDefAVM2Item(AVM2Instruction instruction, Multiname propertyName) { - super(instruction, PRECEDENCE_PRIMARY); + public FindDefAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Multiname propertyName) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.propertyName = propertyName; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java index 3f9138ea5..f75e22631 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java @@ -17,7 +17,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -25,8 +25,8 @@ public class FindPropertyAVM2Item extends AVM2Item { public GraphTargetItem propertyName; - public FindPropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem propertyName) { - super(instruction, PRECEDENCE_PRIMARY); + public FindPropertyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem propertyName) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.propertyName = propertyName; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java index b7be15f4f..d7fe29638 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -34,8 +34,8 @@ public class FloatValueAVM2Item extends NumberValueAVM2Item { public Double value; - public FloatValueAVM2Item(AVM2Instruction instruction, Double value) { - super(instruction); + public FloatValueAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Double value) { + super(instruction, lineStartIns); this.value = value; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java index 8c68f43c3..1de76957d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java @@ -21,7 +21,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.types.Namespace; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.DottedChain; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; @@ -38,24 +39,24 @@ public class FullMultinameAVM2Item extends AVM2Item { public boolean property; - public FullMultinameAVM2Item(boolean property, AVM2Instruction instruction, int multinameIndex, GraphTargetItem name) { - super(instruction, PRECEDENCE_PRIMARY); + public FullMultinameAVM2Item(boolean property, GraphSourceItem instruction, GraphSourceItem lineStartIns, int multinameIndex, GraphTargetItem name) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.multinameIndex = multinameIndex; this.name = name; this.namespace = null; this.property = property; } - public FullMultinameAVM2Item(boolean property, AVM2Instruction instruction, int multinameIndex) { - super(instruction, PRECEDENCE_PRIMARY); + public FullMultinameAVM2Item(boolean property, GraphSourceItem instruction, GraphSourceItem lineStartIns, int multinameIndex) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.multinameIndex = multinameIndex; this.name = null; this.namespace = null; this.property = property; } - public FullMultinameAVM2Item(boolean property, AVM2Instruction instruction, int multinameIndex, GraphTargetItem name, GraphTargetItem namespace) { - super(instruction, PRECEDENCE_PRIMARY); + public FullMultinameAVM2Item(boolean property, GraphSourceItem instruction, GraphSourceItem lineStartIns, int multinameIndex, GraphTargetItem name, GraphTargetItem namespace) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.multinameIndex = multinameIndex; this.name = name; this.namespace = namespace; @@ -162,10 +163,7 @@ public class FullMultinameAVM2Item extends AVM2Item { tiNameSpace2 = ((LocalRegAVM2Item) tiNameSpace2).computedValue.getThroughNotCompilable().getThroughDuplicate(); } } - if (tiNameSpace != tiNameSpace2) { - return false; - } - return true; + return (tiNameSpace == tiNameSpace2); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java index 773476737..318db7398 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.script.NamespaceItem; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -41,14 +41,14 @@ public class GetDescendantsAVM2Item extends AVM2Item { //constructor for compiler public GetDescendantsAVM2Item(GraphTargetItem object, String nameStr, List openedNamespaces) { - super(null, PRECEDENCE_PRIMARY); + super(null, null, PRECEDENCE_PRIMARY); this.object = object; this.nameStr = nameStr; this.openedNamespaces = openedNamespaces; } - public GetDescendantsAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem multiname) { - super(instruction, PRECEDENCE_PRIMARY); + public GetDescendantsAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem multiname) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.object = object; this.multiname = multiname; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java index 72f0edb15..d73403537 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -27,8 +27,8 @@ public class GetLexAVM2Item extends AVM2Item { public Multiname propertyName; - public GetLexAVM2Item(AVM2Instruction instruction, Multiname propertyName) { - super(instruction, PRECEDENCE_PRIMARY); + public GetLexAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Multiname propertyName) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.propertyName = propertyName; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java index 442baa689..f459be3ef 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -35,8 +35,8 @@ public class GetPropertyAVM2Item extends AVM2Item { public GraphTargetItem propertyName; - public GetPropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem propertyName) { - super(instruction, PRECEDENCE_PRIMARY); + public GetPropertyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem propertyName) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.object = object; this.propertyName = propertyName; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java index 9606a6ca4..4ea4cfb8b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -29,8 +29,8 @@ public class GetSlotAVM2Item extends AVM2Item { public GraphTargetItem scope; - public GetSlotAVM2Item(AVM2Instruction instruction, GraphTargetItem scope, Multiname slotName) { - super(instruction, PRECEDENCE_PRIMARY); + public GetSlotAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope, Multiname slotName) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.slotName = slotName; this.scope = scope; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java index 5ee7006f9..de979d331 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -28,8 +28,8 @@ public class GetSuperAVM2Item extends AVM2Item { public FullMultinameAVM2Item propertyName; - public GetSuperAVM2Item(AVM2Instruction instruction, GraphTargetItem object, FullMultinameAVM2Item propertyName) { - super(instruction, PRECEDENCE_PRIMARY); + public GetSuperAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, FullMultinameAVM2Item propertyName) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.object = object; this.propertyName = propertyName; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java index 0f7f0e051..585183308 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -32,8 +32,8 @@ public class HasNextAVM2Item extends AVM2Item { public GraphTargetItem collection; - public HasNextAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem collection) { - super(instruction, NOPRECEDENCE); + public HasNextAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem collection) { + super(instruction, lineStartIns, NOPRECEDENCE); this.object = object; this.collection = collection; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java index 2b76da4e9..3cbe2157d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -34,8 +34,8 @@ public class InAVM2Item extends AVM2Item { public GraphTargetItem collection; - public InAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem collection) { - super(instruction, NOPRECEDENCE); + public InAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem collection) { + super(instruction, lineStartIns, NOPRECEDENCE); this.object = object; this.collection = collection; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java index d513cd52d..59698871f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java @@ -17,7 +17,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -25,8 +25,8 @@ public class IncLocalAVM2Item extends AVM2Item { public int regIndex; - public IncLocalAVM2Item(AVM2Instruction instruction, int regIndex) { - super(instruction, PRECEDENCE_POSTFIX); + public IncLocalAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, int regIndex) { + super(instruction, lineStartIns, PRECEDENCE_POSTFIX); this.regIndex = regIndex; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java index ab53423d4..645472761 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java @@ -18,15 +18,15 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.Set; public class IncrementAVM2Item extends AVM2Item { - public IncrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_ADDITIVE, object); + public IncrementAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_ADDITIVE, object); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java index adaf5c31c..f9437b0de 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -30,8 +30,8 @@ public class InitPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, A public FullMultinameAVM2Item propertyName; //public GraphTargetItem value; - public InitPropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem object, FullMultinameAVM2Item propertyName, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT, value); + public InitPropertyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, FullMultinameAVM2Item propertyName, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); this.object = object; this.propertyName = propertyName; } @@ -45,7 +45,7 @@ public class InitPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, A @Override public GraphTargetItem getObject() { - return new GetPropertyAVM2Item(getInstruction(), object, propertyName); + return new GetPropertyAVM2Item(getInstruction(), getLineStartIns(), object, propertyName); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java index 5b1ba0650..18d307060 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java @@ -30,7 +30,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -66,14 +66,14 @@ public class InitVectorAVM2Item extends AVM2Item { return NamespaceItem.getCpoolSetIndex(abc, openedNamespaces); } - public InitVectorAVM2Item(AVM2Instruction ins, GraphTargetItem subtype, List arguments) { - super(ins, PRECEDENCE_PRIMARY); + public InitVectorAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem subtype, List arguments) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.subtype = subtype; this.arguments = arguments; } public InitVectorAVM2Item(GraphTargetItem subtype, List arguments, List openedNamespaces) { - super(null, PRECEDENCE_PRIMARY); + super(null, null, PRECEDENCE_PRIMARY); this.subtype = subtype; this.arguments = arguments; this.openedNamespaces = openedNamespaces; @@ -104,7 +104,7 @@ public class InitVectorAVM2Item extends AVM2Item { public GraphTargetItem returnType() { List pars = new ArrayList<>(); pars.add(subtype); - return new ApplyTypeAVM2Item(null, new TypeItem(VECTOR_FQN), pars); + return new ApplyTypeAVM2Item(null, null, new TypeItem(VECTOR_FQN), pars); } @Override @@ -117,13 +117,13 @@ public class InitVectorAVM2Item extends AVM2Item { ins(AVM2Instructions.GetProperty, constants.getMultinameId(Multiname.createMultiname(false, constants.getStringId("Vector", true), allNsSet(g.abcIndex)), true)), subtype, ins(AVM2Instructions.ApplyType, 1), - new IntegerValueAVM2Item(null, (long) arguments.size()), + new IntegerValueAVM2Item(null, null, (long) arguments.size()), ins(AVM2Instructions.Construct, 1) ); for (int i = 0; i < arguments.size(); i++) { ret.addAll(toSourceMerge(localData, generator, ins(AVM2Instructions.Dup), - new IntegerValueAVM2Item(null, (long) i), + new IntegerValueAVM2Item(null, null, (long) i), arguments.get(i), ins(AVM2Instructions.SetProperty, constants.getMultinameId(Multiname.createMultinameL(false, NamespaceItem.getCpoolSetIndex(g.abcIndex, openedNamespaces)), true)) )); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java index 99e7694bf..b309d6272 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java @@ -25,7 +25,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.IntegerValueTypeItem; @@ -38,8 +38,8 @@ public class IntegerValueAVM2Item extends NumberValueAVM2Item implements Integer public Long value; - public IntegerValueAVM2Item(AVM2Instruction instruction, Long value) { - super(instruction); + public IntegerValueAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Long value) { + super(instruction, lineStartIns); this.value = value; } @@ -128,7 +128,7 @@ public class IntegerValueAVM2Item extends NumberValueAVM2Item implements Integer @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - AVM2Instruction ins = null; + AVM2Instruction ins; if (value >= -128 && value <= 127) { ins = new AVM2Instruction(0, AVM2Instructions.PushByte, new int[]{(int) (long) value}); } else if (value >= -32768 && value <= 32767) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java index 5f05a19ab..0fb68c020 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.model.clauses.FilterAVM2Item; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -40,8 +40,8 @@ public class LocalRegAVM2Item extends AVM2Item { private boolean isCT = false; - public LocalRegAVM2Item(AVM2Instruction instruction, int regIndex, GraphTargetItem computedValue) { - super(instruction, PRECEDENCE_PRIMARY); + public LocalRegAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, int regIndex, GraphTargetItem computedValue) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.regIndex = regIndex; if (computedValue == null) { computedResult = null; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java index ecdfd5118..9f4c4b8d2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -26,8 +26,8 @@ public class NameSpaceAVM2Item extends AVM2Item { public int namespaceIndex; - public NameSpaceAVM2Item(AVM2Instruction instruction, int namespaceIndex) { - super(instruction, NOPRECEDENCE); + public NameSpaceAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, int namespaceIndex) { + super(instruction, lineStartIns, NOPRECEDENCE); this.namespaceIndex = namespaceIndex; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java index c4b82ca97..ffa0ea6ad 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java @@ -17,7 +17,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.decompiler.graph.model.TernarOpItem; @@ -28,7 +28,7 @@ public class NameValuePair extends AVM2Item { //public GraphTargetItem value; public NameValuePair(GraphTargetItem name, GraphTargetItem value) { - super(name.getSrc(), NOPRECEDENCE, value); + super(name.getSrc(), name.getLineStartItem(), NOPRECEDENCE, value); this.name = name; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java index 3db653df5..209115578 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -31,8 +31,8 @@ import java.util.List; public class NanAVM2Item extends AVM2Item { - public NanAVM2Item(AVM2Instruction instruction) { - super(instruction, NOPRECEDENCE); + public NanAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, NOPRECEDENCE); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java index a182b93e9..78a5e4af7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.HashMap; @@ -27,8 +27,8 @@ public class NewActivationAVM2Item extends AVM2Item { public HashMap slots = new HashMap<>(); - public NewActivationAVM2Item(AVM2Instruction instruction) { - super(instruction, NOPRECEDENCE); + public NewActivationAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, NOPRECEDENCE); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java index c0a6b48fd..8fbd343e0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -32,8 +32,8 @@ public class NewArrayAVM2Item extends AVM2Item { public List values; - public NewArrayAVM2Item(AVM2Instruction instruction, List values) { - super(instruction, PRECEDENCE_PRIMARY); + public NewArrayAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, List values) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.values = values; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java index 27cd39b57..28cf6ecca 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java @@ -25,7 +25,7 @@ import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.flash.helpers.NulWriter; import com.jpexs.decompiler.graph.DottedChain; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.ScopeStack; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -49,8 +49,8 @@ public class NewFunctionAVM2Item extends AVM2Item { public int methodIndex; - public NewFunctionAVM2Item(AVM2Instruction instruction, String functionName, String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, List fullyQualifiedNames, int methodIndex) { - super(instruction, PRECEDENCE_PRIMARY); + public NewFunctionAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, String functionName, String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, List fullyQualifiedNames, int methodIndex) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.functionName = functionName; this.path = path; this.isStatic = isStatic; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java index e46512926..3b19f5f3c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -34,8 +34,8 @@ public class NewObjectAVM2Item extends AVM2Item { public List pairs; - public NewObjectAVM2Item(AVM2Instruction instruction, List pairs) { - super(instruction, PRECEDENCE_PRIMARY); + public NewObjectAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, List pairs) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.pairs = pairs; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java index f1137d93f..10883be6c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -32,8 +32,8 @@ public class NextNameAVM2Item extends AVM2Item { GraphTargetItem obj; - public NextNameAVM2Item(AVM2Instruction instruction, GraphTargetItem index, GraphTargetItem obj) { - super(instruction, NOPRECEDENCE); + public NextNameAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem index, GraphTargetItem obj) { + super(instruction, lineStartIns, NOPRECEDENCE); this.index = index; this.obj = obj; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java index d7185093f..17b3cda3c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -32,8 +32,8 @@ public class NextValueAVM2Item extends AVM2Item { GraphTargetItem obj; - public NextValueAVM2Item(AVM2Instruction instruction, GraphTargetItem index, GraphTargetItem obj) { - super(instruction, NOPRECEDENCE); + public NextValueAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem index, GraphTargetItem obj) { + super(instruction, lineStartIns, NOPRECEDENCE); this.index = index; this.obj = obj; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java index 9af56a447..223fd162e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java @@ -24,7 +24,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -33,8 +33,8 @@ import java.util.Set; public class NullAVM2Item extends AVM2Item { - public NullAVM2Item(AVM2Instruction instruction) { - super(instruction, PRECEDENCE_PRIMARY); + public NullAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java index 3375c588e..35a9d7ab7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java @@ -17,12 +17,13 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SimpleValue; public abstract class NumberValueAVM2Item extends AVM2Item implements SimpleValue { - public NumberValueAVM2Item(AVM2Instruction instruction) { - super(instruction, PRECEDENCE_PRIMARY); + public NumberValueAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java index 3cb617b9f..068af3867 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; @@ -32,8 +32,8 @@ public class PostDecrementAVM2Item extends AVM2Item implements AssignmentAVM2Ite public GraphTargetItem object; - public PostDecrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_POSTFIX); + public PostDecrementAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_POSTFIX); this.object = object; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java index 9f3e71650..4f2bc639c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; @@ -33,8 +33,8 @@ public class PostIncrementAVM2Item extends AVM2Item implements AssignmentAVM2Ite public GraphTargetItem object; - public PostIncrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_POSTFIX); + public PostIncrementAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_POSTFIX); this.object = object; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java index a86dcb285..1ebf12174 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.ExitItem; @@ -32,8 +32,8 @@ import java.util.List; public class ReturnValueAVM2Item extends AVM2Item implements ExitItem { //public GraphTargetItem value; - public ReturnValueAVM2Item(AVM2Instruction instruction, GraphTargetItem value) { - super(instruction, NOPRECEDENCE, value); + public ReturnValueAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, NOPRECEDENCE, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java index 9b016d7b5..8a448a1ab 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -21,7 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.ExitItem; @@ -30,8 +31,8 @@ import java.util.List; public class ReturnVoidAVM2Item extends AVM2Item implements ExitItem { - public ReturnVoidAVM2Item(AVM2Instruction instruction) { - super(instruction, NOPRECEDENCE); + public ReturnVoidAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, NOPRECEDENCE); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ScriptAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ScriptAVM2Item.java index e88f99304..76b10d8da 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ScriptAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ScriptAVM2Item.java @@ -17,7 +17,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -30,7 +30,7 @@ public class ScriptAVM2Item extends AVM2Item { public int scriptIndex; public ScriptAVM2Item(int scriptIndex) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.scriptIndex = scriptIndex; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetGlobalSlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetGlobalSlotAVM2Item.java index e76bd3afd..bcdf13ef5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetGlobalSlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetGlobalSlotAVM2Item.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.GraphPart; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -33,8 +33,8 @@ public class SetGlobalSlotAVM2Item extends AVM2Item { return value.getFirstPart(); } - public SetGlobalSlotAVM2Item(AVM2Instruction instruction, int slotId, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT, value); + public SetGlobalSlotAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, int slotId, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); this.slotId = slotId; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java index 5cfa3bc0e..0eee36a72 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -34,8 +34,8 @@ public class SetLocalAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assig public int regIndex; //public GraphTargetItem value; - public SetLocalAVM2Item(AVM2Instruction instruction, int regIndex, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT, value); + public SetLocalAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, int regIndex, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); this.regIndex = regIndex; } @@ -49,7 +49,7 @@ public class SetLocalAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assig @Override public GraphTargetItem getObject() { - return new LocalRegAVM2Item(getInstruction(), regIndex, null); + return new LocalRegAVM2Item(getInstruction(), getLineStartIns(), regIndex, null); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java index 1caca13b9..d44ac1c83 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java @@ -25,7 +25,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphPart; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -44,8 +44,8 @@ public class SetPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, As return value.getFirstPart(); } - public SetPropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem propertyName, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT); + public SetPropertyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem propertyName, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT); this.object = object; this.propertyName = propertyName; this.value = value; @@ -60,7 +60,7 @@ public class SetPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, As @Override public GraphTargetItem getObject() { - return new GetPropertyAVM2Item(getInstruction(), object, propertyName); + return new GetPropertyAVM2Item(getInstruction(), getLineStartIns(), object, propertyName); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java index eb28be78d..958b26c40 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.GraphPart; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -32,8 +32,8 @@ public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assign //public GraphTargetItem value; public GraphTargetItem scope; - public SetSlotAVM2Item(AVM2Instruction instruction, GraphTargetItem scope, Multiname slotName, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT, value); + public SetSlotAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope, Multiname slotName, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); this.slotName = slotName; this.scope = scope; } @@ -68,7 +68,7 @@ public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assign @Override public GraphTargetItem getObject() { - return new GetSlotAVM2Item(getInstruction(), scope, slotName); + return new GetSlotAVM2Item(getInstruction(), getLineStartIns(), scope, slotName); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java index c7b03f298..f0b9336db 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.GraphPart; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -35,8 +35,8 @@ public class SetSuperAVM2Item extends AVM2Item { return value.getFirstPart(); } - public SetSuperAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem object, FullMultinameAVM2Item propertyName) { - super(instruction, PRECEDENCE_ASSIGMENT, value); + public SetSuperAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem object, FullMultinameAVM2Item propertyName) { + super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); this.object = object; this.propertyName = propertyName; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetTypeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetTypeAVM2Item.java index d8650cc85..fe5338f1a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetTypeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetTypeAVM2Item.java @@ -15,7 +15,7 @@ * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; /** * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java index 13e3a30f7..540ccf3cc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SimpleValue; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; @@ -38,8 +38,8 @@ public class StringAVM2Item extends AVM2Item implements SimpleValue { private Double numberValue; - public StringAVM2Item(AVM2Instruction instruction, String value) { - super(instruction, PRECEDENCE_PRIMARY); + public StringAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, String value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.value = value; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java index a93ce2dd8..084ad0604 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -33,8 +33,8 @@ public class ThisAVM2Item extends AVM2Item { public Multiname className; - public ThisAVM2Item(GraphSourceItem instruction, Multiname className) { - super(instruction, PRECEDENCE_PRIMARY); + public ThisAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Multiname className) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.className = className; getSrcData().localName = "this"; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java index 074569b55..d3454a640 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java @@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.ExitItem; @@ -32,8 +32,8 @@ import java.util.List; public class ThrowAVM2Item extends AVM2Item implements ExitItem { //public GraphTargetItem value; - public ThrowAVM2Item(AVM2Instruction instruction, GraphTargetItem value) { - super(instruction, NOPRECEDENCE, value); + public ThrowAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, NOPRECEDENCE, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java index 2f77f9998..658d35f60 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java @@ -24,7 +24,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -33,8 +33,8 @@ import java.util.Set; public class UndefinedAVM2Item extends AVM2Item { - public UndefinedAVM2Item(AVM2Instruction instruction) { - super(instruction, PRECEDENCE_PRIMARY); + public UndefinedAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java index 0c824b4ff..c760765e0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java @@ -17,7 +17,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -25,8 +25,8 @@ public class UnparsedAVM2Item extends AVM2Item { public String value; - public UnparsedAVM2Item(AVM2Instruction instruction, String value) { - super(instruction, NOPRECEDENCE); + public UnparsedAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, String value) { + super(instruction, lineStartIns, NOPRECEDENCE); this.value = value; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java index 3e09fcd76..ad73edd50 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -38,14 +38,14 @@ public class WithAVM2Item extends AVM2Item { public List subvariables = new ArrayList<>(); - public WithAVM2Item(AVM2Instruction instruction, GraphTargetItem scope, List items) { - super(instruction, NOPRECEDENCE); + public WithAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope, List items) { + super(instruction, lineStartIns, NOPRECEDENCE); this.scope = scope; this.items = items; } - public WithAVM2Item(AVM2Instruction instruction, GraphTargetItem scope) { - super(instruction, NOPRECEDENCE); + public WithAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope) { + super(instruction, lineStartIns, NOPRECEDENCE); this.scope = scope; this.items = new ArrayList<>(); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java index 29e57133b..bc716f6a3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java @@ -17,7 +17,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -25,8 +25,8 @@ public class WithEndAVM2Item extends AVM2Item { public GraphTargetItem scope; - public WithEndAVM2Item(AVM2Instruction instruction, GraphTargetItem scope) { - super(instruction, PRECEDENCE_PRIMARY); + public WithEndAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.scope = scope; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java index 2c161dcec..3275456f3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -31,8 +31,8 @@ public class WithObjectAVM2Item extends AVM2Item { public GraphTargetItem scope; - public WithObjectAVM2Item(AVM2Instruction instruction, GraphTargetItem scope) { - super(instruction, PRECEDENCE_PRIMARY); + public WithObjectAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.scope = scope; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java index 18a05d174..0e48f2c72 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.DottedChain; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; @@ -32,8 +32,8 @@ public class XMLAVM2Item extends AVM2Item { public List parts; - public XMLAVM2Item(AVM2Instruction instruction, List parts) { - super(instruction, NOPRECEDENCE); + public XMLAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, List parts) { + super(instruction, lineStartIns, NOPRECEDENCE); this.parts = parts; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java index 177fd8791..b7fd66813 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java @@ -26,7 +26,7 @@ import com.jpexs.decompiler.flash.abc.avm2.model.SetSlotAVM2Item; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.flash.helpers.hilight.HighlightData; import com.jpexs.decompiler.graph.DottedChain; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -41,7 +41,7 @@ public class DeclarationAVM2Item extends AVM2Item { public GraphTargetItem type; public DeclarationAVM2Item(GraphTargetItem assignment, GraphTargetItem type) { - super(assignment.getSrc(), assignment.getPrecedence()); + super(assignment.getSrc(), assignment.getLineStartItem(), assignment.getPrecedence()); this.type = type; this.assignment = assignment; } @@ -59,6 +59,7 @@ public class DeclarationAVM2Item extends AVM2Item { HighlightData srcData = getSrcData(); srcData.localName = localName; srcData.declaration = true; + srcData.regIndex = lti.regIndex; srcData.declaredType = DottedChain.ALL; writer.append("var "); writer.append(localName); @@ -82,6 +83,7 @@ public class DeclarationAVM2Item extends AVM2Item { HighlightData srcData = getSrcData(); srcData.localName = localName; srcData.declaration = true; + srcData.regIndex = lti.regIndex; GraphTargetItem coerType = TypeItem.UNBOUNDED; if (lti.value instanceof CoerceAVM2Item) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ExceptionAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ExceptionAVM2Item.java index 18a51db69..4dad96218 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ExceptionAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ExceptionAVM2Item.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model.clauses; import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; import com.jpexs.decompiler.flash.abc.types.ABCException; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -28,7 +28,7 @@ public class ExceptionAVM2Item extends AVM2Item { public ABCException exception; public ExceptionAVM2Item(ABCException exception) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.exception = exception; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/FilterAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/FilterAVM2Item.java index 55680b603..ecfe85ca2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/FilterAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/FilterAVM2Item.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.model.clauses; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; @@ -33,8 +33,8 @@ public class FilterAVM2Item extends AVM2Item { public GraphTargetItem collection; - public FilterAVM2Item(AVM2Instruction instruction, GraphTargetItem collection, GraphTargetItem expression) { - super(instruction, NOPRECEDENCE); + public FilterAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem collection, GraphTargetItem expression) { + super(instruction, lineStartIns, NOPRECEDENCE); this.expression = expression; this.collection = collection; } 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 8de0d7685..8f2ca6e12 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 @@ -27,7 +27,7 @@ import com.jpexs.decompiler.flash.helpers.NulWriter; import com.jpexs.decompiler.graph.Block; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.Loop; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; @@ -54,8 +54,8 @@ public class ForEachInAVM2Item extends LoopItem implements Block { return ret; } - public ForEachInAVM2Item(GraphSourceItem instruction, Loop loop, InAVM2Item expression, List commands) { - super(instruction, loop); + public ForEachInAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop, InAVM2Item expression, List commands) { + super(instruction, lineStartIns, loop); 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/model/clauses/ForInAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java index d9735ea66..2cbde3e95 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java @@ -27,7 +27,7 @@ import com.jpexs.decompiler.flash.helpers.NulWriter; import com.jpexs.decompiler.graph.Block; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.Loop; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; @@ -54,8 +54,8 @@ public class ForInAVM2Item extends LoopItem implements Block { return ret; } - public ForInAVM2Item(GraphSourceItem instruction, Loop loop, InAVM2Item expression, List commands) { - super(instruction, loop); + public ForInAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop, InAVM2Item expression, List commands) { + super(instruction, lineStartIns, loop); 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/model/clauses/TryAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java index 9223fb425..332f56367 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java @@ -29,7 +29,7 @@ import com.jpexs.decompiler.graph.Block; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphTargetItem;import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.ContinueItem; @@ -67,7 +67,7 @@ public class TryAVM2Item extends AVM2Item implements Block { } public TryAVM2Item(List tryCommands, List catchExceptions, List> catchCommands, List finallyCommands, String finCatchName) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.tryCommands = tryCommands; this.catchExceptions = catchExceptions; this.catchCommands = catchCommands; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java index d04d023c9..fc7545793 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java @@ -34,8 +34,8 @@ import java.util.List; public class AddAVM2Item extends BinaryOpItem { - public AddAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "+"); + public AddAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_ADDITIVE, leftSide, rightSide, "+"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java index e9920034b..41ed3bdfc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java @@ -28,8 +28,8 @@ import java.util.List; public class AsTypeAVM2Item extends BinaryOpItem { - public AsTypeAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem type) { - super(instruction, PRECEDENCE_RELATIONAL, value, type, "as"); + public AsTypeAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem type) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, value, type, "as"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java index 0452f90c7..41c25b1d6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java @@ -29,8 +29,8 @@ import java.util.List; public class BitAndAVM2Item extends BinaryOpItem { - public BitAndAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISEAND, leftSide, rightSide, "&"); + public BitAndAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_BITWISEAND, leftSide, rightSide, "&"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitNotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitNotAVM2Item.java index 586aba2c6..b47b62af8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitNotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitNotAVM2Item.java @@ -29,8 +29,8 @@ import java.util.List; public class BitNotAVM2Item extends UnaryOpItem { - public BitNotAVM2Item(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_UNARY, value, "~"); + public BitNotAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_UNARY, value, "~"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java index de28af2f5..e667afc93 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java @@ -29,8 +29,8 @@ import java.util.List; public class BitOrAVM2Item extends BinaryOpItem { - public BitOrAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISEOR, leftSide, rightSide, "|"); + public BitOrAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_BITWISEOR, leftSide, rightSide, "|"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java index 8e663b43b..efeb8f41d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java @@ -29,8 +29,8 @@ import java.util.List; public class BitXorAVM2Item extends BinaryOpItem { - public BitXorAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISEXOR, leftSide, rightSide, "^"); + public BitXorAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_BITWISEXOR, leftSide, rightSide, "^"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java index 611848928..9fcc766f0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java @@ -45,12 +45,12 @@ public class DeletePropertyAVM2Item extends AVM2Item { //Constructor for compiler public DeletePropertyAVM2Item(GraphTargetItem property, int line) { - this(null, property, null); + this(null, null, property, null); this.line = line; } - public DeletePropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem propertyName) { - super(instruction, PRECEDENCE_UNARY); + public DeletePropertyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem propertyName) { + super(instruction, lineStartIns, PRECEDENCE_UNARY); this.object = object; this.propertyName = propertyName; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java index 30912810c..8e859c96e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java @@ -31,8 +31,8 @@ import java.util.List; public class DivideAVM2Item extends BinaryOpItem { - public DivideAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "/"); + public DivideAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "/"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/EqAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/EqAVM2Item.java index 557d315be..211c01a15 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/EqAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/EqAVM2Item.java @@ -33,8 +33,8 @@ import java.util.List; public class EqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition, EqualsTypeItem { - public EqAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "=="); + public EqAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_EQUALITY, leftSide, rightSide, "=="); } @Override @@ -54,7 +54,7 @@ public class EqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfConditi @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new NeqAVM2Item(getSrc(), leftSide, rightSide); + return new NeqAVM2Item(getSrc(), getLineStartItem(), leftSide, rightSide); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GeAVM2Item.java index dc95c3631..f77d32c4e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GeAVM2Item.java @@ -33,8 +33,8 @@ import java.util.List; public class GeAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - public GeAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, ">="); + public GeAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, leftSide, rightSide, ">="); } @Override @@ -49,7 +49,7 @@ public class GeAVM2Item extends BinaryOpItem implements LogicalOpItem, IfConditi @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new LtAVM2Item(getSrc(), leftSide, rightSide); + return new LtAVM2Item(getSrc(), getLineStartItem(), leftSide, rightSide); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GtAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GtAVM2Item.java index 0f5ca5030..cf53a3a88 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GtAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GtAVM2Item.java @@ -33,8 +33,8 @@ import java.util.List; public class GtAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - public GtAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, ">"); + public GtAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, leftSide, rightSide, ">"); } @Override @@ -49,7 +49,7 @@ public class GtAVM2Item extends BinaryOpItem implements LogicalOpItem, IfConditi @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new LeAVM2Item(getSrc(), leftSide, rightSide); + return new LeAVM2Item(getSrc(), getLineStartItem(), leftSide, rightSide); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InAVM2Item.java index 2f7f17d3c..6e975e115 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InAVM2Item.java @@ -30,8 +30,8 @@ import java.util.List; public class InAVM2Item extends BinaryOpItem { - public InAVM2Item(AVM2Instruction instruction, GraphTargetItem name, GraphTargetItem object) { - super(instruction, PRECEDENCE_RELATIONAL, name, object, "in"); + public InAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem name, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, name, object, "in"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InstanceOfAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InstanceOfAVM2Item.java index dc26f0dbb..325317151 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InstanceOfAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InstanceOfAVM2Item.java @@ -30,8 +30,8 @@ import java.util.List; public class InstanceOfAVM2Item extends BinaryOpItem { - public InstanceOfAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem type) { - super(instruction, PRECEDENCE_RELATIONAL, value, type, "instanceof"); + public InstanceOfAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem type) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, value, type, "instanceof"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IsTypeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IsTypeAVM2Item.java index a77b0a20a..c126a7a72 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IsTypeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IsTypeAVM2Item.java @@ -30,8 +30,8 @@ import java.util.List; public class IsTypeAVM2Item extends BinaryOpItem { - public IsTypeAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem type) { - super(instruction, PRECEDENCE_RELATIONAL, value, type, "is"); + public IsTypeAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem type) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, value, type, "is"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java index 69bea41f5..c6901ee48 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java @@ -29,8 +29,8 @@ import java.util.List; public class LShiftAVM2Item extends BinaryOpItem { - public LShiftAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, "<<"); + public LShiftAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, "<<"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LeAVM2Item.java index b63447a26..431cdd194 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LeAVM2Item.java @@ -33,8 +33,8 @@ import java.util.List; public class LeAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - public LeAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, "<="); + public LeAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, leftSide, rightSide, "<="); } @Override @@ -49,7 +49,7 @@ public class LeAVM2Item extends BinaryOpItem implements LogicalOpItem, IfConditi @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new GtAVM2Item(getSrc(), leftSide, rightSide); + return new GtAVM2Item(getSrc(), getLineStartItem(), leftSide, rightSide); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LtAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LtAVM2Item.java index a0efc0725..669f3626f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LtAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LtAVM2Item.java @@ -33,8 +33,8 @@ import java.util.List; public class LtAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - public LtAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, "<"); + public LtAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, leftSide, rightSide, "<"); } @Override @@ -49,7 +49,7 @@ public class LtAVM2Item extends BinaryOpItem implements LogicalOpItem, IfConditi @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new GeAVM2Item(getSrc(), leftSide, rightSide); + return new GeAVM2Item(getSrc(), getLineStartItem(), leftSide, rightSide); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java index fca83a776..a02f1a974 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java @@ -31,8 +31,8 @@ import java.util.List; public class ModuloAVM2Item extends BinaryOpItem { - public ModuloAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "%"); + public ModuloAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "%"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java index c9806b363..a903e7108 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java @@ -31,8 +31,8 @@ import java.util.List; public class MultiplyAVM2Item extends BinaryOpItem { - public MultiplyAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "*"); + public MultiplyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "*"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NegAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NegAVM2Item.java index bf2521667..3906f28c3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NegAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NegAVM2Item.java @@ -29,8 +29,8 @@ import java.util.List; public class NegAVM2Item extends UnaryOpItem { - public NegAVM2Item(AVM2Instruction instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_UNARY, value, "-"); + public NegAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_UNARY, value, "-"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NeqAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NeqAVM2Item.java index 45c4ca5ee..54054c1a8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NeqAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NeqAVM2Item.java @@ -32,8 +32,8 @@ import java.util.List; public class NeqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - public NeqAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "!="); + public NeqAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_EQUALITY, leftSide, rightSide, "!="); } @Override @@ -53,7 +53,7 @@ public class NeqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondit @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new EqAVM2Item(getSrc(), leftSide, rightSide); + return new EqAVM2Item(getSrc(), getLineStartItem(), leftSide, rightSide); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreDecrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreDecrementAVM2Item.java index 272df7c43..c5353c3d4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreDecrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreDecrementAVM2Item.java @@ -30,8 +30,8 @@ import java.util.List; public class PreDecrementAVM2Item extends UnaryOpItem implements AssignmentAVM2Item { - public PreDecrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_UNARY, object, "--"); + public PreDecrementAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_UNARY, object, "--"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreIncrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreIncrementAVM2Item.java index 4562d00e7..c59f03aa8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreIncrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreIncrementAVM2Item.java @@ -28,8 +28,8 @@ import java.util.List; public class PreIncrementAVM2Item extends UnaryOpItem { - public PreIncrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_UNARY, object, "++"); + public PreIncrementAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_UNARY, object, "++"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java index 1891f0706..29ae06337 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java @@ -29,8 +29,8 @@ import java.util.List; public class RShiftAVM2Item extends BinaryOpItem { - public RShiftAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>"); + public RShiftAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictEqAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictEqAVM2Item.java index 5881126bf..0b4fa6ba7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictEqAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictEqAVM2Item.java @@ -33,8 +33,8 @@ import java.util.List; public class StrictEqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition, EqualsTypeItem { - public StrictEqAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "==="); + public StrictEqAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_EQUALITY, leftSide, rightSide, "==="); } @Override @@ -57,7 +57,7 @@ public class StrictEqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfC @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new StrictNeqAVM2Item(getSrc(), leftSide, rightSide); + return new StrictNeqAVM2Item(getSrc(), getLineStartItem(), leftSide, rightSide); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictNeqAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictNeqAVM2Item.java index 3a9b94692..07bd78ad9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictNeqAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictNeqAVM2Item.java @@ -32,8 +32,8 @@ import java.util.List; public class StrictNeqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - public StrictNeqAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "!=="); + public StrictNeqAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_EQUALITY, leftSide, rightSide, "!=="); } @Override @@ -48,7 +48,7 @@ public class StrictNeqAVM2Item extends BinaryOpItem implements LogicalOpItem, If @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new StrictEqAVM2Item(getSrc(), leftSide, rightSide); + return new StrictEqAVM2Item(getSrc(), getLineStartItem(), leftSide, rightSide); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java index c22819b20..32c4b9a4e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java @@ -32,8 +32,8 @@ import java.util.List; public class SubtractAVM2Item extends BinaryOpItem { - public SubtractAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "-"); + public SubtractAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_ADDITIVE, leftSide, rightSide, "-"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java index 59f20d865..5270b68a8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java @@ -32,8 +32,8 @@ import java.util.Set; public class TypeOfAVM2Item extends UnaryOpItem { - public TypeOfAVM2Item(AVM2Instruction instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_UNARY, value, "typeof "); + public TypeOfAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_UNARY, value, "typeof "); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java index 3bbf6d6f6..7d64e0aef 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java @@ -29,8 +29,8 @@ import java.util.List; public class URShiftAVM2Item extends BinaryOpItem { - public URShiftAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>>"); + public URShiftAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>>"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java index 5f7e5dd4d..453151aff 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java @@ -311,7 +311,7 @@ public class AVM2SourceGenerator implements SourceGenerator { AssignableAVM2Item.dupSetTemp(localData, this, tempVal2), ins(AVM2Instructions.PushWith) )); - localData.scopeStack.add(new LocalRegAVM2Item(null, tempVal2.getVal(), null)); + localData.scopeStack.add(new LocalRegAVM2Item(null, null, tempVal2.getVal(), null)); forBody.addAll(toInsList(item.value.toSource(localData, this))); List trueBody = new ArrayList<>(); trueBody.addAll(toInsList(AssignableAVM2Item.getTemp(localData, this, xmlListReg))); @@ -532,7 +532,7 @@ public class AVM2SourceGenerator implements SourceGenerator { ret.addAll(item.scope.toSource(localData, this)); Reference tempReg = new Reference<>(0); ret.addAll(AssignableAVM2Item.dupSetTemp(localData, this, tempReg)); - localData.scopeStack.add(new WithObjectAVM2Item(null, new LocalRegAVM2Item(null, tempReg.getVal(), null))); + localData.scopeStack.add(new WithObjectAVM2Item(null, null, new LocalRegAVM2Item(null, null, tempReg.getVal(), null))); ret.add(ins(AVM2Instructions.PushWith)); ret.addAll(generate(localData, item.items)); ret.add(ins(AVM2Instructions.PopScope)); @@ -550,7 +550,7 @@ public class AVM2SourceGenerator implements SourceGenerator { if (item.expression != null) { ex.add(item.expression); } else { - ex.add(new BooleanAVM2Item(null, true)); + ex.add(new BooleanAVM2Item(null, null, true)); } GraphTargetItem lastItem = null; if (!ex.isEmpty()) { @@ -598,11 +598,11 @@ public class AVM2SourceGenerator implements SourceGenerator { ret.add(forwardJump); List cases = new ArrayList<>(); - cases.addAll(toInsList(new IntegerValueAVM2Item(null, (long) item.caseValues.size()).toSource(localData, this))); + cases.addAll(toInsList(new IntegerValueAVM2Item(null, null, (long) item.caseValues.size()).toSource(localData, this))); int cLen = insToBytes(cases).length; List caseLast = new ArrayList<>(); caseLast.add(0, ins(AVM2Instructions.Jump, cLen)); - caseLast.addAll(0, toInsList(new IntegerValueAVM2Item(null, (long) item.caseValues.size()).toSource(localData, this))); + caseLast.addAll(0, toInsList(new IntegerValueAVM2Item(null, null, (long) item.caseValues.size()).toSource(localData, this))); int cLastLen = insToBytes(caseLast).length; caseLast.add(0, ins(AVM2Instructions.Jump, cLastLen)); cases.addAll(0, caseLast); @@ -613,7 +613,7 @@ public class AVM2SourceGenerator implements SourceGenerator { for (int i = item.caseValues.size() - 1; i >= 0; i--) { List sub = new ArrayList<>(); - sub.addAll(toInsList(new IntegerValueAVM2Item(null, (long) i).toSource(localData, this))); + sub.addAll(toInsList(new IntegerValueAVM2Item(null, null, (long) i).toSource(localData, this))); sub.add(ins(AVM2Instructions.Jump, insToBytes(cases).length)); int subLen = insToBytes(sub).length; @@ -782,7 +782,7 @@ public class AVM2SourceGenerator implements SourceGenerator { } } } - localData.scopeStack.add(new LocalRegAVM2Item(null, tempReg.getVal(), null)); + localData.scopeStack.add(new LocalRegAVM2Item(null, null, tempReg.getVal(), null)); catchCmd.addAll(generateToInsList(localData, item.catchCommands.get(c))); localData.scopeStack.remove(localData.scopeStack.size() - 1); catchCmd.add(ins(AVM2Instructions.PopScope)); @@ -1043,7 +1043,7 @@ public class AVM2SourceGenerator implements SourceGenerator { } cnt++; localData.finallyCounter.put(clauseId, cnt); - ret.addAll(new IntegerValueAVM2Item(null, (long) cnt).toSource(localData, this)); + ret.addAll(new IntegerValueAVM2Item(null, null, (long) cnt).toSource(localData, this)); ret.add(ins(new FinallyJumpIns(clauseId), 0)); ret.add(ins(AVM2Instructions.Label)); ret.add(ins(AVM2Instructions.Pop)); @@ -1071,7 +1071,7 @@ public class AVM2SourceGenerator implements SourceGenerator { } cnt++; localData.finallyCounter.put(clauseId, cnt); - ret.addAll(new IntegerValueAVM2Item(null, (long) cnt).toSource(localData, this)); + ret.addAll(new IntegerValueAVM2Item(null, null, (long) cnt).toSource(localData, this)); ret.add(ins(new FinallyJumpIns(clauseId), 0)); ret.add(ins(AVM2Instructions.Label)); ret.add(ins(AVM2Instructions.Pop)); @@ -1439,7 +1439,7 @@ public class AVM2SourceGenerator implements SourceGenerator { if (className != null) { String fullClassName = pkg.add(className).toRawString(); registerTypes.add(fullClassName); - localData.scopeStack.add(new LocalRegAVM2Item(null, registerNames.size(), null)); + localData.scopeStack.add(new LocalRegAVM2Item(null, null, registerNames.size(), null)); registerNames.add("this"); } else { @@ -1477,7 +1477,7 @@ public class AVM2SourceGenerator implements SourceGenerator { registerNames.add("+$activation"); localData.activationReg = registerNames.size() - 1; registerTypes.add("Object"); - localData.scopeStack.add(new LocalRegAVM2Item(null, localData.activationReg, null)); + localData.scopeStack.add(new LocalRegAVM2Item(null, null, localData.activationReg, null)); } String mask = Configuration.registerNameFormat.get(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AbcIndexing.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AbcIndexing.java index fb7538540..196db8645 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AbcIndexing.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AbcIndexing.java @@ -412,7 +412,7 @@ public class AbcIndexing { for (int pm : m.params) { params.add(multinameToType(pm, constants)); } - return new ApplyTypeAVM2Item(null, obj, params); + return new ApplyTypeAVM2Item(null, null, obj, params); } else { return new TypeItem(m.getNameWithNamespace(constants)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java index c47846fab..85da16cbe 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java @@ -211,14 +211,14 @@ public class ActionScript3Parser { if (!isNameOrProp(ret)) { throw new AVM2ParseException("Invalid assignment", lexer.yyline()); } - ret = new PostIncrementAVM2Item(null, ret); + ret = new PostIncrementAVM2Item(null, null, ret); s = lex(); } else if (s.type == SymbolType.DECREMENT) { if (!isNameOrProp(ret)) { throw new AVM2ParseException("Invalid assignment", lexer.yyline()); } - ret = new PostDecrementAVM2Item(null, ret); + ret = new PostDecrementAVM2Item(null, null, ret); s = lex(); } @@ -238,7 +238,7 @@ public class ActionScript3Parser { do { s = lex(); if (s.isType(SymbolType.MULTIPLY)) { - params.add(new NullAVM2Item(null)); + params.add(new NullAVM2Item(null, null)); } else { lexer.pushback(s); params.add(expressionPrimary(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, false, registerVars, inFunction, inMethod, false, variables)); @@ -255,7 +255,7 @@ public class ActionScript3Parser { lexer.pushback(s); } expected(s, lexer.yyline(), SymbolType.GREATER_THAN); - ret = new ApplyTypeAVM2Item(null, ret, params); + ret = new ApplyTypeAVM2Item(null, null, ret, params); } else { lexer.pushback(s); } @@ -811,7 +811,7 @@ public class ActionScript3Parser { lexer.pushback(s); } - ConstAVM2Item ns = new ConstAVM2Item(metadata, namespace, customNs, true, nname, new TypeItem(DottedChain.NAMESPACE), new StringAVM2Item(null, nval), lexer.yyline()); + ConstAVM2Item ns = new ConstAVM2Item(metadata, namespace, customNs, true, nname, new TypeItem(DottedChain.NAMESPACE), new StringAVM2Item(null, null, nval), lexer.yyline()); traits.add(ns); break; case CONST: @@ -1102,7 +1102,7 @@ public class ActionScript3Parser { lexer.pushback(s); } - traits.add(new ConstAVM2Item(metadata, ns, null, true, nname, new TypeItem(DottedChain.NAMESPACE), new StringAVM2Item(null, nval), lexer.yyline())); + traits.add(new ConstAVM2Item(metadata, ns, null, true, nname, new TypeItem(DottedChain.NAMESPACE), new StringAVM2Item(null, null, nval), lexer.yyline())); break; default: lexer.pushback(s); @@ -1121,7 +1121,7 @@ public class ActionScript3Parser { switch (s.type) { /*case INT: expectedType(SymbolType.PARENT_OPEN); - ret = new ToIntegerAVM2Item(null, expression(allOpenedNamespaces, thisType,pkg,needsActivation, importedClasses, openedNamespaces,openedNamespacesKinds,registerVars, inFunction, inMethod, true, variables)); + ret = new ToIntegerAVM2Item(null, null, expression(allOpenedNamespaces, thisType,pkg,needsActivation, importedClasses, openedNamespaces,openedNamespacesKinds,registerVars, inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); break; case NUMBER_OP: @@ -1132,7 +1132,7 @@ public class ActionScript3Parser { ret = memberOrCall(allOpenedNamespaces, thisType,vi, registerVars, inFunction, inMethod, variables); } else { expected(s, lexer.yyline(), SymbolType.PARENT_OPEN); - ret = new ToNumberAVM2Item(null, expression(allOpenedNamespaces, thisType,pkg,needsActivation, importedClasses, openedNamespaces,openedNamespacesKinds,registerVars, inFunction, inMethod, true, variables)); + ret = new ToNumberAVM2Item(null, null, expression(allOpenedNamespaces, thisType,pkg,needsActivation, importedClasses, openedNamespaces,openedNamespacesKinds,registerVars, inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); } break; @@ -1146,7 +1146,7 @@ public class ActionScript3Parser { ret = memberOrCall(allOpenedNamespaces, thisType,vi2, registerVars, inFunction, inMethod, variables); } else { expected(s, lexer.yyline(), SymbolType.PARENT_OPEN); - ret = new ToStringAVM2Item(null, expression(allOpenedNamespaces, thisType,pkg,needsActivation, importedClasses, openedNamespaces,openedNamespacesKinds,registerVars, inFunction, inMethod, true, variables)); + ret = new ToStringAVM2Item(null, null, expression(allOpenedNamespaces, thisType,pkg,needsActivation, importedClasses, openedNamespaces,openedNamespacesKinds,registerVars, inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); ret = memberOrCall(allOpenedNamespaces, thisType,ret, registerVars, inFunction, inMethod, variables); } @@ -1173,12 +1173,12 @@ public class ActionScript3Parser { if (((StringBuilder) a).length() == 0) { return null; } - GraphTargetItem ret = new StringAVM2Item(null, a.toString()); + GraphTargetItem ret = new StringAVM2Item(null, null, a.toString()); ((StringBuilder) a).setLength(0); return ret; } if (a instanceof String) { - return new StringAVM2Item(null, (String) a); + return new StringAVM2Item(null, null, (String) a); } if (a instanceof GraphTargetItem) { return (GraphTargetItem) a; @@ -1198,7 +1198,7 @@ public class ActionScript3Parser { if (tb == null) { return ta; } - return new AddAVM2Item(null, ta, tb); + return new AddAVM2Item(null, null, ta, tb); } private void addS(List rets, StringBuilder sb) { @@ -1207,7 +1207,7 @@ public class ActionScript3Parser { StringAVM2Item stringItem = ((StringAVM2Item) rets.get(rets.size() - 1)); stringItem.setValue(stringItem.getValue() + sb.toString()); } else { - rets.add(new StringAVM2Item(null, sb.toString())); + rets.add(new StringAVM2Item(null, null, sb.toString())); } sb.setLength(0); } @@ -1238,7 +1238,7 @@ public class ActionScript3Parser { usesVars.setVal(true); sb.append("\""); addS(rets, sb); - rets.add(new EscapeXAttrAVM2Item(null, expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables))); + rets.add(new EscapeXAttrAVM2Item(null, null, expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables))); sb.append("\""); expectedType(SymbolType.CURLY_CLOSE); lexer.yybegin(ActionScriptLexer.XMLOPENTAG); @@ -1256,7 +1256,7 @@ public class ActionScript3Parser { usesVars.setVal(true); sb.append("\""); addS(rets, sb); - rets.add(new EscapeXAttrAVM2Item(null, expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables))); + rets.add(new EscapeXAttrAVM2Item(null, null, expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables))); sb.append("\""); expectedType(SymbolType.CURLY_CLOSE); lexer.yybegin(ActionScriptLexer.XMLOPENTAG); @@ -1264,7 +1264,7 @@ public class ActionScript3Parser { case XML_VAR_BEGIN: //esc_xelem usesVars.setVal(true); addS(rets, sb); - rets.add(new EscapeXElemAVM2Item(null, expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables))); + rets.add(new EscapeXElemAVM2Item(null, null, expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables))); expectedType(SymbolType.CURLY_CLOSE); lexer.yybegin(ActionScriptLexer.XML); break; @@ -1387,7 +1387,7 @@ public class ActionScript3Parser { expectedType(SymbolType.NAMESPACE); expectedType(SymbolType.ASSIGN); GraphTargetItem ns = expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables); - ret = new DefaultXMLNamespace(null, ns); + ret = new DefaultXMLNamespace(null, null, ns); //TODO: use dxns for attribute namespaces instead of dxnslate } } @@ -1418,7 +1418,7 @@ public class ActionScript3Parser { } } expectedType(SymbolType.CURLY_CLOSE); - ret = new WithAVM2Item(null, wvar, wcmd); + ret = new WithAVM2Item(null, null, wvar, wcmd); ((WithAVM2Item) ret).subvariables = withVars; break; /*case DELETE: @@ -1428,10 +1428,10 @@ public class ActionScript3Parser { } if (varDel instanceof GetPropertyAVM2Item) { GetPropertyAVM2Item gm = (GetPropertyAVM2Item) varDel; - ret = new DeletePropertyAVM2Item(null, gm.object, gm.propertyName); + ret = new DeletePropertyAVM2Item(null, null, gm.object, gm.propertyName); } else if (varDel instanceof NameAVM2Item) { variables.remove(varDel); - ret = new DeletePropertyAVM2Item(null, null, (NameAVM2Item) varDel); + ret = new DeletePropertyAVM2Item(null, null, null, (NameAVM2Item) varDel); } else { throw new ParseException("Not a property", lexer.yyline()); } @@ -1466,7 +1466,7 @@ public class ActionScript3Parser { } break; case CURLY_OPEN: - ret = new BlockItem(null, commands(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, loops, loopLabels, registerVars, inFunction, inMethod, forinlevel, variables)); + ret = new BlockItem(null, null, commands(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, loops, loopLabels, registerVars, inFunction, inMethod, forinlevel, variables)); expectedType(SymbolType.CURLY_CLOSE); break; /*case INCREMENT: //preincrement @@ -1476,16 +1476,16 @@ public class ActionScript3Parser { throw new ParseException("Not a property or name", lexer.yyline()); } if (s.type == SymbolType.INCREMENT) { - ret = new PreIncrementAVM2Item(null, varincdec); + ret = new PreIncrementAVM2Item(null, null, varincdec); } else if (s.type == SymbolType.DECREMENT) { - ret = new PreDecrementAVM2Item(null, varincdec); + ret = new PreDecrementAVM2Item(null, null, varincdec); } break;*/ case SUPER: //constructor call ParsedSymbol ss2 = lex(); if (ss2.type == SymbolType.PARENT_OPEN) { List args = call(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, variables); - ret = new ConstructSuperAVM2Item(null, new LocalRegAVM2Item(null, 0, null), args); + ret = new ConstructSuperAVM2Item(null, null, new LocalRegAVM2Item(null, null, 0, null), args); } else {//no costructor call, but it could be calling parent methods... => handle in expression lexer.pushback(ss2); lexer.pushback(s); @@ -1506,7 +1506,7 @@ public class ActionScript3Parser { } else { lexer.pushback(s); } - ret = new IfItem(null, ifExpr, onTrueList, onFalseList); + ret = new IfItem(null, null, ifExpr, onTrueList, onFalseList); break; case WHILE: expectedType(SymbolType.PARENT_OPEN); @@ -1520,7 +1520,7 @@ public class ActionScript3Parser { } loops.push(wloop); whileBody.add(command(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, loops, loopLabels, registerVars, inFunction, inMethod, forinlevel, true, variables)); - ret = new WhileItem(null, wloop, whileExpr, whileBody); + ret = new WhileItem(null, null, wloop, whileExpr, whileBody); break; case DO: List doBody = new ArrayList<>(); @@ -1535,7 +1535,7 @@ public class ActionScript3Parser { List doExpr = new ArrayList<>(); doExpr.add(commaExpression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, loops, loopLabels, registerVars, inFunction, inMethod, forinlevel, variables)); expectedType(SymbolType.PARENT_CLOSE); - ret = new DoWhileItem(null, dloop, doBody, doExpr); + ret = new DoWhileItem(null, null, dloop, doBody, doExpr); break; case FOR: s = lex(); @@ -1596,13 +1596,13 @@ public class ActionScript3Parser { forBody.add(command(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, loops, loopLabels, registerVars, inFunction, inMethod, forin ? forinlevel + 1 : forinlevel, true, variables)); if (forin) { if (each) { - ret = new ForEachInAVM2Item(null, floop, inexpr, forBody); + ret = new ForEachInAVM2Item(null, null, floop, inexpr, forBody); } else { - ret = new ForInAVM2Item(null, floop, inexpr, forBody); + ret = new ForInAVM2Item(null, null, floop, inexpr, forBody); } } else { - ret = new ForItem(null, floop, forFirstCommands, forExpr, forFinalCommands, forBody); + ret = new ForItem(null, null, floop, forFirstCommands, forExpr, forFinalCommands, forBody); } break; case SWITCH: @@ -1651,7 +1651,7 @@ public class ActionScript3Parser { s = lexer.lex(); } expected(s, lexer.yyline(), SymbolType.CURLY_CLOSE); - ret = new SwitchItem(null, sloop, switchExpr, caseExprsAll, caseCmds, defCmd, valueMapping); + ret = new SwitchItem(null, null, sloop, switchExpr, caseExprsAll, caseCmds, defCmd, valueMapping); break; case BREAK: s = lex(); @@ -1674,7 +1674,7 @@ public class ActionScript3Parser { lexer.pushback(s); bloopId = loops.peek().id; } - ret = new BreakItem(null, bloopId); + ret = new BreakItem(null, null, bloopId); break; case CONTINUE: s = lex(); @@ -1709,14 +1709,14 @@ public class ActionScript3Parser { } } //TODO: handle switch - ret = new ContinueItem(null, cloopId); + ret = new ContinueItem(null, null, cloopId); break; case RETURN: GraphTargetItem retexpr = expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, true, registerVars, inFunction, inMethod, true, variables); if (retexpr == null) { - ret = new ReturnVoidAVM2Item(null); + ret = new ReturnVoidAVM2Item(null, null); } else { - ret = new ReturnValueAVM2Item(null, retexpr); + ret = new ReturnValueAVM2Item(null, null, retexpr); } break; case TRY: @@ -1805,7 +1805,7 @@ public class ActionScript3Parser { ret = tai; break; case THROW: - ret = new ThrowAVM2Item(null, expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables)); + ret = new ThrowAVM2Item(null, null, expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables)); break; default: GraphTargetItem valcmd = expressionCommands(s, registerVars, inFunction, inMethod, forinlevel, variables); @@ -1917,7 +1917,7 @@ public class ActionScript3Parser { throw new AVM2ParseException("Expression expected", lexer.yyline()); } } - return new CommaExpressionItem(null, expr); + return new CommaExpressionItem(null, null, expr); } private GraphTargetItem expression(List> allOpenedNamespaces, TypeItem thisType, NamespaceItem pkg, Reference needsActivation, List importedClasses, List openedNamespaces, boolean allowEmpty, HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder, List variables) throws IOException, AVM2ParseException { @@ -1996,86 +1996,86 @@ public class ActionScript3Parser { case AS: //GraphTargetItem type = type(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, variables); - lhs = new AsTypeAVM2Item(null, lhs, rhs); //??? + lhs = new AsTypeAVM2Item(null, null, lhs, rhs); //??? allowRemainder = false; break; case IN: - lhs = new InAVM2Item(null, lhs, rhs); + lhs = new InAVM2Item(null, null, lhs, rhs); break; case TERNAR: //??? - lhs = new TernarOpItem(null, lhs, mhs, rhs); + lhs = new TernarOpItem(null, null, lhs, mhs, rhs); break; case SHIFT_LEFT: - lhs = new LShiftAVM2Item(null, lhs, rhs); + lhs = new LShiftAVM2Item(null, null, lhs, rhs); break; case SHIFT_RIGHT: - lhs = new RShiftAVM2Item(null, lhs, rhs); + lhs = new RShiftAVM2Item(null, null, lhs, rhs); break; case USHIFT_RIGHT: - lhs = new URShiftAVM2Item(null, lhs, rhs); + lhs = new URShiftAVM2Item(null, null, lhs, rhs); break; case BITAND: - lhs = new BitAndAVM2Item(null, lhs, rhs); + lhs = new BitAndAVM2Item(null, null, lhs, rhs); break; case BITOR: - lhs = new BitOrAVM2Item(null, lhs, rhs); + lhs = new BitOrAVM2Item(null, null, lhs, rhs); break; case DIVIDE: - lhs = new DivideAVM2Item(null, lhs, rhs); + lhs = new DivideAVM2Item(null, null, lhs, rhs); break; case MODULO: - lhs = new ModuloAVM2Item(null, lhs, rhs); + lhs = new ModuloAVM2Item(null, null, lhs, rhs); break; case EQUALS: - lhs = new EqAVM2Item(null, lhs, rhs); + lhs = new EqAVM2Item(null, null, lhs, rhs); break; case STRICT_EQUALS: - lhs = new StrictEqAVM2Item(null, lhs, rhs); + lhs = new StrictEqAVM2Item(null, null, lhs, rhs); break; case NOT_EQUAL: - lhs = new NeqAVM2Item(null, lhs, rhs); + lhs = new NeqAVM2Item(null, null, lhs, rhs); break; case STRICT_NOT_EQUAL: - lhs = new StrictNeqAVM2Item(null, lhs, rhs); + lhs = new StrictNeqAVM2Item(null, null, lhs, rhs); break; case LOWER_THAN: - lhs = new LtAVM2Item(null, lhs, rhs); + lhs = new LtAVM2Item(null, null, lhs, rhs); break; case LOWER_EQUAL: - lhs = new LeAVM2Item(null, lhs, rhs); + lhs = new LeAVM2Item(null, null, lhs, rhs); break; case GREATER_THAN: - lhs = new GtAVM2Item(null, lhs, rhs); + lhs = new GtAVM2Item(null, null, lhs, rhs); break; case GREATER_EQUAL: - lhs = new GeAVM2Item(null, lhs, rhs); + lhs = new GeAVM2Item(null, null, lhs, rhs); break; case AND: - lhs = new AndItem(null, lhs, rhs); + lhs = new AndItem(null, null, lhs, rhs); break; case OR: - lhs = new OrItem(null, lhs, rhs); + lhs = new OrItem(null, null, lhs, rhs); break; case MINUS: - lhs = new SubtractAVM2Item(null, lhs, rhs); + lhs = new SubtractAVM2Item(null, null, lhs, rhs); break; case MULTIPLY: - lhs = new MultiplyAVM2Item(null, lhs, rhs); + lhs = new MultiplyAVM2Item(null, null, lhs, rhs); break; case PLUS: - lhs = new AddAVM2Item(null, lhs, rhs); + lhs = new AddAVM2Item(null, null, lhs, rhs); break; case XOR: - lhs = new BitXorAVM2Item(null, lhs, rhs); + lhs = new BitXorAVM2Item(null, null, lhs, rhs); break; case INSTANCEOF: - lhs = new InstanceOfAVM2Item(null, lhs, rhs); + lhs = new InstanceOfAVM2Item(null, null, lhs, rhs); break; case IS: GraphTargetItem istype = rhs;//type(allOpenedNamespaces, thisType,pkg,needsActivation, importedClasses, openedNamespaces, variables); - lhs = new IsTypeAVM2Item(null, lhs, istype); + lhs = new IsTypeAVM2Item(null, null, lhs, istype); break; case ASSIGN: case ASSIGN_BITAND: @@ -2095,37 +2095,37 @@ public class ActionScript3Parser { //assigned = assigned; break; case ASSIGN_BITAND: - assigned = new BitAndAVM2Item(null, lhs, assigned); + assigned = new BitAndAVM2Item(null, null, lhs, assigned); break; case ASSIGN_BITOR: - assigned = new BitOrAVM2Item(null, lhs, assigned); + assigned = new BitOrAVM2Item(null, null, lhs, assigned); break; case ASSIGN_DIVIDE: - assigned = new DivideAVM2Item(null, lhs, assigned); + assigned = new DivideAVM2Item(null, null, lhs, assigned); break; case ASSIGN_MINUS: - assigned = new SubtractAVM2Item(null, lhs, assigned); + assigned = new SubtractAVM2Item(null, null, lhs, assigned); break; case ASSIGN_MODULO: - assigned = new ModuloAVM2Item(null, lhs, assigned); + assigned = new ModuloAVM2Item(null, null, lhs, assigned); break; case ASSIGN_MULTIPLY: - assigned = new MultiplyAVM2Item(null, lhs, assigned); + assigned = new MultiplyAVM2Item(null, null, lhs, assigned); break; case ASSIGN_PLUS: - assigned = new AddAVM2Item(null, lhs, assigned); + assigned = new AddAVM2Item(null, null, lhs, assigned); break; case ASSIGN_SHIFT_LEFT: - assigned = new LShiftAVM2Item(null, lhs, assigned); + assigned = new LShiftAVM2Item(null, null, lhs, assigned); break; case ASSIGN_SHIFT_RIGHT: - assigned = new RShiftAVM2Item(null, lhs, assigned); + assigned = new RShiftAVM2Item(null, null, lhs, assigned); break; case ASSIGN_USHIFT_RIGHT: - assigned = new URShiftAVM2Item(null, lhs, assigned); + assigned = new URShiftAVM2Item(null, null, lhs, assigned); break; case ASSIGN_XOR: - assigned = new BitXorAVM2Item(null, lhs, assigned); + assigned = new BitXorAVM2Item(null, null, lhs, assigned); break; } @@ -2153,7 +2153,7 @@ public class ActionScript3Parser { if (lhs instanceof ParenthesisItem) { GraphTargetItem coerced = expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, allowRemainder, variables); if (coerced != null && isType(((ParenthesisItem) lhs).value)) { - lhs = new CoerceAVM2Item(null, ((ParenthesisItem) lhs).value, coerced); + lhs = new CoerceAVM2Item(null, null, ((ParenthesisItem) lhs).value, coerced); } } @@ -2176,21 +2176,21 @@ public class ActionScript3Parser { ret = xml(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, variables); break; case STRING: - ret = new StringAVM2Item(null, s.value.toString()); + ret = new StringAVM2Item(null, null, s.value.toString()); allowMemberOrCall = true; break; case NEGATE: ret = expressionPrimary(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, false, registerVars, inFunction, inMethod, false, variables); - ret = new NegAVM2Item(null, ret); + ret = new NegAVM2Item(null, null, ret); break; case MINUS: s = lex(); if (s.isType(SymbolType.DOUBLE)) { - ret = new FloatValueAVM2Item(null, -(Double) s.value); + ret = new FloatValueAVM2Item(null, null, -(Double) s.value); } else if (s.isType(SymbolType.INTEGER)) { - ret = new IntegerValueAVM2Item(null, -(Long) s.value); + ret = new IntegerValueAVM2Item(null, null, -(Long) s.value); } else { lexer.pushback(s); @@ -2207,26 +2207,26 @@ public class ActionScript3Parser { } ret = (num); } else { - ret = (new SubtractAVM2Item(null, new IntegerValueAVM2Item(null, 0L), num)); + ret = (new SubtractAVM2Item(null, null, new IntegerValueAVM2Item(null, null, 0L), num)); } } break; case TYPEOF: - ret = new TypeOfAVM2Item(null, expressionPrimary(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, false, registerVars, inFunction, inMethod, false, variables)); + ret = new TypeOfAVM2Item(null, null, expressionPrimary(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, false, registerVars, inFunction, inMethod, false, variables)); break; case TRUE: - ret = new BooleanAVM2Item(null, true); + ret = new BooleanAVM2Item(null, null, true); break; case NULL: - ret = new NullAVM2Item(null); + ret = new NullAVM2Item(null, null); break; case UNDEFINED: - ret = new UndefinedAVM2Item(null); + ret = new UndefinedAVM2Item(null, null); break; case FALSE: - ret = new BooleanAVM2Item(null, false); + ret = new BooleanAVM2Item(null, null, false); break; case CURLY_OPEN: //Object literal @@ -2240,7 +2240,7 @@ public class ActionScript3Parser { s = lex(); expected(s, lexer.yyline(), SymbolGroup.IDENTIFIER, SymbolType.STRING, SymbolType.INTEGER, SymbolType.DOUBLE); - GraphTargetItem n = new StringAVM2Item(null, s.value.toString()); + GraphTargetItem n = new StringAVM2Item(null, null, s.value.toString()); //expression(allOpenedNamespaces, thisType,pkg,needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, allowRemainder, variables); expectedType(SymbolType.COLON); GraphTargetItem v = expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, allowRemainder, variables); @@ -2252,14 +2252,14 @@ public class ActionScript3Parser { expected(s, lexer.yyline(), SymbolType.COMMA, SymbolType.CURLY_CLOSE); } } - ret = new NewObjectAVM2Item(null, nvs); + ret = new NewObjectAVM2Item(null, null, nvs); allowMemberOrCall = true; break; case BRACKET_OPEN: //Array literal or just brackets lexer.pushback(s); List inBrackets = new ArrayList<>(); int arrCnt = brackets(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, inBrackets, registerVars, inFunction, inMethod, variables); - ret = new NewArrayAVM2Item(null, inBrackets); + ret = new NewArrayAVM2Item(null, null, inBrackets); allowMemberOrCall = true; break; @@ -2276,19 +2276,19 @@ public class ActionScript3Parser { allowMemberOrCall = true; break; case NAN: - ret = new NanAVM2Item(null); + ret = new NanAVM2Item(null, null); break; case INFINITY: - ret = new FloatValueAVM2Item(null, Double.POSITIVE_INFINITY); + ret = new FloatValueAVM2Item(null, null, Double.POSITIVE_INFINITY); break; case INTEGER: - ret = new IntegerValueAVM2Item(null, (Long) s.value); + ret = new IntegerValueAVM2Item(null, null, (Long) s.value); break; case DOUBLE: - ret = new FloatValueAVM2Item(null, (Double) s.value); + ret = new FloatValueAVM2Item(null, null, (Double) s.value); break; case DELETE: @@ -2305,19 +2305,19 @@ public class ActionScript3Parser { throw new AVM2ParseException("Not a property or name", lexer.yyline()); } if (s.type == SymbolType.INCREMENT) { - ret = new PreIncrementAVM2Item(null, varincdec); + ret = new PreIncrementAVM2Item(null, null, varincdec); } if (s.type == SymbolType.DECREMENT) { - ret = new PreDecrementAVM2Item(null, varincdec); + ret = new PreDecrementAVM2Item(null, null, varincdec); } break; case NOT: - ret = new NotItem(null, expressionPrimary(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, false, registerVars, inFunction, inMethod, false, variables)); + ret = new NotItem(null, null, expressionPrimary(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, false, registerVars, inFunction, inMethod, false, variables)); break; case PARENT_OPEN: - ret = new ParenthesisItem(null, expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables)); + ret = new ParenthesisItem(null, null, expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); if (ret.value == null) { throw new AVM2ParseException("Expression in parenthesis expected", lexer.yyline()); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AssignableAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AssignableAVM2Item.java index 4651c9ec6..fe0dbdf1d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AssignableAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AssignableAVM2Item.java @@ -40,10 +40,10 @@ public abstract class AssignableAVM2Item extends AVM2Item { protected GraphTargetItem makeCoerced(GraphTargetItem assignedValue, GraphTargetItem targetType) { if (assignedValue instanceof OrItem) { OrItem oi = (OrItem) assignedValue; - return new OrItem(assignedValue.getSrc(), makeCoerced(oi.leftSide, targetType), makeCoerced(oi.rightSide, targetType)); + return new OrItem(assignedValue.getSrc(), assignedValue.getLineStartItem(), makeCoerced(oi.leftSide, targetType), makeCoerced(oi.rightSide, targetType)); } //TODO: Is it needed for AndItem too? - return new CoerceAVM2Item(null, assignedValue, targetType); + return new CoerceAVM2Item(null, null, assignedValue, targetType); } public AssignableAVM2Item() { @@ -53,7 +53,7 @@ public abstract class AssignableAVM2Item extends AVM2Item { public abstract AssignableAVM2Item copy(); public AssignableAVM2Item(GraphTargetItem storeValue) { - super(null, PRECEDENCE_PRIMARY); + super(null, null, PRECEDENCE_PRIMARY); this.assignedValue = storeValue; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java index 131ad3852..19db0690f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java @@ -48,7 +48,7 @@ public class CallAVM2Item extends AVM2Item { public List openedNamespaces; public CallAVM2Item(List openedNamespaces, int line, GraphTargetItem name, List arguments) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.openedNamespaces = openedNamespaces; this.name = name; this.arguments = arguments; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ClassAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ClassAVM2Item.java index 514c87ec1..f44ed9a7f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ClassAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ClassAVM2Item.java @@ -72,7 +72,7 @@ public class ClassAVM2Item extends AVM2Item implements Block { } public ClassAVM2Item(List>> metadata, List importedClasses, NamespaceItem pkg, List openedNamespaces, boolean isFinal, boolean isDynamic, String className, GraphTargetItem extendsOp, List implementsOp, List cinit, boolean staticInitActivation, List cinitVariables, GraphTargetItem iinit, List iinitVariables, List traits, boolean iinitActivation) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.metadata = metadata; this.importedClasses = importedClasses; this.pkg = pkg; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java index 5c90938fb..07d43f56c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java @@ -50,7 +50,7 @@ public class ConstAVM2Item extends AVM2Item { public ConstAVM2Item(List>> metadata, NamespaceItem pkg, String customNamespace, boolean isStatic, String var, GraphTargetItem type, GraphTargetItem value, int line) { - super(null, NOPRECEDENCE, value); + super(null, null, NOPRECEDENCE, value); this.metadata = metadata; this.pkg = pkg; this.line = line; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FunctionAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FunctionAVM2Item.java index 35d9678da..86fe471bd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FunctionAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FunctionAVM2Item.java @@ -65,7 +65,7 @@ public class FunctionAVM2Item extends AVM2Item { public FunctionAVM2Item(List>> metadata, NamespaceItem pkg, boolean isInterface, boolean needsActivation, boolean hasRest, int line, String functionName, List paramTypes, List paramNames, List paramValues, List body, List subvariables, GraphTargetItem retType) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.metadata = metadata; this.pkg = pkg; this.needsActivation = needsActivation; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/InterfaceAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/InterfaceAVM2Item.java index 760a4e9e9..c9c8e7097 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/InterfaceAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/InterfaceAVM2Item.java @@ -48,7 +48,7 @@ public class InterfaceAVM2Item extends AVM2Item { public List>> metadata; public InterfaceAVM2Item(List>> metadata, List importedClasses, NamespaceItem pkg, List openedNamespaces, boolean isFinal, String name, List superInterfaces, List traits) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.metadata = metadata; this.importedClasses = importedClasses; this.pkg = pkg; 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 9a6736dd5..3cb0d2c78 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 @@ -153,13 +153,13 @@ public class NameAVM2Item extends AssignableAVM2Item { public static GraphTargetItem getDefaultValue(String type) { switch (type) { case "*": - return new UndefinedAVM2Item(null); + return new UndefinedAVM2Item(null, null); case "int": - return new IntegerValueAVM2Item(null, 0L); + return new IntegerValueAVM2Item(null, null, 0L); case "Number": - return new NanAVM2Item(null); + return new NanAVM2Item(null, null); default: - return new NullAVM2Item(null); + return new NullAVM2Item(null, null); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PackageAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PackageAVM2Item.java index 16382c122..3d776f018 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PackageAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PackageAVM2Item.java @@ -38,7 +38,7 @@ public class PackageAVM2Item extends AVM2Item { public List importedClasses = new ArrayList<>(); public PackageAVM2Item(List importedClasses, DottedChain packageName, List items) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.importedClasses = importedClasses; this.items = items; this.packageName = packageName; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java index 3dadf5dbb..b6d561676 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java @@ -104,7 +104,7 @@ public class PropertyAVM2Item extends AssignableAVM2Item { for (int pm : m.params) { params.add(multinameToType(pm, constants)); } - return new ApplyTypeAVM2Item(null, obj, params); + return new ApplyTypeAVM2Item(null, null, obj, params); } else { return new TypeItem(m.getNameWithNamespace(constants)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SlotAVM2Item.java index 1a5b7e28e..402036542 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SlotAVM2Item.java @@ -49,7 +49,7 @@ public class SlotAVM2Item extends AVM2Item { } public SlotAVM2Item(List>> metadata, NamespaceItem pkg, String customNamespace, boolean isStatic, String var, GraphTargetItem type, GraphTargetItem value, int line) { - super(null, NOPRECEDENCE, value); + super(null, null, NOPRECEDENCE, value); this.metadata = metadata; this.pkg = pkg; this.line = line; 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 8f6e9247d..1dc62975a 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 @@ -184,13 +184,13 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item { public static GraphTargetItem getDefaultValue(String type) { switch (type) { case "*": - return new UndefinedAVM2Item(null); + return new UndefinedAVM2Item(null, null); case "int": - return new IntegerValueAVM2Item(null, 0L); + return new IntegerValueAVM2Item(null, null, 0L); case "Number": - return new NanAVM2Item(null); + return new NanAVM2Item(null, null); default: - return new NullAVM2Item(null); + return new NullAVM2Item(null, null); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLAVM2Item.java index db2cbe8c0..feb442baf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLAVM2Item.java @@ -39,7 +39,7 @@ import java.util.List; public class XMLAVM2Item extends AVM2Item { public XMLAVM2Item(GraphTargetItem value) { - super(null, PRECEDENCE_PRIMARY, value); + super(null, null, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLFilterAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLFilterAVM2Item.java index 202de0b77..d7a6a3b59 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLFilterAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLFilterAVM2Item.java @@ -39,7 +39,7 @@ public class XMLFilterAVM2Item extends AVM2Item { public GraphTargetItem object; public XMLFilterAVM2Item(GraphTargetItem object, GraphTargetItem value, List openedNamespaces) { - super(null, NOPRECEDENCE, value); + super(null, null, NOPRECEDENCE, value); this.openedNamespaces = openedNamespaces; this.object = object; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java index b389ab2f5..80c1836e0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java @@ -318,8 +318,9 @@ public class MethodInfo { HighlightData pdata = new HighlightData(); pdata.declaration = true; pdata.declaredType = ptype; + pdata.regIndex = i + 1; if (!localRegNames.isEmpty()) { - pdata.localName = localRegNames.get(i + 1); //assuming it is a slot + pdata.localName = localRegNames.get(i + 1); //assuming it is a slot writer.hilightSpecial(IdentifiersDeobfuscation.printIdentifier(true, localRegNames.get(i + 1)), HighlightSpecialType.PARAM_NAME, i, pdata); } else if ((paramNames.length > i) && (paramNames[i] != 0) && Configuration.paramNamesEnable.get()) { pdata.localName = constants.getString(paramNames[i]); @@ -358,6 +359,7 @@ public class MethodInfo { HighlightData pdata = new HighlightData(); pdata.declaration = true; pdata.declaredType = DottedChain.ALL; + pdata.regIndex = param_types.length + 1; pdata.localName = restName; writer.append(restAdd); writer.hilightSpecial(restName, HighlightSpecialType.FLAG_NEED_REST, 0, pdata); 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 65a4b7c23..b87cd8a81 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 @@ -589,7 +589,7 @@ public abstract class Action implements GraphSourceItem { } else { if (lastPush) { writer.newLine(); - lastPush = false; + //lastPush = false; } writer.append("", offset); @@ -623,11 +623,7 @@ public abstract class Action implements GraphSourceItem { writer.newLine(); } } - if (a instanceof ActionPush) { - lastPush = true; - } else { - lastPush = false; - } + lastPush = a instanceof ActionPush; //} } @@ -706,6 +702,7 @@ public abstract class Action implements GraphSourceItem { /** * Translates this function to stack and output. * + * @param lineStartIns Line start instruction * @param stack Stack * @param output Output * @param regNames Register names @@ -715,7 +712,7 @@ public abstract class Action implements GraphSourceItem { * @param path the value of path * @throws java.lang.InterruptedException */ - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) throws InterruptedException { + public void translate(GraphSourceItem lineStartIns, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) throws InterruptedException { } @Override @@ -899,7 +896,7 @@ public abstract class Action implements GraphSourceItem { } expectedSize += getStackPushCount(localData, stack);*/ - translate(stack, output, aLocalData.regNames, aLocalData.variables, aLocalData.functions, staticOperation, path); + translate(aLocalData.lineStartAction, stack, output, aLocalData.regNames, aLocalData.variables, aLocalData.functions, staticOperation, path); /*if (stack.size() != expectedSize && !(this instanceof ActionPushDuplicate)) { throw new Error("HONFIKA stack size mismatch"); }*/ @@ -1015,7 +1012,8 @@ public abstract class Action implements GraphSourceItem { outs.add(out); endAddr += size; } - ((GraphSourceItemContainer) action).translateContainer(outs, stack, output, registerNames, variables, functions); + + ((GraphSourceItemContainer) action).translateContainer(outs, action, stack, output, registerNames, variables, functions); ip = adr2ip(actions, endAddr); continue; } @@ -1153,7 +1151,7 @@ public abstract class Action implements GraphSourceItem { if (v.name instanceof DirectValueActionItem) { if (((DirectValueActionItem) v.name).value instanceof String) { if (((DirectValueActionItem) v.name).value.equals("_global")) { - GetVariableActionItem gvt = new GetVariableActionItem(null, ((GetMemberActionItem) t).memberName); + GetVariableActionItem gvt = new GetVariableActionItem(null, null, ((GetMemberActionItem) t).memberName); if (lastMember == null) { return gvt; } else { @@ -1280,7 +1278,7 @@ public abstract class Action implements GraphSourceItem { ImplementsOpActionItem iot = (ImplementsOpActionItem) parts.get(1); implementsOp = iot.superclasses; } else { - ok = false; + //ok = false; break; } } @@ -1296,7 +1294,7 @@ public abstract class Action implements GraphSourceItem { } } } else { - ok = false; + //ok = false; } } else { ok = false; @@ -1383,15 +1381,15 @@ public abstract class Action implements GraphSourceItem { } if (ret instanceof GetVariableActionItem) { GetVariableActionItem gv = (GetVariableActionItem) ret; - ret = new SetVariableActionItem(null, gv.name, value); + ret = new SetVariableActionItem(null, null, gv.name, value); } else if (ret instanceof GetMemberActionItem) { GetMemberActionItem mem = (GetMemberActionItem) ret; - ret = new SetMemberActionItem(null, mem.object, mem.memberName, value); + ret = new SetMemberActionItem(null, null, mem.object, mem.memberName, value); } else if ((ret instanceof DirectValueActionItem) && ((DirectValueActionItem) ret).value instanceof RegisterNumber) { - ret = new StoreRegisterActionItem(null, (RegisterNumber) ((DirectValueActionItem) ret).value, value, false); + ret = new StoreRegisterActionItem(null, null, (RegisterNumber) ((DirectValueActionItem) ret).value, value, false); } else if (ret instanceof GetPropertyActionItem) { GetPropertyActionItem gp = (GetPropertyActionItem) ret; - ret = new SetPropertyActionItem(null, gp.target, gp.propertyIndex, value); + ret = new SetPropertyActionItem(null, null, gp.target, gp.propertyIndex, value); } if (boxed) { GraphTargetItem b = ret; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java index 2ae244172..a826c769c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java @@ -121,7 +121,7 @@ public class ActionGraph extends Graph { break; } } else { - target = new DirectValueActionItem(null, 0, st.target, new ArrayList<>()); + target = new DirectValueActionItem(null, null, 0, st.target, new ArrayList<>()); targetStart = t; targetStartItem = it; } @@ -140,7 +140,7 @@ public class ActionGraph extends Graph { } } } - if ((targetStart > -1) && (targetEnd > -1)) { + if ((targetStart > -1) && (targetEnd > -1) && targetStartItem != null) { List newlist = new ArrayList<>(); for (int i = 0; i < targetStart; i++) { newlist.add(list.get(i)); @@ -149,7 +149,7 @@ public class ActionGraph extends Graph { for (int i = targetStart + 1; i < targetEnd; i++) { tellist.add(list.get(i)); } - newlist.add(new TellTargetActionItem(targetStartItem.getSrc(), target, tellist)); + newlist.add(new TellTargetActionItem(targetStartItem.getSrc(), targetStartItem.getLineStartItem(), target, tellist)); for (int i = targetEnd + 1; i < list.size(); i++) { newlist.add(list.get(i)); } @@ -174,7 +174,7 @@ public class ActionGraph extends Graph { EnumerateActionItem eti = (EnumerateActionItem) en; list.remove(t); wi.commands.remove(0); - list.add(t, new ForInActionItem(null, wi.loop, sti.getObject(), eti.object, wi.commands)); + list.add(t, new ForInActionItem(null, null, wi.loop, sti.getObject(), eti.object, wi.commands)); list.remove(t - 1); t--; } @@ -207,7 +207,7 @@ public class ActionGraph extends Graph { } if (!storeRegisters.isEmpty()) { List caseBodies = new ArrayList<>(); - boolean proceed = false; + boolean proceed; do { proceed = false; caseBodies.add(part.nextParts.get(0)); //jump @@ -260,6 +260,7 @@ public class ActionGraph extends Graph { } List ret = null; if ((part.nextParts.size() == 2) && (!stack.isEmpty()) && (stack.peek() instanceof StrictEqActionItem)) { + GraphSourceItem switchStartItem = code.get(part.start); GraphTargetItem switchedObject = null; if (!output.isEmpty()) { @@ -268,7 +269,7 @@ public class ActionGraph extends Graph { } } if (switchedObject == null) { - switchedObject = new DirectValueActionItem(null, -1, Null.INSTANCE, null); + switchedObject = new DirectValueActionItem(null, null, -1, Null.INSTANCE, null); } HashMap caseValuesMap = new HashMap<>(); @@ -309,18 +310,17 @@ public class ActionGraph extends Graph { GraphPart defaultPart2 = getCommonPart(localData, defaultAndLastPart, loops);//34-37 - List defaultCommands = new ArrayList<>(); + List defaultCommands;//= new ArrayList<>(); List stopPart2 = new ArrayList<>(stopPart); stopPart2.add(defaultPart2); defaultCommands = printGraph(partCodes, partCodePos, localData, stack, allParts, null, defaultPart, stopPart2, loops, staticOperation, path); - List loopContinues = new ArrayList<>(); - for (Loop l : loops) { - if (l.loopContinue != null) { - loopContinues.add(l.loopContinue); - } - } - + /*List loopContinues = new ArrayList<>(); + for (Loop l : loops) { + if (l.loopContinue != null) { + loopContinues.add(l.loopContinue); + } + }*/ List breakParts = new ArrayList<>(); /*for (int g = 0; g < caseBodyParts.size(); g++) { if (g < caseBodyParts.size() - 1) { @@ -355,13 +355,11 @@ public class ActionGraph extends Graph { for (int i = 0; i < caseBodyParts.size(); i++) { if (caseValuesMap.containsKey(i)) { caseValues.add(caseValuesMap.get(i)); - } else { - continue; } } List> caseCommands = new ArrayList<>(); - GraphPart next = null; + GraphPart next; next = breakPart; @@ -398,11 +396,10 @@ public class ActionGraph extends Graph { } } - List ignored = new ArrayList<>(); - for (Loop l : loops) { - ignored.add(l.loopContinue); - } - + /*List ignored = new ArrayList<>(); + for (Loop l : loops) { + ignored.add(l.loopContinue); + }*/ for (int i = 0; i < caseBodies.size(); i++) { List cc = new ArrayList<>(); GraphPart nextCase = null; @@ -410,13 +407,13 @@ public class ActionGraph extends Graph { if (next != null) { if (i < caseBodies.size() - 1) { if (!caseBodies.get(i).leadsTo(localData, this, code, caseBodies.get(i + 1), loops)) { - cc.add(new BreakItem(null, currentLoop.id)); + cc.add(new BreakItem(null, localData.lineStartInstruction, currentLoop.id)); } else { nextCase = caseBodies.get(i + 1); } } else if (!defaultCommands.isEmpty()) { if (!caseBodies.get(i).leadsTo(localData, this, code, defaultPart, loops)) { - cc.add(new BreakItem(null, currentLoop.id)); + cc.add(new BreakItem(null, localData.lineStartInstruction, currentLoop.id)); } else { nextCase = defaultPart; } @@ -447,7 +444,7 @@ public class ActionGraph extends Graph { } ret = new ArrayList<>(); ret.addAll(output); - SwitchItem sti = new SwitchItem(null, currentLoop, switchedObject, caseValues, caseCommands, defaultCommands, valuesMapping); + SwitchItem sti = new SwitchItem(null, switchStartItem, currentLoop, switchedObject, caseValues, caseCommands, defaultCommands, valuesMapping); ret.add(sti); currentLoop.phase = 2; if (next != null) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java index 88de6e40e..6736501de 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java @@ -17,6 +17,7 @@ package com.jpexs.decompiler.flash.action; import com.jpexs.decompiler.flash.BaseLocalData; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.Reference; import com.jpexs.decompiler.graph.GraphPart; import com.jpexs.decompiler.graph.GraphSource; import com.jpexs.decompiler.graph.GraphSourceItem; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionListReader.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionListReader.java index 875a85787..09477c455 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionListReader.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionListReader.java @@ -40,6 +40,7 @@ import com.jpexs.decompiler.flash.ecma.Null; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; import com.jpexs.decompiler.flash.helpers.SWFDecompilerPlugin; import com.jpexs.decompiler.graph.Graph; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphSourceItemContainer; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.NotCompileTimeItem; @@ -594,9 +595,8 @@ public class ActionListReader { /** * Removes multiple actions from the action list, and updates all references - * This - * method will keep the inner actions of the container when you remove the - * container + * This method will keep the inner actions of the container when you remove + * the container * * @param actions * @param actionsToRemove @@ -1120,10 +1120,10 @@ public class ActionListReader { } else if (!(a instanceof GraphSourceItemContainer)) { //return in for..in, TODO:Handle this better way if (((a instanceof ActionEquals) || (a instanceof ActionEquals2)) && (stack.size() == 1) && (stack.peek() instanceof DirectValueActionItem)) { - stack.push(new DirectValueActionItem(null, 0, Null.INSTANCE, new ArrayList<>())); + stack.push(new DirectValueActionItem(null, null, 0, Null.INSTANCE, new ArrayList<>())); } if ((a instanceof ActionStoreRegister) && stack.isEmpty()) { - stack.push(new DirectValueActionItem(null, 0, Null.INSTANCE, new ArrayList<>())); + stack.push(new DirectValueActionItem(null, null, 0, Null.INSTANCE, new ArrayList<>())); } a.translate(localData, stack, output, Graph.SOP_USE_STATIC/*Graph.SOP_SKIP_STATIC*/, path); } @@ -1136,7 +1136,7 @@ public class ActionListReader { if (varname != null) { GraphTargetItem varval = vars.get(varname); if (varval != null && varval.isCompileTime() && indeterminate) { - vars.put(varname, new NotCompileTimeItem(null, varval)); + vars.put(varname, new NotCompileTimeItem(null, null, varval)); } } } @@ -1166,7 +1166,11 @@ public class ActionListReader { output2s.add(output2); endAddr += size; } - cnt.translateContainer(output2s, stack, output, localData.regNames, localData.variables, localData.functions); + GraphSourceItem lineStartItem = null; + if (cnt instanceof GraphSourceItem) { + lineStartItem = (GraphSourceItem) cnt; + } + cnt.translateContainer(output2s, lineStartItem, stack, output, localData.regNames, localData.variables, localData.functions); ip = (int) endAddr; continue; } @@ -1175,7 +1179,7 @@ public class ActionListReader { if (a instanceof ActionEnd) { break; } - if (goaif) { + if (goaif && aif != null) { aif.ignoreUsed = true; aif.jumpUsed = true; indeterminate = true; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionLocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionLocalData.java index 52640b0e1..781a2e901 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionLocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionLocalData.java @@ -17,6 +17,7 @@ package com.jpexs.decompiler.flash.action; import com.jpexs.decompiler.flash.BaseLocalData; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import java.util.HashMap; @@ -32,6 +33,8 @@ public class ActionLocalData extends BaseLocalData { public final HashMap functions; + public GraphSourceItem lineStartAction; + public ActionLocalData() { regNames = new HashMap<>(); variables = new HashMap<>(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java index 2e4dbbf09..5fdf07fb9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.action.flashlite; import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.FSCommand2ActionItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.ArrayList; @@ -37,14 +38,14 @@ public class ActionFSCommand2 extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartItem, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { long numArgs = popLong(stack); GraphTargetItem command = stack.pop(); List args = new ArrayList<>(); for (long l = 0; l < numArgs; l++) { args.add(stack.pop()); } - stack.push(new FSCommand2ActionItem(this, command, args)); + stack.push(new FSCommand2ActionItem(this, lineStartItem, command, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java index ac2aa636a..5f6717f21 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.StrictModeActionItem; import com.jpexs.decompiler.flash.action.parser.ActionParseException; import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.io.IOException; @@ -63,7 +64,7 @@ public class ActionStrictMode extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { - output.add(new StrictModeActionItem(this, mode)); + public void translate(GraphSourceItem lineStartItem, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + output.add(new StrictModeActionItem(this, lineStartItem, mode)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ActionItem.java index 3e7296ef2..7d3484f74 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ActionItem.java @@ -33,15 +33,15 @@ import java.util.List; public abstract class ActionItem extends GraphTargetItem implements Serializable { public ActionItem() { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); } - public ActionItem(GraphSourceItem instruction, int precedence) { - super(instruction, precedence); + public ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, int precedence) { + this(instruction, lineStartIns, precedence, null); } - public ActionItem(GraphSourceItem instruction, int precedence, GraphTargetItem value) { - super(instruction, precedence, value); + public ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, int precedence, GraphTargetItem value) { + super(instruction, lineStartIns, precedence, value); } protected boolean isEmptyString(GraphTargetItem target) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java index 1f86fbbe4..a41df4917 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class AsciiToCharActionItem extends ActionItem { - public AsciiToCharActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public AsciiToCharActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java index d8022f972..642c07559 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class CallActionItem extends ActionItem { - public CallActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public CallActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java index 2c70d733c..60f57a5b5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java @@ -43,8 +43,8 @@ public class CallFunctionActionItem extends ActionItem { return arguments; } - public CallFunctionActionItem(GraphSourceItem instruction, GraphTargetItem functionName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); + public CallFunctionActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem functionName, List arguments) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.functionName = functionName; this.arguments = arguments; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java index 5bf3d0681..b93574c90 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java @@ -46,8 +46,8 @@ public class CallMethodActionItem extends ActionItem { return ret; } - public CallMethodActionItem(GraphSourceItem instruction, GraphTargetItem scriptObject, GraphTargetItem methodName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); + public CallMethodActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scriptObject, GraphTargetItem methodName, List arguments) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.methodName = methodName; this.arguments = arguments; this.scriptObject = scriptObject; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java index 5ee573768..665826efc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java @@ -42,8 +42,8 @@ public class CastOpActionItem extends ActionItem { return ret; } - public CastOpActionItem(GraphSourceItem instruction, GraphTargetItem constructor, GraphTargetItem object) { - super(instruction, PRECEDENCE_PRIMARY); + public CastOpActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem constructor, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.constructor = constructor; this.object = object; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java index ca5db18b1..292000b7b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java @@ -30,8 +30,8 @@ import java.util.Set; public class CharToAsciiActionItem extends ActionItem { - public CharToAsciiActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public CharToAsciiActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java index 0885b0414..e6eba40a0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java @@ -45,8 +45,8 @@ public class CloneSpriteActionItem extends ActionItem { return ret; } - public CloneSpriteActionItem(GraphSourceItem instruction, GraphTargetItem source, GraphTargetItem target, GraphTargetItem depth) { - super(instruction, PRECEDENCE_PRIMARY); + public CloneSpriteActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem source, GraphTargetItem target, GraphTargetItem depth) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.source = source; this.target = target; this.depth = depth; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java index 3e796eb4d..e7b39691b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java @@ -40,8 +40,8 @@ public class DecrementActionItem extends ActionItem { return ret; } - public DecrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_ADDITIVE); + public DecrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_ADDITIVE); this.object = object; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java index 194b921c8..2874c87ef 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java @@ -67,8 +67,8 @@ public class DefineLocalActionItem extends ActionItem implements SetTypeActionIt return value; } - public DefineLocalActionItem(GraphSourceItem instruction, GraphTargetItem name, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public DefineLocalActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem name, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); this.name = name; } @@ -98,7 +98,7 @@ public class DefineLocalActionItem extends ActionItem implements SetTypeActionIt @Override public GraphTargetItem getObject() { - return new DefineLocalActionItem(getSrc(), name, null); + return new DefineLocalActionItem(getSrc(), getLineStartItem(), name, null); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java index e8b49b581..b0649f4cb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java @@ -30,7 +30,7 @@ public class DefineRegisterActionItem extends ActionItem { private final int register; public DefineRegisterActionItem(String identifier, int register) { - super(null, PRECEDENCE_PRIMARY); + super(null, null, PRECEDENCE_PRIMARY); this.identifier = identifier; this.register = register; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java index f69bfebb2..1a02dc1a6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java @@ -43,8 +43,8 @@ public class DeleteActionItem extends ActionItem { return ret; } - public DeleteActionItem(GraphSourceItem instruction, GraphTargetItem object, GraphTargetItem propertyName) { - super(instruction, PRECEDENCE_PRIMARY); + public DeleteActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem propertyName) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.object = object; this.propertyName = propertyName; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java index a35895232..0485d8a6d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java @@ -47,11 +47,11 @@ public class DirectValueActionItem extends ActionItem implements SimpleValue { public final int pos; public DirectValueActionItem(Object o) { - this(null, 0, o, new ArrayList<>()); + this(null, null, 0, o, new ArrayList<>()); } - public DirectValueActionItem(GraphSourceItem instruction, int instructionPos, Object value, List constants) { - super(instruction, PRECEDENCE_PRIMARY); + public DirectValueActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, int instructionPos, Object value, List constants) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.constants = constants; this.value = value; this.pos = instructionPos; @@ -64,10 +64,7 @@ public class DirectValueActionItem extends ActionItem implements SimpleValue { @Override public boolean isVariableComputed() { - if (computedRegValue != null) { - return true; - } - return false; + return (computedRegValue != null); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java index e286e5053..0580ae3ba 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java @@ -35,8 +35,8 @@ public class EnumerateActionItem extends ActionItem { return ret; } - public EnumerateActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_PRIMARY); + public EnumerateActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.object = object; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java index a94f2bd32..8e6f3468f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java @@ -32,8 +32,8 @@ import java.util.List; */ public class EvalActionItem extends ActionItem { - public EvalActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public EvalActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java index 2c31e2380..7e00197cd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java @@ -29,8 +29,8 @@ public class ExtendsActionItem extends ActionItem { public GraphTargetItem superclass; - public ExtendsActionItem(GraphSourceItem instruction, GraphTargetItem subclass, GraphTargetItem superclass) { - super(instruction, PRECEDENCE_PRIMARY); + public ExtendsActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem subclass, GraphTargetItem superclass) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.subclass = subclass; this.superclass = superclass; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java index d3de184cd..147023974 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java @@ -45,8 +45,8 @@ public class FSCommand2ActionItem extends ActionItem { return ret; } - public FSCommand2ActionItem(GraphSourceItem instruction, GraphTargetItem command, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); + public FSCommand2ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem command, List arguments) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.command = command; this.arguments = arguments; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java index 7ed70f0f0..f93d0fac1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java @@ -37,8 +37,8 @@ public class FSCommandActionItem extends ActionItem { private final GraphTargetItem command; - public FSCommandActionItem(GraphSourceItem instruction, GraphTargetItem command) { - super(instruction, PRECEDENCE_PRIMARY); + public FSCommandActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem command) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.command = command; } @@ -57,7 +57,7 @@ public class FSCommandActionItem extends ActionItem { if ((command instanceof DirectValueActionItem) && ((DirectValueActionItem) command).isString()) { return toSourceMerge(localData, generator, new ActionGetURL("FSCommand:" + ((DirectValueActionItem) command).getAsString(), "")); } - return toSourceMerge(localData, generator, new AddActionItem(null, asg.pushConstTargetItem("FSCommand:"), command, true), asg.pushConstTargetItem(""), new ActionGetURL2(1/*GET*/, false, false)); + return toSourceMerge(localData, generator, new AddActionItem(null, null, asg.pushConstTargetItem("FSCommand:"), command, true), asg.pushConstTargetItem(""), new ActionGetURL2(1/*GET*/, false, false)); } @Override 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 388fbc4ea..75a23bc31 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 @@ -76,11 +76,11 @@ public class FunctionActionItem extends ActionItem { } public FunctionActionItem() { - super(null, PRECEDENCE_PRIMARY); + super(null, null, PRECEDENCE_PRIMARY); } - public FunctionActionItem(GraphSourceItem instruction, String functionName, List paramNames, List actions, List constants, int regStart, List variables) { - super(instruction, PRECEDENCE_PRIMARY); + public FunctionActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, String functionName, List paramNames, List actions, List constants, int regStart, List variables) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.actions = actions; this.constants = constants; this.functionName = functionName; @@ -272,18 +272,18 @@ public class FunctionActionItem extends ActionItem { if (registerNames.contains(varName)) { if (stored != null) { - v.setBoxedValue(new StoreRegisterActionItem(null, new RegisterNumber(registerNames.indexOf(varName), varName), stored, false)); + v.setBoxedValue(new StoreRegisterActionItem(null, null, new RegisterNumber(registerNames.indexOf(varName), varName), stored, false)); } else { v.setBoxedValue(new DirectValueActionItem(new RegisterNumber(registerNames.indexOf(varName), varName))); } } else { if (v.isDefinition()) { - v.setBoxedValue(new DefineLocalActionItem(null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored)); + v.setBoxedValue(new DefineLocalActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored)); } else { if (stored != null) { - v.setBoxedValue(new SetVariableActionItem(null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored)); + v.setBoxedValue(new SetVariableActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored)); } else { - v.setBoxedValue(new GetVariableActionItem(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/model/GetMemberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java index 37de3830a..65db2bb1c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java @@ -43,8 +43,8 @@ public class GetMemberActionItem extends ActionItem { return ret; } - public GetMemberActionItem(GraphSourceItem instruction, GraphTargetItem object, GraphTargetItem memberName) { - super(instruction, PRECEDENCE_PRIMARY); + public GetMemberActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem memberName) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.object = object; this.memberName = memberName; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java index 0a7753bc3..cc59c3ea6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java @@ -43,8 +43,8 @@ public class GetPropertyActionItem extends ActionItem { return ret; } - public GetPropertyActionItem(GraphSourceItem instruction, GraphTargetItem target, int propertyIndex) { - super(instruction, PRECEDENCE_PRIMARY); + public GetPropertyActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, int propertyIndex) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.target = target; this.propertyIndex = propertyIndex; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java index 06035c22d..8f3c85af4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -29,8 +30,8 @@ import java.util.Set; public class GetTimeActionItem extends ActionItem { - public GetTimeActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); + public GetTimeActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java index 8b76cbd32..53a1f42a3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java @@ -63,8 +63,8 @@ public class GetURL2ActionItem extends ActionItem { return writer.append(methodStr).append(")"); } - public GetURL2ActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem targetString, int method) { - super(instruction, PRECEDENCE_PRIMARY); + public GetURL2ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem targetString, int method) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.urlString = urlString; this.targetString = targetString; this.sendVarsMethod = method; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java index 81dc1b75e..bd64dcabe 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java @@ -43,8 +43,8 @@ public class GetURLActionItem extends ActionItem { return writer.append("\")"); } - public GetURLActionItem(GraphSourceItem instruction, String urlString, String targetString) { - super(instruction, PRECEDENCE_PRIMARY); + public GetURLActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, String urlString, String targetString) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.urlString = urlString; this.targetString = targetString; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java index e143ae5af..c98bb60a1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java @@ -56,8 +56,8 @@ public class GetVariableActionItem extends ActionItem { return ret; } - public GetVariableActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); + public GetVariableActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.name = value; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java index 73cc755c4..3aba055f0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -31,8 +32,8 @@ import java.util.List; */ public class GetVersionActionItem extends ActionItem { - public GetVersionActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); + public GetVersionActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java index 01e2132e5..254ffb341 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java @@ -47,8 +47,8 @@ public class GotoFrame2ActionItem extends ActionItem { return ret; } - public GotoFrame2ActionItem(GraphSourceItem instruction, GraphTargetItem frame, boolean sceneBiasFlag, boolean playFlag, int sceneBias) { - super(instruction, PRECEDENCE_PRIMARY); + public GotoFrame2ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem frame, boolean sceneBiasFlag, boolean playFlag, int sceneBias) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.frame = frame; this.sceneBiasFlag = sceneBiasFlag; this.playFlag = playFlag; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java index 3a4a167ee..dfcec88b4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java @@ -29,8 +29,8 @@ public class GotoFrameActionItem extends ActionItem { public int frame; - public GotoFrameActionItem(GraphSourceItem instruction, int frame) { - super(instruction, PRECEDENCE_PRIMARY); + public GotoFrameActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, int frame) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.frame = frame; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java index 831384982..dd15acd2a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java @@ -30,8 +30,8 @@ public class GotoLabelActionItem extends ActionItem { public String label; - public GotoLabelActionItem(GraphSourceItem instruction, String label) { - super(instruction, PRECEDENCE_PRIMARY); + public GotoLabelActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, String label) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.label = label; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java index 280d21b66..537da8747 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java @@ -29,8 +29,8 @@ public class ImplementsOpActionItem extends ActionItem { public List superclasses; - public ImplementsOpActionItem(GraphSourceItem instruction, GraphTargetItem subclass, List superclasses) { - super(instruction, PRECEDENCE_PRIMARY); + public ImplementsOpActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem subclass, List superclasses) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.subclass = subclass; this.superclasses = superclasses; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java index d4247ea22..12c17cb29 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java @@ -40,8 +40,8 @@ public class IncrementActionItem extends ActionItem { return ret; } - public IncrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_ADDITIVE); + public IncrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_ADDITIVE); this.object = object; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java index a72cef728..0763ced2b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java @@ -38,8 +38,8 @@ public class InitArrayActionItem extends ActionItem { return ret; } - public InitArrayActionItem(GraphSourceItem instruction, List values) { - super(instruction, PRECEDENCE_PRIMARY); + public InitArrayActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, List values) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.values = values; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java index 97c6ce465..12c64761f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java @@ -44,8 +44,8 @@ public class InitObjectActionItem extends ActionItem { return ret; } - public InitObjectActionItem(GraphSourceItem instruction, List names, List values) { - super(instruction, PRECEDENCE_PRIMARY); + public InitObjectActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, List names, List values) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.values = values; this.names = names; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java index b8cc692ff..f6ce431b0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java @@ -47,8 +47,8 @@ public class LoadMovieActionItem extends ActionItem { return ret; } - public LoadMovieActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem targetString, int method) { - super(instruction, PRECEDENCE_PRIMARY); + public LoadMovieActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem targetString, int method) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.urlString = urlString; this.targetString = targetString; this.method = method; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java index edf620e2c..b449d0678 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java @@ -49,8 +49,8 @@ public class LoadMovieNumActionItem extends ActionItem { return ret; } - public LoadMovieNumActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem num, int method) { - super(instruction, PRECEDENCE_PRIMARY); + public LoadMovieNumActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem num, int method) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.urlString = urlString; this.num = num; this.method = method; @@ -77,11 +77,11 @@ public class LoadMovieNumActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - Object lev = null; + Object lev; if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) { lev = asGenerator.pushConstTargetItem("_level" + ((DirectValueActionItem) num).value); } else { - lev = new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("_level"), num, true); + lev = new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("_level"), num, true); } return toSourceMerge(localData, generator, urlString, lev, new ActionGetURL2(method, false, false)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java index ff39e9c65..f2b945782 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java @@ -47,8 +47,8 @@ public class LoadVariablesActionItem extends ActionItem { return ret; } - public LoadVariablesActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem targetString, int method) { - super(instruction, PRECEDENCE_PRIMARY); + public LoadVariablesActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem targetString, int method) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.urlString = urlString; this.targetString = targetString; this.method = method; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java index e89381194..de7089e25 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java @@ -49,8 +49,8 @@ public class LoadVariablesNumActionItem extends ActionItem { return ret; } - public LoadVariablesNumActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem num, int method) { - super(instruction, PRECEDENCE_PRIMARY); + public LoadVariablesNumActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem num, int method) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.urlString = urlString; this.num = num; this.method = method; @@ -77,11 +77,11 @@ public class LoadVariablesNumActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - Object lev = null; + Object lev; if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) { lev = asGenerator.pushConstTargetItem("_level" + ((DirectValueActionItem) num).value); } else { - lev = new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("_level"), num, true); + lev = new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("_level"), num, true); } return toSourceMerge(localData, generator, urlString, lev, new ActionGetURL2(method, true, false)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java index 9cc5f5a26..cb14919bd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class MBAsciiToCharActionItem extends ActionItem { - public MBAsciiToCharActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public MBAsciiToCharActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java index 85ccda54a..0c833ec03 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class MBCharToAsciiActionItem extends ActionItem { - public MBCharToAsciiActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public MBCharToAsciiActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java index 5a9a0a5ea..cbe0f1705 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java @@ -45,8 +45,8 @@ public class MBStringExtractActionItem extends ActionItem { return ret; } - public MBStringExtractActionItem(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) { - super(instruction, PRECEDENCE_PRIMARY, value); + public MBStringExtractActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); this.index = index; this.count = count; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java index cb4320a80..2948cf24c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java @@ -31,8 +31,8 @@ import java.util.List; public class MBStringLengthActionItem extends ActionItem { //public GraphTargetItem value; - public MBStringLengthActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public MBStringLengthActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java index 05640c772..b5e30f584 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java @@ -45,8 +45,8 @@ public class NewMethodActionItem extends ActionItem { return ret; } - public NewMethodActionItem(GraphSourceItem instruction, GraphTargetItem scriptObject, GraphTargetItem methodName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); + public NewMethodActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scriptObject, GraphTargetItem methodName, List arguments) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.methodName = methodName; this.arguments = arguments; this.scriptObject = scriptObject; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java index 17604308c..b6a9ed464 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java @@ -42,8 +42,8 @@ public class NewObjectActionItem extends ActionItem { return ret; } - public NewObjectActionItem(GraphSourceItem instruction, GraphTargetItem objectName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); + public NewObjectActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem objectName, List arguments) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.objectName = objectName; this.arguments = arguments; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java index fc1f7c5af..238eef7cc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -33,8 +34,8 @@ public class NextFrameActionItem extends ActionItem { return writer.append("()"); } - public NextFrameActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); + public NextFrameActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java index 834ad0640..df39f0800 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -33,8 +34,8 @@ public class PlayActionItem extends ActionItem { return writer.append("()"); } - public PlayActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); + public PlayActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java index e0a320df5..d0a11e537 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -30,8 +31,8 @@ import java.util.List; */ public class PopActionItem extends ActionItem { - public PopActionItem(GraphSourceItem instruction) { - super(instruction, NOPRECEDENCE); + public PopActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, NOPRECEDENCE); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java index a6a9516b2..c1b24f9d1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java @@ -49,8 +49,8 @@ public class PostDecrementActionItem extends ActionItem implements SetTypeAction return ret; } - public PostDecrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_POSTFIX); + public PostDecrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_POSTFIX); this.object = object; } @@ -77,7 +77,7 @@ public class PostDecrementActionItem extends ActionItem implements SetTypeAction @Override public GraphTargetItem getValue() { - return new SubtractActionItem(null, object, new DirectValueActionItem(null, 0, 1L, null)); + return new SubtractActionItem(null, null, object, new DirectValueActionItem(null, null, 0, 1L, null)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java index bc386ed23..50275cb90 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java @@ -49,8 +49,8 @@ public class PostIncrementActionItem extends ActionItem implements SetTypeAction return ret; } - public PostIncrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_POSTFIX); + public PostIncrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_POSTFIX); this.object = object; } @@ -77,7 +77,7 @@ public class PostIncrementActionItem extends ActionItem implements SetTypeAction @Override public GraphTargetItem getValue() { - return new AddActionItem(null, object, new DirectValueActionItem(null, 0, 1L, null), true); + return new AddActionItem(null, null, object, new DirectValueActionItem(null, null, 0, 1L, null), true); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java index 742b99bd4..76ea1b350 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -33,8 +34,8 @@ public class PrevFrameActionItem extends ActionItem { return writer.append("()"); } - public PrevFrameActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); + public PrevFrameActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java index 59a3e8ee6..147044bbd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java @@ -47,8 +47,8 @@ public class PrintActionItem extends ActionItem { return ret; } - public PrintActionItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem boundingBox) { - super(instruction, PRECEDENCE_PRIMARY); + public PrintActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, GraphTargetItem boundingBox) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.target = target; this.boundingBox = boundingBox; } @@ -67,7 +67,7 @@ public class PrintActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - return toSourceMerge(localData, generator, new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("print:#"), boundingBox, true), target, new ActionGetURL2(0, false, false)); + return toSourceMerge(localData, generator, new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("print:#"), boundingBox, true), target, new ActionGetURL2(0, false, false)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java index 7f796cd96..18e35cade 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java @@ -47,8 +47,8 @@ public class PrintAsBitmapActionItem extends ActionItem { return ret; } - public PrintAsBitmapActionItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem boundingBox) { - super(instruction, PRECEDENCE_PRIMARY); + public PrintAsBitmapActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, GraphTargetItem boundingBox) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.target = target; this.boundingBox = boundingBox; } @@ -67,7 +67,7 @@ public class PrintAsBitmapActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - return toSourceMerge(localData, generator, new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("printasbitmap:#"), boundingBox, true), target, new ActionGetURL2(0, false, false)); + return toSourceMerge(localData, generator, new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("printasbitmap:#"), boundingBox, true), target, new ActionGetURL2(0, false, false)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java index 93528d8ea..c328af450 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java @@ -47,8 +47,8 @@ public class PrintAsBitmapNumActionItem extends ActionItem { return ret; } - public PrintAsBitmapNumActionItem(GraphSourceItem instruction, GraphTargetItem num, GraphTargetItem boundingBox) { - super(instruction, PRECEDENCE_PRIMARY); + public PrintAsBitmapNumActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem num, GraphTargetItem boundingBox) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.num = num; this.boundingBox = boundingBox; } @@ -67,13 +67,13 @@ public class PrintAsBitmapNumActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - Object lev = null; + Object lev; if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) { lev = asGenerator.pushConstTargetItem("_level" + ((DirectValueActionItem) num).value); } else { - lev = new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("_level"), num, true); + lev = new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("_level"), num, true); } - return toSourceMerge(localData, generator, new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("printasbitmap:#"), boundingBox, true), lev, new ActionGetURL2(0, false, false)); + return toSourceMerge(localData, generator, new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("printasbitmap:#"), boundingBox, true), lev, new ActionGetURL2(0, false, false)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java index cef25c36d..37a45b0d1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java @@ -47,8 +47,8 @@ public class PrintNumActionItem extends ActionItem { return ret; } - public PrintNumActionItem(GraphSourceItem instruction, GraphTargetItem num, GraphTargetItem boundingBox) { - super(instruction, PRECEDENCE_PRIMARY); + public PrintNumActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem num, GraphTargetItem boundingBox) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.num = num; this.boundingBox = boundingBox; } @@ -67,13 +67,13 @@ public class PrintNumActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - Object lev = null; + Object lev; if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) { lev = asGenerator.pushConstTargetItem("_level" + ((DirectValueActionItem) num).value); } else { - lev = new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("_level"), num, true); + lev = new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("_level"), num, true); } - return toSourceMerge(localData, generator, new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("print:#"), boundingBox, true), lev, new ActionGetURL2(0, false, false)); + return toSourceMerge(localData, generator, new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("print:#"), boundingBox, true), lev, new ActionGetURL2(0, false, false)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java index c9c5b6d77..b11959a48 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class RandomNumberActionItem extends ActionItem { - public RandomNumberActionItem(GraphSourceItem instruction, GraphTargetItem maximum) { - super(instruction, PRECEDENCE_PRIMARY, maximum); + public RandomNumberActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem maximum) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, maximum); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java index 54319ebfd..b90572372 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class RemoveSpriteActionItem extends ActionItem { - public RemoveSpriteActionItem(GraphSourceItem instruction, GraphTargetItem target) { - super(instruction, PRECEDENCE_PRIMARY, target); + public RemoveSpriteActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, target); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java index f02a02782..92e009cd4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java @@ -42,8 +42,8 @@ import java.util.Set; public class ReturnActionItem extends ActionItem implements ExitItem { //public GraphTargetItem value; - public ReturnActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public ReturnActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java index a21941205..fc120deb9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java @@ -76,8 +76,8 @@ public class SetMemberActionItem extends ActionItem implements SetTypeActionItem return value; } - public SetMemberActionItem(GraphSourceItem instruction, GraphTargetItem object, GraphTargetItem objectName, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT, value); + public SetMemberActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem objectName, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); this.object = object; this.objectName = objectName; } @@ -101,7 +101,7 @@ public class SetMemberActionItem extends ActionItem implements SetTypeActionItem @Override public GraphTargetItem getObject() { - return new GetMemberActionItem(getSrc(), object, objectName); + return new GetMemberActionItem(getSrc(), getLineStartItem(), object, objectName); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java index d1f5909d5..6c5d327ed 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java @@ -67,8 +67,8 @@ public class SetPropertyActionItem extends ActionItem implements SetTypeActionIt return value; } - public SetPropertyActionItem(GraphSourceItem instruction, GraphTargetItem target, int propertyIndex, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT, value); + public SetPropertyActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, int propertyIndex, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); this.target = target; this.propertyIndex = propertyIndex; } @@ -86,7 +86,7 @@ public class SetPropertyActionItem extends ActionItem implements SetTypeActionIt @Override public GraphTargetItem getObject() { - return new GetPropertyActionItem(getSrc(), target, propertyIndex); + return new GetPropertyActionItem(getSrc(), getLineStartItem(), target, propertyIndex); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java index c6cac2c00..7c97f6315 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java @@ -29,8 +29,8 @@ public class SetTarget2ActionItem extends ActionItem { public GraphTargetItem target; - public SetTarget2ActionItem(GraphSourceItem instruction, GraphTargetItem target) { - super(instruction, PRECEDENCE_PRIMARY); + public SetTarget2ActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.target = target; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java index dc2859480..fbcc602e7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java @@ -29,8 +29,8 @@ public class SetTargetActionItem extends ActionItem { public String target; - public SetTargetActionItem(GraphSourceItem instruction, String target) { - super(instruction, PRECEDENCE_PRIMARY); + public SetTargetActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, String target) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.target = target; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java index 6803d4d94..0bf3427df 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java @@ -66,8 +66,8 @@ public class SetVariableActionItem extends ActionItem implements SetTypeActionIt return value; } - public SetVariableActionItem(GraphSourceItem instruction, GraphTargetItem name, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT, value); + public SetVariableActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem name, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); this.name = name; } @@ -93,7 +93,7 @@ public class SetVariableActionItem extends ActionItem implements SetTypeActionIt @Override public GraphTargetItem getObject() { - return new GetVariableActionItem(getSrc(), name); + return new GetVariableActionItem(getSrc(), getLineStartItem(), name); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java index 4554b746d..6b4c189ba 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java @@ -43,8 +43,8 @@ public class StartDragActionItem extends ActionItem { public GraphTargetItem x1; - public StartDragActionItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem lockCenter, GraphTargetItem constrain, GraphTargetItem x1, GraphTargetItem y1, GraphTargetItem x2, GraphTargetItem y2) { - super(instruction, PRECEDENCE_PRIMARY); + public StartDragActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, GraphTargetItem lockCenter, GraphTargetItem constrain, GraphTargetItem x1, GraphTargetItem y1, GraphTargetItem x2, GraphTargetItem y2) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.target = target; this.lockCenter = lockCenter; this.constrain = constrain; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java index 94ed41890..50ea4f60d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -33,8 +34,8 @@ public class StopActionItem extends ActionItem { return writer.append("()"); } - public StopActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); + public StopActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java index 93301fcca..0e21b6030 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -33,8 +34,8 @@ public class StopAllSoundsActionItem extends ActionItem { return writer.append("()"); } - public StopAllSoundsActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); + public StopAllSoundsActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java index 237640712..74f4717bf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -33,8 +34,8 @@ public class StopDragActionItem extends ActionItem { return writer.append("()"); } - public StopDragActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); + public StopDragActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java index a2b5fcadf..4b2860223 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java @@ -66,8 +66,8 @@ public class StoreRegisterActionItem extends ActionItem implements SetTypeAction return value; } - public StoreRegisterActionItem(GraphSourceItem instruction, RegisterNumber register, GraphTargetItem value, boolean define) { - super(instruction, PRECEDENCE_ASSIGMENT, value); + public StoreRegisterActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, RegisterNumber register, GraphTargetItem value, boolean define) { + super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); this.register = register; this.define = define; } @@ -88,7 +88,7 @@ public class StoreRegisterActionItem extends ActionItem implements SetTypeAction @Override public GraphTargetItem getObject() { - return new DirectValueActionItem(getSrc(), -1, register, null); + return new DirectValueActionItem(getSrc(), getLineStartItem(), -1, register, null); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java index 1f4a95de2..8483749a6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java @@ -24,8 +24,8 @@ public class StrictModeActionItem extends ActionItem { public int mode; - public StrictModeActionItem(GraphSourceItem instruction, int mode) { - super(instruction, PRECEDENCE_PRIMARY); + public StrictModeActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, int mode) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.mode = mode; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java index 4380726ce..5669b31b1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java @@ -35,8 +35,8 @@ public class StringExtractActionItem extends ActionItem { public GraphTargetItem count; - public StringExtractActionItem(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) { - super(instruction, PRECEDENCE_PRIMARY, value); + public StringExtractActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); this.index = index; this.count = count; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java index 6fa8217e6..3fbfeca33 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java @@ -31,8 +31,8 @@ import java.util.Set; public class StringLengthActionItem extends ActionItem { //public GraphTargetItem value; - public StringLengthActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public StringLengthActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java index 5dc1a14ab..e5d491da9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class TargetPathActionItem extends ActionItem { - public TargetPathActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_PRIMARY, object); + public TargetPathActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, object); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java index 6f868a800..16035bcf3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java @@ -31,7 +31,7 @@ public class TemporaryRegister extends ActionItem { private final int regId; public TemporaryRegister(int regId, GraphTargetItem value) { - super(value.getSrc(), value.getPrecedence(), value); + super(value.getSrc(), value.getLineStartItem(), value.getPrecedence(), value); this.regId = regId; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java index 1126753de..0d6b14e15 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class ThrowActionItem extends ActionItem { - public ThrowActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_PRIMARY, object); + public ThrowActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, object); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java index f388dbe8d..6ccac07ff 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class ToIntegerActionItem extends ActionItem { - public ToIntegerActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public ToIntegerActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java index 9adbe287e..9cb4570b2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class ToNumberActionItem extends ActionItem { - public ToNumberActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public ToNumberActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java index e48080148..b1b8e3bba 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java @@ -30,8 +30,8 @@ import java.util.List; public class ToStringActionItem extends ActionItem { - public ToStringActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public ToStringActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java index 4ec959222..347c1a4ad 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -33,8 +34,8 @@ public class ToggleHighQualityActionItem extends ActionItem { return writer.append("()"); } - public ToggleHighQualityActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); + public ToggleHighQualityActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java index 5fdb70fd9..a8ea89d42 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class TraceActionItem extends ActionItem { - public TraceActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public TraceActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java index 0e50d38a0..19ed7abc4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java @@ -32,8 +32,8 @@ import java.util.Set; public class TypeOfActionItem extends ActionItem { - public TypeOfActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY, value); + public TypeOfActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java index e25ee2c0c..eb23bc394 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java @@ -42,8 +42,8 @@ public class UnLoadMovieActionItem extends ActionItem { return ret; } - public UnLoadMovieActionItem(GraphSourceItem instruction, GraphTargetItem targetString) { - super(instruction, PRECEDENCE_PRIMARY); + public UnLoadMovieActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem targetString) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.targetString = targetString; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java index 8d13d5539..1ec320fa6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java @@ -46,8 +46,8 @@ public class UnLoadMovieNumActionItem extends ActionItem { return ret; } - public UnLoadMovieNumActionItem(GraphSourceItem instruction, GraphTargetItem num) { - super(instruction, PRECEDENCE_PRIMARY); + public UnLoadMovieNumActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem num) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.num = num; } @@ -66,7 +66,7 @@ public class UnLoadMovieNumActionItem extends ActionItem { if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) { return toSourceMerge(localData, generator, new ActionGetURL("", "_level" + ((DirectValueActionItem) num).value)); } else { - return toSourceMerge(localData, generator, new ActionPush(""), new AddActionItem(getSrc(), asGenerator.pushConstTargetItem("_level"), num, true), new ActionGetURL2(0, false, true)); + return toSourceMerge(localData, generator, new ActionPush(""), new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("_level"), num, true), new ActionGetURL2(0, false, true)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java index fea9f818b..12f98f5b0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java @@ -25,8 +25,8 @@ public class UnsupportedActionItem extends ActionItem { public String value; - public UnsupportedActionItem(GraphSourceItem instruction, String value) { - super(instruction, PRECEDENCE_PRIMARY); + public UnsupportedActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, String value) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.value = value; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java index 4e5ae7854..eb2dc190c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java @@ -72,7 +72,7 @@ public class ClassActionItem extends ActionItem implements Block { } public ClassActionItem(GraphTargetItem className, GraphTargetItem extendsOp, List implementsOp, GraphTargetItem constructor, List functions, List> vars, List staticFunctions, List> staticVars) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.className = className; this.functions = functions; this.vars = vars; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java index cb3a8324f..cb153affa 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java @@ -63,8 +63,8 @@ public class ForInActionItem extends LoopActionItem implements Block { return ret; } - public ForInActionItem(Action instruction, Loop loop, GraphTargetItem variableName, GraphTargetItem enumVariable, List commands) { - super(instruction, loop); + public ForInActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop, GraphTargetItem variableName, GraphTargetItem enumVariable, List commands) { + super(instruction, lineStartIns, loop); this.variableName = variableName; this.enumVariable = enumVariable; this.commands = commands; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java index d7b3b0c45..c2b6412c3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java @@ -41,8 +41,8 @@ public class IfFrameLoadedActionItem extends ActionItem implements Block { private final GraphTargetItem frame; - public IfFrameLoadedActionItem(GraphTargetItem frame, List actions, GraphSourceItem instruction) { - super(instruction, NOPRECEDENCE); + public IfFrameLoadedActionItem(GraphTargetItem frame, List actions, GraphSourceItem instruction, GraphSourceItem lineStartIns) { + super(instruction, lineStartIns, NOPRECEDENCE); this.actions = actions; this.frame = frame; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java index e858921c9..438c3e5d4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java @@ -40,7 +40,7 @@ public class InterfaceActionItem extends ActionItem { public List superInterfaces; public InterfaceActionItem(GraphTargetItem name, List superInterfaces) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.name = name; this.superInterfaces = superInterfaces; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/LoopActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/LoopActionItem.java index 17b785182..4b6be5f73 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/LoopActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/LoopActionItem.java @@ -12,19 +12,20 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model.clauses; -import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.ActionItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.Loop; public abstract class LoopActionItem extends ActionItem { public Loop loop; - public LoopActionItem(Action instruction, Loop loop) { - super(instruction, NOPRECEDENCE); + public LoopActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop) { + super(instruction, lineStartIns, NOPRECEDENCE); this.loop = loop; } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java index 4907dd245..97d94aa04 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java @@ -38,8 +38,8 @@ public class TellTargetActionItem extends ActionItem { public GraphTargetItem target; - public TellTargetActionItem(GraphSourceItem instruction, GraphTargetItem target, List commands) { - super(instruction, PRECEDENCE_PRIMARY); + public TellTargetActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, List commands) { + super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.target = target; this.commands = commands; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java index 25761f4c0..bb177b452 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java @@ -59,7 +59,7 @@ public class TryActionItem extends ActionItem implements Block { } public TryActionItem(List tryCommands, List catchExceptions, List> catchCommands, List finallyCommands) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.tryCommands = tryCommands; this.catchExceptions = catchExceptions; this.catchCommands = catchCommands; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java index c62679f57..161be9f03 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java @@ -36,14 +36,14 @@ public class WithActionItem extends ActionItem { public List items; - public WithActionItem(Action instruction, GraphTargetItem scope, List items) { - super(instruction, NOPRECEDENCE); + public WithActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope, List items) { + super(instruction, lineStartIns, NOPRECEDENCE); this.scope = scope; this.items = items; } - public WithActionItem(Action instruction, ActionItem scope) { - super(instruction, NOPRECEDENCE); + public WithActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, ActionItem scope) { + super(instruction, lineStartIns, NOPRECEDENCE); this.scope = scope; this.items = new ArrayList<>(); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java index 8ebb97d6e..9a85b3524 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java @@ -35,8 +35,8 @@ public class AddActionItem extends BinaryOpItem { boolean version2; - public AddActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { - super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "+"); + public AddActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { + super(instruction, lineStartIns, PRECEDENCE_ADDITIVE, leftSide, rightSide, "+"); this.version2 = version2; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AndActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AndActionItem.java index 65fa9476e..0cdef55d3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AndActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AndActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class AndActionItem extends BinaryOpItem { - public AndActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_LOGICALAND, leftSide, rightSide, "and"); + public AndActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_LOGICALAND, leftSide, rightSide, "and"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java index db1c0abf9..33af0fbaf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java @@ -28,8 +28,8 @@ import java.util.List; public class BitAndActionItem extends BinaryOpItem { - public BitAndActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISEAND, leftSide, rightSide, "&"); + public BitAndActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_BITWISEAND, leftSide, rightSide, "&"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java index 3cf79d99f..9f93388e0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java @@ -28,8 +28,8 @@ import java.util.List; public class BitOrActionItem extends BinaryOpItem { - public BitOrActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISEOR, leftSide, rightSide, "|"); + public BitOrActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_BITWISEOR, leftSide, rightSide, "|"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java index 85cb6b293..274dd1e5c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java @@ -31,8 +31,8 @@ import java.util.List; public class BitXorActionItem extends BinaryOpItem { - public BitXorActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISEXOR, leftSide, rightSide, "^"); + public BitXorActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_BITWISEXOR, leftSide, rightSide, "^"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java index 8ed3d7bc2..00715f540 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java @@ -28,8 +28,8 @@ import java.util.List; public class DivideActionItem extends BinaryOpItem { - public DivideActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "/"); + public DivideActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "/"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/EqActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/EqActionItem.java index 4127b5891..e51f4be62 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/EqActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/EqActionItem.java @@ -34,8 +34,8 @@ public class EqActionItem extends BinaryOpItem implements LogicalOpItem, EqualsT boolean version2; - public EqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "=="); + public EqActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { + super(instruction, lineStartIns, PRECEDENCE_EQUALITY, leftSide, rightSide, "=="); this.version2 = version2; } @@ -55,7 +55,7 @@ public class EqActionItem extends BinaryOpItem implements LogicalOpItem, EqualsT @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new NeqActionItem(getSrc(), leftSide, rightSide, version2); + return new NeqActionItem(getSrc(), getLineStartItem(), leftSide, rightSide, version2); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GeActionItem.java index 6bce7b5bf..243cc8574 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GeActionItem.java @@ -37,8 +37,8 @@ public class GeActionItem extends BinaryOpItem implements LogicalOpItem, Inverte boolean version2; - public GeActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, ">="); + public GeActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, leftSide, rightSide, ">="); this.version2 = version2; } @@ -60,7 +60,7 @@ public class GeActionItem extends BinaryOpItem implements LogicalOpItem, Inverte @Override public GraphTargetItem invert(GraphSourceItem negSrc) { - return new LtActionItem(getSrc(), leftSide, rightSide, version2); + return new LtActionItem(getSrc(), getLineStartItem(), leftSide, rightSide, version2); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GtActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GtActionItem.java index 4454aee67..dad04f9db 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GtActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GtActionItem.java @@ -34,8 +34,8 @@ import java.util.List; public class GtActionItem extends BinaryOpItem implements LogicalOpItem { - public GtActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, ">"); + public GtActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, leftSide, rightSide, ">"); } @Override @@ -55,7 +55,7 @@ public class GtActionItem extends BinaryOpItem implements LogicalOpItem { @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new LeActionItem(getSrc(), leftSide, rightSide); + return new LeActionItem(getSrc(), getLineStartItem(), leftSide, rightSide); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InActionItem.java index 0111e7065..c6aa47d51 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InActionItem.java @@ -24,8 +24,8 @@ import java.util.Set; public class InActionItem extends BinaryOpItem { - public InActionItem(GraphSourceItem instruction, ActionItem name, ActionItem object) { - super(instruction, PRECEDENCE_RELATIONAL, name, object, "in"); + public InActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, ActionItem name, ActionItem object) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, name, object, "in"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InstanceOfActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InstanceOfActionItem.java index afb61eec7..7da8b91c1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InstanceOfActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InstanceOfActionItem.java @@ -28,8 +28,8 @@ import java.util.Set; public class InstanceOfActionItem extends BinaryOpItem { - public InstanceOfActionItem(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem type) { - super(instruction, PRECEDENCE_RELATIONAL, value, type, "instanceof"); + public InstanceOfActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem type) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, value, type, "instanceof"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java index 9e22bbb57..902e90a3d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java @@ -28,8 +28,8 @@ import java.util.List; public class LShiftActionItem extends BinaryOpItem { - public LShiftActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, "<<"); + public LShiftActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, "<<"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LeActionItem.java index ae37479a1..b7cd57e95 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LeActionItem.java @@ -35,8 +35,8 @@ import java.util.List; public class LeActionItem extends BinaryOpItem implements LogicalOpItem, Inverted { - public LeActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, "<="); + public LeActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, leftSide, rightSide, "<="); } @Override @@ -52,7 +52,7 @@ public class LeActionItem extends BinaryOpItem implements LogicalOpItem, Inverte @Override public GraphTargetItem invert(GraphSourceItem negSrc) { - return new GtActionItem(getSrc(), leftSide, rightSide); + return new GtActionItem(getSrc(), getLineStartItem(), leftSide, rightSide); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LtActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LtActionItem.java index 3ad9c90df..be7f2deae 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LtActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LtActionItem.java @@ -36,8 +36,8 @@ public class LtActionItem extends BinaryOpItem implements LogicalOpItem { boolean version2; - public LtActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, "<"); + public LtActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, leftSide, rightSide, "<"); this.version2 = version2; } @@ -63,7 +63,7 @@ public class LtActionItem extends BinaryOpItem implements LogicalOpItem { @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new GeActionItem(getSrc(), leftSide, rightSide, version2); + return new GeActionItem(getSrc(), getLineStartItem(), leftSide, rightSide, version2); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java index a8f205883..ac746bcc8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java @@ -28,8 +28,8 @@ import java.util.List; public class ModuloActionItem extends BinaryOpItem { - public ModuloActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "%"); + public ModuloActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "%"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java index d53b0fe46..ac2b3c44e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java @@ -28,8 +28,8 @@ import java.util.List; public class MultiplyActionItem extends BinaryOpItem { - public MultiplyActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "*"); + public MultiplyActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "*"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/NeqActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/NeqActionItem.java index b2195d7c1..15f7b0be1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/NeqActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/NeqActionItem.java @@ -34,8 +34,8 @@ public class NeqActionItem extends BinaryOpItem implements LogicalOpItem, Invert boolean version2; - public NeqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "!="); + public NeqActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { + super(instruction, lineStartIns, PRECEDENCE_EQUALITY, leftSide, rightSide, "!="); this.version2 = version2; } @@ -51,7 +51,7 @@ public class NeqActionItem extends BinaryOpItem implements LogicalOpItem, Invert @Override public GraphTargetItem invert(GraphSourceItem negSrc) { - return new EqActionItem(getSrc(), leftSide, rightSide, version2); + return new EqActionItem(getSrc(), getLineStartItem(), leftSide, rightSide, version2); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/OrActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/OrActionItem.java index 334d774bd..d415c05b3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/OrActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/OrActionItem.java @@ -29,8 +29,8 @@ import java.util.List; public class OrActionItem extends BinaryOpItem { - public OrActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_LOGICALOR, leftSide, rightSide, "or"); + public OrActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_LOGICALOR, leftSide, rightSide, "or"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreDecrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreDecrementActionItem.java index adf264941..06513ebac 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreDecrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreDecrementActionItem.java @@ -40,8 +40,8 @@ import java.util.List; public class PreDecrementActionItem extends UnaryOpItem { - public PreDecrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_UNARY, object, "--"); + public PreDecrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_UNARY, object, "--"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreIncrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreIncrementActionItem.java index 4cbc8f822..c64f09694 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreIncrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreIncrementActionItem.java @@ -40,8 +40,8 @@ import java.util.List; public class PreIncrementActionItem extends UnaryOpItem { - public PreIncrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_UNARY, object, "++"); + public PreIncrementActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, PRECEDENCE_UNARY, object, "++"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java index 1b8cca908..74f233633 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java @@ -28,8 +28,8 @@ import java.util.List; public class RShiftActionItem extends BinaryOpItem { - public RShiftActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>"); + public RShiftActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictEqActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictEqActionItem.java index 455c4bbed..6bf67ae99 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictEqActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictEqActionItem.java @@ -31,8 +31,8 @@ import java.util.List; public class StrictEqActionItem extends BinaryOpItem implements LogicalOpItem, Inverted, EqualsTypeItem { - public StrictEqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "==="); + public StrictEqActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_EQUALITY, leftSide, rightSide, "==="); } @Override @@ -49,7 +49,7 @@ public class StrictEqActionItem extends BinaryOpItem implements LogicalOpItem, I @Override public GraphTargetItem invert(GraphSourceItem negSrc) { - return new StrictNeqActionItem(getSrc(), leftSide, rightSide); + return new StrictNeqActionItem(getSrc(), getLineStartItem(), leftSide, rightSide); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictNeqActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictNeqActionItem.java index a52dbcdf8..817c6a4b3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictNeqActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictNeqActionItem.java @@ -31,8 +31,8 @@ import java.util.List; public class StrictNeqActionItem extends BinaryOpItem implements LogicalOpItem, Inverted { - public StrictNeqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "!=="); + public StrictNeqActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_EQUALITY, leftSide, rightSide, "!=="); } @Override @@ -45,7 +45,7 @@ public class StrictNeqActionItem extends BinaryOpItem implements LogicalOpItem, @Override public GraphTargetItem invert(GraphSourceItem negSrc) { - return new StrictEqActionItem(getSrc(), leftSide, rightSide); + return new StrictEqActionItem(getSrc(), getLineStartItem(), leftSide, rightSide); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringAddActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringAddActionItem.java index 652d1c9f1..2434115e6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringAddActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringAddActionItem.java @@ -30,8 +30,8 @@ import java.util.Set; public class StringAddActionItem extends BinaryOpItem { - public StringAddActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "add"); + public StringAddActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_ADDITIVE, leftSide, rightSide, "add"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringEqActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringEqActionItem.java index 31076c0e2..237c9acb8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringEqActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringEqActionItem.java @@ -30,8 +30,8 @@ import java.util.Set; public class StringEqActionItem extends BinaryOpItem implements Inverted { - public StringEqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "eq"); + public StringEqActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_EQUALITY, leftSide, rightSide, "eq"); } @Override @@ -60,6 +60,6 @@ public class StringEqActionItem extends BinaryOpItem implements Inverted { @Override public GraphTargetItem invert(GraphSourceItem negSrc) { - return new StringNeActionItem(getSrc(), leftSide, rightSide); + return new StringNeActionItem(getSrc(), getLineStartItem(), leftSide, rightSide); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGeActionItem.java index d0385bb41..d9bd00367 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGeActionItem.java @@ -31,8 +31,8 @@ import java.util.Set; public class StringGeActionItem extends BinaryOpItem implements Inverted { - public StringGeActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, "ge"); + public StringGeActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, leftSide, rightSide, "ge"); } @Override @@ -57,6 +57,6 @@ public class StringGeActionItem extends BinaryOpItem implements Inverted { @Override public GraphTargetItem invert(GraphSourceItem negSrc) { - return new StringLtActionItem(getSrc(), leftSide, rightSide); + return new StringLtActionItem(getSrc(), getLineStartItem(), leftSide, rightSide); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGtActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGtActionItem.java index 652d081be..a60e3ab63 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGtActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGtActionItem.java @@ -32,8 +32,8 @@ import java.util.Set; public class StringGtActionItem extends BinaryOpItem implements Inverted { - public StringGtActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, "gt"); + public StringGtActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, leftSide, rightSide, "gt"); } @Override @@ -66,6 +66,6 @@ public class StringGtActionItem extends BinaryOpItem implements Inverted { @Override public GraphTargetItem invert(GraphSourceItem negSrc) { - return new StringLeActionItem(getSrc(), leftSide, rightSide); + return new StringLeActionItem(getSrc(), getLineStartItem(), leftSide, rightSide); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLeActionItem.java index d038be643..66277c522 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLeActionItem.java @@ -33,8 +33,8 @@ import java.util.Set; public class StringLeActionItem extends BinaryOpItem implements Inverted { - public StringLeActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, "le"); + public StringLeActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, leftSide, rightSide, "le"); } @Override @@ -65,6 +65,6 @@ public class StringLeActionItem extends BinaryOpItem implements Inverted { @Override public GraphTargetItem invert(GraphSourceItem negSrc) { - return new StringGtActionItem(getSrc(), leftSide, rightSide); + return new StringGtActionItem(getSrc(), getLineStartItem(), leftSide, rightSide); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLtActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLtActionItem.java index f4b10246c..ce4dea3f7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLtActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLtActionItem.java @@ -30,8 +30,8 @@ import java.util.Set; public class StringLtActionItem extends BinaryOpItem implements Inverted { - public StringLtActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, "lt"); + public StringLtActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_RELATIONAL, leftSide, rightSide, "lt"); } @Override @@ -60,6 +60,6 @@ public class StringLtActionItem extends BinaryOpItem implements Inverted { @Override public GraphTargetItem invert(GraphSourceItem negSrc) { - return new StringGeActionItem(getSrc(), leftSide, rightSide); + return new StringGeActionItem(getSrc(), getLineStartItem(), leftSide, rightSide); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringNeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringNeActionItem.java index b711b4e70..8b77deb97 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringNeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringNeActionItem.java @@ -30,8 +30,8 @@ import java.util.Set; public class StringNeActionItem extends BinaryOpItem implements Inverted { - public StringNeActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "ne"); + public StringNeActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_EQUALITY, leftSide, rightSide, "ne"); } @Override @@ -51,6 +51,6 @@ public class StringNeActionItem extends BinaryOpItem implements Inverted { @Override public GraphTargetItem invert(GraphSourceItem negSrc) { - return new StringEqActionItem(getSrc(), leftSide, rightSide); + return new StringEqActionItem(getSrc(), getLineStartItem(), leftSide, rightSide); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java index e1ff63ff9..e1117716f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java @@ -31,8 +31,8 @@ import java.util.List; public class SubtractActionItem extends BinaryOpItem { - public SubtractActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "-"); + public SubtractActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_ADDITIVE, leftSide, rightSide, "-"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java index 21799fb90..f6ac98f83 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java @@ -28,8 +28,8 @@ import java.util.List; public class URShiftActionItem extends BinaryOpItem { - public URShiftActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>>"); + public URShiftActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, lineStartIns, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>>"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScript2Parser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScript2Parser.java index bec89845c..8276ce747 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScript2Parser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScript2Parser.java @@ -177,7 +177,7 @@ public class ActionScript2Parser { if (debugMode) { System.out.println("commands:"); } - GraphTargetItem cmd = null; + GraphTargetItem cmd; while ((cmd = command(inFunction, inMethod, forinlevel, true, variables)) != null) { ret.add(cmd); } @@ -188,7 +188,7 @@ public class ActionScript2Parser { } private GraphTargetItem type(List variables) throws IOException, ActionParseException { - GraphTargetItem ret = null; + GraphTargetItem ret; ParsedSymbol s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER, SymbolType.STRING_OP); @@ -198,7 +198,7 @@ public class ActionScript2Parser { while (s.type == SymbolType.DOT) { s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER, SymbolType.STRING_OP, SymbolGroup.GLOBALFUNC); - ret = new GetMemberActionItem(null, ret, pushConst(s.value.toString())); + ret = new GetMemberActionItem(null, null, ret, pushConst(s.value.toString())); s = lex(); } lexer.pushback(s); @@ -269,7 +269,7 @@ public class ActionScript2Parser { private FunctionActionItem function(boolean withBody, String functionName, boolean isMethod, List variables) throws IOException, ActionParseException { GraphTargetItem ret = null; - ParsedSymbol s = null; + ParsedSymbol s; expectedType(SymbolType.PARENT_OPEN); s = lex(); List paramNames = new ArrayList<>(); @@ -300,7 +300,7 @@ public class ActionScript2Parser { expectedType(SymbolType.CURLY_CLOSE); } - return new FunctionActionItem(null, functionName, paramNames, body, constantPool, -1, subvariables); + return new FunctionActionItem(null, null, functionName, paramNames, body, constantPool, -1, subvariables); } private GraphTargetItem traits(boolean isInterface, GraphTargetItem nameStr, GraphTargetItem extendsStr, List implementsStr, List variables) throws IOException, ActionParseException { @@ -330,7 +330,7 @@ public class ActionScript2Parser { globalClassTypeStr.add("_global"); globalClassTypeStr.addAll(nameStr);*/ - ParsedSymbol s = null; + ParsedSymbol s; FunctionActionItem constr = null; List staticFunctions = new ArrayList<>(); List> staticVars = new ArrayList<>(); @@ -420,26 +420,26 @@ public class ActionScript2Parser { if (debugMode) { System.out.println("expressionCommands:"); } - GraphTargetItem ret = null; + GraphTargetItem ret; switch (s.type) { case GETVERSION: expectedType(SymbolType.PARENT_OPEN); - ret = new GetVersionActionItem(null); + ret = new GetVersionActionItem(null, null); expectedType(SymbolType.PARENT_CLOSE); break; case MBORD: expectedType(SymbolType.PARENT_OPEN); - ret = new MBCharToAsciiActionItem(null, expression(inFunction, inMethod, true, variables)); + ret = new MBCharToAsciiActionItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); break; case MBCHR: expectedType(SymbolType.PARENT_OPEN); - ret = new MBAsciiToCharActionItem(null, expression(inFunction, inMethod, true, variables)); + ret = new MBAsciiToCharActionItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); break; case MBLENGTH: expectedType(SymbolType.PARENT_OPEN); - ret = new MBStringLengthActionItem(null, expression(inFunction, inMethod, true, variables)); + ret = new MBStringLengthActionItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); break; case MBSUBSTRING: @@ -450,7 +450,7 @@ public class ActionScript2Parser { expectedType(SymbolType.COMMA); GraphTargetItem len1 = (expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); - ret = new MBStringExtractActionItem(null, val1, index1, len1); + ret = new MBStringExtractActionItem(null, null, val1, index1, len1); break; case SUBSTR: expectedType(SymbolType.PARENT_OPEN); @@ -460,21 +460,21 @@ public class ActionScript2Parser { expectedType(SymbolType.COMMA); GraphTargetItem len2 = (expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); - ret = new StringExtractActionItem(null, val2, index2, len2); + ret = new StringExtractActionItem(null, null, val2, index2, len2); break; case LENGTH: expectedType(SymbolType.PARENT_OPEN); - ret = new StringLengthActionItem(null, expression(inFunction, inMethod, true, variables)); + ret = new StringLengthActionItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); break; case RANDOM: expectedType(SymbolType.PARENT_OPEN); - ret = new RandomNumberActionItem(null, expression(inFunction, inMethod, true, variables)); + ret = new RandomNumberActionItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); break; case INT: expectedType(SymbolType.PARENT_OPEN); - ret = new ToIntegerActionItem(null, expression(inFunction, inMethod, true, variables)); + ret = new ToIntegerActionItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); break; case NUMBER_OP: @@ -487,7 +487,7 @@ public class ActionScript2Parser { ret = vi; //memberOrCall(vi, inFunction, inMethod, variables); } else { expected(s, lexer.yyline(), SymbolType.PARENT_OPEN); - ret = new ToNumberActionItem(null, expression(inFunction, inMethod, true, variables)); + ret = new ToNumberActionItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); } break; @@ -501,19 +501,19 @@ public class ActionScript2Parser { ret = vi2; //memberOrCall(vi2, inFunction, inMethod, variables); } else { expected(s, lexer.yyline(), SymbolType.PARENT_OPEN); - ret = new ToStringActionItem(null, expression(inFunction, inMethod, true, variables)); + ret = new ToStringActionItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); //ret = memberOrCall(ret, inFunction, inMethod, variables); } break; case ORD: expectedType(SymbolType.PARENT_OPEN); - ret = new CharToAsciiActionItem(null, expression(inFunction, inMethod, true, variables)); + ret = new CharToAsciiActionItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); break; case CHR: expectedType(SymbolType.PARENT_OPEN); - ret = new AsciiToCharActionItem(null, expression(inFunction, inMethod, true, variables)); + ret = new AsciiToCharActionItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); break; case DUPLICATEMOVIECLIP: @@ -524,12 +524,12 @@ public class ActionScript2Parser { expectedType(SymbolType.COMMA); GraphTargetItem dep3 = (expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); - ret = new CloneSpriteActionItem(null, src3, tar3, dep3); + ret = new CloneSpriteActionItem(null, null, src3, tar3, dep3); break; case GETTIMER: expectedType(SymbolType.PARENT_OPEN); expectedType(SymbolType.PARENT_CLOSE); - ret = new GetTimeActionItem(null); + ret = new GetTimeActionItem(null, null); break; default: return null; @@ -554,22 +554,22 @@ public class ActionScript2Parser { switch (s.type) { case FSCOMMAND: expectedType(SymbolType.PARENT_OPEN); - ret = new FSCommandActionItem(null, expression(inFunction, inMethod, true, variables)); + ret = new FSCommandActionItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); break; case CALL: expectedType(SymbolType.PARENT_OPEN); - ret = new CallActionItem(null, (expression(inFunction, inMethod, true, variables))); + ret = new CallActionItem(null, null, (expression(inFunction, inMethod, true, variables))); expectedType(SymbolType.PARENT_CLOSE); break; case LENGTH: expectedType(SymbolType.PARENT_OPEN); - ret = new StringLengthActionItem(null, (expression(inFunction, inMethod, true, variables))); + ret = new StringLengthActionItem(null, null, (expression(inFunction, inMethod, true, variables))); expectedType(SymbolType.PARENT_CLOSE); break; case MBLENGTH: expectedType(SymbolType.PARENT_OPEN); - ret = new MBStringLengthActionItem(null, (expression(inFunction, inMethod, true, variables))); + ret = new MBStringLengthActionItem(null, null, (expression(inFunction, inMethod, true, variables))); expectedType(SymbolType.PARENT_CLOSE); break; case SET: @@ -578,7 +578,7 @@ public class ActionScript2Parser { expectedType(SymbolType.COMMA); GraphTargetItem value1 = (expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); - ret = new SetVariableActionItem(null, name1, value1); + ret = new SetVariableActionItem(null, null, name1, value1); break; case WITH: expectedType(SymbolType.PARENT_OPEN); @@ -587,23 +587,23 @@ public class ActionScript2Parser { expectedType(SymbolType.CURLY_OPEN); List wcmd = commands(inFunction, inMethod, forinlevel, variables); expectedType(SymbolType.CURLY_CLOSE); - ret = new WithActionItem(null, wvar, wcmd); + ret = new WithActionItem(null, null, wvar, wcmd); break; case DELETE: GraphTargetItem varDel = expression(inFunction, inMethod, false, variables);//variable(inFunction, inMethod, variables); if (varDel instanceof GetMemberActionItem) { GetMemberActionItem gm = (GetMemberActionItem) varDel; - ret = new DeleteActionItem(null, gm.object, gm.memberName); + ret = new DeleteActionItem(null, null, gm.object, gm.memberName); } else if (varDel instanceof VariableActionItem) { variables.remove(varDel); - ret = new DeleteActionItem(null, null, pushConst(((VariableActionItem) varDel).getVariableName())); + ret = new DeleteActionItem(null, null, null, pushConst(((VariableActionItem) varDel).getVariableName())); } else { throw new ActionParseException("Not a property", lexer.yyline()); } break; case TRACE: expectedType(SymbolType.PARENT_OPEN); - ret = new TraceActionItem(null, (expression(inFunction, inMethod, true, variables))); + ret = new TraceActionItem(null, null, (expression(inFunction, inMethod, true, variables))); expectedType(SymbolType.PARENT_CLOSE); break; @@ -613,7 +613,7 @@ public class ActionScript2Parser { s = lex(); expected(s, lexer.yyline(), SymbolType.PARENT_CLOSE, SymbolType.COMMA); int getuMethod = 1; - GraphTargetItem target = null; + GraphTargetItem target; if (s.type == SymbolType.COMMA) { target = (expression(inFunction, inMethod, true, variables)); s = lex(); @@ -632,38 +632,38 @@ public class ActionScript2Parser { } } else { lexer.pushback(s); - target = new DirectValueActionItem(null, 0, "", new ArrayList<>()); + target = new DirectValueActionItem(null, null, 0, "", new ArrayList<>()); } expectedType(SymbolType.PARENT_CLOSE); - ret = new GetURL2ActionItem(null, url, target, getuMethod); + ret = new GetURL2ActionItem(null, null, url, target, getuMethod); break; case GOTOANDSTOP: expectedType(SymbolType.PARENT_OPEN); GraphTargetItem gtsFrame = expression(inFunction, inMethod, true, variables); s = lex(); if (s.type == SymbolType.COMMA) { //Handle scene? - s = lex(); + lex(); gtsFrame = expression(inFunction, inMethod, true, variables); } else { lexer.pushback(s); } - ret = new GotoFrame2ActionItem(null, gtsFrame, false, false, 0); + ret = new GotoFrame2ActionItem(null, null, gtsFrame, false, false, 0); expectedType(SymbolType.PARENT_CLOSE); break; case NEXTFRAME: expectedType(SymbolType.PARENT_OPEN); expectedType(SymbolType.PARENT_CLOSE); - ret = new NextFrameActionItem(null); + ret = new NextFrameActionItem(null, null); break; case PLAY: expectedType(SymbolType.PARENT_OPEN); expectedType(SymbolType.PARENT_CLOSE); - ret = new PlayActionItem(null); + ret = new PlayActionItem(null, null); break; case PREVFRAME: expectedType(SymbolType.PARENT_OPEN); expectedType(SymbolType.PARENT_CLOSE); - ret = new PrevFrameActionItem(null); + ret = new PrevFrameActionItem(null, null); break; case TELLTARGET: expectedType(SymbolType.PARENT_OPEN); @@ -672,33 +672,33 @@ public class ActionScript2Parser { expectedType(SymbolType.CURLY_OPEN); List tellcmds = commands(inFunction, inMethod, forinlevel, variables); expectedType(SymbolType.CURLY_CLOSE); - ret = new TellTargetActionItem(null, tellTarget, tellcmds); + ret = new TellTargetActionItem(null, null, tellTarget, tellcmds); break; case STOP: expectedType(SymbolType.PARENT_OPEN); expectedType(SymbolType.PARENT_CLOSE); - ret = new StopActionItem(null); + ret = new StopActionItem(null, null); break; case STOPALLSOUNDS: expectedType(SymbolType.PARENT_OPEN); expectedType(SymbolType.PARENT_CLOSE); - ret = new StopAllSoundsActionItem(null); + ret = new StopAllSoundsActionItem(null, null); break; case TOGGLEHIGHQUALITY: expectedType(SymbolType.PARENT_OPEN); expectedType(SymbolType.PARENT_CLOSE); - ret = new ToggleHighQualityActionItem(null); + ret = new ToggleHighQualityActionItem(null, null); break; case STOPDRAG: expectedType(SymbolType.PARENT_OPEN); expectedType(SymbolType.PARENT_CLOSE); - ret = new StopDragActionItem(null); + ret = new StopDragActionItem(null, null); break; case TARGETPATH: expectedType(SymbolType.PARENT_OPEN); - ret = new TargetPathActionItem(null, (expression(inFunction, inMethod, true, variables))); + ret = new TargetPathActionItem(null, null, (expression(inFunction, inMethod, true, variables))); expectedType(SymbolType.PARENT_CLOSE); break; @@ -709,10 +709,10 @@ public class ActionScript2Parser { GraphTargetItem unTargetOrNum = expression(inFunction, inMethod, true, variables); expectedType(SymbolType.PARENT_CLOSE); if (unloadType == SymbolType.UNLOADMOVIE) { - ret = new UnLoadMovieActionItem(null, unTargetOrNum); + ret = new UnLoadMovieActionItem(null, null, unTargetOrNum); } if (unloadType == SymbolType.UNLOADMOVIENUM) { - ret = new UnLoadMovieNumActionItem(null, unTargetOrNum); + ret = new UnLoadMovieNumActionItem(null, null, unTargetOrNum); } break; case PRINT: @@ -728,16 +728,16 @@ public class ActionScript2Parser { switch (printType) { case PRINT: - ret = new PrintActionItem(null, printTarget, printBBox); + ret = new PrintActionItem(null, null, printTarget, printBBox); break; case PRINTNUM: - ret = new PrintNumActionItem(null, printTarget, printBBox); + ret = new PrintNumActionItem(null, null, printTarget, printBBox); break; case PRINTASBITMAP: - ret = new PrintAsBitmapActionItem(null, printTarget, printBBox); + ret = new PrintAsBitmapActionItem(null, null, printTarget, printBBox); break; case PRINTASBITMAPNUM: - ret = new PrintAsBitmapNumActionItem(null, printTarget, printBBox); + ret = new PrintAsBitmapNumActionItem(null, null, printTarget, printBBox); break; } break; @@ -770,16 +770,16 @@ public class ActionScript2Parser { expectedType(SymbolType.PARENT_CLOSE); switch (loadType) { case LOADVARIABLES: - ret = new LoadVariablesActionItem(null, url2, targetOrNum, lvmethod); + ret = new LoadVariablesActionItem(null, null, url2, targetOrNum, lvmethod); break; case LOADMOVIE: - ret = new LoadMovieActionItem(null, url2, targetOrNum, lvmethod); + ret = new LoadMovieActionItem(null, null, url2, targetOrNum, lvmethod); break; case LOADVARIABLESNUM: - ret = new LoadVariablesNumActionItem(null, url2, targetOrNum, lvmethod); + ret = new LoadVariablesNumActionItem(null, null, url2, targetOrNum, lvmethod); break; case LOADMOVIENUM: - ret = new LoadMovieNumActionItem(null, url2, targetOrNum, lvmethod); + ret = new LoadMovieNumActionItem(null, null, url2, targetOrNum, lvmethod); break; } break; @@ -788,25 +788,25 @@ public class ActionScript2Parser { GraphTargetItem gtpFrame = expression(inFunction, inMethod, true, variables); s = lex(); if (s.type == SymbolType.COMMA) { //Handle scene? - s = lex(); + lex(); gtpFrame = expression(inFunction, inMethod, true, variables); } else { lexer.pushback(s); } - ret = new GotoFrame2ActionItem(null, gtpFrame, false, true, 0); + ret = new GotoFrame2ActionItem(null, null, gtpFrame, false, true, 0); expectedType(SymbolType.PARENT_CLOSE); break; case REMOVEMOVIECLIP: expectedType(SymbolType.PARENT_OPEN); - ret = new RemoveSpriteActionItem(null, (expression(inFunction, inMethod, true, variables))); + ret = new RemoveSpriteActionItem(null, null, (expression(inFunction, inMethod, true, variables))); expectedType(SymbolType.PARENT_CLOSE); break; case STARTDRAG: expectedType(SymbolType.PARENT_OPEN); GraphTargetItem dragTarget = (expression(inFunction, inMethod, true, variables)); - GraphTargetItem lockCenter = null; - GraphTargetItem constrain = null; + GraphTargetItem lockCenter; + GraphTargetItem constrain; GraphTargetItem x1 = null; GraphTargetItem y1 = null; GraphTargetItem x2 = null; @@ -816,7 +816,7 @@ public class ActionScript2Parser { lockCenter = (expression(inFunction, inMethod, true, variables)); s = lex(); if (s.type == SymbolType.COMMA) { - constrain = new DirectValueActionItem(null, 0, 1L, new ArrayList<>()); + constrain = new DirectValueActionItem(null, null, 0, 1L, new ArrayList<>()); x1 = (expression(inFunction, inMethod, true, variables)); s = lex(); if (s.type == SymbolType.COMMA) { @@ -829,32 +829,32 @@ public class ActionScript2Parser { y2 = (expression(inFunction, inMethod, true, variables)); } else { lexer.pushback(s); - y2 = new DirectValueActionItem(null, 0, 0L, new ArrayList<>()); + y2 = new DirectValueActionItem(null, null, 0, 0L, new ArrayList<>()); } } else { lexer.pushback(s); - x2 = new DirectValueActionItem(null, 0, 0L, new ArrayList<>()); - y2 = new DirectValueActionItem(null, 0, 0L, new ArrayList<>()); + x2 = new DirectValueActionItem(null, null, 0, 0L, new ArrayList<>()); + y2 = new DirectValueActionItem(null, null, 0, 0L, new ArrayList<>()); } } else { lexer.pushback(s); - x2 = new DirectValueActionItem(null, 0, 0L, new ArrayList<>()); - y2 = new DirectValueActionItem(null, 0, 0L, new ArrayList<>()); - y1 = new DirectValueActionItem(null, 0, 0L, new ArrayList<>()); + x2 = new DirectValueActionItem(null, null, 0, 0L, new ArrayList<>()); + y2 = new DirectValueActionItem(null, null, 0, 0L, new ArrayList<>()); + y1 = new DirectValueActionItem(null, null, 0, 0L, new ArrayList<>()); } } else { lexer.pushback(s); - constrain = new DirectValueActionItem(null, 0, 0L, new ArrayList<>()); + constrain = new DirectValueActionItem(null, null, 0, 0L, new ArrayList<>()); //ret.add(new ActionPush(Boolean.FALSE)); } } else { - lockCenter = new DirectValueActionItem(null, 0, 0L, new ArrayList<>()); - constrain = new DirectValueActionItem(null, 0, 0L, new ArrayList<>()); + lockCenter = new DirectValueActionItem(null, null, 0, 0L, new ArrayList<>()); + constrain = new DirectValueActionItem(null, null, 0, 0L, new ArrayList<>()); lexer.pushback(s); } expectedType(SymbolType.PARENT_CLOSE); - ret = new StartDragActionItem(null, dragTarget, lockCenter, constrain, x1, y1, x2, y2); + ret = new StartDragActionItem(null, null, dragTarget, lockCenter, constrain, x1, y1, x2, y2); break; case IFFRAMELOADED: @@ -864,7 +864,7 @@ public class ActionScript2Parser { expectedType(SymbolType.CURLY_OPEN); List iflComs = commands(inFunction, inMethod, forinlevel, variables); expectedType(SymbolType.CURLY_CLOSE); - ret = new IfFrameLoadedActionItem(iflExpr, iflComs, null); + ret = new IfFrameLoadedActionItem(iflExpr, iflComs, null, null); break; case CLASS: GraphTargetItem classTypeStr = type(variables); @@ -929,16 +929,16 @@ public class ActionScript2Parser { } break; case CURLY_OPEN: - ret = new BlockItem(null, commands(inFunction, inMethod, forinlevel, variables)); + ret = new BlockItem(null, null, commands(inFunction, inMethod, forinlevel, variables)); expectedType(SymbolType.CURLY_CLOSE); break; case INCREMENT: //preincrement case DECREMENT: //predecrement GraphTargetItem varincdec = expression(inFunction, inMethod, false, variables); if (s.type == SymbolType.INCREMENT) { - ret = new PreIncrementActionItem(null, varincdec); + ret = new PreIncrementActionItem(null, null, varincdec); } else if (s.type == SymbolType.DECREMENT) { - ret = new PreDecrementActionItem(null, varincdec); + ret = new PreDecrementActionItem(null, null, varincdec); } break; case SUPER: //constructor call @@ -947,7 +947,7 @@ public class ActionScript2Parser { List args = call(inFunction, inMethod, variables); VariableActionItem supItem = new VariableActionItem(s.value.toString(), null, false); variables.add(supItem); - ret = new CallMethodActionItem(null, supItem, new DirectValueActionItem(null, 0, Undefined.INSTANCE, constantPool), args); + ret = new CallMethodActionItem(null, null, supItem, new DirectValueActionItem(null, null, 0, Undefined.INSTANCE, constantPool), args); } else {//no costructor call, but it could be calling parent methods... => handle in expression lexer.pushback(ss2); lexer.pushback(s); @@ -968,7 +968,7 @@ public class ActionScript2Parser { } else { lexer.pushback(s); } - ret = new IfItem(null, ifExpr, onTrueList, onFalseList); + ret = new IfItem(null, null, ifExpr, onTrueList, onFalseList); break; case WHILE: expectedType(SymbolType.PARENT_OPEN); @@ -977,7 +977,7 @@ public class ActionScript2Parser { expectedType(SymbolType.PARENT_CLOSE); List whileBody = new ArrayList<>(); whileBody.add(command(inFunction, inMethod, forinlevel, true, variables)); - ret = new WhileItem(null, null, whileExpr, whileBody); + ret = new WhileItem(null, null, null, whileExpr, whileBody); break; case DO: List doBody = new ArrayList<>(); @@ -987,14 +987,14 @@ public class ActionScript2Parser { List doExpr = new ArrayList<>(); doExpr.add(commaExpression(inFunction, inMethod, forinlevel, variables)); expectedType(SymbolType.PARENT_CLOSE); - ret = new DoWhileItem(null, null, doBody, doExpr); + ret = new DoWhileItem(null, null, null, doBody, doExpr); break; case FOR: expectedType(SymbolType.PARENT_OPEN); s = lex(); boolean forin = false; GraphTargetItem collection = null; - String objIdent = null; + String objIdent; VariableActionItem item = null; int innerExprReg = 0; boolean define = false; @@ -1083,9 +1083,9 @@ public class ActionScript2Parser { List forBody = new ArrayList<>(); forBody.add(command(inFunction, inMethod, forin ? forinlevel + 1 : forinlevel, true, variables)); if (forin) { - ret = new ForInActionItem(null, null, item, collection, forBody); + ret = new ForInActionItem(null, null, null, item, collection, forBody); } else { - ret = new ForItem(null, null, forFirstCommands, forExpr, forFinalCommands, forBody); + ret = new ForItem(null, null, null, forFirstCommands, forExpr, forFinalCommands, forBody); } break; case SWITCH: @@ -1109,10 +1109,10 @@ public class ActionScript2Parser { List valueMapping = new ArrayList<>(); int pos = 0; while (s.type == SymbolType.CASE) { - List caseExprs = new ArrayList<>(); + //List caseExprs; = new ArrayList<>(); while (s.type == SymbolType.CASE) { GraphTargetItem curCaseExpr = expression(inFunction, inMethod, true, variables); - caseExprs.add(curCaseExpr); + //caseExprs.add(curCaseExpr); expectedType(SymbolType.COLON); s = lex(); caseExprsAll.add(curCaseExpr); @@ -1131,20 +1131,20 @@ public class ActionScript2Parser { s = lexer.lex(); } expected(s, lexer.yyline(), SymbolType.CURLY_CLOSE); - ret = new SwitchItem(null, null, switchExpr, caseExprsAll, caseCmds, defCmd, valueMapping); + ret = new SwitchItem(null, null, null, switchExpr, caseExprsAll, caseCmds, defCmd, valueMapping); break; case BREAK: - ret = new BreakItem(null, 0); //? There is no more than 1 level continue/break in AS1/2 + ret = new BreakItem(null, null, 0); //? There is no more than 1 level continue/break in AS1/2 break; case CONTINUE: - ret = new ContinueItem(null, 0); //? There is no more than 1 level continue/break in AS1/2 + ret = new ContinueItem(null, null, 0); //? There is no more than 1 level continue/break in AS1/2 break; case RETURN: GraphTargetItem retexpr = expression(inFunction, inMethod, true, variables); if (retexpr == null) { - retexpr = new DirectValueActionItem(null, 0, Undefined.INSTANCE, new ArrayList<>()); + retexpr = new DirectValueActionItem(null, null, 0, Undefined.INSTANCE, new ArrayList<>()); } - ret = new ReturnActionItem(null, retexpr); + ret = new ReturnActionItem(null, null, retexpr); break; case TRY: List tryCommands = new ArrayList<>(); @@ -1180,7 +1180,7 @@ public class ActionScript2Parser { ret = new TryActionItem(tryCommands, catchExceptions, catchCommands, finallyCommands); break; case THROW: - ret = new ThrowActionItem(null, expression(inFunction, inMethod, true, variables)); + ret = new ThrowActionItem(null, null, expression(inFunction, inMethod, true, variables)); break; case SEMICOLON: //empty command if (debugMode) { @@ -1304,82 +1304,82 @@ public class ActionScript2Parser { switch (op.type) { case TERNAR: - lhs = new TernarOpItem(null, lhs, mhs, rhs); + lhs = new TernarOpItem(null, null, lhs, mhs, rhs); break; case SHIFT_LEFT: - lhs = new LShiftActionItem(null, lhs, rhs); + lhs = new LShiftActionItem(null, null, lhs, rhs); break; case SHIFT_RIGHT: - lhs = new RShiftActionItem(null, lhs, rhs); + lhs = new RShiftActionItem(null, null, lhs, rhs); break; case USHIFT_RIGHT: - lhs = new URShiftActionItem(null, lhs, rhs); + lhs = new URShiftActionItem(null, null, lhs, rhs); break; case BITAND: - lhs = new BitAndActionItem(null, lhs, rhs); + lhs = new BitAndActionItem(null, null, lhs, rhs); break; case BITOR: - lhs = new BitOrActionItem(null, lhs, rhs); + lhs = new BitOrActionItem(null, null, lhs, rhs); break; case DIVIDE: - lhs = new DivideActionItem(null, lhs, rhs); + lhs = new DivideActionItem(null, null, lhs, rhs); break; case MODULO: - lhs = new ModuloActionItem(null, lhs, rhs); + lhs = new ModuloActionItem(null, null, lhs, rhs); break; case EQUALS: - lhs = new EqActionItem(null, lhs, rhs, true/*FIXME SWF version?*/); + lhs = new EqActionItem(null, null, lhs, rhs, true/*FIXME SWF version?*/); break; case STRICT_EQUALS: - lhs = new StrictEqActionItem(null, lhs, rhs); + lhs = new StrictEqActionItem(null, null, lhs, rhs); break; case NOT_EQUAL: - lhs = new NeqActionItem(null, lhs, rhs, true/*FIXME SWF version?*/); + lhs = new NeqActionItem(null, null, lhs, rhs, true/*FIXME SWF version?*/); break; case STRICT_NOT_EQUAL: - lhs = new StrictNeqActionItem(null, lhs, rhs); + lhs = new StrictNeqActionItem(null, null, lhs, rhs); break; case LOWER_THAN: - lhs = new LtActionItem(null, lhs, rhs, true/*FIXME SWF version?*/); + lhs = new LtActionItem(null, null, lhs, rhs, true/*FIXME SWF version?*/); break; case LOWER_EQUAL: - lhs = new LeActionItem(null, lhs, rhs); + lhs = new LeActionItem(null, null, lhs, rhs); break; case GREATER_THAN: - lhs = new GtActionItem(null, lhs, rhs); + lhs = new GtActionItem(null, null, lhs, rhs); break; case GREATER_EQUAL: - lhs = new GeActionItem(null, lhs, rhs, true/*FIXME SWF version?*/); + lhs = new GeActionItem(null, null, lhs, rhs, true/*FIXME SWF version?*/); break; case AND: - lhs = new AndItem(null, lhs, rhs); + lhs = new AndItem(null, null, lhs, rhs); break; case OR: - lhs = new OrItem(null, lhs, rhs); + lhs = new OrItem(null, null, lhs, rhs); break; case FULLAND: - lhs = new AndActionItem(null, lhs, rhs); + lhs = new AndActionItem(null, null, lhs, rhs); break; case FULLOR: - lhs = new OrActionItem(null, lhs, rhs); + lhs = new OrActionItem(null, null, lhs, rhs); break; case MINUS: - lhs = new SubtractActionItem(null, lhs, rhs); + lhs = new SubtractActionItem(null, null, lhs, rhs); break; case MULTIPLY: - lhs = new MultiplyActionItem(null, lhs, rhs); + lhs = new MultiplyActionItem(null, null, lhs, rhs); break; case PLUS: - lhs = new AddActionItem(null, lhs, rhs, true); + lhs = new AddActionItem(null, null, lhs, rhs, true); break; case XOR: - lhs = new BitXorActionItem(null, lhs, rhs); + lhs = new BitXorActionItem(null, null, lhs, rhs); break; case AS: break; case INSTANCEOF: - lhs = new InstanceOfActionItem(null, lhs, rhs); + lhs = new InstanceOfActionItem(null, null, lhs, rhs); break; case IS: @@ -1403,37 +1403,37 @@ public class ActionScript2Parser { //assigned = assigned; break; case ASSIGN_BITAND: - assigned = new BitAndActionItem(null, lhs, assigned); + assigned = new BitAndActionItem(null, null, lhs, assigned); break; case ASSIGN_BITOR: - assigned = new BitOrActionItem(null, lhs, assigned); + assigned = new BitOrActionItem(null, null, lhs, assigned); break; case ASSIGN_DIVIDE: - assigned = new DivideActionItem(null, lhs, assigned); + assigned = new DivideActionItem(null, null, lhs, assigned); break; case ASSIGN_MINUS: - assigned = new SubtractActionItem(null, lhs, assigned); + assigned = new SubtractActionItem(null, null, lhs, assigned); break; case ASSIGN_MODULO: - assigned = new ModuloActionItem(null, lhs, assigned); + assigned = new ModuloActionItem(null, null, lhs, assigned); break; case ASSIGN_MULTIPLY: - assigned = new MultiplyActionItem(null, lhs, assigned); + assigned = new MultiplyActionItem(null, null, lhs, assigned); break; case ASSIGN_PLUS: - assigned = new AddActionItem(null, lhs, assigned, true/*TODO:SWF version?*/); + assigned = new AddActionItem(null, null, lhs, assigned, true/*TODO:SWF version?*/); break; case ASSIGN_SHIFT_LEFT: - assigned = new LShiftActionItem(null, lhs, assigned); + assigned = new LShiftActionItem(null, null, lhs, assigned); break; case ASSIGN_SHIFT_RIGHT: - assigned = new RShiftActionItem(null, lhs, assigned); + assigned = new RShiftActionItem(null, null, lhs, assigned); break; case ASSIGN_USHIFT_RIGHT: - assigned = new URShiftActionItem(null, lhs, assigned); + assigned = new URShiftActionItem(null, null, lhs, assigned); break; case ASSIGN_XOR: - assigned = new BitXorActionItem(null, lhs, assigned); + assigned = new BitXorActionItem(null, null, lhs, assigned); break; } if (lhs instanceof VariableActionItem) { @@ -1441,7 +1441,7 @@ public class ActionScript2Parser { ((VariableActionItem) lhs).setDefinition(false); lhs = lhs; } else if (lhs instanceof GetMemberActionItem) { - lhs = new SetMemberActionItem(null, ((GetMemberActionItem) lhs).object, ((GetMemberActionItem) lhs).memberName, assigned); + lhs = new SetMemberActionItem(null, null, ((GetMemberActionItem) lhs).object, ((GetMemberActionItem) lhs).memberName, assigned); } else { throw new ActionParseException("Invalid assignment", lexer.yyline()); } @@ -1449,25 +1449,25 @@ public class ActionScript2Parser { case IDENTIFIER: switch (lookahead.value.toString()) { case "add": - lhs = new StringAddActionItem(null, lhs, rhs); + lhs = new StringAddActionItem(null, null, lhs, rhs); break; case "eq": - lhs = new StringEqActionItem(null, lhs, rhs); + lhs = new StringEqActionItem(null, null, lhs, rhs); break; case "ne": - lhs = new StringNeActionItem(null, lhs, rhs); + lhs = new StringNeActionItem(null, null, lhs, rhs); break; case "lt": - lhs = new StringLtActionItem(null, lhs, rhs); + lhs = new StringLtActionItem(null, null, lhs, rhs); break; case "ge": - lhs = new StringGeActionItem(null, lhs, rhs); + lhs = new StringGeActionItem(null, null, lhs, rhs); break; case "gt": - lhs = new StringGtActionItem(null, lhs, rhs); + lhs = new StringGtActionItem(null, null, lhs, rhs); break; case "le": - lhs = new StringLeActionItem(null, lhs, rhs); + lhs = new StringLeActionItem(null, null, lhs, rhs); break; } break; @@ -1480,21 +1480,21 @@ public class ActionScript2Parser { if (!(lhs instanceof VariableActionItem) && !(lhs instanceof GetMemberActionItem)) { throw new ActionParseException("Invalid assignment", lexer.yyline()); } - lhs = new PostIncrementActionItem(null, lhs); + lhs = new PostIncrementActionItem(null, null, lhs); break; case DECREMENT: //postdecrement lex(); if (!(lhs instanceof VariableActionItem) && !(lhs instanceof GetMemberActionItem)) { throw new ActionParseException("Invalid assignment", lexer.yyline()); } - lhs = new PostDecrementActionItem(null, lhs); + lhs = new PostDecrementActionItem(null, null, lhs); break; default: if (lhs instanceof ParenthesisItem) { if (isType(((ParenthesisItem) lhs).value)) { GraphTargetItem expr2 = expression(inFunction, inMethod, true, variables); if (expr2 != null) { - lhs = new CastOpActionItem(null, ((ParenthesisItem) lhs).value, expr2); + lhs = new CastOpActionItem(null, null, ((ParenthesisItem) lhs).value, expr2); } } } @@ -1512,10 +1512,7 @@ public class ActionScript2Parser { while (item instanceof GetMemberActionItem) { item = ((GetMemberActionItem) item).object; } - if (item instanceof VariableActionItem) { - return true; - } - return false; + return (item instanceof VariableActionItem); } private int brackets(List ret, boolean inFunction, boolean inMethod, List variables) throws IOException, ActionParseException { @@ -1561,7 +1558,7 @@ public class ActionScript2Parser { throw new ActionParseException("Expression expected", lexer.yyline()); } } - return new CommaExpressionItem(null, expr); + return new CommaExpressionItem(null, null, expr); } private GraphTargetItem expressionPrimary(boolean allowEmpty, boolean inFunction, boolean inMethod, boolean allowRemainder, List variables) throws IOException, ActionParseException { @@ -1576,16 +1573,16 @@ public class ActionScript2Parser { case NEGATE: versionRequired(s, 5); ret = expressionPrimary(false, inFunction, inMethod, false, variables); - ret = new BitXorActionItem(null, ret, new DirectValueActionItem(4.294967295E9)); + ret = new BitXorActionItem(null, null, ret, new DirectValueActionItem(4.294967295E9)); break; case MINUS: s = lex(); if (s.isType(SymbolType.DOUBLE)) { - ret = new DirectValueActionItem(null, 0, -(double) (Double) s.value, new ArrayList<>()); + ret = new DirectValueActionItem(null, null, 0, -(double) (Double) s.value, new ArrayList<>()); } else if (s.isType(SymbolType.INTEGER)) { - ret = new DirectValueActionItem(null, 0, -(long) (Long) s.value, new ArrayList<>()); + ret = new DirectValueActionItem(null, null, 0, -(long) (Long) s.value, new ArrayList<>()); } else { lexer.pushback(s); @@ -1608,27 +1605,27 @@ public class ActionScript2Parser { ((DirectValueActionItem) num).value = -(Float) ((DirectValueActionItem) num).value; ret = (num); } else {; - ret = (new SubtractActionItem(null, new DirectValueActionItem(null, 0, (Long) 0L, new ArrayList<>()), num)); + ret = (new SubtractActionItem(null, null, new DirectValueActionItem(null, null, 0, (Long) 0L, new ArrayList<>()), num)); } } break; case TYPEOF: - ret = new TypeOfActionItem(null, expressionPrimary(false, inFunction, inMethod, false, variables)); + ret = new TypeOfActionItem(null, null, expressionPrimary(false, inFunction, inMethod, false, variables)); allowMemberOrCall = true; break; case TRUE: - ret = new DirectValueActionItem(null, 0, Boolean.TRUE, new ArrayList<>()); + ret = new DirectValueActionItem(null, null, 0, Boolean.TRUE, new ArrayList<>()); break; case NULL: - ret = new DirectValueActionItem(null, 0, Null.INSTANCE, new ArrayList<>()); + ret = new DirectValueActionItem(null, null, 0, Null.INSTANCE, new ArrayList<>()); break; case UNDEFINED: - ret = new DirectValueActionItem(null, 0, Undefined.INSTANCE, new ArrayList<>()); + ret = new DirectValueActionItem(null, null, 0, Undefined.INSTANCE, new ArrayList<>()); break; case FALSE: - ret = new DirectValueActionItem(null, 0, Boolean.FALSE, new ArrayList<>()); + ret = new DirectValueActionItem(null, null, 0, Boolean.FALSE, new ArrayList<>()); break; case CURLY_OPEN: //Object literal @@ -1649,14 +1646,14 @@ public class ActionScript2Parser { expected(s, lexer.yyline(), SymbolType.COMMA, SymbolType.CURLY_CLOSE); } } - ret = new InitObjectActionItem(null, objectNames, objectValues); + ret = new InitObjectActionItem(null, null, objectNames, objectValues); allowMemberOrCall = true; break; case BRACKET_OPEN: //Array literal or just brackets lexer.pushback(s); List inBrackets = new ArrayList<>(); int arrCnt = brackets(inBrackets, inFunction, inMethod, variables); - ret = new InitArrayActionItem(null, inBrackets); + ret = new InitArrayActionItem(null, null, inBrackets); allowMemberOrCall = true; break; case FUNCTION: @@ -1675,27 +1672,27 @@ public class ActionScript2Parser { allowMemberOrCall = true; break; case NEWLINE: - ret = new DirectValueActionItem(null, 0, "\r", new ArrayList<>()); + ret = new DirectValueActionItem(null, null, 0, "\r", new ArrayList<>()); allowMemberOrCall = true; break; case NAN: - ret = new DirectValueActionItem(null, 0, Double.NaN, new ArrayList<>()); + ret = new DirectValueActionItem(null, null, 0, Double.NaN, new ArrayList<>()); break; case INFINITY: - ret = new DirectValueActionItem(null, 0, Double.POSITIVE_INFINITY, new ArrayList<>()); + ret = new DirectValueActionItem(null, null, 0, Double.POSITIVE_INFINITY, new ArrayList<>()); break; case INTEGER: case DOUBLE: - ret = new DirectValueActionItem(null, 0, s.value, new ArrayList<>()); + ret = new DirectValueActionItem(null, null, 0, s.value, new ArrayList<>()); break; case DELETE: GraphTargetItem varDel = expressionPrimary(false, inFunction, inMethod, false, variables); if (varDel instanceof GetMemberActionItem) { GetMemberActionItem gm = (GetMemberActionItem) varDel; - ret = new DeleteActionItem(null, gm.object, gm.memberName); + ret = new DeleteActionItem(null, null, gm.object, gm.memberName); } else { throw new ActionParseException("Not a property", lexer.yyline()); } @@ -1704,19 +1701,19 @@ public class ActionScript2Parser { case DECREMENT: //preincrement GraphTargetItem prevar = expressionPrimary(false, inFunction, inMethod, false, variables);//variable(inFunction, inMethod, variables); if (s.type == SymbolType.INCREMENT) { - ret = new PreIncrementActionItem(null, prevar); + ret = new PreIncrementActionItem(null, null, prevar); } if (s.type == SymbolType.DECREMENT) { - ret = new PreDecrementActionItem(null, prevar); + ret = new PreDecrementActionItem(null, null, prevar); } break; case NOT: - ret = new NotItem(null, expressionPrimary(false, inFunction, inMethod, false, variables)); + ret = new NotItem(null, null, expressionPrimary(false, inFunction, inMethod, false, variables)); break; case PARENT_OPEN: - ret = new ParenthesisItem(null, expression(inFunction, inMethod, true, variables)); + ret = new ParenthesisItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); //ret = memberOrCall(ret, inFunction, inMethod, variables); allowMemberOrCall = true; @@ -1725,10 +1722,10 @@ public class ActionScript2Parser { GraphTargetItem newvar = expressionPrimary(false, inFunction, inMethod, false, variables);//variable(inFunction, inMethod, variables); if (newvar instanceof CallMethodActionItem) { CallMethodActionItem ca = (CallMethodActionItem) newvar; - ret = new NewMethodActionItem(null, ca.scriptObject, ca.methodName, ca.arguments); + ret = new NewMethodActionItem(null, null, ca.scriptObject, ca.methodName, ca.arguments); } else if (newvar instanceof CallFunctionActionItem) { CallFunctionActionItem cf = (CallFunctionActionItem) newvar; - ret = new NewObjectActionItem(null, cf.functionName, cf.arguments); + ret = new NewObjectActionItem(null, null, cf.functionName, cf.arguments); } else { throw new ActionParseException("Invalid new item", lexer.yyline()); } @@ -1736,7 +1733,7 @@ public class ActionScript2Parser { break; case EVAL: expectedType(SymbolType.PARENT_OPEN); - GraphTargetItem evar = new EvalActionItem(null, expression(inFunction, inMethod, true, variables)); + GraphTargetItem evar = new EvalActionItem(null, null, expression(inFunction, inMethod, true, variables)); expectedType(SymbolType.PARENT_CLOSE); //evar = memberOrCall(evar, inFunction, inMethod, variables); ret = evar; @@ -1747,7 +1744,7 @@ public class ActionScript2Parser { case THIS: case SUPER: if (s.value.equals("not")) { - ret = new NotItem(null, expressionPrimary(false, inFunction, inMethod, false, variables)); + ret = new NotItem(null, null, expressionPrimary(false, inFunction, inMethod, false, variables)); } else { ret = new VariableActionItem(s.value.toString(), null, false); variables.add((VariableActionItem) ret); @@ -1782,24 +1779,24 @@ public class ActionScript2Parser { List args = call(inFunction, inMethod, variables); if (ret instanceof GetMemberActionItem) { GetMemberActionItem mem = (GetMemberActionItem) ret; - ret = new CallMethodActionItem(null, mem.object, mem.memberName, args); + ret = new CallMethodActionItem(null, null, mem.object, mem.memberName, args); } else if (ret instanceof VariableActionItem) { VariableActionItem var = (VariableActionItem) ret; - ret = new CallFunctionActionItem(null, pushConst(var.getVariableName()), args); + ret = new CallFunctionActionItem(null, null, pushConst(var.getVariableName()), args); } else { - ret = new CallFunctionActionItem(null, ret, args); + ret = new CallFunctionActionItem(null, null, ret, args); } } if (op.type == SymbolType.BRACKET_OPEN) { GraphTargetItem rhs = expression(inFunction, inMethod, false, variables); - ret = new GetMemberActionItem(null, ret, rhs); + ret = new GetMemberActionItem(null, null, ret, rhs); expectedType(SymbolType.BRACKET_CLOSE); } if (op.type == SymbolType.DOT) { ParsedSymbol s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER, SymbolType.THIS, SymbolType.SUPER, SymbolType.STRING_OP, SymbolGroup.GLOBALFUNC); - ret = new GetMemberActionItem(null, ret, pushConst(s.value.toString())); + ret = new GetMemberActionItem(null, null, ret, pushConst(s.value.toString())); } op = lex(); } @@ -1818,10 +1815,10 @@ public class ActionScript2Parser { } if (index == -1) { - return new DirectValueActionItem(null, 0, s, constantPool); + return new DirectValueActionItem(null, null, 0, s, constantPool); } - return new DirectValueActionItem(null, 0, new ConstantIndex(index), constantPool); + return new DirectValueActionItem(null, null, 0, new ConstantIndex(index), constantPool); } private ActionScriptLexer lexer = null; @@ -1839,12 +1836,12 @@ public class ActionScript2Parser { String varName = v.getVariableName(); GraphTargetItem stored = v.getStoreValue(); if (v.isDefinition()) { - v.setBoxedValue(new DefineLocalActionItem(null, pushConst(varName), stored)); + v.setBoxedValue(new DefineLocalActionItem(null, null, pushConst(varName), stored)); } else { if (stored != null) { - v.setBoxedValue(new SetVariableActionItem(null, pushConst(varName), stored)); + v.setBoxedValue(new SetVariableActionItem(null, null, pushConst(varName), stored)); } else { - v.setBoxedValue(new GetVariableActionItem(null, pushConst(varName))); + v.setBoxedValue(new GetVariableActionItem(null, null, pushConst(varName))); } } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java index e95a2d396..78a0822a8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java @@ -139,7 +139,7 @@ public class ActionSourceGenerator implements SourceGenerator { ret.addAll(expression.toSource(localData, this)); ret.add(new ActionNot()); } - List onTrue = null; + List onTrue; List onFalse = null; if (ternar) { onTrue = toActionList(onTrueCmds.get(0).toSource(localData, this)); @@ -582,7 +582,7 @@ public class ActionSourceGenerator implements SourceGenerator { } while (item instanceof GetMemberActionItem); if (item instanceof GetVariableActionItem) { GetVariableActionItem v = (GetVariableActionItem) item; - item = new GetMemberActionItem(null, new GetVariableActionItem(null, new DirectValueActionItem(null, 0, "_global", new ArrayList<>())), v.name); + item = new GetMemberActionItem(null, null, new GetVariableActionItem(null, null, new DirectValueActionItem(null, null, 0, "_global", new ArrayList<>())), v.name); if (mem != null) { mem.object = item; } @@ -637,7 +637,7 @@ public class ActionSourceGenerator implements SourceGenerator { constantPool.add(s); index = constantPool.indexOf(s); } - return new DirectValueActionItem(null, 0, new ConstantIndex(index), constantPool); + return new DirectValueActionItem(null, null, 0, new ConstantIndex(index), constantPool); } public ActionPush pushConst(String s) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java index 69061c38f..cd5aec6f9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java @@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.action.special; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; @@ -46,7 +47,7 @@ public class ActionEnd extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartItem, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { //output.add(new SimpleActionTreeItem(this, "end()")); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionNop.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionNop.java index 26c59c01a..3fd9c5115 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionNop.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionNop.java @@ -12,10 +12,12 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.special; import com.jpexs.decompiler.flash.action.Action; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; @@ -33,7 +35,7 @@ public class ActionNop extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartItem, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { //output.add(new SimpleActionTreeItem(this, "nop();")); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java index b6042ac3a..71de5fe88 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java @@ -28,6 +28,7 @@ import com.jpexs.decompiler.flash.action.model.UnLoadMovieNumActionItem; import com.jpexs.decompiler.flash.action.parser.ActionParseException; import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.helpers.Helper; @@ -86,11 +87,11 @@ public class ActionGetURL extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { String fsCommandPrefix = "FSCommand:"; if (urlString.startsWith(fsCommandPrefix) && targetString.isEmpty()) { String command = urlString.substring(fsCommandPrefix.length()); - output.add(new FSCommandActionItem(this, new DirectValueActionItem(command))); + output.add(new FSCommandActionItem(this, lineStartAction, new DirectValueActionItem(command))); return; } String levelPrefix = "_level"; @@ -98,10 +99,10 @@ public class ActionGetURL extends Action { try { int num = Integer.valueOf(targetString.substring(levelPrefix.length())); if (urlString.isEmpty()) { - output.add(new UnLoadMovieNumActionItem(this, new DirectValueActionItem((Long) (long) (int) num))); + output.add(new UnLoadMovieNumActionItem(this, lineStartAction, new DirectValueActionItem((Long) (long) (int) num))); } else { - DirectValueActionItem urlStringDi = new DirectValueActionItem(null, 0, urlString, new ArrayList<>()); - output.add(new LoadMovieNumActionItem(this, urlStringDi, new DirectValueActionItem((Long) (long) (int) num), 1/*GET*/)); + DirectValueActionItem urlStringDi = new DirectValueActionItem(null, null, 0, urlString, new ArrayList<>()); + output.add(new LoadMovieNumActionItem(this, lineStartAction, urlStringDi, new DirectValueActionItem((Long) (long) (int) num), 1/*GET*/)); } return; } catch (NumberFormatException nfe) { @@ -110,10 +111,10 @@ public class ActionGetURL extends Action { } if (urlString.isEmpty()) { - DirectValueActionItem targetStringDi = new DirectValueActionItem(null, 0, targetString, new ArrayList<>()); - output.add(new UnLoadMovieActionItem(this, targetStringDi)); + DirectValueActionItem targetStringDi = new DirectValueActionItem(null, null, 0, targetString, new ArrayList<>()); + output.add(new UnLoadMovieActionItem(this, lineStartAction, targetStringDi)); } else { - output.add(new GetURLActionItem(this, urlString, targetString)); + output.add(new GetURLActionItem(this, lineStartAction, urlString, targetString)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java index 9fb017a02..fe5280939 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.action.model.GotoLabelActionItem; import com.jpexs.decompiler.flash.action.parser.ActionParseException; import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.helpers.Helper; @@ -74,7 +75,7 @@ public class ActionGoToLabel extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { - output.add(new GotoLabelActionItem(this, label)); + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + output.add(new GotoLabelActionItem(this, lineStartAction, label)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java index 5341c54a6..d0109d593 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.action.model.GotoFrameActionItem; import com.jpexs.decompiler.flash.action.parser.ActionParseException; import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.io.IOException; @@ -70,7 +71,7 @@ public class ActionGotoFrame extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { - output.add(new GotoFrameActionItem(this, frame)); + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + output.add(new GotoFrameActionItem(this, lineStartAction, frame)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java index ed7081d88..625a04c8a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.NextFrameActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; @@ -37,7 +38,7 @@ public class ActionNextFrame extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { - output.add(new NextFrameActionItem(this)); + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + output.add(new NextFrameActionItem(this, lineStartAction)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java index 0e66af723..54bbdc3e0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.action.model.GotoFrame2ActionItem; import com.jpexs.decompiler.flash.action.model.GotoFrameActionItem; import com.jpexs.decompiler.flash.action.model.PlayActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; @@ -40,12 +41,12 @@ public class ActionPlay extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { if (!output.isEmpty() && (output.get(output.size() - 1) instanceof GotoFrameActionItem)) { GotoFrameActionItem gta = (GotoFrameActionItem) output.remove(output.size() - 1); - output.add(new GotoFrame2ActionItem(this, new DirectValueActionItem(gta.frame + 1), false, true, 0)); + output.add(new GotoFrame2ActionItem(this, lineStartAction, new DirectValueActionItem(gta.frame + 1), false, true, 0)); } else { - output.add(new PlayActionItem(this)); + output.add(new PlayActionItem(this, lineStartAction)); } } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java index fca6fa44a..4a522f595 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.PrevFrameActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; @@ -37,7 +38,7 @@ public class ActionPrevFrame extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { - output.add(new PrevFrameActionItem(this)); + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + output.add(new PrevFrameActionItem(this, lineStartAction)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java index b2708026e..17649c0f9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.action.model.SetTargetActionItem; import com.jpexs.decompiler.flash.action.parser.ActionParseException; import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.helpers.Helper; @@ -74,7 +75,7 @@ public class ActionSetTarget extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { - output.add(new SetTargetActionItem(this, targetName)); + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + output.add(new SetTargetActionItem(this, lineStartAction, targetName)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java index e71206ea7..b2c636ed4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.StopActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; @@ -37,7 +38,7 @@ public class ActionStop extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { - output.add(new StopActionItem(this)); + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + output.add(new StopActionItem(this, lineStartAction)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java index 0f261c3a3..fd229ee06 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.StopAllSoundsActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; @@ -37,7 +38,7 @@ public class ActionStopSounds extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { - output.add(new StopAllSoundsActionItem(this)); + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + output.add(new StopAllSoundsActionItem(this, lineStartAction)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java index 5b101c229..475c33bd4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.ToggleHighQualityActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; @@ -37,7 +38,7 @@ public class ActionToggleQuality extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { - output.add(new ToggleHighQualityActionItem(this)); + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + output.add(new ToggleHighQualityActionItem(this, lineStartAction)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java index 4c2ab4ec1..4378baa17 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java @@ -29,6 +29,7 @@ import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; import com.jpexs.decompiler.flash.action.special.ActionStore; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.io.IOException; @@ -88,10 +89,10 @@ public class ActionWaitForFrame extends Action implements ActionStore { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) throws InterruptedException { - GraphTargetItem frameTi = new DirectValueActionItem(null, 0, new Long(frame), new ArrayList<>()); + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) throws InterruptedException { + GraphTargetItem frameTi = new DirectValueActionItem(null, null, 0, new Long(frame), new ArrayList<>()); List body = ActionGraph.translateViaGraph(regNames, variables, functions, skipped, SWF.DEFAULT_VERSION, staticOperation, path); - output.add(new IfFrameLoadedActionItem(frameTi, body, this)); + output.add(new IfFrameLoadedActionItem(frameTi, body, this, lineStartAction)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java index 1d4682f1b..6344a6427 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.AddActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; @@ -49,10 +50,10 @@ public class ActionAdd extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new AddActionItem(this, b, a, false)); + stack.push(new AddActionItem(this, lineStartAction, b, a, false)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java index fbc641c44..c850f37ab 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.AndActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; @@ -49,10 +50,10 @@ public class ActionAnd extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new AndActionItem(this, b, a)); + stack.push(new AndActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java index 7521ed7e0..2f7e8ce38 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.AsciiToCharActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; @@ -49,9 +50,9 @@ public class ActionAsciiToChar extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); - stack.push(new AsciiToCharActionItem(this, a)); + stack.push(new AsciiToCharActionItem(this, lineStartAction, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java index a19f8b8dc..9c5b24411 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java @@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.CallActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; @@ -42,8 +43,8 @@ public class ActionCall extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { - output.add(new CallActionItem(this, stack.pop())); + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + output.add(new CallActionItem(this, lineStartAction, stack.pop())); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java index 63d6b3d37..4cfbaed79 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.CharToAsciiActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,9 +49,9 @@ public class ActionCharToAscii extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); - stack.push(new CharToAsciiActionItem(this, a)); + stack.push(new CharToAsciiActionItem(this, lineStartAction, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java index afecc6e6b..e4271c1c3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.CloneSpriteActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,11 +38,11 @@ public class ActionCloneSprite extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem depth = stack.pop(); GraphTargetItem source = stack.pop(); GraphTargetItem target = stack.pop(); - output.add(new CloneSpriteActionItem(this, source, target, depth)); + output.add(new CloneSpriteActionItem(this, lineStartAction, source, target, depth)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java index f14f7e3b1..952ff7516 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.DivideActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionDivide extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new DivideActionItem(this, b, a)); + stack.push(new DivideActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java index 7696722ff..5fb35bc44 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.StopDragActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -37,7 +37,7 @@ public class ActionEndDrag extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { - output.add(new StopDragActionItem(this)); + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + output.add(new StopDragActionItem(this, lineStartAction)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java index 2b78547e3..33d45c92f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.EqActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionEquals extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new EqActionItem(this, b, a, false)); + stack.push(new EqActionItem(this, lineStartAction, b, a, false)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java index d706b4d95..e6028f615 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; import com.jpexs.decompiler.flash.action.model.GetPropertyActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -39,7 +39,7 @@ public class ActionGetProperty extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem index = stack.pop(); GraphTargetItem target = stack.pop(); int indexInt = 0; @@ -53,7 +53,7 @@ public class ActionGetProperty extends Action { indexInt = (int) Math.round((Float) value); } } - stack.push(new GetPropertyActionItem(this, target, indexInt)); + stack.push(new GetPropertyActionItem(this, lineStartAction, target, indexInt)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java index e70de883b..262e92911 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java @@ -20,7 +20,8 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.GetTimeActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,8 +39,8 @@ public class ActionGetTime extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { - stack.push(new GetTimeActionItem(this)); + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + stack.push(new GetTimeActionItem(this, lineStartAction)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java index edb50ee69..f613133a6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java @@ -36,6 +36,7 @@ import com.jpexs.decompiler.flash.action.parser.ActionParseException; import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; import com.jpexs.decompiler.flash.types.annotations.Reserved; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.io.IOException; @@ -105,7 +106,7 @@ public class ActionGetURL2 extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem targetString = stack.pop(); GraphTargetItem urlString = stack.pop(); Integer num = null; @@ -124,15 +125,15 @@ public class ActionGetURL2 extends Action { } if (loadVariablesFlag) { if (num != null) { - output.add(new LoadVariablesNumActionItem(this, urlString, new DirectValueActionItem(null, 0, (Long) (long) (int) num, new ArrayList<>()), sendVarsMethod)); + output.add(new LoadVariablesNumActionItem(this, lineStartAction, urlString, new DirectValueActionItem(null, null, 0, (Long) (long) (int) num, new ArrayList<>()), sendVarsMethod)); } else { - output.add(new LoadVariablesActionItem(this, urlString, targetString, sendVarsMethod)); + output.add(new LoadVariablesActionItem(this, lineStartAction, urlString, targetString, sendVarsMethod)); } } else if (loadTargetFlag) { if ((urlString instanceof DirectValueActionItem) && (urlString.getResult().equals(""))) { - output.add(new UnLoadMovieActionItem(this, targetString)); + output.add(new UnLoadMovieActionItem(this, lineStartAction, targetString)); } else { - output.add(new LoadMovieActionItem(this, urlString, targetString, sendVarsMethod)); + output.add(new LoadMovieActionItem(this, lineStartAction, urlString, targetString, sendVarsMethod)); } } else { String printPrefix = "print:#"; @@ -144,22 +145,22 @@ public class ActionGetURL2 extends Action { if (num != null) { if ("".equals(urlStr)) { - output.add(new UnLoadMovieNumActionItem(this, new DirectValueActionItem(null, 0, (Long) (long) (int) num, new ArrayList<>()))); + output.add(new UnLoadMovieNumActionItem(this, lineStartAction, new DirectValueActionItem(null, null, 0, (Long) (long) (int) num, new ArrayList<>()))); } else if (urlStr != null && urlStr.startsWith(printPrefix)) { - output.add(new PrintNumActionItem(this, new DirectValueActionItem((Long) (long) (int) num), + output.add(new PrintNumActionItem(this, lineStartAction, new DirectValueActionItem((Long) (long) (int) num), new DirectValueActionItem(urlStr.substring(printPrefix.length())))); } else if (urlStr != null && urlStr.startsWith(printAsBitmapPrefix)) { - output.add(new PrintAsBitmapNumActionItem(this, new DirectValueActionItem((Long) (long) (int) num), new DirectValueActionItem(urlStr.substring(printAsBitmapPrefix.length())))); + output.add(new PrintAsBitmapNumActionItem(this, lineStartAction, new DirectValueActionItem((Long) (long) (int) num), new DirectValueActionItem(urlStr.substring(printAsBitmapPrefix.length())))); } else { - output.add(new LoadMovieNumActionItem(this, urlString, new DirectValueActionItem(null, 0, (Long) (long) (int) num, new ArrayList<>()), sendVarsMethod)); + output.add(new LoadMovieNumActionItem(this, lineStartAction, urlString, new DirectValueActionItem(null, null, 0, (Long) (long) (int) num, new ArrayList<>()), sendVarsMethod)); } } else { if (urlStr != null && urlStr.startsWith(printPrefix)) { - output.add(new PrintActionItem(this, targetString, new DirectValueActionItem(urlStr.substring(printPrefix.length())))); + output.add(new PrintActionItem(this, lineStartAction, targetString, new DirectValueActionItem(urlStr.substring(printPrefix.length())))); } else if (urlStr != null && urlStr.startsWith(printAsBitmapPrefix)) { - output.add(new PrintAsBitmapActionItem(this, targetString, new DirectValueActionItem(urlStr.substring(printAsBitmapPrefix.length())))); + output.add(new PrintAsBitmapActionItem(this, lineStartAction, targetString, new DirectValueActionItem(urlStr.substring(printAsBitmapPrefix.length())))); } else { - output.add(new GetURL2ActionItem(this, urlString, targetString, sendVarsMethod)); + output.add(new GetURL2ActionItem(this, lineStartAction, urlString, targetString, sendVarsMethod)); } } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java index 6253a213c..e9da44a51 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java @@ -26,7 +26,7 @@ import com.jpexs.decompiler.flash.action.model.GetVersionActionItem; import com.jpexs.decompiler.flash.ecma.EcmaScript; import com.jpexs.decompiler.flash.ecma.Undefined; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.decompiler.graph.model.LocalData; import java.util.HashMap; @@ -60,7 +60,7 @@ public class ActionGetVariable extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem name = stack.pop(); String nameStr; if (name instanceof DirectValueActionItem) { @@ -70,11 +70,11 @@ public class ActionGetVariable extends Action { } GraphTargetItem computedVal = variables.get(nameStr); if (name instanceof DirectValueActionItem && ((DirectValueActionItem) name).value.equals("/:$version")) { - stack.push(new GetVersionActionItem(this)); + stack.push(new GetVersionActionItem(this, lineStartAction)); } else if (!(name instanceof DirectValueActionItem) && !(name instanceof GetVariableActionItem)) { - stack.push(new EvalActionItem(this, name)); + stack.push(new EvalActionItem(this, lineStartAction, name)); } else { - GetVariableActionItem gvt = new GetVariableActionItem(this, name); + GetVariableActionItem gvt = new GetVariableActionItem(this, lineStartAction, name); gvt.setComputedValue(computedVal); stack.push(gvt); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java index a0025f66f..45d9413fc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java @@ -25,7 +25,7 @@ import com.jpexs.decompiler.flash.action.parser.ActionParseException; import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; import com.jpexs.decompiler.flash.types.annotations.Reserved; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.io.IOException; import java.util.HashMap; @@ -100,9 +100,9 @@ public class ActionGotoFrame2 extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem frame = stack.pop(); - output.add(new GotoFrame2ActionItem(this, frame, sceneBiasFlag, playFlag, sceneBias)); + output.add(new GotoFrame2ActionItem(this, lineStartAction, frame, sceneBiasFlag, playFlag, sceneBias)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java index f3e8db1d4..3253534a2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.LtActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionLess extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new LtActionItem(this, b, a, false)); + stack.push(new LtActionItem(this, lineStartAction, b, a, false)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java index dbe64b423..3d0213865 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.MBAsciiToCharActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,9 +49,9 @@ public class ActionMBAsciiToChar extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); - stack.push(new MBAsciiToCharActionItem(this, a)); + stack.push(new MBAsciiToCharActionItem(this, lineStartAction, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java index 844535bfd..bd2d02257 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.MBCharToAsciiActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,9 +49,9 @@ public class ActionMBCharToAscii extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); - stack.push(new MBCharToAsciiActionItem(this, a)); + stack.push(new MBCharToAsciiActionItem(this, lineStartAction, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java index 0b503275d..96ee53185 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.MBStringExtractActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,11 +49,11 @@ public class ActionMBStringExtract extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem count = stack.pop(); GraphTargetItem index = stack.pop(); GraphTargetItem value = stack.pop(); - stack.push(new MBStringExtractActionItem(this, value, index, count)); + stack.push(new MBStringExtractActionItem(this, lineStartAction, value, index, count)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java index 6c0c8dba1..0a14b5d65 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.MBStringLengthActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,9 +49,9 @@ public class ActionMBStringLength extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); - stack.push(new MBStringLengthActionItem(this, a)); + stack.push(new MBStringLengthActionItem(this, lineStartAction, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java index 895aede13..c44e419d7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.MultiplyActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionMultiply extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new MultiplyActionItem(this, b, a)); + stack.push(new MultiplyActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java index 572e2767c..2b13beb73 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.decompiler.graph.model.NotItem; import java.util.HashMap; @@ -49,7 +49,7 @@ public class ActionNot extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); stack.push(a.invert(this)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java index 4f8596d2b..ef06f807c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.OrActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionOr extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new OrActionItem(this, b, a)); + stack.push(new OrActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java index 703ebbd25..95c313851 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -37,7 +37,7 @@ public class ActionPop extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem val = stack.pop(); output.add(val); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java index cc7be27f9..f256685b4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java @@ -37,6 +37,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.flash.helpers.HighlightedTextWriter; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.decompiler.graph.model.FalseItem; @@ -392,7 +393,7 @@ public class ActionPush extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { int pos = 0; for (Object o : values) { if (ignoredParts.contains(pos)) { @@ -419,9 +420,9 @@ public class ActionPush extends Action { SetTypeActionItem stt = (SetTypeActionItem) last; stt.setTempRegister(((RegisterNumber) o).number); if ((stt.getValue() instanceof IncrementActionItem) && (((IncrementActionItem) stt.getValue()).object.equals(stt.getObject()))) { - stack.push(new PreIncrementActionItem(this, stt.getObject())); + stack.push(new PreIncrementActionItem(this, lineStartAction, stt.getObject())); } else if ((stt.getValue() instanceof DecrementActionItem) && (((DecrementActionItem) stt.getValue()).object.equals(stt.getObject()))) { - stack.push(new PreDecrementActionItem(this, stt.getObject())); + stack.push(new PreDecrementActionItem(this, lineStartAction, stt.getObject())); } else { //stack.push(last); continue; @@ -438,12 +439,12 @@ public class ActionPush extends Action { if (o instanceof Boolean) { Boolean b = (Boolean) o; if (b) { - stack.push(new TrueItem(this)); + stack.push(new TrueItem(this, lineStartAction)); } else { - stack.push(new FalseItem(this)); + stack.push(new FalseItem(this, lineStartAction)); } } else { - DirectValueActionItem dvt = new DirectValueActionItem(this, pos, o, constantPool); + DirectValueActionItem dvt = new DirectValueActionItem(this, lineStartAction, pos, o, constantPool); if (o instanceof RegisterNumber) {//TemporaryRegister dvt.computedRegValue = variables.get("__register" + ((RegisterNumber) o).number); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java index 7738b2468..2e6b1ff00 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.RandomNumberActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,9 +38,9 @@ public class ActionRandomNumber extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem maximum = stack.pop(); - stack.push(new RandomNumberActionItem(this, maximum)); + stack.push(new RandomNumberActionItem(this, lineStartAction, maximum)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java index 0d1113747..cbc6a3f10 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.RemoveSpriteActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,9 +38,9 @@ public class ActionRemoveSprite extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem target = stack.pop(); - output.add(new RemoveSpriteActionItem(this, target)); + output.add(new RemoveSpriteActionItem(this, lineStartAction, target)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java index b51ab6caf..88d9d105c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java @@ -30,7 +30,7 @@ import com.jpexs.decompiler.flash.action.model.TemporaryRegister; import com.jpexs.decompiler.flash.action.model.operations.PreDecrementActionItem; import com.jpexs.decompiler.flash.action.model.operations.PreIncrementActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -48,7 +48,7 @@ public class ActionSetProperty extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop().getThroughDuplicate(); GraphTargetItem index = stack.pop().getThroughDuplicate(); GraphTargetItem target = stack.pop().getThroughDuplicate(); @@ -66,7 +66,7 @@ public class ActionSetProperty extends Action { GraphTargetItem obj = ((IncrementActionItem) value).object; if (!stack.isEmpty() && stack.peek().valueEquals(obj)) { stack.pop(); - stack.push(new PostIncrementActionItem(this, obj)); + stack.push(new PostIncrementActionItem(this, lineStartAction, obj)); return; } } @@ -74,12 +74,12 @@ public class ActionSetProperty extends Action { GraphTargetItem obj = ((DecrementActionItem) value).object; if (!stack.isEmpty() && stack.peek().valueEquals(obj)) { stack.pop(); - stack.push(new PostDecrementActionItem(this, obj)); + stack.push(new PostDecrementActionItem(this, lineStartAction, obj)); return; } } - GraphTargetItem ret = new SetPropertyActionItem(this, target, indexInt, value); + GraphTargetItem ret = new SetPropertyActionItem(this, lineStartAction, target, indexInt, value); if (value instanceof StoreRegisterActionItem) { StoreRegisterActionItem sr = (StoreRegisterActionItem) value; @@ -89,13 +89,13 @@ public class ActionSetProperty extends Action { if (value instanceof IncrementActionItem) { if (((IncrementActionItem) value).object instanceof GetPropertyActionItem) { if (((GetPropertyActionItem) ((IncrementActionItem) value).object).valueEquals(((SetPropertyActionItem) ret).getObject())) { - ret = new PreIncrementActionItem(this, ((IncrementActionItem) value).object); + ret = new PreIncrementActionItem(this, lineStartAction, ((IncrementActionItem) value).object); } } } else if (value instanceof DecrementActionItem) { if (((DecrementActionItem) value).object instanceof GetPropertyActionItem) { if (((GetPropertyActionItem) ((DecrementActionItem) value).object).valueEquals(((SetPropertyActionItem) ret).getObject())) { - ret = new PreDecrementActionItem(this, ((DecrementActionItem) value).object); + ret = new PreDecrementActionItem(this, lineStartAction, ((DecrementActionItem) value).object); } } } else { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java index e7a1f2975..ac9da5c6e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.SetTarget2ActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,9 +38,9 @@ public class ActionSetTarget2 extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem target = stack.pop(); - output.add(new SetTarget2ActionItem(this, target)); + output.add(new SetTarget2ActionItem(this, lineStartAction, target)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java index 2e77f5355..3d7db3072 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java @@ -34,7 +34,7 @@ import com.jpexs.decompiler.flash.action.model.operations.PreDecrementActionItem import com.jpexs.decompiler.flash.action.model.operations.PreIncrementActionItem; import com.jpexs.decompiler.flash.ecma.EcmaScript; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.decompiler.graph.model.LocalData; import java.util.HashMap; @@ -64,7 +64,7 @@ public class ActionSetVariable extends Action implements StoreTypeAction { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop().getThroughDuplicate(); GraphTargetItem name = stack.pop(); String nameStr; @@ -78,7 +78,7 @@ public class ActionSetVariable extends Action implements StoreTypeAction { GraphTargetItem obj = ((IncrementActionItem) value).object; if (!stack.isEmpty() && stack.peek().valueEquals(obj)) { stack.pop(); - stack.push(new PostIncrementActionItem(this, obj)); + stack.push(new PostIncrementActionItem(this, lineStartAction, obj)); return; } } @@ -86,14 +86,14 @@ public class ActionSetVariable extends Action implements StoreTypeAction { GraphTargetItem obj = ((DecrementActionItem) value).object; if (!stack.isEmpty() && stack.peek().valueEquals(obj)) { stack.pop(); - stack.push(new PostDecrementActionItem(this, obj)); + stack.push(new PostDecrementActionItem(this, lineStartAction, obj)); return; } } if (value instanceof IncrementActionItem) { if (((IncrementActionItem) value).object instanceof GetVariableActionItem) { if (((GetVariableActionItem) ((IncrementActionItem) value).object).name.valueEquals(name)) { - output.add(new PostIncrementActionItem(this, ((IncrementActionItem) value).object)); + output.add(new PostIncrementActionItem(this, lineStartAction, ((IncrementActionItem) value).object)); return; } } @@ -101,13 +101,13 @@ public class ActionSetVariable extends Action implements StoreTypeAction { if (value instanceof DecrementActionItem) { if (((DecrementActionItem) value).object instanceof GetVariableActionItem) { if (((GetVariableActionItem) ((DecrementActionItem) value).object).name.valueEquals(name)) { - output.add(new PostDecrementActionItem(this, ((DecrementActionItem) value).object)); + output.add(new PostDecrementActionItem(this, lineStartAction, ((DecrementActionItem) value).object)); return; } } } - GraphTargetItem ret = new SetVariableActionItem(this, name, value); + GraphTargetItem ret = new SetVariableActionItem(this, lineStartAction, name, value); if (value instanceof StoreRegisterActionItem) { StoreRegisterActionItem sr = (StoreRegisterActionItem) value; @@ -117,13 +117,13 @@ public class ActionSetVariable extends Action implements StoreTypeAction { if (value instanceof IncrementActionItem) { if (((IncrementActionItem) value).object instanceof GetVariableActionItem) { if (((GetVariableActionItem) ((IncrementActionItem) value).object).name.valueEquals(name)) { - ret = new PreIncrementActionItem(this, ((IncrementActionItem) value).object); + ret = new PreIncrementActionItem(this, lineStartAction, ((IncrementActionItem) value).object); } } } else if (value instanceof DecrementActionItem) { if (((DecrementActionItem) value).object instanceof GetVariableActionItem) { if (((GetVariableActionItem) ((DecrementActionItem) value).object).name.valueEquals(name)) { - ret = new PreDecrementActionItem(this, ((DecrementActionItem) value).object); + ret = new PreDecrementActionItem(this, lineStartAction, ((DecrementActionItem) value).object); } } } else { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java index 107cec519..2d0b454e1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; import com.jpexs.decompiler.flash.action.model.StartDragActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -39,7 +39,7 @@ public class ActionStartDrag extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem target = stack.pop(); GraphTargetItem lockCenter = stack.pop(); GraphTargetItem constrain = stack.pop(); @@ -62,7 +62,7 @@ public class ActionStartDrag extends Action { x1 = stack.pop(); } - output.add(new StartDragActionItem(this, target, lockCenter, constrain, x1, y1, x2, y2)); + output.add(new StartDragActionItem(this, lineStartAction, target, lockCenter, constrain, x1, y1, x2, y2)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java index 30dc07a82..d66fdba8b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.StringAddActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionStringAdd extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new StringAddActionItem(this, b, a)); + stack.push(new StringAddActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java index 4306b92e9..13ddf064a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.StringEqActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionStringEquals extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new StringEqActionItem(this, b, a)); + stack.push(new StringEqActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java index f23a3d0ea..7b99edc63 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.StringExtractActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,11 +49,11 @@ public class ActionStringExtract extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem count = stack.pop(); GraphTargetItem index = stack.pop(); GraphTargetItem value = stack.pop(); - stack.push(new StringExtractActionItem(this, value, index, count)); + stack.push(new StringExtractActionItem(this, lineStartAction, value, index, count)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java index 02220606f..3deab7106 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.StringLengthActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,9 +49,9 @@ public class ActionStringLength extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); - stack.push(new StringLengthActionItem(this, a)); + stack.push(new StringLengthActionItem(this, lineStartAction, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java index 4a4720ba5..918d86b61 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.StringLtActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionStringLess extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new StringLtActionItem(this, b, a)); + stack.push(new StringLtActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java index 7ec7bcda1..bc3a70203 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.SubtractActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionSubtract extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new SubtractActionItem(this, b, a)); + stack.push(new SubtractActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java index 91e4431a9..c3dcd8b0c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.ToIntegerActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,9 +49,9 @@ public class ActionToInteger extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); - stack.push(new ToIntegerActionItem(this, a)); + stack.push(new ToIntegerActionItem(this, lineStartAction, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java index a19760eaa..fc0353eca 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.TraceActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,9 +38,9 @@ public class ActionTrace extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop(); - output.add(new TraceActionItem(this, value)); + output.add(new TraceActionItem(this, lineStartAction, value)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java index c91b893c9..2bb6013ee 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java @@ -29,6 +29,7 @@ import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; import com.jpexs.decompiler.flash.action.special.ActionStore; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.io.IOException; @@ -134,10 +135,10 @@ public class ActionWaitForFrame2 extends Action implements ActionStore { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) throws InterruptedException { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) throws InterruptedException { GraphTargetItem frame = stack.pop(); List body = ActionGraph.translateViaGraph(regNames, variables, functions, skipped, SWF.DEFAULT_VERSION, staticOperation, path); - output.add(new IfFrameLoadedActionItem(frame, body, this)); + output.add(new IfFrameLoadedActionItem(frame, body, this, lineStartAction)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java index e8a271e40..7ef5f3988 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.AddActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionAdd2 extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new AddActionItem(this, b, a, true)); + stack.push(new AddActionItem(this, lineStartAction, b, a, true)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java index d68247599..0a2505c44 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.BitAndActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionBitAnd extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new BitAndActionItem(this, b, a)); + stack.push(new BitAndActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java index 4d045a43c..bc1a4649a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.LShiftActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionBitLShift extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new LShiftActionItem(this, b, a)); + stack.push(new LShiftActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java index 6ddd5366f..aff79e988 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.BitOrActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionBitOr extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new BitOrActionItem(this, b, a)); + stack.push(new BitOrActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java index 5e8442af5..90fd8387c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.RShiftActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionBitRShift extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new RShiftActionItem(this, b, a)); + stack.push(new RShiftActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java index 003a25d68..2b8ad4850 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.URShiftActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionBitURShift extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new URShiftActionItem(this, b, a)); + stack.push(new URShiftActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java index 0644a991b..8d31521fa 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.BitXorActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionBitXor extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new BitXorActionItem(this, b, a)); + stack.push(new BitXorActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java index 283cf68eb..a1473fc7a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.CallFunctionActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; @@ -46,14 +46,14 @@ public class ActionCallFunction extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem functionName = stack.pop(); long numArgs = popLong(stack); List args = new ArrayList<>(); for (long l = 0; l < numArgs; l++) { args.add(stack.pop()); } - CallFunctionActionItem cft = new CallFunctionActionItem(this, functionName, args); + CallFunctionActionItem cft = new CallFunctionActionItem(this, lineStartAction, functionName, args); cft.calculatedFunction = functions.get(functionName.toStringNoQuotes(LocalData.empty)); stack.push(cft); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java index 344621245..fb71b1637 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.CallMethodActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.ArrayList; import java.util.HashMap; @@ -39,7 +39,7 @@ public class ActionCallMethod extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem methodName = stack.pop(); GraphTargetItem scriptObject = stack.pop(); long numArgs = popLong(stack); @@ -47,7 +47,7 @@ public class ActionCallMethod extends Action { for (long l = 0; l < numArgs; l++) { args.add(stack.pop()); } - stack.push(new CallMethodActionItem(this, scriptObject, methodName, args)); + stack.push(new CallMethodActionItem(this, lineStartAction, scriptObject, methodName, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java index 63fe0c243..f7944293c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java @@ -24,7 +24,7 @@ import com.jpexs.decompiler.flash.action.parser.ActionParseException; import com.jpexs.decompiler.flash.action.parser.pcode.ASMParsedSymbol; import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.helpers.Helper; import com.jpexs.helpers.utf8.Utf8Helper; @@ -112,6 +112,6 @@ public class ActionConstantPool extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java index da89f7d9b..aba88e58a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.DecrementActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,9 +49,9 @@ public class ActionDecrement extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); - stack.push(new DecrementActionItem(this, a)); + stack.push(new DecrementActionItem(this, lineStartAction, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java index 5f365aa60..ef645b520 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java @@ -27,6 +27,7 @@ import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; import com.jpexs.decompiler.graph.GraphSourceItemContainer; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.helpers.Helper; @@ -143,7 +144,7 @@ public class ActionDefineFunction extends Action implements GraphSourceItemConta } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { } @Override @@ -152,8 +153,8 @@ public class ActionDefineFunction extends Action implements GraphSourceItemConta } @Override - public void translateContainer(List> content, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions) { - FunctionActionItem fti = new FunctionActionItem(this, functionName, paramNames, content.get(0), constantPool, 1, new ArrayList<>()); + public void translateContainer(List> content, GraphSourceItem lineStartItem, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions) { + FunctionActionItem fti = new FunctionActionItem(this, lineStartItem, functionName, paramNames, content.get(0), constantPool, 1, new ArrayList<>()); //ActionGraph.translateViaGraph(regNames, variables, functions, code, version) stack.push(fti); functions.put(functionName, fti); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java index 197dedee5..13e18983e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java @@ -23,7 +23,7 @@ import com.jpexs.decompiler.flash.action.model.DefineLocalActionItem; import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; import com.jpexs.decompiler.flash.ecma.EcmaScript; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.decompiler.graph.model.LocalData; import java.util.HashMap; @@ -53,7 +53,7 @@ public class ActionDefineLocal extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop(); GraphTargetItem name = stack.pop(); String nameStr; @@ -63,7 +63,7 @@ public class ActionDefineLocal extends Action { nameStr = EcmaScript.toString(name.getResult()); } variables.put(nameStr, value); - output.add(new DefineLocalActionItem(this, name, value)); + output.add(new DefineLocalActionItem(this, lineStartAction, name, value)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java index e9c46ba81..541cc966f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.DefineLocalActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,9 +38,9 @@ public class ActionDefineLocal2 extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem name = stack.pop(); - output.add(new DefineLocalActionItem(this, name, null)); + output.add(new DefineLocalActionItem(this, lineStartAction, name, null)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java index c6e57feac..e911b9e1f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.DeleteActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,11 +38,11 @@ public class ActionDelete extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem propertyName = stack.pop(); GraphTargetItem object = stack.pop(); - stack.push(new DeleteActionItem(this, object, propertyName)); + stack.push(new DeleteActionItem(this, lineStartAction, object, propertyName)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java index d441ab8e2..0946aaa74 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.DeleteActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,10 +38,10 @@ public class ActionDelete2 extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem propertyName = stack.pop(); - stack.push(new DeleteActionItem(this, null, propertyName)); + stack.push(new DeleteActionItem(this, lineStartAction, null, propertyName)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java index 1c6ed3daf..85572c483 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.EnumerateActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,10 +38,10 @@ public class ActionEnumerate extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); //stack.push(new DirectValueActionItem(null, 0, new Null(), new ArrayList())); - output.add(new EnumerateActionItem(this, object)); + output.add(new EnumerateActionItem(this, lineStartAction, object)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java index 1eb2f1cbb..0f186c63f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.EqActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionEquals2 extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new EqActionItem(this, b, a, true)); + stack.push(new EqActionItem(this, lineStartAction, b, a, true)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java index fa6892f09..2d0d40708 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.GetMemberActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,10 +38,10 @@ public class ActionGetMember extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem functionName = stack.pop(); GraphTargetItem object = stack.pop(); - stack.push(new GetMemberActionItem(this, object, functionName)); + stack.push(new GetMemberActionItem(this, lineStartAction, object, functionName)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java index 3660056b5..7ceb95780 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.IncrementActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,9 +49,9 @@ public class ActionIncrement extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); - stack.push(new IncrementActionItem(this, a)); + stack.push(new IncrementActionItem(this, lineStartAction, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java index e627d4b8a..2d71025f9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.InitArrayActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.ArrayList; import java.util.HashMap; @@ -34,13 +34,13 @@ public class ActionInitArray extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { long numArgs = popLong(stack); List args = new ArrayList<>(); for (int l = 0; l < numArgs; l++) { args.add(stack.pop()); } - stack.push(new InitArrayActionItem(this, args)); + stack.push(new InitArrayActionItem(this, lineStartAction, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java index ebda54893..096001cb2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.InitObjectActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.ArrayList; import java.util.HashMap; @@ -39,7 +39,7 @@ public class ActionInitObject extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { long numArgs = popLong(stack); List values = new ArrayList<>(); List names = new ArrayList<>(); @@ -47,7 +47,7 @@ public class ActionInitObject extends Action { values.add(stack.pop()); names.add(stack.pop()); } - stack.push(new InitObjectActionItem(this, names, values)); + stack.push(new InitObjectActionItem(this, lineStartAction, names, values)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java index 2755828d1..4398f97e5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.LtActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionLess2 extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new LtActionItem(this, b, a, true)); + stack.push(new LtActionItem(this, lineStartAction, b, a, true)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java index 7ed2678f0..b61fc8d60 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.ModuloActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionModulo extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new ModuloActionItem(this, b, a)); + stack.push(new ModuloActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java index bb24ce064..8f7ce73ec 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.NewMethodActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.ArrayList; import java.util.HashMap; @@ -39,7 +39,7 @@ public class ActionNewMethod extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem methodName = stack.pop(); GraphTargetItem scriptObject = stack.pop(); long numArgs = popLong(stack); @@ -47,7 +47,7 @@ public class ActionNewMethod extends Action { for (long l = 0; l < numArgs; l++) { args.add(stack.pop()); } - stack.push(new NewMethodActionItem(this, scriptObject, methodName, args)); + stack.push(new NewMethodActionItem(this, lineStartAction, scriptObject, methodName, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java index 3aef2129e..2d2aa879f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.NewObjectActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.ArrayList; import java.util.HashMap; @@ -39,14 +39,14 @@ public class ActionNewObject extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem objectName = stack.pop(); long numArgs = popLong(stack); List args = new ArrayList<>(); for (long l = 0; l < numArgs; l++) { args.add(stack.pop()); } - stack.push(new NewObjectActionItem(this, objectName, args)); + stack.push(new NewObjectActionItem(this, lineStartAction, objectName, args)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java index bb292734b..5eb340a97 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.decompiler.graph.model.DuplicateItem; @@ -50,9 +51,9 @@ public class ActionPushDuplicate extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.peek(); - stack.push(new DuplicateItem(this, value)); + stack.push(new DuplicateItem(this, lineStartAction, value)); value.getMoreSrc().add(new GraphSourceItemPos(this, 0)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java index 4f27d2943..8bf7bc81f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.ReturnActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -51,9 +51,9 @@ public class ActionReturn extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop(); - output.add(new ReturnActionItem(this, value)); + output.add(new ReturnActionItem(this, lineStartAction, value)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java index 434b082b9..40a89ec12 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java @@ -29,7 +29,7 @@ import com.jpexs.decompiler.flash.action.model.TemporaryRegister; import com.jpexs.decompiler.flash.action.model.operations.PreDecrementActionItem; import com.jpexs.decompiler.flash.action.model.operations.PreIncrementActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -47,7 +47,7 @@ public class ActionSetMember extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop().getThroughDuplicate(); GraphTargetItem memberName = stack.pop(); GraphTargetItem object = stack.pop(); @@ -55,7 +55,7 @@ public class ActionSetMember extends Action { GraphTargetItem obj = ((IncrementActionItem) value).object; if (!stack.isEmpty() && stack.peek().valueEquals(obj)) { stack.pop(); - stack.push(new PostIncrementActionItem(this, obj)); + stack.push(new PostIncrementActionItem(this, lineStartAction, obj)); return; } } @@ -63,7 +63,7 @@ public class ActionSetMember extends Action { GraphTargetItem obj = ((DecrementActionItem) value).object; if (!stack.isEmpty() && stack.peek().valueEquals(obj)) { stack.pop(); - stack.push(new PostDecrementActionItem(this, obj)); + stack.push(new PostDecrementActionItem(this, lineStartAction, obj)); return; } } @@ -72,7 +72,7 @@ public class ActionSetMember extends Action { if (((IncrementActionItem) value).object instanceof GetMemberActionItem) { if (((GetMemberActionItem) ((IncrementActionItem) value).object).object.equals(object)) { if (((GetMemberActionItem) ((IncrementActionItem) value).object).memberName.equals(memberName)) { - output.add(new PostIncrementActionItem(this, ((IncrementActionItem) value).object)); + output.add(new PostIncrementActionItem(this, lineStartAction, ((IncrementActionItem) value).object)); return; } } @@ -82,13 +82,13 @@ public class ActionSetMember extends Action { if (((DecrementActionItem) value).object instanceof GetMemberActionItem) { if (((GetMemberActionItem) ((DecrementActionItem) value).object).object.valueEquals(object)) { if (((GetMemberActionItem) ((DecrementActionItem) value).object).memberName.equals(memberName)) { - output.add(new PostDecrementActionItem(this, ((DecrementActionItem) value).object)); + output.add(new PostDecrementActionItem(this, lineStartAction, ((DecrementActionItem) value).object)); return; } } } } - GraphTargetItem ret = new SetMemberActionItem(this, object, memberName, value); + GraphTargetItem ret = new SetMemberActionItem(this, lineStartAction, object, memberName, value); if (value instanceof StoreRegisterActionItem) { StoreRegisterActionItem sr = (StoreRegisterActionItem) value; if (sr.define) { @@ -97,13 +97,13 @@ public class ActionSetMember extends Action { if (value instanceof IncrementActionItem) { if (((IncrementActionItem) value).object instanceof GetMemberActionItem) { if (((GetMemberActionItem) ((IncrementActionItem) value).object).valueEquals(((SetMemberActionItem) ret).getObject())) { - ret = new PreIncrementActionItem(this, ((IncrementActionItem) value).object); + ret = new PreIncrementActionItem(this, lineStartAction, ((IncrementActionItem) value).object); } } } else if (value instanceof DecrementActionItem) { if (((DecrementActionItem) value).object instanceof GetMemberActionItem) { if (((GetMemberActionItem) ((DecrementActionItem) value).object).valueEquals(((SetMemberActionItem) ret).getObject())) { - ret = new PreDecrementActionItem(this, ((DecrementActionItem) value).object); + ret = new PreDecrementActionItem(this, lineStartAction, ((DecrementActionItem) value).object); } } } else { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java index fc635747f..59f02937b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -52,7 +52,7 @@ public class ActionStackSwap extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(a); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java index d3cb924d2..1550d24aa 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java @@ -34,7 +34,7 @@ import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.io.IOException; import java.util.HashMap; @@ -81,7 +81,7 @@ public class ActionStoreRegister extends Action implements StoreTypeAction { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop(); RegisterNumber rn = new RegisterNumber(registerNumber); if (regNames.containsKey(registerNumber)) { @@ -117,7 +117,7 @@ public class ActionStoreRegister extends Action implements StoreTypeAction { GraphTargetItem obj = ((IncrementActionItem) value).object; if (!stack.isEmpty() && stack.peek().valueEquals(obj)) { stack.pop(); - stack.push(new PostIncrementActionItem(this, obj)); + stack.push(new PostIncrementActionItem(this, lineStartAction, obj)); stack.push(obj); return; } @@ -126,12 +126,12 @@ public class ActionStoreRegister extends Action implements StoreTypeAction { GraphTargetItem obj = ((DecrementActionItem) value).object; if (!stack.isEmpty() && stack.peek().valueEquals(obj)) { stack.pop(); - stack.push(new PostDecrementActionItem(this, obj)); + stack.push(new PostDecrementActionItem(this, lineStartAction, obj)); stack.push(obj); return; } } - stack.push(new StoreRegisterActionItem(this, rn, value, define)); + stack.push(new StoreRegisterActionItem(this, lineStartAction, rn, value, define)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java index 8ebdd7b6a..0b54849a8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.TargetPathActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,9 +38,9 @@ public class ActionTargetPath extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); - stack.push(new TargetPathActionItem(this, object)); + stack.push(new TargetPathActionItem(this, lineStartAction, object)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java index c93c55c74..507b0477c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.ToNumberActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,9 +49,9 @@ public class ActionToNumber extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); - stack.push(new ToNumberActionItem(this, object)); + stack.push(new ToNumberActionItem(this, lineStartAction, object)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java index 055cb4edd..4a5243d4b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.ToStringActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,9 +49,9 @@ public class ActionToString extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); - stack.push(new ToStringActionItem(this, object)); + stack.push(new ToStringActionItem(this, lineStartAction, object)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java index 7753feb7c..feb06df82 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.TypeOfActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,9 +49,9 @@ public class ActionTypeOf extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); - stack.push(new TypeOfActionItem(this, object)); + stack.push(new TypeOfActionItem(this, lineStartAction, object)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java index e34d818c2..edfa89d52 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java @@ -26,6 +26,7 @@ import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; import com.jpexs.decompiler.graph.GraphSourceItemContainer; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.io.IOException; @@ -84,8 +85,8 @@ public class ActionWith extends Action implements GraphSourceItemContainer { } @Override - public void translateContainer(List> content, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions) { - output.add(new WithActionItem(this, stack.pop(), content.get(0))); + public void translateContainer(List> content, GraphSourceItem lineStartItem, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions) { + output.add(new WithActionItem(this, lineStartItem, stack.pop(), content.get(0))); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java index d0d9feec3..a5990e109 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.EnumerateActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,9 +38,9 @@ public class ActionEnumerate2 extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); - output.add(new EnumerateActionItem(this, object)); + output.add(new EnumerateActionItem(this, lineStartAction, object)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java index 6e7611ad9..339177e45 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.GtActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionGreater extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new GtActionItem(this, b, a)); + stack.push(new GtActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java index 13ab2d5b5..7c5dd10d9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.operations.InstanceOfActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,10 +38,10 @@ public class ActionInstanceOf extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new InstanceOfActionItem(this, b, a)); + stack.push(new InstanceOfActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java index 242d87fac..2bd5e5476 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.StrictEqActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionStrictEquals extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new StrictEqActionItem(this, b, a)); + stack.push(new StrictEqActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java index 6e4e429e5..e49660313 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java @@ -21,7 +21,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; import com.jpexs.decompiler.flash.action.model.operations.StringGtActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -49,10 +49,10 @@ public class ActionStringGreater extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); - stack.push(new StringGtActionItem(this, b, a)); + stack.push(new StringGtActionItem(this, lineStartAction, b, a)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java index 905f06ab7..f41e576e6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.CastOpActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,10 +38,10 @@ public class ActionCastOp extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); GraphTargetItem constructor = stack.pop(); - stack.push(new CastOpActionItem(this, constructor, object)); + stack.push(new CastOpActionItem(this, lineStartAction, constructor, object)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java index b37f27174..8a15f0041 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java @@ -28,6 +28,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.flash.types.annotations.Reserved; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; import com.jpexs.decompiler.graph.GraphSourceItemContainer; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.helpers.Helper; @@ -251,7 +252,7 @@ public class ActionDefineFunction2 extends Action implements GraphSourceItemCont } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { } @Override @@ -292,8 +293,8 @@ public class ActionDefineFunction2 extends Action implements GraphSourceItemCont } @Override - public void translateContainer(List> content, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions) { - FunctionActionItem fti = new FunctionActionItem(this, functionName, paramNames, content.get(0), constantPool, getFirstRegister(), new ArrayList<>()); + public void translateContainer(List> content, GraphSourceItem lineStartItem, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions) { + FunctionActionItem fti = new FunctionActionItem(this, lineStartItem, functionName, paramNames, content.get(0), constantPool, getFirstRegister(), new ArrayList<>()); functions.put(functionName, fti); stack.push(fti); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java index d4df42a68..98519e54f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.ExtendsActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,10 +38,10 @@ public class ActionExtends extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem superclass = stack.pop(); GraphTargetItem subclass = stack.pop(); - output.add(new ExtendsActionItem(this, subclass, superclass)); + output.add(new ExtendsActionItem(this, lineStartAction, subclass, superclass)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java index 8e0cceedd..dad976ed1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.ImplementsOpActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.ArrayList; import java.util.HashMap; @@ -39,14 +39,14 @@ public class ActionImplementsOp extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem subclass = stack.pop(); long inCount = popLong(stack); List superclasses = new ArrayList<>(); for (long l = 0; l < inCount; l++) { superclasses.add(stack.pop()); } - output.add(new ImplementsOpActionItem(this, subclass, superclasses)); + output.add(new ImplementsOpActionItem(this, lineStartAction, subclass, superclasses)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java index 93b40afb6..18c86ccf8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.ThrowActionItem; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; -import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; @@ -38,9 +38,9 @@ public class ActionThrow extends Action { } @Override - public void translate(TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { + public void translate(GraphSourceItem lineStartAction, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); - output.add(new ThrowActionItem(this, object)); + output.add(new ThrowActionItem(this, lineStartAction, object)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java index 21fb7a748..4e5eb2ae1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java @@ -31,6 +31,7 @@ import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; import com.jpexs.decompiler.flash.types.annotations.Reserved; import com.jpexs.decompiler.flash.types.annotations.SWFVersion; import com.jpexs.decompiler.graph.GraphSourceItemContainer; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.helpers.Helper; @@ -261,13 +262,13 @@ public class ActionTry extends Action implements GraphSourceItemContainer { } @Override - public void translateContainer(List> contents, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions) { + public void translateContainer(List> contents, GraphSourceItem lineStartItem, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions) { List tryCommands = contents.get(0); ActionItem catchName; if (catchInRegisterFlag) { - catchName = new DirectValueActionItem(this, -1, new RegisterNumber(this.catchRegister), new ArrayList<>()); + catchName = new DirectValueActionItem(this, lineStartItem, -1, new RegisterNumber(this.catchRegister), new ArrayList<>()); } else { - catchName = new DirectValueActionItem(this, -1, this.catchName, new ArrayList<>()); + catchName = new DirectValueActionItem(this, lineStartItem, -1, this.catchName, new ArrayList<>()); } List catchExceptions = new ArrayList<>(); if (catchBlockFlag) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java index 9001c5d93..ce3617b8a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java @@ -30,5 +30,7 @@ public class GraphSourceItemPosition { public int position; + public GraphSourceItem startLineItem; + public HighlightData data; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java index e51dae0d5..ba8491cdb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java @@ -54,11 +54,12 @@ public abstract class GraphTextWriter { * Highlights specified text as instruction * * @param src + * @param firstLineItem * @param pos Offset of instruction * @param data * @return GraphTextWriter */ - public GraphTextWriter startOffset(GraphSourceItem src, int pos, HighlightData data) { + public GraphTextWriter startOffset(GraphSourceItem src, GraphSourceItem startLineItem, int pos, HighlightData data) { return this; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HighlightedTextWriter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HighlightedTextWriter.java index d5d974b00..f323423ff 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HighlightedTextWriter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HighlightedTextWriter.java @@ -85,9 +85,10 @@ public class HighlightedTextWriter extends GraphTextWriter { * @return HighlightedTextWriter */ @Override - public HighlightedTextWriter startOffset(GraphSourceItem src, int pos, HighlightData data) { + public HighlightedTextWriter startOffset(GraphSourceItem src, GraphSourceItem startLineItem, int pos, HighlightData data) { GraphSourceItemPosition itemPos = new GraphSourceItemPosition(); itemPos.graphSourceItem = src; + itemPos.startLineItem = startLineItem; itemPos.position = pos; itemPos.data = data; offsets.add(itemPos); @@ -182,6 +183,9 @@ public class HighlightedTextWriter extends GraphTextWriter { ndata.merge(itemPos.data); ndata.merge(data); ndata.offset = src.getOffset() + pos; + if (itemPos.startLineItem != null) { + ndata.firstLineOffset = itemPos.startLineItem.getOffset(); + } h = new Highlighting(sb.length() - newLineCount, ndata, HighlightType.OFFSET, str); instructionHilights.add(h); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/hilight/HighlightData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/hilight/HighlightData.java index 817b533e7..52fcda66e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/hilight/HighlightData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/hilight/HighlightData.java @@ -39,10 +39,14 @@ public class HighlightData implements Cloneable, Serializable { public long offset; + public long firstLineOffset = -1; + + public int regIndex = -1; + public boolean isEmpty() { return !declaration && declaredType == null && localName == null && subtype == null && specialValue == null - && index == 0 && offset == 0; + && index == 0 && offset == 0 && regIndex == -1 && firstLineOffset == -1; } public void merge(HighlightData data) { @@ -70,6 +74,12 @@ public class HighlightData implements Cloneable, Serializable { if (data.offset != 0) { offset = data.offset; } + if (data.regIndex != -1) { + regIndex = data.regIndex; + } + if (data.firstLineOffset != -1) { + firstLineOffset = data.firstLineOffset; + } } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java index d092d45a7..d1e8222ac 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java @@ -18,6 +18,7 @@ package com.jpexs.decompiler.graph; import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.FinalProcessLocalData; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.Reference; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.FunctionActionItem; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -858,7 +859,7 @@ public class Graph { } else { GraphTargetItem lastExpr = whi.expression.remove(whi.expression.size() - 1); forFirstCommands.addAll(whi.expression); - list.set(i, new ForItem(whi.getSrc(), whi.loop, forFirstCommands, lastExpr, forFinalCommands, whi.commands)); + list.set(i, new ForItem(whi.getSrc(), whi.getLineStartItem(), whi.loop, forFirstCommands, lastExpr, forFinalCommands, whi.commands)); } } } @@ -972,10 +973,10 @@ public class Graph { } for (Loop l : loops) { if (l.loopContinue == part) { - return (new ContinueItem(null, l.id)); + return (new ContinueItem(null, code.get(part.start), l.id)); } if (l.loopBreak == part) { - return (new BreakItem(null, l.id)); + return (new BreakItem(null, code.get(part.start), l.id)); } } return null; @@ -1298,7 +1299,7 @@ public class Graph { } if (isLoop) { - if (currentLoop.loopBreak != null) { + if (currentLoop != null && currentLoop.loopBreak != null) { currentLoop.phase = 2; markLevels(path, localData, currentLoop.loopBreak, allParts, loops, stopPart, level, visited, recursionLevel + 1); } @@ -1457,7 +1458,7 @@ public class Graph { l.breakCandidatesLocked--; } - if (isLoop) { + if (isLoop && currentLoop != null) { GraphPart found; Map removed = new HashMap<>(); do { @@ -1541,7 +1542,7 @@ public class Graph { } else if (count.get(cand) > winnerCount) { winnerCount = count.get(cand); winner = cand; - } else if (count.get(cand) == winnerCount) { + } else if (count.get(cand) == winnerCount && winner != null) { if (cand.path.length() < winner.path.length()) { winner = cand; } @@ -1674,7 +1675,7 @@ public class Graph { if (debugMode) { System.err.println("Adding break"); } - ret.add(new BreakItem(null, el.id)); + ret.add(new BreakItem(null, localData.lineStartInstruction, el.id)); return ret; } if (el.loopPreContinue == part) { @@ -1684,7 +1685,7 @@ public class Graph { if (debugMode) { System.err.println("Adding precontinue"); } - ret.add(new ContinueItem(null, el.id)); + ret.add(new ContinueItem(null, localData.lineStartInstruction, el.id)); return ret; } if (el.loopContinue == part) { @@ -1694,7 +1695,7 @@ public class Graph { if (debugMode) { System.err.println("Adding continue"); } - ret.add(new ContinueItem(null, el.id)); + ret.add(new ContinueItem(null, localData.lineStartInstruction, el.id)); return ret; } } @@ -1709,7 +1710,7 @@ public class Graph { return ret; } - if ((part != null) && (code.size() <= part.start)) { + if (code.size() <= part.start) { ret.add(new ScriptEndItem()); return ret; } @@ -1724,9 +1725,9 @@ public class Graph { if (firstCode.size() > firstCodePos && (firstCode.get(firstCodePos) instanceof LabelItem)) { labelName = ((LabelItem) firstCode.get(firstCodePos)).labelName; } else { - firstCode.add(firstCodePos, new LabelItem(null, labelName)); + firstCode.add(firstCodePos, new LabelItem(null, localData.lineStartInstruction, labelName)); } - ret.add(new GotoItem(null, labelName)); + ret.add(new GotoItem(null, localData.lineStartInstruction, labelName)); return ret; } else { visited.add(part); @@ -1740,7 +1741,7 @@ public class Graph { //makeAllCommands(currentRet, stack); stack = (TranslateStack) stack.clone(); stack.clear(); - loopItem = new UniversalLoopItem(null, currentLoop); + loopItem = new UniversalLoopItem(null, localData.lineStartInstruction, currentLoop); //loopItem.commands=printGraph(visited, localData, stack, allParts, parent, part, stopPart, loops); currentRet.add(loopItem); loopItem.commands = new ArrayList<>(); @@ -1798,7 +1799,7 @@ public class Graph { swLoop.phase = 1; loops.add(swLoop); boolean first = false; - int pos = 0; + int pos; Map caseExpressions = new HashMap<>(); Map caseExpressionLeftSides = new HashMap<>(); @@ -1870,7 +1871,7 @@ public class Graph { if (caseExpressions.containsKey(pos)) { caseValues.add(caseExpressions.get(pos)); } else { - caseValues.add(new IntegerValueItem(null, pos)); + caseValues.add(new IntegerValueItem(null, localData.lineStartInstruction, pos)); } pos++; } @@ -1939,7 +1940,7 @@ public class Graph { defaultCommands.remove(defaultCommands.size() - 1); } } - SwitchItem sw = new SwitchItem(null, swLoop, switchedItem, caseValues, caseCommands, defaultCommands, valueMappings); + SwitchItem sw = new SwitchItem(null, localData.lineStartInstruction, swLoop, switchedItem, caseValues, caseCommands, defaultCommands, valueMappings); currentRet.add(sw); swLoop.phase = 2; if (next != null) { @@ -1997,7 +1998,7 @@ public class Graph { List filteredOnFalse = filter(onFalse); if (!isEmpty(filteredOnTrue) && !isEmpty(filteredOnFalse) && filteredOnTrue.size() == 1 && filteredOnFalse.size() == 1 && (filteredOnTrue.get(0) instanceof PushItem) && (filteredOnFalse.get(0) instanceof PushItem)) { - stack.push(new TernarOpItem(null, expr.invert(null), ((PushItem) filteredOnTrue.get(0)).value, ((PushItem) filteredOnFalse.get(0)).value)); + stack.push(new TernarOpItem(null, localData.lineStartInstruction, expr.invert(null), ((PushItem) filteredOnTrue.get(0)).value, ((PushItem) filteredOnFalse.get(0)).value)); } else { boolean isIf = true; //If the ontrue is empty, switch ontrue and onfalse @@ -2006,9 +2007,9 @@ public class Graph { List tmp = onTrue; onTrue = onFalse; onFalse = tmp; - tmp = filteredOnTrue; + //tmp = filteredOnTrue; filteredOnTrue = filteredOnFalse; - filteredOnFalse = tmp; + //filteredOnFalse = tmp; } if (!stack.isEmpty() && ((filteredOnTrue.size() == 1 && (filteredOnTrue.get(0) instanceof PopItem)) || ((filteredOnTrue.size() >= 2) && (filteredOnTrue.get(0) instanceof PopItem) && (filteredOnTrue.get(filteredOnTrue.size() - 1) instanceof PushItem)))) { if (filteredOnTrue.size() > 1) { @@ -2018,17 +2019,17 @@ public class Graph { if (leftSide instanceof DuplicateItem) { isIf = false; - stack.push(new OrItem(null, prevExpr, rightSide)); + stack.push(new OrItem(null, localData.lineStartInstruction, prevExpr, rightSide)); } else if (leftSide.invert(null).getNotCoercedNoDup() instanceof DuplicateItem) { isIf = false; - stack.push(new AndItem(null, prevExpr, rightSide)); + stack.push(new AndItem(null, localData.lineStartInstruction, prevExpr, rightSide)); } else if (prevExpr instanceof FalseItem) { isIf = false; leftSide = leftSide.invert(null); - stack.push(new AndItem(null, leftSide, rightSide)); + stack.push(new AndItem(null, localData.lineStartInstruction, leftSide, rightSide)); } else if (prevExpr instanceof TrueItem) { isIf = false; - stack.push(new OrItem(null, leftSide, rightSide)); + stack.push(new OrItem(null, localData.lineStartInstruction, leftSide, rightSide)); } else { //:-( } @@ -2039,10 +2040,10 @@ public class Graph { if (isIf) { makeAllCommands(currentRet, stack); - IfItem b = new IfItem(null, expr.invert(null), onTrue, onFalse); + IfItem b = new IfItem(null, localData.lineStartInstruction, expr.invert(null), onTrue, onFalse); currentRet.add(b); if (processSubBlk(b, null)) { - stack.push(new PopItem(null)); + stack.push(new PopItem(null, localData.lineStartInstruction)); } } } @@ -2061,7 +2062,7 @@ public class Graph { } } - if (isLoop) { + if (isLoop && loopItem != null && currentLoop != null) { LoopItem li = loopItem; boolean loopTypeFound = false; @@ -2124,7 +2125,7 @@ public class Graph { if (expr instanceof LogicalOpItem) { expr = ((LogicalOpItem) expr).invert(null); } else { - expr = new NotItem(null, expr); + expr = new NotItem(null, expr.getLineStartItem(), expr); } } exprList.add(expr); @@ -2147,9 +2148,9 @@ public class Graph { checkContinueAtTheEnd(finalComm, currentLoop); } if (!finalComm.isEmpty()) { - ret.add(index, li = new ForItem(expr.getSrc(), currentLoop, new ArrayList<>(), exprList.get(exprList.size() - 1), finalComm, commands)); + ret.add(index, li = new ForItem(expr.getSrc(), expr.getLineStartItem(), currentLoop, new ArrayList<>(), exprList.get(exprList.size() - 1), finalComm, commands)); } else { - ret.add(index, li = new WhileItem(expr.getSrc(), currentLoop, exprList, commands)); + ret.add(index, li = new WhileItem(expr.getSrc(), expr.getLineStartItem(), currentLoop, exprList, commands)); } loopTypeFound = true; @@ -2204,7 +2205,7 @@ public class Graph { commands.addAll(bodyBranch); exprList.add(expr); checkContinueAtTheEnd(commands, currentLoop); - ret.add(index, li = new DoWhileItem(null, currentLoop, commands, exprList)); + ret.add(index, li = new DoWhileItem(null, exprList.get(0).getLineStartItem(), currentLoop, commands, exprList)); } loopTypeFound = true; @@ -2247,7 +2248,7 @@ public class Graph { expr = expr.invert(null); } exprList.add(expr); - ret.add(index, li = new DoWhileItem(null, currentLoop, loopItem.commands, exprList)); + ret.add(index, li = new DoWhileItem(null, expr.getLineStartItem(), currentLoop, loopItem.commands, exprList)); } } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSource.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSource.java index e6b6534f6..3bcd5db25 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSource.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSource.java @@ -17,6 +17,7 @@ package com.jpexs.decompiler.graph; import com.jpexs.decompiler.flash.BaseLocalData; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.Reference; import com.jpexs.decompiler.flash.action.Action; import java.io.Serializable; import java.util.ArrayList; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItemContainer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItemContainer.java index dafeaafa2..33a0772f8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItemContainer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItemContainer.java @@ -38,7 +38,7 @@ public interface GraphSourceItemContainer { public HashMap getRegNames(); - public void translateContainer(List> contents, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions); + public void translateContainer(List> contents, GraphSourceItem lineStartItem, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions); public String getName(); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java index 17c548edf..d00ca406a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java @@ -84,6 +84,12 @@ public abstract class GraphTargetItem implements Serializable, Cloneable { private HighlightData srcData; + public GraphSourceItem lineStartItem; + + public GraphSourceItem getLineStartItem() { + return lineStartItem; + } + public int getLine() { if (src != null) { return src.getLine(); @@ -110,16 +116,16 @@ public abstract class GraphTargetItem implements Serializable, Cloneable { } public GraphTargetItem() { - this(null, NOPRECEDENCE); + this(null, null, NOPRECEDENCE); } - public GraphTargetItem(GraphSourceItem src, int precedence) { - this.src = src; - this.precedence = precedence; + public GraphTargetItem(GraphSourceItem src, GraphSourceItem lineStartItem, int precedence) { + this(src, lineStartItem, precedence, null); } - public GraphTargetItem(GraphSourceItem src, int precedence, GraphTargetItem value) { + public GraphTargetItem(GraphSourceItem src, GraphSourceItem lineStartItem, int precedence, GraphTargetItem value) { this.src = src; + this.lineStartItem = lineStartItem; this.precedence = precedence; this.value = value; } @@ -167,7 +173,7 @@ public abstract class GraphTargetItem implements Serializable, Cloneable { throw new InterruptedException(); } - writer.startOffset(src, getPos(), srcData); + writer.startOffset(src, getLineStartItem(), getPos(), srcData); appendTo(writer, localData); if (needsSemicolon()) { writer.appendNoHilight(";"); @@ -190,7 +196,7 @@ public abstract class GraphTargetItem implements Serializable, Cloneable { throw new InterruptedException(); } - writer.startOffset(src, getPos(), srcData); + writer.startOffset(src, getLineStartItem(), getPos(), srcData); appendTo(writer, localData); writer.endOffset(); return writer; @@ -240,7 +246,7 @@ public abstract class GraphTargetItem implements Serializable, Cloneable { } public GraphTextWriter toStringNoQuotes(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.startOffset(src, getPos(), srcData); + writer.startOffset(src, getLineStartItem(), getPos(), srcData); appendToNoQuotes(writer, localData); writer.endOffset(); return writer; @@ -267,7 +273,7 @@ public abstract class GraphTargetItem implements Serializable, Cloneable { } public GraphTextWriter toStringNL(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.startOffset(src, getPos(), srcData); + writer.startOffset(src, getLineStartItem(), getPos(), srcData); appendTo(writer, localData); if (needsNewLine()) { writer.newLine(); @@ -358,7 +364,7 @@ public abstract class GraphTargetItem implements Serializable, Cloneable { } public GraphTargetItem invert(GraphSourceItem src) { - return new NotItem(src, this); + return new NotItem(src, getLineStartItem(), this); } public GraphTextWriter appendBlock(GraphTargetItem prevLineItem, GraphTextWriter writer, LocalData localData, List commands) throws InterruptedException { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/MarkItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/MarkItem.java index 6efa91e21..21d4fc9d3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/MarkItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/MarkItem.java @@ -29,7 +29,7 @@ public class MarkItem extends GraphTargetItem { private final String mark; public MarkItem(String mark) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.mark = mark; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/NotCompileTimeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/NotCompileTimeItem.java index 8e8ccbb89..35411467e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/NotCompileTimeItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/NotCompileTimeItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -27,8 +28,8 @@ public class NotCompileTimeItem extends GraphTargetItem { public GraphTargetItem object; - public NotCompileTimeItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, NOPRECEDENCE); + public NotCompileTimeItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object) { + super(instruction, lineStartIns, NOPRECEDENCE); this.object = object; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TranslateStack.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TranslateStack.java index 0f54b15ba..c1660016c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TranslateStack.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TranslateStack.java @@ -41,7 +41,7 @@ public class TranslateStack extends Stack { private PopItem getPop() { if (pop == null) { - pop = new PopItem(null); + pop = new PopItem(null, null);//TODO: linestart? } return pop; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeFunctionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeFunctionItem.java index db91616d5..1eb1e92ef 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeFunctionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeFunctionItem.java @@ -38,7 +38,7 @@ public class TypeFunctionItem extends GraphTargetItem { public String fullTypeName; public TypeFunctionItem(String fullTypeName) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.fullTypeName = fullTypeName; } @@ -58,10 +58,7 @@ public class TypeFunctionItem extends GraphTargetItem { return false; } final TypeFunctionItem other = (TypeFunctionItem) obj; - if (!Objects.equals(fullTypeName, other.fullTypeName)) { - return false; - } - return true; + return Objects.equals(fullTypeName, other.fullTypeName); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeItem.java index 206b0804e..4d93bff47 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeItem.java @@ -51,7 +51,7 @@ public class TypeItem extends GraphTargetItem { } public TypeItem(DottedChain fullTypeName, List subtypes) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.fullTypeName = fullTypeName; } @@ -71,10 +71,7 @@ public class TypeItem extends GraphTargetItem { return false; } final TypeItem other = (TypeItem) obj; - if (!Objects.equals(fullTypeName, other.fullTypeName)) { - return false; - } - return true; + return Objects.equals(fullTypeName, other.fullTypeName); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/AndItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/AndItem.java index 0858b36f8..88632588f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/AndItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/AndItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -34,8 +35,8 @@ public class AndItem extends BinaryOpItem { return ret; } - public AndItem(GraphSourceItem src, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(src, PRECEDENCE_LOGICALAND, leftSide, rightSide, "&&"); + public AndItem(GraphSourceItem src, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(src, lineStartIns, PRECEDENCE_LOGICALAND, leftSide, rightSide, "&&"); this.leftSide = leftSide; this.rightSide = rightSide; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java index 62170dab6..73498dc4a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java @@ -43,8 +43,8 @@ public abstract class BinaryOpItem extends GraphTargetItem implements BinaryOp { return fp; } - public BinaryOpItem(GraphSourceItem instruction, int precedence, GraphTargetItem leftSide, GraphTargetItem rightSide, String operator) { - super(instruction, precedence); + public BinaryOpItem(GraphSourceItem instruction, GraphSourceItem lineStartItem, int precedence, GraphTargetItem leftSide, GraphTargetItem rightSide, String operator) { + super(instruction, lineStartItem, precedence); this.leftSide = leftSide; this.rightSide = rightSide; this.operator = operator; @@ -147,10 +147,7 @@ public abstract class BinaryOpItem extends GraphTargetItem implements BinaryOp { if (!Objects.equals(rightSide, other.rightSide)) { return false; } - if (!Objects.equals(operator, other.operator)) { - return false; - } - return true; + return (Objects.equals(operator, other.operator)); } /*@Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BlockItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BlockItem.java index 91d9dbbfc..4e9ed3425 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BlockItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BlockItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -33,8 +34,8 @@ public class BlockItem extends GraphTargetItem { List commands; - public BlockItem(GraphSourceItem src, List commands) { - super(src, PRECEDENCE_PRIMARY); + public BlockItem(GraphSourceItem src, GraphSourceItem lineStartIns, List commands) { + super(src, lineStartIns, PRECEDENCE_PRIMARY); this.commands = commands; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BreakItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BreakItem.java index c1a7c953c..47b633fb5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BreakItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BreakItem.java @@ -36,8 +36,8 @@ public class BreakItem extends GraphTargetItem { private boolean labelRequired; - public BreakItem(GraphSourceItem src, long loopId) { - super(src, NOPRECEDENCE); + public BreakItem(GraphSourceItem src, GraphSourceItem lineStartIns, long loopId) { + super(src, lineStartIns, NOPRECEDENCE); this.loopId = loopId; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommaExpressionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommaExpressionItem.java index d9b0e30ef..4bff970ee 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommaExpressionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommaExpressionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -32,8 +33,8 @@ public class CommaExpressionItem extends GraphTargetItem { public List commands; - public CommaExpressionItem(GraphSourceItem src, List commands) { - super(src, PRECEDENCE_PRIMARY); + public CommaExpressionItem(GraphSourceItem src, GraphSourceItem lineStartIns, List commands) { + super(src, lineStartIns, PRECEDENCE_PRIMARY); this.commands = commands; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommentItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommentItem.java index da718cacd..1712845cc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommentItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommentItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -28,12 +29,12 @@ public class CommentItem extends GraphTargetItem { private final String[] commentLines; public CommentItem(String comment) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.commentLines = new String[]{comment}; } public CommentItem(String[] commentLines) { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); this.commentLines = commentLines; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ContinueItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ContinueItem.java index 30d9cd91c..17b718a49 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ContinueItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ContinueItem.java @@ -36,8 +36,8 @@ public class ContinueItem extends GraphTargetItem { private boolean labelRequired; - public ContinueItem(GraphSourceItem src, long loopId) { - super(src, NOPRECEDENCE); + public ContinueItem(GraphSourceItem src, GraphSourceItem lineStartIns, long loopId) { + super(src, lineStartIns, NOPRECEDENCE); this.loopId = loopId; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DoWhileItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DoWhileItem.java index cf74aac39..30e305250 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DoWhileItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DoWhileItem.java @@ -52,8 +52,8 @@ public class DoWhileItem extends LoopItem implements Block { return ret; } - public DoWhileItem(GraphSourceItem src, Loop loop, List commands, List expression) { - super(src, loop); + public DoWhileItem(GraphSourceItem src, GraphSourceItem lineStartIns, Loop loop, List commands, List expression) { + super(src, lineStartIns, loop); this.expression = expression; this.commands = commands; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DuplicateItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DuplicateItem.java index e37a500f5..7d16bd06d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DuplicateItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DuplicateItem.java @@ -33,8 +33,8 @@ import java.util.Set; */ public class DuplicateItem extends GraphTargetItem implements SimpleValue { - public DuplicateItem(GraphSourceItem src, GraphTargetItem value) { - super(src, value.getPrecedence(), value); + public DuplicateItem(GraphSourceItem src, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(src, lineStartIns, value.getPrecedence(), value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/FalseItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/FalseItem.java index 064056916..ffbb3571b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/FalseItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/FalseItem.java @@ -32,8 +32,8 @@ import java.util.Set; */ public class FalseItem extends GraphTargetItem implements LogicalOpItem, SimpleValue { - public FalseItem(GraphSourceItem src) { - super(src, PRECEDENCE_PRIMARY); + public FalseItem(GraphSourceItem src, GraphSourceItem lineStartIns) { + super(src, lineStartIns, PRECEDENCE_PRIMARY); } @Override @@ -58,7 +58,7 @@ public class FalseItem extends GraphTargetItem implements LogicalOpItem, SimpleV @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new TrueItem(null); + return new TrueItem(getSrc(), getLineStartItem()); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ForItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ForItem.java index ff5fe8487..f74b38323 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ForItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ForItem.java @@ -57,8 +57,8 @@ public class ForItem extends LoopItem implements Block { return ret; } - public ForItem(GraphSourceItem src, Loop loop, List firstCommands, GraphTargetItem expression, List finalCommands, List commands) { - super(src, loop); + public ForItem(GraphSourceItem src, GraphSourceItem lineStartIns, Loop loop, List firstCommands, GraphTargetItem expression, List finalCommands, List commands) { + super(src, lineStartIns, loop); this.firstCommands = firstCommands; this.expression = expression; this.finalCommands = finalCommands; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/GotoItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/GotoItem.java index 975c9c345..0bfd7ec04 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/GotoItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/GotoItem.java @@ -29,8 +29,8 @@ public class GotoItem extends GraphTargetItem { public String labelName; - public GotoItem(GraphSourceItem src, String labelName) { - super(src, PRECEDENCE_PRIMARY); + public GotoItem(GraphSourceItem src, GraphSourceItem lineStartIns, String labelName) { + super(src, lineStartIns, PRECEDENCE_PRIMARY); this.labelName = labelName; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IfItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IfItem.java index bf6475078..63508084a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IfItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IfItem.java @@ -57,8 +57,8 @@ public class IfItem extends GraphTargetItem implements Block { return ret; } - public IfItem(GraphSourceItem src, GraphTargetItem expression, List onTrue, List onFalse) { - super(src, NOPRECEDENCE); + public IfItem(GraphSourceItem src, GraphSourceItem lineStartIns, GraphTargetItem expression, List onTrue, List onFalse) { + super(src, lineStartIns, NOPRECEDENCE); this.expression = expression; this.onTrue = onTrue; this.onFalse = onFalse; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java index 02a5bc941..edf780d50 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java @@ -30,8 +30,8 @@ public class IntegerValueItem extends GraphTargetItem implements IntegerValueTyp private final int intValue; - public IntegerValueItem(GraphSourceItem src, int value) { - super(src, PRECEDENCE_PRIMARY); + public IntegerValueItem(GraphSourceItem src, GraphSourceItem lineStartIns, int value) { + super(src, lineStartIns, PRECEDENCE_PRIMARY); this.intValue = value; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LabelItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LabelItem.java index b062937d2..15b500370 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LabelItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LabelItem.java @@ -29,8 +29,8 @@ public class LabelItem extends GraphTargetItem { public String labelName; - public LabelItem(GraphSourceItem src, String labelName) { - super(src, PRECEDENCE_PRIMARY); + public LabelItem(GraphSourceItem src, GraphSourceItem lineStartIns, String labelName) { + super(src, lineStartIns, PRECEDENCE_PRIMARY); this.labelName = labelName; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LoopItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LoopItem.java index 996476a4b..26067a4f5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LoopItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LoopItem.java @@ -24,8 +24,8 @@ public abstract class LoopItem extends GraphTargetItem { public Loop loop; - public LoopItem(GraphSourceItem src, Loop loop) { - super(src, NOPRECEDENCE); + public LoopItem(GraphSourceItem src, GraphSourceItem lineStartItem, Loop loop) { + super(src, lineStartItem, NOPRECEDENCE); this.loop = loop; } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/NotItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/NotItem.java index e29a7e10c..01d29e64e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/NotItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/NotItem.java @@ -33,8 +33,8 @@ import java.util.Set; */ public class NotItem extends UnaryOpItem implements LogicalOpItem, Inverted { - public NotItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_UNARY, value, "!"); + public NotItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(instruction, lineStartIns, PRECEDENCE_UNARY, value, "!"); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/OrItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/OrItem.java index fdee20ecf..c41d7b394 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/OrItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/OrItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,8 +27,8 @@ import java.util.List; public class OrItem extends BinaryOpItem { - public OrItem(GraphSourceItem src, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(src, PRECEDENCE_LOGICALOR, leftSide, rightSide, "||"); + public OrItem(GraphSourceItem src, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(src, lineStartIns, PRECEDENCE_LOGICALOR, leftSide, rightSide, "||"); this.leftSide = leftSide; this.rightSide = rightSide; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ParenthesisItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ParenthesisItem.java index 4c5f380bc..29e336e9d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ParenthesisItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ParenthesisItem.java @@ -30,8 +30,8 @@ import java.util.List; */ public class ParenthesisItem extends GraphTargetItem { - public ParenthesisItem(GraphSourceItem src, GraphTargetItem value) { - super(src, PRECEDENCE_PRIMARY, value); + public ParenthesisItem(GraphSourceItem src, GraphSourceItem lineStartIns, GraphTargetItem value) { + super(src, lineStartIns, PRECEDENCE_PRIMARY, value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/PopItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/PopItem.java index 3dad4cf8a..7f1a41dc3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/PopItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/PopItem.java @@ -28,8 +28,8 @@ import com.jpexs.decompiler.graph.TypeItem; */ public class PopItem extends GraphTargetItem { - public PopItem(GraphSourceItem src) { - super(src, PRECEDENCE_PRIMARY); + public PopItem(GraphSourceItem src, GraphSourceItem lineStartIns) { + super(src, lineStartIns, PRECEDENCE_PRIMARY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/PushItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/PushItem.java index 43a24f5d5..e333eed24 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/PushItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/PushItem.java @@ -17,6 +17,7 @@ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; /** @@ -26,7 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; public class PushItem extends GraphTargetItem { public PushItem(GraphTargetItem value) { - super(value.getSrc(), value.getPrecedence(), value); + super(value.getSrc(), value.getLineStartItem(), value.getPrecedence(), value); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java index 96caef8e1..fc8590e8c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -26,7 +27,7 @@ import com.jpexs.decompiler.graph.TypeItem; public class ScriptEndItem extends GraphTargetItem implements ExitItem { public ScriptEndItem() { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/SwitchItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/SwitchItem.java index 8fbad0ef9..d5544566f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/SwitchItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/SwitchItem.java @@ -54,8 +54,8 @@ public class SwitchItem extends LoopItem implements Block { return ret; } - public SwitchItem(GraphSourceItem instruction, Loop loop, GraphTargetItem switchedObject, List caseValues, List> caseCommands, List defaultCommands, List valuesMapping) { - super(instruction, loop); + public SwitchItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop, GraphTargetItem switchedObject, List caseValues, List> caseCommands, List defaultCommands, List valuesMapping) { + super(instruction, lineStartIns, loop); this.switchedObject = switchedObject; this.caseValues = caseValues; this.caseCommands = caseCommands; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TernarOpItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TernarOpItem.java index 2b3504733..237269997 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TernarOpItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TernarOpItem.java @@ -32,8 +32,8 @@ public class TernarOpItem extends GraphTargetItem { public GraphTargetItem onFalse; - public TernarOpItem(GraphSourceItem src, GraphTargetItem expression, GraphTargetItem onTrue, GraphTargetItem onFalse) { - super(src, PRECEDENCE_CONDITIONAL); + public TernarOpItem(GraphSourceItem src, GraphSourceItem lineStartIns, GraphTargetItem expression, GraphTargetItem onTrue, GraphTargetItem onFalse) { + super(src, lineStartIns, PRECEDENCE_CONDITIONAL); this.expression = expression; this.onTrue = onTrue; this.onFalse = onFalse; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TrueItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TrueItem.java index 1fd5db551..6cb8daad4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TrueItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TrueItem.java @@ -33,8 +33,8 @@ import java.util.Set; */ public class TrueItem extends GraphTargetItem implements LogicalOpItem, SimpleValue { - public TrueItem(GraphSourceItem src) { - super(src, PRECEDENCE_PRIMARY); + public TrueItem(GraphSourceItem src, GraphSourceItem lineStartIns) { + super(src, lineStartIns, PRECEDENCE_PRIMARY); } @Override @@ -59,7 +59,7 @@ public class TrueItem extends GraphTargetItem implements LogicalOpItem, SimpleVa @Override public GraphTargetItem invert(GraphSourceItem neqSrc) { - return new FalseItem(null); + return new FalseItem(getSrc(), getLineStartItem()); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java index 40616c91a..8008a4d07 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java @@ -27,8 +27,8 @@ public abstract class UnaryOpItem extends GraphTargetItem implements UnaryOp { public String operator; - public UnaryOpItem(GraphSourceItem instruction, int precedence, GraphTargetItem value, String operator) { - super(instruction, precedence, value); + public UnaryOpItem(GraphSourceItem instruction, GraphSourceItem lineStartItem, int precedence, GraphTargetItem value, String operator) { + super(instruction, lineStartItem, precedence, value); this.operator = operator; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnboundedTypeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnboundedTypeItem.java index 5c019e10f..4aaa4d5e6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnboundedTypeItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnboundedTypeItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; @@ -26,7 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; public class UnboundedTypeItem extends AVM2Item { public UnboundedTypeItem() { - super(null, NOPRECEDENCE); + super(null, null, NOPRECEDENCE); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UniversalLoopItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UniversalLoopItem.java index aff3609f0..4db149fb1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UniversalLoopItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UniversalLoopItem.java @@ -37,8 +37,8 @@ public class UniversalLoopItem extends LoopItem implements Block { private boolean labelUsed; - public UniversalLoopItem(GraphSourceItem src, Loop loop) { - super(src, loop); + public UniversalLoopItem(GraphSourceItem src, GraphSourceItem lineStartIns, Loop loop) { + super(src, lineStartIns, loop); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/WhileItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/WhileItem.java index 0024d0024..7daf62866 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/WhileItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/WhileItem.java @@ -47,8 +47,8 @@ public class WhileItem extends LoopItem implements Block { return ret; } - public WhileItem(GraphSourceItem src, Loop loop, List expression, List commands) { - super(src, loop); + public WhileItem(GraphSourceItem src, GraphSourceItem lineStartIns, Loop loop, List expression, List commands) { + super(src, lineStartIns, loop); this.expression = expression; this.commands = commands; } diff --git a/src/com/jpexs/decompiler/flash/gui/AdvancedSettingsDialog.java b/src/com/jpexs/decompiler/flash/gui/AdvancedSettingsDialog.java index e3e5e1e73..cc739ac23 100644 --- a/src/com/jpexs/decompiler/flash/gui/AdvancedSettingsDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/AdvancedSettingsDialog.java @@ -386,7 +386,7 @@ public class AdvancedSettingsDialog extends AppDialog { p.setMaximumSize(new Dimension(Integer.MAX_VALUE, tf.getPreferredSize().height)); p.add(tf, BorderLayout.CENTER); JButton butSelect = new JButton(View.getIcon("folderopen16")); - butSelect.setToolTipText(AppStrings.translate("FileChooser.openButtonText")); + butSelect.setToolTipText(ResourceBundle.getBundle(AppStrings.getResourcePath(MainFrame.class)).getString("FileChooser.openButtonText")); butSelect.setMargin(new Insets(2, 2, 2, 2)); butSelect.addActionListener((ActionEvent e) -> { tf.setText(selectConfigFile(item, tf.getText(), confFile.value())); diff --git a/src/com/jpexs/decompiler/flash/gui/DebuggerHandler.java b/src/com/jpexs/decompiler/flash/gui/DebuggerHandler.java index 21c11ac52..bfc2e03fc 100644 --- a/src/com/jpexs/decompiler/flash/gui/DebuggerHandler.java +++ b/src/com/jpexs/decompiler/flash/gui/DebuggerHandler.java @@ -21,13 +21,19 @@ import com.jpexs.debugger.flash.DebugMessageListener; import com.jpexs.debugger.flash.Debugger; import com.jpexs.debugger.flash.DebuggerCommands; import com.jpexs.debugger.flash.DebuggerConnection; +import com.jpexs.debugger.flash.Variable; import com.jpexs.debugger.flash.messages.in.InAskBreakpoints; import com.jpexs.debugger.flash.messages.in.InBreakAt; +import com.jpexs.debugger.flash.messages.in.InBreakAtExt; +import com.jpexs.debugger.flash.messages.in.InBreakReason; import com.jpexs.debugger.flash.messages.in.InContinue; +import com.jpexs.debugger.flash.messages.in.InFrame; import com.jpexs.debugger.flash.messages.in.InNumScript; import com.jpexs.debugger.flash.messages.in.InScript; import com.jpexs.debugger.flash.messages.in.InSetBreakpoint; import com.jpexs.debugger.flash.messages.in.InSwfInfo; +import com.jpexs.debugger.flash.messages.in.InVersion; +import com.jpexs.debugger.flash.messages.out.OutGetBreakReason; import com.jpexs.decompiler.flash.abc.ClassPath; import com.jpexs.decompiler.flash.abc.ScriptPack; import com.jpexs.decompiler.graph.DottedChain; @@ -55,6 +61,61 @@ public class DebuggerHandler implements DebugConnectionListener { private Map modulePaths = new HashMap<>(); private Map classToModule = new HashMap<>(); + private InFrame frame; + + public static interface VariableChangedListener { + + public void variablesChanged(); + + } + + private List listeners = new ArrayList<>(); + + public void addVariableChangedListener(VariableChangedListener l) { + listeners.add(l); + } + + public void removeVariableChangedListener(VariableChangedListener l) { + listeners.remove(l); + } + + public void setVariableValue(int index, String value) { + //variables.get(index).value = value + //TODO: + } + + public int getNumVariables() { + if (frame == null) { + return 0; + } + return frame.variables.size(); + } + + public Variable getFrameVariable() { + if (frame == null) { + return null; + } + return frame.frame; + } + + public Variable getVariable(int index) { + if (frame == null) { + return null; + } + return frame.variables.get(index); + } + + public int getNumRegisters() { + if (frame == null) { + return 0; + } + return frame.registers.size(); + } + + public Variable getRegister(int index) { + return frame.registers.get(index); + } + public int moduleIdOf(ScriptPack pack) { if (classToModule.containsKey(pack.getClassPath())) { return classToModule.get(pack.getClassPath()); @@ -89,6 +150,16 @@ public class DebuggerHandler implements DebugConnectionListener { return commands; } + private static void enlog(Class cls) { + Level level = Level.FINEST; + + Logger mylog = Logger.getLogger(cls.getName()); + mylog.setLevel(level); + ConsoleHandler ch = new ConsoleHandler(); + ch.setLevel(level); + mylog.addHandler(ch); + } + @Override public void connected(DebuggerConnection con) { @@ -98,15 +169,14 @@ public class DebuggerHandler implements DebugConnectionListener { Main.getMainFrame().getPanel().updateMenu(); - Level level = Level.FINER; - - Logger rootLog = Logger.getLogger(Debugger.class.getName()); - rootLog.setLevel(level); - ConsoleHandler ch = new ConsoleHandler(); - ch.setLevel(level); - rootLog.addHandler(ch); - //rootLog.getHandlers()[0].setLevel(level); - + //enlog(DebuggerConnection.class); + //enlog(DebuggerCommands.class); + try { + //rootLog.getHandlers()[0].setLevel(level); + con.getMessage(InVersion.class); + } catch (IOException ex) { + Logger.getLogger(DebuggerHandler.class.getName()).log(Level.SEVERE, null, ex); + } commands = new DebuggerCommands(con); try { commands.stopWarning(); @@ -163,13 +233,33 @@ public class DebuggerHandler implements DebugConnectionListener { synchronized (DebuggerHandler.this) { paused = true; } - Main.getMainFrame().getPanel().updateMenu(); - Logger.getLogger(DebuggerHandler.class.getName()).log(Level.INFO, "break at {0}:{1}", new Object[]{moduleNames.get(message.file), message.line}); - if (!modulePaths.containsKey(message.file)) { - return; + View.execInEventDispatchLater(new Runnable() { + + @Override + public void run() { + + Main.getMainFrame().getPanel().updateMenu(); + Logger.getLogger(DebuggerHandler.class.getName()).log(Level.INFO, "break at {0}:{1}", new Object[]{moduleNames.get(message.file), message.line}); + if (!modulePaths.containsKey(message.file)) { + return; + } + String cls = modulePaths.get(message.file).toString(); + try { + InBreakAtExt bex = con.getMessage(InBreakAtExt.class); + InBreakReason ibr = con.sendMessage(new OutGetBreakReason(con), InBreakReason.class); + frame = commands.getFrame(0); + + for (VariableChangedListener l : listeners) { + l.variablesChanged(); + } + + } catch (IOException ex) { + //ignore + } + Main.getMainFrame().getPanel().debuggerBreakAt(Main.getMainFrame().getPanel().getCurrentSwf(), cls, message.line); + } } - String cls = modulePaths.get(message.file).toString(); - Main.getMainFrame().getPanel().debuggerBreakAt(Main.getMainFrame().getPanel().getCurrentSwf(), cls, message.line); + ); //dc.sendContinue(); } }); @@ -187,7 +277,9 @@ public class DebuggerHandler implements DebugConnectionListener { } } } - Main.getMainFrame().getPanel().refreshBreakPoints(); + + Main.getMainFrame() + .getPanel().refreshBreakPoints(); connected = true; } catch (IOException ex) { connected = false; diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index 905692f73..a0e0f1f54 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -16,6 +16,7 @@ */ package com.jpexs.decompiler.flash.gui.abc; +import com.jpexs.debugger.flash.Variable; import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.ClassPath; @@ -40,6 +41,7 @@ import com.jpexs.decompiler.flash.abc.usages.TraitMultinameUsage; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.gui.AppDialog; import com.jpexs.decompiler.flash.gui.AppStrings; +import com.jpexs.decompiler.flash.gui.DebuggerHandler; import com.jpexs.decompiler.flash.gui.HeaderLabel; import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.gui.MainPanel; @@ -81,6 +83,7 @@ import java.awt.event.MouseMotionListener; import java.io.File; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Pattern; @@ -98,7 +101,10 @@ import javax.swing.JTable; import javax.swing.JToggleButton; import javax.swing.SwingConstants; import javax.swing.border.BevelBorder; +import javax.swing.event.TableModelEvent; +import javax.swing.event.TableModelListener; import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableModel; import javax.swing.text.Highlighter; import javax.swing.tree.TreePath; import jsyntaxpane.SyntaxDocument; @@ -143,6 +149,8 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener tableListeners = new ArrayList<>(); + + public VariablesTableModel() { + varChangeListener = new DebuggerHandler.VariableChangedListener() { + private int oldNum = 0; + + @Override + public void variablesChanged() { + for (int i = 0; i < oldNum; i++) { + for (TableModelListener l : tableListeners) { + l.tableChanged(new TableModelEvent(VariablesTableModel.this, i, i, 0, TableModelEvent.DELETE)); + } + } + oldNum = 1 + Main.getDebugHandler().getNumVariables() + Main.getDebugHandler().getNumRegisters(); + for (TableModelListener l : tableListeners) { + l.tableChanged(new TableModelEvent(VariablesTableModel.this, 0, oldNum - 1, 0, TableModelEvent.INSERT)); + } + + } + }; + Main.getDebugHandler().addVariableChangedListener(varChangeListener); + } + + @Override + public int getRowCount() { + return (Main.getDebugHandler().getFrameVariable() == null ? 0 : 1) + Main.getDebugHandler().getNumRegisters() + Main.getDebugHandler().getNumVariables(); + } + + @Override + public int getColumnCount() { + return 3; + } + + @Override + public String getColumnName(int columnIndex) { + switch (columnIndex) { + case 0: + return "Name"; + case 1: + return "Type"; + case 2: + return "Value"; + default: + return null; + } + } + + @Override + public Class getColumnClass(int columnIndex) { + return String.class; + } + + @Override + public boolean isCellEditable(int rowIndex, int columnIndex) { + return columnIndex == 1; + } + + @Override + public Object getValueAt(int rowIndex, int columnIndex) { + int numReg = Main.getDebugHandler().getNumRegisters(); + Variable v; + if (rowIndex == 0) { + v = Main.getDebugHandler().getFrameVariable(); + } else if (rowIndex >= numReg + 1) { + v = Main.getDebugHandler().getVariable(rowIndex - 1 - numReg); + } else { + v = Main.getDebugHandler().getRegister(rowIndex - 1); + } + + switch (columnIndex) { + case 0: + return v.name; + case 1: + String typeStr = v.getTypeAsStr(); + if ("Object".equals(typeStr)) { + typeStr = v.className; + } + if ("Object".equals(typeStr)) { + typeStr = v.typeName; + } + return typeStr; + case 2: + return v.getValueAsStr(); + } + return null; + } + + @Override + public void setValueAt(Object aValue, int rowIndex, int columnIndex) { + Main.getDebugHandler().setVariableValue(rowIndex, "" + aValue); + } + + @Override + public void addTableModelListener(TableModelListener l) { + tableListeners.add(l); + } + + @Override + public void removeTableModelListener(TableModelListener l) { + tableListeners.remove(l); + } + + } + public ABCPanel(MainPanel mainPanel) { this.mainPanel = mainPanel; @@ -331,8 +447,11 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener