diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/GeneratorUtils.java @ 20938:18c0f02fa4d2

Truffle-DSL: make type systems optional.
author Christian Humer <christian.humer@gmail.com>
date Tue, 14 Apr 2015 15:12:48 +0200
parents ae81dd154fb6
children b1530a6cce8c
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/GeneratorUtils.java	Tue Apr 14 22:12:03 2015 +0200
+++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/GeneratorUtils.java	Tue Apr 14 15:12:48 2015 +0200
@@ -85,14 +85,14 @@
         return method;
     }
 
-    public static boolean isTypeBoxingOptimized(TypeBoxingOptimization boxing, TypeData type) {
+    public static boolean isTypeBoxingOptimized(TypeBoxingOptimization boxing, TypeMirror type) {
         switch (boxing) {
             case NONE:
                 return false;
             case ALWAYS:
-                return !type.isGeneric() && !type.isVoid();
+                return !ElementUtils.isObject(type) && !ElementUtils.isVoid(type);
             case PRIMITIVE:
-                return type.isPrimitive();
+                return ElementUtils.isPrimitive(type);
             default:
                 throw new AssertionError();
         }