mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 05:30:47 +00:00
do not instantiate millions of ArrayList
This commit is contained in:
+2
-2
@@ -52,8 +52,8 @@ public class SwapIns extends InstructionDefinition {
|
||||
GraphTargetItem o2 = stack.pop();
|
||||
stack.push(o1);
|
||||
stack.push(o2);
|
||||
o1.moreSrc.add(new GraphSourceItemPos(ins, 0));
|
||||
o2.moreSrc.add(new GraphSourceItemPos(ins, 0));
|
||||
o1.getMoreSrc().add(new GraphSourceItemPos(ins, 0));
|
||||
o2.getMoreSrc().add(new GraphSourceItemPos(ins, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
*/
|
||||
@@ -39,6 +39,6 @@ public class ActionPushDuplicate extends Action {
|
||||
public void translate(TranslateStack stack, List<GraphTargetItem> output, HashMap<Integer, String> regNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, int staticOperation, String path) {
|
||||
GraphTargetItem value = stack.peek();
|
||||
stack.push(new DuplicateItem(this, value));
|
||||
value.moreSrc.add(new GraphSourceItemPos(this, 0));
|
||||
value.getMoreSrc().add(new GraphSourceItemPos(this, 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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.swf5;
|
||||
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
@@ -39,7 +40,7 @@ public class ActionStackSwap extends Action {
|
||||
GraphTargetItem b = stack.pop();
|
||||
stack.push(a);
|
||||
stack.push(b);
|
||||
a.moreSrc.add(new GraphSourceItemPos(this, 0));
|
||||
b.moreSrc.add(new GraphSourceItemPos(this, 0));
|
||||
a.getMoreSrc().add(new GraphSourceItemPos(this, 0));
|
||||
b.getMoreSrc().add(new GraphSourceItemPos(this, 0));
|
||||
}
|
||||
}
|
||||
|
||||
+6
-5
@@ -1,18 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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.swf5;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
@@ -82,7 +83,7 @@ public class ActionStoreRegister extends Action implements StoreTypeAction {
|
||||
if (regNames.containsKey(registerNumber)) {
|
||||
rn.name = regNames.get(registerNumber);
|
||||
}
|
||||
value.moreSrc.add(new GraphSourceItemPos(this, 0));
|
||||
value.getMoreSrc().add(new GraphSourceItemPos(this, 0));
|
||||
if (variables.containsKey("__register" + registerNumber)) {
|
||||
if (variables.get("__register" + registerNumber) instanceof TemporaryRegister) {
|
||||
variables.remove("__register" + registerNumber);
|
||||
|
||||
Reference in New Issue
Block a user