diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeData.java @ 7679:5f3cba05c2fa

Cleanup and improved error messages.
author Christian Humer <christian.humer@gmail.com>
date Thu, 31 Jan 2013 16:21:46 +0100
parents 5e3d1a68664e
children 388848bbe03d
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeData.java	Thu Jan 31 11:32:14 2013 +0100
+++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeData.java	Thu Jan 31 16:21:46 2013 +0100
@@ -133,7 +133,8 @@
         } else {
             ExecutableTypeData execType = null;
             for (ExecutableTypeData type : types) {
-                if (!type.getReturnType().getActualTypeData(getTypeSystem()).isVoid()) {
+                TypeData returnType = type.getReturnType().getActualTypeData(getTypeSystem());
+                if (!returnType.isVoid()) {
                     if (execType != null) {
                         // multiple generic types not allowed
                         return null;
@@ -280,25 +281,12 @@
         return specializations;
     }
 
-    // @formatter:off
     public String dump() {
         StringBuilder b = new StringBuilder();
-        b.append(String.format("[name = %s\n" +
-                        "  typeSystem = %s\n" +
-                        "  fields = %s\n" +
-                        "  types = %s\n" +
-                        "  specializations = %s\n" +
-                        "  guards = %s\n" +
-                        "]", Utils.getQualifiedName(getTemplateType()),
-                            getTypeSystem(),
-                            dumpList(fields),
-                            dumpList(getExecutableTypes()),
-                            dumpList(getSpecializations()),
-                            dumpList(guards)
-                        ));
+        b.append(String.format("[name = %s\n" + "  typeSystem = %s\n" + "  fields = %s\n" + "  types = %s\n" + "  specializations = %s\n" + "  guards = %s\n" + "]",
+                        Utils.getQualifiedName(getTemplateType()), getTypeSystem(), dumpList(fields), dumpList(getExecutableTypes()), dumpList(getSpecializations()), dumpList(guards)));
         return b.toString();
     }
-    // @formatter:on
 
     private static String dumpList(Object[] array) {
         if (array == null) {