@Override public boolean execute(LocalDataArea lda) { if (lda.stack.size() < 2) { return false; } lda.stack.push(AddActionItem.getResult(lda.pop(), lda.pop(), false)); return true; }
@Override public boolean execute(LocalDataArea lda) { if (lda.stack.isEmpty()) { return false; } lda.stack.push(MBCharToAsciiActionItem.getResult(lda.pop())); return true; }
@Override public boolean execute(LocalDataArea lda) { if (lda.stack.size() == 0) { return false; } lda.stack.push(ToStringActionItem.getResult(lda.pop())); return true; }
@Override public boolean execute(LocalDataArea lda) { if (lda.stack.size() < 3) { return false; } String methodName = lda.popAsString(); ActionScriptObject obj = (ActionScriptObject) lda.pop(); int numArgs = (int) (double) lda.popAsNumber(); if (lda.stack.size() < numArgs) { return false; } List<Object> args = new ArrayList<>(); for (int i = 0; i < numArgs; i++) { args.add(lda.pop()); } ActionScriptObject nobj = new ActionScriptObject(); ActionScriptFunction f = (ActionScriptFunction) obj.getMember(methodName); lda.stage.callFunction( f.getFunctionOffset(), f.getFunctionLength(), args, f.getFuncRegNames(), nobj); lda.stack.push(nobj); return true; }
@Override public boolean execute(LocalDataArea lda) { if (lda.stack.isEmpty()) { return false; } Object obj = lda.pop(); String path = lda.stage.getMemberPath(obj); if (path == null) { lda.stack.push(Undefined.INSTANCE); } else { lda.stack.push(path); } return true; }