@Override public Pointer apply(SmartList<Pointer> args) throws MintException { String code = PointerTools.dereferenceString(args.get(0)); Interpreter interp = PointerTools.dereferenceInterpreter(args.get(1)); SmartList<SmartList<Pointer>> pointerLists = interp.loadProgram(code, true); return interp.evalExpression(pointerLists.get(0), 0); }
@Override public Pointer apply(SmartList<Pointer> args) throws MintException { SmartList<Byte> bytes = PointerTools.dereferenceBytes(args.get(0)); byte[] b = new byte[bytes.size()]; for (int i = 0; i < bytes.size(); i++) { b[i] = bytes.get(i); } return Heap.allocateString(NumberTools.bytesToHex(b)); }