< prev index next >

src/java.base/share/classes/jdk/internal/foreign/Util.java

Print this page

        

@@ -123,29 +123,10 @@
         } else {
             return null;
         }
     }
 
-    public static Layout variadicLayout(Class<?> c) {
-        c = (Class<?>)unboxIfNeeded(c);
-        if (c == char.class || c == byte.class || c == short.class || c == int.class || c == long.class) {
-            //it is ok to approximate with a machine word here; numerics arguments in a prototype-less
-            //function call are always rounded up to a register size anyway.
-            return Types.INT64;
-        } else if (c == float.class || c == double.class) {
-            return Types.DOUBLE;
-        } else if (Pointer.class.isAssignableFrom(c)) {
-            return Types.POINTER;
-        } else if (isCallback(c)) {
-            return Types.POINTER;
-        } else if (isCStruct(c)) {
-            return layoutof(c);
-        } else {
-            throw new IllegalArgumentException("Unhandled variadic argument class: " + c);
-        }
-    }
-
     public static Layout layoutof(Class<?> c) {
         String layout;
         if (c.isAnnotationPresent(NativeStruct.class)) {
             layout = c.getAnnotation(NativeStruct.class).value();
         } else {
< prev index next >