< prev index next >
src/jdk.jextract/share/classes/com/sun/tools/jextract/AsmCodeFactory.java
Print this page
*** 36,46 ****
import java.util.logging.Logger;
import java.util.stream.Stream;
import jdk.internal.clang.SourceLocation;
import jdk.internal.clang.Type;
import jdk.internal.clang.TypeKind;
- import jdk.internal.foreign.Util;
import jdk.internal.org.objectweb.asm.AnnotationVisitor;
import jdk.internal.org.objectweb.asm.ClassVisitor;
import jdk.internal.org.objectweb.asm.ClassWriter;
import jdk.internal.org.objectweb.asm.MethodVisitor;
import jdk.internal.org.objectweb.asm.TypeReference;
--- 36,45 ----
*** 531,541 ****
Object value = macroTree.value().get();
if (! global_macros.add(name)) {
return null; // added already
}
logger.fine(() -> "Adding macro " + name);
! Class<?> macroType = (Class<?>) Util.unboxIfNeeded(value.getClass());
String sig = jdk.internal.org.objectweb.asm.Type.getMethodDescriptor(jdk.internal.org.objectweb.asm.Type.getType(macroType));
MethodVisitor mv = global_cw.visitMethod(ACC_PUBLIC, name, sig, sig, null);
AnnotationVisitor av = mv.visitAnnotation(NATIVE_LOCATION, true);
--- 530,540 ----
Object value = macroTree.value().get();
if (! global_macros.add(name)) {
return null; // added already
}
logger.fine(() -> "Adding macro " + name);
! Class<?> macroType = Utils.unboxIfNeeded(value.getClass());
String sig = jdk.internal.org.objectweb.asm.Type.getMethodDescriptor(jdk.internal.org.objectweb.asm.Type.getType(macroType));
MethodVisitor mv = global_cw.visitMethod(ACC_PUBLIC, name, sig, sig, null);
AnnotationVisitor av = mv.visitAnnotation(NATIVE_LOCATION, true);
< prev index next >