diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ExternalPtrPrinter.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ExternalPtrPrinter.java index 46e85c82dfb38a171198a2a01ba7e87a09fd8325..d70a8830550f69490e871ec0f20bfa822cbf3080 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ExternalPtrPrinter.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ExternalPtrPrinter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,6 +38,11 @@ final class ExternalPtrPrinter extends AbstractValuePrinter<RExternalPtr> { @Override @TruffleBoundary protected void printValue(RExternalPtr value, PrintContext printCtx) throws IOException { - printCtx.output().print(""); + // like in RDeparse + if (value.getAddr().isLong()) { + printCtx.output().print(String.format("<pointer: %s>", Double.toHexString(value.getAddr().asAddress()))); + } else { + printCtx.output().print(String.format("<pointer: external ptr 0x %s>", Long.toHexString(System.identityHashCode(value.getAddr().asTruffleObject())))); + } } }