comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLMain.java @ 16514:247a6c2fc382

SL: update tests; error locations reported differently with source attribution change.
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Tue, 15 Jul 2014 14:22:14 -0700
parents abe7128ca473
children 618d92152d3c
comparison
equal deleted inserted replaced
16513:d86f948268da 16514:247a6c2fc382
243 private static String formatTypeError(UnsupportedSpecializationException ex) { 243 private static String formatTypeError(UnsupportedSpecializationException ex) {
244 StringBuilder result = new StringBuilder(); 244 StringBuilder result = new StringBuilder();
245 result.append("Type error"); 245 result.append("Type error");
246 if (ex.getNode() != null && ex.getNode().getSourceSection() != null) { 246 if (ex.getNode() != null && ex.getNode().getSourceSection() != null) {
247 SourceSection ss = ex.getNode().getSourceSection(); 247 SourceSection ss = ex.getNode().getSourceSection();
248 if (ss == null || ss instanceof NullSourceSection) { 248 if (ss != null && !(ss instanceof NullSourceSection)) {
249 result.append(" at <unknown>");
250 } else {
251 result.append(" at ").append(ss.getSource().getName()).append(" line ").append(ss.getStartLine()).append(" col ").append(ss.getStartColumn()); 249 result.append(" at ").append(ss.getSource().getName()).append(" line ").append(ss.getStartLine()).append(" col ").append(ss.getStartColumn());
252 } 250 }
253 } 251 }
254 result.append(": operation"); 252 result.append(": operation");
255 if (ex.getNode() != null && ex.getNode().getClass().getAnnotation(NodeInfo.class) != null) { 253 if (ex.getNode() != null && ex.getNode().getClass().getAnnotation(NodeInfo.class) != null) {