mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 04:30:45 +00:00
34 lines
1.0 KiB
Java
34 lines
1.0 KiB
Java
package com.jpexs.asdec.action.swf5;
|
|
|
|
import com.jpexs.asdec.action.Action;
|
|
import com.jpexs.asdec.action.treemodel.CallMethodTreeItem;
|
|
import com.jpexs.asdec.action.treemodel.ConstantPool;
|
|
import com.jpexs.asdec.action.treemodel.TreeItem;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.Stack;
|
|
|
|
public class ActionCallMethod extends Action {
|
|
|
|
public ActionCallMethod() {
|
|
super(0x52, 0);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "CallMethod";
|
|
}
|
|
|
|
@Override
|
|
public void translate(Stack<TreeItem> stack, ConstantPool constants, List<TreeItem> output, java.util.HashMap<Integer,String> regNames) {
|
|
TreeItem methodName = stack.pop();
|
|
TreeItem scriptObject = stack.pop();
|
|
long numArgs = popLong(stack);
|
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
|
for (long l = 0; l < numArgs; l++) {
|
|
args.add(stack.pop());
|
|
}
|
|
stack.push(new CallMethodTreeItem(this, scriptObject, methodName, args));
|
|
}
|
|
} |