# HG changeset patch # User Michael Van De Vanter # Date 1405379049 25200 # Node ID aee02665e505c1adfd9e9174b77fc13c2ba14d92 # Parent f1d839174e71a157eefa1e81dcbbf670785193a9 Truffle: NodeUtil fix for displaying null SourceSections. diff -r f1d839174e71 -r aee02665e505 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeUtil.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeUtil.java Thu Jul 10 18:29:58 2014 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeUtil.java Mon Jul 14 16:04:09 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014, 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 @@ -864,6 +864,9 @@ private static String displaySourceAttribution(Node node) { final SourceSection section = node.getSourceSection(); + if (section instanceof NullSourceSection) { + return "source: " + section.getShortDescription(); + } if (section != null) { final String srcText = section.getCode(); final StringBuilder sb = new StringBuilder();